Files
Paradise/code/game/objects/items/weapons/mop.dm
Vi3trice f4b37b4177 Port TG updating appearances (#17943)
* Get pants that match or else you gonna look silly yo

* Posters

* Fix other hud elements

* Rereviewed

* Update shotglass.dm

* Fix for new merged PRs

* Typo

* Coming across other stuff

* Update theblob.dm

* No takebacksies

* smh i forget to leave a comment

* Updated for the detgun and cards

* Should have rerun langserver again

* No longer plastic, more in scope

* Damn you bluespace

* Reverting turret logic, out of scope at this point

* Tweak that part

* Went over energy guns again, and fixed UI White's sprite sheet

* Welding masks, glasses, and JUSTICE

* Update portable_atmospherics.dm

* Cleaning up, clearing things up

* Review and suggestions

* Update valve.dm

* More tweaks

* Missing character

* Not distinct lightmasks, so they can be overlays

* Update generator.dm

* Add parameter so holodeck doesn't try to make a perfect copy

* Update unsorted.dm

* Spiders

* Better fix for spiders, fix vamps too

* Ghosts

* Update telekinesis.dm

* Cleaning up old procs

* It's set up to not copy datums... Unless they're in a list

* Donuts, duct tape, and detgun. D3VR coming to Early Access

* Update procs that interact with doors so they call update_state instead

* Forgot one spot, and actually might as well just force lock

* Cleaning up other things... Sigh, and kitty ears

* oops

* Getting used to how it works

* blinds

* Going back to the suit obscuring thing, so it doesn't update all the time

* Missed that from merging master

* I made this PR and forgot about it

* Fix runtimes in cards

* Make things a bit more unified

* Update update_icons.dm

* yarn, really?

* Update library_equipment.dm

* Update shieldgen.dm

* Every time Charlie merges something, I go back and see if I can improve things further

* what's this? more?

* Update misc_special.dm

* wow, paper

* Review

* More reviews

* To be sure, seems like being broken messed something sometimes

* Brought airlocks closer to how TG works to iron out some stuff

* Pizza and morgue

* Doesn't seem to hurt, tried with holodeck

* Revert "Doesn't seem to hurt, tried with holodeck"

This reverts commit 158529302b.

* Icon conflict

* Fix organ damage

* Don't ask how. Why. It's like that on prod too.

* Cutting down on things and updating from TG.

* More flexible. Just in case the thing you stuck it on didn't destroy.

* Hydro was one the things I touched earlier on, better rework it

* Reviews

* Cleaning up further, also bri'ish

* Undo a change I did, and switch over to a more recent implementation

* Update biogenerator.dm

* Rolling back to old airlocks, but with new duct taped note

* Functionally the same. I'd just rather not have the smoothing happen there

* Went over APCs again

* Fix welding helmet names in species files

* Update airlock.dm

* Update persistent_overlay.dm

* Oh, topic
2022-07-21 08:11:59 +02:00

128 lines
4.0 KiB
Plaintext

/obj/item/mop
desc = "The world of janitalia wouldn't be complete without a mop."
name = "mop"
icon = 'icons/obj/janitor.dmi'
icon_state = "mop"
force = 3
throwforce = 5
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
resistance_flags = FLAMMABLE
var/mopping = 0
var/mopcount = 0
var/mopcap = 5
var/mopspeed = 30
/obj/item/mop/New()
..()
create_reagents(mopcap)
GLOB.janitorial_equipment += src
/obj/item/mop/Destroy()
GLOB.janitorial_equipment -= src
return ..()
/obj/item/mop/proc/wet_mop(obj/o, mob/user)
if(o.reagents.total_volume < 1)
to_chat(user, "[o] is out of water!</span>")
if(!istype(o, /obj/item/reagent_containers/glass/bucket))
janicart_insert(user, o)
return
o.reagents.trans_to(src, 5)
to_chat(user, "<span class='notice'>You wet [src] in [o].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
/obj/item/mop/proc/clean(turf/simulated/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("cleaner", 1) || reagents.has_reagent("holywater", 1))
A.clean_blood()
for(var/obj/effect/O in A)
if(O.is_cleanable())
qdel(O)
reagents.reaction(A, REAGENT_TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
reagents.remove_any(1) //reaction() doesn't use up the reagents
/obj/item/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(reagents.total_volume < 1)
to_chat(user, "<span class='warning'>Your mop is dry!</span>")
return
var/turf/simulated/T = get_turf(A)
if(istype(A, /obj/item/reagent_containers/glass/bucket) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/structure/mopbucket))
return
if(istype(T))
user.visible_message("[user] begins to clean [T] with [src].", "<span class='notice'>You begin to clean [T] with [src]...</span>")
if(do_after(user, src.mopspeed, target = T))
to_chat(user, "<span class='notice'>You finish mopping.</span>")
clean(T)
/obj/effect/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/mop) || istype(I, /obj/item/soap))
return
else
return ..()
/obj/item/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.mymop = src
J.put_in_cart(src, user)
/obj/item/mop/wash(mob/user, atom/source)
reagents.add_reagent("water", 5)
to_chat(user, "<span class='notice'>You wet [src] in [source].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
return 1
/obj/item/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"
mopcap = 10
icon_state = "advmop"
item_state = "mop"
origin_tech = "materials=3;engineering=3"
force = 6
throwforce = 8
throw_range = 4
mopspeed = 20
var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water.
var/refill_rate = 1 //Rate per process() tick mop refills itself
var/refill_reagent = "water" //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
/obj/item/mop/advanced/New()
..()
START_PROCESSING(SSobj, src)
/obj/item/mop/advanced/attack_self(mob/user)
refill_enabled = !refill_enabled
if(refill_enabled)
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj, src)
to_chat(user, "<span class='notice'>You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.</span>")
playsound(user, 'sound/machines/click.ogg', 30, 1)
/obj/item/mop/advanced/process()
if(reagents.total_volume < mopcap)
reagents.add_reagent(refill_reagent, refill_rate)
/obj/item/mop/advanced/examine(mob/user)
. = ..()
. += "<span class='notice'>The condenser switch is set to <b>[refill_enabled ? "ON" : "OFF"]</b>.</span>"
/obj/item/mop/advanced/Destroy()
if(refill_enabled)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mop/advanced/cyborg
/obj/item/mop/advanced/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
return