mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-28 11:02:41 +00:00
Removes a very large amount of world loops. Adds a macro to painlessly generate a global list, and the needed code to modify the list when an object is made or deleted automatically. Cleans up some commented out code.
31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
/obj/structure/mopbucket
|
|
name = "mop bucket"
|
|
desc = "Fill it with water, but don't forget a mop!"
|
|
icon = 'icons/obj/janitor.dmi'
|
|
icon_state = "mopbucket"
|
|
density = 1
|
|
climbable = 1
|
|
w_class = ITEMSIZE_NORMAL
|
|
pressure_resistance = 5
|
|
flags = OPENCONTAINER
|
|
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
|
|
|
GLOBAL_LIST_BOILERPLATE(all_mopbuckets, /obj/structure/mopbucket)
|
|
|
|
/obj/structure/mopbucket/New()
|
|
create_reagents(300)
|
|
..()
|
|
|
|
/obj/structure/mopbucket/examine(mob/user)
|
|
if(..(user, 1))
|
|
to_chat(user, "[src] \icon[src] contains [reagents.total_volume] unit\s of water!")
|
|
|
|
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
|
|
if(istype(I, /obj/item/weapon/mop))
|
|
if(reagents.total_volume < 1)
|
|
to_chat(user, "<span class='warning'>\The [src] is out of water!</span>")
|
|
else
|
|
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)
|