diff --git a/code/WorkInProgress/Chemistry-Tools.dm b/code/WorkInProgress/Chemistry-Tools.dm index 4aa0e51bdc..d0761e563a 100644 --- a/code/WorkInProgress/Chemistry-Tools.dm +++ b/code/WorkInProgress/Chemistry-Tools.dm @@ -1365,6 +1365,15 @@ ..() reagents.add_reagent("nutriment", 3) +/obj/item/weapon/reagent_containers/food/snacks/candy_corn + name = "candy corn" + desc = "It's a handful of candy corn. Can be stored in a detective's hat." + icon_state = "candy_corn" + New() + ..() + reagents.add_reagent("nutriment", 10) + bitesize = 2 + /obj/item/weapon/reagent_containers/food/snacks/chips name = "chips" desc = "Commander Riker's What-The-Crisps" diff --git a/code/defines/mob/living/carbon/human.dm b/code/defines/mob/living/carbon/human.dm index e147e73210..8f6464e8c7 100644 --- a/code/defines/mob/living/carbon/human.dm +++ b/code/defines/mob/living/carbon/human.dm @@ -34,6 +34,7 @@ var/obj/item/weapon/r_store = null var/obj/item/weapon/l_store = null var/obj/item/weapon/s_store = null + var/obj/item/weapon/h_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 fb8e1bfbed..9a87d2bae7 100644 --- a/code/defines/obj/clothing.dm +++ b/code/defines/obj/clothing.dm @@ -156,6 +156,7 @@ name = "head" icon = 'hats.dmi' body_parts_covered = HEAD + var/list/allowed = list() /obj/item/clothing/head/bio_hood name = "bio hood" @@ -188,6 +189,7 @@ name = "hat" desc = "Someone who wears this will look very smart" icon_state = "detective" + allowed = list(/obj/item/weapon/reagent_containers/food/snacks/candy_corn) /obj/item/clothing/head/powdered_wig name = "powdered wig" @@ -601,7 +603,7 @@ item_state = "armor" body_parts_covered = UPPER_TORSO|LOWER_TORSO flags = FPRINT | TABLEPASS | ONESIZEFITSALL -// allowed = null + allowed = null /obj/item/clothing/suit/armor/hos name = "armored coat" diff --git a/code/game/algorithm.dm b/code/game/algorithm.dm index 80b844c222..783cac8cf3 100644 --- a/code/game/algorithm.dm +++ b/code/game/algorithm.dm @@ -77,6 +77,7 @@ proc/countJob(rank) slot_r_store = 16 slot_s_store = 17 slot_in_backpack = 18 + slot_h_store = 19 /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 :/ //warning: icky code @@ -87,6 +88,9 @@ proc/countJob(rank) if(slot == s_store && !src.wear_suit) del(W) return + if(slot == h_store && !src.head) + del(W) + return switch(slot) if(slot_back) if(!src.back) @@ -162,6 +166,10 @@ proc/countJob(rank) if(B.contents.len < 7 && W.w_class <= 3) W.loc = B equipped = 1 + if(slot_h_store) + if(!src.h_store) + src.h_store = W + equipped = 1 if(equipped) W.layer = 20 diff --git a/code/game/hud.dm b/code/game/hud.dm index 6488db854c..31baafa4d0 100644 --- a/code/game/hud.dm +++ b/code/game/hud.dm @@ -11,6 +11,7 @@ #define ui_storage1 "SOUTH-1,4" #define ui_storage2 "SOUTH-1,5" #define ui_sstore1 "SOUTH+1,4" +#define ui_hstore1 "SOUTH+1,5" #define ui_resist "EAST+1,SOUTH-1" #define ui_gloves "SOUTH,5" #define ui_glasses "SOUTH,7" @@ -58,6 +59,7 @@ obj/hud/New(var/type = 0) if(mymob:ears) mymob:ears:screen_loc = ui_ears if(mymob:s_store) mymob:s_store:screen_loc = ui_sstore1 if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses + if(mymob:h_store) mymob:h_store:screen_loc = ui_hstore1 else if(istype(mymob, /mob/living/carbon/human)) if(mymob:shoes) mymob:shoes:screen_loc = null @@ -65,6 +67,7 @@ obj/hud/New(var/type = 0) if(mymob:ears) mymob:ears:screen_loc = null if(mymob:s_store) mymob:s_store:screen_loc = null if(mymob:glasses) mymob:glasses:screen_loc = null + if(mymob:h_store) mymob:h_store:screen_loc = null /obj/hud/var/show_otherinventory = 1 diff --git a/code/game/jobs/jobprocs.dm b/code/game/jobs/jobprocs.dm index 0212ac5aee..76a454a07b 100644 --- a/code/game/jobs/jobprocs.dm +++ b/code/game/jobs/jobprocs.dm @@ -349,6 +349,7 @@ src.equip_if_possible(new /obj/item/clothing/suit/det_suit(src), slot_wear_suit) src.equip_if_possible(new /obj/item/device/detective_scanner(src), slot_in_backpack) src.equip_if_possible(new /obj/item/weapon/zippo(src), slot_l_store) + src.equip_if_possible(new /obj/item/weapon/reagent_containers/food/snacks/candy_corn(src), slot_h_store) if ("Medical Doctor") src.equip_if_possible(new /obj/item/device/radio/headset/headset_med (src), slot_ears) // -- TLE diff --git a/code/game/machinery/computer/explosive.dm b/code/game/machinery/computer/explosive.dm index efa1e7fad1..8e639a2674 100644 --- a/code/game/machinery/computer/explosive.dm +++ b/code/game/machinery/computer/explosive.dm @@ -2,7 +2,7 @@ name = "Prisoner Management" icon = 'computer.dmi' icon_state = "explosive" - req_access = list(access_captain, access_armory) + req_access = list(access_armory) var/id = 0.0 var/temp = null diff --git a/code/modules/mob/living/carbon/human/hud.dm b/code/modules/mob/living/carbon/human/hud.dm index 59bb711b25..0bb2ba5d3f 100644 --- a/code/modules/mob/living/carbon/human/hud.dm +++ b/code/modules/mob/living/carbon/human/hud.dm @@ -214,6 +214,14 @@ using.layer = 19 src.other += using + using = new src.h_type( src ) + using.name = "hat storage" + using.icon = ui_style + using.icon_state = "hair" + using.screen_loc = ui_hstore1 + 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 4918cea941..cdaeec45d0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -628,6 +628,15 @@ else if (W == src.glasses) src.glasses = null else if (W == src.head) + W = src.h_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.head = null else if (W == src.ears) src.ears = null @@ -649,6 +658,8 @@ src.l_store = null else if (W == src.s_store) src.s_store = null + else if (W == src.h_store) + src.h_store = null else if (W == src.back) src.back = null else if (W == src.handcuffed) @@ -658,6 +669,7 @@ else if (W == src.l_hand) src.l_hand = null + update_clothing() /mob/living/carbon/human/db_click(text, t1) @@ -838,6 +850,23 @@ src.u_equip(W) src.s_store = W + if("hat storage") + if (src.h_store) + if (emptyHand) + src.h_store.DblClick() + return + var/confirm + if (src.head) + for(var/i=1, i<=src.head.allowed.len, i++) + // world << "[src.head.allowed[i]] and [W.type]" + if (findtext("[W.type]","[src.head.allowed[i]]")) + confirm = 1 + break + if (!confirm) return + else + src.u_equip(W) + src.h_store = W + update_clothing() return @@ -1218,6 +1247,9 @@ if (src.r_store) src.r_store.screen_loc = ui_storage2 + if (src.h_store) + src.h_store.screen_loc = ui_hstore1 + 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) @@ -1922,6 +1954,10 @@ message = text("\red [] is trying to unhandcuff []!", src.source, src.target) if("uniform") message = text("\red [] is trying to take off \a [] from []'s body!", src.source, src.target.w_uniform, src.target) + if("s_store") + message = text("\red [] is trying to take off \a [] from []'s suit!", src.source, src.target.s_store, src.target) + if("h_store") + message = text("\red [] is trying to empty []'s hat!", src.source, src.target) if("pockets") for(var/obj/item/weapon/mousetrap/MT in list(src.target.l_store, src.target.r_store)) if(MT.armed) @@ -2056,6 +2092,32 @@ src.item.layer = 20 src.target.belt = src.item src.item.loc = src.target + if("s_store") + if (src.target.s_store) + var/obj/item/W = src.target.s_store + src.target.u_equip(W) + if (src.target.client) + src.target.client.screen -= W + if (W) + W.loc = src.target.loc + W.dropped(src.target) + W.layer = initial(W.layer) + W.add_fingerprint(src.source) + else + if (istype(src.item, /obj) && src.target.wear_suit) + var/confirm + for(var/i=1, i<=src.target.wear_suit.allowed.len, i++) + // world << "[src.target.wear_suit.allowed[i]] and [W.type]" + if (findtext("[src.item.type]","[src.target.wear_suit.allowed[i]]") || istype(src.item, /obj/item/device/pda) || istype(src.item, /obj/item/weapon/pen)) + confirm = 1 + break + if (!confirm) return + else + src.source.drop_item() + src.loc = src.target + src.item.layer = 20 + src.target.s_store = src.item + src.item.loc = src.target if("head") if (src.target.head) var/obj/item/W = src.target.head @@ -2262,6 +2324,17 @@ src.item.layer = 20 src.target.back = src.item src.item.loc = src.target + if("h_store") + if (src.target.h_store) + var/obj/item/W = src.target.h_store + src.target.u_equip(W) + if (src.target.client) + src.target.client.screen -= W + if (W) + W.loc = src.target.loc + W.dropped(src.target) + W.layer = initial(W.layer) + W.add_fingerprint(src.source) if("handcuff") if (src.target.handcuffed) var/obj/item/W = src.target.handcuffed @@ -2465,9 +2538,11 @@
(Exo)Suit: [(src.wear_suit ? src.wear_suit : "Nothing")]
Back: [(src.back ? src.back : "Nothing")] [((istype(src.wear_mask, /obj/item/clothing/mask) && istype(src.back, /obj/item/weapon/tank) && !( src.internal )) ? text(" Set Internal", src) : "")]
ID: [(src.wear_id ? src.wear_id : "Nothing")] +
Suit Storage: [(src.s_store ? src.s_store : "Nothing")]
[(src.handcuffed ? text("Handcuffed") : text("Not Handcuffed"))]
[(src.internal ? text("Remove Internal") : "")]
Empty Pockets +
Empty Hat
Close
"} user << browse(dat, text("window=mob[src.name];size=340x480")) diff --git a/icons/obj/food.dmi b/icons/obj/food.dmi index fc4aabd676..b7c2015054 100644 Binary files a/icons/obj/food.dmi and b/icons/obj/food.dmi differ