var/global/BSACooldown = 0
var/global/floorIsLava = 0
var/global/nologevent = 0
////////////////////////////////
/proc/message_admins(var/msg)
msg = "ADMIN LOG: [msg]"
log_adminwarn(msg)
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
if(C.prefs && !(C.prefs.toggles & CHAT_NO_ADMINLOGS))
to_chat(C, msg)
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
log_attack(text)
if(!nologevent)
var/rendered = "ATTACK: [text]"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
if(C.prefs.toggles & CHAT_ATTACKLOGS)
if(!istype(C, /mob/living))
var/msg = rendered
to_chat(C, msg)
///////////////////////////////////////////////////////////////////////////////////////////////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(!check_rights(R_ADMIN|R_MOD))
return
var/body = "
Options for [M.key]"
body += "Options panel for [M]"
if(M.client)
body += " played by [M.client] "
body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\]"
if(istype(M, /mob/new_player))
body += " Hasn't Entered Game "
else
body += " \[Heal\] "
body += "
\[ "
body += "VV - "
body += "TP - "
body += "PM - "
body += "SM - "
body += "[admin_jump_link(M, src)]\]
"
body += "Mob type: [M.type]
"
if(M.client)
if(M.client.related_accounts_cid.len)
body += "Related accounts by CID: [jointext(M.client.related_accounts_cid, " - ")]
"
if(M.client.related_accounts_ip.len)
body += "Related accounts by IP: [jointext(M.client.related_accounts_ip, " - ")]
"
body += "Kick | "
body += "Warn | "
body += "Ban | "
body += "Jobban | "
body += "Appearance Ban | "
body += "Notes | "
if(M.client)
if(M.client.check_watchlist(M.client.ckey))
body += "Remove from Watchlist | "
body += "Edit Watchlist Reason "
else
body += "Add to Watchlist "
if(M.client)
body += "| Prison | "
body += "\ Send back to Lobby | "
var/muted = M.client.prefs.muted
body += {"
Mute:
\[IC |
OOC |
PRAY |
ADMINHELP |
DEADCHAT\]
(toggle all)
"}
var/jumptoeye = ""
if(isAI(M))
var/mob/living/silicon/ai/A = M
if(A.client && A.eyeobj) // No point following clientless AI eyes
jumptoeye = " (Eye)"
body += {"
Jump to[jumptoeye] |
Get |
Send To
[check_rights(R_ADMIN,0) ? "Traitor panel | " : "" ]
Narrate to |
Subtle message
"}
if(M.client)
if(!istype(M, /mob/new_player))
body += "
"
body += "Transformation:"
body += "
"
//Monkey
if(issmall(M))
body += "Monkeyized | "
else
body += "Monkeyize | "
//Corgi
if(iscorgi(M))
body += "Corgized | "
else
body += "Corgize | "
//AI / Cyborg
if(isAI(M))
body += "Is an AI "
else if(ishuman(M))
body += {"Make AI |
Make Mask |
Make Robot |
Make Alien |
Make Slime |
Make Superhero
"}
//Simple Animals
if(isanimal(M))
body += "Re-Animalize | "
else
body += "Animalize | "
if(istype(M, /mob/dead/observer))
body += "Re-incarnate | "
if(ispAI(M))
body += "Is a pAI "
else
body += "Make pAI | "
// DNA2 - Admin Hax
if(M.dna && iscarbon(M))
body += "
"
body += "DNA Blocks:
| | 1 | 2 | 3 | 4 | 5 | "
var/bname
for(var/block=1;block<=DNA_SE_LENGTH;block++)
if(((block-1)%5)==0)
body += "
|---|
| [block-1] | "
bname = assigned_blocks[block]
body += ""
if(bname)
var/bstate=M.dna.GetSEState(block)
var/bcolor="[(bstate)?"#006600":"#ff0000"]"
body += "[bname][block]"
else
body += "[block]"
body+=" | "
body += "
|---|
"
body += {"
Rudimentary transformation:
These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.
Observer |
\[ Alien: Drone,
Hunter,
Queen,
Sentinel,
Larva \]
Human
\[ slime: Baby,
Adult \]
Monkey |
Cyborg |
Cat |
Runtime |
Corgi |
Ian |
Crab |
Coffee |
\[ Construct: Armoured ,
Builder ,
Wraith \]
Shade
"}
if(M.client)
body += {"
Other actions:
Forcesay |
Admin Room |
Thunderdome 1 |
Thunderdome 2 |
Thunderdome Admin |
Thunderdome Observer |
"}
body += {"
"}
usr << browse(body, "window=adminplayeropts;size=550x615")
feedback_add_details("admin_verb","SPP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/player_info/var/author // admin who authored the information
/datum/player_info/var/rank //rank of admin who made the notes
/datum/player_info/var/content // text content of the information
/datum/player_info/var/timestamp // Because this is bloody annoying
#define PLAYER_NOTES_ENTRIES_PER_PAGE 50
/datum/admins/proc/PlayerNotes()
set category = "Admin"
set name = "Player Notes"
if(!check_rights(R_ADMIN|R_MOD))
return
show_note()
/datum/admins/proc/show_player_notes(var/key as text)
set category = "Admin"
set name = "Show Player Notes"
if(!check_rights(R_ADMIN|R_MOD))
return
show_note(key)
/datum/admins/proc/access_news_network() //MARKER
set category = "Event"
set name = "Access Newscaster Network"
set desc = "Allows you to view, add and edit news feeds."
if(!check_rights(R_EVENT))
return
if(!istype(src,/datum/admins))
src = usr.client.holder
var/dat
dat = text("Admin NewscasterAdmin Newscaster Unit
")
switch(admincaster_screen)
if(0)
dat += {"Welcome to the admin newscaster.
Here you can add, edit and censor every newspiece on the network.
Feed channels and stories entered through here will be uneditable and handled as official news by the rest of the units.
Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things!
"}
if(news_network.wanted_issue)
dat+= "
Read Wanted Issue"
dat+= {"
Create Feed Channel
View Feed Channels
Submit new Feed story
Exit
"}
var/wanted_already = 0
if(news_network.wanted_issue)
wanted_already = 1
dat+={"
Feed Security functions:
[(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue
Censor Feed Stories
Mark Feed Channel with Nanotrasen D-Notice (disables and locks the channel.
The newscaster recognises you as:
[src.admincaster_signature]
"}
if(1)
dat+= "Station Feed Channels
"
if( isemptylist(news_network.network_channels) )
dat+="No active channels found..."
else
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
if(CHANNEL.is_admin_channel)
dat+="[CHANNEL.channel_name]
"
else
dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
"
dat+={"
Refresh
Back
"}
if(2)
dat+={"
Creating new Feed Channel...
Channel Name: [src.admincaster_feed_channel.channel_name]
Channel Author: [src.admincaster_signature]
Will Accept Public Feeds: [(src.admincaster_feed_channel.locked) ? ("NO") : ("YES")]
Submit
Cancel
"}
if(3)
dat+={"
Creating new Feed Message...
Receiving Channel: [src.admincaster_feed_channel.channel_name]
Message Author: [src.admincaster_signature]
Message Body: [src.admincaster_feed_message.body]
Submit
Cancel
"}
if(4)
dat+={"
Feed story successfully submitted to [src.admincaster_feed_channel.channel_name].
Return
"}
if(5)
dat+={"
Feed Channel [src.admincaster_feed_channel.channel_name] created successfully.
Return
"}
if(6)
dat+="ERROR: Could not submit Feed story to Network.
"
if(src.admincaster_feed_channel.channel_name=="")
dat+="Invalid receiving channel name.
"
if(src.admincaster_feed_message.body == "" || src.admincaster_feed_message.body == "\[REDACTED\]")
dat+="Invalid message body.
"
dat+="
Return
"
if(7)
dat+="ERROR: Could not submit Feed Channel to Network.
"
if(src.admincaster_feed_channel.channel_name =="" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]")
dat+="Invalid channel name.
"
var/check = 0
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
check = 1
break
if(check)
dat+="Channel name already in use.
"
dat+="
Return
"
if(9)
dat+="[src.admincaster_feed_channel.channel_name]: \[created by: [src.admincaster_feed_channel.author]\]
"
if(src.admincaster_feed_channel.censored)
dat+={"
ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
No further feed story additions are allowed while the D-Notice is in effect.
"}
else
if( isemptylist(src.admincaster_feed_channel.messages) )
dat+="No feed messages found in channel...
"
else
var/i = 0
for(var/datum/feed_message/MESSAGE in src.admincaster_feed_channel.messages)
i++
dat+="-[MESSAGE.body]
"
if(MESSAGE.img)
usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
dat+="
"
dat+="\[Story by [MESSAGE.author]\]
"
dat+={"
Refresh
Back
"}
if(10)
dat+={"
Nanotrasen Feed Censorship Tool
NOTE: Due to the nature of news Feeds, total deletion of a Feed Story is not possible.
Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it.
Select Feed channel to get Stories from:
"}
if(isemptylist(news_network.network_channels))
dat+="No feed channels found active...
"
else
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
"
dat+="
Cancel"
if(11)
dat+={"
Nanotrasen D-Notice Handler
A D-Notice is to be bestowed upon the channel if the handling Authority deems it as harmful for the station's
morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed
stories it might contain at the time. You can lift a D-Notice if you have the required access at any time.
"}
if(isemptylist(news_network.network_channels))
dat+="No feed channels found active...
"
else
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
"
dat+="
Back"
if(12)
dat+={"
[src.admincaster_feed_channel.channel_name]: \[ created by: [src.admincaster_feed_channel.author] \]
[(src.admincaster_feed_channel.author=="\[REDACTED\]") ? ("Undo Author censorship") : ("Censor channel Author")]
"}
if( isemptylist(src.admincaster_feed_channel.messages) )
dat+="No feed messages found in channel...
"
else
for(var/datum/feed_message/MESSAGE in src.admincaster_feed_channel.messages)
dat+={"
-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
[(MESSAGE.body == "\[REDACTED\]") ? ("Undo story censorship") : ("Censor story")] - [(MESSAGE.author == "\[REDACTED\]") ? ("Undo Author Censorship") : ("Censor message Author")]
"}
dat+="
Back"
if(13)
dat+={"
[src.admincaster_feed_channel.channel_name]: \[ created by: [src.admincaster_feed_channel.author] \]
Channel messages listed below. If you deem them dangerous to the station, you can Bestow a D-Notice upon the channel.
"}
if(src.admincaster_feed_channel.censored)
dat+={"
ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
No further feed story additions are allowed while the D-Notice is in effect.
"}
else
if( isemptylist(src.admincaster_feed_channel.messages) )
dat+="No feed messages found in channel...
"
else
for(var/datum/feed_message/MESSAGE in src.admincaster_feed_channel.messages)
dat+="-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
"
dat+="
Back"
if(14)
dat+="Wanted Issue Handler:"
var/wanted_already = 0
var/end_param = 1
if(news_network.wanted_issue)
wanted_already = 1
end_param = 2
if(wanted_already)
dat+="
A wanted issue is already in Feed Circulation. You can edit or cancel it below."
dat+={"
Criminal Name: [src.admincaster_feed_message.author]
Description: [src.admincaster_feed_message.body]
"}
if(wanted_already)
dat+="Wanted Issue created by: [news_network.wanted_issue.backup_author]
"
else
dat+="Wanted Issue will be created under prosecutor: [src.admincaster_signature]
"
dat+="
[(wanted_already) ? ("Edit Issue") : ("Submit")]"
if(wanted_already)
dat+="
Take down Issue"
dat+="
Cancel"
if(15)
dat+={"
Wanted issue for [src.admincaster_feed_message.author] is now in Network Circulation.
Return
"}
if(16)
dat+="ERROR: Wanted Issue rejected by Network.
"
if(src.admincaster_feed_message.author =="" || src.admincaster_feed_message.author == "\[REDACTED\]")
dat+="Invalid name for person wanted.
"
if(src.admincaster_feed_message.body == "" || src.admincaster_feed_message.body == "\[REDACTED\]")
dat+="Invalid description.
"
dat+="
Return
"
if(17)
dat+={"
Wanted Issue successfully deleted from Circulation
Return
"}
if(18)
dat+={"
-- STATIONWIDE WANTED ISSUE --
\[Submitted by: [news_network.wanted_issue.backup_author]\]
Criminal: [news_network.wanted_issue.author]
Description: [news_network.wanted_issue.body]
Photo::
"}
if(news_network.wanted_issue.img)
usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png")
dat+="
"
else
dat+="None"
dat+="
Back
"
if(19)
dat+={"
Wanted issue for [src.admincaster_feed_message.author] successfully edited.
Return
"}
else
dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com"
// to_chat(world, "Channelname: [src.admincaster_feed_channel.channel_name] [src.admincaster_feed_channel.author]")
// to_chat(world, "Msg: [src.admincaster_feed_message.author] [src.admincaster_feed_message.body]")
usr << browse(dat, "window=admincaster_main;size=400x600")
onclose(usr, "admincaster_main")
/datum/admins/proc/Jobbans()
if(!check_rights(R_BAN))
return
var/dat = "Job Bans!
"
for(var/t in jobban_keylist)
var/r = t
if( findtext(r,"##") )
r = copytext( r, 1, findtext(r,"##") )//removes the description
dat += text("| [t] (unban) |
")
dat += "
"
usr << browse(dat, "window=ban;size=400x400")
/datum/admins/proc/Game()
if(!check_rights(R_ADMIN))
return
var/dat = {"
Game Panel
\n
Change Game Mode
"}
if(master_mode == "secret")
dat += "(Force Secret Mode)
"
dat += {"
Create Object
Quick Create Object
Create Turf
Create Mob
"}
usr << browse(dat, "window=admin2;size=210x280")
return
/////////////////////////////////////////////////////////////////////////////////////////////////admins2.dm merge
//i.e. buttons/verbs
/datum/admins/proc/restart()
set category = "Server"
set name = "Restart"
set desc = "Restarts the world."
if(!check_rights(R_SERVER))
return
var/delay = input("What delay should the restart have (in seconds)?", "Restart Delay", 5) as num|null
if(isnull(delay))
return
else
delay = delay * 10
message_admins("[key_name_admin(usr)] has initiated a server restart with a delay of [delay/10] seconds")
log_admin("[key_name(usr)] has initiated a server restart with a delay of [delay/10] seconds")
ticker.delay_end = 0
feedback_add_details("admin_verb","R") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
world.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay)
/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|null
if(message)
if(!check_rights(R_SERVER,0))
message = adminscrub(message,500)
message = replacetext(message, "\n", "
") // required since we're putting it in a tag
to_chat(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
toggle_ooc()
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_chat(world, "The LOOC channel has been globally enabled!")
else
to_chat(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_chat(world, "Deadchat has been globally enabled!")
else
to_chat(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_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/startnow()
set category = "Server"
set desc="Start the round RIGHT NOW"
set name="Start Now"
if(!check_rights(R_SERVER))
return
if(!ticker)
alert("Unable to start the game as it is not set up.")
return
if(ticker.current_state == GAME_STATE_PREGAME)
ticker.current_state = GAME_STATE_SETTING_UP
log_admin("[key_name(usr)] has started the game.")
message_admins("[key_name_admin(usr)] 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"
if(!check_rights(R_SERVER))
return
enter_allowed = !( enter_allowed )
if(!( enter_allowed ))
to_chat(world, "New players may no longer enter the game.")
else
to_chat(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 = "Event"
set desc="People can't be AI"
set name="Toggle AI"
if(!check_rights(R_EVENT))
return
config.allow_ai = !( config.allow_ai )
if(!( config.allow_ai ))
to_chat(world, "The AI job is no longer chooseable.")
else
to_chat(world, "The AI job is chooseable now.")
message_admins("[key_name_admin(usr)] toggled AI allowed.")
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="Toggle the ability for players to respawn."
set name="Toggle Respawn"
if(!check_rights(R_SERVER))
return
abandon_allowed = !( abandon_allowed )
if(abandon_allowed)
to_chat(world, "You may now respawn.")
else
to_chat(world, "You may no longer respawn :(")
message_admins("[key_name_admin(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].", 1)
log_admin("[key_name(usr)] toggled respawn to [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 = "Event"
set desc="Toggle alien mobs"
set name="Toggle Aliens"
if(!check_rights(R_EVENT))
return
aliens_allowed = !aliens_allowed
log_admin("[key_name(usr)] toggled aliens to [aliens_allowed].")
message_admins("[key_name_admin(usr)] toggled aliens [aliens_allowed ? "on" : "off"].")
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/delay()
set category = "Server"
set desc="Delay the game start/end"
set name="Delay"
if(!check_rights(R_SERVER))
return
if(!ticker || ticker.current_state != GAME_STATE_PREGAME)
ticker.delay_end = !ticker.delay_end
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
return //alert("Round end delayed", null, null, null, null, null)
going = !( going )
if(!( going ))
to_chat(world, "The game start has been delayed.")
log_admin("[key_name(usr)] delayed the game.")
else
to_chat(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!
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
/proc/is_special_character(mob/M as mob) // returns 1 for specail characters and 2 for heroes of gamemode
if(!ticker || !ticker.mode)
return 0
if(!istype(M))
return 0
if((M.mind in ticker.mode.head_revolutionaries) || (M.mind in ticker.mode.revolutionaries))
if(ticker.mode.config_tag == "revolution")
return 2
return 1
if(M.mind in ticker.mode.cult)
if(ticker.mode.config_tag == "cult")
return 2
return 1
if(M.mind in ticker.mode.malf_ai)
if(ticker.mode.config_tag == "malfunction")
return 2
return 1
if(M.mind in ticker.mode.syndicates)
if(ticker.mode.config_tag == "nuclear")
return 2
return 1
if(M.mind in ticker.mode.wizards)
if(ticker.mode.config_tag == "wizard")
return 2
return 1
if(M.mind in ticker.mode.changelings)
if(ticker.mode.config_tag == "changeling")
return 2
return 1
if(M.mind in ticker.mode.abductors)
if(ticker.mode.config_tag == "abduction")
return 2
return 1
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if(R.emagged)
return 1
if(M.mind&&M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist.
return 1
return 0
/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_admin("[key_name(usr)] 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(!check_rights(R_ADMIN|R_MOD))
return
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/toggleguests()
set category = "Server"
set desc="Guests can't enter"
set name="Toggle Guests"
if(!check_rights(R_SERVER))
return
guests_allowed = !( guests_allowed )
if(!( guests_allowed ))
to_chat(world, "Guests may no longer enter the game.")
else
to_chat(world, "Guests may now enter the game.")
log_admin("[key_name(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.")
message_admins("\blue [key_name_admin(usr)] toggled guests game entering [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)]'s [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independent)"] laws:")
else if(ispAI(S))
var/mob/living/silicon/pai/P = S
to_chat(usr, "pAI [key_name(S, usr)]'s laws:")
to_chat(usr, "[P.pai_law0]")
if(P.pai_laws)
to_chat(usr, "[P.pai_laws]")
continue // Skip showing normal silicon laws for pAIs - they don't have any
else
to_chat(usr, "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 AI's located.")//Just so you know the thing is actually working and not just ignoring you.
log_admin("[key_name(usr)] checked the AI laws")
message_admins("[key_name_admin(usr)] checked the AI laws")
/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(!check_rights(R_ADMIN))
return
if(istype(H))
H.regenerate_icons()
//
//
//ALL DONE
//*********************************************************************************************************
var/gamma_ship_location = 1 // 0 = station , 1 = space
/proc/move_gamma_ship()
var/area/fromArea
var/area/toArea
if(gamma_ship_location == 1)
fromArea = locate(/area/shuttle/gamma/space)
toArea = locate(/area/shuttle/gamma/station)
else
fromArea = locate(/area/shuttle/gamma/station)
toArea = locate(/area/shuttle/gamma/space)
fromArea.move_contents_to(toArea)
for(var/turf/simulated/floor/mech_bay_recharge_floor/F in toArea)
F.init_devices()
for(var/obj/machinery/power/apc/A in toArea)
A.init()
for(var/obj/machinery/alarm/A in toArea)
A.first_run()
if(gamma_ship_location)
gamma_ship_location = 0
else
gamma_ship_location = 1
return
/proc/formatJumpTo(var/location,var/where="")
var/turf/loc
if(istype(location,/turf/))
loc = location
else
loc = get_turf(location)
if(where=="")
where=formatLocation(loc)
return "[where]"
/proc/formatLocation(var/location)
var/turf/loc
if(istype(location,/turf/))
loc = location
else
loc = get_turf(location)
var/area/A = get_area(location)
return "[A.name] - [loc.x],[loc.y],[loc.z]"
/proc/formatPlayerPanel(var/mob/U,var/text="PP")
return "[text]"
//Kicks all the clients currently in the lobby. The second parameter (kick_only_afk) determins if an is_afk() check is ran, or if all clients are kicked
//defaults to kicking everyone (afk + non afk clients in the lobby)
//returns a list of ckeys of the kicked clients
/proc/kick_clients_in_lobby(message, kick_only_afk = 0)
var/list/kicked_client_names = list()
for(var/client/C in clients)
if(istype(C.mob, /mob/new_player))
if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk
continue
if(message)
to_chat(C, message)
kicked_client_names.Add("[C.ckey]")
del(C)
return kicked_client_names
//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/dead/observer/frommob, var/tothing)
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)) //no varedit, check if they have r_admin and r_debug
if(!check_rights(R_ADMIN|R_DEBUG,0)) //if they don't have r_admin and r_debug, return
return 0 //otherwise, if they have no varedit, but do have r_admin and r_debug, execute the rest of the code
if(!frommob.ckey)
return 0
if(istype(tothing, /obj/item))
var/mob/living/toitem = tothing
var/ask = alert("Are you sure you want to allow [frommob.name]([frommob.key]) to possess [toitem.name]?", "Place ghost in control of item?", "Yes", "No")
if(ask != "Yes")
return 1
if(!frommob || !toitem) //make sure the mobs don't go away while we waited for a response
return 1
var/mob/living/simple_animal/possessed_object/tomob = new(toitem)
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)
if(isliving(tothing))
var/mob/living/tomob = tothing
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