mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 15:39:57 +01:00
New Janitor sprites and other stuff (#6466)
This commit is contained in:
@@ -33,6 +33,9 @@
|
||||
amount = 0
|
||||
..(ignore=1)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/hide()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Destroy()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
|
||||
name = "light replacer"
|
||||
desc = "A device to automatically replace lights. Refill with working lightbulbs or sheets of glass."
|
||||
|
||||
icon = 'icons/obj/tools/lightreplacer.dmi'
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "lightreplacer"
|
||||
item_state = "lightreplacer"
|
||||
contained_sprite = 1
|
||||
@@ -66,7 +65,6 @@
|
||||
icon_state = "adv_lightreplacer"
|
||||
item_state = "adv_lightreplacer"
|
||||
|
||||
|
||||
/obj/item/device/lightreplacer/New()
|
||||
failmsg = "The [name]'s refill light blinks red."
|
||||
..()
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/mop/afterattack(atom/A, mob/user, proximity)
|
||||
update_icon()
|
||||
if(!proximity) return
|
||||
if(istype(A, /turf) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune))
|
||||
if(reagents.total_volume < 1)
|
||||
@@ -29,6 +30,7 @@
|
||||
return
|
||||
|
||||
user.visible_message("<span class='warning'>[user] begins to clean \the [get_turf(A)].</span>")
|
||||
playsound(loc, 'sound/effects/mop.ogg', 25, 1)
|
||||
|
||||
if(do_after(user, 40))
|
||||
var/turf/T = get_turf(A)
|
||||
@@ -41,3 +43,12 @@
|
||||
if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/soap))
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/mop/update_icon()
|
||||
if(reagents.total_volume < 1)
|
||||
icon_state = "mop"
|
||||
if(reagents.total_volume > 1)
|
||||
icon_state = "mop_wet"
|
||||
|
||||
/obj/item/weapon/mop/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
@@ -88,10 +88,12 @@
|
||||
if(I.reagents.total_volume < I.reagents.maximum_volume)
|
||||
if(mybucket.reagents.total_volume < 1)
|
||||
to_chat(user, "<span class='notice'>[mybucket] is empty!</span>")
|
||||
update_icon()
|
||||
else
|
||||
mybucket.reagents.trans_to_obj(I, 5) //
|
||||
to_chat(user, "<span class='notice'>You wet [I] in [mybucket].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] can't absorb anymore liquid!</span>")
|
||||
else
|
||||
@@ -274,13 +276,14 @@
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/update_icon()
|
||||
cut_overlays()
|
||||
has_items = 0
|
||||
if(mybucket)
|
||||
add_overlay("cart_bucket")
|
||||
has_items = 1
|
||||
if(mybucket.reagents.total_volume > 0)
|
||||
add_overlay("cart_water")
|
||||
if(mybag)
|
||||
add_overlay("cart_garbage")
|
||||
has_items = 1
|
||||
|
||||
@@ -30,3 +30,18 @@
|
||||
reagents.trans_to_obj(I, 5)
|
||||
to_chat(user, "<span class='notice'>You wet \the [I] in \the [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
return ..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/mopbucket/update_icon()
|
||||
cut_overlays()
|
||||
if(reagents.total_volume > 0)
|
||||
add_overlay("mopbucket_water")
|
||||
|
||||
/obj/structure/mopbucket/on_reagent_change()
|
||||
. = ..()
|
||||
if(istype(loc,/obj/structure/janitorialcart))
|
||||
var/obj/structure/janitorialcart/cart = loc
|
||||
cart.update_icon()
|
||||
else
|
||||
update_icon()
|
||||
Reference in New Issue
Block a user