From e209195b91477caee52fddfa871e8d425185546f Mon Sep 17 00:00:00 2001 From: "kortgstation@gmail.com" Date: Wed, 14 Sep 2011 08:41:56 +0000 Subject: [PATCH] Fixed a bug with the e-sword deflection messages. Added an ion cannon for mechs, thus far is adminspawn only and still needs a sprite. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2200 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/mecha/equipment/weapons/weapons.dm | 26 +++++++++++++++++++ code/modules/mob/living/carbon/human/human.dm | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 480c2ee5143..4de001341f8 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -37,6 +37,32 @@ do_after_cooldown() return +/obj/item/mecha_parts/mecha_equipment/weapon/ion + equip_cooldown = 7 + name = "mkIV Ion Heavy Repeater" + icon_state = "mecha_laser" + energy_drain = 120 + + action(target) + if(!action_checks(target)) return + var/turf/curloc = chassis.loc + var/atom/targloc = get_turf(target) + if (!targloc || !istype(targloc, /turf) || !curloc) + return + if (targloc == curloc) + return + set_ready_state(0) + playsound(chassis, 'Laser.ogg', 50, 1) + var/obj/item/projectile/beam/A = new /obj/item/projectile/ion(curloc) + A.original = targloc + A.current = curloc + A.yo = targloc.y - curloc.y + A.xo = targloc.x - curloc.x + chassis.use_power(energy_drain) + A.process() + chassis.log_message("Fired from [src.name], targeting [target].") + do_after_cooldown() + return /obj/item/mecha_parts/mecha_equipment/weapon/pulse equip_cooldown = 30 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 889aa9eb0de..9686d15fc5c 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -220,7 +220,7 @@ B.active = 1 if ((parry)) if (prob(50 - round(P.damage / 3))) - visible_message("\red [src] deflects the shot with their blade!", 4) + visible_message("\red [src] deflects the shot with their blade!") return for(var/obj/item/device/shield/S in src)