mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-20 22:32:06 +00:00
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
41 lines
1.6 KiB
Plaintext
41 lines
1.6 KiB
Plaintext
// verb for admins to set custom event
|
|
/client/proc/cmd_admin_change_custom_event()
|
|
set category = "Fun"
|
|
set name = "Change Custom Event"
|
|
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg) as message|null, MAX_BOOK_MESSAGE_LEN, extra = 0)
|
|
if(!input || input == "")
|
|
GLOB.custom_event_msg = null
|
|
log_admin("[usr.key] has cleared the custom event text.",admin_key=key_name(usr))
|
|
message_admins("[key_name_admin(usr)] has cleared the custom event text.")
|
|
return
|
|
|
|
log_admin("[usr.key] has changed the custom event text.",admin_key=key_name(usr))
|
|
message_admins("[key_name_admin(usr)] has changed the custom event text.")
|
|
|
|
GLOB.custom_event_msg = input
|
|
|
|
to_world("<h1 class='alert'>Custom Event</h1>")
|
|
to_world("<h2 class='alert'>A custom event is starting. OOC Info:</h2>")
|
|
to_world("<span class='alert'>[GLOB.custom_event_msg]</span>")
|
|
to_world("<br>")
|
|
|
|
// normal verb for players to view info
|
|
/client/verb/cmd_view_custom_event()
|
|
set category = "OOC"
|
|
set name = "Custom Event Info"
|
|
|
|
if(!GLOB.custom_event_msg || GLOB.custom_event_msg == "")
|
|
to_chat(src, "There currently is no known custom event taking place.")
|
|
to_chat(src, "Keep in mind: it is possible that an admin has not properly set this.")
|
|
return
|
|
|
|
to_chat(src, "<h1 class='alert'>Custom Event</h1>")
|
|
to_chat(src, "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>")
|
|
to_chat(src, "<span class='alert'>[GLOB.custom_event_msg]</span>")
|
|
to_chat(src, "<br>")
|