This commit is contained in:
izac112
2023-06-03 19:53:45 +02:00
608 changed files with 17985 additions and 4722 deletions
+17 -2
View File
@@ -42,6 +42,9 @@
/// Canned food switch to this state when opened, if set
var/canned_open_state
/// For packaged/canned food sounds
var/opening_sound = null
/obj/item/weapon/reagent_containers/food/snacks/Initialize()
. = ..()
if(nutriment_amt)
@@ -290,7 +293,7 @@
/obj/item/weapon/reagent_containers/food/snacks/proc/unpackage(mob/user)
package = FALSE
to_chat(user, "<span class='notice'>You unwrap [src].</span>")
playsound(user,'sound/effects/packagedfoodopen.ogg', 15, 1)
playsound(user,opening_sound, 15, 1)
if(package_trash)
var/obj/item/T = new package_trash
user.put_in_hands(T)
@@ -302,7 +305,7 @@
/obj/item/weapon/reagent_containers/food/snacks/proc/uncan(mob/user)
canned = FALSE
to_chat(user, "<span class='notice'>You unseal \the [src] with a crack of metal.</span>")
playsound(loc,'sound/effects/tincanopen.ogg', rand(10,50), 1)
playsound(loc,opening_sound, rand(10,50), 1)
if(canned_open_state)
icon_state = canned_open_state
@@ -6136,6 +6139,7 @@
filling_color = "#552200"
icon = 'icons/obj/food_snacks.dmi'
icon_state = "cb01"
trash = /obj/item/trash/candy/cb01
nutriment_amt = 4
nutriment_desc = list("stale chocolate" = 2, "nougat" = 1, "caramel" = 1)
w_class = 1
@@ -6152,6 +6156,7 @@
filling_color = "#552200"
icon = 'icons/obj/food_snacks.dmi'
icon_state = "cb02"
trash = /obj/item/trash/candy/cb02
nutriment_amt = 4
nutriment_desc = list("chocolate" = 2, "caramel" = 1, "puffed rice" = 1)
w_class = 1
@@ -6168,6 +6173,7 @@
filling_color = "#552200"
icon = 'icons/obj/food_snacks.dmi'
icon_state = "cb03"
trash = /obj/item/trash/candy/cb03
nutriment_amt = 4
nutriment_desc = list("chocolate" = 4)
w_class = 1
@@ -6184,6 +6190,7 @@
filling_color = "#552200"
icon = 'icons/obj/food_snacks.dmi'
icon_state = "cb04"
trash = /obj/item/trash/candy/cb04
nutriment_amt = 4
nutriment_desc = list("chocolate" = 2, "salt = 1", "licorice" = 1)
w_class = 1
@@ -6200,6 +6207,7 @@
filling_color = "#552200"
icon = 'icons/obj/food_snacks.dmi'
icon_state = "cb05"
trash = /obj/item/trash/candy/cb05
nutriment_amt = 3
nutriment_desc = list("milk chocolate" = 2)
w_class = 1
@@ -6216,6 +6224,7 @@
filling_color = "#552200"
icon = 'icons/obj/food_snacks.dmi'
icon_state = "cb06"
trash = /obj/item/trash/candy/cb06
nutriment_amt = 4
nutriment_desc = list("chocolate" = 2, "coffee" = 1, "vanilla wafer" = 1)
w_class = 1
@@ -6233,6 +6242,7 @@
filling_color = "#552200"
icon = 'icons/obj/food_snacks.dmi'
icon_state = "cb07"
trash = /obj/item/trash/candy/cb07
nutriment_amt = 4
nutriment_desc = list("chocolate" = 2, "taro" = 2)
w_class = 1
@@ -6249,6 +6259,7 @@
filling_color = "#552200"
icon = 'icons/obj/food_snacks.dmi'
icon_state = "cb08"
trash = /obj/item/trash/candy/cb08
nutriment_amt = 3
nutriment_desc = list("chocolate" = 2, "malt puffs" = 1)
w_class = 1
@@ -6265,6 +6276,7 @@
filling_color = "#552200"
icon = 'icons/obj/food_snacks.dmi'
icon_state = "cb09"
trash = /obj/item/trash/candy/cb09
nutriment_amt = 6
nutriment_desc = list("peanuts" = 3, "condensed milk" = 1, "cashews" = 2)
w_class = 1
@@ -6283,6 +6295,7 @@
filling_color = "#552200"
icon = 'icons/obj/food_snacks.dmi'
icon_state = "cb10"
trash = /obj/item/trash/candy/cb10
nutriment_amt = 5
nutriment_desc = list("chocolate" = 2, "caramel" = 1, "peanuts" = 1, "nougat" = 1)
w_class = 1
@@ -6826,6 +6839,7 @@
/obj/item/weapon/reagent_containers/food/snacks/canned
icon = 'icons/obj/food_canned.dmi'
opening_sound = 'sound/effects/tincanopen.ogg'
canned = TRUE
//////////Just a short line of Canned Consumables, great for treasure in faraway abandoned outposts//////////
@@ -7008,6 +7022,7 @@
/obj/item/weapon/reagent_containers/food/snacks/packaged
icon = 'icons/obj/food_package.dmi'
opening_sound = 'sound/effects/packagedfoodopen.ogg'
package = TRUE
//////////////Lunar Cakes - proof of concept//////////////
@@ -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
@@ -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."
/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
@@ -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
@@ -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
return 0
@@ -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("<span class='warning'>[src] launches [throw_item.name] at [target.name]!</span>")
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
@@ -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 ..()