diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 29888758f5..c508d2c81e 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -10,9 +10,6 @@
density = 1
clicksound = "button"
- var/icon_vend //Icon_state when vending
- var/icon_deny //Icon_state when denying access
-
// Power
use_power = USE_POWER_IDLE
idle_power_usage = 10
@@ -181,9 +178,10 @@
panel_open = !panel_open
to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.")
playsound(src, W.usesound, 50, 1)
- overlays.Cut()
if(panel_open)
- overlays += image(icon, "[initial(icon_state)]-panel")
+ add_overlay("[initial(icon_state)]-panel")
+ else
+ cut_overlay("[initial(icon_state)]-panel")
SSnanoui.update_uis(src) // Speaker switch is on the main UI, not wires UI
return
@@ -431,7 +429,7 @@
if((href_list["vend"]) && (vend_ready) && (!currently_vending))
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
to_chat(usr, "Access denied.") //Unless emagged of course
- flick(icon_deny,src)
+ flick("[icon_state]-deny",src)
playsound(src.loc, 'sound/machines/deniedbeep.ogg', 50, 0)
return
@@ -468,7 +466,7 @@
/obj/machinery/vending/proc/vend(datum/stored_item/vending_product/R, mob/user)
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
to_chat(usr, "Access denied.") //Unless emagged of course
- flick(icon_deny,src)
+ flick("[icon_state]-deny",src)
playsound(src.loc, 'sound/machines/deniedbeep.ogg', 50, 0)
return
vend_ready = 0 //One thing at a time!!
@@ -499,8 +497,7 @@
last_reply = world.time
use_power(vend_power_usage) //actuators and stuff
- if(icon_vend) //Show the vending animation if needed
- flick(icon_vend,src)
+ flick("[icon_state]-vend",src)
spawn(vend_delay)
R.get_product(get_turf(src))
if(has_logs)
@@ -678,8 +675,7 @@
/obj/machinery/vending/boozeomat
name = "Booze-O-Mat"
desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one."
- icon_state = "boozeomat"
- icon_deny = "boozeomat-deny"
+ icon_state = "fridge_dark"
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,
@@ -754,7 +750,6 @@
desc = "A vending machine which dispenses hot drinks."
product_ads = "Have a drink!;Drink up!;It's good for you!;Would you like a hot joe?;I'd kill for some coffee!;The best beans in the galaxy.;Only the finest brew for you.;Mmmm. Nothing like a coffee.;I like coffee, don't you?;Coffee helps you work!;Try some tea.;We hope you like the best!;Try our new chocolate!;Admin conspiracies"
icon_state = "coffee"
- icon_vend = "coffee-vend"
vend_delay = 34
idle_power_usage = 211 //refrigerator - believe it or not, this is actually the average power consumption of a refrigerated vending machine according to NRCan.
vend_power_usage = 85000 //85 kJ to heat a 250 mL cup of coffee
@@ -782,8 +777,12 @@
/obj/machinery/vending/cola
name = "Robust Softdrinks"
desc = "A softdrink vendor provided by Robust Industries, LLC."
+<<<<<<< HEAD
icon_state = "Cola_Machine" //VOREStation Edit
icon_vend = "Cola_Machine-purchase" //VOREStation Edit
+=======
+ icon_state = "Cola_Machine"
+>>>>>>> 636062b... Merge pull request #6858 from VOREStation/pol-bayvend
product_slogans = "Robust Softdrinks: More robust than a toolbox to the head!"
product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space."
products = list(/obj/item/weapon/reagent_containers/food/drinks/cans/cola = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind = 10,
@@ -833,7 +832,6 @@
desc = "Cartridges for PDAs."
product_slogans = "Carts to go!"
icon_state = "cart"
- icon_deny = "cart-deny"
req_access = list(access_hop)
products = list(/obj/item/weapon/cartridge/medical = 10,/obj/item/weapon/cartridge/engineering = 10,/obj/item/weapon/cartridge/security = 10,
/obj/item/weapon/cartridge/janitor = 10,/obj/item/weapon/cartridge/signal/science = 10,/obj/item/device/pda/heads = 10,
@@ -875,7 +873,6 @@
name = "NanoMed Plus"
desc = "Medical drug dispenser."
icon_state = "med"
- icon_deny = "med-deny"
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!"
req_access = list(access_medical)
products = list(/obj/item/weapon/reagent_containers/glass/bottle/antitoxin = 4,/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline = 4,
@@ -903,7 +900,6 @@
desc = "A wall-mounted version of the NanoMed."
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?"
icon_state = "wallmed"
- icon_deny = "wallmed-deny"
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
products = list(/obj/item/stack/medical/bruise_pack = 2,/obj/item/stack/medical/ointment = 2,/obj/item/weapon/reagent_containers/hypospray/autoinjector = 4,/obj/item/device/healthanalyzer = 1)
contraband = list(/obj/item/weapon/reagent_containers/syringe/antitoxin = 4,/obj/item/weapon/reagent_containers/syringe/antiviral = 4,/obj/item/weapon/reagent_containers/pill/tox = 1)
@@ -914,7 +910,6 @@
name = "NanoMed"
desc = "A wall-mounted version of the NanoMed, containing only vital first aid equipment."
icon_state = "wallmed"
- icon_deny = "wallmed-deny"
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
products = list(/obj/item/weapon/reagent_containers/hypospray/autoinjector = 5,/obj/item/weapon/reagent_containers/syringe/antitoxin = 3,/obj/item/stack/medical/bruise_pack = 3,
/obj/item/stack/medical/ointment =3,/obj/item/device/healthanalyzer = 3)
@@ -927,7 +922,6 @@
desc = "A security equipment vendor."
product_ads = "Crack capitalist skulls!;Beat some heads in!;Don't forget - harm is good!;Your weapons are right here.;Handcuffs!;Freeze, scumbag!;Don't tase me bro!;Tase them, bro.;Why not have a donut?"
icon_state = "sec"
- icon_deny = "sec-deny"
req_access = list(access_security)
products = list(/obj/item/weapon/handcuffs = 8,/obj/item/weapon/grenade/flashbang = 4,/obj/item/device/flash = 5,
/obj/item/weapon/reagent_containers/food/snacks/donut/normal = 12,/obj/item/weapon/storage/box/evidence = 6)
@@ -940,8 +934,12 @@
desc = "A plant nutrients vendor."
product_slogans = "Aren't you glad you don't have to fertilize the natural way?;Now with 50% less stink!;Plants are people too!"
product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..."
+<<<<<<< HEAD
icon_state = "nutri"
//icon_deny = "nutri-deny" //VOREStation Removal - It doesn't even have an access list, when would it deny people?
+=======
+ icon_state = "nutri_generic"
+>>>>>>> 636062b... Merge pull request #6858 from VOREStation/pol-bayvend
products = list(/obj/item/weapon/reagent_containers/glass/bottle/eznutrient = 6,/obj/item/weapon/reagent_containers/glass/bottle/left4zed = 4,/obj/item/weapon/reagent_containers/glass/bottle/robustharvest = 3,/obj/item/weapon/plantspray/pests = 20,
/obj/item/weapon/reagent_containers/syringe = 5,/obj/item/weapon/reagent_containers/glass/beaker = 4,/obj/item/weapon/storage/bag/plants = 5)
premium = list(/obj/item/weapon/reagent_containers/glass/bottle/ammonia = 10,/obj/item/weapon/reagent_containers/glass/bottle/diethylamine = 5)
@@ -952,7 +950,7 @@
desc = "When you need seeds fast!"
product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!"
product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!"
- icon_state = "seeds"
+ icon_state = "seeds_generic"
products = list(/obj/item/seeds/bananaseed = 3,/obj/item/seeds/berryseed = 3,/obj/item/seeds/carrotseed = 3,/obj/item/seeds/chantermycelium = 3,/obj/item/seeds/chiliseed = 3,
/obj/item/seeds/cornseed = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/replicapod = 3,/obj/item/seeds/soyaseed = 3,
@@ -1044,7 +1042,6 @@
name = "YouTool"
desc = "Tools for tools."
icon_state = "tool"
- icon_deny = "tool-deny"
//req_access = list(access_maint_tunnels) //Maintenance access
products = list(/obj/item/stack/cable_coil/random = 10,/obj/item/weapon/tool/crowbar = 5,/obj/item/weapon/weldingtool = 3,/obj/item/weapon/tool/wirecutters = 5,
/obj/item/weapon/tool/wrench = 5,/obj/item/device/analyzer = 5,/obj/item/device/t_scanner = 5,/obj/item/weapon/tool/screwdriver = 5,
@@ -1059,7 +1056,6 @@
name = "Engi-Vend"
desc = "Spare tool vending. What? Did you expect some witty description?"
icon_state = "engivend"
- icon_deny = "engivend-deny"
req_access = list(access_engine_equip)
products = list(/obj/item/device/geiger = 4,/obj/item/clothing/glasses/meson = 2,/obj/item/device/multitool = 4,/obj/item/weapon/cell/high = 10,
/obj/item/weapon/airlock_electronics = 10,/obj/item/weapon/module/power_control = 10,
@@ -1082,7 +1078,6 @@
name = "Robco Tool Maker"
desc = "Everything you need for do-it-yourself station repair."
icon_state = "engi"
- icon_deny = "engi-deny"
req_access = list(access_engine_equip)
products = list(/obj/item/clothing/under/rank/chief_engineer = 4,/obj/item/clothing/under/rank/engineer = 4,/obj/item/clothing/shoes/orange = 4,/obj/item/clothing/head/hardhat = 4,
/obj/item/weapon/storage/belt/utility = 4,/obj/item/clothing/glasses/meson = 4,/obj/item/clothing/gloves/yellow = 4, /obj/item/weapon/tool/screwdriver = 12,
@@ -1100,7 +1095,6 @@
name = "Robotech Deluxe"
desc = "All the tools you need to create your own robot army."
icon_state = "robotics"
- icon_deny = "robotics-deny"
req_access = list(access_robotics)
products = list(/obj/item/clothing/suit/storage/toggle/labcoat = 4,/obj/item/clothing/under/rank/roboticist = 4,/obj/item/stack/cable_coil = 4,/obj/item/device/flash = 4,
/obj/item/weapon/cell/high = 12, /obj/item/device/assembly/prox_sensor = 3,/obj/item/device/assembly/signaler = 3,/obj/item/device/healthanalyzer = 3,
diff --git a/code/modules/food/kitchen/smartfridge.dm b/code/modules/food/kitchen/smartfridge.dm
index 56c6dee7e6..b58e3d48df 100644
--- a/code/modules/food/kitchen/smartfridge.dm
+++ b/code/modules/food/kitchen/smartfridge.dm
@@ -2,19 +2,26 @@
*/
/obj/machinery/smartfridge
name = "\improper SmartFridge"
+ desc = "For storing all sorts of perishable foods!"
icon = 'icons/obj/vending.dmi'
- icon_state = "smartfridge"
+ 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
density = 1
anchored = 1
use_power = USE_POWER_IDLE
idle_power_usage = 5
active_power_usage = 100
flags = NOREACT
+<<<<<<< HEAD
var/max_n_of_items = 999 // Sorry but the BYOND infinite loop detector doesn't look things over 1000. //VOREStation Edit - Non-global
//var/global/max_n_of_items = 999 // Sorry but the BYOND infinite loop detector doesn't look things over 1000.
var/icon_on = "smartfridge"
var/icon_off = "smartfridge-off"
var/icon_panel = "smartfridge-panel"
+=======
+ var/global/max_n_of_items = 999 // Sorry but the BYOND infinite loop detector doesn't look things over 1000.
+>>>>>>> 636062b... Merge pull request #6858 from VOREStation/pol-bayvend
var/list/item_records = list()
var/datum/stored_item/currently_vending = null //What we're putting out of the machine.
var/seconds_electrified = 0;
@@ -27,6 +34,9 @@
/obj/machinery/smartfridge/secure
is_secure = 1
+ icon_state = "fridge_sci"
+ icon_base = "fridge_sci"
+ icon_contents = "chem"
/obj/machinery/smartfridge/New()
..()
@@ -50,10 +60,7 @@
/obj/machinery/smartfridge/seeds
name = "\improper MegaSeed Servitor"
desc = "When you need seeds fast!"
- icon = 'icons/obj/vending.dmi'
- icon_state = "seeds"
- icon_on = "seeds"
- icon_off = "seeds-off"
+ icon_contents = "chem"
/obj/machinery/smartfridge/seeds/accept_check(var/obj/item/O as obj)
if(istype(O,/obj/item/seeds/))
@@ -63,6 +70,7 @@
/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)
@@ -72,12 +80,9 @@
return TRUE
return FALSE
-
/obj/machinery/smartfridge/secure/medbay
name = "\improper Refrigerated Medicine Storage"
desc = "A refrigerated storage unit for storing medicine and chemicals."
- icon_state = "smartfridge" //To fix the icon in the map editor.
- icon_on = "smartfridge_chem"
req_one_access = list(access_medical,access_chemistry)
/obj/machinery/smartfridge/secure/medbay/accept_check(var/obj/item/O as obj)
@@ -92,10 +97,8 @@
/obj/machinery/smartfridge/secure/virology
name = "\improper Refrigerated Virus Storage"
desc = "A refrigerated storage unit for storing viral material."
+ icon_contents = "drink"
req_access = list(access_virology)
- icon_state = "smartfridge_virology"
- icon_on = "smartfridge_virology"
- icon_off = "smartfridge_virology-off"
/obj/machinery/smartfridge/secure/virology/accept_check(var/obj/item/O as obj)
if(istype(O,/obj/item/weapon/reagent_containers/glass/beaker/vial/))
@@ -104,23 +107,26 @@
return 1
return 0
-/obj/machinery/smartfridge/chemistry
+/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))
return 1
return 0
-/obj/machinery/smartfridge/chemistry/virology
+/obj/machinery/smartfridge/chemistry/virology //Same
name = "\improper Smart Virus Storage"
desc = "A refrigerated storage unit for volatile sample storage."
-
/obj/machinery/smartfridge/drinks
name = "\improper Drink Showcase"
desc = "A refrigerated storage unit for tasty tasty alcohol."
+ icon_state = "fridge_drinks"
+ icon_base = "fridge_drinks"
+ icon_contents = "drink"
/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))
@@ -131,9 +137,7 @@
desc = "A machine for drying plants."
wrenchable = 1
icon_state = "drying_rack"
- icon_on = "drying_rack_on"
- icon_off = "drying_rack"
- icon_panel = "drying_rack-panel"
+ icon_base = "drying_rack"
/obj/machinery/smartfridge/drying_rack/accept_check(var/obj/item/O as obj)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/))
@@ -151,21 +155,22 @@
update_icon()
/obj/machinery/smartfridge/drying_rack/update_icon()
- overlays.Cut()
var/not_working = stat & (BROKEN|NOPOWER)
- if(not_working)
- icon_state = icon_off
- else
- icon_state = icon_on
var/hasItems
for(var/datum/stored_item/I in item_records)
if(I.get_amount())
hasItems = 1
break
if(hasItems)
- overlays += "drying_rack_filled"
- if(!not_working)
- overlays += "drying_rack_drying"
+ if(not_working)
+ icon_state = "[icon_base]-plant-off"
+ else
+ icon_state = "[icon_base]-plant"
+ else
+ if(not_working)
+ icon_state = "[icon_base]-off"
+ else
+ icon_state = "[icon_base]"
/obj/machinery/smartfridge/drying_rack/proc/dry()
for(var/datum/stored_item/I in item_records)
@@ -199,10 +204,40 @@
update_icon()
/obj/machinery/smartfridge/update_icon()
+ cut_overlays()
if(stat & (BROKEN|NOPOWER))
- icon_state = icon_off
+ icon_state = "[icon_base]-off"
else
- icon_state = icon_on
+ 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
+ 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)
/*******************
* Item Adding
@@ -213,9 +248,7 @@
panel_open = !panel_open
user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].")
playsound(src, O.usesound, 50, 1)
- overlays.Cut()
- if(panel_open)
- overlays += image(icon, icon_panel)
+ update_icon()
SSnanoui.update_uis(src)
return
diff --git a/icons/obj/vending.dmi b/icons/obj/vending.dmi
index f77a777e9c..16eb4c814a 100755
Binary files a/icons/obj/vending.dmi and b/icons/obj/vending.dmi differ