diff --git a/code/modules/food/kitchen/smartfridge/engineering.dm b/code/modules/food/kitchen/smartfridge/engineering.dm index cd656c6eba..30646bb96a 100644 --- a/code/modules/food/kitchen/smartfridge/engineering.dm +++ b/code/modules/food/kitchen/smartfridge/engineering.dm @@ -1,7 +1,12 @@ +/* + * Industrial Sized Sheet Storage (but not actually industrial sized) + */ /obj/machinery/smartfridge/sheets - name = "\improper Smart Sheet Storage" - desc = "A storage unit for metals." - icon_contents = "boxes" + name = "\improper Industrial Sheet Storage" + desc = "An industrial sized storage unit for materials." + icon_state = "base_industrial" + icon_base = "industrial" + icon_contents = "sheet" stored_datum_type = /datum/stored_item/stack /obj/machinery/smartfridge/sheets/persistent @@ -30,3 +35,17 @@ if(O.type == I.item_path) // Typecheck should evaluate material-specific subtype return I return null + +/* + * Mining Variant + */ +/obj/machinery/smartfridge/sheets/mining + name = "\improper Mining Sheet Storage" + icon_state = "base_mining" + icon_base = "mining" + icon_contents = "sheet" + +/obj/machinery/smartfridge/sheets/mining/persistent + persistent = /datum/persistent/storage/smartfridge/sheet_storage +/obj/machinery/smartfridge/sheets/mining/persistent_lossy + persistent = /datum/persistent/storage/smartfridge/sheet_storage/lossy \ No newline at end of file diff --git a/code/modules/food/kitchen/smartfridge/medical.dm b/code/modules/food/kitchen/smartfridge/medical.dm index b174906816..f7a5ea9bb5 100644 --- a/code/modules/food/kitchen/smartfridge/medical.dm +++ b/code/modules/food/kitchen/smartfridge/medical.dm @@ -1,21 +1,46 @@ +/* + * Medical + */ +/obj/machinery/smartfridge/medbay + name = "\improper Refrigerated Medicine Storage" + desc = "A refrigerated storage unit for securely storing medicine and chemicals." + icon_contents = "chem" + +/obj/machinery/smartfridge/medbay/accept_check(var/obj/item/O as obj) + if(istype(O,/obj/item/weapon/storage/pill_bottle) || istype(O,/obj/item/weapon/reagent_containers) || istype(O,/obj/item/weapon/reagent_containers/glass/)) + return 1 + return 0 + /obj/machinery/smartfridge/secure/medbay name = "\improper Refrigerated Medicine Storage" desc = "A refrigerated storage unit for storing medicine and chemicals." + icon_contents = "chem" req_one_access = list(access_medical,access_chemistry) /obj/machinery/smartfridge/secure/medbay/accept_check(var/obj/item/O as obj) - if(istype(O,/obj/item/weapon/reagent_containers/glass/)) + if(istype(O,/obj/item/weapon/storage/pill_bottle) || istype(O,/obj/item/weapon/reagent_containers) || istype(O,/obj/item/weapon/reagent_containers/glass/)) return 1 - if(istype(O,/obj/item/weapon/storage/pill_bottle/)) + return 0 + +/* + * Virology + */ +/obj/machinery/smartfridge/virology + name = "\improper Refrigerated Virus Storage" + desc = "A refrigerated storage unit for storing viral material." + icon_contents = "viro" + +/obj/machinery/smartfridge/virology/accept_check(var/obj/item/O as obj) + if(istype(O,/obj/item/weapon/reagent_containers/glass/beaker/vial/)) return 1 - if(istype(O,/obj/item/weapon/reagent_containers/pill/)) + if(istype(O,/obj/item/weapon/virusdish/)) return 1 return 0 /obj/machinery/smartfridge/secure/virology name = "\improper Refrigerated Virus Storage" - desc = "A refrigerated storage unit for storing viral material." - icon_contents = "misc" + desc = "A refrigerated storage unit for securely storing viral material." + icon_contents = "viro" req_access = list(access_virology) /obj/machinery/smartfridge/secure/virology/accept_check(var/obj/item/O as obj) @@ -25,15 +50,27 @@ return 1 return 0 -/obj/machinery/smartfridge/chemistry //Is this used anywhere? It's not secure. +/* + * Chemistry + */ +/obj/machinery/smartfridge/chemistry name = "\improper Smart Chemical Storage" - desc = "A refrigerated storage unit for medicine and chemical storage." + desc = "A refrigerated storage unit for storing medicine and chemicals." + icon_contents = "chem" + req_one_access = list(access_chemistry) /obj/machinery/smartfridge/chemistry/accept_check(var/obj/item/O as obj) - if(istype(O,/obj/item/weapon/storage/pill_bottle) || istype(O,/obj/item/weapon/reagent_containers)) + if(istype(O,/obj/item/weapon/storage/pill_bottle) || istype(O,/obj/item/weapon/reagent_containers) || istype(O,/obj/item/weapon/reagent_containers/glass/)) return 1 return 0 -/obj/machinery/smartfridge/chemistry/virology //Same - name = "\improper Smart Virus Storage" - desc = "A refrigerated storage unit for volatile sample storage." \ No newline at end of file +/obj/machinery/smartfridge/secure/chemistry + name = "\improper Smart Chemical Storage" + desc = "A refrigerated storage unit for securely storing medicine and chemicals." + icon_contents = "chem" + req_one_access = list(access_chemistry) + +/obj/machinery/smartfridge/secure/chemistry/accept_check(var/obj/item/O as obj) + if(istype(O,/obj/item/weapon/storage/pill_bottle) || istype(O,/obj/item/weapon/reagent_containers) || istype(O,/obj/item/weapon/reagent_containers/glass/)) + return 1 + return 0 diff --git a/code/modules/food/kitchen/smartfridge/research.dm b/code/modules/food/kitchen/smartfridge/research.dm new file mode 100644 index 0000000000..eaab3c635b --- /dev/null +++ b/code/modules/food/kitchen/smartfridge/research.dm @@ -0,0 +1,13 @@ +/* + * Xenobiological + */ +/obj/machinery/smartfridge/secure/extract + name = "\improper Biological Sample Storage" + desc = "A refrigerated storage unit for xenobiological samples." + icon_contents = "slime" + req_access = list(access_research) + +/obj/machinery/smartfridge/secure/extract/accept_check(var/obj/item/O as obj) + if(istype(O, /obj/item/slime_extract) || istype(O, /obj/item/slimepotion)) + return 1 + return 0 \ No newline at end of file diff --git a/code/modules/food/kitchen/smartfridge/hydroponics.dm b/code/modules/food/kitchen/smartfridge/service.dm similarity index 52% rename from code/modules/food/kitchen/smartfridge/hydroponics.dm rename to code/modules/food/kitchen/smartfridge/service.dm index 93afa67b19..8d0485cd19 100644 --- a/code/modules/food/kitchen/smartfridge/hydroponics.dm +++ b/code/modules/food/kitchen/smartfridge/service.dm @@ -1,7 +1,59 @@ +/* + * Chef + */ +/obj/machinery/smartfridge/chef + desc = "For storing all sorts of delicious foods!" + +/obj/machinery/smartfridge/chef/accept_check(var/obj/item/O as obj) + if(istype(O,/obj/item/weapon/reagent_containers/food/snacks)) + return 1 + return 0 + +/* + * Bartender + */ +/obj/machinery/smartfridge/drinks + name = "\improper Smart Drink Storage" + desc = "A refrigerated storage unit for tasty tasty alcohol." + icon_contents = "drinks" + +/obj/machinery/smartfridge/drinks/accept_check(var/obj/item/O as obj) + if(istype(O,/obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/food/drinks) || istype(O,/obj/item/weapon/reagent_containers/food/condiment)) + return 1 + return 0 + +/obj/machinery/smartfridge/drinks/showcase + name = "\improper Drink Showcase" + icon_state = "base_showcase" + icon_base = "showcase" + +//Showcase needs a special icon update +/obj/machinery/smartfridge/drinks/showcase/update_icon() + cut_overlays() + if(panel_open) + add_overlay("[icon_base]-panel") + + if(stat & (BROKEN)) + cut_overlays() + icon_state = "[icon_base]-broken" + + if(stat & (NOPOWER)) + icon_state = "[icon_base]-off" + else + icon_state = icon_base + switch(contents.len) + if(0) + add_overlay("[icon_base]") + if(1 to 3) + add_overlay("[icon_base]-fill") + +/* + * Hydroponics + */ /obj/machinery/smartfridge/produce name = "\improper Smart Produce Storage" - desc = "For storing all sorts of perishable foods!" - icon_contents = "boxes" + desc = "For storing all sorts of perishable produce!" + icon_contents = "plants" /obj/machinery/smartfridge/produce/persistent persistent = /datum/persistent/storage/smartfridge/produce @@ -11,43 +63,15 @@ /obj/machinery/smartfridge/produce/accept_check(var/obj/item/O as obj) if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/) || istype(O,/obj/item/seeds/)) - return TRUE - return FALSE + return 1 + return 0 -/obj/machinery/smartfridge/drinks - name = "\improper Smart Drink Storage" - desc = "A refrigerated storage unit for tasty tasty alcohol." - icon_contents = "drinks" - -/obj/machinery/smartfridge/drinks/showcase - name = "\improper Drink Showcase" - icon_state = "showcase" - icon_base = "showcase" - -/obj/machinery/smartfridge/drinks/accept_check(var/obj/item/O as obj) - if(istype(O,/obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/food/drinks) || istype(O,/obj/item/weapon/reagent_containers/food/condiment)) - return TRUE - return FALSE - -/obj/machinery/smartfridge/seeds +/obj/machinery/smartfridge/seeds //I honestly don't know why this exists when you can store seeds in the vendor. It's not even persistent. name = "\improper MegaSeed Servitor" desc = "When you need seeds fast!" - icon_contents = "boxes" + icon_contents = "petri" //There's no seed base in the current batch /obj/machinery/smartfridge/seeds/accept_check(var/obj/item/O as obj) if(istype(O,/obj/item/seeds/)) return 1 - return 0 - -/obj/machinery/smartfridge/secure/extract - name = "\improper Biological Sample Storage" - desc = "A refrigerated storage unit for xenobiological samples." - req_access = list(access_research) - icon_contents = "drinks" - -/obj/machinery/smartfridge/secure/extract/accept_check(var/obj/item/O as obj) - if(istype(O, /obj/item/slime_extract)) - return TRUE - if(istype(O, /obj/item/slimepotion)) - return TRUE - return FALSE \ No newline at end of file + return 0 \ No newline at end of file diff --git a/code/modules/food/kitchen/smartfridge/smartfridge.dm b/code/modules/food/kitchen/smartfridge/smartfridge.dm index a929c8eda8..c683bf9a60 100644 --- a/code/modules/food/kitchen/smartfridge/smartfridge.dm +++ b/code/modules/food/kitchen/smartfridge/smartfridge.dm @@ -1,12 +1,10 @@ -/* SmartFridge. Much todo -*/ /obj/machinery/smartfridge name = "\improper SmartFridge" desc = "For storing all sorts of things! This one doesn't accept any of them!" - icon = 'icons/obj/vending.dmi' + icon = 'icons/obj/vending_smartfridge.dmi' icon_state = "smartfridge" var/icon_base = "smartfridge" //Iconstate to base all the broken/deny/etc on - var/icon_contents = "misc" //Overlay to put on glass to show contents + var/icon_contents = "food" //Overlay to put on that show contents density = TRUE anchored = TRUE use_power = USE_POWER_IDLE @@ -67,26 +65,35 @@ /obj/machinery/smartfridge/update_icon() cut_overlays() - if(stat & (BROKEN|NOPOWER)) - icon_state = "[icon_base]-off" - else - icon_state = icon_base - if(panel_open) add_overlay("[icon_base]-panel") - // Fridge contents - switch(contents.len) - if(1 to 3) - add_overlay("[icon_base]-[icon_contents]1") - if(3 to 6) - add_overlay("[icon_base]-[icon_contents]2") - if(6 to INFINITY) - add_overlay("[icon_base]-[icon_contents]3") + if(stat & (BROKEN)) + cut_overlays() + icon_state = "[icon_base]-broken" -/******************* -* Item Adding -********************/ + if(stat & (NOPOWER)) + icon_state = "[icon_base]-off" + switch(contents.len) + if(0) + add_overlay("[icon_base]-0-off") + if(1 to 3) + add_overlay("[icon_base]-[icon_contents]1-off") + if(3 to 6) + add_overlay("[icon_base]-[icon_contents]2-off") + if(6 to INFINITY) + add_overlay("[icon_base]-[icon_contents]3-off") + else + icon_state = icon_base + switch(contents.len) + if(0) + add_overlay("[icon_base]-0") + if(1 to 3) + add_overlay("[icon_base]-[icon_contents]1") + if(3 to 6) + add_overlay("[icon_base]-[icon_contents]2") + if(6 to INFINITY) + add_overlay("[icon_base]-[icon_contents]3") /obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob) if(O.is_screwdriver()) @@ -226,6 +233,7 @@ return TRUE vend(item_records[index], amount) + update_icon() return TRUE return FALSE @@ -247,12 +255,12 @@ throw_item.throw_at(target,16,3,src) src.visible_message("[src] launches [throw_item.name] at [target.name]!") SStgui.update_uis(src) + update_icon() return TRUE -/************************ -* Secure SmartFridges -*************************/ - +/* + * Secure Smartfridges + */ /obj/machinery/smartfridge/secure/tgui_act(action, params) if(stat & (NOPOWER|BROKEN)) return TRUE diff --git a/code/modules/food/kitchen/smartfridge/smartfridge_vr.dm b/code/modules/food/kitchen/smartfridge/smartfridge_vr.dm index 8863448ca5..222cd4f52a 100644 --- a/code/modules/food/kitchen/smartfridge/smartfridge_vr.dm +++ b/code/modules/food/kitchen/smartfridge/smartfridge_vr.dm @@ -1,3 +1,6 @@ +/* + * Expert Jobs + */ /obj/machinery/smartfridge var/expert_job = "Chef" /obj/machinery/smartfridge/seeds @@ -6,14 +9,16 @@ expert_job = "Xenobiologist" /obj/machinery/smartfridge/secure/medbay expert_job = "Chemist" +/obj/machinery/smartfridge/secure/chemistry + expert_job = "Chemist" /obj/machinery/smartfridge/secure/virology expert_job = "Medical Doctor" //Virologist is an alt-title unfortunately -/obj/machinery/smartfridge/chemistry - expert_job = "Chemist" //Unsure what this one is used for, actually /obj/machinery/smartfridge/drinks expert_job = "Bartender" -// Allow thrown items into smartfridges +/* + * Allow thrown items into smartfridges + */ /obj/machinery/smartfridge/hitby(var/atom/movable/A, speed) . = ..() if(accept_check(A) && A.thrower) @@ -31,12 +36,20 @@ else if(prob(20)) stock(A) -//Chemistry 'chemavator' +/* + * Chemistry 'chemavator' (multi-z chem storage) + */ /obj/machinery/smartfridge/chemistry/chemvator name = "\improper Smart Chemavator - Upper" desc = "A refrigerated storage unit for medicine and chemical storage. Now sporting a fancy system of pulleys to lift bottles up and down." + expert_job = "Chemist" var/obj/machinery/smartfridge/chemistry/chemvator/attached +/obj/machinery/smartfridge/chemistry/chemvator/accept_check(var/obj/item/O as obj) + if(istype(O,/obj/item/weapon/storage/pill_bottle) || istype(O,/obj/item/weapon/reagent_containers) || istype(O,/obj/item/weapon/reagent_containers/glass/)) + return 1 + return 0 + /obj/machinery/smartfridge/chemistry/chemvator/down/Destroy() attached = null return ..() diff --git a/icons/obj/vending.dmi b/icons/obj/vending.dmi index 562496523f..ce3073bca2 100755 Binary files a/icons/obj/vending.dmi and b/icons/obj/vending.dmi differ diff --git a/icons/obj/vending_smartfridge.dmi b/icons/obj/vending_smartfridge.dmi new file mode 100644 index 0000000000..ae1224808c Binary files /dev/null and b/icons/obj/vending_smartfridge.dmi differ diff --git a/vorestation.dme b/vorestation.dme index 2d81a578b5..d191ffc43b 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2506,8 +2506,9 @@ #include "code\modules\food\kitchen\cooking_machines\oven.dm" #include "code\modules\food\kitchen\smartfridge\drying_rack.dm" #include "code\modules\food\kitchen\smartfridge\engineering.dm" -#include "code\modules\food\kitchen\smartfridge\hydroponics.dm" #include "code\modules\food\kitchen\smartfridge\medical.dm" +#include "code\modules\food\kitchen\smartfridge\research.dm" +#include "code\modules\food\kitchen\smartfridge\service.dm" #include "code\modules\food\kitchen\smartfridge\smartfridge.dm" #include "code\modules\food\kitchen\smartfridge\smartfridge_vr.dm" #include "code\modules\gamemaster\defines.dm"