Files
Bubberstation/code/game/objects/effects/spawners/xeno_egg_delivery.dm
T
Rob Baileyandoranges 2029163d33 playsound vary boolean define conversion (#46254)
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
2019-08-30 18:45:20 +12:00

20 lines
886 B
Plaintext

/obj/effect/spawner/xeno_egg_delivery
name = "xeno egg delivery"
icon = 'icons/mob/alien.dmi'
icon_state = "egg_growing"
var/announcement_time = 1200
/obj/effect/spawner/xeno_egg_delivery/Initialize(mapload)
..()
var/turf/T = get_turf(src)
new /obj/structure/alien/egg(T)
new /obj/effect/temp_visual/gravpush(T)
playsound(T, 'sound/items/party_horn.ogg', 50, TRUE, -1)
message_admins("An alien egg has been delivered to [ADMIN_VERBOSEJMP(T)].")
log_game("An alien egg has been delivered to [AREACOORD(T)]")
var/message = "Attention [station_name()], we have entrusted you with a research specimen in [get_area_name(T, TRUE)]. Remember to follow all safety precautions when dealing with the specimen."
SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, /proc/addtimer, CALLBACK(GLOBAL_PROC, /proc/print_command_report, message), announcement_time))
return INITIALIZE_HINT_QDEL