diff --git a/code/defines/mob/living/carbon/human.dm b/code/defines/mob/living/carbon/human.dm index d693c59a8ff..e147e732108 100644 --- a/code/defines/mob/living/carbon/human.dm +++ b/code/defines/mob/living/carbon/human.dm @@ -33,6 +33,7 @@ var/obj/item/weapon/card/id/wear_id = null var/obj/item/weapon/r_store = null var/obj/item/weapon/l_store = null + var/obj/item/weapon/s_store = null var/icon/stand_icon = null var/icon/lying_icon = null diff --git a/code/defines/obj/clothing.dm b/code/defines/obj/clothing.dm index 36eb8358c70..33a155d7f4c 100644 --- a/code/defines/obj/clothing.dm +++ b/code/defines/obj/clothing.dm @@ -487,6 +487,7 @@ name = "suit" var/fire_resist = T0C+100 flags = FPRINT | TABLEPASS + var/list/allowed = list(/obj/item/weapon/tank/emergency_oxygen) /obj/item/clothing/suit/bio_suit @@ -512,6 +513,7 @@ icon_state = "detective" item_state = "det_suit" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS + allowed = list(/obj/item/weapon/gun/detectiverevolver,/obj/item/weapon/ammo/a38,/obj/item/weapon/cigpacket,/obj/item/weapon/zippo,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) /obj/item/clothing/suit/judgerobe name = "judge's robe" @@ -519,6 +521,7 @@ icon_state = "judge" item_state = "judge" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS + allowed = list(/obj/item/weapon/cigpacket,/obj/item/weapon/spacecash) /obj/item/clothing/suit/labcoat name = "labcoat" @@ -528,6 +531,7 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS permeability_coefficient = 0.25 heat_transfer_coefficient = 0.75 + allowed = list(/obj/item/weapon/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer) /obj/item/clothing/suit/labcoat/cmo name = "chief medical officer's labcoat" @@ -553,6 +557,7 @@ icon_state = "apron" item_state = "apron" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS + allowed = list (/obj/item/weapon/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/nutrient,/obj/item/weapon/minihoe) /obj/item/clothing/suit/wizrobe name = "wizard robe" @@ -563,6 +568,7 @@ permeability_coefficient = 0.01 heat_transfer_coefficient = 0.01 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS + allowed = list(/obj/item/weapon/teleportation_scroll) /obj/item/clothing/suit/wizrobe/red name = "red wizard robe" @@ -578,6 +584,9 @@ // ARMOR +/obj/item/clothing/suit/armor + allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/baton,/obj/item/weapon/handcuffs) + /obj/item/clothing/suit/armor/vest name = "armor" desc = "An armored vest that protects against some damage." @@ -614,6 +623,7 @@ item_state = "caparmor" w_class = 4//bulky item body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS + allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) /obj/item/clothing/suit/armor/centcomm name = "Cent. Com. armor" @@ -622,6 +632,7 @@ item_state = "centcom" w_class = 4//bulky item body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS + allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) /obj/item/clothing/suit/armor/heavy name = "heavy armor" @@ -665,6 +676,7 @@ protective_temperature = 4500 heat_transfer_coefficient = 0.01 + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen) /obj/item/clothing/suit/fire/heavy name = "firesuit" @@ -689,6 +701,7 @@ permeability_coefficient = 0.02 protective_temperature = 1000 heat_transfer_coefficient = 0.02 + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen) /obj/item/clothing/suit/space/rig name = "rig suit" diff --git a/code/game/algorithm.dm b/code/game/algorithm.dm index 878c6cee25b..80b844c2226 100644 --- a/code/game/algorithm.dm +++ b/code/game/algorithm.dm @@ -75,7 +75,7 @@ proc/countJob(rank) slot_w_uniform = 14 slot_l_store = 15 slot_r_store = 16 -// slot_w_radio = 17 + slot_s_store = 17 slot_in_backpack = 18 /mob/living/carbon/human/proc/equip_if_possible(obj/item/weapon/W, slot) // since byond doesn't seem to have pointers, this seems like the best way to do this :/ @@ -84,6 +84,9 @@ proc/countJob(rank) if((slot == l_store || slot == r_store || slot == belt || slot == wear_id) && !src.w_uniform) del(W) return + if(slot == s_store && !src.wear_suit) + del(W) + return switch(slot) if(slot_back) if(!src.back) @@ -149,10 +152,10 @@ proc/countJob(rank) if(!src.r_store) src.r_store = W equipped = 1 -// if(slot_w_radio) -// if(!src.w_radio) -// src.w_radio = W -// equipped = 1 + if(slot_s_store) + if(!src.s_store) + src.s_store = W + equipped = 1 if(slot_in_backpack) if (src.back && istype(src.back, /obj/item/weapon/storage/backpack)) var/obj/item/weapon/storage/backpack/B = src.back diff --git a/code/game/hud.dm b/code/game/hud.dm index 52b2a890bd4..6488db854c5 100644 --- a/code/game/hud.dm +++ b/code/game/hud.dm @@ -10,6 +10,7 @@ #define ui_back "SOUTH+1,3" #define ui_storage1 "SOUTH-1,4" #define ui_storage2 "SOUTH-1,5" +#define ui_sstore1 "SOUTH+1,4" #define ui_resist "EAST+1,SOUTH-1" #define ui_gloves "SOUTH,5" #define ui_glasses "SOUTH,7" @@ -55,14 +56,14 @@ obj/hud/New(var/type = 0) if(mymob:shoes) mymob:shoes:screen_loc = ui_shoes if(mymob:gloves) mymob:gloves:screen_loc = ui_gloves if(mymob:ears) mymob:ears:screen_loc = ui_ears -// if(mymob:w_radio) mymob:w_radio:screen_loc = ui_headset + if(mymob:s_store) mymob:s_store:screen_loc = ui_sstore1 if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses else if(istype(mymob, /mob/living/carbon/human)) if(mymob:shoes) mymob:shoes:screen_loc = null if(mymob:gloves) mymob:gloves:screen_loc = null if(mymob:ears) mymob:ears:screen_loc = null -// if(mymob:w_radio) mymob:w_radio:screen_loc = null + if(mymob:s_store) mymob:s_store:screen_loc = null if(mymob:glasses) mymob:glasses:screen_loc = null diff --git a/code/modules/mob/living/carbon/human/hud.dm b/code/modules/mob/living/carbon/human/hud.dm index 9ac4706979b..eaa70801cdb 100644 --- a/code/modules/mob/living/carbon/human/hud.dm +++ b/code/modules/mob/living/carbon/human/hud.dm @@ -206,6 +206,14 @@ using.layer = 19 src.adding += using + using = new src.h_type( src ) + using.name = "suit storage" + using.icon = ui_style + using.icon_state = "pocket" + using.screen_loc = ui_sstore1 + using.layer = 19 + src.other += using + using = new src.h_type( src ) using.name = "resist" using.icon = ui_style diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 7554bffe2ad..39fb3a9862d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -571,6 +571,15 @@ /mob/living/carbon/human/u_equip(obj/item/W as obj) if (W == src.wear_suit) + W = src.s_store + if (W) + u_equip(W) + if (src.client) + src.client.screen -= W + if (W) + W.loc = src.loc + W.dropped(src) + W.layer = initial(W.layer) src.wear_suit = null else if (W == src.w_uniform) W = src.r_store @@ -634,6 +643,8 @@ src.r_store = null else if (W == src.l_store) src.l_store = null + else if (W == src.s_store) + src.s_store = null else if (W == src.back) src.back = null else if (W == src.handcuffed) @@ -806,6 +817,22 @@ return src.u_equip(W) src.r_store = W + if("suit storage") + if (src.s_store) + if (emptyHand) + src.s_store.DblClick() + return + var/confirm + if (src.wear_suit) + for(var/i=1, i<=src.wear_suit.allowed.len, i++) + // world << "[src.wear_suit.allowed[i]] and [W.type]" + if (findtext("[W.type]","[src.wear_suit.allowed[i]]")) + confirm = 1 + break + if (!confirm) return + else + src.u_equip(W) + src.s_store = W update_clothing() @@ -1154,6 +1181,9 @@ if (src.r_store) src.r_store.screen_loc = ui_storage2 + if (src.s_store) + src.s_store.screen_loc = ui_sstore1 + if (src.back) var/t1 = src.back.icon_state src.overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = MOB_LAYER)