diff --git a/code/game/machinery/sink.dm b/code/game/machinery/sink.dm index 1507de23df7..d488b9235d7 100644 --- a/code/game/machinery/sink.dm +++ b/code/game/machinery/sink.dm @@ -5,20 +5,7 @@ desc = "A sink used for washing one's hands and face." anchored = 1 var/busy = 0 //Something's being washed at the moment - var/mode = 0 //0 == fill, 1 == pour - var/obj/machinery/water/binary/fixture/cxn - - New() - ..() - reagents = new(100) - reagents.my_atom = src - spawn(2) - cxn = locate(/obj/machinery/water/binary/fixture) in loc - if(cxn) - cxn.parent = src - - verbs += /obj/machinery/sink/proc/mode_pour attack_hand(mob/M as mob) if(busy) @@ -27,33 +14,18 @@ var/turf/location = M.loc if(!isturf(location)) return - M << "\blue You start washing up." - - // collect water, at least 10u? - var/amt_needed = 25 - reagents.total_volume - if(!cxn || cxn.fill(amt_needed) < amt_needed) - M << "\The [src] barely trickles. Cleaning up with \the [src] is impossible!" - return + usr << "\blue You start washing up." busy = 1 sleep(40) busy = 0 - // react, for if there's something not water - reagents.reaction(M, TOUCH) - - // ok, this is just goop.. - if(reagents.get_reagent_amount("water") < 10) - M << "\red This does not feel... very water-like..." - return - if(M.loc != location) return //Person has moved away from the sink - if(M.blood_DNA) - reagents.add_reagent("blood", 10) // down the sink M.clean_blood() if(istype(M, /mob/living/carbon)) var/mob/living/carbon/C = M + C.clean_blood() /* if(C.r_hand) C.r_hand.clean_blood() // The hand you attack with is empty anyway, the other one should not be washed while doing this. @@ -77,63 +49,22 @@ for(var/mob/V in viewers(src, null)) V.show_message(text("\blue [M] washes up using \the [src].")) - // empty sink - cxn.drain(reagents.total_volume) - - proc/mode_pour() - set name = "Toggle Mode -> Pour" - set category = "Object" - set src in oview(1) - - mode = 1 - verbs -= /obj/machinery/sink/proc/mode_pour - verbs += /obj/machinery/sink/proc/mode_fill - usr << "You will now pour reagents down \the [src]." - - proc/mode_fill() - set name = "Toggle Mode -> Fill" - set category = "Object" - set src in oview(1) - - mode = 0 - verbs -= /obj/machinery/sink/proc/mode_fill - verbs += /obj/machinery/sink/proc/mode_pour - usr << "You will now fill your container from the faucet." attackby(var/obj/item/O as obj, var/mob/user as mob) if(busy) user << "\red Someone's already washing something here." return - // collect water, any water? - var/amt_needed = 10 - reagents.total_volume - if(!cxn || cxn.fill(amt_needed) == 0) - user << "\The [src] barely trickles. Getting water from \the [src] is impossible!" - return - if (istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/food/drinks)) - if(!mode) - // fill - if(O.reagents.total_volume < O.reagents.maximum_volume) - reagents.trans_to(O, reagents.total_volume) - user.visible_message( \ - "\blue [user] fills \the [O] using \the [src].", \ - "\blue You fill \the [O] using \the [src].") - else - user.visible_message( \ - "\blue [user] spills water out of \the overflowing [O] into \the [src].", \ - "\blue You spill water out of \the overflowing [O] into \the [src].") + if(O.reagents.total_volume < O.reagents.maximum_volume) + O:reagents.add_reagent("water", 10) + user.visible_message( \ + "\blue [user] fills the [O] using the [src].", \ + "\blue You fill the [O] using the [src].") else - // pour - if(O.reagents.total_volume > 0) - O.reagents.trans_to(src, O.reagents.total_volume) - user.visible_message( \ - "\blue [user] pours the contents of \the [O] into \the [src].", \ - "\blue You pour the contents of \the [O] into \the [src].") - else - user << "\The [O] is empty." - // empty sink - cxn.drain(reagents.total_volume) + user.visible_message( \ + "\blue [user] spills water out of the overflowing [O] into the [src].", \ + "\blue You spill water out of the overflowing [O] into the [src].") return else if (istype(O, /obj/item/weapon/melee/baton)) var/obj/item/weapon/melee/baton/B = O @@ -150,9 +81,6 @@ user.visible_message( \ "[user] was stunned by his wet [O].", \ "\red You have wet \the [O], it shocks you!") - - // empty sink - cxn.drain(reagents.total_volume) return var/turf/location = user.loc @@ -167,30 +95,23 @@ sleep(40) busy = 0 - reagents.reaction(O, TOUCH) - if(user.loc != location) return //User has moved if(!I) return //Item's been destroyed while washing if(user.get_active_hand() != I) return //Person has switched hands or the item in their hands - if(O.blood_DNA) - reagents.add_reagent("blood", 10) // down the sink O.clean_blood() user.visible_message( \ "\blue [user] washes \a [I] using \the [src].", \ "\blue You wash \a [I] using \the [src].") - // empty sink - cxn.drain(reagents.total_volume) - shower - name = "shower" + name = "Shower" desc = "This is dumb." kitchen - name = "kitchen sink" + name = "Kitchen Sink" icon_state = "sink_alt" kitchen2 - name = "kitchen sink" + name = "Kitchen Sink" icon_state = "sink_alt2" diff --git a/code/game/objects/washing_machine.dm b/code/game/objects/washing_machine.dm index b56198edab9..f4904427c19 100644 --- a/code/game/objects/washing_machine.dm +++ b/code/game/objects/washing_machine.dm @@ -21,16 +21,6 @@ //1 = hacked var/gibs_ready = 0 var/obj/crayon - var/obj/machinery/water/binary/fixture/cxn - - New() - ..() - reagents = new(200) - reagents.my_atom = src - spawn(2) - cxn = locate(/obj/machinery/water/binary/fixture) in loc - if(cxn) - cxn.parent = src /obj/machinery/washing_machine/verb/start() set name = "Start Washing" @@ -41,31 +31,13 @@ usr << "The washing machine cannot run in this state." return - if(!cxn) - usr << "\The [src] makes a grinding sound and stalls." - if( locate(/mob,contents) ) state = 8 else state = 5 update_icon() - - // collect water, fill up - var/amt_needed - do - amt_needed = reagents.maximum_volume/2 - reagents.total_volume - cxn.fill(amt_needed) - sleep(10) - while(amt_needed > 0) - - // now, clean things sleep(200) for(var/atom/A in contents) - reagents.reaction(A, TOUCH) - - if(A.blood_DNA) - reagents.add_reagent("blood", 10) // down the sink - reagents.add_reagent("carbon", 5) A.clean_blood() if(crayon) @@ -170,7 +142,6 @@ gibs_ready = 1 else state = 4 - cxn.drain(reagents.total_volume) update_icon() /obj/machinery/washing_machine/verb/climb_out() diff --git a/code/modules/water/components/binary/fixture.dm b/code/modules/water/components/binary/fixture.dm index 14e0657a37f..f861c33ccf8 100644 --- a/code/modules/water/components/binary/fixture.dm +++ b/code/modules/water/components/binary/fixture.dm @@ -1,15 +1,12 @@ /obj/machinery/water/binary/fixture name = "water fixture connection" icon = 'water_fixtures.dmi' - icon_state = "fixture-f" + icon_state = "fixture" level = 1 layer = 2.9 var/obj/parent - update_icon() - icon_state = "intact[invisibility ? "-f" : "" ]" - hide(var/i) if(level == 1 && istype(loc, /turf/simulated)) invisibility = i ? 101 : 0 @@ -78,7 +75,3 @@ "You hear ratchet.") new /obj/item/water_pipe(loc, make_from=src) del(src) - - visible - icon_state = "fixture" - level = 2 \ No newline at end of file diff --git a/code/modules/water/components/trinary/water_filter.dm b/code/modules/water/components/trinary/water_filter.dm index 669825225ed..52bd0fa4188 100644 --- a/code/modules/water/components/trinary/water_filter.dm +++ b/code/modules/water/components/trinary/water_filter.dm @@ -97,16 +97,9 @@ obj/machinery/water/trinary/filter return 1 - hide(var/i) - if(level == 1 && istype(loc, /turf/simulated)) - invisibility = i ? 101 : 0 - update_icon() - initialize() set_frequency(frequency) ..() - var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) if (!istype(W, /obj/item/weapon/wrench)) diff --git a/code/modules/water/components/water_glass_connector.dm b/code/modules/water/components/water_glass_connector.dm index 64f8fc753c1..6e38ef39052 100644 --- a/code/modules/water/components/water_glass_connector.dm +++ b/code/modules/water/components/water_glass_connector.dm @@ -8,9 +8,8 @@ initialize_directions = SOUTH density = 1 - var/icon_type = "" - var/obj/item/weapon/reagent_containers/glass/connected_device + var/obj/machinery/water/node var/datum/water/pipe_network/network @@ -20,14 +19,14 @@ update_icon() if(node) - icon_state = "[node.level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact[icon_type]" + icon_state = "[node.level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact" dir = get_dir(src, node) else - icon_state = "exposed[icon_type]" + icon_state = "exposed" overlays = new() if(connected_device) - overlays += "inserted[icon_type]" + overlays += "inserted" if(connected_device.reagents.total_volume) var/obj/effect/overlay = new/obj @@ -205,8 +204,4 @@ update_icon() user << "\blue You add \the [W] to \the [src]." else - return ..() - -/obj/machinery/water/glass_connector/wall - icon_state = "intact-w" - icon_type = "-w" \ No newline at end of file + return ..() \ No newline at end of file diff --git a/code/modules/water/components/water_portables_connector.dm b/code/modules/water/components/water_portables_connector.dm index 79a3f05dce2..75372ae8873 100644 --- a/code/modules/water/components/water_portables_connector.dm +++ b/code/modules/water/components/water_portables_connector.dm @@ -32,6 +32,13 @@ return + hide(var/i) //to make the little pipe section invisible, the icon changes. + if(node) + icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact" + dir = get_dir(src, node) + else + icon_state = "exposed" + process() ..() if(!on) diff --git a/icons/obj/water/water_fixtures.dmi b/icons/obj/water/water_fixtures.dmi index c6b47d4fc7d..4bd8e495d42 100644 Binary files a/icons/obj/water/water_fixtures.dmi and b/icons/obj/water/water_fixtures.dmi differ diff --git a/icons/obj/water/water_glass_connector.dmi b/icons/obj/water/water_glass_connector.dmi index 39413ffa09b..cdb5d50131c 100644 Binary files a/icons/obj/water/water_glass_connector.dmi and b/icons/obj/water/water_glass_connector.dmi differ