GLOBAL_VAR_INIT(floorIsLava, 0)
////////////////////////////////
/proc/message_admins(var/msg)
msg = span_filter_adminlog(span_log_message(span_prefix("ADMIN LOG:") + span_message("[msg]")))
//log_adminwarn(msg) //log_and_message_admins is for this
for(var/client/C in GLOB.admins)
if(check_rights_for(C, (R_ADMIN|R_MOD|R_SERVER)))
to_chat(C,
type = MESSAGE_TYPE_ADMINLOG,
html = msg,
confidential = TRUE)
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
var/rendered = span_filter_attacklog(span_log_message(span_prefix("ATTACK:") + span_message("[text]")))
for(var/client/C in GLOB.admins)
if(check_rights_for(C, (R_ADMIN|R_MOD)))
if(C.prefs?.read_preference(/datum/preference/toggle/show_attack_logs))
var/msg = rendered
to_chat(C,
type = MESSAGE_TYPE_ATTACKLOG,
html = msg,
confidential = TRUE)
/proc/admin_notice(var/message, var/rights)
for(var/mob/M in mob_list)
var/C = M.client
if(!C)
return
if(!(istype(C, /client)))
return
if(check_rights_for(C, rights))
to_chat(C, message)
///////////////////////////////////////////////////////////////////////////////////////////////Panels
/datum/admins/proc/show_player_panel(var/mob/M in mob_list)
set category = "Admin.Game"
set name = "Show Player Panel"
set desc="Edit player (respawn, ban, heal, etc)"
if(!M)
to_chat(usr, "You seem to be selecting a mob that doesn't exist anymore.")
return
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
to_chat(usr, "Error: you are not an admin!")
return
var/body = "Options panel for" + span_bold("[M]")
if(M.client)
body += " played by " + span_bold("[M.client]")
body += "\[[M.client.holder ? M.client.holder.rank_names() : "Player"]\]"
if(isnewplayer(M))
body += span_bold(" Hasn't Entered Game")
else
body += " \[Heal\] "
if(M.client)
body += "
" + span_bold("First connection:") + "[M.client.player_age] days ago"
body += "
" + span_bold("BYOND account created:") + "[M.client.account_join_date]"
body += "
" + span_bold("BYOND account age (days):") + "[M.client.account_age]"
body += {"
\[
VV -
TP -
PM -
SM -
[admin_jump_link(M, src)]\]
"} + span_bold("Mob type:") + {"[M.type]
"} + span_bold("Inactivity time:") + {" [M.client ? "[M.client.inactivity/600] minutes" : "Logged out"]
Kick |
Warn |
Ban |
Jobban |
Notes
"}
if(M.client)
body += "| Prison | "
body += "\ Send back to Lobby | "
var/muted = M.client.prefs.muted
body += {"
"} + span_bold("Mute: ") + {"
\[[(muted & MUTE_IC) ? span_red("IC") : span_blue("IC")] |
[(muted & MUTE_OOC) ? span_red("OOC") : span_blue("OOC")] |
[(muted & MUTE_LOOC) ? span_red("LOOC") : span_blue("LOOC")] |
[(muted & MUTE_PRAY) ? span_red("PRAY") : span_blue("PRAY")] |
[(muted & MUTE_ADMINHELP) ? span_red("ADMINHELP") : span_blue("ADMINHELP")] |
[(muted & MUTE_DEADCHAT) ? span_red("DEADCHAT") : span_blue("DEADCHAT")]\]
([(muted & MUTE_ALL) ? span_red("toggle all") : span_blue("toggle all")])
"}
body += {"
"} + span_bold("Jump to") + {" |
Get |
Send To
[check_rights(R_ADMIN|R_MOD|R_EVENT,0) ? "Traitor panel | " : "" ]
Narrate to |
Subtle message
"}
if (M.client)
if(!isnewplayer(M))
body += "
"
body += span_bold("Transformation:")
body += "
"
//Monkey
if(issmall(M))
body += span_bold("Monkeyized") + " | "
else
body += "Monkeyize | "
//Corgi
if(iscorgi(M))
body += span_bold("Corgized") + " | "
else
body += "Corgize | "
//AI / Cyborg
if(isAI(M))
body += span_bold("Is an AI ")
else if(ishuman(M))
body += {"Make AI |
Make Robot |
Make Alien
"}
//Simple Animals
if(isanimal(M))
body += "Re-Animalize | "
else
body += "Animalize | "
body += "Respawn | "
// DNA2 - Admin Hax
if(M.dna && iscarbon(M))
body += "
"
body += span_bold("DNA Blocks:") + "
| 1 | 2 | 3 | 4 | 5 | " var/bname var/list/output_list = list() // Traitgenes more reliable way to check gene states for(var/setup_block=1;setup_block<=DNA_SE_LENGTH;setup_block++) output_list["[setup_block]"] = null for(var/datum/gene/gene in GLOB.dna_genes) // Traitgenes Genes accessible by global VV. Removed /dna/ from path output_list["[gene.block]"] = gene for(var/block=1;block<=DNA_SE_LENGTH;block++) // Traitgenes more reliable way to check gene states var/datum/gene/gene = output_list["[block]"] // Traitgenes Removed /dna/ from path if(((block-1)%5)==0) body += "|
|---|---|---|---|---|---|
| [block-1] | " // Traitgenes more reliable way to check gene states if(gene) bname = gene.name else bname = "" body += "" if(bname) var/bstate=(bname in M.active_genes) // Traitgenes more reliable way to check gene states // Traitgenes show trait linked names on mouseover var/tname = bname if(istype(gene,/datum/gene/trait)) var/datum/gene/trait/T = gene tname = T.get_name() if(bstate) bname = span_green(bname) else if(!bstate && M.dna.GetSEState(block)) // Gene isn't active, but the dna says it is... Was blocked by another gene! bname = span_orange(bname) else bname = span_red(bname) body += "[bname][block]" // Traitgenes edit - show trait linked names on mouseover else body += "[block]" body+=" | " body += "

"
else
dat+="None"
dat+="| [t] (unban) |
tag
send_ooc_announcement(message, "From [usr.client.holder.fakekey ? "Administrator" : usr.key]")
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!
//VOREStation Edit to this verb for the purpose of making it compliant with the annunciator system
var/datum/announcement/priority/admin_pri_announcer = new
var/datum/announcement/minor/admin_min_announcer = new
/datum/admins/proc/intercom()
set category = "Fun.Event Kit"
set name = "Intercom Msg"
set desc = "Send an intercom message, like an arrivals announcement."
if(!check_rights(0)) return
var/channel = tgui_input_list(usr, "Channel for message:","Channel", radiochannels)
if(channel) //They picked a channel
var/sender = tgui_input_text(usr, "Name of sender (max 75):", "Announcement", "Announcement Computer")
if(sender) //They put a sender
sender = sanitize(sender, 75, extra = 0)
var/message = tgui_input_text(usr, "Message content (max 500):", "Contents", "This is a test of the announcement system.", multiline = TRUE, prevent_enter = TRUE)
var/msgverb = tgui_input_text(usr, "Name of verb (Such as 'states', 'says', 'asks', etc):", "Verb", "says")
if(message) //They put a message
message = sanitize(message, 500, extra = 0)
//VOREStation Edit Start
if(msgverb)
msgverb = sanitize(msgverb, 50, extra = 0)
else
msgverb = "states"
GLOB.global_announcer.autosay("[message]", "[sender]", "[channel == "Common" ? null : channel]", states = msgverb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set.
//VOREStation Edit End
log_admin("Intercom: [key_name(usr)] : [sender]:[message]")
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/intercom_convo()
set category = "Fun.Event Kit"
set name = "Intercom Convo"
set desc = "Send an intercom conversation, like several uses of the Intercom Msg verb."
set waitfor = FALSE //Why bother? We have some sleeps. You can leave tho!
if(!check_rights(0)) return
var/channel = tgui_input_list(usr, "Channel for message:","Channel", radiochannels)
if(!channel) //They picked a channel
return
var/speech_verb = tgui_alert(usr, "What speech verb to use for the conversation?", "Type", list("states", "says"))
if(!speech_verb)
return
to_chat(usr, span_notice(span_bold("Intercom Convo Directions") + "
Start the conversation with the sender, a pipe (|), and then the message on one line. Then hit enter to \
add another line, and type a (whole) number of seconds to pause between that message, and the next message, then repeat the message syntax up to 20 times. For example:
\
--- --- ---
\
Some Guy|Hello guys, what's up?
\
5
\
Other Guy|Hey, good to see you.
\
5
\
Some Guy|Yeah, you too.
\
--- --- ---
\
The above will result in those messages playing, with a 5 second gap between each. Maximum of 20 messages allowed."))
var/list/decomposed
var/message = tgui_input_text(usr,"See your chat box for instructions. Keep a copy elsewhere in case it is rejected when you click OK.", "Input Conversation", "", multiline = TRUE, prevent_enter = TRUE)
if(!message)
return
//Split on pipe or \n
decomposed = splittext(message,regex("\\||$","m"))
decomposed += "0" //Tack on a final 0 sleep to make 3-per-message evenly
//Time to find how they screwed up.
//Wasn't the right length
if((decomposed.len) % 3) //+1 to accomidate the lack of a wait time for the last message
to_chat(usr, span_warning("You passed [decomposed.len] segments (senders+messages+pauses). You must pass a multiple of 3, minus 1 (no pause after the last message). That means a sender and message on every other line (starting on the first), separated by a pipe character (|), and a number every other line that is a pause in seconds."))
return
//Too long a conversation
if((decomposed.len / 3) > 20)
to_chat(usr, span_warning("This conversation is too long! 20 messages maximum, please."))
return
//Missed some sleeps, or sanitized to nothing.
for(var/i = 1; i < decomposed.len; i++)
//Sanitize sender
var/clean_sender = sanitize(decomposed[i])
if(!clean_sender)
to_chat(usr, span_warning("One part of your conversation was not able to be sanitized. It was the sender of the [(i+2)/3]\th message."))
return
decomposed[i] = clean_sender
//Sanitize message
var/clean_message = sanitize(decomposed[++i])
if(!clean_message)
to_chat(usr, span_warning("One part of your conversation was not able to be sanitized. It was the body of the [(i+2)/3]\th message."))
return
decomposed[i] = clean_message
//Sanitize wait time
var/clean_time = text2num(decomposed[++i])
if(!isnum(clean_time))
to_chat(usr, span_warning("One part of your conversation was not able to be sanitized. It was the wait time after the [(i+2)/3]\th message."))
return
if(clean_time > 60)
to_chat(usr, span_warning("Max 60 second wait time between messages for sanity's sake please."))
return
decomposed[i] = clean_time
log_admin("Intercom convo started by: [key_name(usr)] : [sanitize(message)]")
feedback_add_details("admin_verb","IN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//Sanitized AND we still have a chance to send it? Wow!
if(LAZYLEN(decomposed))
for(var/i = 1; i < decomposed.len; i++)
var/this_sender = decomposed[i]
var/this_message = decomposed[++i]
var/this_wait = decomposed[++i]
GLOB.global_announcer.autosay("[this_message]", "[this_sender]", "[channel == "Common" ? null : channel]", states = speech_verb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set. //VOREStation Edit
sleep(this_wait SECONDS)
/datum/admins/proc/toggleooc()
set category = "Server.Chat"
set desc="Globally Toggles OOC"
set name="Toggle Player OOC"
if(!check_rights(R_ADMIN))
return
CONFIG_SET(flag/ooc_allowed, !CONFIG_GET(flag/ooc_allowed))
if (CONFIG_GET(flag/ooc_allowed))
to_world(span_world("The OOC channel has been globally enabled!"))
else
to_world(span_world("The OOC channel has been globally disabled!"))
log_and_message_admins("toggled OOC.")
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/togglelooc()
set category = "Server.Chat"
set desc="Globally Toggles LOOC"
set name="Toggle Player LOOC"
if(!check_rights(R_ADMIN))
return
CONFIG_SET(flag/looc_allowed, !CONFIG_GET(flag/looc_allowed))
if (CONFIG_GET(flag/looc_allowed))
to_world(span_world("The LOOC channel has been globally enabled!"))
else
to_world(span_world("The LOOC channel has been globally disabled!"))
log_and_message_admins("toggled LOOC.")
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggledsay()
set category = "Server.Chat"
set desc="Globally Toggles DSAY"
set name="Toggle DSAY"
if(!check_rights(R_ADMIN))
return
CONFIG_SET(flag/dsay_allowed, !CONFIG_GET(flag/dsay_allowed))
if (CONFIG_GET(flag/dsay_allowed))
to_world(span_world("Deadchat has been globally enabled!"))
else
to_world(span_world("Deadchat has been globally disabled!"))
log_admin("[key_name(usr)] toggled deadchat.")
message_admins("[key_name_admin(usr)] toggled deadchat.", 1)
feedback_add_details("admin_verb","TDSAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
/datum/admins/proc/toggleoocdead()
set category = "Server.Chat"
set desc="Toggle Dead OOC."
set name="Toggle Dead OOC"
if(!check_rights(R_ADMIN))
return
CONFIG_SET(flag/dooc_allowed, !CONFIG_GET(flag/dooc_allowed))
log_admin("[key_name(usr)] toggled Dead OOC.")
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/togglehubvisibility()
set category = "Server.Config"
set desc="Globally Toggles Hub Visibility"
set name="Toggle Hub Visibility"
if(!check_rights(R_ADMIN))
return
world.visibility = !(world.visibility)
log_admin("[key_name(usr)] toggled hub visibility.")
message_admins("[key_name_admin(usr)] toggled hub visibility. The server is now [world.visibility ? "visible" : "invisible"] ([world.visibility]).", 1)
feedback_add_details("admin_verb","THUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
/datum/admins/proc/toggletraitorscaling()
set category = "Server.Game"
set desc="Toggle traitor scaling"
set name="Toggle Traitor Scaling"
CONFIG_SET(flag/traitor_scaling, !CONFIG_GET(flag/traitor_scaling))
log_admin("[key_name(usr)] toggled Traitor Scaling to [CONFIG_GET(flag/traitor_scaling)].")
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [CONFIG_GET(flag/traitor_scaling) ? "on" : "off"].", 1)
feedback_add_details("admin_verb","TTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/startnow()
set category = "Server.Game"
set desc="Start the round ASAP"
set name="Start Now"
if(!check_rights(R_SERVER|R_EVENT))
return
if(SSticker.current_state > GAME_STATE_PREGAME)
to_chat(usr, span_warning("Error: Start Now: Game has already started."))
return
if(!SSticker.start_immediately)
SSticker.start_immediately = TRUE
var/msg = ""
if(SSticker.current_state == GAME_STATE_INIT)
msg = " (The server is still setting up, but the round will be started as soon as possible.)"
log_admin("[key_name(usr)] has started the game.[msg]")
message_admins(span_notice("[key_name_admin(usr)] has started the game.[msg]"))
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
SSticker.start_immediately = FALSE
to_world(span_filter_system(span_blue("Immediate game start canceled. Normal startup resumed.")))
log_and_message_admins("cancelled immediate game start.")
/datum/admins/proc/toggleenter()
set category = "Server.Game"
set desc="People can't enter"
set name="Toggle Entering"
CONFIG_SET(flag/enter_allowed, !CONFIG_GET(flag/enter_allowed))
if (!CONFIG_GET(flag/enter_allowed))
to_world(span_world("New players may no longer enter the game."))
else
to_world(span_world("New players may now enter the game."))
log_admin("[key_name(usr)] toggled new player game entering.")
message_admins(span_blue("[key_name_admin(usr)] toggled new player game entering."), 1)
world.update_status()
feedback_add_details("admin_verb","TE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggleAI()
set category = "Server.Game"
set desc="People can't be AI"
set name="Toggle AI"
CONFIG_SET(flag/allow_ai, !CONFIG_GET(flag/allow_ai))
if (!CONFIG_GET(flag/allow_ai))
to_world(span_world("The AI job is no longer chooseable."))
else
to_world(span_world("The AI job is chooseable now."))
log_admin("[key_name(usr)] toggled AI allowed.")
world.update_status()
feedback_add_details("admin_verb","TAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggleaban()
set category = "Server.Game"
set desc="Respawn basically"
set name="Toggle Respawn"
CONFIG_SET(flag/abandon_allowed, !CONFIG_GET(flag/abandon_allowed))
if(CONFIG_GET(flag/abandon_allowed))
to_world(span_world("You may now respawn."))
else
to_world(span_world("You may no longer respawn :("))
message_admins(span_blue("[key_name_admin(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"]."), 1)
log_admin("[key_name(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"].")
world.update_status()
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/togglepersistence()
set category = "Server.Config"
set desc="Whether persistent data will be saved from now on."
set name="Toggle Persistent Data"
CONFIG_SET(flag/persistence_disabled, !CONFIG_GET(flag/persistence_disabled))
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"]."), 1)
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"].")
world.update_status()
feedback_add_details("admin_verb","TPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/togglemaploadpersistence()
set category = "Server.Config"
set desc="Whether mapload persistent data will be saved from now on."
set name="Toggle Mapload Persistent Data"
CONFIG_SET(flag/persistence_ignore_mapload, !CONFIG_GET(flag/persistence_ignore_mapload))
if(!CONFIG_GET(flag/persistence_ignore_mapload))
to_world(span_world("Persistence is now enabled."))
else
to_world(span_world("Persistence is no longer enabled."))
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"]."), 1)
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"].")
world.update_status()
feedback_add_details("admin_verb","TMPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggle_aliens()
set category = "Server.Game"
set desc="Toggle alien mobs"
set name="Toggle Aliens"
CONFIG_SET(flag/aliens_allowed, !CONFIG_GET(flag/aliens_allowed))
log_admin("[key_name(usr)] toggled Aliens to [CONFIG_GET(flag/aliens_allowed)].")
message_admins("[key_name_admin(usr)] toggled Aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].", 1)
feedback_add_details("admin_verb","TA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggle_space_ninja()
set category = "Server.Game"
set desc="Toggle space ninjas spawning."
set name="Toggle Space Ninjas"
CONFIG_SET(flag/ninjas_allowed, !CONFIG_GET(flag/ninjas_allowed))
log_admin("[key_name(usr)] toggled Space Ninjas to [CONFIG_GET(flag/ninjas_allowed)].")
message_admins("[key_name_admin(usr)] toggled Space Ninjas [CONFIG_GET(flag/ninjas_allowed) ? "on" : "off"].", 1)
feedback_add_details("admin_verb","TSN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/delay()
set category = "Server.Game"
set desc="Delay the game start/end"
set name="Delay"
if(!check_rights(R_SERVER|R_EVENT)) return
if (SSticker.current_state >= GAME_STATE_PLAYING)
SSticker.delay_end = !SSticker.delay_end
log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins(span_blue("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"]."), 1)
return
GLOB.round_progressing = !GLOB.round_progressing
if (!GLOB.round_progressing)
to_world(span_world("The game start has been delayed."))
log_admin("[key_name(usr)] delayed the game.")
else
to_world(span_world("The game will start soon."))
log_admin("[key_name(usr)] removed the delay.")
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/adjump()
set category = "Server.Game"
set desc="Toggle admin jumping"
set name="Toggle Jump"
CONFIG_SET(flag/allow_admin_jump, !CONFIG_GET(flag/allow_admin_jump))
message_admins(span_blue("Toggled admin jumping to [CONFIG_GET(flag/allow_admin_jump)]."))
feedback_add_details("admin_verb","TJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/adspawn()
set category = "Server.Game"
set desc="Toggle admin spawning"
set name="Toggle Spawn"
CONFIG_SET(flag/allow_admin_spawning, !CONFIG_GET(flag/allow_admin_spawning))
message_admins(span_blue("Toggled admin item spawning to [CONFIG_GET(flag/allow_admin_spawning)]."))
feedback_add_details("admin_verb","TAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/adrev()
set category = "Server.Game"
set desc="Toggle admin revives"
set name="Toggle Revive"
CONFIG_SET(flag/allow_admin_rev, !CONFIG_GET(flag/allow_admin_rev))
message_admins(span_blue("Toggled reviving to [CONFIG_GET(flag/allow_admin_rev)]."))
feedback_add_details("admin_verb","TAR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/immreboot()
set category = "Server.Game"
set desc="Reboots the server post haste"
set name="Immediate Reboot"
if(!usr.client.holder) return
if(alert(usr, "Reboot server?","Reboot!","Yes","No") != "Yes") // Not tgui_alert for safety
return
to_world(span_filter_system("[span_red(span_bold("Rebooting world!"))] [span_blue("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!")]"))
log_admin("[key_name(usr)] initiated an immediate reboot.")
feedback_set_details("end_error","immediate admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
feedback_add_details("admin_verb","IR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(blackbox)
blackbox.save_all_data_to_sql()
world.Reboot()
/datum/admins/proc/unprison(var/mob/M in mob_list)
set category = "Admin.Moderation"
set name = "Unprison"
if (M.z == 2)
if (CONFIG_GET(flag/allow_admin_jump))
M.loc = get_turf(pick(GLOB.latejoin))
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1)
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
else
tgui_alert_async(usr, "Admin jumping disabled")
else
tgui_alert_async(usr, "[M.name] is not prisoned.")
feedback_add_details("admin_verb","UP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
/proc/is_special_character(var/character) // returns 1 for special characters and 2 for heroes of gamemode
if(!ticker || !ticker.mode)
return 0
var/datum/mind/M
if (ismob(character))
var/mob/C = character
M = C.mind
else if(istype(character, /datum/mind))
M = character
if(M)
if(ticker.mode.antag_templates && ticker.mode.antag_templates.len)
for(var/datum/antagonist/antag in ticker.mode.antag_templates)
if(antag.is_antagonist(M))
return 2
if(M.special_role)
return 1
if(isrobot(character))
var/mob/living/silicon/robot/R = character
if(R.emagged)
return 1
return 0
/datum/admins/proc/spawn_fruit(seedtype in SSplants.seeds)
set category = "Debug.Game"
set desc = "Spawn the product of a seed."
set name = "Spawn Fruit"
if(!check_rights(R_SPAWN)) return
if(!seedtype || !SSplants.seeds[seedtype])
return
var/amount = tgui_input_number(usr, "Amount of fruit to spawn", "Fruit Amount", 1)
if(!isnull(amount))
var/datum/seed/S = SSplants.seeds[seedtype]
S.harvest(usr,0,0,amount)
log_admin("[key_name(usr)] spawned [seedtype] fruit at ([usr.x],[usr.y],[usr.z])")
/datum/admins/proc/spawn_custom_item()
set category = "Debug.Game"
set desc = "Spawn a custom item."
set name = "Spawn Custom Item"
if(!check_rights(R_SPAWN)) return
var/owner = tgui_input_list(usr, "Select a ckey.", "Spawn Custom Item", custom_items)
if(!owner|| !custom_items[owner])
return
var/list/possible_items = custom_items[owner]
var/datum/custom_item/item_to_spawn = tgui_input_list(usr, "Select an item to spawn.", "Spawn Custom Item", possible_items)
if(!item_to_spawn)
return
item_to_spawn.spawn_item(get_turf(usr))
/datum/admins/proc/check_custom_items()
set category = "Debug.Investigate"
set desc = "Check the custom item list."
set name = "Check Custom Items"
if(!check_rights(R_SPAWN)) return
if(!custom_items)
to_chat(usr, "Custom item list is null.")
return
if(!custom_items.len)
to_chat(usr, "Custom item list not populated.")
return
for(var/assoc_key in custom_items)
to_chat(usr, "[assoc_key] has:")
var/list/current_items = custom_items[assoc_key]
for(var/datum/custom_item/item in current_items)
to_chat(usr, "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]")
/datum/admins/proc/spawn_plant(seedtype in SSplants.seeds)
set category = "Debug.Game"
set desc = "Spawn a spreading plant effect."
set name = "Spawn Plant"
if(!check_rights(R_SPAWN)) return
if(!seedtype || !SSplants.seeds[seedtype])
return
new /obj/effect/plant(get_turf(usr), SSplants.seeds[seedtype])
log_admin("[key_name(usr)] spawned [seedtype] vines at ([usr.x],[usr.y],[usr.z])")
/datum/admins/proc/spawn_atom(var/object as text)
set name = "Spawn"
set category = "Debug.Game"
set desc = "(atom path) Spawn an atom"
if(!check_rights(R_SPAWN)) return
var/list/types = typesof(/atom)
var/list/matches = new()
for(var/path in types)
if(findtext("[path]", object))
matches += path
if(matches.len==0)
return
var/chosen
if(matches.len==1)
chosen = matches[1]
else
chosen = tgui_input_list(usr, "Select an atom type", "Spawn Atom", matches)
if(!chosen)
return
if(ispath(chosen,/turf))
var/turf/T = get_turf(usr.loc)
T.ChangeTurf(chosen)
else
new chosen(usr.loc)
log_and_message_admins("spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/show_traitor_panel(var/mob/M in mob_list)
set category = "Admin.Events"
set desc = "Edit mobs's memory and role"
set name = "Show Traitor Panel"
if(!istype(M))
to_chat(usr, "This can only be used on instances of type /mob")
return
if(!M.mind)
to_chat(usr, "This mob has no mind!")
return
M.mind.edit_memory()
feedback_add_details("admin_verb","STP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/show_game_mode()
set category = "Admin.Game"
set desc = "Show the current round configuration."
set name = "Show Game Mode"
if(!ticker || !ticker.mode)
tgui_alert_async(usr, "Not before roundstart!", "Alert")
return
var/out = span_large(span_bold("Current mode: [ticker.mode.name] ([ticker.mode.config_tag])")) + "
"
out += "