mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
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
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
/obj/effect/fun_balloon/proc/pop()
|
||||
visible_message("<span class='notice'>[src] pops!</span>")
|
||||
playsound(get_turf(src), 'sound/items/party_horn.ogg', 50, 1, -1)
|
||||
playsound(get_turf(src), 'sound/items/party_horn.ogg', 50, TRUE, -1)
|
||||
qdel(src)
|
||||
|
||||
//ATTACK GHOST IGNORING PARENT RETURN VALUE
|
||||
|
||||
@@ -752,4 +752,4 @@
|
||||
H.equipOutfit(humanoutfit)
|
||||
var/turf/T = get_step(loc, SOUTHWEST)
|
||||
flick_overlay_static(portal_appearance, T, 15)
|
||||
playsound(T, 'sound/magic/lightningbolt.ogg', rand(80, 100), 1)
|
||||
playsound(T, 'sound/magic/lightningbolt.ogg', rand(80, 100), TRUE)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
log_admin("[key_name(src)] played a local sound [S]")
|
||||
message_admins("[key_name_admin(src)] played a local sound [S]")
|
||||
playsound(get_turf(src.mob), S, 50, 0, 0)
|
||||
playsound(get_turf(src.mob), S, 50, FALSE, FALSE)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Local Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/play_web_sound()
|
||||
|
||||
@@ -969,7 +969,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
continue
|
||||
|
||||
M.audible_message("<span class='italics'>...wabbajack...wabbajack...</span>")
|
||||
playsound(M.loc, 'sound/magic/staff_change.ogg', 50, 1, -1)
|
||||
playsound(M.loc, 'sound/magic/staff_change.ogg', 50, TRUE, -1)
|
||||
|
||||
wabbajack(M)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user