diff --git a/code/game/objects/random/food.dm b/code/game/objects/random/food.dm index 64a95915110..2150e7136ce 100644 --- a/code/game/objects/random/food.dm +++ b/code/game/objects/random/food.dm @@ -273,3 +273,13 @@ /obj/item/reagent_containers/food/snacks/chocolate_bar/laughterbar = 1, /obj/item/storage/box/fancy/readies ) + +/obj/random/cookingoil + name = "random cooking oil" + desc = "Has a 50% chance of spawning a tank of cooking oil, otherwise nothing." + icon = 'icons/obj/reagent_dispensers.dmi' + icon_state = "oiltank" + spawn_nothing_percentage = 50 + spawnlist = list( + /obj/structure/reagent_dispensers/cookingoil + ) diff --git a/code/modules/cooking/machinery/cooking_machines/fryer.dm b/code/modules/cooking/machinery/cooking_machines/fryer.dm index a26b2d82d25..115bf37a676 100644 --- a/code/modules/cooking/machinery/cooking_machines/fryer.dm +++ b/code/modules/cooking/machinery/cooking_machines/fryer.dm @@ -29,7 +29,7 @@ /obj/item/stock_parts/matter_bin = 2) var/datum/reagents/oil - var/optimal_oil = 9000//90 litres of cooking oil + var/optimal_oil = 100 // 1/10 of a cooking oil tank /obj/structure/machinery/appliance/cooker/fryer/get_examine_text(mob/user, distance, is_adjacent, infix, suffix) . = ..() diff --git a/code/modules/reagents/reagent_containers/welding_backpack.dm b/code/modules/reagents/reagent_containers/welding_backpack.dm index d5395a81518..0ce6de89ade 100644 --- a/code/modules/reagents/reagent_containers/welding_backpack.dm +++ b/code/modules/reagents/reagent_containers/welding_backpack.dm @@ -15,6 +15,16 @@ drop_sound = 'sound/items/drop/backpack.ogg' pickup_sound = 'sound/items/pickup/backpack.ogg' +/obj/item/reagent_containers/weldpack/Initialize(mapload) + var/turf/T = get_turf(src) + if(mapload && T && is_station_level(T.z)) + // If the weldpack is spawned on a station level during map load, don't give it any fuel. + // This is in support of persistent welding fuel tanks and only for the persistent levels. + reagents_to_add = null + create_reagents(volume) // Ensure reagents datum is created, even if empty + update_volume() + . = ..() // After reagents_to_add is updated + /obj/item/reagent_containers/weldpack/feedback_hints(mob/user, distance, is_adjacent) . += ..() if(ishuman(loc) && user != loc) // what if we want to sneak some reagents out of somewhere? @@ -27,6 +37,20 @@ else . += SPAN_WARNING("\The [src] is empty!") +/obj/item/reagent_containers/weldpack/proc/update_volume() + var/fill_level = reagents.total_volume / volume + if(fill_level <= 0.1) + icon_state = "welderpack_low" + item_state = "welderpack_low" + else + icon_state = "welderpack" + item_state = "welderpack" + update_icon() + update_worn_icon() + +/obj/item/reagent_containers/weldpack/on_reagent_change() + update_volume() + /obj/item/reagent_containers/weldpack/attackby(obj/item/attacking_item, mob/user) if(attacking_item.tool_behaviour == TOOL_WRENCH) if(atom_flags & ATOM_FLAG_OPEN_CONTAINER) @@ -60,5 +84,6 @@ reagents.trans_type_to(attacking_item, /singleton/reagent/fuel, min(fuel_volume, T.reagents.maximum_volume - tool_fuel_volume)) to_chat(user, SPAN_NOTICE("Welder refilled!")) playsound(loc, 'sound/effects/refill.ogg', 50, 1, -6) + update_volume() return return ..() diff --git a/html/changelogs/fabiank3-empty-liquid-container.yml b/html/changelogs/fabiank3-empty-liquid-container.yml new file mode 100644 index 00000000000..7b84a0a3a3f --- /dev/null +++ b/html/changelogs/fabiank3-empty-liquid-container.yml @@ -0,0 +1,9 @@ +author: FabianK3 + +delete-after: True + +changes: + - balance: "Welding packs (on the Horizon) now start empty to support persistent welding fuel tanks." + - imageadd: "Added a sprite for empty welding packs." + - balance: "Reduced the 'optimal' oil amount in the deep fryers from 9000u to 100u. One cooking oil tank can now be used multiple times instead of needing 9 tanks to refill it." + - rscadd: "Added a wrench to the kitchen to allow better handling of cooking oil tanks." diff --git a/icons/obj/item/reagent_containers/weldpack.dmi b/icons/obj/item/reagent_containers/weldpack.dmi index a6901e00104..46edef7bdc0 100644 Binary files a/icons/obj/item/reagent_containers/weldpack.dmi and b/icons/obj/item/reagent_containers/weldpack.dmi differ diff --git a/maps/sccv_horizon/sccv_horizon.dmm b/maps/sccv_horizon/sccv_horizon.dmm index 5ffde1d3760..8688a0962e3 100644 --- a/maps/sccv_horizon/sccv_horizon.dmm +++ b/maps/sccv_horizon/sccv_horizon.dmm @@ -59350,6 +59350,7 @@ pixel_x = -2; pixel_y = 5 }, +/obj/item/wrench, /turf/simulated/floor/tiled/dark/full{ temperature = 278 },