[MIRROR] Fixes prefilled drinking glasses, and small carton icon [MDB IGNORE] (#18606)

* Fixes prefilled drinking glasses, and small carton icon (#72527)

Fixes a few drink container issues:
- The `/obj/item/reagent_containers/cup/glass/drinkingglass/filled`
subtypes runtimed whenever their reagents changed because of the strict
way that `/datum/component/takes_reagent_appearance` compares container
types.
- `/datum/component/takes_reagent_appearance` now allows for an
alternate type to check against `glass_style.required_container_type`
via a var called `base_container_type`. The filled glasses now set this
var to the main drinking glass type.
- As well, filled glasses didn't have their appearance set up to match
the corresponding glass style. Thus, the
`/obj/item/reagent_containers/cup/glass/drinkingglass/filled` type now
updates its appearance on initialization.

- Seperately, the small carton's appearance broke if you put a reagent
in that doesn't match a glass style, reverting to the "water_cup" icon
state which doesn't exist in the boxes.dmi file. This is because it was
a subtype of sillycup, but there is nothing gained as far as I can see
from that type relationship, so the small carton was repathed to
`/obj/item/reagent_containers/cup/glass/smallcarton`.

* Fixes prefilled drinking glasses, and small carton icon

Co-authored-by: Tastyfish <crazychris32@gmail.com>
This commit is contained in:
SkyratBot
2023-01-08 22:49:52 -08:00
committed by GitHub
co-authored by Tastyfish
parent 474e24c90e
commit ee8226b8a8
6 changed files with 194 additions and 172 deletions
+162 -162
View File
@@ -272,6 +272,18 @@
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plating,
/area/awaymission/cabin)
"aS" = (
/obj/structure/sink/kitchen/directional/south{
desc = "A sink used for washing one's hands and face. It looks rusty and home-made";
name = "sink"
},
/obj/structure/mop_bucket/janitorialcart,
/obj/item/mop,
/obj/item/reagent_containers/cup/bucket,
/obj/item/clothing/suit/caution,
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plating,
/area/awaymission/cabin)
"aT" = (
/obj/machinery/door/window/left/directional/east{
name = "Fireplace"
@@ -325,11 +337,6 @@
/obj/structure/cable,
/turf/open/floor/carpet,
/area/awaymission/cabin)
"bc" = (
/obj/structure/table/wood,
/obj/item/reagent_containers/cup/glass/mug/britcup,
/turf/open/floor/carpet,
/area/awaymission/cabin)
"bd" = (
/obj/structure/chair/office,
/turf/open/floor/carpet,
@@ -418,6 +425,22 @@
/obj/machinery/vending/coffee,
/turf/open/floor/carpet,
/area/awaymission/cabin)
"bu" = (
/obj/item/clothing/suit/hooded/wintercoat/hydro{
name = "service winter coat";
pixel_y = 4
},
/obj/item/clothing/suit/hooded/wintercoat/hydro{
name = "service winter coat";
pixel_y = 4
},
/obj/item/clothing/suit/hooded/wintercoat/hydro{
name = "service winter coat";
pixel_y = 4
},
/obj/structure/table/wood,
/turf/open/floor/wood,
/area/awaymission/cabin)
"bv" = (
/obj/structure/table/wood,
/obj/machinery/chem_dispenser/drinks/beer{
@@ -434,8 +457,8 @@
/turf/open/floor/iron/cafeteria,
/area/awaymission/cabin)
"by" = (
/obj/structure/table,
/obj/machinery/reagentgrinder,
/obj/machinery/oven,
/obj/item/plate/oven_tray,
/turf/open/floor/iron/cafeteria,
/area/awaymission/cabin)
"bz" = (
@@ -601,6 +624,10 @@
/obj/structure/chair/wood,
/turf/open/floor/wood,
/area/awaymission/cabin)
"cj" = (
/obj/machinery/griddle,
/turf/open/floor/iron/cafeteria,
/area/awaymission/cabin)
"ck" = (
/obj/structure/table,
/obj/machinery/microwave,
@@ -709,6 +736,11 @@
/obj/structure/cable,
/turf/open/floor/wood,
/area/awaymission/cabin)
"cF" = (
/obj/structure/table,
/obj/machinery/reagentgrinder,
/turf/open/floor/iron/cafeteria,
/area/awaymission/cabin)
"cG" = (
/obj/structure/closet/secure_closet/freezer/meat/open,
/obj/item/food/meat/slab/synthmeat,
@@ -746,13 +778,6 @@
/obj/structure/cable,
/turf/open/floor/iron/cafeteria,
/area/awaymission/cabin)
"cK" = (
/obj/structure/table/wood/fancy,
/obj/item/reagent_containers/cup/glass/sillycup/smallcarton{
pixel_y = 4
},
/turf/open/floor/wood,
/area/awaymission/cabin)
"cL" = (
/obj/machinery/light/small/directional/west,
/obj/structure/cable,
@@ -959,22 +984,6 @@
},
/turf/open/floor/plating/snowed/snow_cabin,
/area/awaymission/cabin/snowforest/sovietsurface)
"dx" = (
/obj/item/clothing/suit/hooded/wintercoat/hydro{
name = "service winter coat";
pixel_y = 4
},
/obj/item/clothing/suit/hooded/wintercoat/hydro{
name = "service winter coat";
pixel_y = 4
},
/obj/item/clothing/suit/hooded/wintercoat/hydro{
name = "service winter coat";
pixel_y = 4
},
/obj/structure/table/wood,
/turf/open/floor/wood,
/area/awaymission/cabin)
"dA" = (
/turf/closed/wall/ice,
/area/awaymission/cabin/snowforest)
@@ -1797,14 +1806,6 @@
name = "Jail Cell 7212"
},
/area/awaymission/cabin/caves/mountain)
"fT" = (
/obj/structure/grille,
/obj/structure/window/reinforced/fulltile{
desc = "Enjoy the view.";
name = "window"
},
/turf/open/floor/plating,
/area/awaymission/cabin/caves/mountain)
"fU" = (
/obj/machinery/door/airlock/centcom{
desc = "Look at what you have done.";
@@ -2274,10 +2275,6 @@
"hM" = (
/turf/closed/wall/mineral/snow,
/area/awaymission/cabin/caves/mountain)
"hP" = (
/obj/item/candle/infinite,
/turf/open/floor/plating/snowed,
/area/awaymission/cabin/caves)
"hQ" = (
/obj/item/reagent_containers/cup/glass/bottle/beer,
/turf/open/floor/plating/snowed,
@@ -3566,6 +3563,32 @@
/obj/effect/decal/remains/human,
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/caves)
"pi" = (
/obj/structure/statue/snow/snowman{
anchored = 1;
name = "Who"
},
/obj/item/clothing/head/helmet/knight/yellow{
armor = list("melee" = 11, "bullet" = 2, "laser" = 1, "energy" = 1, "bomb" = 5, "bio" = 2, "fire" = 0, "acid" = 10);
desc = "A classic metal helmet. The cold has made it unreliable though.";
name = "old medieval helmet";
pixel_y = 7
},
/obj/item/claymore/weak/ceremonial{
desc = "Brought to you by the guys in charge of making replica katana toys!";
force = 1;
layer = 3.01;
name = "replica claymore";
pixel_x = 5;
pixel_y = 8;
throwforce = 2
},
/obj/item/shield/roman/fake{
layer = 3.01;
pixel_x = -7
},
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/snowforest)
"pj" = (
/obj/structure/sign/warning/engine_safety{
desc = "A sign detailing the various safety protocols when working on-site to ensure a safe shift. It seems to particularly focus on how dangerous the sawblade is.";
@@ -3601,11 +3624,14 @@
/obj/structure/flora/tree/pine/style_random,
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/snowforest)
"pM" = (
/obj/machinery/oven,
/obj/item/plate/oven_tray,
/turf/open/floor/iron/cafeteria,
/area/awaymission/cabin)
"pQ" = (
/obj/structure/grille,
/obj/structure/window/reinforced/fulltile{
desc = "Enjoy the view.";
name = "window"
},
/turf/open/floor/plating,
/area/awaymission/cabin/caves/mountain)
"qe" = (
/obj/effect/light_emitter{
name = "outdoor light";
@@ -3639,10 +3665,6 @@
slowdown = 0
},
/area/awaymission/cabin/snowforest)
"qr" = (
/obj/machinery/griddle,
/turf/open/floor/iron/cafeteria,
/area/awaymission/cabin)
"qR" = (
/turf/open/misc/ice/smooth,
/area/awaymission/cabin/snowforest)
@@ -3673,6 +3695,27 @@
/mob/living/simple_animal/pet/penguin/emperor,
/turf/open/misc/ice/smooth,
/area/awaymission/cabin/snowforest)
"rR" = (
/obj/effect/decal/cleanable/blood/old,
/obj/effect/decal/cleanable/glitter/blue{
desc = "It looks like fancy glitter to me.";
name = "icy wind"
},
/obj/item/clothing/head/helmet/skull{
armor = list("melee" = 15, "bullet" = 5, "laser" = 5, "energy" = 2, "bomb" = 10, "bio" = 5, "fire" = 20, "acid" = 20);
desc = "It's not bloody for some reason. Dear god.";
name = "human skull"
},
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/caves)
"so" = (
/obj/effect/turf_decal/tile/blue/fourcorners,
/obj/structure/displaycase{
start_showpiece_type = /obj/item/dice/d6/space;
desc = "Contains an artifact stolen from dice collector before he could enjoy his day."
},
/turf/open/floor/iron/dark,
/area/awaymission/cabin/caves/mountain)
"su" = (
/obj/structure/flora{
desc = "Looks frozen.";
@@ -3686,23 +3729,6 @@
/obj/structure/fluff/fokoff_sign,
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/snowforest)
"sK" = (
/obj/effect/turf_decal/tile/blue/fourcorners,
/obj/item/clothing/shoes/sneakers/brown,
/obj/item/clothing/head/hats/warden/police{
armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 2, "bomb" = 15, "bio" = 0, "fire" = 20, "acid" = 20);
desc = "I am the law!"
},
/obj/structure/closet{
anchored = 1;
name = "uniform closet"
},
/obj/item/clothing/under/rank/security/officer/spacepol{
armor = list("melee" = 2, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "fire" = 10, "acid" = 10);
desc = "Anyone enjoying their time while working in a megacorporation, planetary government, or band of pirates is under the jurisdiction of the fun police."
},
/turf/open/floor/iron/dark,
/area/awaymission/cabin/caves/mountain)
"sY" = (
/obj/effect/turf_decal/tile/blue/fourcorners,
/obj/effect/light_emitter{
@@ -3829,6 +3855,18 @@
},
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/caves)
"vD" = (
/obj/effect/turf_decal/weather/snow,
/obj/item/modular_computer/pda/syndicate{
desc = "A portable microcomputer by Thinktronic Systems, LTD.";
inserted_disk = /obj/item/computer_disk/virus/clown;
name = "soviet tablet"
},
/obj/effect/decal/remains/human{
color = "#72e4fa"
},
/turf/open/floor/iron/dark/snowdin,
/area/awaymission/cabin/caves)
"vG" = (
/obj/effect/decal/cleanable/blood/old,
/obj/item/grenade/chem_grenade/large,
@@ -3851,32 +3889,6 @@
},
/turf/open/misc/ice/smooth,
/area/awaymission/cabin/caves)
"wQ" = (
/obj/structure/statue/snow/snowman{
anchored = 1;
name = "Who"
},
/obj/item/clothing/head/helmet/knight/yellow{
armor = list("melee" = 11, "bullet" = 2, "laser" = 1, "energy" = 1, "bomb" = 5, "bio" = 2, "fire" = 0, "acid" = 10);
desc = "A classic metal helmet. The cold has made it unreliable though.";
name = "old medieval helmet";
pixel_y = 7
},
/obj/item/claymore/weak/ceremonial{
desc = "Brought to you by the guys in charge of making replica katana toys!";
force = 1;
layer = 3.01;
name = "replica claymore";
pixel_x = 5;
pixel_y = 8;
throwforce = 2
},
/obj/item/shield/roman/fake{
layer = 3.01;
pixel_x = -7
},
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/snowforest)
"xa" = (
/obj/item/paper/pamphlet/gateway,
/turf/open/misc/ice/smooth,
@@ -3886,6 +3898,11 @@
/obj/item/food/fishmeat/carp,
/turf/open/misc/ice/smooth,
/area/awaymission/cabin/snowforest)
"xo" = (
/obj/structure/table/wood,
/obj/item/reagent_containers/cup/glass/mug/britcup,
/turf/open/floor/carpet,
/area/awaymission/cabin)
"xs" = (
/mob/living/simple_animal/hostile/tree{
desc = "I am death. I will have my vengeance upon my enemies.";
@@ -3990,6 +4007,15 @@
/obj/effect/turf_decal/tile/blue/fourcorners,
/turf/open/indestructible,
/area/awaymission/cabin/caves/mountain)
"yR" = (
/obj/structure/table/reinforced,
/obj/item/modular_computer/pda/syndicate{
desc = "A portable microcomputer by Thinktronic Systems, LTD.";
inserted_disk = /obj/item/computer_disk/virus/mime;
name = "soviet tablet"
},
/turf/open/floor/plating/snowed/snow_cabin,
/area/awaymission/cabin/snowforest/sovietsurface)
"yY" = (
/obj/vehicle/ridden/atv{
dir = 4
@@ -4139,30 +4165,6 @@
slowdown = 0
},
/area/awaymission/cabin/caves)
"DS" = (
/obj/structure/sink/kitchen/directional/south{
desc = "A sink used for washing one's hands and face. It looks rusty and home-made";
name = "sink"
},
/obj/structure/mop_bucket/janitorialcart,
/obj/item/mop,
/obj/item/reagent_containers/cup/bucket,
/obj/item/clothing/suit/caution,
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plating,
/area/awaymission/cabin)
"EM" = (
/obj/effect/turf_decal/weather/snow,
/obj/item/modular_computer/pda/syndicate{
desc = "A portable microcomputer by Thinktronic Systems, LTD.";
inserted_disk = /obj/item/computer_disk/virus/clown;
name = "soviet tablet"
},
/obj/effect/decal/remains/human{
color = "#72e4fa"
},
/turf/open/floor/iron/dark/snowdin,
/area/awaymission/cabin/caves)
"Fq" = (
/obj/effect/turf_decal/tile/blue/fourcorners,
/obj/structure/sign/poster/official/space_cops{
@@ -4206,15 +4208,6 @@
/obj/structure/light_construct/directional/south,
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/caves)
"Gc" = (
/obj/structure/table/reinforced,
/obj/item/modular_computer/pda/syndicate{
desc = "A portable microcomputer by Thinktronic Systems, LTD.";
inserted_disk = /obj/item/computer_disk/virus/mime;
name = "soviet tablet"
},
/turf/open/floor/plating/snowed/snow_cabin,
/area/awaymission/cabin/snowforest/sovietsurface)
"GN" = (
/obj/effect/decal/remains/human,
/turf/open/misc/asteroid/snow/snow_cabin,
@@ -4270,11 +4263,20 @@
/obj/effect/turf_decal/tile/blue/fourcorners,
/turf/open/indestructible,
/area/awaymission/cabin/caves/mountain)
"IW" = (
"JI" = (
/obj/effect/turf_decal/tile/blue/fourcorners,
/obj/structure/displaycase{
start_showpiece_type = /obj/item/dice/d6/space;
desc = "Contains an artifact stolen from dice collector before he could enjoy his day."
/obj/item/clothing/shoes/sneakers/brown,
/obj/item/clothing/head/hats/warden/police{
armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 2, "bomb" = 15, "bio" = 0, "fire" = 20, "acid" = 20);
desc = "I am the law!"
},
/obj/structure/closet{
anchored = 1;
name = "uniform closet"
},
/obj/item/clothing/under/rank/security/officer/spacepol{
armor = list("melee" = 2, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "fire" = 10, "acid" = 10);
desc = "Anyone enjoying their time while working in a megacorporation, planetary government, or band of pirates is under the jurisdiction of the fun police."
},
/turf/open/floor/iron/dark,
/area/awaymission/cabin/caves/mountain)
@@ -4472,6 +4474,10 @@
},
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/snowforest)
"Oz" = (
/obj/item/candle/infinite,
/turf/open/floor/plating/snowed,
/area/awaymission/cabin/caves)
"OF" = (
/obj/structure/table/wood,
/obj/structure/sign/warning/no_smoking/circle{
@@ -4619,6 +4625,13 @@
},
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/caves)
"RV" = (
/obj/structure/table/wood/fancy,
/obj/item/reagent_containers/cup/glass/bottle/juice/smallcarton{
pixel_y = 4
},
/turf/open/floor/wood,
/area/awaymission/cabin)
"RY" = (
/obj/effect/turf_decal/tile/blue/fourcorners,
/obj/structure/sign/poster/official/do_not_question{
@@ -4838,19 +4851,6 @@
/obj/item/storage/medkit/fire,
/turf/open/floor/iron/white,
/area/awaymission/cabin)
"WH" = (
/obj/effect/decal/cleanable/blood/old,
/obj/effect/decal/cleanable/glitter/blue{
desc = "It looks like fancy glitter to me.";
name = "icy wind"
},
/obj/item/clothing/head/helmet/skull{
armor = list("melee" = 15, "bullet" = 5, "laser" = 5, "energy" = 2, "bomb" = 10, "bio" = 5, "fire" = 20, "acid" = 20);
desc = "It's not bloody for some reason. Dear god.";
name = "human skull"
},
/turf/open/misc/asteroid/snow/snow_cabin,
/area/awaymission/cabin/caves)
"WK" = (
/obj/structure/statue/snow/snowman{
anchored = 1;
@@ -8273,7 +8273,7 @@ cx
cx
td
Xy
sK
JI
cx
co
co
@@ -9809,7 +9809,7 @@ fr
fq
fJ
fN
fT
pQ
Pd
cx
cx
@@ -14173,7 +14173,7 @@ co
co
co
cx
IW
so
td
td
td
@@ -18263,7 +18263,7 @@ mU
mU
mU
mJ
EM
vD
mW
mW
ab
@@ -26652,7 +26652,7 @@ an
an
an
an
DS
aS
hg
aq
ht
@@ -28140,7 +28140,7 @@ ab
jm
Oe
RC
wQ
pi
RC
nE
RC
@@ -29231,7 +29231,7 @@ hb
bU
ev
eu
cK
RV
cD
an
aq
@@ -30001,7 +30001,7 @@ an
an
an
an
dx
bu
an
eo
an
@@ -30515,7 +30515,7 @@ an
bx
bO
cJ
by
cF
cJ
hz
an
@@ -30769,7 +30769,7 @@ hy
aq
eg
an
pM
by
bO
bO
bO
@@ -31030,7 +31030,7 @@ bz
bO
bW
ck
qr
cj
hz
an
aq
@@ -35391,7 +35391,7 @@ ed
hu
an
aY
bc
xo
bg
an
nU
@@ -42380,7 +42380,7 @@ Xa
Xa
Xa
dc
Gc
yR
di
dG
dP
@@ -47873,9 +47873,9 @@ gx
gx
gx
hM
hP
Oz
hQ
hP
Oz
wI
PV
Oe
@@ -48387,9 +48387,9 @@ gx
gx
gx
hM
hP
Oz
hQ
hP
Oz
Rz
PV
PV
@@ -51858,7 +51858,7 @@ Lj
tC
Dw
tC
WH
rR
gx
Oe
gx
@@ -12,6 +12,8 @@
* An example usage is bartender mixed drinks - each reagent gets its own fancy drink sprite
*/
/datum/component/takes_reagent_appearance
/// The type to compare against the glass_style's required_container_type. The parent's type by default.
var/base_container_type
/// Icon file when attached to the item
var/icon_pre_change
/// Icon state when attached to the item
@@ -24,6 +26,7 @@
/datum/component/takes_reagent_appearance/Initialize(
datum/callback/on_icon_changed,
datum/callback/on_icon_reset,
base_container_type,
)
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
@@ -38,6 +41,8 @@
src.on_icon_changed = on_icon_changed
src.on_icon_reset = on_icon_reset
src.base_container_type = base_container_type || parent.type
/datum/component/takes_reagent_appearance/Destroy()
QDEL_NULL(on_icon_changed)
QDEL_NULL(on_icon_reset)
@@ -154,4 +159,4 @@
if(isnull(main_reagent))
return null
return GLOB.glass_style_singletons[parent.type][main_reagent.type]
return GLOB.glass_style_singletons[base_container_type][main_reagent.type]
@@ -111,7 +111,7 @@
/datum/crafting_recipe/smallcarton
name = "Small Carton"
result = /obj/item/reagent_containers/cup/glass/sillycup/smallcarton
result = /obj/item/reagent_containers/cup/glass/bottle/juice/smallcarton
time = 10
reqs = list(/obj/item/stack/sheet/cardboard = 1)
category = CAT_CONTAINERS
@@ -73,7 +73,7 @@ GLOBAL_LIST_INIT(glass_style_singletons, create_glass_styles())
icon = 'icons/obj/drinks/shot_glasses.dmi'
/datum/glass_style/juicebox
required_container_type = /obj/item/reagent_containers/cup/glass/sillycup/smallcarton
required_container_type = /obj/item/reagent_containers/cup/glass/bottle/juice/smallcarton
icon = 'icons/obj/drinks/boxes.dmi'
/// This style changes the "drink type" of the container it's placed it as well, it's like food types
var/drink_type = NONE
@@ -18,9 +18,18 @@
//the screwdriver cocktail can make a drinking glass into the world's worst screwdriver. beautiful.
toolspeed = 25
/// The type to compare to glass_style.required_container type, or null to use class type.
/// This allows subtypes to utilize parent styles.
var/base_container_type = null
/obj/item/reagent_containers/cup/glass/drinkingglass/Initialize(mapload, vol)
. = ..()
AddComponent(/datum/component/takes_reagent_appearance, CALLBACK(src, PROC_REF(on_glass_change)), CALLBACK(src, PROC_REF(on_glass_reset)))
AddComponent( \
/datum/component/takes_reagent_appearance, \
CALLBACK(src, PROC_REF(on_glass_change)), \
CALLBACK(src, PROC_REF(on_glass_reset)), \
base_container_type = base_container_type, \
)
/obj/item/reagent_containers/cup/glass/drinkingglass/on_reagent_change(datum/reagents/holder, ...)
. = ..()
@@ -71,6 +80,13 @@
else
desc = "A shot glass - the universal symbol for bad decisions."
/obj/item/reagent_containers/cup/glass/drinkingglass/filled
base_container_type = /obj/item/reagent_containers/cup/glass/drinkingglass
/obj/item/reagent_containers/cup/glass/drinkingglass/filled/Initialize(mapload, vol)
. = ..()
update_appearance()
/obj/item/reagent_containers/cup/glass/drinkingglass/filled/soda
name = "Soda Water"
list_reagents = list(/datum/reagent/consumable/sodawater = 50)
@@ -366,27 +366,28 @@
icon_state = reagents.total_volume ? "water_cup" : "water_cup_e"
return ..()
/obj/item/reagent_containers/cup/glass/sillycup/smallcarton
/obj/item/reagent_containers/cup/glass/bottle/juice/smallcarton
name = "small carton"
desc = "A small carton, intended for holding drinks."
icon = 'icons/obj/drinks/boxes.dmi'
icon_state = "juicebox"
volume = 15 //I figure if you have to craft these it should at least be slightly better than something you can get for free from a watercooler
volume = 15
drink_type = NONE
/obj/item/reagent_containers/cup/glass/sillycup/smallcarton/Initialize(mapload, vol)
/obj/item/reagent_containers/cup/glass/bottle/juice/smallcarton/Initialize(mapload, vol)
. = ..()
AddComponent(/datum/component/takes_reagent_appearance, CALLBACK(src, PROC_REF(on_box_change)), CALLBACK(src, PROC_REF(on_box_reset)))
/// Having our icon state change changes our food type
/obj/item/reagent_containers/cup/glass/sillycup/smallcarton/proc/on_box_change(datum/glass_style/juicebox/style)
/obj/item/reagent_containers/cup/glass/bottle/juice/smallcarton/proc/on_box_change(datum/glass_style/juicebox/style)
if(!istype(style))
return
drink_type = style.drink_type
/obj/item/reagent_containers/cup/glass/sillycup/smallcarton/proc/on_box_reset()
/obj/item/reagent_containers/cup/glass/bottle/juice/smallcarton/proc/on_box_reset()
drink_type = NONE
/obj/item/reagent_containers/cup/glass/sillycup/smallcarton/smash(atom/target, mob/thrower, ranged = FALSE)
/obj/item/reagent_containers/cup/glass/bottle/juice/smallcarton/smash(atom/target, mob/thrower, ranged = FALSE)
if(bartender_check(target) && ranged)
return
SplashReagents(target, ranged, override_spillable = TRUE)