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 05:39:21 -05:00
committed by GitHub
parent a0d14de10f
commit 7189ae5d65
13 changed files with 126 additions and 32 deletions
@@ -89,8 +89,8 @@
new /obj/item/storage/bag/trash(src)
new /obj/item/lightreplacer(src)
new /obj/item/lightreplacer(src)
new /obj/item/holosign_creator(src)
new /obj/item/holosign_creator(src)
new /obj/item/holosign_creator/janitor(src)
new /obj/item/holosign_creator/janitor(src)
new /obj/item/watertank/janitor(src)
new /obj/item/watertank/janitor(src)
new /obj/item/storage/belt/janitor(src)
+7
View File
@@ -41,6 +41,13 @@
desc = "The words flicker as if they mean nothing."
icon_state = "holosign"
/obj/structure/holosign/wetsign/proc/wet_timer_start(obj/item/holosign_creator/HS_C)
addtimer(CALLBACK(src, .proc/wet_timer_finish, HS_C), 82 SECONDS, TIMER_UNIQUE)
/obj/structure/holosign/wetsign/proc/wet_timer_finish(obj/item/holosign_creator/HS_C)
playsound(HS_C.loc, 'sound/machines/chime.ogg', 20, 1)
qdel(src)
/obj/structure/holosign/barrier
name = "holo barrier"
desc = "A short holographic barrier which can only be passed by walking."
+18 -10
View File
@@ -32,21 +32,15 @@
QDEL_NULL(myreplacer)
return ..()
/obj/structure/janitorialcart/proc/wet_mop(obj/item/mop, mob/user)
if(reagents.total_volume < 1)
to_chat(user, "[src] is out of water!</span>")
else
reagents.trans_to(mop, 5) //
to_chat(user, "<span class='notice'>You wet [mop] in [src].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
user.drop_item()
I.loc = src
I.forceMove(src)
updateUsrDialog()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
return
/obj/structure/janitorialcart/on_reagent_change()
update_icon()
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user, params)
var/fail_msg = "<span class='notice'>There is already one of those in [src].</span>"
@@ -55,7 +49,7 @@
if(istype(I, /obj/item/mop))
var/obj/item/mop/m=I
if(m.reagents.total_volume < m.reagents.maximum_volume)
wet_mop(m, user)
m.wet_mop(src, user)
return
if(!mymop)
m.janicart_insert(user, src)
@@ -185,3 +179,17 @@
overlays += "cart_replacer"
if(signs)
overlays += "cart_sign[signs]"
if(reagents.total_volume > 0)
var/image/reagentsImage = image(icon,src,"cart_reagents0")
reagentsImage.alpha = 150
switch((reagents.total_volume/reagents.maximum_volume)*100)
if(1 to 25)
reagentsImage.icon_state = "cart_reagents1"
if(26 to 50)
reagentsImage.icon_state = "cart_reagents2"
if(51 to 75)
reagentsImage.icon_state = "cart_reagents3"
if(76 to 100)
reagentsImage.icon_state = "cart_reagents4"
reagentsImage.icon += mix_color_from_reagents(reagents.reagent_list)
add_overlay(reagentsImage)
+49 -6
View File
@@ -5,6 +5,8 @@
icon_state = "mopbucket"
density = 1
container_type = OPENCONTAINER
face_while_pulling = FALSE
var/obj/item/mop/mymop = null
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
/obj/structure/mopbucket/Initialize(mapload)
@@ -27,11 +29,52 @@
/obj/structure/mopbucket/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/mop))
if(src.reagents.total_volume >= 2)
src.reagents.trans_to(W, 2)
to_chat(user, "<span class='notice'>You wet the mop</span>")
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
if(src.reagents.total_volume < 1)
to_chat(user, "<span class='notice'>Out of water!</span>")
var/obj/item/mop/m = W
if(m.reagents.total_volume < m.reagents.maximum_volume)
m.wet_mop(src, user)
return
if(!mymop)
m.janicart_insert(user, src)
return
to_chat(user, "<span class='notice'>Theres already a mop in the mopbucket.</span>")
return
return ..()
/obj/structure/mopbucket/proc/put_in_cart(obj/item/mop/I, mob/user)
user.drop_item()
I.forceMove(src)
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
return
/obj/structure/mopbucket/on_reagent_change()
update_icon()
/obj/structure/mopbucket/update_icon()
overlays.Cut()
if(mymop)
overlays += image(icon,"mopbucket_mop")
if(reagents.total_volume > 0)
var/image/reagentsImage = image(icon, src, "mopbucket_reagents0")
reagentsImage.alpha = 150
switch((reagents.total_volume/reagents.maximum_volume)*100)
if(1 to 25)
reagentsImage.icon_state = "mopbucket_reagents1"
if(26 to 50)
reagentsImage.icon_state = "mopbucket_reagents2"
if(51 to 75)
reagentsImage.icon_state = "mopbucket_reagents3"
if(76 to 100)
reagentsImage.icon_state = "mopbucket_reagents4"
reagentsImage.icon += mix_color_from_reagents(reagents.reagent_list)
add_overlay(reagentsImage)
/obj/structure/mopbucket/attack_hand(mob/living/user)
. = ..()
if(mymop)
user.put_in_hands(mymop)
to_chat(user, "<span class='notice'>You take [mymop] from [src].</span>")
mymop = null
update_icon()
return