mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Merge pull request #899 from Neerti/2/4/2016_suit_coolers_in_voidsuits
Allows suit cooling units to be attached to voidsuits.
This commit is contained in:
@@ -57,11 +57,12 @@
|
|||||||
var/obj/item/clothing/shoes/magboots/boots = null // Deployable boots, if any.
|
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/clothing/head/helmet/helmet = null // Deployable helmet, if any.
|
||||||
var/obj/item/weapon/tank/tank = null // Deployable tank, if any.
|
var/obj/item/weapon/tank/tank = null // Deployable tank, if any.
|
||||||
|
var/obj/item/device/suit_cooling_unit/cooler = null// Cooling unit, for FBPs. Cannot be installed alongside a tank.
|
||||||
|
|
||||||
/obj/item/clothing/suit/space/void/examine(user)
|
/obj/item/clothing/suit/space/void/examine(user)
|
||||||
..(user)
|
..(user)
|
||||||
var/list/part_list = new
|
var/list/part_list = new
|
||||||
for(var/obj/item/I in list(helmet,boots,tank))
|
for(var/obj/item/I in list(helmet,boots,tank,cooler))
|
||||||
part_list += "\a [I]"
|
part_list += "\a [I]"
|
||||||
user << "\The [src] has [english_list(part_list)] installed."
|
user << "\The [src] has [english_list(part_list)] installed."
|
||||||
if(tank && in_range(src,user))
|
if(tank && in_range(src,user))
|
||||||
@@ -102,6 +103,13 @@
|
|||||||
M << "The valve on your suit's installed tank safely engages."
|
M << "The valve on your suit's installed tank safely engages."
|
||||||
tank.canremove = 0
|
tank.canremove = 0
|
||||||
|
|
||||||
|
if(cooler)
|
||||||
|
if(H.s_store) //Ditto
|
||||||
|
M << "Alarmingly, the cooling unit installed into your suit fails to deploy."
|
||||||
|
else if (H.equip_to_slot_if_possible(cooler, slot_s_store))
|
||||||
|
M << "Your suit's cooling unit deploys."
|
||||||
|
cooler.canremove = 0
|
||||||
|
|
||||||
|
|
||||||
/obj/item/clothing/suit/space/void/dropped()
|
/obj/item/clothing/suit/space/void/dropped()
|
||||||
..()
|
..()
|
||||||
@@ -128,6 +136,10 @@
|
|||||||
tank.canremove = 1
|
tank.canremove = 1
|
||||||
tank.forceMove(src)
|
tank.forceMove(src)
|
||||||
|
|
||||||
|
if(cooler)
|
||||||
|
cooler.canremove = 1
|
||||||
|
cooler.forceMove(src)
|
||||||
|
|
||||||
/obj/item/clothing/suit/space/void/verb/toggle_helmet()
|
/obj/item/clothing/suit/space/void/verb/toggle_helmet()
|
||||||
|
|
||||||
set name = "Toggle Helmet"
|
set name = "Toggle Helmet"
|
||||||
@@ -163,14 +175,14 @@
|
|||||||
|
|
||||||
/obj/item/clothing/suit/space/void/verb/eject_tank()
|
/obj/item/clothing/suit/space/void/verb/eject_tank()
|
||||||
|
|
||||||
set name = "Eject Voidsuit Tank"
|
set name = "Eject Voidsuit Tank/Cooler"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in usr
|
set src in usr
|
||||||
|
|
||||||
if(!istype(src.loc,/mob/living)) return
|
if(!istype(src.loc,/mob/living)) return
|
||||||
|
|
||||||
if(!tank)
|
if(!tank && !cooler)
|
||||||
usr << "There is no tank inserted."
|
usr << "There is no tank or cooling unit inserted."
|
||||||
return
|
return
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = usr
|
var/mob/living/carbon/human/H = usr
|
||||||
@@ -179,10 +191,16 @@
|
|||||||
if(H.stat) return
|
if(H.stat) return
|
||||||
if(H.wear_suit != src) return
|
if(H.wear_suit != src) return
|
||||||
|
|
||||||
H << "<span class='info'>You press the emergency release, ejecting \the [tank] from your suit.</span>"
|
var/obj/item/removing = null
|
||||||
tank.canremove = 1
|
if(tank)
|
||||||
H.drop_from_inventory(tank)
|
removing = tank
|
||||||
src.tank = null
|
tank = null
|
||||||
|
else
|
||||||
|
removing = cooler
|
||||||
|
cooler = null
|
||||||
|
H << "<span class='info'>You press the emergency release, ejecting \the [removing] from your suit.</span>"
|
||||||
|
removing.canremove = 1
|
||||||
|
H.drop_from_inventory(removing)
|
||||||
|
|
||||||
/obj/item/clothing/suit/space/void/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/item/clothing/suit/space/void/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
|
|
||||||
@@ -194,13 +212,17 @@
|
|||||||
|
|
||||||
if(istype(W,/obj/item/weapon/screwdriver))
|
if(istype(W,/obj/item/weapon/screwdriver))
|
||||||
if(helmet || boots || tank)
|
if(helmet || boots || tank)
|
||||||
var/choice = input("What component would you like to remove?") as null|anything in list(helmet,boots,tank)
|
var/choice = input("What component would you like to remove?") as null|anything in list(helmet,boots,tank,cooler)
|
||||||
if(!choice) return
|
if(!choice) return
|
||||||
|
|
||||||
if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead
|
if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead
|
||||||
user << "You pop \the [tank] out of \the [src]'s storage compartment."
|
user << "You pop \the [tank] out of \the [src]'s storage compartment."
|
||||||
tank.forceMove(get_turf(src))
|
tank.forceMove(get_turf(src))
|
||||||
src.tank = null
|
src.tank = null
|
||||||
|
else if(choice == cooler)
|
||||||
|
user << "You pop \the [cooler] out of \the [src]'s storage compartment."
|
||||||
|
cooler.forceMove(get_turf(src))
|
||||||
|
src.cooler = null
|
||||||
else if(choice == helmet)
|
else if(choice == helmet)
|
||||||
user << "You detatch \the [helmet] from \the [src]'s helmet mount."
|
user << "You detatch \the [helmet] from \the [src]'s helmet mount."
|
||||||
helmet.forceMove(get_turf(src))
|
helmet.forceMove(get_turf(src))
|
||||||
@@ -233,6 +255,8 @@
|
|||||||
else if(istype(W,/obj/item/weapon/tank))
|
else if(istype(W,/obj/item/weapon/tank))
|
||||||
if(tank)
|
if(tank)
|
||||||
user << "\The [src] already has an airtank installed."
|
user << "\The [src] already has an airtank installed."
|
||||||
|
else if(cooler)
|
||||||
|
user << "\The [src]'s suit cooling unit is in the way. Remove it first."
|
||||||
else if(istype(W,/obj/item/weapon/tank/phoron))
|
else if(istype(W,/obj/item/weapon/tank/phoron))
|
||||||
user << "\The [W] cannot be inserted into \the [src]'s storage compartment."
|
user << "\The [W] cannot be inserted into \the [src]'s storage compartment."
|
||||||
else
|
else
|
||||||
@@ -241,5 +265,16 @@
|
|||||||
W.forceMove(src)
|
W.forceMove(src)
|
||||||
tank = W
|
tank = W
|
||||||
return
|
return
|
||||||
|
else if(istype(W,/obj/item/device/suit_cooling_unit))
|
||||||
|
if(cooler)
|
||||||
|
user << "\The [src] already has a suit cooling unit installed."
|
||||||
|
else if(tank)
|
||||||
|
user << "\The [src]'s airtank is in the way. Remove it first."
|
||||||
|
else
|
||||||
|
user << "You insert \the [W] into \the [src]'s storage compartment."
|
||||||
|
user.drop_item()
|
||||||
|
W.forceMove(src)
|
||||||
|
cooler = W
|
||||||
|
return
|
||||||
|
|
||||||
..()
|
..()
|
||||||
36
html/changelogs/Neerti-CoolersInVoidsuits.yml
Normal file
36
html/changelogs/Neerti-CoolersInVoidsuits.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
################################
|
||||||
|
# Example Changelog File
|
||||||
|
#
|
||||||
|
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||||
|
#
|
||||||
|
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||||
|
# When it is, any changes listed below will disappear.
|
||||||
|
#
|
||||||
|
# Valid Prefixes:
|
||||||
|
# bugfix
|
||||||
|
# wip (For works in progress)
|
||||||
|
# tweak
|
||||||
|
# soundadd
|
||||||
|
# sounddel
|
||||||
|
# rscadd (general adding of nice things)
|
||||||
|
# rscdel (general deleting of nice things)
|
||||||
|
# imageadd
|
||||||
|
# imagedel
|
||||||
|
# maptweak
|
||||||
|
# spellcheck (typo fixes)
|
||||||
|
# experiment
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Your name.
|
||||||
|
author: Neerti
|
||||||
|
|
||||||
|
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
# Any changes you've made. See valid prefix list above.
|
||||||
|
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||||
|
# SCREW THIS UP AND IT WON'T WORK.
|
||||||
|
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||||
|
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||||
|
changes:
|
||||||
|
- rscadd: "Suit cooling units can now be attached to voidsuits. Note that coolers and air tanks are mutually exclusive."
|
||||||
Reference in New Issue
Block a user