From 5307a410ce2c1a892bac1e52db9cb78f4581dd60 Mon Sep 17 00:00:00 2001 From: SamCroswell Date: Sat, 26 Jul 2014 19:27:16 -0400 Subject: [PATCH] Emagging Ripleys You may now emag the Ripley mech to allow guns to be mounted on it. It does, however, leave an obvious-as-fuck bold red message in the mech's desc. This will -only- work for the Ripley mech, god help us all if an Odysseus ever got weapons. --- code/game/mecha/equipment/weapons/weapons.dm | 2 ++ code/game/mecha/mecha.dm | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 55ac2dbddcd..52a965c3fb3 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -12,6 +12,8 @@ if(size > M.maxsize) return 0 return 1 + else if (M.emagged == 1) + return 1 return 0 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 88440c4eef1..57e62d7ef13 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -39,6 +39,7 @@ var/datum/effect/effect/system/spark_spread/spark_system = new var/lights = 0 var/lights_power = 6 + var/emagged = 0 //inner atmos var/use_internal_tank = 0 @@ -659,6 +660,16 @@ /obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/card/emag)) + if(istype(src, /obj/mecha/working/ripley) && emagged == 0) + emagged = 1 + usr << "\blue You slide the [W] through the [src]'s ID slot." + playsound(src.loc, "sparks", 100, 1) + src.desc += "
\red The mech's equiptment slots spark dangerously!" + else + usr <<"\red The [src]'s ID slot rejects the [W]." + return + if(istype(W, /obj/item/device/mmi) || istype(W, /obj/item/device/mmi/posibrain)) if(mmi_move_inside(W,user))