mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Merge remote-tracking branch 'upstream/master' into plumbingfixesrev2
This commit is contained in:
@@ -165,7 +165,7 @@
|
||||
is_editable = TRUE
|
||||
|
||||
/obj/structure/sign/warning/chemdiamond
|
||||
name = "\improper REACTIVE CHEMICALS"
|
||||
name = "\improper REACTIVE CHEMICALS sign"
|
||||
sign_change_name = "Warning - Hazardous Chemicals sign"
|
||||
desc = "A sign that warns of potentially reactive chemicals nearby, be they explosive, flamable, or acidic."
|
||||
icon_state = "chemdiamond"
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
|
||||
busy = FALSE
|
||||
reagents.remove_any(5)
|
||||
reagents.expose(user, TOUCH)
|
||||
reagents.expose(user, TOUCH, 5 / max(reagents.total_volume, 5))
|
||||
|
||||
if(washing_face)
|
||||
SEND_SIGNAL(user, COMSIG_COMPONENT_CLEAN_FACE_ACT, CLEAN_WASH)
|
||||
@@ -389,8 +389,7 @@
|
||||
return 1
|
||||
busy = FALSE
|
||||
O.wash(CLEAN_WASH)
|
||||
O.acid_level = 0
|
||||
reagents.expose(O, TOUCH)
|
||||
reagents.expose(O, TOUCH, 5 / max(reagents.total_volume, 5))
|
||||
user.visible_message("<span class='notice'>[user] washes [O] using [src].</span>", \
|
||||
"<span class='notice'>You wash [O] using [src].</span>")
|
||||
return 1
|
||||
@@ -426,27 +425,6 @@
|
||||
name = "kitchen sink"
|
||||
icon_state = "sink_alt"
|
||||
|
||||
|
||||
/obj/structure/sink/puddle //splishy splashy ^_^
|
||||
name = "puddle"
|
||||
desc = "A puddle used for washing one's hands and face."
|
||||
icon_state = "puddle"
|
||||
resistance_flags = UNACIDABLE
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/sink/puddle/attack_hand(mob/M)
|
||||
icon_state = "puddle-splash"
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O, mob/user, params)
|
||||
icon_state = "puddle-splash"
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/deconstruct(disassembled = TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/sink/greyscale
|
||||
icon_state = "sink_greyscale"
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
|
||||
@@ -480,6 +458,144 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
//Water source, use the type water_source for unlimited water sources like classic sinks.
|
||||
/obj/structure/water_source
|
||||
name = "Water Source"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "sink"
|
||||
desc = "A sink used for washing one's hands and face. This one seems to be infinite!"
|
||||
anchored = TRUE
|
||||
var/busy = FALSE //Something's being washed at the moment
|
||||
var/dispensedreagent = /datum/reagent/water // for whenever plumbing happens
|
||||
|
||||
/obj/structure/water_source/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
|
||||
if(busy)
|
||||
to_chat(user, "<span class='warning'>Someone's already washing here!</span>")
|
||||
return
|
||||
var/selected_area = parse_zone(user.zone_selected)
|
||||
var/washing_face = FALSE
|
||||
if(selected_area in list(BODY_ZONE_HEAD, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_PRECISE_EYES))
|
||||
washing_face = TRUE
|
||||
user.visible_message("<span class='notice'>[user] starts washing [user.p_their()] [washing_face ? "face" : "hands"]...</span>", \
|
||||
"<span class='notice'>You start washing your [washing_face ? "face" : "hands"]...</span>")
|
||||
busy = TRUE
|
||||
|
||||
if(!do_after(user, 4 SECONDS, target = src))
|
||||
busy = FALSE
|
||||
return
|
||||
|
||||
busy = FALSE
|
||||
|
||||
if(washing_face)
|
||||
SEND_SIGNAL(user, COMSIG_COMPONENT_CLEAN_FACE_ACT, CLEAN_WASH)
|
||||
user.drowsyness = max(user.drowsyness - rand(2,3), 0) //Washing your face wakes you up if you're falling asleep
|
||||
else if(ishuman(user))
|
||||
var/mob/living/carbon/human/human_user = user
|
||||
if(!human_user.wash_hands(CLEAN_WASH))
|
||||
to_chat(user, "<span class='warning'>Your hands are covered by something!</span>")
|
||||
return
|
||||
else
|
||||
user.wash(CLEAN_WASH)
|
||||
|
||||
user.visible_message("<span class='notice'>[user] washes [user.p_their()] [washing_face ? "face" : "hands"] using [src].</span>", \
|
||||
"<span class='notice'>You wash your [washing_face ? "face" : "hands"] using [src].</span>")
|
||||
|
||||
/obj/structure/water_source/attackby(obj/item/O, mob/living/user, params)
|
||||
if(busy)
|
||||
to_chat(user, "<span class='warning'>Someone's already washing here!</span>")
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/reagent_containers))
|
||||
var/obj/item/reagent_containers/container = O
|
||||
if(container.is_refillable())
|
||||
if(!container.reagents.holder_full())
|
||||
container.reagents.add_reagent(dispensedreagent, min(container.volume - container.reagents.total_volume, container.amount_per_transfer_from_this))
|
||||
to_chat(user, "<span class='notice'>You fill [container] from [src].</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>\The [container] is full.</span>")
|
||||
return FALSE
|
||||
|
||||
if(istype(O, /obj/item/melee/baton))
|
||||
var/obj/item/melee/baton/baton = O
|
||||
if(baton.cell && baton.cell.charge && baton.turned_on)
|
||||
flick("baton_active", src)
|
||||
user.Paralyze(baton.stun_time)
|
||||
user.stuttering = baton.stun_time * 0.05
|
||||
baton.deductcharge(baton.cell_hit_cost)
|
||||
user.visible_message("<span class='warning'>[user] shocks [user.p_them()]self while attempting to wash the active [baton.name]!</span>", \
|
||||
"<span class='userdanger'>You unwisely attempt to wash [baton] while it's still on.</span>")
|
||||
playsound(src, baton.stun_sound, 50, TRUE)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/mop))
|
||||
O.reagents.add_reagent(dispensedreagent, 5)
|
||||
to_chat(user, "<span class='notice'>You wet [O] in [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, TRUE)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/stack/medical/gauze))
|
||||
var/obj/item/stack/medical/gauze/G = O
|
||||
new /obj/item/reagent_containers/glass/rag(loc)
|
||||
to_chat(user, "<span class='notice'>You tear off a strip of gauze and make a rag.</span>")
|
||||
G.use(1)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/stack/ore/glass))
|
||||
new /obj/item/stack/sheet/sandblock(loc)
|
||||
to_chat(user, "<span class='notice'>You wet the sand and form it into a block.</span>")
|
||||
O.use(1)
|
||||
return
|
||||
|
||||
if(O.item_flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand.
|
||||
return
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
to_chat(user, "<span class='notice'>You start washing [O]...</span>")
|
||||
busy = TRUE
|
||||
if(!do_after(user, 4 SECONDS, target = src))
|
||||
busy = FALSE
|
||||
return TRUE
|
||||
busy = FALSE
|
||||
O.wash(CLEAN_WASH)
|
||||
reagents.expose(O, TOUCH, 5 / max(reagents.total_volume, 5))
|
||||
user.visible_message("<span class='notice'>[user] washes [O] using [src].</span>", \
|
||||
"<span class='notice'>You wash [O] using [src].</span>")
|
||||
return TRUE
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/water_source/puddle //splishy splashy ^_^
|
||||
name = "puddle"
|
||||
desc = "A puddle used for washing one's hands and face."
|
||||
icon_state = "puddle"
|
||||
resistance_flags = UNACIDABLE
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/water_source/puddle/attack_hand(mob/M)
|
||||
icon_state = "puddle-splash"
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/water_source/puddle/attackby(obj/item/O, mob/user, params)
|
||||
icon_state = "puddle-splash"
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/water_source/puddle/deconstruct(disassembled = TRUE)
|
||||
qdel(src)
|
||||
|
||||
//End legacy sink
|
||||
|
||||
|
||||
//Shower Curtains//
|
||||
//Defines used are pre-existing in layers.dm//
|
||||
|
||||
|
||||
Reference in New Issue
Block a user