Janitor QOL (#17594)

* Yes

* No

suggested changes

* Maybe

Suggestions + water in cart sprites

* Merge Conflict Resolve

* Suggested Changes :o)

* fixes bugs

* suggested changes round 2
This commit is contained in:
Kugamo
2022-04-22 11:39:21 +01:00
committed by GitHub
parent a0d14de10f
commit 7189ae5d65
13 changed files with 126 additions and 32 deletions
+27 -2
View File
@@ -1,6 +1,6 @@
/obj/item/holosign_creator
name = "holographic sign projector"
desc = "A handy-dandy holographic projector that displays a janitorial sign."
desc = "This shouldnt exist, if it does, tell a coder"
icon = 'icons/obj/device.dmi'
icon_state = "signmaker"
item_state = "electronic"
@@ -15,7 +15,7 @@
var/list/signs = list()
var/max_signs = 10
var/creation_time = 0 //time to create a holosign in deciseconds.
var/holosign_type = /obj/structure/holosign/wetsign
var/holosign_type = null
var/holocreator_busy = FALSE //to prevent placing multiple holo barriers at once
/obj/item/holosign_creator/afterattack(atom/target, mob/user, flag)
@@ -46,6 +46,7 @@
return
H = new holosign_type(get_turf(target), src)
to_chat(user, "<span class='notice'>You create [H] with [src].</span>")
return H
else
to_chat(user, "<span class='notice'>[src] is projecting at max capacity!</span>")
@@ -58,6 +59,30 @@
qdel(H)
to_chat(user, "<span class='notice'>You clear all active holograms.</span>")
/obj/item/holosign_creator/janitor
name = "Janitorial Holosign projector"
desc = "A handy-dandy holographic projector that displays a janitorial sign."
holosign_type = /obj/structure/holosign/wetsign
var/wet_enabled = FALSE
/obj/item/holosign_creator/janitor/AltClick(mob/user)
wet_enabled = !wet_enabled
playsound(loc, 'sound/weapons/empty.ogg', 20)
if(wet_enabled)
to_chat(user, "<span class='notice'>You enable the W.E.T. (wet evaporation timer)\nAny newly placed holographic signs will clear after the likely time it takes for a mopped tile to dry.</span>")
else
to_chat(user, "<span class='notice'>You disable the W.E.T. (wet evaporation timer)\nAny newly placed holographic signs will now stay indefinitely.</span>")
/obj/item/holosign_creator/janitor/examine(mob/user)
. = ..()
if(ishuman(user))
. += "<span class='info'>Alt Click to [wet_enabled ? "deactivate" : "activate"] its built-in wet evaporation timer.</span>"
/obj/item/holosign_creator/janitor/afterattack(atom/target, mob/user, flag)
var/obj/structure/holosign/wetsign/WS = ..()
if(WS && wet_enabled)
WS.wet_timer_start(src)
/obj/item/holosign_creator/security
name = "security holobarrier projector"
+12 -4
View File
@@ -24,6 +24,17 @@
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()
@@ -42,7 +53,7 @@
var/turf/simulated/T = get_turf(A)
if(istype(A, /obj/item/reagent_containers/glass/bucket) || istype(A, /obj/structure/janitorialcart))
if(istype(A, /obj/item/reagent_containers/glass/bucket) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/structure/mopbucket))
return
if(istype(T))
@@ -52,14 +63,12 @@
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.put_in_cart(src, user)
J.mymop=src
@@ -113,7 +122,6 @@
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mop/advanced/cyborg
/obj/item/mop/advanced/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
@@ -402,14 +402,14 @@
/obj/item/flashlight,
/obj/item/reagent_containers/spray,
/obj/item/soap,
/obj/item/holosign_creator,
/obj/item/holosign_creator/janitor,
/obj/item/melee/flyswatter,
/obj/item/storage/bag/trash
)
/obj/item/storage/belt/janitor/full/populate_contents()
new /obj/item/lightreplacer(src)
new /obj/item/holosign_creator(src)
new /obj/item/holosign_creator/janitor(src)
new /obj/item/reagent_containers/spray/cleaner(src)
new /obj/item/soap(src)
new /obj/item/grenade/chem_grenade/cleaner(src)