Merge pull request #6295 from Citadel-Station-13/upstream-merge-36999
[MIRROR] Adds kickback to mecha weapons.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
var/randomspread = 0 //use random spread for machineguns, instead of shotgun scatter
|
||||
var/projectile_delay = 0
|
||||
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the weapon is fired.
|
||||
var/kickback = TRUE //Will using this weapon in no grav push mecha back.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(obj/mecha/combat/M)
|
||||
if(..())
|
||||
@@ -49,7 +50,9 @@
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
|
||||
sleep(max(0, projectile_delay))
|
||||
|
||||
|
||||
if(kickback)
|
||||
chassis.newtonian_move(turn(chassis.dir,180))
|
||||
chassis.log_message("Fired from [src.name], targeting [target].")
|
||||
return 1
|
||||
|
||||
@@ -152,6 +155,7 @@
|
||||
energy_drain = 200
|
||||
equip_cooldown = 150
|
||||
range = MELEE|RANGED
|
||||
kickback = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
|
||||
Reference in New Issue
Block a user