2029163d33
About The Pull Request Converts every single usage of playsound's vary parameter to use the boolean define instead of 1 or 0. I'm tired of people copypasting the incorrect usage. Also changes a couple of places where a list was picked from instead of using get_sfx internal calls This was done via regex: (playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\)) to match 1 (playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\)) to match 0 full sed commands: /(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\))/\1TRUE\2/ 1 to TRUE /(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\))/\1FALSE\2/ 0 to FALSE I'm not very good with regex and these could probably be optimized, but they worked. Why It's Good For The Game Code usability
31 lines
931 B
Plaintext
31 lines
931 B
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 = TRUE
|
|
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
|
|
|
|
|
/obj/structure/mopbucket/Initialize()
|
|
. = ..()
|
|
create_reagents(100, OPENCONTAINER)
|
|
|
|
/obj/structure/mopbucket/attackby(obj/item/I, mob/user, params)
|
|
if(istype(I, /obj/item/mop))
|
|
if(reagents.total_volume < 1)
|
|
to_chat(user, "[src] is out of water!</span>")
|
|
else
|
|
reagents.trans_to(I, 5, transfered_by = user)
|
|
to_chat(user, "<span class='notice'>You wet [I] in [src].</span>")
|
|
playsound(loc, 'sound/effects/slosh.ogg', 25, TRUE)
|
|
update_icon()
|
|
else
|
|
. = ..()
|
|
update_icon()
|
|
|
|
/obj/structure/mopbucket/update_icon()
|
|
cut_overlays()
|
|
if(reagents.total_volume > 0)
|
|
add_overlay("mopbucket_water")
|