var/global/BSACooldown = 0
var/global/floorIsLava = 0
var/global/enabled_spooking = 0
////////////////////////////////
/proc/message_admins(var/msg)
msg = "ADMIN LOG: [msg]"
for(var/s in staff)
var/client/C = s
if((R_ADMIN|R_MOD) & C.holder.rights)
to_chat(C, msg)
/proc/message_cciaa(var/msg)
msg = "CCIA LOG: [msg]"
for(var/s in staff)
var/client/C = s
if(R_CCIAA & C.holder.rights)
to_chat(C, msg)
/proc/msg_admin_attack(var/text,var/ckey="",var/ckey_target="") //Toggleable Attack Messages
log_attack(text,ckey=ckey,ckey_target=ckey_target)
var/rendered = "ATTACK: [text]"
for(var/s in staff)
var/client/C = s
if((R_ADMIN|R_MOD) & C.holder.rights)
if(C.prefs.toggles & CHAT_ATTACKLOGS)
var/msg = rendered
to_chat(C, msg)
proc/admin_notice(var/message, var/rights)
for(var/mob/M in mob_list)
if(check_rights(rights, 0, M))
to_chat(M, message)
///////////////////////////////////////////////////////////////////////////////////////////////Panels
/datum/admins/proc/show_player_panel(var/mob/M in mob_list)
set category = "Admin"
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 = "
\[[world.time]\] [COMMENT.author]:[COMMENT.message]
Return"
else
dat+="Please report this on GitHub, along with what you did to make this appear."
send_theme_resources(usr)
usr << browse(enable_ui_theme(usr, dat), "window=admincaster_main;size=400x600")
onclose(usr, "admincaster_main")
/datum/admins/proc/Jobbans()
if(!check_rights(R_BAN))
return
// RIP whoever uses this panel. It's going to be amazingly painful!
var/dat = "Job Bans!
"
dat += "Search via ckey
"
dat += ""
for (var/ckey in jobban_keylist)
for (var/job in jobban_keylist[ckey])
var/list/ban = jobban_keylist[ckey][job]
if (!jobban_isexpired(ban, null, job, ckey))
dat += "| [ckey] - [ban[2]] - (unban) |
"
dat += "
"
usr << browse(dat, "window=ban;size=400x400")
/datum/admins/proc/Game()
if(!check_rights(0)) return
var/dat = {"
Game Panel
\n
Change Game Mode
"}
if(master_mode == ROUNDTYPE_STR_SECRET || master_mode == ROUNDTYPE_STR_MIXED_SECRET)
dat += "(Force Secret Mode)
"
dat += {"
Create Object
Create Turf
Create Mob
Edit Airflow Settings
Edit Phoron Settings
Choose a default ZAS setting
"}
usr << browse(dat, "window=admin2;size=210x280")
return
/datum/admins/proc/Secrets()
if(!check_rights(0)) return
var/dat = "The first rule of adminbuse is: you don't talk about the adminbuse.
"
for(var/datum/admin_secret_category/category in admin_secrets.categories)
if(!category.can_view(usr))
continue
dat += "[category.name]
"
if(category.desc)
dat += "[category.desc]
"
for(var/datum/admin_secret_item/item in category.items)
if(!item.can_view(usr))
continue
dat += "[item.name()]
"
dat += "
"
usr << browse(dat, "window=secrets")
return
/////////////////////////////////////////////////////////////////////////////////////////////////admins2.dm merge
//i.e. buttons/verbs
/datum/admins/proc/restart()
set category = "Server"
set name = "Restart"
set desc="Restarts the world"
if (!usr.client.holder)
return
var/confirm = alert("Restart the game world?", "Restart", "Yes", "Cancel")
if(confirm == "Cancel")
return
if(confirm == "Yes")
to_world("Restarting world! Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!")
log_admin("[key_name(usr)] initiated a reboot.")
feedback_set_details("end_error","admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
feedback_add_details("admin_verb","R") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
sleep(50)
world.Reboot()
/datum/admins/proc/announce()
set category = "Special Verbs"
set name = "Announce"
set desc="Announce your desires to the world"
if (!check_rights(R_ADMIN))
return
var/message = input("Global message to send:", "Admin Announce", null, null) as message
if(message)
if(!check_rights(R_SERVER, 0))
message = sanitize(message, 500, extra = 0)
message = replacetext(message, "\n", "
") // required since we're putting it in a tag
to_world("[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:[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!
/datum/admins/proc/toggleooc()
set category = "Server"
set desc="Globally Toggles OOC"
set name="Toggle OOC"
if(!check_rights(R_ADMIN))
return
config.ooc_allowed = !(config.ooc_allowed)
if (config.ooc_allowed)
to_world("The OOC channel has been globally enabled!")
else
to_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"
set desc="Globally Toggles LOOC"
set name="Toggle LOOC"
if(!check_rights(R_ADMIN))
return
config.looc_allowed = !(config.looc_allowed)
if (config.looc_allowed)
to_world("The LOOC channel has been globally enabled!")
else
to_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"
set desc="Globally Toggles DSAY"
set name="Toggle DSAY"
if(!check_rights(R_ADMIN))
return
config.dsay_allowed = !(config.dsay_allowed)
if (config.dsay_allowed)
to_world("Deadchat has been globally enabled!")
else
to_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"
set desc="Toggle Dead OOC."
set name="Toggle Dead OOC"
if(!check_rights(R_ADMIN))
return
config.dooc_allowed = !( config.dooc_allowed )
log_and_message_admins("toggled dead (global) OOC. (New state: [config.dooc_allowed])")
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/toggle_dead_looc()
set category = "Server"
set desc = "Toggle Dead LOOC."
set name = "Toggle Dead LOOC"
if (!check_rights(R_ADMIN))
return
config.dead_looc_allowed = !config.dead_looc_allowed
log_and_message_admins("toggled dead LOOC. (New state: [config.dead_looc_allowed])")
/datum/admins/proc/togglehubvisibility()
set category = "Server"
set desc="Globally Toggles Hub Visibility"
set name="Toggle Hub Visibility"
if(!check_rights(R_SERVER))
return
world.visibility = !(world.visibility)
var/long_message = " toggled hub visibility. The server is now [world.visibility ? "visible" : "invisible"] ([world.visibility])."
post_webhook_event(WEBHOOK_ADMIN, list("title"="Hub visibility has been toggled", "message"="**[key_name(src)]**" + long_message))
discord_bot.send_to_admins("[key_name(src)]" + long_message)
message_admins("[key_name_admin(usr)]" + long_message, 1)
log_admin("[key_name(usr)] toggled hub visibility.")
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"
set desc="Toggle traitor scaling"
set name="Toggle Traitor Scaling"
config.traitor_scaling = !config.traitor_scaling
log_admin("[key_name(usr)] toggled Traitor Scaling to [config.traitor_scaling].")
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [config.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"
set desc="Start the round RIGHT NOW"
set name="Start Now"
if(Master.initializing)
alert("Unable to start the game as it is not set up.")
return
if(SSticker.current_state == GAME_STATE_PREGAME)
SSticker.current_state = GAME_STATE_SETTING_UP
log_admin("[usr.key] has started the game.")
message_admins("[usr.key] has started the game.")
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return 1
else
to_chat(usr, "Error: Start Now: Game has already started.")
return 0
/datum/admins/proc/toggleenter()
set category = "Server"
set desc="People can't enter"
set name="Toggle Entering"
config.enter_allowed = !(config.enter_allowed)
if (!(config.enter_allowed))
to_world("New players may no longer enter the game.")
else
to_world("New players may now enter the game.")
log_admin("[key_name(usr)] toggled new player game entering.")
message_admins("[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"
set desc="People can't be AI"
set name="Toggle AI"
config.allow_ai = !( config.allow_ai )
if (!( config.allow_ai ))
to_world("The AI job is no longer chooseable.")
else
to_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"
set desc="Respawn basically"
set name="Toggle Respawn"
config.abandon_allowed = !(config.abandon_allowed)
if(config.abandon_allowed)
to_world("You may now respawn.")
else
to_world("You may no longer respawn :(")
message_admins("[key_name_admin(usr)] toggled respawn to [config.abandon_allowed ? "On" : "Off"].", 1)
log_admin("[key_name(usr)] toggled respawn to [config.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/toggle_aliens()
set category = "Server"
set desc="Toggle alien mobs"
set name="Toggle Aliens"
config.aliens_allowed = !config.aliens_allowed
log_admin("[key_name(usr)] toggled Aliens to [config.aliens_allowed].")
message_admins("[key_name_admin(usr)] toggled Aliens [config.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"
set desc="Toggle space ninjas spawning."
set name="Toggle Space Ninjas"
config.ninjas_allowed = !config.ninjas_allowed
log_admin("[key_name(usr)] toggled Space Ninjas to [config.ninjas_allowed].")
message_admins("[key_name_admin(usr)] toggled Space Ninjas [config.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"
set desc="Delay the game start/end"
set name="Delay"
if(!check_rights(R_SERVER)) return
if (ROUND_IS_STARTED)
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("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
return //alert("Round end delayed", null, null, null, null, null)
round_progressing = !round_progressing
if (!round_progressing)
to_world("The game start has been delayed.")
log_admin("[key_name(usr)] delayed the game.")
else
to_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"
set desc="Toggle admin jumping"
set name="Toggle Jump"
config.allow_admin_jump = !(config.allow_admin_jump)
message_admins("Toggled admin jumping to [config.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"
set desc="Toggle admin spawning"
set name="Toggle Spawn"
config.allow_admin_spawning = !(config.allow_admin_spawning)
message_admins("Toggled admin item spawning to [config.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"
set desc="Toggle admin revives"
set name="Toggle Revive"
config.allow_admin_rev = !(config.allow_admin_rev)
message_admins("Toggled reviving to [config.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"
set desc="Reboots the server post haste"
set name="Immediate Reboot"
if(!usr.client.holder) return
if( alert("Reboot server?",,"Yes","No") == "No")
return
to_world("Rebooting world! 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!
world.Reboot()
/datum/admins/proc/unprison(var/mob/M in mob_list)
set category = "Admin"
set name = "Unprison"
if (M.z == 2)
if (config.allow_admin_jump)
M.forceMove(pick(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
alert("Admin jumping disabled")
else
alert("[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(mob/M as mob) // returns 1 for specail characters and 2 for heroes of gamemode
if(!SSticker.mode)
return 0
if (!istype(M))
return 0
if(M.mind)
if(SSticker.mode.antag_templates && SSticker.mode.antag_templates.len)
for(var/datum/antagonist/antag in SSticker.mode.antag_templates)
if(antag.is_antagonist(M.mind))
return 2
else if(M.mind.special_role)
return 1
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if(R.emagged)
return 1
return 0
/datum/admins/proc/spawn_fruit(seedtype in SSplants.seeds)
set category = "Debug"
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/datum/seed/S = SSplants.seeds[seedtype]
S.harvest(usr,0,0,1)
log_admin("[key_name(usr)] spawned [seedtype] fruit at ([usr.x],[usr.y],[usr.z])")
/datum/admins/proc/spawn_custom_item()
set category = "Debug"
set desc = "Spawn a custom item."
set name = "Spawn Custom Item"
if(!check_rights(R_SPAWN)) return
var/owner = input("Select a ckey.", "Spawn Custom Item") as null|anything in custom_items
if(!owner|| !custom_items[owner])
return
var/list/possible_items = custom_items[owner]
var/datum/custom_item/item_to_spawn = input("Select an item to spawn.", "Spawn Custom Item") as null|anything in possible_items
if(!item_to_spawn)
return
item_to_spawn.spawn_item(get_turf(usr))
/datum/admins/proc/spawn_plant(seedtype in SSplants.seeds)
set category = "Debug"
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 category = "Debug"
set desc = "(atom path) Spawn an atom"
set name = "Spawn"
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 = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in 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"
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"
set desc = "Show the current round configuration."
set name = "Show Game Mode"
if(!ROUND_IS_STARTED)
alert("Not before roundstart!", "Alert")
return
var/out = "Current mode: [SSticker.mode.name] ([SSticker.mode.config_tag])
"
out += "
"
if(SSticker.mode.ert_disabled)
out += "Emergency Response Teams: disabled"
else
out += "Emergency Response Teams: enabled"
out += "
"
if(SSticker.mode.deny_respawn)
out += "Respawning: disallowed"
else
out += "Respawning: allowed"
out += "
"
out += "Shuttle delay multiplier: [SSticker.mode.shuttle_delay]
"
if(SSticker.mode.auto_recall_shuttle)
out += "Shuttle auto-recall: enabled"
else
out += "Shuttle auto-recall: disabled"
out += "
"
if(SSticker.mode.event_delay_mod_moderate)
out += "Moderate event time modifier: [SSticker.mode.event_delay_mod_moderate]
"
else
out += "Moderate event time modifier: unset
"
if(SSticker.mode.event_delay_mod_major)
out += "Major event time modifier: [SSticker.mode.event_delay_mod_major]
"
else
out += "Major event time modifier: unset
"
out += "
"
if(LAZYLEN(SSticker.mode.antag_tags))
out += "Core antag templates:"
for(var/antag_tag in SSticker.mode.antag_tags)
out += "[antag_tag]."
if(SSticker.mode.round_autoantag)
out += "Autotraitor enabled."
if(SSticker.mode.antag_scaling_coeff > 0)
out += " (scaling with [SSticker.mode.antag_scaling_coeff])"
else
out += " (not currently scaling, set a coefficient)"
out += "
"
else
out += "Autotraitor disabled.
"
out += "All antag ids:"
if(LAZYLEN(SSticker.mode.antag_templates))
for(var/datum/antagonist/antag in SSticker.mode.antag_templates)
antag.update_current_antag_max()
out += " [antag.id]"
out += " ([antag.get_antag_count()]/[antag.cur_max]) "
out += " \[-\]
"
else
out += " None."
out += " \[+\]
"
usr << browse(out, "window=edit_mode[src]")
feedback_add_details("admin_verb","SGM")
/datum/admins/proc/toggletintedweldhelmets()
set category = "Debug"
set desc="Reduces view range when wearing welding helmets"
set name="Toggle tinted welding helmets."
config.welder_vision = !( config.welder_vision )
if (config.welder_vision)
to_world("Reduced welder vision has been enabled!")
else
to_world("Reduced welder vision has been disabled!")
log_admin("[key_name(usr)] toggled welder vision.")
message_admins("[key_name_admin(usr)] toggled welder vision.", 1)
feedback_add_details("admin_verb","TTWH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggleguests()
set category = "Server"
set desc="Guests can't enter"
set name="Toggle guests"
config.guests_allowed = !(config.guests_allowed)
if (!(config.guests_allowed))
to_world("Guests may no longer enter the game.")
else
to_world("Guests may now enter the game.")
log_admin("[key_name(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed.")
message_admins("[key_name_admin(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed.", 1)
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/output_ai_laws()
var/ai_number = 0
for(var/mob/living/silicon/S in mob_list)
ai_number++
if(isAI(S))
to_chat(usr, "AI [key_name(S, usr)]'s laws:")
else if(isrobot(S))
var/mob/living/silicon/robot/R = S
to_chat(usr, "CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:")
else if (ispAI(S))
to_chat(usr, "pAI [key_name(S, usr)]'s laws:")
else
to_chat(usr, "SOMETHING SILICON [key_name(S, usr)]'s laws:")
if (S.laws == null)
to_chat(usr, "[key_name(S, usr)]'s laws are null?? Contact a coder.")
else
S.laws.show_laws(usr)
if(!ai_number)
to_chat(usr, "No AIs located") //Just so you know the thing is actually working and not just ignoring you.)
/datum/admins/proc/show_skills()
set category = "Admin"
set name = "Show Skills"
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/mob/living/carbon/human/M = input("Select mob.", "Select mob.") as null|anything in human_mob_list
if(!M) return
show_skill_window(usr, M)
return
/client/proc/update_mob_sprite(mob/living/carbon/human/H as mob)
set category = "Admin"
set name = "Update Mob Sprite"
set desc = "Should fix any mob sprite update errors."
if (!holder)
to_chat(src, "Only administrators may use this command.")
return
if(istype(H))
H.regenerate_icons()
/proc/get_options_bar(whom, detail = 2, name = 0, link = 1, highlight_special = 1, var/datum/ticket/ticket = null)
if(!whom)
return "(*null*)"
var/mob/M
var/client/C
if(istype(whom, /client))
C = whom
M = C.mob
else if(istype(whom, /mob))
M = whom
C = M.client
else
return "(*not a mob*)"
switch(detail)
if(0)
return "[key_name(C, link, name, highlight_special, ticket)]"
if(1) //Private Messages
return "[key_name(C, link, name, highlight_special, ticket)](?)"
if(2) //Admins
var/ref_mob = "\ref[M]"
return "[key_name(C, link, name, highlight_special, ticket)](?) (PP) (VV) (SM) ([admin_jump_link(M)]) (CA)"
if(3) //Devs
var/ref_mob = "\ref[M]"
return "[key_name(C, link, name, highlight_special, ticket)](VV)([admin_jump_link(M)])"
if(4) //Mentors
var/ref_mob = "\ref[M]"
return "[key_name(C, link, name, highlight_special, ticket)] (?) (PP) (VV) (SM) ([admin_jump_link(M)])"
//
//ALL DONE
//*********************************************************************************************************
//
//Returns 1 to let the dragdrop code know we are trapping this event
//Returns 0 if we don't plan to trap the event
/datum/admins/proc/cmd_ghost_drag(var/mob/abstract/observer/frommob, var/mob/living/tomob)
if(!istype(frommob))
return //Extra sanity check to make sure only observers are shoved into things
//Same as assume-direct-control perm requirements.
if (!check_rights(R_VAREDIT,0) || !check_rights(R_ADMIN|R_DEBUG|R_DEV,0))
return 0
if (!frommob.ckey)
return 0
var/question = ""
if (tomob.ckey)
question = "This mob already has a user ([tomob.key]) in control of it! "
question += "Are you sure you want to place [frommob.name]([frommob.key]) in control of [tomob.name]?"
var/ask = alert(question, "Place ghost in control of mob?", "Yes", "No")
if (ask != "Yes")
return 1
if (!frommob || !tomob) //make sure the mobs don't go away while we waited for a response
return 1
if(tomob.client) //No need to ghostize if there is no client
tomob.ghostize(0)
message_admins("[key_name_admin(usr)] has put [frommob.ckey] in control of [tomob.name].")
log_admin("[key_name(usr)] stuffed [frommob.ckey] into [tomob.name].")
feedback_add_details("admin_verb","CGD")
tomob.ckey = frommob.ckey
qdel(frommob)
return 1
/datum/admins/proc/force_antag_latespawn()
set category = "Admin"
set name = "Force Template Spawn"
set desc = "Force an antagonist template to spawn."
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
to_chat(usr, "Error: you are not an admin!")
return
if(!SSticker.mode)
to_chat(usr, "Mode has not started.")
return
var/antag_type = input("Choose a template.","Force Latespawn") as null|anything in all_antag_types
if(!antag_type || !all_antag_types[antag_type])
to_chat(usr, "Aborting.")
return
var/datum/antagonist/antag = all_antag_types[antag_type]
message_admins("[key_name(usr)] attempting to force latespawn with template [antag.id].")
antag.attempt_auto_spawn()
/datum/admins/proc/force_mode_latespawn()
set category = "Admin"
set name = "Force Mode Spawn"
set desc = "Force autotraitor to proc."
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins) || !check_rights(R_ADMIN))
to_chat(usr, "Error: you are not an admin!")
return
if(!SSticker || !SSticker.mode)
to_chat(usr, "Mode has not started.")
return
log_and_message_admins("attempting to force mode autospawn.")
SSticker.mode.process_autoantag()
/datum/admins/proc/paralyze_mob(mob/living/H as mob)
set category = "Admin"
set name = "Toggle Wind"
set desc = "Paralyzes a player. Or unparalyses them."
var/msg
if(check_rights(R_ADMIN|R_MOD))
if (H.paralysis == 0)
msg = "has paralyzed [key_name_admin(H)]."
H.visible_message("OOC Information: [H] has been winded by a member of staff! Please freeze all roleplay involving their character until the matter is resolved! Adminhelp if you have further questions.", "You have been winded by a member of staff! Please stand by until they contact you!")
H.paralysis = 8000
else
if (alert("The player is currently winded. Do you want to unwind him?", "Unwind player?", "Yes", "No") == "No")
return
H.paralysis = 0
msg = "has unparalyzed [key_name_admin(H)]."
H.visible_message("OOC Information: [H] has been unwinded by a member of staff!", "You have been unwinded by a member of staff!")
log_and_message_admins(msg)
feedback_add_details("admin_verb", "WIND")
/datum/admins/proc/toggle_round_spookyness()
set category = "Server"
set desc="Toggle the round spooky value."
set name="Toggle Round Spookyness"
enabled_spooking = !enabled_spooking
log_admin("[key_name(usr)] toggled the round spookyness to [enabled_spooking].")
message_admins("[key_name_admin(usr)] toggled the round spookyness [enabled_spooking ? "on" : "off"].", 1)
feedback_add_details("admin_verb","SPOOKY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/ccannoucment()
set category = "Special Verbs"
set name = "Custom sound Command Announcment"
set desc = "Emulate announcement that looks and sounds like the real one"
if(!check_rights(R_FUN))
return
var/title = input("Announcement TITLE:", "CAnnounce", null, null) as text
if(!title)
return
if(!check_rights(R_SERVER,0))
title = sanitize(title, 255, extra = 0)
var/message = input("Announcement content:", "CAnnounce", null, null) as message
if(!message)
return
if(!check_rights(R_SERVER,0))
message = sanitize(message, 500, extra = 0)
var/list/sounds = file2list("sound/serversound_list.txt");
sounds += "--CANCEL--"
sounds += "--LOCAL--"
sounds += sounds_cache
var/melody = input("Select a sound from the server to play", "Server sound list", "--CANCEL--") in sounds
if(melody == "--CANCEL--")
return
if(melody == "--LOCAL--")
melody = input("Select a sound to play", "Sound select") as sound
if(!melody)
return
command_announcement.Announce(message, title, new_sound = melody)
log_and_message_admins("made custom announcement with custom sound", usr)
feedback_add_details("admin_verb","ACS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!