mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Merge pull request #10806 from VOREStation/Icons/vendors
Port Eris, /tg/ vendors
This commit is contained in:
committed by
Chompstation Bot
parent
654ef75433
commit
ecc9cf97df
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user