mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #2697 from VOREStation/barking
Adds "Intercom Msg" admin verb
This commit is contained in:
@@ -664,6 +664,31 @@ proc/admin_notice(var/message, var/rights)
|
|||||||
log_admin("Announce: [key_name(usr)] : [message]")
|
log_admin("Announce: [key_name(usr)] : [message]")
|
||||||
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
|
/datum/admins/proc/intercom()
|
||||||
|
set category = "Fun"
|
||||||
|
set name = "Intercom Msg"
|
||||||
|
set desc = "Send an intercom message, like an arrivals announcement."
|
||||||
|
if(!check_rights(0)) return
|
||||||
|
|
||||||
|
//This is basically how death alarms do it
|
||||||
|
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/ert(null)
|
||||||
|
|
||||||
|
var/channel = input("Channel for message:","Channel", null) as null|anything in (list("Common") + a.keyslot1.channels + a.keyslot2.channels)
|
||||||
|
|
||||||
|
if(channel) //They picked a channel
|
||||||
|
var/sender = input("Name of sender (max 75):", "Announcement", "Announcement Computer") as null|text
|
||||||
|
|
||||||
|
if(sender) //They put a sender
|
||||||
|
sender = sanitize(sender, 75, extra = 0)
|
||||||
|
var/message = input("Message content (max 500):", "Contents", "This is a test of the announcement system.") as null|message
|
||||||
|
|
||||||
|
if(message) //They put a message
|
||||||
|
message = sanitize(message, 500, extra = 0)
|
||||||
|
a.autosay("[message]", "[sender]", "[channel == "Common" ? null : channel]") //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set.
|
||||||
|
log_admin("Intercom: [key_name(usr)] : [sender]:[message]")
|
||||||
|
qdel(a)
|
||||||
|
feedback_add_details("admin_verb","IN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
/datum/admins/proc/toggleooc()
|
/datum/admins/proc/toggleooc()
|
||||||
set category = "Server"
|
set category = "Server"
|
||||||
set desc="Globally Toggles OOC"
|
set desc="Globally Toggles OOC"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ var/list/admin_verbs_admin = list(
|
|||||||
/datum/admins/proc/toggleenter, //toggles whether people can join the current game,
|
/datum/admins/proc/toggleenter, //toggles whether people can join the current game,
|
||||||
/datum/admins/proc/toggleguests, //toggles whether guests can join the current game,
|
/datum/admins/proc/toggleguests, //toggles whether guests can join the current game,
|
||||||
/datum/admins/proc/announce, //priority announce something to all clients.,
|
/datum/admins/proc/announce, //priority announce something to all clients.,
|
||||||
|
/datum/admins/proc/intercom, //send a fake intercom message, like an arrivals announcement
|
||||||
/client/proc/colorooc, //allows us to set a custom colour for everythign we say in ooc,
|
/client/proc/colorooc, //allows us to set a custom colour for everythign we say in ooc,
|
||||||
/client/proc/admin_ghost, //allows us to ghost/reenter body at will,
|
/client/proc/admin_ghost, //allows us to ghost/reenter body at will,
|
||||||
/client/proc/toggle_view_range, //changes how far we can see,
|
/client/proc/toggle_view_range, //changes how far we can see,
|
||||||
|
|||||||
Reference in New Issue
Block a user