diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm
index 40f2a34d629..182b05ccb6a 100644
--- a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm
+++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm
@@ -275,7 +275,7 @@
dir = 8
},
/obj/machinery/iv_drip,
-/obj/item/reagent_containers/glass/beaker/waterbottle/large,
+/obj/item/reagent_containers/glass/waterbottle/large,
/turf/open/floor/plating/asteroid/basalt/lava_land_surface,
/area/ruin/unpowered/ash_walkers)
"aR" = (
diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm
index d0002f10889..f42a27c9725 100644
--- a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm
+++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm
@@ -1421,21 +1421,21 @@
"ft" = (
/obj/effect/turf_decal/box/white/corners,
/obj/structure/closet/crate,
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = -3;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = -3;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large,
-/obj/item/reagent_containers/glass/beaker/waterbottle/large,
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large,
+/obj/item/reagent_containers/glass/waterbottle/large,
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 3;
pixel_y = -3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 3;
pixel_y = -3
},
diff --git a/_maps/RandomRuins/SpaceRuins/deepstorage.dmm b/_maps/RandomRuins/SpaceRuins/deepstorage.dmm
index 23d1cb09257..8f4d402bd17 100644
--- a/_maps/RandomRuins/SpaceRuins/deepstorage.dmm
+++ b/_maps/RandomRuins/SpaceRuins/deepstorage.dmm
@@ -1003,25 +1003,25 @@
/obj/structure/closet/crate{
name = "food crate"
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = -5;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 2;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = -2
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 5
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 1;
pixel_y = -3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 8;
pixel_y = -3
},
diff --git a/_maps/shuttles/ruin_caravan_victim.dmm b/_maps/shuttles/ruin_caravan_victim.dmm
index 3ecf42d86af..63ef397c9fb 100644
--- a/_maps/shuttles/ruin_caravan_victim.dmm
+++ b/_maps/shuttles/ruin_caravan_victim.dmm
@@ -140,12 +140,12 @@
pixel_x = 3;
pixel_y = -3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle{
+/obj/item/reagent_containers/glass/waterbottle{
pixel_x = -3;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle,
-/obj/item/reagent_containers/glass/beaker/waterbottle{
+/obj/item/reagent_containers/glass/waterbottle,
+/obj/item/reagent_containers/glass/waterbottle{
pixel_x = 3;
pixel_y = -3
},
diff --git a/_maps/shuttles/whiteship_box.dmm b/_maps/shuttles/whiteship_box.dmm
index 92aa8cc6b42..18053265f39 100644
--- a/_maps/shuttles/whiteship_box.dmm
+++ b/_maps/shuttles/whiteship_box.dmm
@@ -336,12 +336,12 @@
locked = 0;
name = "fridge"
},
-/obj/item/reagent_containers/glass/beaker/waterbottle{
+/obj/item/reagent_containers/glass/waterbottle{
pixel_x = -3;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle,
-/obj/item/reagent_containers/glass/beaker/waterbottle{
+/obj/item/reagent_containers/glass/waterbottle,
+/obj/item/reagent_containers/glass/waterbottle{
pixel_x = 3;
pixel_y = -3
},
@@ -529,25 +529,25 @@
/obj/structure/closet/crate{
name = "food crate"
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = -5;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 2;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = -2
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 5
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 1;
pixel_y = -3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 8;
pixel_y = -3
},
diff --git a/_maps/shuttles/whiteship_delta.dmm b/_maps/shuttles/whiteship_delta.dmm
index 57243650ffa..30b073d52e9 100644
--- a/_maps/shuttles/whiteship_delta.dmm
+++ b/_maps/shuttles/whiteship_delta.dmm
@@ -201,21 +201,21 @@
/obj/effect/decal/cleanable/dirt/dust,
/obj/effect/turf_decal/bot_white,
/obj/structure/closet/crate,
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = -3;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large,
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large,
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 3;
pixel_y = -3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle{
+/obj/item/reagent_containers/glass/waterbottle{
pixel_x = -3;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle,
-/obj/item/reagent_containers/glass/beaker/waterbottle{
+/obj/item/reagent_containers/glass/waterbottle,
+/obj/item/reagent_containers/glass/waterbottle{
pixel_x = 3;
pixel_y = -3
},
diff --git a/_maps/shuttles/whiteship_meta.dmm b/_maps/shuttles/whiteship_meta.dmm
index b3c80d1e95d..7ff4ad5f94f 100644
--- a/_maps/shuttles/whiteship_meta.dmm
+++ b/_maps/shuttles/whiteship_meta.dmm
@@ -295,25 +295,25 @@
/obj/structure/closet/crate{
name = "food crate"
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = -5;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 2;
pixel_y = 3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = -2
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 5
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 1;
pixel_y = -3
},
-/obj/item/reagent_containers/glass/beaker/waterbottle/large{
+/obj/item/reagent_containers/glass/waterbottle/large{
pixel_x = 8;
pixel_y = -3
},
diff --git a/code/datums/mood_events/generic_positive_events.dm b/code/datums/mood_events/generic_positive_events.dm
index a1abe4bd92f..17bad400d17 100644
--- a/code/datums/mood_events/generic_positive_events.dm
+++ b/code/datums/mood_events/generic_positive_events.dm
@@ -153,6 +153,11 @@
mood_change = 3
timeout = 5 MINUTES
+/datum/mood_event/bottle_flip
+ description = "The bottle landing like that was satisfying.\n"
+ mood_change = 2
+ timeout = 3 MINUTES
+
/datum/mood_event/area
description = "" //Fill this out in the area
mood_change = 0
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 1434e2ee97f..6dee7411852 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -657,8 +657,8 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
GLOBAL_LIST_INIT(plastic_recipes, list(
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = TRUE, on_floor = TRUE, time = 40), \
- new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/glass/beaker/waterbottle/empty), \
- new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/glass/beaker/waterbottle/large/empty,3), \
+ new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/glass/waterbottle/empty), \
+ new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/glass/waterbottle/large/empty,3), \
new /datum/stack_recipe("wet floor sign", /obj/item/clothing/suit/caution, 2)))
/obj/item/stack/sheet/plastic
diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm
index 34e3579237a..e5227e28cc4 100644
--- a/code/game/objects/items/tanks/watertank.dm
+++ b/code/game/objects/items/tanks/watertank.dm
@@ -342,6 +342,8 @@
reagent_flags = OPENCONTAINER
spillable = FALSE
possible_transfer_amounts = list(5,10,15)
+ fill_icon_thresholds = list(0, 15, 60)
+ fill_icon_state = "backpack"
/obj/item/reagent_containers/chemtank/ui_action_click()
toggle_injection()
@@ -363,24 +365,6 @@
turn_on()
//Todo : cache these.
-/obj/item/reagent_containers/chemtank/proc/update_filling()
- cut_overlays()
-
- if(reagents.total_volume)
- var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "backpack-10")
-
- var/percent = round((reagents.total_volume / volume) * 100)
- switch(percent)
- if(0 to 15)
- filling.icon_state = "backpack-10"
- if(16 to 60)
- filling.icon_state = "backpack50"
- if(61 to INFINITY)
- filling.icon_state = "backpack100"
-
- filling.color = mix_color_from_reagents(reagents.reagent_list)
- add_overlay(filling)
-
/obj/item/reagent_containers/chemtank/worn_overlays(var/isinhands = FALSE) //apply chemcolor and level
. = list()
//inhands + reagent_filling
@@ -426,7 +410,7 @@
var/used_amount = injection_amount/usage_ratio
reagents.reaction(user, INJECT,injection_amount,0)
reagents.trans_to(user,used_amount,multiplier=usage_ratio)
- update_filling()
+ update_icon()
user.update_inv_back() //for overlays update
//Operator backpack spray
diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm
index 4843f8d34f8..feacd4713e4 100644
--- a/code/modules/food_and_drinks/food/condiment.dm
+++ b/code/modules/food_and_drinks/food/condiment.dm
@@ -34,6 +34,7 @@
)
var/originalname = "condiment" //Can't use initial(name) for this. This stores the name set by condimasters.
var/icon_empty = ""
+ fill_icon_thresholds = list(0, 10, 25, 50, 75, 100)
/obj/item/reagent_containers/food/condiment/Initialize()
. = ..()
@@ -52,32 +53,16 @@
icon_empty = possible_states[main_reagent]["icon_empty"]
name = possible_states[main_reagent]["name"]
desc = possible_states[main_reagent]["desc"]
+ return ..(TRUE) // Don't fill normally
else
name = "condiment bottle"
desc = "Just your average condiment bottle."
icon_state = "emptycondiment"
- var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]-10")
-
- var/percent = round((reagents.total_volume / volume) * 100)
- switch(percent)
- if(0 to 24)
- filling.icon_state = "[icon_state]-10"
- if(25 to 49)
- filling.icon_state = "[icon_state]25"
- if(50 to 74)
- filling.icon_state = "[icon_state]50"
- if(75 to 99)
- filling.icon_state = "[icon_state]75"
- if(100 to INFINITY)
- filling.icon_state = "[icon_state]100"
-
- filling.color = mix_color_from_reagents(reagents.reagent_list)
- add_overlay(filling)
else if(icon_empty)
icon_state = icon_empty
- ..()
+ . = ..()
/obj/item/reagent_containers/food/condiment/suicide_act(mob/living/carbon/user)
user.visible_message("[user] is trying to eat the entire [src]! It looks like [user.p_they()] forgot how food works!")
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index 6eab9be3b0c..2fdc45476d2 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -13,7 +13,7 @@
desc = "It's watching you suspiciously."
/obj/structure/closet/crate/necropolis/tendril/PopulateContents()
- var/loot = rand(1,28)
+ var/loot = rand(1,29)
switch(loot)
if(1)
new /obj/item/shared_storage/red(src)
@@ -79,6 +79,8 @@
new /obj/item/bedsheet/cult(src)
if(28)
new /obj/item/clothing/neck/necklace/memento_mori(src)
+ if(29)
+ new /obj/item/reagent_containers/glass/waterbottle/relic(src)
//KA modkit design discs
/obj/item/disk/design_disk/modkit_disc
@@ -325,6 +327,11 @@
if(!isnull(lighting_alpha))
user.lighting_alpha = min(user.lighting_alpha, lighting_alpha)
+// Relic water bottle
+/obj/item/reagent_containers/glass/waterbottle/relic
+ desc = "A bottle of water filled at an old Earth bottling facility. It seems to be radiating some kind of energy."
+ flip_chance = 100 // FLIPP
+
//Red/Blue Cubes
/obj/item/warp_cube
name = "blue cube"
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index cfc0dd3a80d..59624a4d46a 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -12,6 +12,8 @@
var/spawned_disease = null
var/disease_amount = 20
var/spillable = FALSE
+ var/list/fill_icon_thresholds = null
+ var/fill_icon_state = null // Optional custom name for reagent fill icon_state prefix
/obj/item/reagent_containers/Initialize(mapload, vol)
. = ..()
@@ -121,3 +123,27 @@
/obj/item/reagent_containers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
reagents.expose_temperature(exposed_temperature)
+
+/obj/item/reagent_containers/on_reagent_change(changetype)
+ update_icon()
+
+/obj/item/reagent_containers/update_icon(dont_fill=FALSE)
+ if(!fill_icon_thresholds || dont_fill)
+ return ..()
+
+ cut_overlays()
+
+ if(reagents.total_volume)
+ var/fill_name = fill_icon_state? fill_icon_state : icon_state
+ var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[fill_name][fill_icon_thresholds[1]]")
+
+ var/percent = round((reagents.total_volume / volume) * 100)
+ for(var/i in 1 to fill_icon_thresholds.len)
+ var/threshold = fill_icon_thresholds[i]
+ var/threshold_end = (i == fill_icon_thresholds.len)? INFINITY : fill_icon_thresholds[i+1]
+ if(threshold <= percent && percent < threshold_end)
+ filling.icon_state = "[fill_name][fill_icon_thresholds[i]]"
+
+ filling.color = mix_color_from_reagents(reagents.reagent_list)
+ add_overlay(filling)
+ . = ..()
diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm
index 2aea9a27ef3..fd87ab82d5a 100644
--- a/code/modules/reagents/reagent_containers/blood_pack.dm
+++ b/code/modules/reagents/reagent_containers/blood_pack.dm
@@ -7,6 +7,7 @@
var/blood_type = null
var/unique_blood = null
var/labelled = 0
+ fill_icon_thresholds = list(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
/obj/item/reagent_containers/blood/Initialize()
. = ..()
@@ -31,16 +32,6 @@
else
name = "blood pack"
-/obj/item/reagent_containers/blood/update_icon()
- cut_overlays()
-
- var/v = min(round(reagents.total_volume / volume * 10), 10)
- if(v > 0)
- var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "bloodpack1")
- filling.icon_state = "bloodpack[v]"
- filling.color = mix_color_from_reagents(reagents.reagent_list)
- add_overlay(filling)
-
/obj/item/reagent_containers/blood/random
icon_state = "random_bloodpack"
@@ -94,4 +85,4 @@
labelled = 0
update_pack_name()
else
- return ..()
\ No newline at end of file
+ return ..()
diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm
index 50e9710a76f..6c16a5d2cba 100644
--- a/code/modules/reagents/reagent_containers/bottle.dm
+++ b/code/modules/reagents/reagent_containers/bottle.dm
@@ -7,7 +7,7 @@
item_state = "atoxinbottle"
possible_transfer_amounts = list(5,10,15,25,30)
volume = 30
-
+ fill_icon_thresholds = list(0, 10, 30, 50, 70)
/obj/item/reagent_containers/glass/bottle/Initialize()
. = ..()
@@ -15,32 +15,6 @@
icon_state = "bottle"
update_icon()
-/obj/item/reagent_containers/glass/bottle/on_reagent_change(changetype)
- update_icon()
-
-/obj/item/reagent_containers/glass/bottle/update_icon()
- cut_overlays()
- if(reagents.total_volume)
- var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]-10")
-
- var/percent = round((reagents.total_volume / volume) * 100)
- switch(percent)
- if(0 to 9)
- filling.icon_state = "[icon_state]-10"
- if(10 to 29)
- filling.icon_state = "[icon_state]25"
- if(30 to 49)
- filling.icon_state = "[icon_state]50"
- if(50 to 69)
- filling.icon_state = "[icon_state]75"
- if(70 to INFINITY)
- filling.icon_state = "[icon_state]100"
-
- filling.color = mix_color_from_reagents(reagents.reagent_list)
- add_overlay(filling)
- . = ..()
-
-
/obj/item/reagent_containers/glass/bottle/epinephrine
name = "epinephrine bottle"
desc = "A small bottle. Contains epinephrine - used to stabilize patients."
diff --git a/code/modules/reagents/reagent_containers/chem_pack.dm b/code/modules/reagents/reagent_containers/chem_pack.dm
index e8a4c84317b..ddd0813445b 100644
--- a/code/modules/reagents/reagent_containers/chem_pack.dm
+++ b/code/modules/reagents/reagent_containers/chem_pack.dm
@@ -9,19 +9,7 @@
obj_flags = UNIQUE_RENAME
resistance_flags = ACID_PROOF
var/sealed = FALSE
-
-/obj/item/reagent_containers/chem_pack/on_reagent_change(changetype)
- update_icon()
-
-/obj/item/reagent_containers/chem_pack/update_icon()
- cut_overlays()
-
- var/v = min(round(reagents.total_volume / volume * 10), 10)
- if(v > 0)
- var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "chempack1")
- filling.icon_state = "chempack[v]"
- filling.color = mix_color_from_reagents(reagents.reagent_list)
- add_overlay(filling)
+ fill_icon_thresholds = list(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
/obj/item/reagent_containers/chem_pack/AltClick(mob/living/user)
if(user.canUseTopic(src, BE_CLOSE, NO_DEXTERY) && !sealed)
@@ -48,4 +36,4 @@
obj/item/reagent_containers/chem_pack/attack_self(mob/user)
if(sealed)
return
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm
index 2feadf7d4ab..07f321125e9 100644
--- a/code/modules/reagents/reagent_containers/dropper.dm
+++ b/code/modules/reagents/reagent_containers/dropper.dm
@@ -87,3 +87,4 @@
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "dropper")
filling.color = mix_color_from_reagents(reagents.reagent_list)
add_overlay(filling)
+ . = ..(TRUE)
diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm
index 52d69f05736..390efb78498 100755
--- a/code/modules/reagents/reagent_containers/glass.dm
+++ b/code/modules/reagents/reagent_containers/glass.dm
@@ -116,6 +116,7 @@
icon_state = "beaker"
item_state = "beaker"
custom_materials = list(/datum/material/glass=500)
+ fill_icon_thresholds = list(0, 10, 25, 50, 75, 80, 90)
/obj/item/reagent_containers/glass/beaker/Initialize()
. = ..()
@@ -124,36 +125,6 @@
/obj/item/reagent_containers/glass/beaker/get_part_rating()
return reagents.maximum_volume
-/obj/item/reagent_containers/glass/beaker/on_reagent_change(changetype)
- update_icon()
-
-/obj/item/reagent_containers/glass/beaker/update_icon()
- cut_overlays()
-
- if(reagents.total_volume)
- var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]10")
-
- var/percent = round((reagents.total_volume / volume) * 100)
- switch(percent)
- if(0 to 9)
- filling.icon_state = "[icon_state]-10"
- if(10 to 24)
- filling.icon_state = "[icon_state]10"
- if(25 to 49)
- filling.icon_state = "[icon_state]25"
- if(50 to 74)
- filling.icon_state = "[icon_state]50"
- if(75 to 79)
- filling.icon_state = "[icon_state]75"
- if(80 to 90)
- filling.icon_state = "[icon_state]80"
- if(91 to INFINITY)
- filling.icon_state = "[icon_state]100"
-
- filling.color = mix_color_from_reagents(reagents.reagent_list)
- add_overlay(filling)
- . = ..()
-
/obj/item/reagent_containers/glass/beaker/jar
name = "honey jar"
desc = "A jar for honey. It can hold up to 50 units of sweet delight."
@@ -316,7 +287,7 @@
return
return ..()
-/obj/item/reagent_containers/glass/beaker/waterbottle
+/obj/item/reagent_containers/glass/waterbottle
name = "bottle of water"
desc = "A bottle of water filled at an old Earth bottling facility."
icon = 'icons/obj/drinks.dmi'
@@ -326,20 +297,112 @@
custom_materials = list(/datum/material/glass=0)
volume = 50
amount_per_transfer_from_this = 10
+ fill_icon_thresholds = list(0, 10, 25, 50, 75, 80, 90)
-/obj/item/reagent_containers/glass/beaker/waterbottle/empty
+ // The 2 bottles have separate cap overlay icons because if the bottle falls over while bottle flipping the cap stays fucked on the moved overlay
+ var/cap_icon_state = "bottle_cap_small"
+ var/cap_on = TRUE
+ var/cap_lost = FALSE
+ var/mutable_appearance/cap_overlay
+ var/flip_chance = 10
+
+/obj/item/reagent_containers/glass/waterbottle/Initialize()
+ . = ..()
+ cap_overlay = mutable_appearance(icon, cap_icon_state)
+ if(cap_on)
+ spillable = FALSE
+ add_overlay(cap_overlay, TRUE)
+
+/obj/item/reagent_containers/glass/waterbottle/examine(mob/user)
+ . = ..()
+ if(cap_lost)
+ . += "The cap seems to be missing."
+ else if(cap_on)
+ . += "The cap is firmly on to prevent spilling. Alt-click to remove the cap."
+ else
+ . += "The cap has been taken off. Alt-click to put a cap on."
+
+/obj/item/reagent_containers/glass/waterbottle/AltClick(mob/user)
+ . = ..()
+ if(cap_lost)
+ to_chat(user, "The cap seems to be missing! Where did it go?")
+ return
+
+ var/fumbled = HAS_TRAIT(user, TRAIT_CLUMSY) && prob(5)
+ if(cap_on || fumbled)
+ cap_on = FALSE
+ spillable = TRUE
+ cut_overlay(cap_overlay, TRUE)
+ animate(src, transform = null, time = 2, loop = 0)
+ if(fumbled)
+ to_chat(user, "You fumble with [src]'s cap! The cap falls onto the ground and simply vanishes. Where the hell did it go?")
+ cap_lost = TRUE
+ else
+ to_chat(user, "You remove the cap from [src].")
+ else
+ cap_on = TRUE
+ spillable = FALSE
+ add_overlay(cap_overlay, TRUE)
+ to_chat(user, "You put the cap on [src].")
+ update_icon()
+
+/obj/item/reagent_containers/glass/waterbottle/is_refillable()
+ if(cap_on)
+ return FALSE
+ . = ..()
+
+/obj/item/reagent_containers/glass/waterbottle/is_drainable()
+ if(cap_on)
+ return FALSE
+ . = ..()
+
+/obj/item/reagent_containers/glass/waterbottle/attack(mob/M, mob/user, obj/target)
+ if(cap_on && reagents.total_volume && istype(M))
+ to_chat(user, "You must remove the cap before you can do that!")
+ return
+ . = ..()
+
+/obj/item/reagent_containers/glass/waterbottle/afterattack(obj/target, mob/user, proximity)
+ if(cap_on && (target.is_refillable() || target.is_drainable() || (reagents.total_volume && user.a_intent == INTENT_HARM)))
+ to_chat(user, "You must remove the cap before you can do that!")
+ return
+
+ else if(istype(target, /obj/item/reagent_containers/glass/waterbottle))
+ var/obj/item/reagent_containers/glass/waterbottle/WB = target
+ if(WB.cap_on)
+ to_chat(user, "[WB] has a cap firmly twisted on!")
+ . = ..()
+
+// heehoo bottle flipping
+/obj/item/reagent_containers/glass/waterbottle/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
+ . = ..()
+ if(cap_on && reagents.total_volume)
+ if(prob(flip_chance)) // landed upright
+ src.visible_message("[src] lands upright!")
+ SEND_SIGNAL(throwingdatum.thrower, COMSIG_ADD_MOOD_EVENT, "bottle_flip", /datum/mood_event/bottle_flip)
+ else // landed on it's side
+ animate(src, transform = matrix(prob(50)? 90 : -90, MATRIX_ROTATE), time = 3, loop = 0)
+
+/obj/item/reagent_containers/glass/waterbottle/pickup(mob/user)
+ . = ..()
+ animate(src, transform = null, time = 1, loop = 0)
+
+/obj/item/reagent_containers/glass/waterbottle/empty
list_reagents = list()
+ cap_on = FALSE
-/obj/item/reagent_containers/glass/beaker/waterbottle/large
+/obj/item/reagent_containers/glass/waterbottle/large
desc = "A fresh commercial-sized bottle of water."
icon_state = "largebottle"
custom_materials = list(/datum/material/glass=0)
list_reagents = list(/datum/reagent/water = 100)
volume = 100
amount_per_transfer_from_this = 20
+ cap_icon_state = "bottle_cap"
-/obj/item/reagent_containers/glass/beaker/waterbottle/large/empty
+/obj/item/reagent_containers/glass/waterbottle/large/empty
list_reagents = list()
+ cap_on = FALSE
/obj/item/pestle
name = "pestle"
diff --git a/code/modules/vending/cola.dm b/code/modules/vending/cola.dm
index 5c40adb01fb..04e6e276e0c 100644
--- a/code/modules/vending/cola.dm
+++ b/code/modules/vending/cola.dm
@@ -12,7 +12,7 @@
/obj/item/reagent_containers/food/drinks/soda_cans/space_up = 10,
/obj/item/reagent_containers/food/drinks/soda_cans/pwr_game = 10,
/obj/item/reagent_containers/food/drinks/soda_cans/lemon_lime = 10,
- /obj/item/reagent_containers/glass/beaker/waterbottle = 10)
+ /obj/item/reagent_containers/glass/waterbottle = 10)
contraband = list(/obj/item/reagent_containers/food/drinks/soda_cans/thirteenloko = 6,
/obj/item/reagent_containers/food/drinks/soda_cans/shamblers = 6)
premium = list(/obj/item/reagent_containers/food/drinks/drinkingglass/filled/nuka_cola = 1,
diff --git a/icons/obj/drinks.dmi b/icons/obj/drinks.dmi
index 297eff6ac0e..47a78c8b410 100644
Binary files a/icons/obj/drinks.dmi and b/icons/obj/drinks.dmi differ
diff --git a/icons/obj/reagentfillings.dmi b/icons/obj/reagentfillings.dmi
index b08b3ac42c9..7a1993c0129 100644
Binary files a/icons/obj/reagentfillings.dmi and b/icons/obj/reagentfillings.dmi differ