mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Ice Cream Rework Part 3: Scoopageddon (#22611)
* Added hand scooping and started on multi-scooping * Improved name and desc of multiscooped cones * Changed scoops' foodtypes * Added cone boxes and vat dumping for them * Separated scoop cargo crates and added cone crates * Changed info_tab to reflect cone box addition * Removed an accidentally placed 'o' in info_tab * Fixed cargo crate typo * Made vat upgradable, buildable, and shows capacity * Started on scooping failure * Fixed some errors * Finished scoop failure code * Buffed failure temperature change and moved qdel * Fixed too much chems from eating bug * Changed info_tab to reflect multiscooping failure * Oops, forgot to push cone box crafting * Started fixing oversight in reagent handling * Finished fixing reagent problem
This commit is contained in:
@@ -9,15 +9,15 @@
|
||||
|
||||
/datum/info_tab/icecream_vat/vat_instructions
|
||||
section = "Vat Instructions"
|
||||
section_text = "The ice cream vat allows you to select and dispense both ice cream scoops and cones, along with scooping ice cream scoops onto cones. The selected scoop will be scooped into cones, while the selected cone is what is dispensed by alt-clicking the vat. To scoop a cone, select a scoop type and then right-click the vat with an empty cone. Cones can only have one scoop of ice cream."
|
||||
section_text = "The ice cream vat allows you to select and dispense both ice cream scoops and cones, along with scooping ice cream scoops onto cones. The selected scoop will be scooped into cones, while the selected cone is what is dispensed by alt-clicking the vat. To scoop a cone, select a scoop type and then right-click the vat with an empty cone. Beware: after a cone gets four scoops, adding more has a chance of destroying it."
|
||||
|
||||
/datum/info_tab/icecream_vat/restocking
|
||||
section = "Restocking"
|
||||
section_text = "The ice cream vat can be restocked with new ice cream scoops and cones by left-clicking on the vat with said item. The vat can also be restocked by left-clicking on the vat with an ice cream carton with scoops. Doing so will transfer the scoops into the vat."
|
||||
section_text = "The ice cream vat can be restocked with new ice cream scoops and cones by left-clicking on the vat with said item. The vat can also be restocked by left-clicking on the vat with an ice cream carton or a cone box. Doing so will transfer its contents into the vat."
|
||||
|
||||
/datum/info_tab/icecream_vat/storage_capacity
|
||||
section = "Storage Capacity"
|
||||
section_text = "The ice cream vat has a storage capacity of 120 scoops and cones combined."
|
||||
section_text = "The ice cream vat has a storage capacity of 80 scoops and cones combined. This can be increased by upgrading its matter bin."
|
||||
|
||||
/datum/info_tab/icecream_vat/new_scoops
|
||||
section = "Creating New Scoops"
|
||||
|
||||
@@ -513,6 +513,7 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
|
||||
new/datum/stack_recipe("folder", /obj/item/folder), \
|
||||
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
|
||||
new/datum/stack_recipe("ice cream carton", /obj/item/storage/box/ice_cream_carton), \
|
||||
new/datum/stack_recipe("ice cream cone box", /obj/item/storage/box/ice_cream_carton/cone), \
|
||||
null, \
|
||||
//TO-DO: Find a proper way to just change the illustration on the box. Code isn't the issue, input is.
|
||||
new/datum/stack_recipe_list("fancy boxes", list(
|
||||
|
||||
@@ -1392,6 +1392,8 @@
|
||||
#define CARTON_PEACH "peach ice cream"
|
||||
#define CARTON_CHERRY_CHOCOLATE "cherry chocolate ice cream"
|
||||
#define CARTON_MEAT "meat lover's ice cream"
|
||||
#define BOX_CAKE "cake cone"
|
||||
#define BOX_CHOCOLATE "chocolate cone"
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton
|
||||
icon_state = "ice_cream"
|
||||
@@ -1400,33 +1402,49 @@
|
||||
desc = "A classic ice cream brand; this carton contains plain ice cream."
|
||||
|
||||
//What flavor will be inside the carton
|
||||
var/ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop
|
||||
var/item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop
|
||||
//String for extra examine
|
||||
var/container_type = "carton"
|
||||
//String for ice cream vat
|
||||
var/contents_type = "ice cream"
|
||||
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 7
|
||||
STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/ice_cream_scoop))
|
||||
//Check if it is a scoop carton or cone box
|
||||
if(!istype(src, /obj/item/storage/box/ice_cream_carton/cone))
|
||||
STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/ice_cream_scoop))
|
||||
else
|
||||
STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/ice_cream_cone))
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new ice_cream_flavor(src)
|
||||
new item_flavor(src)
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/attackby(obj/item/A, mob/user, params)
|
||||
//Allow for name and desc to be changed with pen
|
||||
if(istype(A, /obj/item/pen))
|
||||
var/choice = input(usr, "Choose which flavor to change to", "Changing Carton Flavor") as null|anything in list(CARTON_PLAIN, CARTON_VANILLA, CARTON_CHOCOLATE, CARTON_STRAWBERRY, CARTON_BLUE, CARTON_LEMON_SORBET, CARTON_CARAMEL, CARTON_BANANA, CARTON_ORANGE_CREAMSICLE, CARTON_PEACH, CARTON_CHERRY_CHOCOLATE, CARTON_MEAT)
|
||||
if(choice != null)
|
||||
name = "Big Top [choice] carton"
|
||||
desc = "A classic ice cream brand; this carton contains [choice]."
|
||||
//Check if it is a scoop carton or cone box
|
||||
if(!istype(src, /obj/item/storage/box/ice_cream_carton/cone))
|
||||
var/choice = input(usr, "Choose which flavor to change to", "Changing Container Flavor") as null|anything in list(CARTON_PLAIN, CARTON_VANILLA, CARTON_CHOCOLATE, CARTON_STRAWBERRY, CARTON_BLUE, CARTON_LEMON_SORBET, CARTON_CARAMEL, CARTON_BANANA, CARTON_ORANGE_CREAMSICLE, CARTON_PEACH, CARTON_CHERRY_CHOCOLATE, CARTON_MEAT)
|
||||
if(choice != null)
|
||||
name = "Big Top [choice] carton"
|
||||
desc = "A classic ice cream brand; this carton contains [choice]."
|
||||
else
|
||||
var/choice = input(usr, "Choose which flavor to change to", "Changing Container Flavor") as null|anything in list(BOX_CAKE, BOX_CHOCOLATE)
|
||||
if(choice != null)
|
||||
name = "Big Top [choice] box"
|
||||
desc = "A classic ice cream brand; this box contains [choice]s."
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/examine(mob/user)
|
||||
. = ..()
|
||||
. += span_notice("You can change the carton's flavor with a <b>Pen<b>.")
|
||||
. += span_notice("You can change the [container_type]'s flavor with a <b>Pen<b>.")
|
||||
if(length(contents) == 0)
|
||||
. += span_warning("This carton is <b>EMPTY<b>!!") //PANIC!!
|
||||
. += span_warning("This [container_type] is <b>EMPTY<b>!!") //PANIC!!
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/update_overlays()
|
||||
. = ..()
|
||||
@@ -1440,63 +1458,76 @@
|
||||
else
|
||||
carton_overlay = "_lid"
|
||||
|
||||
var/mutable_appearance/ice_cream_overlay = mutable_appearance(icon, "ice_cream[carton_overlay]")
|
||||
var/mutable_appearance/ice_cream_overlay = mutable_appearance(icon, "[icon_state][carton_overlay]")
|
||||
. += ice_cream_overlay
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/vanilla
|
||||
name = "Big Top vanilla ice cream carton"
|
||||
desc = "A classic ice cream brand; this carton contains vanilla ice cream."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/vanilla
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/vanilla
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/chocolate
|
||||
name = "Big Top chocolate ice cream carton"
|
||||
desc = "A classic ice cream brand; this carton contains chocolate ice cream."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/chocolate
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/chocolate
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/strawberry
|
||||
name = "Big Top strawberry ice cream carton"
|
||||
desc = "A classic ice cream brand; this carton contains strawberry ice cream."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/strawberry
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/strawberry
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/blue
|
||||
name = "Big Top blue ice cream carton"
|
||||
desc = "A classic ice cream brand; this carton contains blue ice cream."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/blue
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/blue
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/lemon_sorbet
|
||||
name = "Big Top lemon sorbet carton"
|
||||
desc = "A classic ice cream brand; this carton contains lemon sorbet."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/lemon_sorbet
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/lemon_sorbet
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/caramel
|
||||
name = "Big Top caramel ice cream carton"
|
||||
desc = "A classic ice cream brand; this carton contains caramel ice cream."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/caramel
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/caramel
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/banana
|
||||
name = "Big Top banana ice cream carton"
|
||||
desc = "A classic ice cream brand; this carton contains banana ice cream."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/banana
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/banana
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/orange_creamsicle
|
||||
name = "Big Top orange creamsicle carton"
|
||||
desc = "A classic ice cream brand; this carton contains orange creamsicle."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/orange_creamsicle
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/orange_creamsicle
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/peach
|
||||
name = "Big Top peach ice cream carton"
|
||||
desc = "A classic ice cream brand; this carton contains peach ice cream."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/peach
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/peach
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/cherry_chocolate
|
||||
name = "Big Top cherry chocolate ice cream carton"
|
||||
desc = "A classic ice cream brand; this carton contains cherry chocolate ice cream."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/cherry_chocolate
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/cherry_chocolate
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/meat
|
||||
name = "Big Top meat lover's ice cream carton"
|
||||
desc = "A classic ice cream brand; this carton contains meat lover's ice cream."
|
||||
ice_cream_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/meat
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_scoop/meat
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/cone
|
||||
icon_state = "cone_box"
|
||||
name = "Big Top cake cone box"
|
||||
desc = "A classic ice cream brand; this box contains cake cones."
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_cone/cake
|
||||
container_type = "box"
|
||||
contents_type = "cones"
|
||||
|
||||
/obj/item/storage/box/ice_cream_carton/cone/chocolate
|
||||
name = "Big Top chocolate cone box"
|
||||
desc = "A classic ice cream brand; this box contains chocolate cones."
|
||||
item_flavor = /obj/item/reagent_containers/food/snacks/ice_cream_cone/chocolate
|
||||
|
||||
#undef CARTON_PLAIN
|
||||
#undef CARTON_VANILLA
|
||||
@@ -1510,3 +1541,5 @@
|
||||
#undef CARTON_PEACH
|
||||
#undef CARTON_CHERRY_CHOCOLATE
|
||||
#undef CARTON_MEAT
|
||||
#undef BOX_CAKE
|
||||
#undef BOX_CHOCOLATE
|
||||
|
||||
@@ -2419,23 +2419,51 @@
|
||||
/obj/item/reagent_containers/food/snacks/grown/cucumber)
|
||||
crate_name = "food crate"
|
||||
|
||||
/datum/supply_pack/organic/ice_cream
|
||||
name = "Big Top Ice Cream Crate"
|
||||
desc = "A crate with a carton of every flavor of Big Top brand ice cream."
|
||||
cost = 2500
|
||||
contains = list(/obj/item/storage/box/ice_cream_carton,
|
||||
/obj/item/storage/box/ice_cream_carton/vanilla,
|
||||
/datum/supply_pack/organic/classic_ice_cream
|
||||
name = "Big Top Ice Cream Classics Crate"
|
||||
desc = "A crate with the classic flavors of vanilla, chocolate, and strawberry."
|
||||
cost = 600
|
||||
contains = list(/obj/item/storage/box/ice_cream_carton/vanilla,
|
||||
/obj/item/storage/box/ice_cream_carton/chocolate,
|
||||
/obj/item/storage/box/ice_cream_carton/strawberry,
|
||||
/obj/item/storage/box/ice_cream_carton/blue,
|
||||
/obj/item/storage/box/ice_cream_carton/lemon_sorbet,
|
||||
/obj/item/storage/box/ice_cream_carton/caramel,
|
||||
/obj/item/storage/box/ice_cream_carton/banana,
|
||||
/obj/item/storage/box/ice_cream_carton/orange_creamsicle,
|
||||
/obj/item/storage/box/ice_cream_carton/strawberry)
|
||||
crate_name = "classic ice cream crate"
|
||||
|
||||
/datum/supply_pack/organic/fruity_ice_cream
|
||||
name = "Big Top Ice Cream Fruity Crate"
|
||||
desc = "A crate with the fruity flavors of banana, peach, and cherry chocolate."
|
||||
cost = 600
|
||||
contains = list(/obj/item/storage/box/ice_cream_carton/banana,
|
||||
/obj/item/storage/box/ice_cream_carton/peach,
|
||||
/obj/item/storage/box/ice_cream_carton/cherry_chocolate,
|
||||
/obj/item/storage/box/ice_cream_carton/cherry_chocolate)
|
||||
crate_name = "fruity ice cream crate"
|
||||
|
||||
/datum/supply_pack/organic/sweet_ice_cream
|
||||
name = "Big Top Ice Cream Sweets Crate"
|
||||
desc = "A crate with the sweet flavors of caramel, orange creamsicle, and plain ice cream."
|
||||
cost = 600
|
||||
contains = list(/obj/item/storage/box/ice_cream_carton/caramel,
|
||||
/obj/item/storage/box/ice_cream_carton/orange_creamsicle,
|
||||
/obj/item/storage/box/ice_cream_carton)
|
||||
crate_name = "sweet ice cream crate"
|
||||
|
||||
/datum/supply_pack/organic/special_ice_cream
|
||||
name = "Big Top Ice Cream Special Crate"
|
||||
desc = "A crate with the special flavors of blue, lemon, and meat."
|
||||
cost = 600
|
||||
contains = list(/obj/item/storage/box/ice_cream_carton/blue,
|
||||
/obj/item/storage/box/ice_cream_carton/lemon_sorbet,
|
||||
/obj/item/storage/box/ice_cream_carton/meat)
|
||||
crate_name = "ice cream crate"
|
||||
crate_name = "special ice cream crate"
|
||||
|
||||
/datum/supply_pack/organic/ice_cream_cones
|
||||
name = "Big Top Ice Cream Cones Crate"
|
||||
desc = "A crate with two cake and chocolate cone boxes each."
|
||||
cost = 600
|
||||
contains = list(/obj/item/storage/box/ice_cream_carton/cone,
|
||||
/obj/item/storage/box/ice_cream_carton/cone,
|
||||
/obj/item/storage/box/ice_cream_carton/cone/chocolate,
|
||||
/obj/item/storage/box/ice_cream_carton/cone/chocolate)
|
||||
crate_name = "ice cream cone crate"
|
||||
|
||||
/datum/supply_pack/organic/vending/hydro_refills
|
||||
name = "Hydroponics Vending Machines Refills"
|
||||
|
||||
@@ -53,11 +53,13 @@
|
||||
desc = "Also known as sweet cream; it still makes for a tasty treat."
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "icecream_plain"
|
||||
//10u for ice cream chem, 5u for anything injected
|
||||
volume = 15
|
||||
bonus_reagents = list(/datum/reagent/consumable/ice_cream = 2)
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream = 10)
|
||||
filling_color = "#EDF7DF"
|
||||
tastes = list("ice cream" = 1)
|
||||
foodtype = DAIRY | SUGAR
|
||||
foodtype = SUGAR
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/vanilla
|
||||
name = "vanilla ice cream scoop"
|
||||
@@ -68,7 +70,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/vanilla = 10)
|
||||
filling_color = "#ECE2C5"
|
||||
tastes = list("ice cream" = 1, "vanilla" = 1)
|
||||
foodtype = DAIRY | SUGAR
|
||||
foodtype = SUGAR
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/chocolate
|
||||
name = "chocolate ice cream scoop"
|
||||
@@ -79,7 +81,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/chocolate = 10)
|
||||
filling_color = "#865C32"
|
||||
tastes = list("ice cream" = 1, "chocolate" = 1)
|
||||
foodtype = DAIRY | SUGAR | CHOCOLATE
|
||||
foodtype = SUGAR | CHOCOLATE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/strawberry
|
||||
name = "strawberry ice cream scoop"
|
||||
@@ -90,7 +92,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/strawberry = 10)
|
||||
filling_color = "#EFB8B8"
|
||||
tastes = list("ice cream" = 1, "strawberries" = 1)
|
||||
foodtype = DAIRY | SUGAR | FRUIT
|
||||
foodtype = FRUIT
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/blue
|
||||
name = "blue ice cream scoop"
|
||||
@@ -101,7 +103,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/blue = 10)
|
||||
filling_color = "#B8C5EF"
|
||||
tastes = list("ice cream" = 1, "blue" = 1)
|
||||
foodtype = DAIRY | SUGAR | ALCOHOL
|
||||
foodtype = SUGAR | ALCOHOL
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/lemon_sorbet
|
||||
name = "lemon sorbet scoop"
|
||||
@@ -112,7 +114,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/lemon_sorbet = 10)
|
||||
filling_color = "#D4DB86"
|
||||
tastes = list("ice cream" = 1, "lemons" = 1)
|
||||
foodtype = DAIRY | SUGAR | FRUIT
|
||||
foodtype = FRUIT
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/caramel
|
||||
name = "caramel ice cream scoop"
|
||||
@@ -123,7 +125,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/caramel = 10)
|
||||
filling_color = "#BC762F"
|
||||
tastes = list("ice cream" = 1, "caramel" = 1)
|
||||
foodtype = DAIRY | SUGAR
|
||||
foodtype = SUGAR
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/banana
|
||||
name = "banana ice cream scoop"
|
||||
@@ -134,7 +136,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/banana = 10)
|
||||
filling_color = "#DEDE00"
|
||||
tastes = list("ice cream" = 1, "banana" = 1)
|
||||
foodtype = DAIRY | SUGAR | FRUIT
|
||||
foodtype = FRUIT
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/orange_creamsicle
|
||||
name = "orange creamsicle scoop"
|
||||
@@ -145,7 +147,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/orange_creamsicle = 10)
|
||||
filling_color = "#D8B258"
|
||||
tastes = list("ice cream" = 1, "oranges" = 1)
|
||||
foodtype = DAIRY | SUGAR | FRUIT
|
||||
foodtype = FRUIT
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/peach
|
||||
name = "peach ice cream scoop"
|
||||
@@ -156,7 +158,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/peach = 10)
|
||||
filling_color = "#CD8D68"
|
||||
tastes = list("ice cream" = 1, "peaches" = 1)
|
||||
foodtype = DAIRY | SUGAR | FRUIT
|
||||
foodtype = FRUIT
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/cherry_chocolate
|
||||
name = "cherry chocolate ice cream scoop"
|
||||
@@ -167,7 +169,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/cherry_chocolate = 10)
|
||||
filling_color = "#6F0000"
|
||||
tastes = list("ice cream" = 1, "cherries" = 1, "chocolate" = 1)
|
||||
foodtype = DAIRY | SUGAR | FRUIT | CHOCOLATE
|
||||
foodtype = FRUIT | CHOCOLATE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_scoop/meat
|
||||
name = "meat lover's ice cream scoop"
|
||||
@@ -178,7 +180,7 @@
|
||||
list_reagents = list(/datum/reagent/consumable/ice_cream/meat = 10)
|
||||
filling_color = "#BD0000"
|
||||
tastes = list("ice cream" = 1, "blood" = 1)
|
||||
foodtype = DAIRY | SUGAR | MICE
|
||||
foodtype = MICE
|
||||
|
||||
/////////////
|
||||
//SNOWCONES//
|
||||
|
||||
@@ -8,14 +8,19 @@
|
||||
use_power = NO_POWER_USE
|
||||
layer = BELOW_OBJ_LAYER
|
||||
max_integrity = 300
|
||||
component_parts = list( new /obj/item/stock_parts/matter_bin,
|
||||
new /obj/item/circuitboard/machine/icecream_vat)
|
||||
circuit = /obj/item/circuitboard/machine/icecream_vat
|
||||
//Ice cream to be dispensed into cone on attackby
|
||||
var/selected_scoop = null
|
||||
//Cone to be dispensed with alt click
|
||||
var/selected_cone = null
|
||||
//Max amount of items that can be in vat's storage
|
||||
var/storage_capacity = 120
|
||||
var/storage_capacity = 80
|
||||
//If it starts empty or not
|
||||
var/start_empty = FALSE
|
||||
//If the vat will perform scooping_failure proc
|
||||
var/scoop_fail = TRUE
|
||||
//Sound made when an item is dispensed
|
||||
var/dispense_sound = 'sound/machines/click.ogg'
|
||||
//Sound made when selecting/deselecting an item
|
||||
@@ -37,7 +42,8 @@
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_cone/cake,
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_cone/chocolate)
|
||||
//Please don't add anything other than scoops or cones to the list or it could/maybe/possibly/definitely break it
|
||||
|
||||
//If adding new items to the list: INCREASE STORAGE_CAPACITY TO ACCOUNT FOR ITEM!!
|
||||
|
||||
/obj/machinery/icecream_vat/ui_interact(mob/user, datum/tgui/ui) //Thanks bug eating lizard for helping me with the UI
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
@@ -51,6 +57,7 @@
|
||||
data["cones"] = list()
|
||||
data["ice_cream"] = list()
|
||||
data["tabs"] = list()
|
||||
data["storage"] = list()
|
||||
|
||||
//Loop through starting list for data to send to main tab
|
||||
for(var/item_detail in ui_list)
|
||||
@@ -94,6 +101,10 @@
|
||||
//Add info to data
|
||||
data["info_tab"] += list(details)
|
||||
|
||||
//Get content and capacity data
|
||||
data["contents_length"] = contents.len
|
||||
data["storage_capacity"] = storage_capacity
|
||||
|
||||
//Send stored information to UI
|
||||
return data
|
||||
|
||||
@@ -130,6 +141,11 @@
|
||||
for(var/i in 1 to loop_cycles)
|
||||
new item(src)
|
||||
|
||||
/obj/machinery/icecream_vat/RefreshParts()
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
//Capacity increases by 25 per item rating above T1
|
||||
storage_capacity = initial(storage_capacity) + ( 25 * (B.rating - 1))
|
||||
|
||||
/obj/machinery/icecream_vat/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -175,16 +191,35 @@
|
||||
else if(istype(A, /obj/item/storage/box/ice_cream_carton))
|
||||
storage_container(A)
|
||||
|
||||
if(default_deconstruction_screwdriver(user, icon_state, icon_state, A))
|
||||
if(panel_open)
|
||||
add_overlay("[initial(icon_state)]_panel")
|
||||
else
|
||||
cut_overlay("[initial(icon_state)]_panel")
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(A))
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/icecream_vat/proc/find_amount(obj/item/counting_item)
|
||||
/obj/machinery/icecream_vat/proc/find_amount(obj/item/counting_item, target_name = null, list/target_list = null)
|
||||
var/amount = 0
|
||||
|
||||
//Loop through contents, counting every instance of the given target
|
||||
for(var/obj/item/list_item in contents)
|
||||
if(list_item.type == counting_item.type)
|
||||
amount += 1
|
||||
|
||||
//If target_list is null, search contents for type paths
|
||||
if(!target_list)
|
||||
//Loop through contents, counting every instance of the given target
|
||||
for(var/obj/item/list_item in contents)
|
||||
if(list_item.type == counting_item.type)
|
||||
amount += 1
|
||||
//Else, search target_list
|
||||
else
|
||||
for(var/list_item in target_list)
|
||||
if(list_item == target_name)
|
||||
amount += 1
|
||||
|
||||
return amount
|
||||
|
||||
/obj/machinery/icecream_vat/proc/dispense_item(received_item, mob/user = usr)
|
||||
@@ -256,7 +291,7 @@
|
||||
//If a cone, check if it has already been scooped. If it has, do not store it
|
||||
if(istype(target_item, /obj/item/reagent_containers/food/snacks/ice_cream_cone))
|
||||
var/obj/item/reagent_containers/food/snacks/ice_cream_cone/cone = target_item
|
||||
if(cone.scooped == TRUE)
|
||||
if(cone.scoops > 0)
|
||||
user.balloon_alert(user, "Cannot store scooped cones!")
|
||||
|
||||
return
|
||||
@@ -270,15 +305,15 @@
|
||||
//Warn about full capacity
|
||||
user.balloon_alert(user, "No space!")
|
||||
|
||||
/obj/machinery/icecream_vat/proc/storage_container(obj/item/target_container, mob/user = usr)
|
||||
/obj/machinery/icecream_vat/proc/storage_container(obj/item/storage/box/ice_cream_carton/target_container, mob/user = usr)
|
||||
var/end_message = "[user] empties the [target_container] into [src]."
|
||||
var/end_self_message = "You empty the [target_container] into [src]."
|
||||
//Check to see if it is empty
|
||||
if(target_container.contents.len > 0 && contents.len < storage_capacity)
|
||||
//Hide carton's storage UI to prevent ghost scoop bug
|
||||
//Hide container's storage UI to prevent ghost scoop bug
|
||||
SEND_SIGNAL(target_container, COMSIG_TRY_STORAGE_HIDE_FROM, user)
|
||||
//Loop through all contents
|
||||
for(var/obj/item/reagent_containers/food/snacks/ice_cream_scoop/carton_item in target_container)
|
||||
for(var/obj/item/reagent_containers/food/snacks/carton_item in target_container)
|
||||
//Transfer items one at a time
|
||||
carton_item.forceMove(src)
|
||||
if(contents.len >= storage_capacity)
|
||||
@@ -287,8 +322,8 @@
|
||||
end_message = "[user] empties the [target_container] into [src], filling it to its capacity."
|
||||
end_self_message = "You empty the [target_container] into [src], filling it to its capacity."
|
||||
else
|
||||
end_message = "[user] fills [src] to its capacity, with some ice cream still in the [target_container]."
|
||||
end_self_message = "You fill [src] to its capacity, with some ice cream still in the [target_container]."
|
||||
end_message = "[user] fills [src] to its capacity, with some [target_container.contents_type] still in the [target_container]."
|
||||
end_self_message = "You fill [src] to its capacity, with some [target_container.contents_type] still in the [target_container]."
|
||||
break
|
||||
|
||||
user.visible_message(span_notice(end_message), span_notice(end_self_message))
|
||||
@@ -297,7 +332,7 @@
|
||||
return
|
||||
else
|
||||
if(target_container.contents.len == 0)
|
||||
user.balloon_alert(user, "Carton empty!")
|
||||
user.balloon_alert(user, "[target_container.contents_type] empty!")
|
||||
else
|
||||
user.balloon_alert(user, "Vat full!")
|
||||
return
|
||||
@@ -306,47 +341,161 @@
|
||||
//Check if item is a cone
|
||||
if(istype(target_cone, /obj/item/reagent_containers/food/snacks/ice_cream_cone))
|
||||
var/obj/item/reagent_containers/food/snacks/ice_cream_cone/cone = target_cone
|
||||
//Check if cone is scooped
|
||||
if(cone.scooped == FALSE)
|
||||
//Check if a scoop has been selected
|
||||
if(selected_scoop != null)
|
||||
//Check if there are any of selected scoop in contents
|
||||
if(find_amount(selected_scoop) > 0)
|
||||
//Select last of selected scoop in contents
|
||||
var/obj/item/reagent_containers/food/snacks/cone_scoop = LAZYACCESS(contents, last_index(selected_scoop))
|
||||
//Remove scoop from contents and add relevant variables to cone
|
||||
cone_scoop.forceMove(loc)
|
||||
cone.reagents.reagent_list += cone_scoop.reagents.reagent_list
|
||||
cone.foodtype = cone_scoop.foodtype
|
||||
//Change description of cone
|
||||
cone.desc = "[cone.base_desc] with a [cone_scoop.name]."
|
||||
//Check if a scoop has been selected
|
||||
if(selected_scoop != null)
|
||||
//Check if there are any of selected scoop in contents
|
||||
if(find_amount(selected_scoop) > 0)
|
||||
//Increase scooped variable
|
||||
cone.scoops += 1
|
||||
//Select last of selected scoop in contents
|
||||
var/obj/item/reagent_containers/food/snacks/cone_scoop = LAZYACCESS(contents, last_index(selected_scoop))
|
||||
//Remove scoop from contents
|
||||
cone_scoop.forceMove(loc)
|
||||
//Increase maximum volume to make room for scoop's chems
|
||||
cone.reagents.maximum_volume += 15
|
||||
//Add scoop's reagents to cone
|
||||
cone_scoop.reagents.trans_to(cone, cone_scoop.reagents.total_volume, transfered_by = user)
|
||||
//Change cone's foodtype to scoop's
|
||||
cone.foodtype = cone_scoop.foodtype
|
||||
//Add scoop to scoop_names list
|
||||
LAZYADD(cone.scoop_names, cone_scoop.name)
|
||||
//Determine how to add the overlay and change description and name depending on scoops value
|
||||
if(cone.scoops == 1)
|
||||
//Add overlay of scoop to cone
|
||||
cone.add_overlay(cone_scoop.icon_state)
|
||||
//Alert that the cone has been scooped
|
||||
user.visible_message(span_notice("[user] scoops a [cone_scoop.name] into the [cone.name]"), span_notice("You scoop a [cone_scoop.name] into the [cone.name]"))
|
||||
//Set scooped to TRUE
|
||||
cone.scooped = TRUE
|
||||
//Delete scoop
|
||||
qdel(cone_scoop)
|
||||
|
||||
playsound(src, 'sound/effects/rustle2.ogg', 50, TRUE, extrarange = -3)
|
||||
|
||||
//Warn user that there are no selected scoops left
|
||||
//Change name and desc
|
||||
name_cone(cone)
|
||||
else
|
||||
user.balloon_alert(user, "No selected scoops in storage!")
|
||||
//Add overlay but with y-axis position depending on amount of scoops
|
||||
var/mutable_appearance/TOP_SCOOP = mutable_appearance(cone_scoop.icon, "[cone_scoop.icon_state]")
|
||||
TOP_SCOOP.pixel_y = 2 * (cone.scoops - 1)
|
||||
cone.add_overlay(TOP_SCOOP)
|
||||
//Change name and desc based on scoop amount
|
||||
name_cone(cone)
|
||||
//Alert that the cone has been scooped
|
||||
user.visible_message(span_notice("[user] scoops a [cone_scoop.name] into the [cone.name]"), span_notice("You scoop a [cone_scoop.name] into the [cone.name]"))
|
||||
//Delete scoop
|
||||
qdel(cone_scoop)
|
||||
//Dispencing sound
|
||||
playsound(src, 'sound/effects/rustle2.ogg', 50, TRUE, extrarange = -3)
|
||||
|
||||
//Warn user about no selected scoop
|
||||
//If there are more than four scoops and scoop_fail is true, check for scooping failure
|
||||
if(cone.scoops > 4 && scoop_fail)
|
||||
scooping_failure(cone, usr)
|
||||
|
||||
//Warn user that there are no selected scoops left
|
||||
else
|
||||
user.balloon_alert(user, "No scoop selected!")
|
||||
user.balloon_alert(user, "No selected scoops in storage!")
|
||||
|
||||
//Warn user about cone already being scooped
|
||||
//Warn user about no selected scoop
|
||||
else
|
||||
user.balloon_alert(user, "Already scooped!")
|
||||
user.balloon_alert(user, "No scoop selected!")
|
||||
|
||||
//Warn user about invalid item
|
||||
else
|
||||
user.balloon_alert(user, "Invalid item!")
|
||||
|
||||
/obj/machinery/icecream_vat/proc/name_cone(obj/item/reagent_containers/food/snacks/ice_cream_cone/target_cone)
|
||||
//Change name and desc based on amount of scoops
|
||||
switch(target_cone.scoops)
|
||||
if(1)
|
||||
target_cone.name = "Scooped [target_cone.base_name]"
|
||||
target_cone.desc = "A delicious [target_cone.name] with a [target_cone.scoop_names[1]]."
|
||||
if(2)
|
||||
target_cone.name = "Double scooped [target_cone.base_name]"
|
||||
target_cone.desc = "A delicious [target_cone.name] with[list_scoops(target_cone.scoop_names)]."
|
||||
if(3)
|
||||
target_cone.name = "Thrice cream [target_cone.base_name]"
|
||||
target_cone.desc = "A delicious [target_cone.name] with[list_scoops(target_cone.scoop_names)]."
|
||||
if(4)
|
||||
target_cone.name = "Quadruple scooped [target_cone.base_name]"
|
||||
target_cone.desc = "A delicious [target_cone.name] with[list_scoops(target_cone.scoop_names)]."
|
||||
if(5)
|
||||
target_cone.name = "Quintuple scooped [target_cone.base_name]"
|
||||
target_cone.desc = "A delicious [target_cone.name] with[list_scoops(target_cone.scoop_names)]."
|
||||
if(6 to 9)
|
||||
target_cone.name = "Tower scooped [target_cone.base_name]"
|
||||
target_cone.desc = "A tall [target_cone.name] with[list_scoops(target_cone.scoop_names)]."
|
||||
if(10 to 14)
|
||||
target_cone.name = "Scoopimanjaro [target_cone.base_name]"
|
||||
target_cone.desc = "A towering [target_cone.name] with[list_scoops(target_cone.scoop_names)]."
|
||||
if(15 to 19)
|
||||
target_cone.name = "Scooperest [target_cone.base_name]"
|
||||
target_cone.desc = "A mountainous [target_cone.name] with[list_scoops(target_cone.scoop_names)]."
|
||||
if(20 to INFINITY)
|
||||
target_cone.name = "Scoopageddon [target_cone.base_name]"
|
||||
target_cone.desc = "A [target_cone.name] of apocalyptic proportions with[list_scoops(target_cone.scoop_names)]."
|
||||
|
||||
//Create properly formated string for showing a cone's scoops in its desc
|
||||
/obj/machinery/icecream_vat/proc/list_scoops(list/scoops)
|
||||
//List used for searching through list
|
||||
var/list/unique_scoops = null
|
||||
//What to return for the desc
|
||||
var/final_string = ""
|
||||
|
||||
//Populate unique_scoops based on given list
|
||||
for(var/search_item in scoops)
|
||||
if(!unique_scoops)
|
||||
LAZYADD(unique_scoops, search_item)
|
||||
else if(!LAZYFIND(unique_scoops, search_item))
|
||||
LAZYADD(unique_scoops, search_item)
|
||||
|
||||
//Use populated unique_scoops to make final_string
|
||||
for(var/search_name in unique_scoops)
|
||||
//If search_name is the only name in the list
|
||||
if(find_amount(target_name = search_name, target_list = scoops) == LAZYLEN(scoops))
|
||||
final_string = " [LAZYLEN(scoops)] [unique_scoops[1]]s"
|
||||
break
|
||||
else
|
||||
//Check if it is not the last name in the list
|
||||
if(LAZYFIND(unique_scoops, search_name) != LAZYLEN(unique_scoops))
|
||||
//Check if it is the only instance in the list
|
||||
if(find_amount(target_name = search_name, target_list = scoops) == 1)
|
||||
final_string += " 1 [search_name],"
|
||||
else
|
||||
final_string += " [find_amount(target_name = search_name, target_list = scoops)] [search_name]s,"
|
||||
else
|
||||
//Check if it is the only instance in the list
|
||||
if(find_amount(target_name = search_name, target_list = scoops) == 1)
|
||||
final_string += " and 1 [search_name]"
|
||||
else
|
||||
final_string += " and [find_amount(target_name = search_name, target_list = scoops)] [search_name]s"
|
||||
|
||||
return final_string
|
||||
|
||||
/obj/machinery/icecream_vat/proc/scooping_failure(obj/item/reagent_containers/food/snacks/ice_cream_cone/target_cone, mob/living/carbon/human/user = usr)
|
||||
//Base chance of failure
|
||||
var/base_chance = 15
|
||||
//Chance of failure that is multiplied by scoop count minus 4
|
||||
var/added_chance = 5
|
||||
//Total chance of failure
|
||||
var/failure_chance = base_chance + (added_chance * (target_cone.scoops - 4))
|
||||
|
||||
if(prob(failure_chance))
|
||||
switch(target_cone.scoops)
|
||||
//Alert user
|
||||
if(5 to 9)
|
||||
user.visible_message(span_alert("[user] accidently crushes their [target_cone.name] while trying to add another scoop!"), span_alert("You accidently crush your [target_cone.name] while trying to add another scoop!"))
|
||||
//Alert user and damage them based on amount of scoops
|
||||
if(10 to 20)
|
||||
user.visible_message(span_alert("[user] accidently tips their [target_cone.name] over and is hit in the ensuing avalanche!"), span_alert("You accidently tip your [target_cone.name] over and are hit by the ensuing avalanche!"))
|
||||
//Maximum of 20 brute damage from failure
|
||||
user.adjustBruteLoss(target_cone.scoops)
|
||||
//Cool them down
|
||||
user.adjust_bodytemperature((-6 * target_cone.scoops) * TEMPERATURE_DAMAGE_COEFFICIENT, target_cone.scoops)
|
||||
//Punish them for their hubris
|
||||
if(21 to INFINITY)
|
||||
user.visible_message(span_alert("[user] is minced in a flash of light!"), span_alert("Within nanoseconds, your [target_cone.name] colapses into itself. The ensuing micro singularity rips you to shreads!"))
|
||||
//Regret
|
||||
user.say(pick("Oh no...", "Mein gott...", "Uh oh...", "Fuuuuu...", "Shiiii...", "Not yoggers..."), forced="scoop fail")
|
||||
//Explode their spessmen
|
||||
explosion(user.loc,1,1,1,flash_range = 15)
|
||||
//Delete cone after failure
|
||||
qdel(target_cone)
|
||||
|
||||
/obj/machinery/icecream_vat/empty
|
||||
start_empty = TRUE
|
||||
|
||||
///////////////////
|
||||
//ICE CREAM CONES//
|
||||
///////////////////
|
||||
@@ -358,9 +507,11 @@
|
||||
bitesize = 3
|
||||
foodtype = GRAIN
|
||||
//Used for changing the description after being scooped
|
||||
var/base_desc = null
|
||||
//If the cone has a scoop or not
|
||||
var/scooped = FALSE
|
||||
var/base_name = null
|
||||
//How many scoops it has
|
||||
var/scoops = 0
|
||||
//Variables for cone's scoops
|
||||
var/list/scoop_names = null
|
||||
//For adding chems to specific cones
|
||||
var/extra_reagent = null
|
||||
//Amount of extra_reagent to add to cone
|
||||
@@ -373,12 +524,50 @@
|
||||
if(extra_reagent != null)
|
||||
reagents.add_reagent(extra_reagent, extra_reagent_amount)
|
||||
|
||||
//Hand scooping only allows one scoop. Vat needed for multi-scooping
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_cone/attackby(obj/item/A, mob/user, params)
|
||||
//Check if item is a scoop
|
||||
if(istype(A, /obj/item/reagent_containers/food/snacks/ice_cream_scoop))
|
||||
//Check if not already scooped
|
||||
if(src.scoops == 0)
|
||||
//Make variables for scoop and cone for readability
|
||||
var/obj/item/reagent_containers/food/snacks/ice_cream_cone/cone = src
|
||||
var/obj/item/reagent_containers/food/snacks/cone_scoop = A
|
||||
//Increase maximum volume to make room for scoop's chems
|
||||
cone.reagents.maximum_volume += 15
|
||||
//Add scoop's reagents to cone
|
||||
cone_scoop.reagents.trans_to(cone, cone_scoop.reagents.total_volume, transfered_by = user)
|
||||
//Change cone's foodtype to scoop's
|
||||
cone.foodtype = cone_scoop.foodtype
|
||||
//Add scoop to scoop_names list
|
||||
LAZYADD(cone.scoop_names, cone_scoop.name)
|
||||
//Change description of cone
|
||||
cone.desc = "A hand scooped [cone.base_name] with a [cone_scoop.name]. Kinda gross."
|
||||
//Add overlay of scoop to cone
|
||||
cone.add_overlay(cone_scoop.icon_state)
|
||||
//Alert that the cone has been scooped
|
||||
user.visible_message(span_notice("[user] hand scoops a [cone_scoop.name] into the [cone.name]"), span_notice("You hand scoop a [cone_scoop.name] into the [cone.name]"))
|
||||
//Change the name
|
||||
cone.name = "Hand scooped [cone.base_name]"
|
||||
//Increase scooped variable
|
||||
cone.scoops += 1
|
||||
//Delete scoop
|
||||
qdel(cone_scoop)
|
||||
|
||||
playsound(src, 'sound/effects/rustle2.ogg', 50, TRUE, extrarange = -3)
|
||||
|
||||
//Warn about no multi-scooping with hands
|
||||
else
|
||||
user.balloon_alert(user, "Cannot multi-scoop with hands!")
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_cone/cake
|
||||
name = "cake ice cream cone"
|
||||
desc = "A delicious cake cone, but with no ice cream."
|
||||
icon_state = "icecream_cone_waffle"
|
||||
tastes = list("bland" = 6)
|
||||
base_desc = "A delicious cake cone"
|
||||
base_name = "cake ice cream cone"
|
||||
extra_reagent = /datum/reagent/consumable/sugar
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/ice_cream_cone/chocolate
|
||||
@@ -386,7 +575,7 @@
|
||||
desc = "A delicious chocolate cone, but with no ice cream."
|
||||
icon_state = "icecream_cone_chocolate"
|
||||
tastes = list("bland" = 4, "chocolate" = 6)
|
||||
base_desc = "A delicious chocolate cone"
|
||||
base_name = "chocolate ice cream cone"
|
||||
extra_reagent = /datum/reagent/consumable/coco
|
||||
|
||||
///////////////////////////
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
@@ -1,3 +1,4 @@
|
||||
import { storage } from 'common/storage';
|
||||
import { capitalize } from 'common/string';
|
||||
import { useBackend, useLocalState } from '../backend';
|
||||
import { Button, Section, Table, Tabs, Box, TextArea, Stack } from '../components';
|
||||
@@ -12,6 +13,7 @@ type Data = {
|
||||
type Tab = {
|
||||
cones: ConeStats[];
|
||||
ice_cream: IceCreamStats[];
|
||||
storage: StorageStats[];
|
||||
info_tab: InformationStats[];
|
||||
}
|
||||
|
||||
@@ -39,6 +41,11 @@ type InformationStats = {
|
||||
section_text: string;
|
||||
}
|
||||
|
||||
type StorageStats = {
|
||||
contents_length: number;
|
||||
storage_capacity: number;
|
||||
}
|
||||
|
||||
export const IceCreamVat = (props, context) => {
|
||||
// Get information from backend code
|
||||
const { data } = useBackend<Data>(context);
|
||||
@@ -229,7 +236,7 @@ const InfoContentRow = (props, context) => {
|
||||
// Make constant that starts with the section_text of the first element of info_tab and which will recieve new data from InfoTab
|
||||
const[infoContent] = useLocalState(context, 'selectedInfoTab', info_tab[0].section_text);
|
||||
|
||||
// Return a section with the tab's section_text
|
||||
// Return a section with the vat's contents and capacity
|
||||
return (
|
||||
<Section
|
||||
fontSize="16px">
|
||||
@@ -238,18 +245,52 @@ const InfoContentRow = (props, context) => {
|
||||
);
|
||||
};
|
||||
|
||||
const CapacityRow = (props, context) => {
|
||||
// Get data from ui_data in backend code
|
||||
const { data } = useBackend<StorageStats>(context);
|
||||
// Get needed variables from StorageStats
|
||||
const { contents_length } = data;
|
||||
const { storage_capacity } = data;
|
||||
|
||||
// Return a section with the tab's section_text
|
||||
return(
|
||||
<Table>
|
||||
<Table.Row>
|
||||
<Table.Cell
|
||||
fontSize="14px"
|
||||
textAlign="center"
|
||||
bold>
|
||||
{/* Show the vat's current contents and its max contents */}
|
||||
{contents_length}/{storage_capacity}
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
</Table>
|
||||
);
|
||||
};
|
||||
|
||||
const VatTab = (props, context) => {
|
||||
|
||||
// For organizing the vat tab's information
|
||||
return (
|
||||
<Stack vertical>
|
||||
<Stack.Item>
|
||||
<Section title="Cones">
|
||||
<Section
|
||||
title="Storage Capacity"
|
||||
textAlign="center">
|
||||
<CapacityRow />
|
||||
</Section>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Section
|
||||
title="Cones"
|
||||
textAlign="center">
|
||||
<ConeRow />
|
||||
</Section>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Section title="Scoops">
|
||||
<Section
|
||||
title="Scoops"
|
||||
textAlign="center">
|
||||
<IceCreamRow />
|
||||
</Section>
|
||||
</Stack.Item>
|
||||
|
||||
@@ -32,3 +32,9 @@
|
||||
/obj/item/stock_parts/capacitor/adv = 1,
|
||||
/obj/item/stock_parts/micro_laser/high = 2,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/machine/icecream_vat
|
||||
name = "Ice Cream Vat (Machine Board)"
|
||||
build_path = /obj/machinery/icecream_vat/empty
|
||||
req_components = list(/obj/item/stock_parts/matter_bin = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
Reference in New Issue
Block a user