From 45a8c6573920d90df436baa59736ad08c1a8f1a2 Mon Sep 17 00:00:00 2001 From: AnturK Date: Fri, 6 Apr 2018 21:44:18 +0200 Subject: [PATCH 1/2] Adds kickback to mecha weapons. (#36999) --- code/game/mecha/equipment/weapons/weapons.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 061bf0a727..6c7d69b570 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -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(..())