Skip to content

Commit

Permalink
Tank weapon IFF (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed May 17, 2024
1 parent 54bc643 commit 0757487
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/modules/vehicles/hardpoints/holder/tank_turret.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
burst_delay = 1.0 SECONDS
extra_delay = 5.0 SECONDS

/obj/item/hardpoint/holder/tank_turret/set_bullet_traits()
..()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff)
))

/obj/item/hardpoint/holder/tank_turret/update_icon()
var/broken = (health <= 0)
icon_state = "tank_turret_[broken]"
Expand Down
6 changes: 6 additions & 0 deletions code/modules/vehicles/hardpoints/primary/autocannon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@
GUN_FIREMODE_AUTOMATIC,
)
fire_delay = 0.7 SECONDS

/obj/item/hardpoint/primary/autocannon/set_bullet_traits()
..()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff)
))
6 changes: 6 additions & 0 deletions code/modules/vehicles/hardpoints/primary/ltb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@

scatter = 0
fire_delay = 10.0 SECONDS

/obj/item/hardpoint/primary/cannon/set_bullet_traits()
..()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff)
))
6 changes: 6 additions & 0 deletions code/modules/vehicles/hardpoints/primary/minigun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
/// When it was last fired, related to world.time.
var/last_fired = 0

/obj/item/hardpoint/primary/minigun/set_bullet_traits()
..()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff)
))

/obj/item/hardpoint/primary/minigun/set_fire_delay(value)
fire_delay = value
SEND_SIGNAL(src, COMSIG_GUN_AUTOFIREDELAY_MODIFIED, fire_delay * stage_delay_mult)
Expand Down
6 changes: 6 additions & 0 deletions code/modules/vehicles/hardpoints/secondary/tow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@
scatter = 2
fire_delay = 7.0 SECONDS

/obj/item/hardpoint/secondary/towlauncher/set_bullet_traits()
..()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff)
))

0 comments on commit 0757487

Please sign in to comment.