Skip to content

Commit

Permalink
Re-organizes survival box code to be less horrendously ugly. (tgstati…
Browse files Browse the repository at this point in the history
…on#47504)

* Adds clown and mime masks to their respective survival boxes, and re-organizes survival box code.

* Removes clown and mime masks from survival kits.
  • Loading branch information
Firecage authored and actioninja committed Nov 3, 2019
1 parent 7062f09 commit 87b1f56
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 63 deletions.
2 changes: 1 addition & 1 deletion code/game/gamemodes/clown_ops/clown_ops.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
l_pocket = /obj/item/pinpointer/nuke/syndicate
r_pocket = /obj/item/bikehorn
id = /obj/item/card/id/syndicate
backpack_contents = list(/obj/item/storage/box/syndie=1,\
backpack_contents = list(/obj/item/storage/box/survival/syndie=1,\
/obj/item/kitchen/knife/combat/survival,
/obj/item/reagent_containers/spray/waterflower/lube)
implants = list(/obj/item/implant/sad_trombone)
Expand Down
4 changes: 2 additions & 2 deletions code/game/gamemodes/nuclear/nuclear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
l_pocket = /obj/item/pinpointer/nuke/syndicate
id = /obj/item/card/id/syndicate
belt = /obj/item/gun/ballistic/automatic/pistol
backpack_contents = list(/obj/item/storage/box/syndie=1,\
backpack_contents = list(/obj/item/storage/box/survival/syndie=1,\
/obj/item/kitchen/knife/combat/survival)

var/tc = 25
Expand Down Expand Up @@ -168,7 +168,7 @@
internals_slot = SLOT_R_STORE
belt = /obj/item/storage/belt/military
r_hand = /obj/item/gun/ballistic/shotgun/bulldog
backpack_contents = list(/obj/item/storage/box/syndie=1,\
backpack_contents = list(/obj/item/storage/box/survival/syndie=1,\
/obj/item/tank/jetpack/oxygen/harness=1,\
/obj/item/gun/ballistic/automatic/pistol=1,\
/obj/item/kitchen/knife/combat/survival)
60 changes: 24 additions & 36 deletions code/game/objects/items/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,18 @@
new /obj/item/disk/nanite_program(src)

// Ordinary survival box
/obj/item/storage/box/survival
var/mask_type = /obj/item/clothing/mask/breath
var/internal_type = /obj/item/tank/internals/emergency_oxygen
var/medipen_type = /obj/item/reagent_containers/hypospray/medipen

/obj/item/storage/box/survival/PopulateContents()
new /obj/item/clothing/mask/breath(src)
new /obj/item/reagent_containers/hypospray/medipen(src)
new mask_type(src)
if(!isnull(medipen_type))
new medipen_type(src)

if(!isplasmaman(loc))
new /obj/item/tank/internals/emergency_oxygen(src)
new internal_type(src)
else
new /obj/item/tank/internals/plasmaman/belt(src)

Expand All @@ -138,50 +144,32 @@
new /obj/item/radio/off(src)

// Mining survival box
/obj/item/storage/box/survival_mining/PopulateContents()
new /obj/item/clothing/mask/gas/explorer(src)
new /obj/item/crowbar/red(src)
new /obj/item/reagent_containers/hypospray/medipen(src)
/obj/item/storage/box/survival/mining
mask_type = /obj/item/clothing/mask/gas/explorer

if(!isplasmaman(loc))
new /obj/item/tank/internals/emergency_oxygen(src)
else
new /obj/item/tank/internals/plasmaman/belt(src)
/obj/item/storage/box/survival/mining/PopulateContents()
..()
new /obj/item/crowbar/red(src)

// Engineer survival box
/obj/item/storage/box/engineer/PopulateContents()
new /obj/item/clothing/mask/breath(src)
new /obj/item/reagent_containers/hypospray/medipen(src)
/obj/item/storage/box/survival/engineer
internal_type = /obj/item/tank/internals/emergency_oxygen/engi

if(!isplasmaman(loc))
new /obj/item/tank/internals/emergency_oxygen/engi(src)
else
new /obj/item/tank/internals/plasmaman/belt(src)

/obj/item/storage/box/engineer/radio/PopulateContents()
/obj/item/storage/box/survival/engineer/radio/PopulateContents()
..() // we want the regular items too.
new /obj/item/radio/off(src)

// Syndie survival box
/obj/item/storage/box/syndie/PopulateContents()
new /obj/item/clothing/mask/gas/syndicate(src)

if(!isplasmaman(loc))
new /obj/item/tank/internals/emergency_oxygen/engi(src)
else
new /obj/item/tank/internals/plasmaman/belt(src)
/obj/item/storage/box/survival/syndie
mask_type = /obj/item/clothing/mask/gas/syndicate
internal_type = /obj/item/tank/internals/emergency_oxygen/engi
medipen_type = null

// Security survival box
/obj/item/storage/box/security/PopulateContents()
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/reagent_containers/hypospray/medipen(src)

if(!isplasmaman(loc))
new /obj/item/tank/internals/emergency_oxygen(src)
else
new /obj/item/tank/internals/plasmaman/belt(src)
/obj/item/storage/box/survival/security
mask_type = /obj/item/clothing/mask/gas/sechailer

/obj/item/storage/box/security/radio/PopulateContents()
/obj/item/storage/box/survival/security/radio/PopulateContents()
..() // we want the regular stuff too
new /obj/item/radio/off(src)

Expand Down
2 changes: 2 additions & 0 deletions code/modules/clothing/masks/gasmask.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
icon_state = "clown"
item_state = "clown_hat"
dye_color = "clown"
w_class = WEIGHT_CLASS_SMALL
flags_cover = MASKCOVERSEYES
resistance_flags = FLAMMABLE
actions_types = list(/datum/action/item_action/adjust)
Expand Down Expand Up @@ -120,6 +121,7 @@
clothing_flags = MASKINTERNALS
icon_state = "mime"
item_state = "mime"
w_class = WEIGHT_CLASS_SMALL
flags_cover = MASKCOVERSEYES
resistance_flags = FLAMMABLE
actions_types = list(/datum/action/item_action/adjust)
Expand Down
30 changes: 15 additions & 15 deletions code/modules/clothing/outfits/ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
glasses = /obj/item/clothing/glasses/hud/security/sunglasses
back = /obj/item/storage/backpack/ert
belt = /obj/item/storage/belt/security/full
backpack_contents = list(/obj/item/storage/box/engineer=1,\
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\
/obj/item/melee/baton/loaded=1,\
/obj/item/clothing/mask/gas/sechailer=1,\
/obj/item/gun/energy/e_gun=1)
Expand All @@ -48,7 +48,7 @@
name = "ERT Commander - High Alert"

glasses = /obj/item/clothing/glasses/thermal/eyepatch
backpack_contents = list(/obj/item/storage/box/engineer=1,\
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\
/obj/item/melee/baton/loaded=1,\
/obj/item/clothing/mask/gas/sechailer/swat=1,\
/obj/item/gun/energy/pulse/pistol/loyalpin=1)
Expand All @@ -62,7 +62,7 @@
glasses = /obj/item/clothing/glasses/hud/security/sunglasses
back = /obj/item/storage/backpack/ert/security
belt = /obj/item/storage/belt/security/full
backpack_contents = list(/obj/item/storage/box/engineer=1,\
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\
/obj/item/storage/box/handcuffs=1,\
/obj/item/clothing/mask/gas/sechailer=1,\
/obj/item/gun/energy/e_gun/stun=1,\
Expand All @@ -81,7 +81,7 @@
/datum/outfit/ert/security/alert
name = "ERT Security - High Alert"

backpack_contents = list(/obj/item/storage/box/engineer=1,\
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\
/obj/item/storage/box/handcuffs=1,\
/obj/item/clothing/mask/gas/sechailer/swat=1,\
/obj/item/melee/baton/loaded=1,\
Expand All @@ -97,7 +97,7 @@
back = /obj/item/storage/backpack/ert/medical
belt = /obj/item/storage/belt/medical
r_hand = /obj/item/storage/firstaid/regular
backpack_contents = list(/obj/item/storage/box/engineer=1,\
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\
/obj/item/melee/baton/loaded=1,\
/obj/item/clothing/mask/gas/sechailer=1,\
/obj/item/gun/energy/e_gun=1,\
Expand All @@ -117,7 +117,7 @@
/datum/outfit/ert/medic/alert
name = "ERT Medic - High Alert"

backpack_contents = list(/obj/item/storage/box/engineer=1,\
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\
/obj/item/melee/baton/loaded=1,\
/obj/item/clothing/mask/gas/sechailer/swat=1,\
/obj/item/gun/energy/pulse/pistol/loyalpin=1,\
Expand All @@ -134,7 +134,7 @@
belt = /obj/item/storage/belt/utility/full
l_pocket = /obj/item/rcd_ammo/large
r_hand = /obj/item/storage/firstaid/regular
backpack_contents = list(/obj/item/storage/box/engineer=1,\
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\
/obj/item/melee/baton/loaded=1,\
/obj/item/clothing/mask/gas/sechailer=1,\
/obj/item/gun/energy/e_gun=1,\
Expand All @@ -153,7 +153,7 @@
/datum/outfit/ert/engineer/alert
name = "ERT Engineer - High Alert"

backpack_contents = list(/obj/item/storage/box/engineer=1,\
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\
/obj/item/melee/baton/loaded=1,\
/obj/item/clothing/mask/gas/sechailer/swat=1,\
/obj/item/gun/energy/pulse/pistol/loyalpin=1,\
Expand Down Expand Up @@ -195,7 +195,7 @@
name = "Inquisition Commander"
r_hand = /obj/item/nullrod/scythe/talking/chainsword
suit = /obj/item/clothing/suit/space/hardsuit/ert/paranormal
backpack_contents = list(/obj/item/storage/box/engineer=1,
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,
/obj/item/clothing/mask/gas/sechailer=1,
/obj/item/gun/energy/e_gun=1)

Expand All @@ -204,7 +204,7 @@

suit = /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor

backpack_contents = list(/obj/item/storage/box/engineer=1,
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,
/obj/item/storage/box/handcuffs=1,
/obj/item/clothing/mask/gas/sechailer=1,
/obj/item/gun/energy/e_gun/stun=1,
Expand All @@ -216,7 +216,7 @@

suit = /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor

backpack_contents = list(/obj/item/storage/box/engineer=1,
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,
/obj/item/melee/baton/loaded=1,
/obj/item/clothing/mask/gas/sechailer=1,
/obj/item/gun/energy/e_gun=1,
Expand All @@ -242,7 +242,7 @@
glasses = /obj/item/clothing/glasses/hud/health
back = /obj/item/storage/backpack/cultpack
belt = /obj/item/storage/belt/soulstone
backpack_contents = list(/obj/item/storage/box/engineer=1,
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,
/obj/item/nullrod=1,
/obj/item/clothing/mask/gas/sechailer=1,
/obj/item/gun/energy/e_gun=1,
Expand All @@ -254,7 +254,7 @@
suit = /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor

belt = /obj/item/storage/belt/soulstone/full/chappy
backpack_contents = list(/obj/item/storage/box/engineer=1,
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,
/obj/item/grenade/chem_grenade/holy=1,
/obj/item/nullrod=1,
/obj/item/clothing/mask/gas/sechailer=1,
Expand All @@ -272,7 +272,7 @@
r_pocket = /obj/item/grenade/chem_grenade/cleaner
l_pocket = /obj/item/grenade/chem_grenade/cleaner
l_hand = /obj/item/storage/bag/trash/bluespace
backpack_contents = list(/obj/item/storage/box/engineer=1,\
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\
/obj/item/storage/box/lights/mixed=1,\
/obj/item/melee/baton/loaded=1,\
/obj/item/clothing/mask/gas/sechailer=1,\
Expand All @@ -293,7 +293,7 @@
/datum/outfit/ert/janitor/heavy
name = "ERT Janitor - Heavy Duty"
r_hand = /obj/item/reagent_containers/spray/chemsprayer/janitor
backpack_contents = list(/obj/item/storage/box/engineer=1,\
backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\
/obj/item/storage/box/lights/mixed=1,\
/obj/item/melee/baton/loaded=1,\
/obj/item/clothing/mask/gas/sechailer=1,\
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/outfits/event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
r_pocket = /obj/item/flashlight
gloves = /obj/item/clothing/gloves/color/red

box = /obj/item/storage/box/engineer
box = /obj/item/storage/box/survival/engineer
backpack_contents = list(/obj/item/a_gift/anything = 5)

/datum/outfit/santa/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/outfits/vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
id = /obj/item/card/id/syndicate
belt = /obj/item/gun/ballistic/automatic/pistol
l_pocket = /obj/item/paper/fluff/vr/fluke_ops
backpack_contents = list(/obj/item/storage/box/syndie=1,\
backpack_contents = list(/obj/item/storage/box/survival/syndie=1,\
/obj/item/kitchen/knife/combat/survival)

/datum/outfit/vr/syndicate/post_equip(mob/living/carbon/human/H)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/atmospheric_technician.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
backpack = /obj/item/storage/backpack/industrial
satchel = /obj/item/storage/backpack/satchel/eng
duffelbag = /obj/item/storage/backpack/duffelbag/engineering
box = /obj/item/storage/box/engineer
box = /obj/item/storage/box/survival/engineer
pda_slot = SLOT_L_STORE
backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/chief_engineer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
backpack = /obj/item/storage/backpack/industrial
satchel = /obj/item/storage/backpack/satchel/eng
duffelbag = /obj/item/storage/backpack/duffelbag/engineering
box = /obj/item/storage/box/engineer
box = /obj/item/storage/box/survival/engineer
pda_slot = SLOT_L_STORE
chameleon_extras = /obj/item/stamp/ce

Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/head_of_security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
backpack = /obj/item/storage/backpack/security
satchel = /obj/item/storage/backpack/satchel/sec
duffelbag = /obj/item/storage/backpack/duffelbag/sec
box = /obj/item/storage/box/security
box = /obj/item/storage/box/survival/security

implants = list(/obj/item/implant/mindshield)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/security_officer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, S
backpack = /obj/item/storage/backpack/security
satchel = /obj/item/storage/backpack/satchel/sec
duffelbag = /obj/item/storage/backpack/duffelbag/sec
box = /obj/item/storage/box/security
box = /obj/item/storage/box/survival/security

implants = list(/obj/item/implant/mindshield)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/shaft_miner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
backpack = /obj/item/storage/backpack/explorer
satchel = /obj/item/storage/backpack/satchel/explorer
duffelbag = /obj/item/storage/backpack/duffelbag
box = /obj/item/storage/box/survival_mining
box = /obj/item/storage/box/survival/mining

chameleon_extras = /obj/item/gun/energy/kinetic_accelerator

Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/station_engineer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
backpack = /obj/item/storage/backpack/industrial
satchel = /obj/item/storage/backpack/satchel/eng
duffelbag = /obj/item/storage/backpack/duffelbag/engineering
box = /obj/item/storage/box/engineer
box = /obj/item/storage/box/survival/engineer
pda_slot = SLOT_L_STORE
backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/warden.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
backpack = /obj/item/storage/backpack/security
satchel = /obj/item/storage/backpack/satchel/sec
duffelbag = /obj/item/storage/backpack/duffelbag/sec
box = /obj/item/storage/box/security
box = /obj/item/storage/box/survival/security

implants = list(/obj/item/implant/mindshield)

Expand Down

0 comments on commit 87b1f56

Please sign in to comment.