[admin] Admins are now warned if they try to change the roundendsound if another admin has already set it to something (#4954)

* Adds a confirm to setroundendsound
This commit is contained in:
Gary Lafortune
2019-04-04 16:54:58 -05:00
committed by GitHub
parent 1248d65890
commit 937f089f9b

View File

@@ -140,7 +140,17 @@
if(!check_rights(R_SOUNDS))
return
//Yogs start -- Adds confirm for whenever an admin has already set the roundend sound.
var/static/lastadmin
var/static/lastsound
if(lastadmin)
if(alert("Warning: Another Admin, [lastadmin], already set the roundendsound to [lastsound]. Overwrite?","Yes","Cancel") != "Yes")
return
SSticker.SetRoundEndSound(S)
lastadmin = src.ckey
lastsound = "[S]"
//Yogs end
log_admin("[key_name(src)] set the round end sound to [S]")
message_admins("[key_name_admin(src)] set the round end sound to [S]")