diff --git a/code/modules/economy/vending_machines.dm b/code/modules/economy/vending_machines.dm index 60088c1e96c..61266713b07 100644 --- a/code/modules/economy/vending_machines.dm +++ b/code/modules/economy/vending_machines.dm @@ -39,7 +39,7 @@ /obj/machinery/vending/boozeomat name = "Booze-O-Mat" desc = "A technological marvel, the ads would have you believe this is able to mix just the mixture you'd like to drink the moment you ask for one." - icon_state = "fridge_dark" + icon_state = "boozeomat" products = list(/obj/item/weapon/reagent_containers/food/drinks/glass2/square = 10, /obj/item/weapon/reagent_containers/food/drinks/glass2/rocks = 10, /obj/item/weapon/reagent_containers/food/drinks/glass2/shake = 10, diff --git a/code/modules/food/kitchen/smartfridge/engineering.dm b/code/modules/food/kitchen/smartfridge/engineering.dm index 8141ca496df..94a40b9dc35 100644 --- a/code/modules/food/kitchen/smartfridge/engineering.dm +++ b/code/modules/food/kitchen/smartfridge/engineering.dm @@ -1,9 +1,7 @@ /obj/machinery/smartfridge/sheets //Is this used anywhere? It's not secure. name = "\improper Smart Sheet Storage" desc = "A storage unit for metals." - icon_state = "fridge_dark" - icon_base = "fridge_dark" - icon_contents = "slime" + icon_contents = "boxes" stored_datum_type = /datum/stored_item/stack /obj/machinery/smartfridge/sheets/persistent diff --git a/code/modules/food/kitchen/smartfridge/hydroponics.dm b/code/modules/food/kitchen/smartfridge/hydroponics.dm index 9b50136d796..1c2cb422461 100644 --- a/code/modules/food/kitchen/smartfridge/hydroponics.dm +++ b/code/modules/food/kitchen/smartfridge/hydroponics.dm @@ -1,10 +1,7 @@ /obj/machinery/smartfridge/produce name = "\improper Smart Produce Storage" desc = "For storing all sorts of perishable foods!" - icon = 'icons/obj/vending.dmi' - icon_state = "fridge_food" - icon_base = "fridge_food" - icon_contents = "food" + icon_contents = "boxes" /obj/machinery/smartfridge/produce/persistent persistent = /datum/persistent/storage/smartfridge/produce @@ -18,11 +15,27 @@ return FALSE /obj/machinery/smartfridge/drinks - name = "\improper Drink Showcase" + name = "\improper Smart Drink Storage" desc = "A refrigerated storage unit for tasty tasty alcohol." - icon_state = "fridge_drinks" - icon_base = "fridge_drinks" - icon_contents = "drink" + icon_contents = "drinks" + +/obj/machinery/smartfridge/drinks/showcase + name = "\improper Drink Showcase" + icon_state = "showcase" + icon_base = "showcase" + +/obj/machinery/smartfridge/drinks/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") + + if(!stat && contents.len) + add_overlay("[icon_base]-fill") /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)) @@ -32,7 +45,7 @@ /obj/machinery/smartfridge/seeds name = "\improper MegaSeed Servitor" desc = "When you need seeds fast!" - icon_contents = "chem" + icon_contents = "boxes" /obj/machinery/smartfridge/seeds/accept_check(var/obj/item/O as obj) if(istype(O,/obj/item/seeds/)) @@ -42,8 +55,8 @@ /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) + icon_contents = "drinks" /obj/machinery/smartfridge/secure/extract/accept_check(var/obj/item/O as obj) if(istype(O, /obj/item/slime_extract)) diff --git a/code/modules/food/kitchen/smartfridge/medical.dm b/code/modules/food/kitchen/smartfridge/medical.dm index 609f707a068..9a566381b66 100644 --- a/code/modules/food/kitchen/smartfridge/medical.dm +++ b/code/modules/food/kitchen/smartfridge/medical.dm @@ -28,7 +28,6 @@ /obj/machinery/smartfridge/chemistry //Is this used anywhere? It's not secure. name = "\improper Smart Chemical Storage" desc = "A refrigerated storage unit for medicine and chemical storage." - icon_contents = "chem" /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)) diff --git a/code/modules/food/kitchen/smartfridge/smartfridge.dm b/code/modules/food/kitchen/smartfridge/smartfridge.dm index 4df4070cd63..c0a876acbd8 100644 --- a/code/modules/food/kitchen/smartfridge/smartfridge.dm +++ b/code/modules/food/kitchen/smartfridge/smartfridge.dm @@ -4,9 +4,9 @@ name = "\improper SmartFridge" desc = "For storing all sorts of things! This one doesn't accept any of them!" icon = 'icons/obj/vending.dmi' - icon_state = "fridge_food" - var/icon_base = "fridge_food" //Iconstate to base all the broken/deny/etc on - var/icon_contents = "food" //Overlay to put on glass to show contents + 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 density = 1 anchored = 1 use_power = USE_POWER_IDLE @@ -28,9 +28,6 @@ /obj/machinery/smartfridge/secure is_secure = 1 - icon_state = "fridge_sci" - icon_base = "fridge_sci" - icon_contents = "chem" /obj/machinery/smartfridge/Initialize() . = ..() @@ -40,6 +37,7 @@ wires = new/datum/wires/smartfridge/secure(src) else wires = new/datum/wires/smartfridge(src) + update_icon() /obj/machinery/smartfridge/Destroy() qdel(wires) @@ -74,35 +72,17 @@ else icon_state = icon_base - if(is_secure) - add_overlay("[icon_base]-sidepanel") - if(panel_open) add_overlay("[icon_base]-panel") - var/is_off = "" - if(inoperable()) - is_off = "-off" - // Fridge contents - if(contents) - switch(contents.len) - if(0) - add_overlay("empty[is_off]") - if(1 to 2) - add_overlay("[icon_contents]-1[is_off]") - if(3 to 5) - add_overlay("[icon_contents]-2[is_off]") - if(6 to 8) - add_overlay("[icon_contents]-3[is_off]") - else - add_overlay("[icon_contents]-4[is_off]") - - // Fridge top - var/image/top = image(icon, "[icon_base]-top") - top.pixel_z = 32 - top.layer = ABOVE_WINDOW_LAYER - add_overlay(top) + 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") /******************* * Item Adding @@ -180,6 +160,7 @@ item_records.Add(I) I.add_product(O) SStgui.update_uis(src) + update_icon() /obj/machinery/smartfridge/proc/vend(datum/stored_item/I, var/count) var/amount = I.get_amount() @@ -190,6 +171,7 @@ for(var/i = 1 to min(amount, count)) I.get_product(get_turf(src)) SStgui.update_uis(src) + update_icon() /obj/machinery/smartfridge/attack_ai(mob/user as mob) attack_hand(user) diff --git a/icons/obj/vending.dmi b/icons/obj/vending.dmi index f03f9c56d8d..46212224b45 100755 Binary files a/icons/obj/vending.dmi and b/icons/obj/vending.dmi differ