mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Merge pull request #3655 from VampyrBytes/washrefactor
refactors washing items
This commit is contained in:
@@ -512,3 +512,14 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/proc/wash(mob/user, atom/source)
|
||||
if(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
|
||||
user << "<span class='notice'>You start washing [src]...</span>"
|
||||
if(!do_after(user, 40, target = source))
|
||||
return
|
||||
clean_blood()
|
||||
user.visible_message("<span class='notice'>[user] washes [src] using [source].</span>", \
|
||||
"<span class='notice'>You wash [src] using [source].</span>")
|
||||
return 1
|
||||
@@ -65,6 +65,12 @@
|
||||
J.mymop=src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/weapon/mop/wash(mob/user, atom/source)
|
||||
reagents.add_reagent("water", 5)
|
||||
user << "<span class='notice'>You wet [src] in [source].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/mop/advanced
|
||||
desc = "The most advanced tool in a custodian's arsenal. Just think of all the viscera you will clean up with this!"
|
||||
name = "advanced mop"
|
||||
|
||||
@@ -163,6 +163,21 @@
|
||||
bcell.reliability -= 10 / severity
|
||||
..()
|
||||
|
||||
/obj/item/weapon/melee/baton/wash(mob/user, atom/source)
|
||||
if(bcell)
|
||||
if(bcell.charge > 0 && status == 1)
|
||||
flick("baton_active", source)
|
||||
user.Stun(stunforce)
|
||||
user.Weaken(stunforce)
|
||||
user.stuttering = stunforce
|
||||
deductcharge(hitcost)
|
||||
user.visible_message("<span class='warning'>[user] shocks themself while attempting to wash the active [src]!</span>", \
|
||||
"<span class='userdanger'>You unwisely attempt to wash [src] while it's still on.</span>")
|
||||
playsound(src, "sparks", 50, 1)
|
||||
return 1
|
||||
..()
|
||||
|
||||
|
||||
//secborg stun baton module
|
||||
/obj/item/weapon/melee/baton/loaded/robot
|
||||
hitcost = 1000
|
||||
|
||||
@@ -424,51 +424,15 @@
|
||||
user << "<span class='warning'>Someone's already washing here!</span>"
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/weapon/reagent_containers))
|
||||
var/obj/item/weapon/reagent_containers/RG = O
|
||||
if(RG.is_open_container())
|
||||
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
|
||||
user << "<span class='notice'>You fill [RG] from [src].</span>"
|
||||
return
|
||||
|
||||
O.water_act(20,310.15,src)
|
||||
|
||||
if(istype(O, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = O
|
||||
if(B.bcell)
|
||||
if(B.bcell.charge > 0 && B.status == 1)
|
||||
flick("baton_active", src)
|
||||
var/stunforce = B.stunforce
|
||||
user.Stun(stunforce)
|
||||
user.Weaken(stunforce)
|
||||
user.stuttering = stunforce
|
||||
B.deductcharge(B.hitcost)
|
||||
user.visible_message("<span class='warning'>[user] shocks themself while attempting to wash the active [B.name]!</span>", \
|
||||
"<span class='userdanger'>You unwisely attempt to wash [B] while it's still on.</span>")
|
||||
playsound(src, "sparks", 50, 1)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/weapon/mop))
|
||||
O.reagents.add_reagent("water", 5)
|
||||
user << "<span class='notice'>You wet [O] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
|
||||
var/obj/item/I = O
|
||||
if(!I || !istype(I))
|
||||
return
|
||||
if(I.flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand.
|
||||
if(!(istype(O)))
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You start washing [I]...</span>"
|
||||
busy = 1
|
||||
if(!do_after(user, 40, target = src))
|
||||
busy = 0
|
||||
return
|
||||
var/wateract = 0
|
||||
wateract = (O.wash(user, src))
|
||||
busy = 0
|
||||
O.clean_blood()
|
||||
user.visible_message("<span class='notice'>[user] washes [I] using [src].</span>", \
|
||||
"<span class='notice'>You wash [I] using [src].</span>")
|
||||
|
||||
if (wateract)
|
||||
O.water_act(20,310.15,src)
|
||||
|
||||
/obj/structure/sink/kitchen
|
||||
name = "kitchen sink"
|
||||
|
||||
Reference in New Issue
Block a user