mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-22 14:44:12 +01:00
00ccf0c6b5
# Conflicts: # .github/CODEOWNERS # .github/workflows/compile_changelogs.yml # .github/workflows/stale.yml # SQL/database_changelog.md # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # code/__DEFINES/atom_hud.dm # code/__DEFINES/inventory.dm # code/__DEFINES/mobs.dm # code/__DEFINES/species_clothing_paths.dm # code/__DEFINES/subsystems.dm # code/__DEFINES/surgery.dm # code/__HELPERS/global_lists.dm # code/_globalvars/lists/maintenance_loot.dm # code/_globalvars/traits/_traits.dm # code/controllers/subsystem/minor_mapping.dm # code/controllers/subsystem/processing/quirks.dm # code/controllers/subsystem/shuttle.dm # code/datums/components/palette.dm # code/datums/components/surgery_initiator.dm # code/datums/diseases/advance/advance.dm # code/datums/hud.dm # code/datums/mood.dm # code/datums/mutations/chameleon.dm # code/datums/quirks/negative_quirks/nyctophobia.dm # code/datums/status_effects/debuffs/debuffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/slime/slime_leech.dm # code/datums/weather/weather.dm # code/game/data_huds.dm # code/game/objects/items.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/frog_statue.dm # code/game/objects/items/rcd/RLD.dm # code/game/objects/items/robot/items/hypo.dm # code/game/objects/items/stacks/medical.dm # code/game/objects/items/stacks/wrap.dm # code/game/objects/items/storage/garment.dm # code/game/objects/items/tools/medical/defib.dm # code/game/objects/items/weaponry.dm # code/game/objects/items/weaponry/melee/misc.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/game/objects/structures/curtains.dm # code/game/objects/structures/dresser.dm # code/game/objects/structures/girders.dm # code/game/objects/structures/maintenance.dm # code/game/objects/structures/mirror.dm # code/modules/admin/greyscale_modify_menu.dm # code/modules/admin/verbs/light_debug.dm # code/modules/antagonists/ashwalker/ashwalker.dm # code/modules/antagonists/heretic/knowledge/starting_lore.dm # code/modules/antagonists/ninja/ninjaDrainAct.dm # code/modules/art/paintings.dm # code/modules/client/preferences.dm # code/modules/client/verbs/ooc.dm # code/modules/clothing/head/wig.dm # code/modules/events/disease_outbreak.dm # code/modules/holodeck/holo_effect.dm # code/modules/jobs/job_types/head_of_security.dm # code/modules/jobs/job_types/security_officer.dm # code/modules/library/skill_learning/generic_skillchips/point.dm # code/modules/mining/lavaland/ash_flora.dm # code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/basic/guardian/guardian.dm # code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm # code/modules/mob/living/carbon/carbon.dm # code/modules/mob/living/carbon/human/human.dm # code/modules/mob/living/carbon/human/human_defines.dm # code/modules/mob/living/carbon/life.dm # code/modules/mob/living/living.dm # code/modules/mob/living/living_defines.dm # code/modules/mob/mob.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mod/mod_control.dm # code/modules/mod/modules/modules_general.dm # code/modules/modular_computers/computers/item/computer_ui.dm # code/modules/paperwork/paper.dm # code/modules/paperwork/paperbin.dm # code/modules/power/lighting/light.dm # code/modules/projectiles/guns/energy/kinetic_accelerator.dm # code/modules/projectiles/projectile.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/food_reagents.dm # code/modules/reagents/chemistry/reagents/other_reagents.dm # code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm # code/modules/research/xenobiology/crossbreeding/_clothing.dm # code/modules/research/xenobiology/crossbreeding/prismatic.dm # code/modules/surgery/advanced/brainwashing.dm # code/modules/surgery/advanced/lobotomy.dm # code/modules/surgery/amputation.dm # code/modules/surgery/blood_filter.dm # code/modules/surgery/bodyparts/_bodyparts.dm # code/modules/surgery/brain_surgery.dm # code/modules/surgery/cavity_implant.dm # code/modules/surgery/coronary_bypass.dm # code/modules/surgery/gastrectomy.dm # code/modules/surgery/healing.dm # code/modules/surgery/limb_augmentation.dm # code/modules/surgery/organ_manipulation.dm # code/modules/surgery/revival.dm # code/modules/surgery/sleeper_protocol.dm # code/modules/surgery/surgery_helpers.dm # code/modules/surgery/surgery_step.dm # code/modules/unit_tests/_unit_tests.dm # code/modules/unit_tests/designs.dm # code/modules/unit_tests/icon_state_worn.dm # code/modules/unit_tests/screenshots/screenshot_antag_icons_cultist.png # code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png # code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png # code/modules/unit_tests/screenshots/screenshot_husk_body.png # code/modules/unit_tests/screenshots/screenshot_husk_body_missing_limbs.png # icons/map_icons/clothing/head/_head.dmi # icons/map_icons/clothing/shoes.dmi # icons/map_icons/items/_item.dmi # icons/mob/huds/hud.dmi # icons/mob/inhands/64x64_lefthand.dmi # icons/mob/inhands/64x64_righthand.dmi # icons/obj/machines/computer.dmi # tgui/packages/tgui/interfaces/OperatingComputer.jsx # tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferences/MainPage.tsx # tgui/packages/tgui/interfaces/PreferencesMenu/types.ts # tgui/packages/tgui/interfaces/SurgeryInitiator.tsx # tools/icon_cutter/check.py
443 lines
16 KiB
Plaintext
443 lines
16 KiB
Plaintext
#define SHOWER_FREEZING "freezing"
|
|
#define SHOWER_FREEZING_TEMP 100
|
|
#define SHOWER_NORMAL "normal"
|
|
#define SHOWER_NORMAL_TEMP 300
|
|
#define SHOWER_BOILING "boiling"
|
|
#define SHOWER_BOILING_TEMP 400
|
|
/// The volume of its internal reagents the shower applies to everything it sprays.
|
|
#define SHOWER_SPRAY_VOLUME 5
|
|
/// How much the volume of the shower's spay reagents are amplified by when it sprays something.
|
|
#define SHOWER_EXPOSURE_MULTIPLIER 2 // Showers effectively double exposed reagents
|
|
/// How long we run in TIMED mode
|
|
#define SHOWER_TIMED_LENGTH (15 SECONDS)
|
|
|
|
/// Run the shower until we run out of reagents.
|
|
#define SHOWER_MODE_UNTIL_EMPTY 0
|
|
/// Run the shower for SHOWER_TIMED_LENGTH time, or until we run out of reagents.
|
|
#define SHOWER_MODE_TIMED 1
|
|
/// Run the shower forever, pausing when we run out of liquid, and then resuming later.
|
|
#define SHOWER_MODE_FOREVER 2
|
|
/// Number of modes to cycle through
|
|
#define SHOWER_MODE_COUNT 3
|
|
|
|
GLOBAL_LIST_INIT(shower_mode_descriptions, list(
|
|
"[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
|
|
name = "shower"
|
|
desc = "The HS-452. Installed in the 2550s by the Nanotrasen Hygiene Division, now with 2560 lead compliance! Passively replenishes itself with water when not in use."
|
|
icon = 'icons/obj/watercloset.dmi'
|
|
icon_state = "shower"
|
|
density = FALSE
|
|
layer = ABOVE_WINDOW_LAYER
|
|
use_power = NO_POWER_USE
|
|
subsystem_type = /datum/controller/subsystem/processing/plumbing
|
|
///Does the user want the shower on or off?
|
|
var/intended_on = FALSE
|
|
///Is the shower actually spitting out water currently
|
|
var/actually_on = FALSE
|
|
///What temperature the shower reagents are set to.
|
|
var/current_temperature = SHOWER_NORMAL
|
|
///What sound will be played on loop when the shower is on and pouring water.
|
|
var/datum/looping_sound/showering/soundloop
|
|
///What reagent should the shower be filled with when initially built.
|
|
var/reagent_id = /datum/reagent/water
|
|
///How much reagent capacity should the shower begin with when built.
|
|
var/reagent_capacity = 200
|
|
///How many units the shower refills every second.
|
|
var/refill_rate = 0.5
|
|
///Does the shower have a water recycler to recollect its water supply?
|
|
var/has_water_reclaimer = TRUE
|
|
///Which mode the shower is operating in.
|
|
var/mode = SHOWER_MODE_UNTIL_EMPTY
|
|
///The cooldown for SHOWER_MODE_TIMED mode.
|
|
COOLDOWN_DECLARE(timed_cooldown)
|
|
///How far to shift the sprite when placing.
|
|
var/pixel_shift = 16
|
|
|
|
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16))
|
|
|
|
/obj/machinery/shower/Initialize(mapload, ndir = 0, has_water_reclaimer = null)
|
|
. = ..()
|
|
|
|
if(ndir)
|
|
dir = ndir
|
|
|
|
if(has_water_reclaimer != null)
|
|
src.has_water_reclaimer = has_water_reclaimer
|
|
|
|
switch(dir)
|
|
if(NORTH)
|
|
pixel_x = 0
|
|
pixel_y = -pixel_shift
|
|
if(SOUTH)
|
|
pixel_x = 0
|
|
pixel_y = pixel_shift
|
|
if(EAST)
|
|
pixel_x = -pixel_shift
|
|
pixel_y = 0
|
|
if(WEST)
|
|
pixel_x = pixel_shift
|
|
pixel_y = 0
|
|
|
|
create_reagents(reagent_capacity)
|
|
if(src.has_water_reclaimer)
|
|
reagents.add_reagent(reagent_id, reagent_capacity)
|
|
soundloop = new(src, FALSE)
|
|
AddComponent(/datum/component/plumbing/simple_demand/extended)
|
|
var/static/list/loc_connections = list(
|
|
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
|
|
COMSIG_ATOM_EXITED = PROC_REF(on_exited),
|
|
)
|
|
AddElement(/datum/element/connect_loc, loc_connections)
|
|
|
|
/obj/machinery/shower/examine(mob/user)
|
|
. = ..()
|
|
. += 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_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()
|
|
QDEL_NULL(soundloop)
|
|
QDEL_NULL(reagents)
|
|
return ..()
|
|
|
|
/obj/machinery/shower/interact(mob/user)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
intended_on = !intended_on
|
|
if(!update_actually_on(intended_on))
|
|
balloon_alert(user, "[src] is dry!")
|
|
return FALSE
|
|
|
|
balloon_alert(user, "turned [intended_on ? "on" : "off"]")
|
|
|
|
return TRUE
|
|
|
|
/obj/machinery/shower/analyzer_act(mob/living/user, obj/item/tool)
|
|
. = ..()
|
|
|
|
tool.play_tool_sound(src)
|
|
to_chat(user, span_notice("The water temperature seems to be [current_temperature]."))
|
|
return TRUE
|
|
|
|
/obj/machinery/shower/plunger_act(obj/item/plunger/attacking_plunger, mob/living/user, reinforced)
|
|
user.balloon_alert_to_viewers("furiously plunging...", "plunging shower...")
|
|
if(!do_after(user, 3 SECONDS, target = src))
|
|
return TRUE
|
|
user.balloon_alert_to_viewers("finished plunging")
|
|
reagents.expose(get_turf(src), TOUCH) //splash on the floor
|
|
reagents.clear_reagents()
|
|
begin_processing()
|
|
return TRUE
|
|
|
|
/obj/machinery/shower/attackby(obj/item/tool, mob/user, list/modifiers, list/attack_modifiers)
|
|
if(istype(tool, /obj/item/stock_parts/water_recycler))
|
|
if(has_water_reclaimer)
|
|
to_chat(user, span_warning("There is already has a water recycler installed."))
|
|
return
|
|
|
|
playsound(src, 'sound/machines/click.ogg', 20, TRUE)
|
|
qdel(tool)
|
|
has_water_reclaimer = TRUE
|
|
begin_processing()
|
|
|
|
return ..()
|
|
|
|
/obj/machinery/shower/multitool_act(mob/living/user, obj/item/tool)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
tool.play_tool_sound(src)
|
|
mode = (mode + 1) % SHOWER_MODE_COUNT
|
|
begin_processing()
|
|
to_chat(user, span_notice("You change the shower's auto shut-off mode to [GLOB.shower_mode_descriptions["[mode]"]]."))
|
|
return TRUE
|
|
|
|
/obj/machinery/shower/crowbar_act(mob/living/user, obj/item/tool)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
if(!has_water_reclaimer)
|
|
to_chat(user, span_warning("There isn't a water recycler to remove."))
|
|
return
|
|
|
|
tool.play_tool_sound(src)
|
|
has_water_reclaimer = FALSE
|
|
new/obj/item/stock_parts/water_recycler(get_turf(loc))
|
|
to_chat(user, span_notice("You remove the water reclaimer from [src]"))
|
|
return TRUE
|
|
|
|
/obj/machinery/shower/screwdriver_act(mob/living/user, obj/item/I)
|
|
..()
|
|
to_chat(user, span_notice("You begin to adjust the temperature valve with \the [I]..."))
|
|
if(I.use_tool(src, user, 50))
|
|
switch(current_temperature)
|
|
if(SHOWER_NORMAL)
|
|
current_temperature = SHOWER_FREEZING
|
|
if(SHOWER_FREEZING)
|
|
current_temperature = SHOWER_BOILING
|
|
if(SHOWER_BOILING)
|
|
current_temperature = SHOWER_NORMAL
|
|
user.visible_message(span_notice("[user] adjusts the shower with \the [I]."), span_notice("You adjust the shower with \the [I] to [current_temperature] temperature."))
|
|
user.log_message("has wrenched a shower to [current_temperature].", LOG_ATTACK)
|
|
add_hiddenprint(user)
|
|
handle_mist()
|
|
return TRUE
|
|
|
|
/obj/machinery/shower/wrench_act(mob/living/user, obj/item/I)
|
|
. = ..()
|
|
I.play_tool_sound(src)
|
|
deconstruct()
|
|
return TRUE
|
|
|
|
/obj/machinery/shower/update_overlays()
|
|
. = ..()
|
|
if(!actually_on)
|
|
return
|
|
var/mutable_appearance/water_falling = mutable_appearance('icons/obj/watercloset.dmi', "water", ABOVE_MOB_LAYER, appearance_flags = KEEP_APART)
|
|
water_falling.color = mix_color_from_reagents(reagents.reagent_list)
|
|
switch(dir)
|
|
if(NORTH)
|
|
water_falling.pixel_y += pixel_shift
|
|
if(SOUTH)
|
|
water_falling.pixel_y -= pixel_shift
|
|
if(EAST)
|
|
water_falling.pixel_x += pixel_shift
|
|
if(WEST)
|
|
water_falling.pixel_x -= pixel_shift
|
|
. += water_falling
|
|
|
|
/obj/machinery/shower/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents)
|
|
if(same_z_layer)
|
|
return ..()
|
|
update_appearance()
|
|
return ..()
|
|
|
|
/obj/machinery/shower/proc/handle_mist()
|
|
// If there is no mist, and the shower was turned on (on a non-freezing temp): make mist in 5 seconds
|
|
// If there was already mist, and the shower was turned off (or made cold): remove the existing mist in 25 sec
|
|
var/obj/effect/mist/mist = locate() in loc
|
|
if(!mist && actually_on && current_temperature != SHOWER_FREEZING)
|
|
addtimer(CALLBACK(src, PROC_REF(make_mist)), 5 SECONDS)
|
|
|
|
if(mist && !(actually_on && current_temperature != SHOWER_FREEZING))
|
|
addtimer(CALLBACK(src, PROC_REF(clear_mist)), 25 SECONDS)
|
|
|
|
/obj/machinery/shower/proc/make_mist()
|
|
var/obj/effect/mist/mist = locate() in loc
|
|
if(!mist && actually_on && current_temperature != SHOWER_FREEZING)
|
|
var/obj/effect/mist/new_mist = new /obj/effect/mist(loc)
|
|
new_mist.color = mix_color_from_reagents(reagents.reagent_list)
|
|
|
|
/obj/machinery/shower/proc/clear_mist()
|
|
var/obj/effect/mist/mist = locate() in loc
|
|
if(mist && !(actually_on && current_temperature != SHOWER_FREEZING))
|
|
qdel(mist)
|
|
|
|
/obj/machinery/shower/proc/on_entered(datum/source, atom/movable/enterer)
|
|
SIGNAL_HANDLER
|
|
|
|
if(actually_on && reagents.total_volume)
|
|
expose_to_reagents(enterer)
|
|
|
|
/obj/machinery/shower/proc/on_exited(datum/source, atom/movable/exiter)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!iscarbon(exiter))
|
|
return
|
|
|
|
var/obj/machinery/shower/locate_new_shower = locate() in get_turf(exiter)
|
|
if(locate_new_shower && isturf(exiter.loc))
|
|
return
|
|
var/mob/living/take_his_status_effect = exiter
|
|
take_his_status_effect.remove_status_effect(/datum/status_effect/washing_regen)
|
|
|
|
/obj/machinery/shower/proc/expose_to_reagents(atom/target)
|
|
var/purity_volume = reagents.total_volume*0.70 // need 70% of total reagents
|
|
var/datum/reagent/blood/bloody_shower = reagents.has_reagent(/datum/reagent/blood, amount=purity_volume)
|
|
var/datum/reagent/water/clean_shower = reagents.has_reagent(/datum/reagent/water, amount=purity_volume)
|
|
// we only care about blood and h20 for mood/status effect
|
|
var/datum/reagent/shower_reagent = bloody_shower || clean_shower || null
|
|
|
|
reagents.expose(target, (TOUCH), SHOWER_EXPOSURE_MULTIPLIER * SHOWER_SPRAY_VOLUME / max(reagents.total_volume, SHOWER_SPRAY_VOLUME))
|
|
if(!isliving(target))
|
|
return
|
|
var/mob/living/living_target = target
|
|
check_heat(living_target)
|
|
|
|
if(iscarbon(living_target))
|
|
living_target.apply_status_effect(/datum/status_effect/washing_regen, shower_reagent)
|
|
living_target.add_mood_event("shower", /datum/mood_event/shower, shower_reagent)
|
|
|
|
/**
|
|
* Toggle whether shower is actually on and outputting water.
|
|
* May not match what user asked to happen by clicking.
|
|
* Returns TRUE if the state was changed.
|
|
*
|
|
* Arguments:
|
|
* * new_on_state - new state
|
|
*/
|
|
/obj/machinery/shower/proc/update_actually_on(new_on_state)
|
|
if(new_on_state == actually_on)
|
|
return FALSE
|
|
|
|
// Check if we have enough reagents to actually turn on.
|
|
if(new_on_state && reagents.total_volume < SHOWER_SPRAY_VOLUME)
|
|
return FALSE
|
|
|
|
actually_on = new_on_state
|
|
|
|
update_appearance()
|
|
handle_mist()
|
|
if(new_on_state)
|
|
begin_processing()
|
|
soundloop.start()
|
|
COOLDOWN_START(src, timed_cooldown, SHOWER_TIMED_LENGTH)
|
|
else
|
|
soundloop.stop()
|
|
if(isopenturf(loc))
|
|
var/turf/open/tile = loc
|
|
tile.MakeSlippery(TURF_WET_WATER, min_wet_time = 5 SECONDS, wet_time_to_add = 1 SECONDS)
|
|
for(var/mob/living/carbon/showerer in loc)
|
|
showerer.remove_status_effect(/datum/status_effect/washing_regen)
|
|
return TRUE
|
|
|
|
/obj/machinery/shower/process(seconds_per_tick)
|
|
// 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.
|
|
// 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)
|
|
update_actually_on(FALSE)
|
|
|
|
// Don't turn back on.
|
|
if(mode != SHOWER_MODE_FOREVER)
|
|
intended_on = FALSE
|
|
else
|
|
// Cycle: update_actually_on() will only change state if appropriate.
|
|
update_actually_on(intended_on)
|
|
|
|
// Reclaim water
|
|
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
|
|
|
|
// FOREVER mode stays processing so it can cycle back on.
|
|
return mode == SHOWER_MODE_FOREVER ? 0 : PROCESS_KILL
|
|
// Assemble cleaning flags
|
|
var/purity_volume = reagents.total_volume*0.70 // need 70% of total reagents
|
|
var/datum/reagent/water/clean_shower = reagents.has_reagent(/datum/reagent/water, amount=purity_volume)
|
|
|
|
// radiation my beloved
|
|
var/rad_purity_volume = reagents.total_volume*0.20 // need 20% of total reagents
|
|
var/radium_volume = reagents.get_reagent_amount(/datum/reagent/uranium/radium)
|
|
var/uranium_volume = reagents.get_reagent_amount(/datum/reagent/uranium)
|
|
var/polonium_volume = reagents.get_reagent_amount(/datum/reagent/toxin/polonium) * 3 // highly radioactive
|
|
var/total_radiation_volume = (radium_volume + uranium_volume + polonium_volume)
|
|
var/radioactive_shower = total_radiation_volume >= rad_purity_volume
|
|
|
|
var/wash_flags = NONE
|
|
if(clean_shower)
|
|
wash_flags |= CLEAN_WASH
|
|
if(!radioactive_shower)
|
|
// note it is possible to have a clean_shower that is radioactive (+70% water mixed with +20% radiation)
|
|
wash_flags |= CLEAN_RAD
|
|
|
|
// Wash up.
|
|
loc.wash(wash_flags, TRUE)
|
|
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)
|
|
// 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)
|
|
if(has_water_reclaimer)
|
|
new /obj/item/stock_parts/water_recycler(drop_location())
|
|
|
|
/obj/machinery/shower/proc/check_heat(mob/living/living)
|
|
|
|
if(current_temperature == SHOWER_FREEZING)
|
|
living.adjust_bodytemperature(-80, 80)
|
|
to_chat(living, span_warning("[src] is freezing!"))
|
|
else if(current_temperature == SHOWER_BOILING)
|
|
living.adjust_bodytemperature(35, 0, 500)
|
|
living.adjust_fire_loss(5)
|
|
to_chat(living, span_danger("[src] is searing!"))
|
|
|
|
|
|
/obj/structure/showerframe
|
|
name = "shower frame"
|
|
icon = 'icons/obj/watercloset.dmi'
|
|
icon_state = "shower_frame"
|
|
desc = "A shower frame, that needs a water recycler to finish construction."
|
|
anchored = FALSE
|
|
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
|
|
|
|
/obj/structure/showerframe/Initialize(mapload)
|
|
. = ..()
|
|
AddElement(/datum/element/simple_rotation)
|
|
|
|
/obj/structure/showerframe/attackby(obj/item/tool, mob/living/user, list/modifiers, list/attack_modifiers)
|
|
if(istype(tool, /obj/item/stock_parts/water_recycler))
|
|
qdel(tool)
|
|
var/obj/machinery/shower/shower = new(loc, REVERSE_DIR(dir), TRUE)
|
|
qdel(src)
|
|
playsound(shower, 'sound/machines/click.ogg', 20, TRUE)
|
|
return
|
|
return ..()
|
|
|
|
/obj/structure/showerframe/wrench_act(mob/living/user, obj/item/tool)
|
|
. = ..()
|
|
|
|
tool.play_tool_sound(src)
|
|
new/obj/machinery/shower(loc, REVERSE_DIR(dir), FALSE)
|
|
qdel(src)
|
|
|
|
return TRUE
|
|
|
|
/obj/effect/mist
|
|
name = "mist"
|
|
icon = 'icons/obj/watercloset.dmi'
|
|
icon_state = "mist"
|
|
layer = FLY_LAYER
|
|
plane = ABOVE_GAME_PLANE
|
|
anchored = TRUE
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
|
|
#undef SHOWER_MODE_UNTIL_EMPTY
|
|
#undef SHOWER_MODE_TIMED
|
|
#undef SHOWER_MODE_FOREVER
|
|
#undef SHOWER_MODE_COUNT
|
|
#undef SHOWER_TIMED_LENGTH
|
|
#undef SHOWER_SPRAY_VOLUME
|
|
#undef SHOWER_EXPOSURE_MULTIPLIER
|
|
#undef SHOWER_BOILING_TEMP
|
|
#undef SHOWER_BOILING
|
|
#undef SHOWER_NORMAL_TEMP
|
|
#undef SHOWER_NORMAL
|
|
#undef SHOWER_FREEZING_TEMP
|
|
#undef SHOWER_FREEZING
|