TG: Moved sinks into watercloset.dm, removed sink.dm

Sink path has changed- /obj/machinery/sink to /obj/structure/sink
/obj/machinery/sink/kitchen2 to /obj/structure/sink/kitchen
Sinks have been slightly updated, if you're wearing gloves, your hands will stay
bloody underneath. Nothing drastic.

Added Cheri's puddles.

Updated showers, they actually clean now. They're pretty powerful, so I'm going
to add a way to make them lethal, to ensure the washing machines still get some
use.

Updated hydroponics trays, to make them work better with soil.

And a couple of map fixes, for toilets that were facing the wrong way in the
prison and on the mining asteroid.
Revision: r3603
Author: 	 petethegoat
This commit is contained in:
Erthilo
2012-05-19 01:08:56 +01:00
parent a7ad44c9be
commit 7283b862df
4 changed files with 210 additions and 26 deletions
+15 -15
View File
@@ -1,5 +1,5 @@
/obj/machinery/hydroponics
name = "Hydroponics Tray"
name = "hydroponics tray"
icon = 'hydroponics.dmi'
icon_state = "hydrotray3"
density = 1
@@ -404,7 +404,7 @@ obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent in
src.updateicon()
src.visible_message("\red The mutated weeds in [src] spawned a \blue [src.myseed.plantname]!")
else
usr << "The few weeds in the tray seem to react, but only for a moment..."
usr << "The few weeds in the [src] seem to react, but only for a moment..."
return
@@ -441,7 +441,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
O.reagents.remove_reagent("water", b_amount)
src.waterlevel += b_amount
playsound(src.loc, 'slosh.ogg', 25, 1)
user << "You fill the tray with [b_amount] units of water."
user << "You fill the [src] with [b_amount] units of water."
// Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
src.toxic -= round(b_amount/4)
@@ -449,7 +449,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
src.toxic = 0
else if(src.waterlevel >= 100)
user << "\red The hydroponics tray is already full."
user << "\red The [src] is already full."
else
user << "\red The bucket is not filled with water."
src.updateicon()
@@ -460,7 +460,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
src.nutrilevel = 10
src.yieldmod = myNut.yieldmod
src.mutmod = myNut.mutmod
user << "You replace the nutrient solution in the tray"
user << "You replace the nutrient solution in the [src]."
del(O)
src.updateicon()
@@ -661,7 +661,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
src.updateicon()
else
user << "\red The tray already has seeds in it!"
user << "\red The [src] already has seeds in it!"
else if (istype(O, /obj/item/device/analyzer/plant_analyzer))
if(src.planted && src.myseed)
@@ -709,7 +709,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
else if (istype(O, /obj/item/weapon/minihoe)) // The minihoe
//var/deweeding
if(src.weedlevel > 0)
user.visible_message("\red [user] starts uprooting the weeds.", "\red You remove the weeds from the tray.")
user.visible_message("\red [user] starts uprooting the weeds.", "\red You remove the weeds from the [src].")
src.weedlevel = 0
else
user << "\red This plot is completely devoid of weeds. It doesn't need uprooting."
@@ -723,7 +723,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
src.weedlevel = 0
if (src.toxic > 100 ) // Make sure it won't go overoboard
src.toxic = 100
user << "You apply the weedkiller solution into the tray"
user << "You apply the weedkiller solution into the [src]."
playsound(src.loc, 'spray3.ogg', 50, 1, -6)
del(O)
src.updateicon()
@@ -737,7 +737,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
src.pestlevel = 0
if (src.toxic > 100 ) // Make sure it won't go overoboard
src.toxic = 100
user << "You apply the pestkiller solution into the tray"
user << "You apply the pestkiller solution into the [src]."
playsound(src.loc, 'spray3.ogg', 50, 1, -6)
del(O)
src.updateicon()
@@ -754,22 +754,22 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
else if(src.dead)
src.planted = 0
src.dead = 0
usr << text("You remove the dead plant from the tray")
usr << text("You remove the dead plant from the [src].")
del(src.myseed)
src.updateicon()
else
if(src.planted && !src.dead)
usr << text("The hydroponics tray has \blue [src.myseed.plantname] \black planted")
usr << text("The [src] has \blue [src.myseed.plantname] \black planted.")
if(src.health <= (src.myseed.endurance / 2))
usr << text("The plant looks unhealthy")
else
usr << text("The hydroponics tray is empty")
usr << text("The [src] is empty.")
usr << text("Water: [src.waterlevel]/100")
usr << text("Nutrient: [src.nutrilevel]/10")
if(src.weedlevel >= 5) // Visual aid for those blind
usr << text("The tray is filled with weeds!")
usr << text("The [src] is filled with weeds!")
if(src.pestlevel >= 5) // Visual aid for those blind
usr << text("The tray is filled with tiny worms!")
usr << text("The [src] is filled with tiny worms!")
usr << text ("") // Empty line for readability.
/obj/item/seeds/proc/harvest(mob/user = usr)
@@ -977,7 +977,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
harvest = 0
lastproduce = src.age
if((yieldmod * myseed.yield) <= 0)
user << text("\red You fail to harvest anything useful")
user << text("\red You fail to harvest anything useful.")
else
user << text("You harvest from the [src.myseed.plantname]")
if(myseed.oneharvest)
+195 -11
View File
@@ -40,27 +40,94 @@
density = 0
anchored = 1
var/on = 0
var/mist = 0 //needs a var so we can make it linger~
var/obj/effect/mist/mymist = null
var/ismist = 0 //needs a var so we can make it linger~
//add heat controls? when emagged, you can freeze to death in it?
/obj/structure/shower/attack_hand()
/obj/effect/mist
name = "mist"
icon = 'watercloset.dmi'
icon_state = "mist"
layer = MOB_LAYER + 1
mouse_opacity = 0
/obj/structure/shower/attack_hand(mob/M as mob)
on = !on
update_icon()
if(on && M.loc == loc)
wash(M)
/obj/structure/shower/attackby(mob/M as mob)
attack_hand(M)
/obj/structure/shower/update_icon()
overlays = null
if(mymist)
del(mymist)
if(on)
overlays += image('watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
spawn(50)
if(src && on)
overlays += image('watercloset.dmi', src, "mist", MOB_LAYER + 1, dir)
mist = 1
else if(mist)
overlays += image('watercloset.dmi', src, "mist", MOB_LAYER + 1, dir)
spawn(100)
if(!ismist)
spawn(50)
if(src && on)
ismist = 1
mymist = new /obj/effect/mist(loc)
else
ismist = 1
mymist = new /obj/effect/mist(loc)
else if(ismist)
ismist = 1
mymist = new /obj/effect/mist(loc)
spawn(250)
if(src && !on)
overlays = null
del(mymist)
ismist = 0
/obj/structure/shower/HasEntered(atom/movable/O as obj|mob)
..()
wash(O)
//Yes, showers are super powerful as far as washing goes.
/obj/structure/shower/proc/wash(atom/movable/O as obj|mob)
..()
if(!on) return
O.clean_blood()
if(istype(O, /mob/living/carbon))
var/mob/living/carbon/monkey = O //it's not necessarily a monkey, but >accurate varnames
if(monkey.r_hand)
monkey.r_hand.clean_blood()
if(monkey.l_hand)
monkey.l_hand.clean_blood()
if(monkey.wear_mask)
monkey.wear_mask.clean_blood()
if(istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/washer = O
if(washer.head)
washer.head.clean_blood()
if(washer.w_uniform)
washer.w_uniform.clean_blood()
if(washer.wear_suit)
washer.wear_suit.clean_blood()
if(washer.shoes)
washer.shoes.clean_blood()
if(washer.gloves)
washer.gloves.clean_blood()
if(washer.head)
washer.head.clean_blood()
if(loc)
var/turf/tile = get_turf(loc)
loc.clean_blood()
for(var/obj/effect/rune/R in tile)
del(R)
for(var/obj/effect/decal/cleanable/R in tile)
del(R)
for(var/obj/effect/overlay/R in tile)
del(R)
@@ -69,4 +136,121 @@
desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" //thanks doohl
icon = 'watercloset.dmi'
icon_state = "rubberducky"
item_state = "rubberducky"
item_state = "rubberducky"
/obj/structure/sink
name = "sink"
icon = 'watercloset.dmi'
icon_state = "sink"
desc = "A sink used for washing one's hands and face."
anchored = 1
var/busy = 0 //Something's being washed at the moment
/obj/structure/sink/attack_hand(mob/M as mob)
if(isrobot(M) || isAI(M))
return
if(busy)
M << "\red Someone's already washing here."
return
var/turf/location = M.loc
if(!isturf(location)) return
usr << "\blue You start washing your hands."
busy = 1
sleep(40)
busy = 0
if(M.loc != location) return //Person has moved away from the sink
if(istype(M, /mob/living/carbon))
var/mob/living/carbon/C = M
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/washer = C
if(washer.gloves) //if they have gloves
washer.gloves.clean_blood() //clean the gloves
else //and if they don't,
washer.clean_blood() //wash their hands (a mob being bloody means they are 'red handed')
else
C.clean_blood() //other things that can't wear gloves should just wash the mob.
for(var/mob/V in viewers(src, null))
V.show_message(text("\blue [M] washes their hands using \the [src]."))
/obj/structure/sink/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(busy)
user << "\red Someone's already washing here."
return
if (istype(O, /obj/item/weapon/reagent_containers/glass/bucket))
O:reagents.add_reagent("water", 70)
user.visible_message( \
"\blue [user] fills the [O] using \the [src].", \
"\blue You fill the [O] using \the [src].")
return
if (istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/food/drinks))
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].")
return
else if (istype(O, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = O
if (B.charges > 0 && B.status == 1)
flick("baton_active", src)
user.Stun(10)
user.stuttering = 10
user.Weaken(10)
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.charge -= 20
else
B.charges--
user.visible_message( \
"[user] was stunned by his wet [O].", \
"\red You have wet \the [O], it shocks you!")
return
var/turf/location = user.loc
if(!isturf(location)) return
var/obj/item/I = O
if(!I || !istype(I,/obj/item)) return
usr << "\blue You start washing \the [I]."
busy = 1
sleep(40)
busy = 0
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
O.clean_blood()
user.visible_message( \
"\blue [user] washes \a [I] using \the [src].", \
"\blue You wash \a [I] using \the [src].")
/obj/structure/sink/kitchen
name = "kitchen sink"
icon_state = "sink_alt"
/obj/structure/sink/puddle //splishy splashy ^_^
name = "puddle"
icon_state = "puddle"
/obj/structure/sink/puddle/attack_hand(mob/M as mob)
icon_state = "puddle-splash"
..()
icon_state = "puddle"
/obj/structure/sink/puddle/attackby(var/obj/item/O as obj, var/mob/user as mob)
icon_state = "puddle-splash"
..()
icon_state = "puddle"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB