diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm index 8d2dfdf8426..8751774479b 100644 --- a/code/game/objects/structures/shower.dm +++ b/code/game/objects/structures/shower.dm @@ -21,9 +21,9 @@ #define SHOWER_MODE_COUNT 3 GLOBAL_LIST_INIT(shower_mode_descriptions, list( - "[SHOWER_MODE_UNTIL_EMPTY]" = "run until empty", - "[SHOWER_MODE_TIMED]" = "run for 15 seconds or until empty", - "[SHOWER_MODE_FOREVER]" = "keep running forever and auto turn back on", + "[SHOWER_MODE_UNTIL_EMPTY]" = "run forever from internal tank", // BUBBER EDIT CHANGE - Original: "run until empty" + "[SHOWER_MODE_TIMED]" = "run using auto-detect sensor", // BUBBER EDIT CHANGE - Original: "run for 15 seconds or until empty" + "[SHOWER_MODE_FOREVER]" = "run forever from external source", // BUBBER EDIT CHANGE - Original: "keep running forever and auto turn back on" )) /obj/machinery/shower @@ -96,10 +96,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16)) /obj/machinery/shower/examine(mob/user) . = ..() - . += span_notice("It looks like the thermostat has an adjustment screw.") + . += span_notice("It looks like the thermostat has a pair of buttons and a manual adjustment screw.") // BUBBER EDIT CHANGE - Original: "It looks like the thermostat has an adjustment screw." if(has_water_reclaimer) . += span_notice("A water recycler is installed. It looks like you could pry it out.") - . += span_notice("The auto shut-off is programmed to [GLOB.shower_mode_descriptions["[mode]"]].") + . += span_info("The current shower mode is [span_bold(GLOB.shower_mode_descriptions["[mode]"])].") // BUBBER EDIT CHANGE - Showers have infinite water - Original: "The auto shut-off is programmed to [GLOB.shower_mode_descriptions["[mode]"]]." . += span_notice("[reagents.total_volume]/[reagents.maximum_volume] liquids remaining.") /obj/machinery/shower/Destroy() @@ -121,14 +121,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16)) return TRUE - -//SKYRAT EDIT ADDITION -/obj/machinery/shower/plunger_act(obj/item/plunger/P, mob/living/user, reinforced) - if(do_after(user, 3 SECONDS, src)) - reagents.remove_all(reagents.total_volume) - balloon_alert(user, "reservoir emptied") -//SKYRAT EDIT END - /obj/machinery/shower/analyzer_act(mob/living/user, obj/item/tool) . = ..() @@ -323,7 +315,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16)) // the TIMED mode cutoff feature. User has to manually reactivate. if(intended_on && mode == SHOWER_MODE_TIMED && COOLDOWN_FINISHED(src, timed_cooldown)) // the TIMED mode cutoff feature. User has to manually reactivate. - intended_on = FALSE + // BUBBER EDIT CHANGE BEGIN - Showers have infinite water + // Original: + // intended_on = FALSE + if(!shower_occupied()) + intended_on = FALSE + // BUBBER EDIT CHANGE END - Showers have infinite water // Out of water. if(actually_on && reagents.total_volume < SHOWER_SPRAY_VOLUME) @@ -337,7 +334,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16)) update_actually_on(intended_on) // Reclaim water -//if(!actually_on) BUBBER EDIT CHANGE - Unlimited water for showers + if(!actually_on) if(has_water_reclaimer && reagents.total_volume < reagents.maximum_volume) reagents.add_reagent(reagent_id, refill_rate * seconds_per_tick) return 0 @@ -368,7 +365,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16)) expose_to_reagents(loc) for(var/atom/movable/movable_content as anything in loc) expose_to_reagents(movable_content) // Wash the items on the turf (=expose them to the shower reagent) - reagents.remove_all(SHOWER_SPRAY_VOLUME) + // BUBBER EDIT CHANGE BEGIN - Showers have infinite water + // Original: + // reagents.remove_all(SHOWER_SPRAY_VOLUME) + if(!has_water_reclaimer) + reagents.remove_all(SHOWER_SPRAY_VOLUME) + // BUBBER EDIT CHANGE END - Showers have infinite water /obj/machinery/shower/on_deconstruction(disassembled = TRUE) new /obj/item/stack/sheet/iron(drop_location(), 2) diff --git a/modular_zubbers/code/game/objects/structures/shower.dm b/modular_zubbers/code/game/objects/structures/shower.dm new file mode 100644 index 00000000000..09efa4bbdae --- /dev/null +++ b/modular_zubbers/code/game/objects/structures/shower.dm @@ -0,0 +1,41 @@ +/// Run the shower for SHOWER_TIMED_LENGTH time, or until we run out of reagents. +#define SHOWER_MODE_TIMED 1 +/// How long we run in TIMED mode +#define SHOWER_TIMED_LENGTH (15 SECONDS) +// Temperatures +#define SHOWER_FREEZING "freezing" +#define SHOWER_NORMAL "normal" +#define SHOWER_BOILING "boiling" + +/obj/machinery/shower + mode = SHOWER_MODE_TIMED + +// Restart the shower idle timer if someone is still using it, washing up or otherwise +/obj/machinery/shower/proc/shower_occupied() + for(var/mob/living/carbon/showerer in loc) + COOLDOWN_START(src, timed_cooldown, SHOWER_TIMED_LENGTH) + return TRUE + + return FALSE + +// Adjust the shower temperature, but only to the safe temperatures. You need a screwdriver to get spicy. +/obj/machinery/shower/click_ctrl(mob/user) + switch(current_temperature) + if(SHOWER_NORMAL) + current_temperature = SHOWER_FREEZING + if(SHOWER_FREEZING) + current_temperature = SHOWER_NORMAL + if(SHOWER_BOILING) + current_temperature = SHOWER_NORMAL + balloon_alert(user, "set to [current_temperature]") + user.visible_message(span_notice("[user] adjusts the shower."), span_notice("You adjust the shower temperature to [current_temperature].")) + user.log_message("has wrenched a shower to [current_temperature].", LOG_ATTACK) + add_hiddenprint(user) + handle_mist() + return CLICK_ACTION_SUCCESS + +#undef SHOWER_MODE_TIMED +#undef SHOWER_TIMED_LENGTH +#undef SHOWER_FREEZING +#undef SHOWER_NORMAL +#undef SHOWER_BOILING diff --git a/tgstation.dme b/tgstation.dme index 9247ca3b9fc..e4424006584 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -9086,6 +9086,7 @@ #include "modular_zubbers\code\game\objects\structures\chalkboard.dm" #include "modular_zubbers\code\game\objects\structures\lewd_portals.dm" #include "modular_zubbers\code\game\objects\structures\ore_vent.dm" +#include "modular_zubbers\code\game\objects\structures\shower.dm" #include "modular_zubbers\code\game\objects\structures\spirit_board.dm" #include "modular_zubbers\code\game\objects\structures\tables_racks.dm" #include "modular_zubbers\code\game\objects\structures\trash_pile.dm"