From ac2ded9c86425f00149651443bded4e13a5531c3 Mon Sep 17 00:00:00 2001 From: Techhead0 Date: Fri, 27 Mar 2015 16:50:36 -0400 Subject: [PATCH 1/2] Voidsuit Suit Storage Tanks can now be installed in the suit storage slot of voidsuits, a la helmets and magboots. Order of removal is Tank>Helmet>Boots. --- code/modules/clothing/spacesuits/void/void.dm | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 68a619ba28..e515b9a02b 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -55,6 +55,7 @@ //Inbuilt devices. var/obj/item/clothing/shoes/magboots/boots = null // Deployable boots, if any. var/obj/item/clothing/head/helmet/helmet = null // Deployable helmet, if any. + var/obj/item/weapon/tank/tank = null // Deployable tank, if any. /obj/item/clothing/suit/space/void/refit_for_species(var/target_species) ..() @@ -87,6 +88,13 @@ M << "Your suit's boots deploy with a hiss." boots.canremove = 0 + if(tank) + if(H.s_store) //In case someone finds a way. + M << "Alarmingly, the valve on your suit's installed tank fails to engage." + else if (H.equip_to_slot_if_possible(tank, slot_s_store)) + M << "The valve on your suit's installed tank safely engages." + tank.canremove = 0 + /obj/item/clothing/suit/space/void/dropped() ..() @@ -107,6 +115,10 @@ boots.canremove = 1 H.drop_from_inventory(boots) boots.loc = src + + if(tank) + tank.canremove = 1 + tank.loc = src /obj/item/clothing/suit/space/void/verb/toggle_helmet() @@ -150,7 +162,11 @@ return if(istype(W,/obj/item/weapon/screwdriver)) - if(helmet) + if(tank) + user << "You pop \the [tank] out of \the [src]'s storage compartment." + tank.loc = get_turf(src) + src.tank = null + else if(helmet) user << "You detatch \the [helmet] from \the [src]'s helmet mount." helmet.loc = get_turf(src) src.helmet = null @@ -179,5 +195,16 @@ W.loc = src boots = W return + else if(istype(W,/obj/item/weapon/tank)) + if(tank) + user << "\The [src] already has an airtank installed." + else if(istype(W,/obj/item/weapon/tank/phoron)) + user << "\The [W] cannot be inserted into \the [src]'s storage compartment." + else + user << "You insert \the [W] into \the [src]'s storage compartment." + user.drop_item() + W.loc = src + tank = W + return ..() \ No newline at end of file From c8487db13ba7d0ab78565d1d313963b1628c06b4 Mon Sep 17 00:00:00 2001 From: Techhead0 Date: Mon, 13 Apr 2015 04:31:27 -0400 Subject: [PATCH 2/2] Eject Tank verb and span classes Now you can eject your tank onto the ground while wearing the suit. Toggle Helmet verb now uses span classes. --- code/modules/clothing/spacesuits/void/void.dm | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index e515b9a02b..235f78783b 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -139,7 +139,7 @@ if(H.wear_suit != src) return if(H.head == helmet) - H << "\blue You retract your suit helmet." + H << "You retract your suit helmet." helmet.canremove = 1 H.drop_from_inventory(helmet) helmet.loc = src @@ -150,9 +150,32 @@ if(H.equip_to_slot_if_possible(helmet, slot_head)) helmet.pickup(H) helmet.canremove = 0 - H << "You deploy your suit helmet, sealing you off from the world." + H << "You deploy your suit helmet, sealing you off from the world." helmet.update_light(H) +/obj/item/clothing/suit/space/void/verb/eject_tank() + + set name = "Eject Tank" + set category = "Object" + set src in usr + + if(!istype(src.loc,/mob/living)) return + + if(!tank) + usr << "There is no tank inserted." + return + + var/mob/living/carbon/human/H = usr + + if(!istype(H)) return + if(H.stat) return + if(H.wear_suit != src) return + + H << "You press the emergency release, ejecting \the [tank] from your suit." + tank.canremove = 1 + H.drop_from_inventory(tank) + src.tank = null + /obj/item/clothing/suit/space/void/attackby(obj/item/W as obj, mob/user as mob) if(!istype(user,/mob/living)) return