April sync (#360)

* Maps and things no code/icons

* helpers defines globalvars

* Onclick world.dm orphaned_procs

* subsystems

Round vote and shuttle autocall done here too

* datums

* Game folder

* Admin - chatter modules

* clothing - mining

* modular computers - zambies

* client

* mob level 1

* mob stage 2 + simple_animal

* silicons n brains

* mob stage 3 + Alien/Monkey

* human mobs

* icons updated

* some sounds

* emitter y u no commit

* update tgstation.dme

* compile fixes

* travis fixes

Also removes Fast digest mode, because reasons.

* tweaks for travis Mentors are broke again

Also fixes Sizeray guns

* oxygen loss fix for vore code.

* removes unused code

* some code updates

* bulk fixes

* further fixes

* outside things

* whoops.

* Maint bar ported

* GLOBs.
This commit is contained in:
Poojawa
2017-04-13 23:37:00 -05:00
committed by GitHub
parent cdc32c98fa
commit 7e9b96a00f
1322 changed files with 174827 additions and 23888 deletions

View File

@@ -6,7 +6,7 @@
if(!check_rights(R_BAN))
return
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return
@@ -71,7 +71,7 @@
computerid = bancid
ip = banip
var/DBQuery/query_add_ban_get_id = dbcon.NewQuery("SELECT id FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
var/DBQuery/query_add_ban_get_id = GLOB.dbcon.NewQuery("SELECT id FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
if(!query_add_ban_get_id.warn_execute())
return
var/validckey = 0
@@ -97,14 +97,14 @@
return
var/who
for(var/client/C in clients)
for(var/client/C in GLOB.clients)
if(!who)
who = "[C]"
else
who += ", [C]"
var/adminwho
for(var/client/C in admins)
for(var/client/C in GLOB.admins)
if(!adminwho)
adminwho = "[C]"
else
@@ -113,7 +113,7 @@
reason = sanitizeSQL(reason)
if(maxadminbancheck)
var/DBQuery/query_check_adminban_amt = dbcon.NewQuery("SELECT count(id) AS num FROM [format_table_name("ban")] WHERE (a_ckey = '[a_ckey]') AND (bantype = 'ADMIN_PERMABAN' OR (bantype = 'ADMIN_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
var/DBQuery/query_check_adminban_amt = GLOB.dbcon.NewQuery("SELECT count(id) AS num FROM [format_table_name("ban")] WHERE (a_ckey = '[a_ckey]') AND (bantype = 'ADMIN_PERMABAN' OR (bantype = 'ADMIN_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
if(!query_check_adminban_amt.warn_execute())
return
if(query_check_adminban_amt.NextRow())
@@ -126,7 +126,7 @@
if(!ip)
ip = "0.0.0.0"
var/sql = "INSERT INTO [format_table_name("ban")] (`bantime`,`server_ip`,`server_port`,`bantype`,`reason`,`job`,`duration`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`) VALUES (Now(), INET_ATON('[world.internet_address]'), '[world.port]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', INET_ATON('[ip]'), '[a_ckey]', '[a_computerid]', INET_ATON('[a_ip]'), '[who]', '[adminwho]')"
var/DBQuery/query_add_ban = dbcon.NewQuery(sql)
var/DBQuery/query_add_ban = GLOB.dbcon.NewQuery(sql)
if(!query_add_ban.warn_execute())
return
to_chat(usr, "<span class='adminnotice'>Ban saved to database.</span>")
@@ -187,13 +187,13 @@
if(job)
sql += " AND job = '[job]'"
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
return
var/ban_id
var/ban_number = 0 //failsafe
var/DBQuery/query_unban_get_id = dbcon.NewQuery(sql)
var/DBQuery/query_unban_get_id = GLOB.dbcon.NewQuery(sql)
if(!query_unban_get_id.warn_execute())
return
while(query_unban_get_id.NextRow())
@@ -225,7 +225,7 @@
to_chat(usr, "Cancelled")
return
var/DBQuery/query_edit_ban_get_details = dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]")
var/DBQuery/query_edit_ban_get_details = GLOB.dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]")
if(!query_edit_ban_get_details.warn_execute())
return
@@ -254,7 +254,7 @@
to_chat(usr, "Cancelled")
return
var/DBQuery/query_edit_ban_reason = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from <cite><b>\\\"[reason]\\\"</b></cite> to <cite><b>\\\"[value]\\\"</b></cite><BR>') WHERE id = [banid]")
var/DBQuery/query_edit_ban_reason = GLOB.dbcon.NewQuery("UPDATE [format_table_name("ban")] SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from <cite><b>\\\"[reason]\\\"</b></cite> to <cite><b>\\\"[value]\\\"</b></cite><BR>') WHERE id = [banid]")
if(!query_edit_ban_reason.warn_execute())
return
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s reason from [reason] to [value]",1)
@@ -265,7 +265,7 @@
to_chat(usr, "Cancelled")
return
var/DBQuery/query_edit_ban_duration = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]<br>'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]")
var/DBQuery/query_edit_ban_duration = GLOB.dbcon.NewQuery("UPDATE [format_table_name("ban")] SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]<br>'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]")
if(!query_edit_ban_duration.warn_execute())
return
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s duration from [duration] to [value]",1)
@@ -287,13 +287,13 @@
var/sql = "SELECT ckey FROM [format_table_name("ban")] WHERE id = [id]"
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
return
var/ban_number = 0 //failsafe
var/pckey
var/DBQuery/query_unban_get_ckey = dbcon.NewQuery(sql)
var/DBQuery/query_unban_get_ckey = GLOB.dbcon.NewQuery(sql)
if(!query_unban_get_ckey.warn_execute())
return
while(query_unban_get_ckey.NextRow())
@@ -316,7 +316,7 @@
var/unban_ip = src.owner:address
var/sql_update = "UPDATE [format_table_name("ban")] SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = INET_ATON('[unban_ip]') WHERE id = [id]"
var/DBQuery/query_unban = dbcon.NewQuery(sql_update)
var/DBQuery/query_unban = GLOB.dbcon.NewQuery(sql_update)
if(!query_unban.warn_execute())
return
message_admins("[key_name_admin(usr)] has lifted [pckey]'s ban.",1)
@@ -339,7 +339,7 @@
if(!check_rights(R_BAN))
return
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
@@ -371,7 +371,7 @@
output += "<option value=''>--</option>"
for(var/j in get_all_jobs())
output += "<option value='[j]'>[j]</option>"
for(var/j in nonhuman_positions)
for(var/j in GLOB.nonhuman_positions)
output += "<option value='[j]'>[j]</option>"
for(var/j in list("traitor","changeling","operative","revolutionary", "gangster","cultist","wizard"))
output += "<option value='[j]'>[j]</option>"
@@ -405,7 +405,7 @@
var/bansperpage = 15
var/pagecount = 0
page = text2num(page)
var/DBQuery/query_count_bans = dbcon.NewQuery("SELECT COUNT(id) FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch]")
var/DBQuery/query_count_bans = GLOB.dbcon.NewQuery("SELECT COUNT(id) FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch]")
if(!query_count_bans.warn_execute())
return
if(query_count_bans.NextRow())
@@ -431,7 +431,7 @@
output += "<th width='15%'><b>OPTIONS</b></th>"
output += "</tr>"
var/limit = " LIMIT [bansperpage * page], [bansperpage]"
var/DBQuery/query_search_bans = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] ORDER BY bantime DESC[limit]")
var/DBQuery/query_search_bans = GLOB.dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] ORDER BY bantime DESC[limit]")
if(!query_search_bans.warn_execute())
return

View File

@@ -16,7 +16,7 @@
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.)")
var/admin = 0
var/ckey = ckey(key)
if((ckey in admin_datums) || (ckey in deadmins))
if((ckey in GLOB.admin_datums) || (ckey in GLOB.deadmins))
admin = 1
//Whitelist
@@ -32,10 +32,10 @@
//Guest Checking
if(IsGuestKey(key))
if (!guests_allowed)
if (!GLOB.guests_allowed)
log_access("Failed Login: [key] - Guests not allowed")
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
if (config.panic_bunker && dbcon && dbcon.IsConnected())
if (config.panic_bunker && GLOB.dbcon && GLOB.dbcon.IsConnected())
log_access("Failed Login: [key] - Guests not allowed during panic bunker")
return list("reason"="guest", "desc"="\nReason: Sorry but the server is currently not accepting connections from never before seen players or guests. If you have played on this server with a byond account before, please log in to the byond account you have played from.")
@@ -61,9 +61,9 @@
var/ckeytext = ckey(key)
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
log_world("Ban database connection failure. Key [ckeytext] not checked")
diary << "Ban database connection failure. Key [ckeytext] not checked"
GLOB.diary << "Ban database connection failure. Key [ckeytext] not checked"
return
var/ipquery = ""
@@ -74,7 +74,7 @@
if(computer_id)
cidquery = " OR computerid = '[computer_id]' "
var/DBQuery/query_ban_check = dbcon.NewQuery("SELECT ckey, a_ckey, reason, expiration_time, duration, bantime, bantype FROM [format_table_name("ban")] WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR bantype = 'ADMIN_PERMABAN' OR ((bantype = 'TEMPBAN' OR bantype = 'ADMIN_TEMPBAN') AND expiration_time > Now())) AND isnull(unbanned)")
var/DBQuery/query_ban_check = GLOB.dbcon.NewQuery("SELECT ckey, a_ckey, reason, expiration_time, duration, bantime, bantype FROM [format_table_name("ban")] WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR bantype = 'ADMIN_PERMABAN' OR ((bantype = 'TEMPBAN' OR bantype = 'ADMIN_TEMPBAN') AND expiration_time > Now())) AND isnull(unbanned)")
if(!query_ban_check.Execute())
return
while(query_ban_check.NextRow())
@@ -120,7 +120,7 @@
bannedckey = ban["ckey"]
var/newmatch = FALSE
var/client/C = directory[ckey]
var/client/C = GLOB.directory[ckey]
var/cachedban = SSstickyban.cache[bannedckey]
//rogue ban in the process of being reverted.

View File

@@ -1,76 +1,77 @@
var/CMinutes = null
var/savefile/Banlist
GLOBAL_VAR(CMinutes)
GLOBAL_DATUM(Banlist, /savefile)
GLOBAL_PROTECT(Banlist)
/proc/CheckBan(ckey, id, address)
if(!Banlist) // if Banlist cannot be located for some reason
if(!GLOB.Banlist) // if Banlist cannot be located for some reason
LoadBans() // try to load the bans
if(!Banlist) // uh oh, can't find bans!
if(!GLOB.Banlist) // uh oh, can't find bans!
return 0 // ABORT ABORT ABORT
. = list()
var/appeal
if(config && config.banappeals)
appeal = "\nFor more information on your ban, or to appeal, head to <a href='[config.banappeals]'>[config.banappeals]</a>"
Banlist.cd = "/base"
if( "[ckey][id]" in Banlist.dir )
Banlist.cd = "[ckey][id]"
if (Banlist["temp"])
if (!GetExp(Banlist["minutes"]))
GLOB.Banlist.cd = "/base"
if( "[ckey][id]" in GLOB.Banlist.dir )
GLOB.Banlist.cd = "[ckey][id]"
if (GLOB.Banlist["temp"])
if (!GetExp(GLOB.Banlist["minutes"]))
ClearTempbans()
return 0
else
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]][appeal]"
else
Banlist.cd = "/base/[ckey][id]"
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [Banlist["bannedby"]][appeal]"
GLOB.Banlist.cd = "/base/[ckey][id]"
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [GLOB.Banlist["bannedby"]][appeal]"
.["reason"] = "ckey/id"
return .
else
for (var/A in Banlist.dir)
Banlist.cd = "/base/[A]"
for (var/A in GLOB.Banlist.dir)
GLOB.Banlist.cd = "/base/[A]"
var/matches
if( ckey == Banlist["key"] )
if( ckey == GLOB.Banlist["key"] )
matches += "ckey"
if( id == Banlist["id"] )
if( id == GLOB.Banlist["id"] )
if(matches)
matches += "/"
matches += "id"
if( address == Banlist["ip"] )
if( address == GLOB.Banlist["ip"] )
if(matches)
matches += "/"
matches += "ip"
if(matches)
if(Banlist["temp"])
if (!GetExp(Banlist["minutes"]))
if(GLOB.Banlist["temp"])
if (!GetExp(GLOB.Banlist["minutes"]))
ClearTempbans()
return 0
else
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]][appeal]"
else
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [Banlist["bannedby"]][appeal]"
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [GLOB.Banlist["bannedby"]][appeal]"
.["reason"] = matches
return .
return 0
/proc/UpdateTime() //No idea why i made this a proc.
CMinutes = (world.realtime / 10) / 60
GLOB.CMinutes = (world.realtime / 10) / 60
return 1
/proc/LoadBans()
Banlist = new("data/banlist.bdb")
GLOB.Banlist = new("data/banlist.bdb")
log_admin("Loading Banlist")
if (!length(Banlist.dir)) log_admin("Banlist is empty.")
if (!length(GLOB.Banlist.dir)) log_admin("Banlist is empty.")
if (!Banlist.dir.Find("base"))
if (!GLOB.Banlist.dir.Find("base"))
log_admin("Banlist missing base dir.")
Banlist.dir.Add("base")
Banlist.cd = "/base"
else if (Banlist.dir.Find("base"))
Banlist.cd = "/base"
GLOB.Banlist.dir.Add("base")
GLOB.Banlist.cd = "/base"
else if (GLOB.Banlist.dir.Find("base"))
GLOB.Banlist.cd = "/base"
ClearTempbans()
return 1
@@ -78,17 +79,17 @@ var/savefile/Banlist
/proc/ClearTempbans()
UpdateTime()
Banlist.cd = "/base"
for (var/A in Banlist.dir)
Banlist.cd = "/base/[A]"
if (!Banlist["key"] || !Banlist["id"])
GLOB.Banlist.cd = "/base"
for (var/A in GLOB.Banlist.dir)
GLOB.Banlist.cd = "/base/[A]"
if (!GLOB.Banlist["key"] || !GLOB.Banlist["id"])
RemoveBan(A)
log_admin("Invalid Ban.")
message_admins("Invalid Ban.")
continue
if (!Banlist["temp"]) continue
if (CMinutes >= Banlist["minutes"]) RemoveBan(A)
if (!GLOB.Banlist["temp"]) continue
if (GLOB.CMinutes >= GLOB.Banlist["minutes"]) RemoveBan(A)
return 1
@@ -99,23 +100,23 @@ var/savefile/Banlist
if (temp)
UpdateTime()
bantimestamp = CMinutes + minutes
bantimestamp = GLOB.CMinutes + minutes
Banlist.cd = "/base"
if ( Banlist.dir.Find("[ckey][computerid]") )
GLOB.Banlist.cd = "/base"
if ( GLOB.Banlist.dir.Find("[ckey][computerid]") )
to_chat(usr, text("<span class='danger'>Ban already exists.</span>"))
return 0
else
Banlist.dir.Add("[ckey][computerid]")
Banlist.cd = "/base/[ckey][computerid]"
Banlist["key"] << ckey
Banlist["id"] << computerid
Banlist["ip"] << address
Banlist["reason"] << reason
Banlist["bannedby"] << bannedby
Banlist["temp"] << temp
GLOB.Banlist.dir.Add("[ckey][computerid]")
GLOB.Banlist.cd = "/base/[ckey][computerid]"
GLOB.Banlist["key"] << ckey
GLOB.Banlist["id"] << computerid
GLOB.Banlist["ip"] << address
GLOB.Banlist["reason"] << reason
GLOB.Banlist["bannedby"] << bannedby
GLOB.Banlist["temp"] << temp
if (temp)
Banlist["minutes"] << bantimestamp
GLOB.Banlist["minutes"] << bantimestamp
if(!temp)
create_message("note", ckey, bannedby, "Permanently banned - [reason]", null, null, 0, 0)
else
@@ -126,12 +127,12 @@ var/savefile/Banlist
var/key
var/id
Banlist.cd = "/base/[foldername]"
Banlist["key"] >> key
Banlist["id"] >> id
Banlist.cd = "/base"
GLOB.Banlist.cd = "/base/[foldername]"
GLOB.Banlist["key"] >> key
GLOB.Banlist["id"] >> id
GLOB.Banlist.cd = "/base"
if (!Banlist.dir.Remove(foldername)) return 0
if (!GLOB.Banlist.dir.Remove(foldername)) return 0
if(!usr)
log_admin_private("Ban Expired: [key]")
@@ -142,18 +143,18 @@ var/savefile/Banlist
message_admins("[key_name_admin(usr)] unbanned: [key]")
feedback_inc("ban_unban",1)
usr.client.holder.DB_ban_unban( ckey(key), BANTYPE_ANY_FULLBAN)
for (var/A in Banlist.dir)
Banlist.cd = "/base/[A]"
if (key == Banlist["key"] /*|| id == Banlist["id"]*/)
Banlist.cd = "/base"
Banlist.dir.Remove(A)
for (var/A in GLOB.Banlist.dir)
GLOB.Banlist.cd = "/base/[A]"
if (key == GLOB.Banlist["key"] /*|| id == Banlist["id"]*/)
GLOB.Banlist.cd = "/base"
GLOB.Banlist.dir.Remove(A)
continue
return 1
/proc/GetExp(minutes as num)
UpdateTime()
var/exp = minutes - CMinutes
var/exp = minutes - GLOB.CMinutes
if (exp <= 0)
return 0
else
@@ -170,19 +171,19 @@ var/savefile/Banlist
var/count = 0
var/dat
//var/dat = "<HR><B>Unban Player:</B> \blue(U) = Unban , (E) = Edit Ban\green (Total<HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >"
Banlist.cd = "/base"
for (var/A in Banlist.dir)
GLOB.Banlist.cd = "/base"
for (var/A in GLOB.Banlist.dir)
count++
Banlist.cd = "/base/[A]"
GLOB.Banlist.cd = "/base/[A]"
var/ref = "\ref[src]"
var/key = Banlist["key"]
var/id = Banlist["id"]
var/ip = Banlist["ip"]
var/reason = Banlist["reason"]
var/by = Banlist["bannedby"]
var/key = GLOB.Banlist["key"]
var/id = GLOB.Banlist["id"]
var/ip = GLOB.Banlist["ip"]
var/reason = GLOB.Banlist["reason"]
var/by = GLOB.Banlist["bannedby"]
var/expiry
if(Banlist["temp"])
expiry = GetExp(Banlist["minutes"])
if(GLOB.Banlist["temp"])
expiry = GetExp(GLOB.Banlist["minutes"])
if(!expiry)
expiry = "Removal Pending"
else
@@ -207,26 +208,26 @@ var/savefile/Banlist
var/a = pick(1,0)
var/b = pick(1,0)
if(b)
Banlist.cd = "/base"
Banlist.dir.Add("trash[i]trashid[i]")
Banlist.cd = "/base/trash[i]trashid[i]"
Banlist["key"] << "trash[i]"
GLOB.Banlist.cd = "/base"
GLOB.Banlist.dir.Add("trash[i]trashid[i]")
GLOB.Banlist.cd = "/base/trash[i]trashid[i]"
GLOB.Banlist["key"] << "trash[i]"
else
Banlist.cd = "/base"
Banlist.dir.Add("[last]trashid[i]")
Banlist.cd = "/base/[last]trashid[i]"
Banlist["key"] << last
Banlist["id"] << "trashid[i]"
Banlist["reason"] << "Trashban[i]."
Banlist["temp"] << a
Banlist["minutes"] << CMinutes + rand(1,2000)
Banlist["bannedby"] << "trashmin"
GLOB.Banlist.cd = "/base"
GLOB.Banlist.dir.Add("[last]trashid[i]")
GLOB.Banlist.cd = "/base/[last]trashid[i]"
GLOB.Banlist["key"] << last
GLOB.Banlist["id"] << "trashid[i]"
GLOB.Banlist["reason"] << "Trashban[i]."
GLOB.Banlist["temp"] << a
GLOB.Banlist["minutes"] << GLOB.CMinutes + rand(1,2000)
GLOB.Banlist["bannedby"] << "trashmin"
last = "trash[i]"
Banlist.cd = "/base"
GLOB.Banlist.cd = "/base"
/proc/ClearAllBans()
Banlist.cd = "/base"
for (var/A in Banlist.dir)
GLOB.Banlist.cd = "/base"
for (var/A in GLOB.Banlist.dir)
RemoveBan(A)

View File

@@ -1,19 +1,17 @@
var/global/BSACooldown = 0
////////////////////////////////
/proc/message_admins(msg)
msg = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
to_chat(admins, msg)
to_chat(GLOB.admins, msg)
/proc/relay_msg_admins(msg)
msg = "<span class=\"admin\"><span class=\"prefix\">RELAY:</span> <span class=\"message\">[msg]</span></span>"
to_chat(admins, msg)
to_chat(GLOB.admins, msg)
///////////////////////////////////////////////////////////////////////////////////////////////Panels
/datum/admins/proc/show_player_panel(mob/M in mob_list)
/datum/admins/proc/show_player_panel(mob/M in GLOB.mob_list)
set category = "Admin"
set name = "Show Player Panel"
set desc="Edit player (respawn, ban, heal, etc)"
@@ -83,7 +81,8 @@ var/global/BSACooldown = 0
body += "<A href='?_src_=holder;traitor=\ref[M]'>Traitor panel</A> | "
body += "<A href='?_src_=holder;narrateto=\ref[M]'>Narrate to</A> | "
body += "<A href='?_src_=holder;subtlemessage=\ref[M]'>Subtle message</A> | "
body += "<A href='?_src_=holder;individuallog=\ref[M]'>Individual Round Logs</A>"
body += "<A href='?_src_=holder;individuallog=\ref[M]'>Individual Round Logs</A> | "
body += "<A href='?_src_=holder;languagemenu=\ref[M]'>Language Menu</A>"
if (M.client)
if(!isnewplayer(M))
@@ -162,15 +161,12 @@ var/global/BSACooldown = 0
body += "<A href='?_src_=holder;tdome2=\ref[M]'>Thunderdome 2</A> | "
body += "<A href='?_src_=holder;tdomeadmin=\ref[M]'>Thunderdome Admin</A> | "
body += "<A href='?_src_=holder;tdomeobserve=\ref[M]'>Thunderdome Observer</A> | "
body += "<A href='?_src_=holder;mentor=\ref[M]'>Make Mentor</A> | "
body += "<A href='?_src_=holder;removementor=\ref[M]'>Remove Mentor</A> | "
body += "<br>"
body += "</body></html>"
usr << browse(body, "window=adminplayeropts-\ref[M];size=550x515")
feedback_add_details("admin_verb","SPP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Player Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/access_news_network() //MARKER
@@ -191,14 +187,14 @@ var/global/BSACooldown = 0
dat += "Welcome to the admin newscaster.<BR> Here you can add, edit and censor every newspiece on the network."
dat += "<BR>Feed channels and stories entered through here will be uneditable and handled as official news by the rest of the units."
dat += "<BR>Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things!</FONT>"
if(news_network.wanted_issue.active)
if(GLOB.news_network.wanted_issue.active)
dat+= "<HR><A href='?src=\ref[src];ac_view_wanted=1'>Read Wanted Issue</A>"
dat+= "<HR><BR><A href='?src=\ref[src];ac_create_channel=1'>Create Feed Channel</A>"
dat+= "<BR><A href='?src=\ref[src];ac_view=1'>View Feed Channels</A>"
dat+= "<BR><A href='?src=\ref[src];ac_create_feed_story=1'>Submit new Feed story</A>"
dat+= "<BR><BR><A href='?src=\ref[usr];mach_close=newscaster_main'>Exit</A>"
var/wanted_already = 0
if(news_network.wanted_issue.active)
if(GLOB.news_network.wanted_issue.active)
wanted_already = 1
dat+="<HR><B>Feed Security functions:</B><BR>"
dat+="<BR><A href='?src=\ref[src];ac_menu_wanted=1'>[(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue</A>"
@@ -207,10 +203,10 @@ var/global/BSACooldown = 0
dat+="<BR><HR><A href='?src=\ref[src];ac_set_signature=1'>The newscaster recognises you as:<BR> <FONT COLOR='green'>[src.admin_signature]</FONT></A>"
if(1)
dat+= "Station Feed Channels<HR>"
if( isemptylist(news_network.network_channels) )
if( isemptylist(GLOB.news_network.network_channels) )
dat+="<I>No active channels found...</I>"
else
for(var/datum/newscaster/feed_channel/CHANNEL in news_network.network_channels)
for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels)
if(CHANNEL.is_admin_channel)
dat+="<B><FONT style='BACKGROUND-COLOR: LightGreen'><A href='?src=\ref[src];ac_show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A></FONT></B><BR>"
else
@@ -247,7 +243,7 @@ var/global/BSACooldown = 0
if(src.admincaster_feed_channel.channel_name =="" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]")
dat+="<FONT COLOR='maroon'>•Invalid channel name.</FONT><BR>"
var/check = 0
for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
check = 1
break
@@ -282,10 +278,10 @@ var/global/BSACooldown = 0
dat+="<FONT SIZE=1>NOTE: Due to the nature of news Feeds, total deletion of a Feed Story is not possible.<BR>"
dat+="Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it.</FONT>"
dat+="<HR>Select Feed channel to get Stories from:<BR>"
if(isemptylist(news_network.network_channels))
if(isemptylist(GLOB.news_network.network_channels))
dat+="<I>No feed channels found active...</I><BR>"
else
for(var/datum/newscaster/feed_channel/CHANNEL in news_network.network_channels)
for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels)
dat+="<A href='?src=\ref[src];ac_pick_censor_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Cancel</A>"
if(11)
@@ -293,10 +289,10 @@ var/global/BSACooldown = 0
dat+="<FONT SIZE=1>A D-Notice is to be bestowed upon the channel if the handling Authority deems it as harmful for the station's"
dat+="morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed"
dat+="stories it might contain at the time. You can lift a D-Notice if you have the required access at any time.</FONT><HR>"
if(isemptylist(news_network.network_channels))
if(isemptylist(GLOB.news_network.network_channels))
dat+="<I>No feed channels found active...</I><BR>"
else
for(var/datum/newscaster/feed_channel/CHANNEL in news_network.network_channels)
for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels)
dat+="<A href='?src=\ref[src];ac_pick_d_notice=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Back</A>"
@@ -331,7 +327,7 @@ var/global/BSACooldown = 0
dat+="<B>Wanted Issue Handler:</B>"
var/wanted_already = 0
var/end_param = 1
if(news_network.wanted_issue.active)
if(GLOB.news_network.wanted_issue.active)
wanted_already = 1
end_param = 2
if(wanted_already)
@@ -340,7 +336,7 @@ var/global/BSACooldown = 0
dat+="<A href='?src=\ref[src];ac_set_wanted_name=1'>Criminal Name</A>: [src.admincaster_wanted_message.criminal] <BR>"
dat+="<A href='?src=\ref[src];ac_set_wanted_desc=1'>Description</A>: [src.admincaster_wanted_message.body] <BR>"
if(wanted_already)
dat+="<B>Wanted Issue created by:</B><FONT COLOR='green'>[news_network.wanted_issue.scannedUser]</FONT><BR>"
dat+="<B>Wanted Issue created by:</B><FONT COLOR='green'>[GLOB.news_network.wanted_issue.scannedUser]</FONT><BR>"
else
dat+="<B>Wanted Issue will be created under prosecutor:</B><FONT COLOR='green'>[src.admin_signature]</FONT><BR>"
dat+="<BR><A href='?src=\ref[src];ac_submit_wanted=[end_param]'>[(wanted_already) ? ("Edit Issue") : ("Submit")]</A>"
@@ -361,12 +357,12 @@ var/global/BSACooldown = 0
dat+="<B>Wanted Issue successfully deleted from Circulation</B><BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Return</A><BR>"
if(18)
dat+="<B><FONT COLOR ='maroon'>-- STATIONWIDE WANTED ISSUE --</B></FONT><BR><FONT SIZE=2>\[Submitted by: <FONT COLOR='green'>[news_network.wanted_issue.scannedUser]</FONT>\]</FONT><HR>"
dat+="<B>Criminal</B>: [news_network.wanted_issue.criminal]<BR>"
dat+="<B>Description</B>: [news_network.wanted_issue.body]<BR>"
dat+="<B><FONT COLOR ='maroon'>-- STATIONWIDE WANTED ISSUE --</B></FONT><BR><FONT SIZE=2>\[Submitted by: <FONT COLOR='green'>[GLOB.news_network.wanted_issue.scannedUser]</FONT>\]</FONT><HR>"
dat+="<B>Criminal</B>: [GLOB.news_network.wanted_issue.criminal]<BR>"
dat+="<B>Description</B>: [GLOB.news_network.wanted_issue.body]<BR>"
dat+="<B>Photo:</B>: "
if(news_network.wanted_issue.img)
usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png")
if(GLOB.news_network.wanted_issue.img)
usr << browse_rsc(GLOB.news_network.wanted_issue.img, "tmp_photow.png")
dat+="<BR><img src='tmp_photow.png' width = '180'>"
else
dat+="None"
@@ -391,7 +387,7 @@ var/global/BSACooldown = 0
<center><B>Game Panel</B></center><hr>\n
<A href='?src=\ref[src];c_mode=1'>Change Game Mode</A><br>
"}
if(master_mode == "secret")
if(GLOB.master_mode == "secret")
dat += "<A href='?src=\ref[src];f_secret=1'>(Force Secret Mode)</A><br>"
dat += {"
@@ -422,8 +418,8 @@ var/global/BSACooldown = 0
if(confirm == "Cancel")
return
if(confirm == "Yes")
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!
SSticker.delay_end = 0
feedback_add_details("admin_verb","Hard Restart") //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)" : ""]", 10)
/datum/admins/proc/end_round()
@@ -437,8 +433,8 @@ var/global/BSACooldown = 0
if(confirm == "Cancel")
return
if(confirm == "Yes")
ticker.force_ending = 1
feedback_add_details("admin_verb","ER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
SSticker.force_ending = 1
feedback_add_details("admin_verb","End Round") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/announce()
@@ -454,7 +450,7 @@ var/global/BSACooldown = 0
message = adminscrub(message,500)
to_chat(world, "<span class='adminnotice'><b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b></span>\n \t [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","Announce") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/set_admin_notice()
set category = "Special Verbs"
@@ -463,20 +459,20 @@ var/global/BSACooldown = 0
if(!check_rights(0))
return
var/new_admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",admin_notice) as message|null
var/new_admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",GLOB.admin_notice) as message|null
if(new_admin_notice == null)
return
if(new_admin_notice == admin_notice)
if(new_admin_notice == GLOB.admin_notice)
return
if(new_admin_notice == "")
message_admins("[key_name(usr)] removed the admin notice.")
log_admin("[key_name(usr)] removed the admin notice:\n[admin_notice]")
log_admin("[key_name(usr)] removed the admin notice:\n[GLOB.admin_notice]")
else
message_admins("[key_name(usr)] set the admin notice.")
log_admin("[key_name(usr)] set the admin notice:\n[new_admin_notice]")
to_chat(world, "<span class ='adminnotice'><b>Admin Notice:</b>\n \t [new_admin_notice]</span>")
feedback_add_details("admin_verb","SAN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
admin_notice = new_admin_notice
feedback_add_details("admin_verb","Set Admin Notice") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
GLOB.admin_notice = new_admin_notice
return
/datum/admins/proc/toggleooc()
@@ -486,41 +482,32 @@ var/global/BSACooldown = 0
toggle_ooc()
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled OOC.")
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Toggle OOC|[GLOB.ooc_allowed]") //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 dis bitch"
set name="Toggle Dead OOC"
dooc_allowed = !( dooc_allowed )
GLOB.dooc_allowed = !( GLOB.dooc_allowed )
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled Dead OOC.")
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/toggletraitorscaling()
set category = "Server"
set desc="Toggle traitor scaling"
set name="Toggle Traitor Scaling"
traitor_scaling = !traitor_scaling
log_admin("[key_name(usr)] toggled Traitor Scaling to [traitor_scaling].")
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [traitor_scaling ? "on" : "off"].")
feedback_add_details("admin_verb","TTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
*/
feedback_add_details("admin_toggle","Toggle Dead OOC|[GLOB.dooc_allowed]") //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(ticker.current_state == GAME_STATE_PREGAME || ticker.current_state == GAME_STATE_STARTUP)
ticker.start_immediately = TRUE
if(SSticker.current_state == GAME_STATE_PREGAME || SSticker.current_state == GAME_STATE_STARTUP)
SSticker.start_immediately = TRUE
log_admin("[usr.key] has started the game.")
var/msg = ""
if(ticker.current_state == GAME_STATE_STARTUP)
if(SSticker.current_state == GAME_STATE_STARTUP)
msg = " (The server is still setting up, but the round will be \
started as soon as possible.)"
message_admins("<font color='blue'>\
[usr.key] has started the game.[msg]</font>")
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Start Now") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return 1
else
to_chat(usr, "<font color='red'>Error: Start Now: Game has already started.</font>")
@@ -531,15 +518,15 @@ var/global/BSACooldown = 0
set category = "Server"
set desc="People can't enter"
set name="Toggle Entering"
enter_allowed = !( enter_allowed )
if (!( enter_allowed ))
GLOB.enter_allowed = !( GLOB.enter_allowed )
if (!( GLOB.enter_allowed ))
to_chat(world, "<B>New players may no longer enter the game.</B>")
else
to_chat(world, "<B>New players may now enter the game.</B>")
log_admin("[key_name(usr)] toggled new player game entering.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled new player game entering.</span>")
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!
feedback_add_details("admin_toggle","Toggle Entering|[GLOB.enter_allowed]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggleAI()
set category = "Server"
@@ -552,32 +539,32 @@ var/global/BSACooldown = 0
to_chat(world, "<B>The AI job is chooseable now.</B>")
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!
feedback_add_details("admin_toggle","Toggle AI|[config.allow_ai]") //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"
abandon_allowed = !( abandon_allowed )
if (abandon_allowed)
GLOB.abandon_allowed = !( GLOB.abandon_allowed )
if (GLOB.abandon_allowed)
to_chat(world, "<B>You may now respawn.</B>")
else
to_chat(world, "<B>You may no longer respawn :(</B>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].</span>")
log_admin("[key_name(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled respawn to [GLOB.abandon_allowed ? "On" : "Off"].</span>")
log_admin("[key_name(usr)] toggled respawn to [GLOB.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!
feedback_add_details("admin_toggle","Toggle Respawn|[GLOB.abandon_allowed]") //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"
set name="Delay pre-game"
var/newtime = input("Set a new time in seconds. Set -1 for indefinite delay.","Set Delay",round(ticker.GetTimeLeft()/10)) as num|null
if(ticker.current_state > GAME_STATE_PREGAME)
var/newtime = input("Set a new time in seconds. Set -1 for indefinite delay.","Set Delay",round(SSticker.GetTimeLeft()/10)) as num|null
if(SSticker.current_state > GAME_STATE_PREGAME)
return alert("Too late... The game has already started!")
if(newtime)
ticker.SetTimeLeft(newtime * 10)
SSticker.SetTimeLeft(newtime * 10)
if(newtime < 0)
to_chat(world, "<b>The game start has been delayed.</b>")
log_admin("[key_name(usr)] delayed the round start.")
@@ -585,18 +572,18 @@ var/global/BSACooldown = 0
to_chat(world, "<b>The game will start in [newtime] seconds.</b>")
world << 'sound/ai/attention.ogg'
log_admin("[key_name(usr)] set the pre-game delay to [newtime] seconds.")
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Delay Game Start") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/unprison(mob/M in mob_list)
/datum/admins/proc/unprison(mob/M in GLOB.mob_list)
set category = "Admin"
set name = "Unprison"
if (M.z == ZLEVEL_CENTCOM)
M.loc = pick(latejoin)
M.loc = pick(GLOB.latejoin)
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]")
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
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!
feedback_add_details("admin_verb","Unprison") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
@@ -637,10 +624,10 @@ var/global/BSACooldown = 0
A.admin_spawned = TRUE
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!
feedback_add_details("admin_verb","Spawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/show_traitor_panel(mob/M in mob_list)
/datum/admins/proc/show_traitor_panel(mob/M in GLOB.mob_list)
set category = "Admin"
set desc = "Edit mobs's memory and role"
set name = "Show Traitor Panel"
@@ -653,38 +640,38 @@ var/global/BSACooldown = 0
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!
feedback_add_details("admin_verb","Traitor Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggletintedweldhelmets()
set category = "Debug"
set desc="Reduces view range when wearing welding helmets"
set name="Toggle tinted welding helmes"
tinted_weldhelh = !( tinted_weldhelh )
if (tinted_weldhelh)
GLOB.tinted_weldhelh = !( GLOB.tinted_weldhelh )
if (GLOB.tinted_weldhelh)
to_chat(world, "<B>The tinted_weldhelh has been enabled!</B>")
else
to_chat(world, "<B>The tinted_weldhelh has been disabled!</B>")
log_admin("[key_name(usr)] toggled tinted_weldhelh.")
message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.")
feedback_add_details("admin_verb","TTWH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Toggle Tinted Welding Helmets|[GLOB.tinted_weldhelh]") //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"
guests_allowed = !( guests_allowed )
if (!( guests_allowed ))
GLOB.guests_allowed = !( GLOB.guests_allowed )
if (!( GLOB.guests_allowed ))
to_chat(world, "<B>Guests may no longer enter the game.</B>")
else
to_chat(world, "<B>Guests may now enter the game.</B>")
log_admin("[key_name(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.</span>")
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] toggled guests game entering [GLOB.guests_allowed?"":"dis"]allowed.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled guests game entering [GLOB.guests_allowed?"":"dis"]allowed.</span>")
feedback_add_details("admin_toggle","Toggle Guests|[GLOB.guests_allowed]") //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)
for(var/mob/living/silicon/S in GLOB.mob_list)
ai_number++
if(isAI(S))
to_chat(usr, "<b>AI [key_name(S, usr)]'s laws:</b>")
@@ -705,15 +692,15 @@ var/global/BSACooldown = 0
/datum/admins/proc/output_all_devil_info()
var/devil_number = 0
for(var/D in ticker.mode.devils)
for(var/D in SSticker.mode.devils)
devil_number++
to_chat(usr, "Devil #[devil_number]:<br><br>" + ticker.mode.printdevilinfo(D))
to_chat(usr, "Devil #[devil_number]:<br><br>" + SSticker.mode.printdevilinfo(D))
if(!devil_number)
to_chat(usr, "<b>No Devils located</b>" )
/datum/admins/proc/output_devil_info(mob/living/M)
if(istype(M) && M.mind && M.mind.devilinfo)
to_chat(usr, ticker.mode.printdevilinfo(M.mind))
to_chat(usr, SSticker.mode.printdevilinfo(M.mind))
else
to_chat(usr, "<b>[M] is not a devil.")
@@ -723,7 +710,7 @@ var/global/BSACooldown = 0
var/dat = "<html><head><title>Manage Free Slots</title></head><body>"
var/count = 0
if(ticker && !ticker.mode)
if(SSticker && !SSticker.mode)
alert(usr, "You cannot manage jobs before the round starts!")
return
@@ -772,7 +759,7 @@ var/global/BSACooldown = 0
//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)
for(var/client/C in GLOB.clients)
if(isnewplayer(C.mob))
if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk
continue
@@ -809,7 +796,7 @@ var/global/BSACooldown = 0
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has put [frommob.ckey] in control of [tomob.name].</span>")
log_admin("[key_name(usr)] stuffed [frommob.ckey] into [tomob.name].")
feedback_add_details("admin_verb","CGD")
feedback_add_details("admin_verb","Ghost Drag Control")
tomob.ckey = frommob.ckey
qdel(frommob)
@@ -817,7 +804,7 @@ var/global/BSACooldown = 0
return 1
/client/proc/adminGreet(logout)
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
var/string
if(logout && config && config.announce_admin_logout)
string = pick(
@@ -826,4 +813,4 @@ var/global/BSACooldown = 0
string = pick(
"Admin login: [key_name(src)]")
if(string)
message_admins("[string]")
message_admins("[string]")

View File

@@ -38,8 +38,8 @@
return
src << browse(F,"window=investigate[subject];size=800x300")
if("hrefs") //persistent logs and stuff
if(href_logfile)
src << browse(href_logfile,"window=investigate[subject];size=800x300")
if(GLOB.href_logfile)
src << browse(GLOB.href_logfile,"window=investigate[subject];size=800x300")
else if(!config.log_hrefs)
to_chat(src, "<span class='danger'>Href logging is off and no logfile was found.</span>")
return

View File

@@ -1,4 +1,5 @@
var/list/admin_ranks = list() //list of all admin_rank datums
GLOBAL_LIST_EMPTY(admin_ranks) //list of all admin_rank datums
GLOBAL_PROTECT(admin_ranks)
/datum/admin_rank
var/name = "NoRank"
@@ -99,7 +100,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
//load our rank - > rights associations
/proc/load_admin_ranks()
admin_ranks.Cut()
GLOB.admin_ranks.Cut()
if(config.admin_legacy_system)
var/previous_rights = 0
@@ -114,7 +115,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/datum/admin_rank/R = new(ckeyEx(copytext(line, 1, next)))
if(!R)
continue
admin_ranks += R
GLOB.admin_ranks += R
var/prev = findchar(line, "+-", next, 0)
while(prev)
@@ -124,14 +125,14 @@ var/list/admin_ranks = list() //list of all admin_rank datums
previous_rights = R.rights
else
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
log_world("Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
diary << "Failed to connect to database in load_admin_ranks(). Reverting to legacy system."
GLOB.diary << "Failed to connect to database in load_admin_ranks(). Reverting to legacy system."
config.admin_legacy_system = 1
load_admin_ranks()
return
var/DBQuery/query_load_admin_ranks = dbcon.NewQuery("SELECT rank, flags FROM [format_table_name("admin_ranks")]")
var/DBQuery/query_load_admin_ranks = GLOB.dbcon.NewQuery("SELECT rank, flags FROM [format_table_name("admin_ranks")]")
if(!query_load_admin_ranks.Execute())
return
while(query_load_admin_ranks.NextRow())
@@ -142,11 +143,11 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/datum/admin_rank/R = new(rank_name, flags)
if(!R)
continue
admin_ranks += R
GLOB.admin_ranks += R
#ifdef TESTING
var/msg = "Permission Sets Built:\n"
for(var/datum/admin_rank/R in admin_ranks)
for(var/datum/admin_rank/R in GLOB.admin_ranks)
msg += "\t[R.name]"
var/rights = rights2text(R.rights,"\n\t\t",R.adds,R.subs)
if(rights)
@@ -158,18 +159,18 @@ var/list/admin_ranks = list() //list of all admin_rank datums
/proc/load_admins(target = null)
//clear the datums references
if(!target)
admin_datums.Cut()
for(var/client/C in admins)
GLOB.admin_datums.Cut()
for(var/client/C in GLOB.admins)
C.remove_admin_verbs()
C.holder = null
admins.Cut()
GLOB.admins.Cut()
load_admin_ranks()
//Clear profile access
for(var/A in world.GetConfig("admin"))
world.SetConfig("APP/admin", A, null)
var/list/rank_names = list()
for(var/datum/admin_rank/R in admin_ranks)
for(var/datum/admin_rank/R in GLOB.admin_ranks)
rank_names[R.name] = R
if(config.admin_legacy_system)
@@ -197,16 +198,16 @@ var/list/admin_ranks = list() //list of all admin_rank datums
continue //will occur if an invalid rank is provided
if(D.rank.rights & R_DEBUG) //grant profile access
world.SetConfig("APP/admin", ckey, "role=admin")
D.associate(directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
D.associate(GLOB.directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
else
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
log_world("Failed to connect to database in load_admins(). Reverting to legacy system.")
diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
GLOB.diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
config.admin_legacy_system = 1
load_admins()
return
var/DBQuery/query_load_admins = dbcon.NewQuery("SELECT ckey, rank FROM [format_table_name("admin")]")
var/DBQuery/query_load_admins = GLOB.dbcon.NewQuery("SELECT ckey, rank FROM [format_table_name("admin")]")
if(!query_load_admins.Execute())
return
while(query_load_admins.NextRow())
@@ -224,19 +225,19 @@ var/list/admin_ranks = list() //list of all admin_rank datums
continue //will occur if an invalid rank is provided
if(D.rank.rights & R_DEBUG) //grant profile access
world.SetConfig("APP/admin", ckey, "role=admin")
D.associate(directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
D.associate(GLOB.directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
#ifdef TESTING
var/msg = "Admins Built:\n"
for(var/ckey in admin_datums)
var/datum/admins/D = admin_datums[ckey]
for(var/ckey in GLOB.admin_datums)
var/datum/admins/D = GLOB.admin_datums[ckey]
msg += "\t[ckey] - [D.rank.name]\n"
testing(msg)
#endif
#ifdef TESTING
/client/verb/changerank(newrank in admin_ranks)
/client/verb/changerank(newrank in GLOB.admin_ranks)
if(holder)
holder.rank = newrank
else
@@ -266,7 +267,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
if(!new_ckey)
return
if(new_ckey in admin_datums)
if(new_ckey in GLOB.admin_datums)
to_chat(usr, "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>")
return
adm_ckey = new_ckey
@@ -277,7 +278,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
to_chat(usr, "<font color='red'>Error: Topic 'editrights': No valid ckey</font>")
return
var/datum/admins/D = admin_datums[adm_ckey]
var/datum/admins/D = GLOB.admin_datums[adm_ckey]
switch(task)
if("remove")
@@ -288,7 +289,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
message_admins("[key_name_admin(usr)] attempted to remove [adm_ckey] from the admins list without sufficient rights.")
log_admin("[key_name(usr)] attempted to remove [adm_ckey] from the admins list without sufficient rights.")
return
admin_datums -= adm_ckey
GLOB.admin_datums -= adm_ckey
D.disassociate()
updateranktodb(adm_ckey, "player")
@@ -300,7 +301,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/datum/admin_rank/R
var/list/rank_names = list("*New Rank*")
for(R in admin_ranks)
for(R in GLOB.admin_ranks)
rank_names[R.name] = R
var/new_rank = input("Please select a rank", "New rank", null, null) as null|anything in rank_names
@@ -325,7 +326,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
R = new(new_rank, D.rank.rights, D.rank.adds, D.rank.subs) //duplicate our previous admin_rank but with a new name
else
R = new(new_rank) //blank new admin_rank
admin_ranks += R
GLOB.admin_ranks += R
if(D) //they were previously an admin
D.disassociate() //existing admin needs to be disassociated
@@ -333,7 +334,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
else
D = new(R,adm_ckey) //new admin
var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
var/client/C = GLOB.directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
D.associate(C) //link up with the client and add verbs
updateranktodb(adm_ckey, new_rank)
@@ -362,7 +363,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
D.rank.process_keyword(keyword)
var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
var/client/C = GLOB.directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
D.associate(C) //link up with the client and add verbs
message_admins("[key_name(usr)] added keyword [keyword] to permission of [adm_ckey]")
@@ -372,10 +373,10 @@ var/list/admin_ranks = list() //list of all admin_rank datums
edit_admin_permissions()
/datum/admins/proc/updateranktodb(ckey,newrank)
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
return
var/sql_ckey = sanitizeSQL(ckey)
var/sql_admin_rank = sanitizeSQL(newrank)
var/DBQuery/query_admin_rank_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
var/DBQuery/query_admin_rank_update = GLOB.dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
query_admin_rank_update.Execute()

View File

@@ -1,5 +1,8 @@
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
var/list/admin_verbs_default = list(
GLOBAL_PROTECT(admin_verbs_default)
GLOBAL_LIST_INIT(admin_verbs_default, AVerbsDefault())
/proc/AVerbsDefault()
return list(
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
/client/proc/toggleannouncelogin, /*toggles if an admin's login is announced during a round*/
/client/proc/deadmin, /*destroys our own admin datum so we can play as a regular player*/
@@ -20,10 +23,13 @@ var/list/admin_verbs_default = list(
/client/proc/reestablish_db_connection,/*reattempt a connection to the database*/
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
/client/proc/stop_sounds,
/client/proc/mentor_memo, /*mentor memo system. show/delete/write. +SERVER needed to delete mentor memos of others*/
/client/proc/stop_sounds
)
var/list/admin_verbs_admin = list(
GLOBAL_PROTECT(admin_verbs_admin)
GLOBAL_LIST_INIT(admin_verbs_admin, AVerbsAdmin())
/proc/AVerbsAdmin()
return list(
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
/client/proc/invisimin, /*allows our mob to go invisible/visible*/
// /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage
@@ -67,20 +73,16 @@ var/list/admin_verbs_admin = list(
/client/proc/toggle_AI_interact, /*toggle admin ability to interact with machines as an AI*/
/client/proc/customiseSNPC, /* Customise any interactive crewmembers in the world */
/client/proc/resetSNPC, /* Resets any interactive crewmembers in the world */
/client/proc/toggleSNPC, /* Toggles an npc's processing mode */
/client/proc/open_shuttle_manipulator /* Opens shuttle manipulator UI */
)
var/list/admin_verbs_ban = list(
/client/proc/unban_panel,
/client/proc/DB_ban_panel,
/client/proc/stickybanpanel
)
var/list/admin_verbs_sounds = list(
/client/proc/play_local_sound,
/client/proc/play_sound,
/client/proc/set_round_end_sound,
)
var/list/admin_verbs_fun = list(
GLOBAL_PROTECT(admin_verbs_ban)
GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel,/client/proc/DB_ban_panel,/client/proc/stickybanpanel))
GLOBAL_PROTECT(admin_verbs_sounds)
GLOBAL_LIST_INIT(admin_verbs_sounds, list(/client/proc/play_local_sound,/client/proc/play_sound,/client/proc/set_round_end_sound))
GLOBAL_PROTECT(admin_verbs_fun)
GLOBAL_LIST_INIT(admin_verbs_fun, AVerbsFun())
/proc/AVerbsFun()
return list(
/client/proc/cmd_admin_dress,
/client/proc/cmd_admin_gib_self,
/client/proc/drop_bomb,
@@ -95,19 +97,20 @@ var/list/admin_verbs_fun = list(
/client/proc/set_ooc,
/client/proc/reset_ooc,
/client/proc/forceEvent,
/client/proc/bluespace_artillery,
/client/proc/admin_change_sec_level,
/client/proc/toggle_nuke,
/client/proc/mass_zombie_infection,
/client/proc/mass_zombie_cure,
/client/proc/polymorph_all,
/client/proc/show_tip
/client/proc/show_tip,
/client/proc/smite
)
var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
/client/proc/respawn_character
)
var/list/admin_verbs_server = list(
GLOBAL_PROTECT(admin_verbs_spawn)
GLOBAL_LIST_INIT(admin_verbs_spawn, list(/datum/admins/proc/spawn_atom,/client/proc/respawn_character))
GLOBAL_PROTECT(admin_verbs_server)
GLOBAL_LIST_INIT(admin_verbs_server, AVerbsServer())
/proc/AVerbsServer()
return list(
/datum/admins/proc/startnow,
/datum/admins/proc/restart,
/datum/admins/proc/end_round,
@@ -123,9 +126,11 @@ var/list/admin_verbs_server = list(
/client/proc/adminchangemap,
/client/proc/panicbunker,
/client/proc/toggle_hub
)
var/list/admin_verbs_debug = list(
GLOBAL_PROTECT(admin_verbs_debug)
GLOBAL_LIST_INIT(admin_verbs_debug, AVerbsDebug())
/proc/AVerbsDebug()
return list(
/client/proc/restart_controller,
/client/proc/cmd_admin_list_open_jobs,
/client/proc/Debug2,
@@ -133,6 +138,7 @@ var/list/admin_verbs_debug = list(
/client/proc/cmd_debug_mob_lists,
/client/proc/cmd_admin_delete,
/client/proc/cmd_debug_del_all,
/client/proc/restart_controller,
/client/proc/enable_debug_verbs,
/client/proc/callproc,
/client/proc/callproc_datum,
@@ -143,9 +149,6 @@ var/list/admin_verbs_debug = list(
/client/proc/check_bomb_impacts,
/proc/machine_upgrade,
/client/proc/populate_world,
//citadel code
/client/proc/give_humans_genitals,
/client/proc/test_mammal_overlays,
/client/proc/get_dynex_power, //*debug verbs for dynex explosions.
/client/proc/get_dynex_range, //*debug verbs for dynex explosions.
/client/proc/set_dynex_scale,
@@ -159,22 +162,23 @@ var/list/admin_verbs_debug = list(
/client/proc/clear_dynamic_transit,
/client/proc/toggle_medal_disable,
/client/proc/view_runtimes,
//citadel code
/client/proc/give_humans_genitals,
/client/proc/test_mammal_overlays,
/client/proc/pump_random_event
)
var/list/admin_verbs_possess = list(
/proc/possess,
/proc/release
)
var/list/admin_verbs_permissions = list(
/client/proc/edit_admin_permissions,
/client/proc/create_poll
)
var/list/admin_verbs_rejuv = list(
/client/proc/respawn_character
)
GLOBAL_PROTECT(admin_verbs_possess)
GLOBAL_LIST_INIT(admin_verbs_possess, list(/proc/possess,/proc/release))
GLOBAL_PROTECT(admin_verbs_permissions)
GLOBAL_LIST_INIT(admin_verbs_permissions, list(/client/proc/edit_admin_permissions,/client/proc/create_poll))
GLOBAL_PROTECT(admin_verbs_rejuv)
GLOBAL_LIST_INIT(admin_verbs_rejuv, list(/client/proc/respawn_character))
//verbs which can be hidden - needs work
var/list/admin_verbs_hideable = list(
GLOBAL_PROTECT(admin_verbs_hideable)
GLOBAL_LIST_INIT(admin_verbs_hideable, AVerbsHideable())
/proc/AVerbsHideable()
return list(
/client/proc/set_ooc,
/client/proc/reset_ooc,
/client/proc/deadmin,
@@ -244,7 +248,6 @@ var/list/admin_verbs_hideable = list(
/client/proc/debug_huds,
/client/proc/customiseSNPC,
/client/proc/resetSNPC,
/client/proc/toggleSNPC
)
/client/proc/add_admin_verbs()
@@ -252,32 +255,31 @@ var/list/admin_verbs_hideable = list(
control_freak = CONTROL_FREAK_SKIN | CONTROL_FREAK_MACROS
var/rights = holder.rank.rights
verbs += admin_verbs_default
verbs += /client/proc/cmd_mentor_say
verbs += GLOB.admin_verbs_default
if(rights & R_BUILDMODE)
verbs += /client/proc/togglebuildmodeself
if(rights & R_ADMIN)
verbs += admin_verbs_admin
verbs += GLOB.admin_verbs_admin
if(rights & R_BAN)
verbs += admin_verbs_ban
verbs += GLOB.admin_verbs_ban
if(rights & R_FUN)
verbs += admin_verbs_fun
verbs += GLOB.admin_verbs_fun
if(rights & R_SERVER)
verbs += admin_verbs_server
verbs += GLOB.admin_verbs_server
if(rights & R_DEBUG)
verbs += admin_verbs_debug
verbs += GLOB.admin_verbs_debug
if(rights & R_POSSESS)
verbs += admin_verbs_possess
verbs += GLOB.admin_verbs_possess
if(rights & R_PERMISSIONS)
verbs += admin_verbs_permissions
verbs += GLOB.admin_verbs_permissions
if(rights & R_STEALTH)
verbs += /client/proc/stealth
if(rights & R_REJUVINATE)
verbs += admin_verbs_rejuv
verbs += GLOB.admin_verbs_rejuv
if(rights & R_SOUNDS)
verbs += admin_verbs_sounds
verbs += GLOB.admin_verbs_sounds
if(rights & R_SPAWN)
verbs += admin_verbs_spawn
verbs += GLOB.admin_verbs_spawn
for(var/path in holder.rank.adds)
verbs += path
@@ -286,19 +288,19 @@ var/list/admin_verbs_hideable = list(
/client/proc/remove_admin_verbs()
verbs.Remove(
admin_verbs_default,
GLOB.admin_verbs_default,
/client/proc/togglebuildmodeself,
admin_verbs_admin,
admin_verbs_ban,
admin_verbs_fun,
admin_verbs_server,
admin_verbs_debug,
admin_verbs_possess,
admin_verbs_permissions,
GLOB.admin_verbs_admin,
GLOB.admin_verbs_ban,
GLOB.admin_verbs_fun,
GLOB.admin_verbs_server,
GLOB.admin_verbs_debug,
GLOB.admin_verbs_possess,
GLOB.admin_verbs_permissions,
/client/proc/stealth,
admin_verbs_rejuv,
admin_verbs_sounds,
admin_verbs_spawn,
GLOB.admin_verbs_rejuv,
GLOB.admin_verbs_sounds,
GLOB.admin_verbs_spawn,
/*Debug verbs added by "show debug verbs"*/
/client/proc/Cell,
/client/proc/do_not_use_these,
@@ -324,11 +326,11 @@ var/list/admin_verbs_hideable = list(
set name = "Adminverbs - Hide Most"
set category = "Admin"
verbs.Remove(/client/proc/hide_most_verbs, admin_verbs_hideable)
verbs.Remove(/client/proc/hide_most_verbs, GLOB.admin_verbs_hideable)
verbs += /client/proc/show_verbs
to_chat(src, "<span class='interface'>Most of your adminverbs have been hidden.</span>")
feedback_add_details("admin_verb","HMV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Hide Most Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/hide_verbs()
@@ -339,7 +341,7 @@ var/list/admin_verbs_hideable = list(
verbs += /client/proc/show_verbs
to_chat(src, "<span class='interface'>Almost all of your adminverbs have been hidden.</span>")
feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Hide All Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/show_verbs()
@@ -350,7 +352,7 @@ var/list/admin_verbs_hideable = list(
add_admin_verbs()
to_chat(src, "<span class='interface'>All of your adminverbs are now visible.</span>")
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Show Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -370,7 +372,7 @@ var/list/admin_verbs_hideable = list(
message_admins("[key_name_admin(usr)] re-entered corpse")
ghost.can_reenter_corpse = 1 //force re-entering even when otherwise not possible
ghost.reenter_corpse()
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Admin Reenter") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else if(isnewplayer(mob))
to_chat(src, "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</font>")
else
@@ -381,7 +383,7 @@ var/list/admin_verbs_hideable = list(
body.ghostize(1)
if(body && !body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Admin Ghost") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/invisimin()
@@ -401,8 +403,7 @@ var/list/admin_verbs_hideable = list(
set category = "Admin"
if(holder)
holder.player_panel_new()
feedback_add_details("admin_verb","PPN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
feedback_add_details("admin_verb","Player Panel New") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/check_antagonists()
set name = "Check Antagonists"
@@ -412,8 +413,7 @@ var/list/admin_verbs_hideable = list(
log_admin("[key_name(usr)] checked antagonists.") //for tsar~
if(!isobserver(usr))
message_admins("[key_name_admin(usr)] checked antagonists.")
feedback_add_details("admin_verb","CHA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
feedback_add_details("admin_verb","Check Antagonists") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/unban_panel()
set name = "Unban Panel"
@@ -423,32 +423,29 @@ var/list/admin_verbs_hideable = list(
holder.unbanpanel()
else
holder.DB_ban_panel()
feedback_add_details("admin_verb","UBP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
feedback_add_details("admin_verb","Unban Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/game_panel()
set name = "Game Panel"
set category = "Admin"
if(holder)
holder.Game()
feedback_add_details("admin_verb","GP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
feedback_add_details("admin_verb","Game Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/secrets()
set name = "Secrets"
set category = "Admin"
if (holder)
holder.Secrets()
feedback_add_details("admin_verb","S") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
feedback_add_details("admin_verb","Secrets Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/findStealthKey(txt)
if(txt)
for(var/P in stealthminID)
if(stealthminID[P] == txt)
for(var/P in GLOB.stealthminID)
if(GLOB.stealthminID[P] == txt)
return P
txt = stealthminID[ckey]
txt = GLOB.stealthminID[ckey]
return txt
/client/proc/createStealthKey()
@@ -456,11 +453,11 @@ var/list/admin_verbs_hideable = list(
var/i = 0
while(i == 0)
i = 1
for(var/P in stealthminID)
if(num == stealthminID[P])
for(var/P in GLOB.stealthminID)
if(num == GLOB.stealthminID[P])
num++
i = 0
stealthminID["[ckey]"] = "@[num2text(num)]"
GLOB.stealthminID["[ckey]"] = "@[num2text(num)]"
/client/proc/stealth()
set category = "Admin"
@@ -488,10 +485,10 @@ var/list/admin_verbs_hideable = list(
mob.mouse_opacity = 0
log_admin("[key_name(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]")
message_admins("[key_name_admin(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]")
feedback_add_details("admin_verb","SM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Stealth Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/drop_bomb()
set category = "Dangerous"
set category = "Special Verbs"
set name = "Drop Bomb"
set desc = "Cause an explosion of varying strength at your location."
@@ -509,7 +506,7 @@ var/list/admin_verbs_hideable = list(
if("Big Bomb (3, 5, 7, 5)")
explosion(epicenter, 3, 5, 7, 5, TRUE, TRUE)
if("Maxcap")
explosion(epicenter, MAX_EX_DEVESTATION_RANGE, MAX_EX_HEAVY_RANGE, MAX_EX_LIGHT_RANGE, MAX_EX_FLASH_RANGE)
explosion(epicenter, GLOB.MAX_EX_DEVESTATION_RANGE, GLOB.MAX_EX_HEAVY_RANGE, GLOB.MAX_EX_LIGHT_RANGE, GLOB.MAX_EX_FLASH_RANGE)
if("Custom Bomb")
var/devastation_range = input("Devastation range (in tiles):") as null|num
if(devastation_range == null)
@@ -523,17 +520,17 @@ var/list/admin_verbs_hideable = list(
var/flash_range = input("Flash range (in tiles):") as null|num
if(flash_range == null)
return
if(devastation_range > MAX_EX_DEVESTATION_RANGE || heavy_impact_range > MAX_EX_HEAVY_RANGE || light_impact_range > MAX_EX_LIGHT_RANGE || flash_range > MAX_EX_FLASH_RANGE)
if(devastation_range > GLOB.MAX_EX_DEVESTATION_RANGE || heavy_impact_range > GLOB.MAX_EX_HEAVY_RANGE || light_impact_range > GLOB.MAX_EX_LIGHT_RANGE || flash_range > GLOB.MAX_EX_FLASH_RANGE)
if(alert("Bomb is bigger than the maxcap. Continue?",,"Yes","No") != "Yes")
return
epicenter = mob.loc //We need to reupdate as they may have moved again
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, TRUE, TRUE)
message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].")
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Drop Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/drop_dynex_bomb()
set category = "Dangerous"
set category = "Special Verbs"
set name = "Drop DynEx Bomb"
set desc = "Cause an explosion of varying strength at your location."
@@ -543,7 +540,7 @@ var/list/admin_verbs_hideable = list(
dyn_explosion(epicenter, ex_power)
message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].")
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
feedback_add_details("admin_verb","DDXB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Drop Dynamic Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/get_dynex_range()
set category = "Debug"
@@ -551,7 +548,7 @@ var/list/admin_verbs_hideable = list(
set desc = "Get the estimated range of a bomb, using explosive power."
var/ex_power = input("Explosive Power:") as null|num
var/range = round((2 * ex_power)**DYN_EX_SCALE)
var/range = round((2 * ex_power)**GLOB.DYN_EX_SCALE)
to_chat(usr, "Estimated Explosive Range: (Devestation: [round(range*0.25)], Heavy: [round(range*0.5)], Light: [round(range)])")
/client/proc/get_dynex_power()
@@ -560,7 +557,7 @@ var/list/admin_verbs_hideable = list(
set desc = "Get the estimated required power of a bomb, to reach a specific range."
var/ex_range = input("Light Explosion Range:") as null|num
var/power = (0.5 * ex_range)**(1/DYN_EX_SCALE)
var/power = (0.5 * ex_range)**(1/GLOB.DYN_EX_SCALE)
to_chat(usr, "Estimated Explosive Power: [power]")
/client/proc/set_dynex_scale()
@@ -571,24 +568,24 @@ var/list/admin_verbs_hideable = list(
var/ex_scale = input("New DynEx Scale:") as null|num
if(!ex_scale)
return
DYN_EX_SCALE = ex_scale
GLOB.DYN_EX_SCALE = ex_scale
log_admin("[key_name(usr)] has modified Dynamic Explosion Scale: [ex_scale]")
message_admins("[key_name_admin(usr)] has modified Dynamic Explosion Scale: [ex_scale]")
/client/proc/give_spell(mob/T in mob_list)
/client/proc/give_spell(mob/T in GLOB.mob_list)
set category = "Fun"
set name = "Give Spell"
set desc = "Gives a spell to a mob."
var/list/spell_list = list()
var/type_length = length("/obj/effect/proc_holder/spell") + 2
for(var/A in spells)
for(var/A in GLOB.spells)
spell_list[copytext("[A]", type_length)] = A
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spell_list
if(!S)
return
feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Give Spell") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] gave [key_name(T)] the spell [S].</span>")
@@ -599,7 +596,7 @@ var/list/admin_verbs_hideable = list(
T.AddSpell(new S)
message_admins("<span class='danger'>Spells given to mindless mobs will not be transferred in mindswap or cloning!</span>")
/client/proc/remove_spell(mob/T in mob_list)
/client/proc/remove_spell(mob/T in GLOB.mob_list)
set category = "Fun"
set name = "Remove Spell"
set desc = "Remove a spell from the selected mob."
@@ -610,16 +607,16 @@ var/list/admin_verbs_hideable = list(
T.mind.RemoveSpell(S)
log_admin("[key_name(usr)] removed the spell [S] from [key_name(T)].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] removed the spell [S] from [key_name(T)].</span>")
feedback_add_details("admin_verb","RS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Remove Spell") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/give_disease(mob/T in mob_list)
/client/proc/give_disease(mob/T in GLOB.mob_list)
set category = "Fun"
set name = "Give Disease"
set desc = "Gives a Disease to a mob."
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in diseases
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in SSdisease.diseases
if(!D) return
T.ForceContractDisease(new D)
feedback_add_details("admin_verb","GD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Give Disease") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] gave [key_name(T)] the disease [D].</span>")
@@ -630,19 +627,16 @@ var/list/admin_verbs_hideable = list(
var/message = input(usr, "What do you want the message to be?", "Make Sound") as text | null
if(!message)
return
var/templanguages = O.languages_spoken
O.languages_spoken |= ALL
O.say(message)
O.languages_spoken = templanguages
log_admin("[key_name(usr)] made [O] at [O.x], [O.y], [O.z] say \"[message]\"")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [O] at [O.x], [O.y], [O.z]. say \"[message]\"</span>")
feedback_add_details("admin_verb","OS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Object Say") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/togglebuildmodeself()
set name = "Toggle Build Mode Self"
set category = "Special Verbs"
if(src.mob)
togglebuildmode(src.mob)
feedback_add_details("admin_verb","TBMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Toggle Build Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_log_hrefs()
set name = "Toggle href logging"
@@ -671,17 +665,20 @@ var/list/admin_verbs_hideable = list(
if(!holder)
return
if(has_antag_hud())
toggle_antag_hud()
holder.disassociate()
qdel(holder)
deadmins += ckey
admin_datums -= ckey
GLOB.deadmins += ckey
GLOB.admin_datums -= ckey
verbs += /client/proc/readmin
to_chat(src, "<span class='interface'>You are now a normal player.</span>")
log_admin("[src] deadmined themself.")
message_admins("[src] deadmined themself.")
feedback_add_details("admin_verb","DAS")
feedback_add_details("admin_verb","Deadmin")
/client/proc/readmin()
set name = "Readmin"
@@ -693,13 +690,13 @@ var/list/admin_verbs_hideable = list(
if(!holder) // Something went wrong...
return
deadmins -= ckey
GLOB.deadmins -= ckey
verbs -= /client/proc/readmin
to_chat(src, "<span class='interface'>You are now an admin.</span>")
message_admins("[src] re-adminned themselves.")
log_admin("[src] re-adminned themselves.")
feedback_add_details("admin_verb","RAS")
feedback_add_details("admin_verb","Readmin")
/client/proc/populate_world(amount = 50 as num)
set name = "Populate World"
@@ -716,7 +713,7 @@ var/list/admin_verbs_hideable = list(
j = 100
do
area = pick(the_station_areas)
area = pick(GLOB.the_station_areas)
if (area)

View File

@@ -4,7 +4,7 @@
return 0
if(!M.client) //no cache. fallback to a DBQuery
var/DBQuery/query_jobban_check_ban = dbcon.NewQuery("SELECT reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(M.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[sanitizeSQL(rank)]'")
var/DBQuery/query_jobban_check_ban = GLOB.dbcon.NewQuery("SELECT reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(M.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[sanitizeSQL(rank)]'")
if(!query_jobban_check_ban.warn_execute())
return
if(query_jobban_check_ban.NextRow())
@@ -24,7 +24,7 @@
/proc/jobban_buildcache(client/C)
if(C && istype(C))
C.jobbancache = list()
var/DBQuery/query_jobban_build_cache = dbcon.NewQuery("SELECT job, reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(C.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
var/DBQuery/query_jobban_build_cache = GLOB.dbcon.NewQuery("SELECT job, reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(C.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
if(!query_jobban_build_cache.warn_execute())
return
while(query_jobban_build_cache.NextRow())

View File

@@ -1,5 +1,6 @@
/var/create_mob_html = null
/datum/admins/proc/create_mob(mob/user)
var/static/create_mob_html
if (!create_mob_html)
var/mobjs = null
mobjs = jointext(typesof(/mob), ";")

View File

@@ -1,10 +1,5 @@
var/create_object_html = null
var/list/create_object_forms = list(
/obj, /obj/structure, /obj/machinery, /obj/effect,
/obj/item, /obj/item/clothing, /obj/item/stack, /obj/item/device,
/obj/item/weapon, /obj/item/weapon/reagent_containers, /obj/item/weapon/gun)
/datum/admins/proc/create_object(mob/user)
var/static/create_object_html = null
if (!create_object_html)
var/objectjs = null
objectjs = jointext(typesof(/obj), ";")
@@ -13,8 +8,12 @@ var/list/create_object_forms = list(
user << browse(replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=425x475")
/datum/admins/proc/quick_create_object(mob/user)
var/static/list/create_object_forms = list(
/obj, /obj/structure, /obj/machinery, /obj/effect,
/obj/item, /obj/item/clothing, /obj/item/stack, /obj/item/device,
/obj/item/weapon, /obj/item/weapon/reagent_containers, /obj/item/weapon/gun)
var/path = input("Select the path of the object you wish to create.", "Path", /obj) in create_object_forms
var/html_form = create_object_forms[path]

View File

@@ -3,16 +3,16 @@
set category = "Special Verbs"
if(!check_rights(R_PERMISSIONS))
return
if(!dbcon.IsConnected())
if(!GLOB.dbcon.IsConnected())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return
var/returned = create_poll_function()
if(returned)
var/DBQuery/query_check_option = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE pollid = [returned]")
var/DBQuery/query_check_option = GLOB.dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE pollid = [returned]")
if(!query_check_option.warn_execute())
return
if(query_check_option.NextRow())
var/DBQuery/query_log_get = dbcon.NewQuery("SELECT polltype, question, adminonly FROM [format_table_name("poll_question")] WHERE id = [returned]")
var/DBQuery/query_log_get = GLOB.dbcon.NewQuery("SELECT polltype, question, adminonly FROM [format_table_name("poll_question")] WHERE id = [returned]")
if(!query_log_get.warn_execute())
return
if(query_log_get.NextRow())
@@ -23,7 +23,7 @@
message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]<br>Question: [question]")
else
to_chat(src, "Poll question created without any options, poll will be deleted.")
var/DBQuery/query_del_poll = dbcon.NewQuery("DELETE FROM [format_table_name("poll_question")] WHERE id = [returned]")
var/DBQuery/query_del_poll = GLOB.dbcon.NewQuery("DELETE FROM [format_table_name("poll_question")] WHERE id = [returned]")
if(!query_del_poll.warn_execute())
return
@@ -51,7 +51,7 @@
if(!endtime)
return
endtime = sanitizeSQL(endtime)
var/DBQuery/query_validate_time = dbcon.NewQuery("SELECT STR_TO_DATE('[endtime]','%Y-%c-%d %T')")
var/DBQuery/query_validate_time = GLOB.dbcon.NewQuery("SELECT STR_TO_DATE('[endtime]','%Y-%c-%d %T')")
if(!query_validate_time.warn_execute())
return
if(query_validate_time.NextRow())
@@ -59,7 +59,7 @@
if(!endtime)
to_chat(src, "Datetime entered is invalid.")
return
var/DBQuery/query_time_later = dbcon.NewQuery("SELECT TIMESTAMP('[endtime]') < NOW()")
var/DBQuery/query_time_later = GLOB.dbcon.NewQuery("SELECT TIMESTAMP('[endtime]') < NOW()")
if(!query_time_later.warn_execute())
return
if(query_time_later.NextRow())
@@ -88,7 +88,7 @@
if(!question)
return
question = sanitizeSQL(question)
var/DBQuery/query_polladd_question = dbcon.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, dontshow) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', INET_ATON('[address]'), '[dontshow]')")
var/DBQuery/query_polladd_question = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, dontshow) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', INET_ATON('[address]'), '[dontshow]')")
if(!query_polladd_question.warn_execute())
return
if(polltype == POLLTYPE_TEXT)
@@ -96,7 +96,7 @@
message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]<br>Question: [question]")
return
var/pollid = 0
var/DBQuery/query_get_id = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE question = '[question]' AND starttime = '[starttime]' AND endtime = '[endtime]' AND createdby_ckey = '[sql_ckey]' AND createdby_ip = INET_ATON('[address]')")
var/DBQuery/query_get_id = GLOB.dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE question = '[question]' AND starttime = '[starttime]' AND endtime = '[endtime]' AND createdby_ckey = '[sql_ckey]' AND createdby_ip = INET_ATON('[address]')")
if(!query_get_id.warn_execute())
return
if(query_get_id.NextRow())
@@ -146,7 +146,7 @@
descmax = sanitizeSQL(descmax)
else if(descmax == null)
return pollid
var/DBQuery/query_polladd_option = dbcon.NewQuery("INSERT INTO [format_table_name("poll_option")] (pollid, text, percentagecalc, minval, maxval, descmin, descmid, descmax) VALUES ('[pollid]', '[option]', '[percentagecalc]', '[minval]', '[maxval]', '[descmin]', '[descmid]', '[descmax]')")
var/DBQuery/query_polladd_option = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("poll_option")] (pollid, text, percentagecalc, minval, maxval, descmin, descmid, descmax) VALUES ('[pollid]', '[option]', '[percentagecalc]', '[minval]', '[maxval]', '[descmin]', '[descmid]', '[descmax]')")
if(!query_polladd_option.warn_execute())
return pollid
switch(alert(" ",,"Add option","Finish", "Cancel"))

View File

@@ -1,5 +1,5 @@
/var/create_turf_html = null
/datum/admins/proc/create_turf(mob/user)
var/static/create_turf_html
if (!create_turf_html)
var/turfjs = null
turfjs = jointext(typesof(/turf), ";")

View File

@@ -159,7 +159,7 @@
/obj/effect/forcefield/arena_shuttle_entrance/Bumped(mob/M as mob|obj)
if(!warp_points.len)
for(var/obj/effect/landmark/shuttle_arena_entrance/S in landmarks_list)
for(var/obj/effect/landmark/shuttle_arena_entrance/S in GLOB.landmarks_list)
warp_points |= S
if(!isliving(M))
return

View File

@@ -1,4 +1,5 @@
var/list/admin_datums = list()
GLOBAL_LIST_EMPTY(admin_datums)
GLOBAL_PROTECT(admin_datums)
/datum/admins
var/datum/admin_rank/rank
@@ -27,7 +28,7 @@ var/list/admin_datums = list()
return
rank = R
admin_signature = "Nanotrasen Officer #[rand(0,9)][rand(0,9)][rand(0,9)]"
admin_datums[ckey] = src
GLOB.admin_datums[ckey] = src
/datum/admins/proc/associate(client/C)
if(istype(C))
@@ -35,11 +36,11 @@ var/list/admin_datums = list()
owner.holder = src
owner.add_admin_verbs() //TODO
owner.verbs -= /client/proc/readmin
admins |= C
GLOB.admins |= C
/datum/admins/proc/disassociate()
if(owner)
admins -= owner
GLOB.admins -= owner
owner.remove_admin_verbs()
owner.holder = null
owner = null

View File

@@ -33,8 +33,8 @@
cachedintel.cache = TRUE
return cachedintel
if(dbcon.Connect())
var/DBQuery/query_get_ip_intel = dbcon.NewQuery({"
if(GLOB.dbcon.Connect())
var/DBQuery/query_get_ip_intel = GLOB.dbcon.NewQuery({"
SELECT date, intel, TIMESTAMPDIFF(MINUTE,date,NOW())
FROM [format_table_name("ipintel")]
WHERE
@@ -62,8 +62,8 @@
res.intel = ip_intel_query(ip)
if (updatecache && res.intel >= 0)
SSipintel.cache[ip] = res
if(dbcon.Connect())
var/DBQuery/query_add_ip_intel = dbcon.NewQuery("INSERT INTO [format_table_name("ipintel")] (ip, intel) VALUES (INET_ATON('[ip]'), [res.intel]) ON DUPLICATE KEY UPDATE intel = VALUES(intel), date = NOW()")
if(GLOB.dbcon.Connect())
var/DBQuery/query_add_ip_intel = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("ipintel")] (ip, intel) VALUES (INET_ATON('[ip]'), [res.intel]) ON DUPLICATE KEY UPDATE intel = VALUES(intel), date = NOW()")
query_add_ip_intel.Execute()

View File

@@ -27,8 +27,8 @@
</tr>
"}
for(var/adm_ckey in admin_datums)
var/datum/admins/D = admin_datums[adm_ckey]
for(var/adm_ckey in GLOB.admin_datums)
var/datum/admins/D = GLOB.admin_datums[adm_ckey]
if(!D)
continue
@@ -60,7 +60,7 @@
if (!check_rights(R_PERMISSIONS))
return
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
@@ -75,7 +75,7 @@
if(!istext(adm_ckey) || !istext(new_rank))
return
var/DBQuery/query_get_admin = dbcon.NewQuery("SELECT id FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
var/DBQuery/query_get_admin = GLOB.dbcon.NewQuery("SELECT id FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
if(!query_get_admin.warn_execute())
return
@@ -86,19 +86,19 @@
admin_id = text2num(query_get_admin.item[1])
if(new_admin)
var/DBQuery/query_add_admin = dbcon.NewQuery("INSERT INTO `[format_table_name("admin")]` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
var/DBQuery/query_add_admin = GLOB.dbcon.NewQuery("INSERT INTO `[format_table_name("admin")]` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
if(!query_add_admin.warn_execute())
return
var/DBQuery/query_add_admin_log = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
var/DBQuery/query_add_admin_log = GLOB.dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
if(!query_add_admin_log.warn_execute())
return
to_chat(usr, "<span class='adminnotice'>New admin added.</span>")
else
if(!isnull(admin_id) && isnum(admin_id))
var/DBQuery/query_change_admin = dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET rank = '[new_rank]' WHERE id = [admin_id]")
var/DBQuery/query_change_admin = GLOB.dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET rank = '[new_rank]' WHERE id = [admin_id]")
if(!query_change_admin.warn_execute())
return
var/DBQuery/query_change_admin_log = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
var/DBQuery/query_change_admin_log = GLOB.dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
if(!query_change_admin_log.warn_execute())
return
to_chat(usr, "<span class='adminnnotice'>Admin rank changed.</span>")
@@ -112,14 +112,14 @@
if(check_rights(R_PERMISSIONS))
return
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
if(!adm_ckey || !istext(adm_ckey) || !isnum(new_permission))
return
var/DBQuery/query_get_perms = dbcon.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
var/DBQuery/query_get_perms = GLOB.dbcon.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
if(!query_get_perms.warn_execute())
return
@@ -130,8 +130,8 @@
if(!admin_id)
return
var/DBQuery/query_change_perms = dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET flags = [new_permission] WHERE id = [admin_id]")
var/DBQuery/query_change_perms = GLOB.dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET flags = [new_permission] WHERE id = [admin_id]")
if(!query_change_perms.warn_execute())
return
var/DBQuery/query_change_perms_log = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edit permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
var/DBQuery/query_change_perms_log = GLOB.dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edit permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
query_change_perms_log.warn_execute()

View File

@@ -309,13 +309,13 @@
usr << browse(dat, "window=players;size=600x480")
/datum/admins/proc/check_antagonists()
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
if (SSticker && SSticker.current_state >= GAME_STATE_PLAYING)
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
if(ticker.mode.replacementmode)
dat += "Former Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Replacement Game Mode: <B>[ticker.mode.replacementmode.name]</B><BR>"
if(SSticker.mode.replacementmode)
dat += "Former Game Mode: <B>[SSticker.mode.name]</B><BR>"
dat += "Replacement Game Mode: <B>[SSticker.mode.replacementmode.name]</B><BR>"
else
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Current Game Mode: <B>[SSticker.mode.name]</B><BR>"
dat += "Round Duration: <B>[round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B><BR>"
dat += "<B>Emergency shuttle</B><BR>"
if(EMERGENCY_IDLE_OR_RECALLED)
@@ -328,18 +328,18 @@
else
dat += "ETA: <a href='?_src_=holder;edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<B>Continuous Round Status</B><BR>"
dat += "<a href='?_src_=holder;toggle_continuous=1'>[config.continuous[ticker.mode.config_tag] ? "Continue if antagonists die" : "End on antagonist death"]</a>"
if(config.continuous[ticker.mode.config_tag])
dat += ", <a href='?_src_=holder;toggle_midround_antag=1'>[config.midround_antag[ticker.mode.config_tag] ? "creating replacement antagonists" : "not creating new antagonists"]</a><BR>"
dat += "<a href='?_src_=holder;toggle_continuous=1'>[config.continuous[SSticker.mode.config_tag] ? "Continue if antagonists die" : "End on antagonist death"]</a>"
if(config.continuous[SSticker.mode.config_tag])
dat += ", <a href='?_src_=holder;toggle_midround_antag=1'>[config.midround_antag[SSticker.mode.config_tag] ? "creating replacement antagonists" : "not creating new antagonists"]</a><BR>"
else
dat += "<BR>"
if(config.midround_antag[ticker.mode.config_tag])
if(config.midround_antag[SSticker.mode.config_tag])
dat += "Time limit: <a href='?_src_=holder;alter_midround_time_limit=1'>[config.midround_antag_time_check] minutes into round</a><BR>"
dat += "Living crew limit: <a href='?_src_=holder;alter_midround_life_limit=1'>[config.midround_antag_life_check * 100]% of crew alive</a><BR>"
dat += "If limits past: <a href='?_src_=holder;toggle_noncontinuous_behavior=1'>[ticker.mode.round_ends_with_antag_death ? "End The Round" : "Continue As Extended"]</a><BR>"
dat += "If limits past: <a href='?_src_=holder;toggle_noncontinuous_behavior=1'>[SSticker.mode.round_ends_with_antag_death ? "End The Round" : "Continue As Extended"]</a><BR>"
dat += "<a href='?_src_=holder;end_round=\ref[usr]'>End Round Now</a><br>"
dat += "<a href='?_src_=holder;delay_round_end=1'>[ticker.delay_end ? "End Round Normally" : "Delay Round End"]</a>"
var/connected_players = clients.len
dat += "<a href='?_src_=holder;delay_round_end=1'>[SSticker.delay_end ? "End Round Normally" : "Delay Round End"]</a>"
var/connected_players = GLOB.clients.len
var/lobby_players = 0
var/observers = 0
var/observers_connected = 0
@@ -350,7 +350,7 @@
var/other_players = 0
var/living_skipped = 0
var/drones = 0
for(var/mob/M in mob_list)
for(var/mob/M in GLOB.mob_list)
if(M.ckey)
if(isnewplayer(M))
lobby_players++
@@ -383,9 +383,9 @@
dat += "<BR><span class='userdanger'>[other_players] players in invalid state or the statistics code is bugged!</span>"
dat += "<BR>"
if(ticker.mode.syndicates.len)
if(SSticker.mode.syndicates.len)
dat += "<br><table cellspacing=5><tr><td><B>Syndicates</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.syndicates)
for(var/datum/mind/N in SSticker.mode.syndicates)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
@@ -395,7 +395,7 @@
dat += "<tr><td><i><a href='?_src_=vars;Vars=\ref[N]'>[N.name]([N.key])</a> Nuclear Operative Body destroyed!</i></td>"
dat += "<td><A href='?priv_msg=[N.key]'>PM</A></td></tr>"
dat += "</table><br><table><tr><td><B>Nuclear Disk(s)</B></td></tr>"
for(var/obj/item/weapon/disk/nuclear/N in poi_list)
for(var/obj/item/weapon/disk/nuclear/N in GLOB.poi_list)
dat += "<tr><td>[N.name], "
var/atom/disk_loc = N.loc
while(!isturf(disk_loc))
@@ -409,9 +409,9 @@
dat += "in [disk_loc.loc] at ([disk_loc.x], [disk_loc.y], [disk_loc.z])</td></tr>"
dat += "</table>"
if(ticker.mode.head_revolutionaries.len || ticker.mode.revolutionaries.len)
if(SSticker.mode.head_revolutionaries.len || SSticker.mode.revolutionaries.len)
dat += "<br><table cellspacing=5><tr><td><B>Revolutionaries</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.head_revolutionaries)
for(var/datum/mind/N in SSticker.mode.head_revolutionaries)
var/mob/M = N.current
if(!M)
dat += "<tr><td><a href='?_src_=vars;Vars=\ref[N]'>[N.name]([N.key])</a><i>Head Revolutionary body destroyed!</i></td>"
@@ -420,14 +420,14 @@
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a> <b>(Leader)</b>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
for(var/datum/mind/N in ticker.mode.revolutionaries)
for(var/datum/mind/N in SSticker.mode.revolutionaries)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
dat += "</table><table cellspacing=5><tr><td><B>Target(s)</B></td><td></td><td><B>Location</B></td></tr>"
for(var/datum/mind/N in ticker.mode.get_living_heads())
for(var/datum/mind/N in SSticker.mode.get_living_heads())
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
@@ -440,8 +440,8 @@
dat += "<td><A href='?priv_msg=[N.key]'>PM</A></td></tr>"
dat += "</table>"
for(var/datum/gang/G in ticker.mode.gangs)
dat += "<br><table cellspacing=5><tr><td><B>[G.name] Gang: <a href='?_src_=holder;gangpoints=\ref[G]'>[G.points] Influence</a> | [round((G.territory.len/start_state.num_territories)*100, 1)]% Control</B></td><td></td></tr>"
for(var/datum/gang/G in SSticker.mode.gangs)
dat += "<br><table cellspacing=5><tr><td><B>[G.name] Gang: <a href='?_src_=holder;gangpoints=\ref[G]'>[G.points] Influence</a> | [round((G.territory.len/GLOB.start_state.num_territories)*100, 1)]% Control</B></td><td></td></tr>"
for(var/datum/mind/N in G.bosses)
var/mob/M = N.current
if(!M)
@@ -458,9 +458,9 @@
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.changelings.len > 0)
if(SSticker.mode.changelings.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Changelings</B></td><td></td><td></td></tr>"
for(var/datum/mind/changeling in ticker.mode.changelings)
for(var/datum/mind/changeling in SSticker.mode.changelings)
var/mob/M = changeling.current
if(M)
dat += "<tr><td>[M.mind.changeling.changelingID] as <a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
@@ -472,9 +472,9 @@
dat += "<td><A href='?priv_msg=[changeling.key]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.wizards.len > 0)
if(SSticker.mode.wizards.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Wizards</B></td><td></td><td></td></tr>"
for(var/datum/mind/wizard in ticker.mode.wizards)
for(var/datum/mind/wizard in SSticker.mode.wizards)
var/mob/M = wizard.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
@@ -486,9 +486,9 @@
dat += "<td><A href='?priv_msg=[wizard.key]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.apprentices.len > 0)
if(SSticker.mode.apprentices.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Apprentice</B></td><td></td><td></td></tr>"
for(var/datum/mind/apprentice in ticker.mode.apprentices)
for(var/datum/mind/apprentice in SSticker.mode.apprentices)
var/mob/M = apprentice.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
@@ -500,9 +500,9 @@
dat += "<td><A href='?priv_msg=[apprentice.key]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.cult.len)
if(SSticker.mode.cult.len)
dat += "<br><table cellspacing=5><tr><td><B>Cultists</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.cult)
for(var/datum/mind/N in SSticker.mode.cult)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
@@ -510,9 +510,9 @@
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
dat += "</table>"
if(ticker.mode.servants_of_ratvar.len)
if(SSticker.mode.servants_of_ratvar.len)
dat += "<br><table cellspacing=5><tr><td><B>Servants of Ratvar</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.servants_of_ratvar)
for(var/datum/mind/N in SSticker.mode.servants_of_ratvar)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
@@ -520,9 +520,9 @@
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
dat += "</table>"
if(ticker.mode.traitors.len > 0)
if(SSticker.mode.traitors.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Traitors</B></td><td></td><td></td></tr>"
for(var/datum/mind/traitor in ticker.mode.traitors)
for(var/datum/mind/traitor in SSticker.mode.traitors)
var/mob/M = traitor.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
@@ -534,9 +534,9 @@
dat += "<td><A href='?priv_msg=[traitor.key]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.abductors.len)
if(SSticker.mode.abductors.len)
dat += "<br><table cellspacing=5><tr><td><B>Abductors</B></td><td></td><td></td></tr>"
for(var/datum/mind/abductor in ticker.mode.abductors)
for(var/datum/mind/abductor in SSticker.mode.abductors)
var/mob/M = abductor.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
@@ -548,7 +548,7 @@
dat += "<td><A href='?priv_msg=[abductor.key]'>PM</A></td>"
dat += "</table>"
dat += "<br><table cellspacing=5><tr><td><B>Abductees</B></td><td></td><td></td></tr>"
for(var/obj/machinery/abductor/experiment/E in machines)
for(var/obj/machinery/abductor/experiment/E in GLOB.machines)
for(var/datum/mind/abductee in E.abductee_minds)
var/mob/M = abductee.current
if(M)
@@ -561,9 +561,9 @@
dat += "<td><A href='?priv_msg=[abductee.key]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.devils.len)
if(SSticker.mode.devils.len)
dat += "<br><table cellspacing=5><tr><td><B>devils</B></td><td></td><td></td></tr>"
for(var/X in ticker.mode.devils)
for(var/X in SSticker.mode.devils)
var/datum/mind/devil = X
var/mob/M = devil.current
if(M)
@@ -576,9 +576,9 @@
dat += "<td><A href='?priv_msg=[devil.key]'>PM</A></td>"
dat += "</table>"
if(ticker.mode.sintouched.len)
if(SSticker.mode.sintouched.len)
dat += "<br><table cellspacing=5><tr><td><B>sintouched</B></td><td></td><td></td></tr>"
for(var/X in ticker.mode.sintouched)
for(var/X in SSticker.mode.sintouched)
var/datum/mind/sintouched = X
var/mob/M = sintouched.current
if(M)
@@ -591,15 +591,15 @@
dat += "</table>"
var/list/blob_minds = list()
for(var/mob/camera/blob/B in mob_list)
for(var/mob/camera/blob/B in GLOB.mob_list)
blob_minds |= B.mind
if(istype(ticker.mode, /datum/game_mode/blob) || blob_minds.len)
if(istype(SSticker.mode, /datum/game_mode/blob) || blob_minds.len)
dat += "<br><table cellspacing=5><tr><td><B>Blob</B></td><td></td><td></td></tr>"
if(istype(ticker.mode,/datum/game_mode/blob))
var/datum/game_mode/blob/mode = ticker.mode
if(istype(SSticker.mode,/datum/game_mode/blob))
var/datum/game_mode/blob/mode = SSticker.mode
blob_minds |= mode.blob_overminds
dat += "<tr><td><i>Progress: [blobs_legit.len]/[mode.blobwincount]</i></td></tr>"
dat += "<tr><td><i>Progress: [GLOB.blobs_legit.len]/[mode.blobwincount]</i></td></tr>"
for(var/datum/mind/blob in blob_minds)
var/mob/M = blob.current
@@ -613,8 +613,8 @@
dat += "</table>"
if(istype(ticker.mode, /datum/game_mode/monkey))
var/datum/game_mode/monkey/mode = ticker.mode
if(istype(SSticker.mode, /datum/game_mode/monkey))
var/datum/game_mode/monkey/mode = SSticker.mode
dat += "<br><table cellspacing=5><tr><td><B>Monkey</B></td><td></td><td></td></tr>"
for(var/datum/mind/eek in mode.ape_infectees)

View File

@@ -19,8 +19,8 @@
<A href='?src=\ref[src];secrets=clear_virus'>Cure all diseases currently in existence</A><BR>
<A href='?src=\ref[src];secrets=list_bombers'>Bombing List</A><BR>
<A href='?src=\ref[src];secrets=check_antagonist'>Show current traitors and objectives</A><BR>
<A href='?src=\ref[src];secrets=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
<A href='?src=\ref[src];secrets=list_lawchanges'>Show last [length(lawchanges)] law changes</A><BR>
<A href='?src=\ref[src];secrets=list_signalers'>Show last [length(GLOB.lastsignalers)] signalers</A><BR>
<A href='?src=\ref[src];secrets=list_lawchanges'>Show last [length(GLOB.lawchanges)] law changes</A><BR>
<A href='?src=\ref[src];secrets=showailaws'>Show AI Laws</A><BR>
<A href='?src=\ref[src];secrets=showgm'>Show Game Mode</A><BR>
<A href='?src=\ref[src];secrets=manifest'>Show Crew Manifest</A><BR>
@@ -96,9 +96,9 @@
switch(item)
if("admin_log")
var/dat = "<B>Admin Log<HR></B>"
for(var/l in admin_log)
for(var/l in GLOB.admin_log)
dat += "<li>[l]</li>"
if(!admin_log.len)
if(!GLOB.admin_log.len)
dat += "No-one has done anything this round!"
usr << browse(dat, "window=admin_log")
@@ -116,9 +116,9 @@
if("show_admins")
var/dat = "<B>Current admins:</B><HR>"
if(admin_datums)
for(var/ckey in admin_datums)
var/datum/admins/D = admin_datums[ckey]
if(GLOB.admin_datums)
for(var/ckey in GLOB.admin_datums)
var/datum/admins/D = GLOB.admin_datums[ckey]
dat += "[ckey] - [D.rank.name]<br>"
usr << browse(dat, "window=showadmins;size=600x500")
@@ -174,23 +174,23 @@
if(!check_rights(R_ADMIN))
return
var/dat = "<B>Bombing List<HR>"
for(var/l in bombers)
for(var/l in GLOB.bombers)
dat += text("[l]<BR>")
usr << browse(dat, "window=bombers")
if("list_signalers")
if(!check_rights(R_ADMIN))
return
var/dat = "<B>Showing last [length(lastsignalers)] signalers.</B><HR>"
for(var/sig in lastsignalers)
var/dat = "<B>Showing last [length(GLOB.lastsignalers)] signalers.</B><HR>"
for(var/sig in GLOB.lastsignalers)
dat += "[sig]<BR>"
usr << browse(dat, "window=lastsignalers;size=800x500")
if("list_lawchanges")
if(!check_rights(R_ADMIN))
return
var/dat = "<B>Showing last [length(lawchanges)] law changes.</B><HR>"
for(var/sig in lawchanges)
var/dat = "<B>Showing last [length(GLOB.lawchanges)] law changes.</B><HR>"
for(var/sig in GLOB.lawchanges)
dat += "[sig]<BR>"
usr << browse(dat, "window=lawchanges;size=800x500")
@@ -241,17 +241,17 @@
if("showgm")
if(!check_rights(R_ADMIN))
return
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("The game hasn't started yet!")
else if (ticker.mode)
alert("The game mode is [ticker.mode.name]")
else alert("For some reason there's a ticker, but not a game mode")
else if (SSticker.mode)
alert("The game mode is [SSticker.mode.name]")
else alert("For some reason there's a SSticker, but not a game mode")
if("manifest")
if(!check_rights(R_ADMIN))
return
var/dat = "<B>Showing Crew Manifest.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>"
for(var/datum/data/record/t in data_core.general)
for(var/datum/data/record/t in GLOB.data_core.general)
dat += "<tr><td>[t.fields["name"]]</td><td>[t.fields["rank"]]</td></tr>"
dat += "</table>"
usr << browse(dat, "window=manifest;size=440x410")
@@ -260,7 +260,7 @@
return
var/dat = "<B>Showing DNA from blood.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
for(var/mob/living/carbon/human/H in GLOB.mob_list)
if(H.ckey)
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.dna.blood_type]</td></tr>"
dat += "</table>"
@@ -270,7 +270,7 @@
return
var/dat = "<B>Showing Fingerprints.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
for(var/mob/living/carbon/human/H in GLOB.mob_list)
if(H.ckey)
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
dat += "</table>"
@@ -281,7 +281,7 @@
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M")
for(var/mob/living/carbon/human/H in mob_list)
for(var/mob/living/carbon/human/H in GLOB.mob_list)
spawn(0)
H.monkeyize()
ok = 1
@@ -289,12 +289,12 @@
if("allspecies")
if(!check_rights(R_FUN))
return
var/result = input(usr, "Please choose a new species","Species") as null|anything in species_list
var/result = input(usr, "Please choose a new species","Species") as null|anything in GLOB.species_list
if(result)
log_admin("[key_name(usr)] turned all humans into [result]", 1)
message_admins("\blue [key_name_admin(usr)] turned all humans into [result]")
var/newtype = species_list[result]
for(var/mob/living/carbon/human/H in mob_list)
var/newtype = GLOB.species_list[result]
for(var/mob/living/carbon/human/H in GLOB.mob_list)
H.set_species(newtype)
if("corgi")
@@ -302,7 +302,7 @@
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M")
for(var/mob/living/carbon/human/H in mob_list)
for(var/mob/living/carbon/human/H in GLOB.mob_list)
spawn(0)
H.corgize()
ok = 1
@@ -344,7 +344,7 @@
if("traitor_all")
if(!check_rights(R_FUN))
return
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("The game hasn't started yet!")
return
var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN)
@@ -352,31 +352,31 @@
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","TA([objective])")
for(var/mob/living/carbon/human/H in player_list)
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(H.stat == 2 || !H.client || !H.mind) continue
if(is_special_character(H)) continue
//traitorize(H, objective, 0)
ticker.mode.traitors += H.mind
SSticker.mode.traitors += H.mind
H.mind.special_role = "traitor"
var/datum/objective/new_objective = new
new_objective.owner = H
new_objective.explanation_text = objective
H.mind.objectives += new_objective
ticker.mode.greet_traitor(H.mind)
//ticker.mode.forge_traitor_objectives(H.mind)
ticker.mode.finalize_traitor(H.mind)
for(var/mob/living/silicon/A in player_list)
SSticker.mode.greet_traitor(H.mind)
//SSticker.mode.forge_traitor_objectives(H.mind)
SSticker.mode.finalize_traitor(H.mind)
for(var/mob/living/silicon/A in GLOB.player_list)
if(A.stat == 2 || !A.client || !A.mind) continue
if(ispAI(A)) continue
else if(is_special_character(A)) continue
ticker.mode.traitors += A.mind
SSticker.mode.traitors += A.mind
A.mind.special_role = "traitor"
var/datum/objective/new_objective = new
new_objective.owner = A
new_objective.explanation_text = objective
A.mind.objectives += new_objective
ticker.mode.greet_traitor(A.mind)
ticker.mode.finalize_traitor(A.mind)
SSticker.mode.greet_traitor(A.mind)
SSticker.mode.finalize_traitor(A.mind)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]</span>")
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
@@ -386,19 +386,19 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BC")
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", MAX_EX_LIGHT_RANGE) as num|null
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE) as num|null
if (newBombCap < 4)
return
MAX_EX_DEVESTATION_RANGE = round(newBombCap/4)
MAX_EX_HEAVY_RANGE = round(newBombCap/2)
MAX_EX_LIGHT_RANGE = newBombCap
GLOB.MAX_EX_DEVESTATION_RANGE = round(newBombCap/4)
GLOB.MAX_EX_HEAVY_RANGE = round(newBombCap/2)
GLOB.MAX_EX_LIGHT_RANGE = newBombCap
//I don't know why these are their own variables, but fuck it, they are.
MAX_EX_FLASH_RANGE = newBombCap
MAX_EX_FLAME_RANGE = newBombCap
GLOB.MAX_EX_FLASH_RANGE = newBombCap
GLOB.MAX_EX_FLAME_RANGE = newBombCap
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]</span>")
log_admin("[key_name(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]")
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]</span>")
log_admin("[key_name(usr)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]")
if("lightsout")
@@ -415,32 +415,45 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BO")
message_admins("[key_name_admin(usr)] broke all lights")
for(var/obj/machinery/light/L in machines)
for(var/obj/machinery/light/L in GLOB.machines)
L.break_light_tube()
if("anime")
if(!check_rights(R_FUN))
return
var/animetype = alert("Would you like to have the clothes be changed?",,"Yes","No","Cancel")
var/droptype
if(animetype =="Yes")
droptype = alert("Make the uniforms Nodrop?",,"Yes","No","Cancel")
if(animetype == "Cancel" || droptype == "Cancel")
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","CC")
message_admins("[key_name_admin(usr)] made everything kawaii.")
for(var/mob/living/carbon/human/H in mob_list)
for(var/mob/living/carbon/human/H in GLOB.mob_list)
H << sound('sound/AI/animes.ogg')
if(H.dna.species.id == "human")
if(H.dna.features["tail_human"] == "None" || H.dna.features["ears"] == "None")
H.dna.features["tail_human"] = "Cat"
H.dna.features["ears"] = "Cat"
var/seifuku = pick(typesof(/obj/item/clothing/under/schoolgirl))
var/obj/item/clothing/under/schoolgirl/I = new seifuku
var/list/honorifics = list("[MALE]" = list("kun"), "[FEMALE]" = list("chan","tan"), "[NEUTER]" = list("san")) //John Robust -> Robust-kun
var/list/names = splittext(H.real_name," ")
var/forename = names.len > 1 ? names[2] : names[1]
var/newname = "[forename]-[pick(honorifics["[H.gender]"])]"
H.fully_replace_character_name(H.real_name,newname)
H.temporarilyRemoveItemFromInventory(H.w_uniform, TRUE)
H.equip_to_slot_or_del(I, slot_w_uniform)
I.flags |= NODROP
H.update_mutant_bodyparts()
if(animetype == "Yes")
var/seifuku = pick(typesof(/obj/item/clothing/under/schoolgirl))
var/obj/item/clothing/under/schoolgirl/I = new seifuku
var/olduniform = H.w_uniform
H.temporarilyRemoveItemFromInventory(H.w_uniform, TRUE, FALSE)
H.equip_to_slot_or_del(I, slot_w_uniform)
qdel(olduniform)
if(droptype == "Yes")
I.flags |= NODROP
else
to_chat(H, "You're not kawaii enough for this.")
@@ -450,7 +463,7 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","WO")
message_admins("[key_name_admin(usr)] fixed all lights")
for(var/obj/machinery/light/L in machines)
for(var/obj/machinery/light/L in GLOB.machines)
L.fix()
if("floorlava")
@@ -477,7 +490,7 @@
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","RET")
for(var/mob/living/carbon/human/H in player_list)
for(var/mob/living/carbon/human/H in GLOB.player_list)
to_chat(H, "<span class='boldannounce'>You suddenly feel stupid.</span>")
H.setBrainLoss(60)
message_admins("[key_name_admin(usr)] made everybody retarded")
@@ -487,7 +500,7 @@
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL")
for(var/obj/machinery/door/airlock/W in machines)
for(var/obj/machinery/door/airlock/W in GLOB.machines)
if(W.z == ZLEVEL_STATION && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list()
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
@@ -524,7 +537,7 @@
if("events")
if(!check_rights(R_FUN))
return
if(!SSevent.wizardmode)
if(!SSevents.wizardmode)
if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes")
summonevents()
feedback_inc("admin_secrets_fun_used",1)
@@ -537,15 +550,15 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SE")
if("Turn Off Summon Events")
SSevent.toggleWizardmode()
SSevent.resetFrequency()
SSevents.toggleWizardmode()
SSevents.resetFrequency()
if("dorf")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","DF")
for(var/mob/living/carbon/human/B in mob_list)
for(var/mob/living/carbon/human/B in GLOB.mob_list)
B.facial_hair_style = "Dward Beard"
B.update_hair()
message_admins("[key_name_admin(usr)] activated dorf mode")
@@ -577,19 +590,19 @@
if("maint_access_brig")
if(!check_rights(R_DEBUG))
return
for(var/obj/machinery/door/airlock/maintenance/M in machines)
for(var/obj/machinery/door/airlock/maintenance/M in GLOB.machines)
M.check_access()
if (access_maint_tunnels in M.req_access)
M.req_access = list(access_brig)
if (GLOB.access_maint_tunnels in M.req_access)
M.req_access = list(GLOB.access_brig)
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
if("maint_access_engiebrig")
if(!check_rights(R_DEBUG))
return
for(var/obj/machinery/door/airlock/maintenance/M in machines)
for(var/obj/machinery/door/airlock/maintenance/M in GLOB.machines)
M.check_access()
if (access_maint_tunnels in M.req_access)
if (GLOB.access_maint_tunnels in M.req_access)
M.req_access = list()
M.req_one_access = list(access_brig,access_engine)
M.req_one_access = list(GLOB.access_brig,GLOB.access_engine)
message_admins("[key_name_admin(usr)] made all maint doors engineering and brig access-only.")
if("infinite_sec")
if(!check_rights(R_DEBUG))

View File

@@ -1,5 +1,5 @@
/proc/create_message(type, target_ckey, admin_ckey, text, timestamp, server, secret, logged = 1, browse)
if(!dbcon.IsConnected())
if(!GLOB.dbcon.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
if(!type)
@@ -9,7 +9,7 @@
if(!new_ckey)
return
new_ckey = sanitizeSQL(new_ckey)
var/DBQuery/query_find_ckey = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey = '[new_ckey]'")
var/DBQuery/query_find_ckey = GLOB.dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey = '[new_ckey]'")
if(!query_find_ckey.warn_execute())
return
if(!query_find_ckey.NextRow())
@@ -44,7 +44,7 @@
secret = 0
else
return
var/DBQuery/query_create_message = dbcon.NewQuery("INSERT INTO [format_table_name("messages")] (type, targetckey, adminckey, text, timestamp, server, secret) VALUES ('[type]', '[target_ckey]', '[admin_ckey]', '[text]', '[timestamp]', '[server]', '[secret]')")
var/DBQuery/query_create_message = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("messages")] (type, targetckey, adminckey, text, timestamp, server, secret) VALUES ('[type]', '[target_ckey]', '[admin_ckey]', '[text]', '[timestamp]', '[server]', '[secret]')")
if(!query_create_message.warn_execute())
return
if(logged)
@@ -56,7 +56,7 @@
browse_messages(target_ckey = target_ckey)
/proc/delete_message(message_id, logged = 1, browse)
if(!dbcon.IsConnected())
if(!GLOB.dbcon.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
message_id = text2num(message_id)
@@ -65,14 +65,14 @@
var/type
var/target_ckey
var/text
var/DBQuery/query_find_del_message = dbcon.NewQuery("SELECT type, targetckey, adminckey, text FROM [format_table_name("messages")] WHERE id = [message_id]")
var/DBQuery/query_find_del_message = GLOB.dbcon.NewQuery("SELECT type, targetckey, adminckey, text FROM [format_table_name("messages")] WHERE id = [message_id]")
if(!query_find_del_message.warn_execute())
return
if(query_find_del_message.NextRow())
type = query_find_del_message.item[1]
target_ckey = query_find_del_message.item[2]
text = query_find_del_message.item[4]
var/DBQuery/query_del_message = dbcon.NewQuery("DELETE FROM [format_table_name("messages")] WHERE id = [message_id]")
var/DBQuery/query_del_message = GLOB.dbcon.NewQuery("DELETE FROM [format_table_name("messages")] WHERE id = [message_id]")
if(!query_del_message.warn_execute())
return
if(logged)
@@ -84,13 +84,13 @@
browse_messages(target_ckey = target_ckey)
/proc/edit_message(message_id, browse)
if(!dbcon.IsConnected())
if(!GLOB.dbcon.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
message_id = text2num(message_id)
if(!message_id)
return
var/DBQuery/query_find_edit_message = dbcon.NewQuery("SELECT type, targetckey, adminckey, text FROM [format_table_name("messages")] WHERE id = [message_id]")
var/DBQuery/query_find_edit_message = GLOB.dbcon.NewQuery("SELECT type, targetckey, adminckey, text FROM [format_table_name("messages")] WHERE id = [message_id]")
if(!query_find_edit_message.warn_execute())
return
if(query_find_edit_message.NextRow())
@@ -104,7 +104,7 @@
return
new_text = sanitizeSQL(new_text)
var/edit_text = sanitizeSQL("Edited by [editor_ckey] on [SQLtime()] from<br>[old_text]<br>to<br>[new_text]<hr>")
var/DBQuery/query_edit_message = dbcon.NewQuery("UPDATE [format_table_name("messages")] SET text = '[new_text]', lasteditor = '[editor_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [message_id]")
var/DBQuery/query_edit_message = GLOB.dbcon.NewQuery("UPDATE [format_table_name("messages")] SET text = '[new_text]', lasteditor = '[editor_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [message_id]")
if(!query_edit_message.warn_execute())
return
log_admin_private("[key_name(usr)] has edited a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_ckey]" : ""] made by [admin_ckey] from [old_text] to [new_text]")
@@ -115,13 +115,13 @@
browse_messages(target_ckey = target_ckey)
/proc/toggle_message_secrecy(message_id)
if(!dbcon.IsConnected())
if(!GLOB.dbcon.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
message_id = text2num(message_id)
if(!message_id)
return
var/DBQuery/query_find_message_secret = dbcon.NewQuery("SELECT type, targetckey, adminckey, secret FROM [format_table_name("messages")] WHERE id = [message_id]")
var/DBQuery/query_find_message_secret = GLOB.dbcon.NewQuery("SELECT type, targetckey, adminckey, secret FROM [format_table_name("messages")] WHERE id = [message_id]")
if(!query_find_message_secret.warn_execute())
return
if(query_find_message_secret.NextRow())
@@ -131,7 +131,7 @@
var/secret = text2num(query_find_message_secret.item[4])
var/editor_ckey = sanitizeSQL(usr.ckey)
var/edit_text = "Made [secret ? "not secret" : "secret"] by [editor_ckey] on [SQLtime()]<hr>"
var/DBQuery/query_message_secret = dbcon.NewQuery("UPDATE [format_table_name("messages")] SET secret = NOT secret, lasteditor = '[editor_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [message_id]")
var/DBQuery/query_message_secret = GLOB.dbcon.NewQuery("UPDATE [format_table_name("messages")] SET secret = NOT secret, lasteditor = '[editor_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [message_id]")
if(!query_message_secret.warn_execute())
return
log_admin_private("[key_name(usr)] has toggled [target_ckey]'s [type] made by [admin_ckey] to [secret ? "not secret" : "secret"]")
@@ -139,13 +139,13 @@
browse_messages(target_ckey = target_ckey)
/proc/browse_messages(type, target_ckey, index, linkless = 0, filter)
if(!dbcon.IsConnected())
if(!GLOB.dbcon.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
var/output
var/ruler = "<hr style='background:#000000; border:0; height:3px'>"
var/navbar = "<a href='?_src_=holder;nonalpha=1'>\[All\]</a>|<a href='?_src_=holder;nonalpha=2'>\[#\]</a>"
for(var/letter in alphabet)
for(var/letter in GLOB.alphabet)
navbar += "|<a href='?_src_=holder;showmessages=[letter]'>\[[letter]\]</a>"
navbar += "|<a href='?_src_=holder;showmemo=1'>\[Memos\]</a>|<a href='?_src_=holder;showwatch=1'>\[Watchlist\]</a>"
navbar += "<br><form method='GET' name='search' action='?'>\
@@ -166,13 +166,13 @@
else
output += "|<a href='?_src_=holder;showwatchfilter=1'>\[Filter offline clients\]</a></center>"
output += ruler
var/DBQuery/query_get_type_messages = dbcon.NewQuery("SELECT id, targetckey, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type = '[type]'")
var/DBQuery/query_get_type_messages = GLOB.dbcon.NewQuery("SELECT id, targetckey, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type = '[type]'")
if(!query_get_type_messages.warn_execute())
return
while(query_get_type_messages.NextRow())
var/id = query_get_type_messages.item[1]
var/t_ckey = query_get_type_messages.item[2]
if(type == "watchlist entry" && filter && !(t_ckey in directory))
if(type == "watchlist entry" && filter && !(t_ckey in GLOB.directory))
continue
var/admin_ckey = query_get_type_messages.item[3]
var/text = query_get_type_messages.item[4]
@@ -190,7 +190,7 @@
output += "<br>[text]<hr style='background:#000000; border:0; height:1px'>"
if(target_ckey)
target_ckey = sanitizeSQL(target_ckey)
var/DBQuery/query_get_messages = dbcon.NewQuery("SELECT type, secret, id, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey = '[target_ckey]' ORDER BY timestamp DESC")
var/DBQuery/query_get_messages = GLOB.dbcon.NewQuery("SELECT type, secret, id, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey = '[target_ckey]' ORDER BY timestamp DESC")
if(!query_get_messages.warn_execute())
return
var/messagedata
@@ -265,7 +265,7 @@
search = "^\[^\[:alpha:\]\]"
else
search = "^[index]"
var/DBQuery/query_list_messages = dbcon.NewQuery("SELECT DISTINCT targetckey FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey REGEXP '[search]' ORDER BY targetckey")
var/DBQuery/query_list_messages = GLOB.dbcon.NewQuery("SELECT DISTINCT targetckey FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey REGEXP '[search]' ORDER BY targetckey")
if(!query_list_messages.warn_execute())
return
while(query_list_messages.NextRow())
@@ -277,7 +277,7 @@
usr << browse(output, "window=browse_messages;size=900x500")
proc/get_message_output(type, target_ckey)
if(!dbcon.IsConnected())
if(!GLOB.dbcon.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
if(!type)
@@ -288,7 +288,7 @@ proc/get_message_output(type, target_ckey)
var/query = "SELECT id, adminckey, text, timestamp, lasteditor FROM [format_table_name("messages")] WHERE type = '[type]'"
if(type == "message" || type == "watchlist entry")
query += " AND targetckey = '[target_ckey]'"
var/DBQuery/query_get_message_output = dbcon.NewQuery(query)
var/DBQuery/query_get_message_output = GLOB.dbcon.NewQuery(query)
if(!query_get_message_output.warn_execute())
return
while(query_get_message_output.NextRow())
@@ -301,7 +301,7 @@ proc/get_message_output(type, target_ckey)
if("message")
output += "<font color='red' size='3'><b>Admin message left by <span class='prefix'>[admin_ckey]</span> on [timestamp]</b></font>"
output += "<br><font color='red'>[text]</font><br>"
var/DBQuery/query_message_read = dbcon.NewQuery("UPDATE [format_table_name("messages")] SET type = 'message sent' WHERE id = [message_id]")
var/DBQuery/query_message_read = GLOB.dbcon.NewQuery("UPDATE [format_table_name("messages")] SET type = 'message sent' WHERE id = [message_id]")
if(!query_message_read.warn_execute())
return
if("watchlist entry")
@@ -333,7 +333,7 @@ proc/get_message_output(type, target_ckey)
var/timestamp = note.group[1]
notetext = note.group[2]
var/admin_ckey = note.group[3]
var/DBQuery/query_convert_time = dbcon.NewQuery("SELECT ADDTIME(STR_TO_DATE('[timestamp]','%d-%b-%Y'), '0')")
var/DBQuery/query_convert_time = GLOB.dbcon.NewQuery("SELECT ADDTIME(STR_TO_DATE('[timestamp]','%d-%b-%Y'), '0')")
if(!query_convert_time.Execute())
return
if(query_convert_time.NextRow())

View File

@@ -11,7 +11,7 @@
return
if(!check_rights(R_ADMIN))
return
var/client/C = locate(href_list["rejectadminhelp"]) in clients
var/client/C = locate(href_list["rejectadminhelp"]) in GLOB.clients
if(!C)
return
if (deltimer(C.adminhelptimerid))
@@ -31,7 +31,7 @@
if(world.time && spamcooldown > world.time)
to_chat(usr, "Please wait [max(round((spamcooldown - world.time)*0.1, 0.1), 0)] seconds.")
return
var/client/C = locate(href_list["icissue"]) in clients
var/client/C = locate(href_list["icissue"]) in GLOB.clients
if(!C)
return
@@ -49,7 +49,7 @@
if(world.time && spamcooldown > world.time)
to_chat(usr, "Please wait [max(round((spamcooldown - world.time)*0.1, 0.1), 0)] seconds.")
return
var/client/C = locate(href_list["markedread"]) in clients
var/client/C = locate(href_list["markedread"]) in GLOB.clients
if(!C)
return
@@ -64,7 +64,7 @@
stickyban(href_list["stickyban"],href_list)
else if(href_list["makeAntag"])
if (!ticker.mode)
if (!SSticker.mode)
to_chat(usr, "<span class='danger'>Not until the round starts!</span>")
return
switch(href_list["makeAntag"])
@@ -176,7 +176,7 @@
else if(href_list["forceevent"])
if(!check_rights(R_FUN))
return
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevent.control
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevents.control
if(E)
var/datum/round_event/event = E.runEvent()
if(event.announceWhen>0)
@@ -257,7 +257,7 @@
var/mob/playermob
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
if(M.ckey == banckey)
playermob = M
break
@@ -327,24 +327,24 @@
if(!check_rights(R_ADMIN))
return
if(!config.continuous[ticker.mode.config_tag])
config.continuous[ticker.mode.config_tag] = 1
if(!config.continuous[SSticker.mode.config_tag])
config.continuous[SSticker.mode.config_tag] = 1
else
config.continuous[ticker.mode.config_tag] = 0
config.continuous[SSticker.mode.config_tag] = 0
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled the round to [config.continuous[ticker.mode.config_tag] ? "continue if all antagonists die" : "end with the antagonists"].</span>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled the round to [config.continuous[SSticker.mode.config_tag] ? "continue if all antagonists die" : "end with the antagonists"].</span>")
check_antagonists()
else if(href_list["toggle_midround_antag"])
if(!check_rights(R_ADMIN))
return
if(!config.midround_antag[ticker.mode.config_tag])
config.midround_antag[ticker.mode.config_tag] = 1
if(!config.midround_antag[SSticker.mode.config_tag])
config.midround_antag[SSticker.mode.config_tag] = 1
else
config.midround_antag[ticker.mode.config_tag] = 0
config.midround_antag[SSticker.mode.config_tag] = 0
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled the round to [config.midround_antag[ticker.mode.config_tag] ? "use" : "skip"] the midround antag system.</span>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled the round to [config.midround_antag[SSticker.mode.config_tag] ? "use" : "skip"] the midround antag system.</span>")
check_antagonists()
else if(href_list["alter_midround_time_limit"])
@@ -373,21 +373,21 @@
if(!check_rights(R_ADMIN))
return
if(!ticker.mode.round_ends_with_antag_death)
ticker.mode.round_ends_with_antag_death = 1
if(!SSticker.mode.round_ends_with_antag_death)
SSticker.mode.round_ends_with_antag_death = 1
else
ticker.mode.round_ends_with_antag_death = 0
SSticker.mode.round_ends_with_antag_death = 0
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the midround antagonist system to [ticker.mode.round_ends_with_antag_death ? "end the round" : "continue as extended"] upon failure.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the midround antagonist system to [SSticker.mode.round_ends_with_antag_death ? "end the round" : "continue as extended"] upon failure.")
check_antagonists()
else if(href_list["delay_round_end"])
if(!check_rights(R_SERVER))
return
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("<span class='adminnotice'>[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].</span>")
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 class='adminnotice'>[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].</span>")
href_list["secrets"] = "check_antagonist"
else if(href_list["end_round"])
@@ -398,7 +398,7 @@
if(alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", "Yes", "No") == "Yes")
if(alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", "Yes", "No") == "Yes")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has ended the round.</span>")
ticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished
SSticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished
return
else
message_admins("<span class='adminnotice'>[key_name_admin(usr)] decided against ending the round.</span>")
@@ -481,8 +481,8 @@
return
var/banfolder = href_list["unbanf"]
Banlist.cd = "/base/[banfolder]"
var/key = Banlist["key"]
GLOB.Banlist.cd = "/base/[banfolder]"
var/key = GLOB.Banlist["key"]
if(alert(usr, "Are you sure you want to unban [key]?", "Confirmation", "Yes", "No") == "Yes")
if(RemoveBan(banfolder))
unbanpanel()
@@ -498,14 +498,14 @@
var/reason
var/banfolder = href_list["unbane"]
Banlist.cd = "/base/[banfolder]"
var/reason2 = Banlist["reason"]
var/temp = Banlist["temp"]
GLOB.Banlist.cd = "/base/[banfolder]"
var/reason2 = GLOB.Banlist["reason"]
var/temp = GLOB.Banlist["temp"]
var/minutes = Banlist["minutes"]
var/minutes = GLOB.Banlist["minutes"]
var/banned_key = Banlist["key"]
Banlist.cd = "/base"
var/banned_key = GLOB.Banlist["key"]
GLOB.Banlist.cd = "/base"
var/duration
@@ -513,12 +513,12 @@
if("Yes")
temp = 1
var/mins = 0
if(minutes > CMinutes)
mins = minutes - CMinutes
if(minutes > GLOB.CMinutes)
mins = minutes - GLOB.CMinutes
mins = input(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) as num|null
if(!mins)
return
minutes = CMinutes + mins
minutes = GLOB.CMinutes + mins
duration = GetExp(minutes)
reason = input(usr,"Please State Reason.","Reason",reason2) as message|null
if(!reason)
@@ -533,12 +533,12 @@
log_admin_private("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]</span>")
Banlist.cd = "/base/[banfolder]"
Banlist["reason"] << reason
Banlist["temp"] << temp
Banlist["minutes"] << minutes
Banlist["bannedby"] << usr.ckey
Banlist.cd = "/base"
GLOB.Banlist.cd = "/base/[banfolder]"
GLOB.Banlist["reason"] << reason
GLOB.Banlist["temp"] << temp
GLOB.Banlist["minutes"] << minutes
GLOB.Banlist["bannedby"] << usr.ckey
GLOB.Banlist.cd = "/base"
feedback_inc("ban_edit",1)
unbanpanel()
@@ -614,8 +614,8 @@
//Regular jobs
//Command (Blue)
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
dat += "<tr align='center' bgcolor='ccccff'><th colspan='[length(command_positions)]'><a href='?src=\ref[src];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
for(var/jobPos in command_positions)
dat += "<tr align='center' bgcolor='ccccff'><th colspan='[length(GLOB.command_positions)]'><a href='?src=\ref[src];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
for(var/jobPos in GLOB.command_positions)
if(!jobPos)
continue
if(jobban_isbanned(M, jobPos))
@@ -633,8 +633,8 @@
//Security (Red)
counter = 0
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
dat += "<tr bgcolor='ffddf0'><th colspan='[length(security_positions)]'><a href='?src=\ref[src];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
for(var/jobPos in security_positions)
dat += "<tr bgcolor='ffddf0'><th colspan='[length(GLOB.security_positions)]'><a href='?src=\ref[src];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
for(var/jobPos in GLOB.security_positions)
if(!jobPos)
continue
if(jobban_isbanned(M, jobPos))
@@ -652,8 +652,8 @@
//Engineering (Yellow)
counter = 0
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
dat += "<tr bgcolor='fff5cc'><th colspan='[length(engineering_positions)]'><a href='?src=\ref[src];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
for(var/jobPos in engineering_positions)
dat += "<tr bgcolor='fff5cc'><th colspan='[length(GLOB.engineering_positions)]'><a href='?src=\ref[src];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
for(var/jobPos in GLOB.engineering_positions)
if(!jobPos)
continue
if(jobban_isbanned(M, jobPos))
@@ -671,8 +671,8 @@
//Medical (White)
counter = 0
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
dat += "<tr bgcolor='ffeef0'><th colspan='[length(medical_positions)]'><a href='?src=\ref[src];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
for(var/jobPos in medical_positions)
dat += "<tr bgcolor='ffeef0'><th colspan='[length(GLOB.medical_positions)]'><a href='?src=\ref[src];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
for(var/jobPos in GLOB.medical_positions)
if(!jobPos)
continue
if(jobban_isbanned(M, jobPos))
@@ -690,8 +690,8 @@
//Science (Purple)
counter = 0
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
dat += "<tr bgcolor='e79fff'><th colspan='[length(science_positions)]'><a href='?src=\ref[src];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
for(var/jobPos in science_positions)
dat += "<tr bgcolor='e79fff'><th colspan='[length(GLOB.science_positions)]'><a href='?src=\ref[src];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
for(var/jobPos in GLOB.science_positions)
if(!jobPos)
continue
if(jobban_isbanned(M, jobPos))
@@ -709,8 +709,8 @@
//Supply (Brown)
counter = 0
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
dat += "<tr bgcolor='DDAA55'><th colspan='[length(supply_positions)]'><a href='?src=\ref[src];jobban3=supplydept;jobban4=\ref[M]'>Supply Positions</a></th></tr><tr align='center'>"
for(var/jobPos in supply_positions)
dat += "<tr bgcolor='DDAA55'><th colspan='[length(GLOB.supply_positions)]'><a href='?src=\ref[src];jobban3=supplydept;jobban4=\ref[M]'>Supply Positions</a></th></tr><tr align='center'>"
for(var/jobPos in GLOB.supply_positions)
if(!jobPos)
continue
if(jobban_isbanned(M, jobPos))
@@ -728,8 +728,8 @@
//Civilian (Grey)
counter = 0
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
dat += "<tr bgcolor='dddddd'><th colspan='[length(civilian_positions)]'><a href='?src=\ref[src];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
for(var/jobPos in civilian_positions)
dat += "<tr bgcolor='dddddd'><th colspan='[length(GLOB.civilian_positions)]'><a href='?src=\ref[src];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
for(var/jobPos in GLOB.civilian_positions)
if(!jobPos)
continue
if(jobban_isbanned(M, jobPos))
@@ -747,8 +747,8 @@
//Non-Human (Green)
counter = 0
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
dat += "<tr bgcolor='ccffcc'><th colspan='[length(nonhuman_positions)]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
for(var/jobPos in nonhuman_positions)
dat += "<tr bgcolor='ccffcc'><th colspan='[length(GLOB.nonhuman_positions)]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
for(var/jobPos in GLOB.nonhuman_positions)
if(!jobPos)
continue
if(jobban_isbanned(M, jobPos))
@@ -895,42 +895,42 @@
var/list/joblist = list()
switch(href_list["jobban3"])
if("commanddept")
for(var/jobPos in command_positions)
for(var/jobPos in GLOB.command_positions)
if(!jobPos)
continue
joblist += jobPos
if("securitydept")
for(var/jobPos in security_positions)
for(var/jobPos in GLOB.security_positions)
if(!jobPos)
continue
joblist += jobPos
if("engineeringdept")
for(var/jobPos in engineering_positions)
for(var/jobPos in GLOB.engineering_positions)
if(!jobPos)
continue
joblist += jobPos
if("medicaldept")
for(var/jobPos in medical_positions)
for(var/jobPos in GLOB.medical_positions)
if(!jobPos)
continue
joblist += jobPos
if("sciencedept")
for(var/jobPos in science_positions)
for(var/jobPos in GLOB.science_positions)
if(!jobPos)
continue
joblist += jobPos
if("supplydept")
for(var/jobPos in supply_positions)
for(var/jobPos in GLOB.supply_positions)
if(!jobPos)
continue
joblist += jobPos
if("civiliandept")
for(var/jobPos in civilian_positions)
for(var/jobPos in GLOB.civilian_positions)
if(!jobPos)
continue
joblist += jobPos
if("nonhumandept")
for(var/jobPos in nonhuman_positions)
for(var/jobPos in GLOB.nonhuman_positions)
if(!jobPos)
continue
joblist += jobPos
@@ -1124,7 +1124,7 @@
else if(href_list["messageedits"])
var/message_id = sanitizeSQL("[href_list["messageedits"]]")
var/DBQuery/query_get_message_edits = dbcon.NewQuery("SELECT edits FROM [format_table_name("messages")] WHERE id = '[message_id]'")
var/DBQuery/query_get_message_edits = GLOB.dbcon.NewQuery("SELECT edits FROM [format_table_name("messages")] WHERE id = '[message_id]'")
if(!query_get_message_edits.warn_execute())
return
if(query_get_message_edits.NextRow())
@@ -1204,56 +1204,56 @@
if(!check_rights(R_ADMIN))
return
if(ticker && ticker.mode)
if(SSticker && SSticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
var/dat = {"<B>What mode do you wish to play?</B><HR>"}
for(var/mode in config.modes)
dat += {"<A href='?src=\ref[src];c_mode2=[mode]'>[config.mode_names[mode]]</A><br>"}
dat += {"<A href='?src=\ref[src];c_mode2=secret'>Secret</A><br>"}
dat += {"<A href='?src=\ref[src];c_mode2=random'>Random</A><br>"}
dat += {"Now: [master_mode]"}
dat += {"Now: [GLOB.master_mode]"}
usr << browse(dat, "window=c_mode")
else if(href_list["f_secret"])
if(!check_rights(R_ADMIN))
return
if(ticker && ticker.mode)
if(SSticker && SSticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
if(master_mode != "secret")
if(GLOB.master_mode != "secret")
return alert(usr, "The game mode has to be secret!", null, null, null, null)
var/dat = {"<B>What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.</B><HR>"}
for(var/mode in config.modes)
dat += {"<A href='?src=\ref[src];f_secret2=[mode]'>[config.mode_names[mode]]</A><br>"}
dat += {"<A href='?src=\ref[src];f_secret2=secret'>Random (default)</A><br>"}
dat += {"Now: [secret_force_mode]"}
dat += {"Now: [GLOB.secret_force_mode]"}
usr << browse(dat, "window=f_secret")
else if(href_list["c_mode2"])
if(!check_rights(R_ADMIN|R_SERVER))
return
if (ticker && ticker.mode)
if (SSticker && SSticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
master_mode = href_list["c_mode2"]
log_admin("[key_name(usr)] set the mode as [master_mode].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the mode as [master_mode].</span>")
to_chat(world, "<span class='adminnotice'><b>The mode is now: [master_mode]</b></span>")
GLOB.master_mode = href_list["c_mode2"]
log_admin("[key_name(usr)] set the mode as [GLOB.master_mode].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the mode as [GLOB.master_mode].</span>")
to_chat(world, "<span class='adminnotice'><b>The mode is now: [GLOB.master_mode]</b></span>")
Game() // updates the main game menu
world.save_mode(master_mode)
world.save_mode(GLOB.master_mode)
.(href, list("c_mode"=1))
else if(href_list["f_secret2"])
if(!check_rights(R_ADMIN|R_SERVER))
return
if(ticker && ticker.mode)
if(SSticker && SSticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
if(master_mode != "secret")
if(GLOB.master_mode != "secret")
return alert(usr, "The game mode has to be secret!", null, null, null, null)
secret_force_mode = href_list["f_secret2"]
log_admin("[key_name(usr)] set the forced secret mode as [secret_force_mode].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the forced secret mode as [secret_force_mode].</span>")
GLOB.secret_force_mode = href_list["f_secret2"]
log_admin("[key_name(usr)] set the forced secret mode as [GLOB.secret_force_mode].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the forced secret mode as [GLOB.secret_force_mode].</span>")
Game() // updates the main game menu
.(href, list("f_secret"=1))
@@ -1328,7 +1328,7 @@
if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes")
return
M.loc = pick(prisonwarp)
M.loc = pick(GLOB.prisonwarp)
to_chat(M, "<span class='adminnotice'>You have been sent to Prison!</span>")
log_admin("[key_name(usr)] has sent [key_name(M)] to Prison!")
@@ -1378,7 +1378,7 @@
M.Paralyse(5)
sleep(5)
M.loc = pick(tdome1)
M.loc = pick(GLOB.tdome1)
spawn(50)
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)")
@@ -1404,7 +1404,7 @@
M.Paralyse(5)
sleep(5)
M.loc = pick(tdome2)
M.loc = pick(GLOB.tdome2)
spawn(50)
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)")
@@ -1427,7 +1427,7 @@
M.Paralyse(5)
sleep(5)
M.loc = pick(tdomeadmin)
M.loc = pick(GLOB.tdomeadmin)
spawn(50)
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)")
@@ -1457,7 +1457,7 @@
observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), slot_shoes)
M.Paralyse(5)
sleep(5)
M.loc = pick(tdomeobserve)
M.loc = pick(GLOB.tdomeobserve)
spawn(50)
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
@@ -1546,7 +1546,7 @@
usr.client.cmd_admin_animalize(M)
else if(href_list["gangpoints"])
var/datum/gang/G = locate(href_list["gangpoints"]) in ticker.mode.gangs
var/datum/gang/G = locate(href_list["gangpoints"]) in SSticker.mode.gangs
if(G)
var/newpoints = input("Set [G.name ] Gang's influence.","Set Influence",G.points) as null|num
if(!newpoints)
@@ -1594,7 +1594,7 @@
output_devil_info(M)
else if(href_list["adminmoreinfo"])
var/mob/M = locate(href_list["adminmoreinfo"])
var/mob/M = locate(href_list["adminmoreinfo"]) in GLOB.mob_list
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob.")
return
@@ -1646,7 +1646,7 @@
to_chat(src.owner, "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;")
to_chat(src.owner, "Location = [location_description];")
to_chat(src.owner, "[special_role_description]")
to_chat(src.owner, "(<a href='?priv_msg=[M.ckey]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservefollow=\ref[M]'>FLW</A>) (<A HREF='?src=\ref[src];secrets=check_antagonist'>CA</A>)")
to_chat(src.owner, ADMIN_FULLMONTY_NONAME(M))
else if(href_list["addjobslot"])
if(!check_rights(R_ADMIN))
@@ -1729,38 +1729,15 @@
if(!check_rights(R_ADMIN|R_FUN))
return
var/mob/living/carbon/human/H = locate(href_list["adminsmite"]) in mob_list
var/mob/living/carbon/human/H = locate(href_list["adminsmite"]) in GLOB.mob_list
if(!H || !istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_GIB)
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
if(QDELETED(H) || !punishment)
return
switch(punishment)
if(ADMIN_PUNISHMENT_LIGHTNING)
var/turf/T = get_step(get_step(H, NORTH), NORTH)
T.Beam(H, icon_state="lightning[rand(1,12)]", time = 5)
H.adjustFireLoss(75)
H.electrocution_animation(40)
to_chat(H, "<span class='userdanger'>The gods have punished you for your sins!</span>")
if(ADMIN_PUNISHMENT_BRAINDAMAGE)
H.adjustBrainLoss(75)
if(ADMIN_PUNISHMENT_GIB)
H.gib(FALSE)
message_admins("[key_name_admin(usr)] punished [key_name_admin(H)] with [punishment].")
log_admin("[key_name(usr)] punished [key_name(H)] with [punishment].")
else if(href_list["BlueSpaceArtillery"])
var/mob/living/M = locate(href_list["BlueSpaceArtillery"]) in mob_list
usr.client.bluespace_artillery(M)
usr.client.smite(H)
else if(href_list["CentcommReply"])
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) in mob_list
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) in GLOB.mob_list
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
@@ -1846,18 +1823,28 @@
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["individuallog"]) in mob_list
var/mob/M = locate(href_list["individuallog"]) in GLOB.mob_list
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob.")
return
show_individual_logging_panel(M, href_list["log_type"])
else if(href_list["languagemenu"])
if(!check_rights(R_ADMIN))
return
var/mob/living/L = locate(href_list["languagemenu"]) in GLOB.mob_list
if(!isliving(L))
to_chat(usr, "This can only be used on instances of type /mob/living.")
return
L.open_language_menu(usr)
else if(href_list["traitor"])
if(!check_rights(R_ADMIN))
return
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("The game hasn't started yet!")
return
@@ -2024,7 +2011,7 @@
else if(href_list["ac_submit_new_channel"])
var/check = 0
for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
check = 1
break
@@ -2033,7 +2020,7 @@
else
var/choice = alert("Please confirm Feed channel creation.","Network Channel Handler","Confirm","Cancel")
if(choice=="Confirm")
news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1)
GLOB.news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1)
feedback_inc("newscaster_channels",1)
log_admin("[key_name(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!")
src.admincaster_screen=5
@@ -2041,7 +2028,7 @@
else if(href_list["ac_set_channel_receiving"])
var/list/available_channels = list()
for(var/datum/newscaster/feed_channel/F in news_network.network_channels)
for(var/datum/newscaster/feed_channel/F in GLOB.news_network.network_channels)
available_channels += F.channel_name
src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel.", "Network Channel Handler") in available_channels )
src.access_news_network()
@@ -2056,11 +2043,11 @@
if(src.admincaster_feed_message.returnBody(-1) =="" || src.admincaster_feed_message.returnBody(-1) =="\[REDACTED\]" || src.admincaster_feed_channel.channel_name == "" )
src.admincaster_screen = 6
else
news_network.SubmitArticle(src.admincaster_feed_message.returnBody(-1), src.admin_signature, src.admincaster_feed_channel.channel_name, null, 1)
GLOB.news_network.SubmitArticle(src.admincaster_feed_message.returnBody(-1), src.admin_signature, src.admincaster_feed_channel.channel_name, null, 1)
feedback_inc("newscaster_stories",1)
src.admincaster_screen=4
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
NEWSCASTER.newsAlert(src.admincaster_feed_channel.channel_name)
log_admin("[key_name(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!")
@@ -2084,12 +2071,12 @@
else if(href_list["ac_menu_wanted"])
var/already_wanted = 0
if(news_network.wanted_issue.active)
if(GLOB.news_network.wanted_issue.active)
already_wanted = 1
if(already_wanted)
src.admincaster_wanted_message.criminal = news_network.wanted_issue.criminal
src.admincaster_wanted_message.body = news_network.wanted_issue.body
src.admincaster_wanted_message.criminal = GLOB.news_network.wanted_issue.criminal
src.admincaster_wanted_message.body = GLOB.news_network.wanted_issue.body
src.admincaster_screen = 14
src.access_news_network()
@@ -2113,10 +2100,10 @@
var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel")
if(choice=="Confirm")
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below
news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature, null, 1, 1)
GLOB.news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature, null, 1, 1)
src.admincaster_screen = 15
else
news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature)
GLOB.news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature)
src.admincaster_screen = 19
log_admin("[key_name(usr)] issued a Station-wide Wanted Notification for [src.admincaster_wanted_message.criminal]!")
src.access_news_network()
@@ -2124,7 +2111,7 @@
else if(href_list["ac_cancel_wanted"])
var/choice = alert("Please confirm Wanted Issue removal.","Network Security Handler","Confirm","Cancel")
if(choice=="Confirm")
news_network.deleteWanted()
GLOB.news_network.deleteWanted()
src.admincaster_screen=17
src.access_news_network()
@@ -2208,7 +2195,7 @@
else if(href_list["kick_all_from_lobby"])
if(!check_rights(R_ADMIN))
return
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
var/afkonly = text2num(href_list["afkonly"])
if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
to_chat(usr, "Kick clients from lobby aborted")
@@ -2247,14 +2234,14 @@
O.belt = text2path(href_list["outfit_belt"])
O.ears = text2path(href_list["outfit_ears"])
custom_outfits.Add(O)
GLOB.custom_outfits.Add(O)
message_admins("[key_name(usr)] created \"[O.name]\" outfit!")
else if(href_list["set_selfdestruct_code"])
if(!check_rights(R_ADMIN))
return
var/code = random_nukecode()
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in nuke_list)
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in GLOB.nuke_list)
SD.r_code = code
message_admins("[key_name_admin(usr)] has set the self-destruct \
code to \"[code]\".")
@@ -2277,7 +2264,7 @@
return
G.report_message = description
message_admins("[key_name(usr)] created \"[G.name]\" station goal.")
ticker.mode.station_goals += G
SSticker.mode.station_goals += G
modify_goals()
else if(href_list["viewruntime"])
@@ -2290,58 +2277,3 @@
error_viewer.show_to(owner, locate(href_list["viewruntime_backto"]), href_list["viewruntime_linear"])
else
error_viewer.show_to(owner, null, href_list["viewruntime_linear"])
else if(href_list["mentor"])
if(!check_rights(R_ADMIN)) return
var/mob/M = locate(href_list["mentor"])
if(!ismob(M))
to_chat(usr, "this can be only used on instances of type /mob")
return
if(!M.client)
to_chat(usr, "no client")
return
log_admin("[key_name(usr)] has granted [key_name(M)] mentor access")
message_admins("\blue [key_name_admin(usr)] has granted [key_name_admin(M)] mentor access", 1)
var/DBQuery/query = dbcon.NewQuery("INSERT INTO [format_table_name("mentor")] (ckey) VALUES ('[M.client.ckey]')")
if(!query.Execute())
var/err = query.ErrorMsg()
log_game("SQL ERROR during adding new mentor. Error : \[[err]\]\n")
load_mentors()
M.verbs += /client/proc/cmd_mentor_say
M.verbs += /client/proc/show_mentor_memo
to_chat(M, "\blue You've been granted mentor access! Help people who send mentor-pms")
else if(href_list["removementor"])
if(!check_rights(R_ADMIN)) return
var/mob/living/carbon/human/M = locate(href_list["removementor"])
if(!ismob(M))
usr << "this can be only used on instances of type /mob"
return
log_admin("[key_name(usr)] has removed mentor access from [key_name(M)]")
message_admins("\blue [key_name_admin(usr)] has removed mentor access from [key_name_admin(M)]", 1)
var/DBQuery/query = dbcon.NewQuery("DELETE FROM [format_table_name("mentor")] WHERE ckey = '[M.client.ckey]'")
if(!query.Execute())
var/err = query.ErrorMsg()
log_game("SQL ERROR during removing mentor. Error : \[[err]\]\n")
load_mentors()
to_chat(M, "\blue Your mentor access has been removed")
M.verbs -= /client/proc/cmd_mentor_say
M.verbs -= /client/proc/show_mentor_memo
else if(href_list["mentormemoeditlist"])
var/sql_key = sanitizeSQL("[href_list["memoeditlist"]]")
var/DBQuery/query_memoedits = dbcon.NewQuery("SELECT edits FROM [format_table_name("mentor_memo")] WHERE (ckey = '[sql_key]')")
if(!query_memoedits.Execute())
var/err = query_memoedits.ErrorMsg()
log_game("SQL ERROR obtaining edits from memo table. Error : \[[err]\]\n")
return
if(query_memoedits.NextRow())
var/edit_log = query_memoedits.item[1]
usr << browse(edit_log,"window=mentormemoeditlist")

View File

@@ -30,6 +30,12 @@
query_log = "[usr.ckey]([usr]) [query_log]"
log_game(query_log)
NOTICE(query_log)
var/list/runtime_tracker = list()
var/runtimes_list = ""
var/runtimes = 0
var/objs_all = 0
var/objs_eligible = 0
var/start_time = REALTIMEOFDAY
if(!query_text || length(query_text) < 1)
return
@@ -43,82 +49,100 @@
var/list/querys = SDQL_parse(query_list)
if(!querys || querys.len < 1)
return
try
for(var/list/query_tree in querys)
var/list/from_objs = list()
var/list/select_types = list()
for(var/list/query_tree in querys)
var/list/from_objs = list()
var/list/select_types = list()
switch(query_tree[1])
if("explain")
SDQL_testout(query_tree["explain"])
return
switch(query_tree[1])
if("explain")
SDQL_testout(query_tree["explain"])
if("call")
if("on" in query_tree)
select_types = query_tree["on"]
else
return
if("call")
if("on" in query_tree)
select_types = query_tree["on"]
else
return
if("select", "delete", "update")
select_types = query_tree[query_tree[1]]
if("select", "delete", "update")
select_types = query_tree[query_tree[1]]
from_objs = SDQL_from_objs(query_tree["from"])
from_objs = SDQL_from_objs(query_tree["from"])
var/list/objs = list()
var/list/objs = list()
for(var/type in select_types)
for(var/type in select_types)
try
objs += SDQL_get_all(type, from_objs)
CHECK_TICK
catch(var/exception/e)
runtime_tracker += SDQL_parse_exception(e)
runtimes++
CHECK_TICK
objs_all = objs.len
if("where" in query_tree)
var/objs_temp = objs
objs = list()
for(var/datum/d in objs_temp)
if("where" in query_tree)
var/objs_temp = objs
objs = list()
for(var/datum/d in objs_temp)
try
if(SDQL_expression(d, query_tree["where"]))
objs += d
objs_eligible++
catch(var/exception/e)
runtime_tracker += SDQL_parse_exception(e)
runtimes++
CHECK_TICK
switch(query_tree[1])
if("call")
for(var/datum/d in objs)
try
SDQL_var(d, query_tree["call"][1], source = d)
catch(var/exception/e)
runtime_tracker += SDQL_parse_exception(e)
runtimes++
CHECK_TICK
switch(query_tree[1])
if("call")
for(var/datum/d in objs)
SDQL_var(d, query_tree["call"][1], source = d)
CHECK_TICK
if("delete")
for(var/datum/d in objs)
if("delete")
for(var/datum/d in objs)
try
qdel(d)
CHECK_TICK
catch(var/exception/e)
runtime_tracker += SDQL_parse_exception(e)
runtimes++
CHECK_TICK
if("select")
var/text = ""
for(var/datum/t in objs)
if("select")
var/text = ""
for(var/datum/t in objs)
try
text += "<A HREF='?_src_=vars;Vars=\ref[t]'>\ref[t]</A>"
if(istype(t, /atom))
var/atom/a = t
if(a.x)
text += ": [t] at ([a.x], [a.y], [a.z])<br>"
else if(a.loc && a.loc.x)
text += ": [t] in [a.loc] at ([a.loc.x], [a.loc.y], [a.loc.z])<br>"
else
text += ": [t]<br>"
else
text += ": [t]<br>"
CHECK_TICK
catch(var/exception/e)
runtime_tracker += SDQL_parse_exception(e)
runtimes++
CHECK_TICK
usr << browse(text, "window=SDQL-result")
usr << browse(text, "window=SDQL-result")
if("update")
if("set" in query_tree)
var/list/set_list = query_tree["set"]
for(var/datum/d in objs)
if("update")
if("set" in query_tree)
var/list/set_list = query_tree["set"]
for(var/datum/d in objs)
try
for(var/list/sets in set_list)
var/datum/temp = d
var/i = 0
@@ -130,13 +154,28 @@
temp = temp.vars[v]
else
break
CHECK_TICK
catch(var/exception/e)
runtime_tracker += SDQL_parse_exception(e)
runtimes++
CHECK_TICK
catch(var/exception/e)
to_chat(usr, "<span class='boldwarning'>A runtime error has occured in your SDQL2-query.</span>")
to_chat(usr, "\[NAME\][e.name]")
to_chat(usr, "\[FILE\][e.file]")
to_chat(usr, "\[LINE\][e.line]")
var/end_time = REALTIMEOFDAY
end_time -= start_time
to_chat(usr, "<span class='admin'>SDQL query results: [query_text]</span>")
to_chat(usr, "<span class='admin'>SDQL query completed: [objs_all] objects selected by path, and [objs_eligible] objects executed on after WHERE filtering if applicable.</span>")
to_chat(usr, "<span class='admin'>SDQL query took [end_time/10] seconds to complete.</span>")
if(runtimes)
to_chat(usr, "<span class='boldwarning'>SDQL query encountered [runtimes] runtimes!</span>")
to_chat(usr, "<span class='boldwarning'>Opening runtime tracking window.</span>")
runtimes_list = runtime_tracker.Join()
usr << browse(runtimes_list, "window=SDQL-runtimes")
/proc/SDQL_parse_exception(exception/E)
var/list/returning = list()
returning += "Runtime Error: [E.name]<BR>"
returning += "Occured at line [E.line] file [E.file]<BR>"
returning += "Description: [E.desc]<BR>"
return returning
/proc/SDQL_callproc_global(procname,args_list)
set waitfor = FALSE
@@ -180,7 +219,6 @@
pos++
qdel(parser)
return querys
@@ -381,10 +419,9 @@
/proc/SDQL_var(datum/object, list/expression, start = 1, source)
var/v
var/static/list/exclude = list("usr", "src", "marked", "global")
var/long = start < expression.len
if(object == world && long && expression[start + 1] == ".")
to_chat(usr, "Sorry, but global variables are not supported at the moment.")
to_chat(usr, "Sorry, but world variables are not supported at the moment.")
return null
else if(expression [start] == "{" && long)
if(lowertext(copytext(expression[start + 1], 1, 3)) != "0x")
@@ -396,7 +433,10 @@
return null
start++
else if((!long || expression[start + 1] == ".") && (expression[start] in object.vars))
v = object.vars[expression[start]]
if(object.can_vv_get(expression[start]))
v = object.vars[expression[start]]
else
v = "SECRET"
else if(long && expression[start + 1] == ":" && hascall(object, expression[start]))
v = expression[start]
else if(!long || expression[start + 1] == ".")
@@ -410,8 +450,10 @@
v = usr.client.holder.marked_datum
else
return null
if("global")
if("world")
v = world
if("global")
v = GLOB
else
return null
else if(object == world) // Shitty ass hack kill me.

View File

@@ -11,7 +11,7 @@
var/list/forenames = list()
var/list/ckeys = list()
var/founds = ""
for(var/mob/M in mob_list)
for(var/mob/M in GLOB.mob_list)
var/list/indexing = list(M.real_name, M.name)
if(M.mind)
indexing += M.mind.name
@@ -76,11 +76,11 @@
src.verbs |= /client/verb/adminhelp
adminhelptimerid = 0
/client/verb/adminhelp(msg as message)
/client/verb/adminhelp(msg as text)
set category = "Admin"
set name = "Adminhelp"
if(say_disabled) //This is here to try to identify lag problems
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
@@ -94,8 +94,7 @@
//clean the input msg
if(!msg)
return
var/list/replace_chars = list("\n"=" ","\t"=" ")
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN),replace_chars)
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
var/original_msg = msg
@@ -108,11 +107,12 @@
if(!mob)
return //this doesn't happen
msg = "<span class='adminnotice'><b><font color=red>HELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> [ADMIN_QUE(mob)] [ADMIN_PP(mob)] [ADMIN_VV(mob)] [ADMIN_SM(mob)] [ADMIN_FLW(mob)] [ADMIN_TP(mob)] [ADMIN_SMITE(mob)] [ADMIN_REJECT(src)] [ADMIN_IC(src)] [ADMIN_MARKREAD(src)]:</b> [msg]</span>"
var/ref_client = "\ref[src]"
msg = "<span class='adminnotice'><b><font color=red>HELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> [ADMIN_FULLMONTY_NONAME(mob)] [ADMIN_SMITE(mob)] (<A HREF='?_src_=holder;rejectadminhelp=[ref_client]'>REJT</A>) (<A HREF='?_src_=holder;icissue=[ref_client]'>IC</A>):</b> [msg]</span>"
//send this msg to all admins
for(var/client/X in admins)
for(var/client/X in GLOB.admins)
if(X.prefs.toggles & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'
window_flash(X, ignorepref = TRUE)
@@ -127,12 +127,12 @@
log_admin_private("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins who have +BAN.")
if(admin_number_present <= 0)
to_chat(src, "<span class='notice'>No active admins are online, your adminhelp was sent to the admin irc.</span>")
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Adminhelp") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/proc/get_admin_counts(requiredflags = R_BAN)
. = list("total" = list(), "noflags" = list(), "afk" = list(), "stealth" = list(), "present" = list())
for(var/client/X in admins)
for(var/client/X in GLOB.admins)
.["total"] += X
if(requiredflags != 0 && !check_rights_for(X, requiredflags))
.["noflags"] += X
@@ -172,7 +172,7 @@
message["message_sender"] = source
message["message"] = msg
message["source"] = "([config.cross_name])"
message["key"] = global.comms_key
message["key"] = GLOB.comms_key
message["crossmessage"] = type
world.Export("[config.cross_address]?[list2params(message)]")
@@ -181,7 +181,7 @@
/proc/ircadminwho()
var/list/message = list("Admins: ")
var/list/admin_keys = list()
for(var/adm in admins)
for(var/adm in GLOB.admins)
var/client/C = adm
admin_keys += "[C][C.holder.fakekey ? "(Stealth)" : ""][C.is_afk() ? "(AFK)" : ""]"

View File

@@ -1,4 +1,4 @@
/client/proc/jumptoarea(area/A in sortedAreas)
/client/proc/jumptoarea(area/A in GLOB.sortedAreas)
set name = "Jump to Area"
set desc = "Area to jump to"
set category = "Admin"
@@ -23,7 +23,7 @@
usr.forceMove(T)
log_admin("[key_name(usr)] jumped to [A]")
message_admins("[key_name_admin(usr)] jumped to [A]")
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Jump To Area") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/jumptoturf(turf/T in world)
set name = "Jump to Turf"
@@ -35,10 +35,10 @@
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
usr.loc = T
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Jump To Turf") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/jumptomob(mob/M in mob_list)
/client/proc/jumptomob(mob/M in GLOB.mob_list)
set category = "Admin"
set name = "Jump to Mob"
@@ -52,7 +52,7 @@
var/mob/A = src.mob
var/turf/T = get_turf(M)
if(T && isturf(T))
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Jump To Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
A.forceMove(M.loc)
else
to_chat(A, "This mob is not located in the game world.")
@@ -70,7 +70,7 @@
A.x = tx
A.y = ty
A.z = tz
feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Jump To Coordiate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
/client/proc/jumptokey()
@@ -82,7 +82,7 @@
return
var/list/keys = list()
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
keys += M.client
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
if(!selection)
@@ -94,9 +94,9 @@
usr.forceMove(M.loc)
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Jump To Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/Getmob(mob/M in mob_list)
/client/proc/Getmob(mob/M in GLOB.mob_list)
set category = "Admin"
set name = "Get Mob"
set desc = "Mob to teleport"
@@ -107,7 +107,7 @@
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]")
M.forceMove(get_turf(usr))
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Get Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/Getkey()
set category = "Admin"
@@ -119,7 +119,7 @@
return
var/list/keys = list()
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
keys += M.client
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
if(!selection)
@@ -133,7 +133,7 @@
if(M)
M.forceMove(get_turf(usr))
usr.loc = M.loc
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Get Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sendmob(mob/M in sortmobs())
set category = "Admin"
@@ -141,7 +141,7 @@
if(!src.holder)
to_chat(src, "Only administrators may use this command.")
return
var/area/A = input(usr, "Pick an area.", "Pick an area") in sortedAreas|null
var/area/A = input(usr, "Pick an area.", "Pick an area") in GLOB.sortedAreas|null
if(A && istype(A))
if(M.forceMove(safepick(get_area_turfs(A))))
@@ -149,4 +149,4 @@
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]")
else
to_chat(src, "Failed to move mob to a valid location.")
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Send Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -2,7 +2,7 @@
//allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm
/client/proc/cmd_admin_pm_context(mob/M in mob_list)
/client/proc/cmd_admin_pm_context(mob/M in GLOB.mob_list)
set category = null
set name = "Admin PM Mob"
if(!holder)
@@ -11,7 +11,7 @@
if( !ismob(M) || !M.client )
return
cmd_admin_pm(M.client,null)
feedback_add_details("admin_verb","APMM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Admin PM Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm
/client/proc/cmd_admin_pm_panel()
@@ -33,7 +33,7 @@
targets["(No Mob) - [T]"] = T
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sortList(targets)
cmd_admin_pm(targets[target],null)
feedback_add_details("admin_verb","APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Admin PM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_ahelp_reply(whom)
if(prefs.muted & MUTE_ADMINHELP)
@@ -43,7 +43,7 @@
if(istext(whom))
if(cmptext(copytext(whom,1,2),"@"))
whom = findStealthKey(whom)
C = directory[whom]
C = GLOB.directory[whom]
else if(istype(whom,/client))
C = whom
if(!C)
@@ -73,7 +73,7 @@
if(whom == "IRCKEY")
irc = 1
else
C = directory[whom]
C = GLOB.directory[whom]
else if(istype(whom,/client))
C = whom
if(irc)
@@ -178,13 +178,13 @@
if(irc)
log_admin_private("PM: [key_name(src)]->IRC: [rawmsg]")
for(var/client/X in admins)
for(var/client/X in GLOB.admins)
to_chat(X, "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;IRC:</B> \blue [keywordparsedmsg]</font>" )
else
window_flash(C, ignorepref = TRUE)
log_admin_private("PM: [key_name(src)]->[key_name(C)]: [rawmsg]")
//we don't use message_admins here because the sender/receiver might get it too
for(var/client/X in admins)
for(var/client/X in GLOB.admins)
if(X.key!=key && X.key!=C.key) //check client/X is an admin and isn't the sender or recipient
to_chat(X, "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;[key_name(C, X, 0)]:</B> \blue [keywordparsedmsg]</font>" )
@@ -193,7 +193,7 @@
/proc/IrcPm(target,msg,sender)
var/client/C = directory[target]
var/client/C = GLOB.directory[target]
var/static/stealthkey
var/adminname = config.showircname ? "[sender](IRC)" : "Administrator"
@@ -230,12 +230,12 @@
var/i = 0
while(i == 0)
i = 1
for(var/P in stealthminID)
if(num == stealthminID[P])
for(var/P in GLOB.stealthminID)
if(num == GLOB.stealthminID[P])
num++
i = 0
var/stealth = "@[num2text(num)]"
stealthminID["IRCKEY"] = stealth
GLOB.stealthminID["IRCKEY"] = stealth
return stealth
#undef IRCREPLYCOUNT

View File

@@ -13,10 +13,10 @@
msg = keywords_lookup(msg)
if(check_rights(R_ADMIN,0))
msg = "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<a href='?_src_=holder;adminplayerobservefollow=\ref[mob]'>FLW</A>): <span class='message'>[msg]</span></span>"
to_chat(admins, msg)
to_chat(GLOB.admins, msg)
else
msg = "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]:</EM> <span class='message'>[msg]</span></span>"
to_chat(admins, msg)
to_chat(GLOB.admins, msg)
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Asay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -4,20 +4,20 @@
if(!src.holder)
to_chat(src, "Only administrators may use this command.")
return
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Check Plumbing") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//all plumbing - yes, some things might get stated twice, doesn't matter.
for (var/obj/machinery/atmospherics/plumbing in machines)
for (var/obj/machinery/atmospherics/plumbing in GLOB.machines)
if (plumbing.nodealert)
to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")
//Manifolds
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in machines)
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in GLOB.machines)
if (!pipe.NODE1 || !pipe.NODE2 || !pipe.NODE3)
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
//Pipes
for (var/obj/machinery/atmospherics/pipe/simple/pipe in machines)
for (var/obj/machinery/atmospherics/pipe/simple/pipe in GLOB.machines)
if (!pipe.NODE1 || !pipe.NODE2)
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
@@ -27,9 +27,9 @@
if(!src.holder)
to_chat(src, "Only administrators may use this command.")
return
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Check Power") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for (var/datum/powernet/PN in powernets)
for (var/datum/powernet/PN in GLOB.powernets)
if (!PN.nodes || !PN.nodes.len)
if(PN.cables && (PN.cables.len > 1))
var/obj/structure/cable/C = PN.cables[1]

View File

@@ -1,7 +1,4 @@
/client/proc/bluespace_artillery(mob/M in mob_list)
set name = "Bluespace Artillery"
set category = "Fun"
/client/proc/bluespace_artillery(mob/M in GLOB.mob_list)
if(!holder || !check_rights(R_FUN))
return
@@ -11,9 +8,6 @@
to_chat(usr, "This can only be used on instances of type /mob/living")
return
if(alert(usr, "Are you sure you wish to hit [key_name(target)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
return
explosion(target.loc, 0, 0, 0, 0)
var/turf/open/floor/T = get_turf(target)
@@ -23,10 +17,6 @@
else
T.break_tile()
to_chat(target, "<span class='userdanger'>You're hit by bluespace artillery!</span>")
log_admin("[key_name(target)] has been hit by Bluespace Artillery fired by [key_name(usr)]")
message_admins("[ADMIN_LOOKUPFLW(target)] has been hit by Bluespace Artillery fired by [ADMIN_LOOKUPFLW(usr)]")
if(target.health <= 1)
target.gib(1, 1)
else

View File

@@ -185,7 +185,7 @@
if("number")
valueholder = input(user,"Enter variable value:" ,"Value", 123) as num
if("mob-reference")
valueholder = input(user,"Enter variable value:" ,"Value") as mob in mob_list
valueholder = input(user,"Enter variable value:" ,"Value") as mob in GLOB.mob_list
if("obj-reference")
valueholder = input(user,"Enter variable value:" ,"Value") as obj in world
if("turf-reference")
@@ -218,7 +218,7 @@
cornerA = null
cornerB = null
/proc/togglebuildmode(mob/M in player_list)
/proc/togglebuildmode(mob/M in GLOB.player_list)
set name = "Toggle Build Mode"
set category = "Special Verbs"
if(M.client)
@@ -305,14 +305,18 @@
if(VAR_BUILDMODE)
if(left_click) //I cant believe this shit actually compiles.
if(object.vars.Find(varholder))
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
object.vars[varholder] = valueholder
if(object.vv_edit_var(varholder, valueholder))
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
else
to_chat(user, "<span class='warning'>Varedit rejected</span>")
else
to_chat(user, "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>")
if(right_click)
if(object.vars.Find(varholder))
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
object.vars[varholder] = initial(object.vars[varholder])
if(object.vv_edit_var(varholder, initial(object.vars[varholder])))
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
else
to_chat(user, "<span class='warning'>Varedit rejected</span>")
else
to_chat(user, "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>")

View File

@@ -3,7 +3,7 @@
set category = "Fun"
set desc = "Shows a cinematic." // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted.
set hidden = 1
if(!ticker)
if(!SSticker)
return
switch(cinematic)
if("explosion")
@@ -14,5 +14,5 @@
override = input(src,"mode = ?","Enter Parameter",null) as anything in list("nuclear emergency","gang war","fake","no override")
if(0)
override = input(src,"mode = ?","Enter Parameter",null) as anything in list("blob","nuclear emergency","AI malfunction","no override")
ticker.station_explosion_cinematic(parameter,override)
SSticker.station_explosion_cinematic(parameter,override)
return

View File

@@ -23,10 +23,10 @@
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.holder.fakekey ? pick(nicknames) : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
for (var/mob/M in player_list)
for (var/mob/M in GLOB.player_list)
if(isnewplayer(M))
continue
if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
M.show_message(rendered, 2)
feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -4,16 +4,16 @@
if(!check_rights(R_DEBUG))
return
if(Debug2)
Debug2 = 0
if(GLOB.Debug2)
GLOB.Debug2 = 0
message_admins("[key_name(src)] toggled debugging off.")
log_admin("[key_name(src)] toggled debugging off.")
else
Debug2 = 1
GLOB.Debug2 = 1
message_admins("[key_name(src)] toggled debugging on.")
log_admin("[key_name(src)] toggled debugging on.")
feedback_add_details("admin_verb","DG2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Toggle Debug Two") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -79,7 +79,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
. = get_callproc_returnval(returnval, procname)
if(.)
to_chat(usr, .)
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Advanced ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/callproc_datum(datum/A as null|area|mob|obj|turf)
set category = "Debug"
@@ -104,7 +104,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
return
log_admin("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
message_admins("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
feedback_add_details("admin_verb","DPC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Atom ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/returnval = call(A,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
. = get_callproc_returnval(returnval,procname)
@@ -171,17 +171,17 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/t = ""
for(var/id in env_gases)
if(id in hardcoded_gases || env_gases[id][MOLES])
if(id in GLOB.hardcoded_gases || env_gases[id][MOLES])
t+= "[env_gases[id][GAS_META][META_GAS_NAME]] : [env_gases[id][MOLES]]\n"
to_chat(usr, t)
feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Air Status In Location") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_robotize(mob/M in mob_list)
/client/proc/cmd_admin_robotize(mob/M in GLOB.mob_list)
set category = "Fun"
set name = "Make Robot"
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -193,11 +193,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
else
alert("Invalid mob")
/client/proc/cmd_admin_blobize(mob/M in mob_list)
/client/proc/cmd_admin_blobize(mob/M in GLOB.mob_list)
set category = "Fun"
set name = "Make Blob"
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -211,11 +211,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
alert("Invalid mob")
/client/proc/cmd_admin_animalize(mob/M in mob_list)
/client/proc/cmd_admin_animalize(mob/M in GLOB.mob_list)
set category = "Fun"
set name = "Make Simple Animal"
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("Wait until the game starts")
return
@@ -232,13 +232,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.Animalize()
/client/proc/makepAI(turf/T in mob_list)
/client/proc/makepAI(turf/T in GLOB.mob_list)
set category = "Fun"
set name = "Make pAI"
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
var/list/available = list()
for(var/mob/C in mob_list)
for(var/mob/C in GLOB.mob_list)
if(C.key)
available.Add(C)
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
@@ -257,76 +257,75 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/datum/paiCandidate/candidate in SSpai.candidates)
if(candidate.key == choice.key)
SSpai.candidates.Remove(candidate)
feedback_add_details("admin_verb","MPAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Make pAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_alienize(mob/M in mob_list)
/client/proc/cmd_admin_alienize(mob/M in GLOB.mob_list)
set category = "Fun"
set name = "Make Alien"
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has alienized [M.key].")
spawn(0)
M:Alienize()
feedback_add_details("admin_verb","MKAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [key_name(M)] into an alien.</span>")
else
alert("Invalid mob")
/client/proc/cmd_admin_slimeize(mob/M in mob_list)
/client/proc/cmd_admin_slimeize(mob/M in GLOB.mob_list)
set category = "Fun"
set name = "Make slime"
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has slimeized [M.key].")
spawn(0)
M:slimeize()
feedback_add_details("admin_verb","MKMET") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into a slime.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [key_name(M)] into a slime.</span>")
else
alert("Invalid mob")
var/list/TYPES_SHORTCUTS = list(
/obj/effect/decal/cleanable = "CLEANABLE",
/obj/item/device/radio/headset = "HEADSET",
/obj/item/clothing/head/helmet/space = "SPESSHELMET",
/obj/item/weapon/book/manual = "MANUAL",
/obj/item/weapon/reagent_containers/food/drinks = "DRINK", //longest paths comes first
/obj/item/weapon/reagent_containers/food = "FOOD",
/obj/item/weapon/reagent_containers = "REAGENT_CONTAINERS",
/obj/item/weapon = "WEAPON",
/obj/machinery/atmospherics = "ATMOS_MECH",
/obj/machinery/portable_atmospherics = "PORT_ATMOS",
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack = "MECHA_MISSILE_RACK",
/obj/item/mecha_parts/mecha_equipment = "MECHA_EQUIP",
/obj/item/organ = "ORGAN",
/obj/item = "ITEM",
/obj/machinery = "MACHINERY",
/obj/effect = "EFFECT",
/obj = "O",
/datum = "D",
/turf/open = "OPEN",
/turf/closed = "CLOSED",
/turf = "T",
/mob/living/carbon = "CARBON",
/mob/living/simple_animal = "SIMPLE",
/mob/living = "LIVING",
/mob = "M"
)
/proc/make_types_fancy(var/list/types)
if (ispath(types))
types = list(types)
. = list()
for(var/type in types)
var/typename = "[type]"
var/static/list/TYPES_SHORTCUTS = list(
/obj/effect/decal/cleanable = "CLEANABLE",
/obj/item/device/radio/headset = "HEADSET",
/obj/item/clothing/head/helmet/space = "SPESSHELMET",
/obj/item/weapon/book/manual = "MANUAL",
/obj/item/weapon/reagent_containers/food/drinks = "DRINK", //longest paths comes first
/obj/item/weapon/reagent_containers/food = "FOOD",
/obj/item/weapon/reagent_containers = "REAGENT_CONTAINERS",
/obj/item/weapon = "WEAPON",
/obj/machinery/atmospherics = "ATMOS_MECH",
/obj/machinery/portable_atmospherics = "PORT_ATMOS",
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack = "MECHA_MISSILE_RACK",
/obj/item/mecha_parts/mecha_equipment = "MECHA_EQUIP",
/obj/item/organ = "ORGAN",
/obj/item = "ITEM",
/obj/machinery = "MACHINERY",
/obj/effect = "EFFECT",
/obj = "O",
/datum = "D",
/turf/open = "OPEN",
/turf/closed = "CLOSED",
/turf = "T",
/mob/living/carbon = "CARBON",
/mob/living/simple_animal = "SIMPLE",
/mob/living = "LIVING",
/mob = "M"
)
for (var/tn in TYPES_SHORTCUTS)
if (copytext(typename,1, length("[tn]/")+1)=="[tn]/" /*findtextEx(typename,"[tn]/",1,2)*/ )
typename = TYPES_SHORTCUTS[tn]+copytext(typename,length("[tn]/"))
@@ -377,22 +376,22 @@ var/list/TYPES_SHORTCUTS = list(
CHECK_TICK
log_admin("[key_name(src)] has deleted all ([counter]) instances of [hsbitem].")
message_admins("[key_name_admin(src)] has deleted all ([counter]) instances of [hsbitem].", 0)
feedback_add_details("admin_verb","DELA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Delete All") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_debug_make_powernets()
set category = "Debug"
set name = "Make Powernets"
SSmachine.makepowernets()
SSmachines.makepowernets()
log_admin("[key_name(src)] has remade the powernet. makepowernets() called.")
message_admins("[key_name_admin(src)] has remade the powernets. makepowernets() called.", 0)
feedback_add_details("admin_verb","MPWN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Make Powernets") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_grantfullaccess(mob/M in mob_list)
/client/proc/cmd_admin_grantfullaccess(mob/M in GLOB.mob_list)
set category = "Admin"
set name = "Grant Full Access"
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -424,11 +423,11 @@ var/list/TYPES_SHORTCUTS = list(
else
alert("Invalid mob")
feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Grant Full Access") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(src)] has granted [M.key] full access.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has granted [M.key] full access.</span>")
/client/proc/cmd_assume_direct_control(mob/M in mob_list)
/client/proc/cmd_assume_direct_control(mob/M in GLOB.mob_list)
set category = "Admin"
set name = "Assume direct control"
set desc = "Direct intervention"
@@ -445,7 +444,7 @@ var/list/TYPES_SHORTCUTS = list(
M.ckey = src.ckey
if( isobserver(adminmob) )
qdel(adminmob)
feedback_add_details("admin_verb","ADC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Assume Direct Control") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_areatest()
set category = "Mapping"
@@ -464,37 +463,37 @@ var/list/TYPES_SHORTCUTS = list(
if(!(A.type in areas_all))
areas_all.Add(A.type)
for(var/obj/machinery/power/apc/APC in apcs_list)
for(var/obj/machinery/power/apc/APC in GLOB.apcs_list)
var/area/A = get_area(APC)
if(!(A.type in areas_with_APC))
areas_with_APC.Add(A.type)
for(var/obj/machinery/airalarm/AA in machines)
for(var/obj/machinery/airalarm/AA in GLOB.machines)
var/area/A = get_area(AA)
if(!(A.type in areas_with_air_alarm))
areas_with_air_alarm.Add(A.type)
for(var/obj/machinery/requests_console/RC in machines)
for(var/obj/machinery/requests_console/RC in GLOB.machines)
var/area/A = get_area(RC)
if(!(A.type in areas_with_RC))
areas_with_RC.Add(A.type)
for(var/obj/machinery/light/L in machines)
for(var/obj/machinery/light/L in GLOB.machines)
var/area/A = get_area(L)
if(!(A.type in areas_with_light))
areas_with_light.Add(A.type)
for(var/obj/machinery/light_switch/LS in machines)
for(var/obj/machinery/light_switch/LS in GLOB.machines)
var/area/A = get_area(LS)
if(!(A.type in areas_with_LS))
areas_with_LS.Add(A.type)
for(var/obj/item/device/radio/intercom/I in machines)
for(var/obj/item/device/radio/intercom/I in GLOB.machines)
var/area/A = get_area(I)
if(!(A.type in areas_with_intercom))
areas_with_intercom.Add(A.type)
for(var/obj/machinery/camera/C in machines)
for(var/obj/machinery/camera/C in GLOB.machines)
var/area/A = get_area(C)
if(!(A.type in areas_with_camera))
areas_with_camera.Add(A.type)
@@ -535,7 +534,7 @@ var/list/TYPES_SHORTCUTS = list(
for(var/areatype in areas_without_camera)
to_chat(world, "* [areatype]")
/client/proc/cmd_admin_dress(mob/living/carbon/human/M in mob_list)
/client/proc/cmd_admin_dress(mob/living/carbon/human/M in GLOB.mob_list)
set category = "Fun"
set name = "Select equipment"
if(!ishuman(M))
@@ -573,14 +572,14 @@ var/list/TYPES_SHORTCUTS = list(
var/datum/outfit/custom = null
if (dresscode == "Custom")
var/list/custom_names = list()
for(var/datum/outfit/D in custom_outfits)
for(var/datum/outfit/D in GLOB.custom_outfits)
custom_names[D.name] = D
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in custom_names
custom = custom_names[selected_name]
if(isnull(custom))
return
feedback_add_details("admin_verb","SEQ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for (var/obj/item/I in M.get_equipped_items())
qdel(I)
switch(dresscode)
@@ -607,11 +606,11 @@ var/list/TYPES_SHORTCUTS = list(
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
return
for(var/obj/machinery/power/emitter/E in machines)
for(var/obj/machinery/power/emitter/E in GLOB.machines)
if(E.anchored)
E.active = 1
for(var/obj/machinery/field/generator/F in machines)
for(var/obj/machinery/field/generator/F in GLOB.machines)
if(F.active == 0)
F.active = 1
F.state = 2
@@ -622,7 +621,7 @@ var/list/TYPES_SHORTCUTS = list(
F.update_icon()
spawn(30)
for(var/obj/machinery/the_singularitygen/G in machines)
for(var/obj/machinery/the_singularitygen/G in GLOB.machines)
if(G.anchored)
var/obj/singularity/S = new /obj/singularity(get_turf(G), 50)
// qdel(G)
@@ -639,7 +638,7 @@ var/list/TYPES_SHORTCUTS = list(
//S.dissipate_track = 0
//S.dissipate_strength = 10
for(var/obj/machinery/power/rad_collector/Rad in machines)
for(var/obj/machinery/power/rad_collector/Rad in GLOB.machines)
if(Rad.anchored)
if(!Rad.loaded_tank)
var/obj/item/weapon/tank/internals/plasma/Plasma = new/obj/item/weapon/tank/internals/plasma(Rad)
@@ -652,7 +651,7 @@ var/list/TYPES_SHORTCUTS = list(
if(!Rad.active)
Rad.toggle_power()
for(var/obj/machinery/power/smes/SMES in machines)
for(var/obj/machinery/power/smes/SMES in GLOB.machines)
if(SMES.anchored)
SMES.input_attempt = 1
@@ -663,19 +662,19 @@ var/list/TYPES_SHORTCUTS = list(
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
if("Players")
to_chat(usr, jointext(player_list,","))
to_chat(usr, jointext(GLOB.player_list,","))
if("Admins")
to_chat(usr, jointext(admins,","))
to_chat(usr, jointext(GLOB.admins,","))
if("Mobs")
to_chat(usr, jointext(mob_list,","))
to_chat(usr, jointext(GLOB.mob_list,","))
if("Living Mobs")
to_chat(usr, jointext(living_mob_list,","))
to_chat(usr, jointext(GLOB.living_mob_list,","))
if("Dead Mobs")
to_chat(usr, jointext(dead_mob_list,","))
to_chat(usr, jointext(GLOB.dead_mob_list,","))
if("Clients")
to_chat(usr, jointext(clients,","))
to_chat(usr, jointext(GLOB.clients,","))
if("Joined Clients")
to_chat(usr, jointext(joined_player_list,","))
to_chat(usr, jointext(GLOB.joined_player_list,","))
/client/proc/cmd_display_del_log()
set category = "Debug"
@@ -703,7 +702,7 @@ var/list/TYPES_SHORTCUTS = list(
if(!holder)
return
debug_variables(huds[i])
debug_variables(GLOB.huds[i])
/client/proc/jump_to_ruin()
set category = "Debug"
@@ -712,7 +711,7 @@ var/list/TYPES_SHORTCUTS = list(
if(!holder)
return
var/list/names = list()
for(var/i in ruin_landmarks)
for(var/i in GLOB.ruin_landmarks)
var/obj/effect/landmark/ruin/ruin_landmark = i
var/datum/map_template/ruin/template = ruin_landmark.ruin_template
@@ -740,13 +739,12 @@ var/list/TYPES_SHORTCUTS = list(
/client/proc/clear_dynamic_transit()
set category = "Debug"
set name = "Clear Dynamic Transit"
set desc = "Deallocates all transit space, restoring it to round start \
conditions."
set desc = "Deallocates all transit space, restoring it to round start conditions."
if(!holder)
return
SSshuttle.clear_transit = TRUE
message_admins("<span class='adminnotice'>[key_name_admin(src)] cleared dynamic transit space.</span>")
feedback_add_details("admin_verb","CDT") // If...
feedback_add_details("admin_verb","Clear Dynamic Transit") // If...
log_admin("[key_name(src)] cleared dynamic transit space.")
@@ -757,11 +755,11 @@ var/list/TYPES_SHORTCUTS = list(
if(!holder)
return
global.medals_enabled = !global.medals_enabled
GLOB.medals_enabled = !GLOB.medals_enabled
message_admins("<span class='adminnotice'>[key_name_admin(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
feedback_add_details("admin_verb","TMH") // If...
log_admin("[key_name(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
message_admins("<span class='adminnotice'>[key_name_admin(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
feedback_add_details("admin_verb","Toggle Medal Disable") // If...
log_admin("[key_name(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
/client/proc/view_runtimes()
set category = "Debug"
@@ -771,7 +769,7 @@ var/list/TYPES_SHORTCUTS = list(
if(!holder)
return
error_cache.show_to(src)
GLOB.error_cache.show_to(src)
/client/proc/pump_random_event()
set category = "Debug"
@@ -780,8 +778,8 @@ var/list/TYPES_SHORTCUTS = list(
if(!holder)
return
SSevent.scheduled = world.time
SSevents.scheduled = world.time
message_admins("<span class='adminnotice'>[key_name_admin(src)] pumped a random event.</span>")
feedback_add_details("admin_verb","PRE")
log_admin("[key_name(src)] pumped a random event.")
feedback_add_details("admin_verb","Pump Random Event")
log_admin("[key_name(src)] pumped a random event.")

View File

@@ -16,7 +16,7 @@
to_chat(usr, "<span class='adminnotice'>@[target.x],[target.y]: [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]</span>")
for(var/id in GM_gases)
to_chat(usr, "[GM_gases[id][GAS_META][META_GAS_NAME]]: [GM_gases[id][MOLES]]")
feedback_add_details("admin_verb","DAST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Show Air Status") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/fix_next_move()
set category = "Debug"
@@ -46,7 +46,7 @@
message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [largest_move_time/10] seconds!")
message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!")
message_admins("world.time = [world.time]")
feedback_add_details("admin_verb","UFE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Unfreeze Everyone") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/radio_report()
@@ -54,12 +54,12 @@
set name = "Radio report"
var/filters = list(
"1" = "RADIO_TO_AIRALARM",
"2" = "RADIO_FROM_AIRALARM",
"3" = "RADIO_CHAT",
"4" = "RADIO_ATMOSIA",
"5" = "RADIO_NAVBEACONS",
"6" = "RADIO_AIRLOCK",
"1" = "GLOB.RADIO_TO_AIRALARM",
"2" = "GLOB.RADIO_FROM_AIRALARM",
"3" = "GLOB.RADIO_CHAT",
"4" = "GLOB.RADIO_ATMOSIA",
"5" = "GLOB.RADIO_NAVBEACONS",
"6" = "GLOB.RADIO_AIRLOCK",
"7" = "RADIO_SECBOT",
"8" = "RADIO_MULEBOT",
"_default" = "NO_FILTER"
@@ -84,7 +84,7 @@
output += "&nbsp;&nbsp;&nbsp;&nbsp;[device]<br>"
usr << browse(output,"window=radioreport")
feedback_add_details("admin_verb","RR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Show Radio Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/reload_admins()
set name = "Reload Admins"
@@ -98,5 +98,5 @@
return
load_admins()
feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Reload All Admins") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
message_admins("[key_name_admin(usr)] manually reloaded admins")

View File

@@ -19,6 +19,6 @@
var/msg = "[key_name(src)] has modified world.fps to [new_fps]"
log_admin(msg, 0)
message_admins(msg, 0)
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Set Server FPS|[new_fps]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
world.fps = new_fps

View File

@@ -27,7 +27,7 @@
to_chat(src, "<font color='red'>Only Admins may use this command.</font>")
return
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in clients
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in GLOB.clients
if(!istype(target,/client))
to_chat(src, "<font color='red'>Error: giveruntimelog(): Client not found.</font>")
return
@@ -85,12 +85,12 @@
set name = "Show Server Log"
set desc = "Shows today's server log."
if(fexists("[diary]"))
src << ftp(diary)
if(fexists("[GLOB.diary]"))
src << ftp(GLOB.diary)
else
to_chat(src, "<font color='red'>Server log not found, try using .getserverlog.</font>")
return
feedback_add_details("admin_verb","VTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Show Server Log") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
//Shows today's attack log
@@ -99,10 +99,10 @@
set name = "Show Server Attack Log"
set desc = "Shows today's server attack log."
if(fexists("[diaryofmeanpeople]"))
src << ftp(diaryofmeanpeople)
if(fexists("[GLOB.diaryofmeanpeople]"))
src << ftp(GLOB.diaryofmeanpeople)
else
to_chat(src, "<font color='red'>Server attack log not found, try using .getserverlog.</font>")
return
feedback_add_details("admin_verb","SSAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Show Server Attack log") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return

View File

@@ -11,17 +11,21 @@
dat += "<hr style='background:#000000; border:0; height:1px'>"
if(type == INDIVIDUAL_SHOW_ALL_LOG)
dat += "<center>Displaying all logs of [key_name(M)]</center><br><hr>"
for(var/log_type in M.logging)
var/list/reversed = M.logging[log_type]
reversed = reverseRange(reversed.Copy())
dat += "<center>[log_type]</center><br>"
for(var/entry in M.logging[log_type])
dat += "<font size=2px>[entry]: [M.logging[log_type][entry]]</font><br>"
for(var/entry in reversed)
dat += "<font size=2px>[entry]: [reversed[entry]]</font><br>"
dat += "<hr>"
else
dat += "<center>[type] of [key_name(M)]</center><br>"
for(var/entry in M.logging[type])
dat += "<font size=2px>[entry]: [M.logging[type][entry]]</font><hr>"
var/list/reversed = M.logging[type]
if(reversed)
reversed = reverseRange(reversed.Copy())
for(var/entry in reversed)
dat += "<font size=2px>[entry]: [reversed[entry]]</font><hr>"
usr << browse(dat, "window=invidual_logging;size=600x480")

View File

@@ -7,4 +7,4 @@
P.rating = new_rating
M.RefreshParts()
feedback_add_details("admin_verb","MU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Machine Upgrade|[new_rating]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -47,7 +47,7 @@
I = organ
I.removed(C)
organ.loc = get_turf(C)
organ.forceMove(get_turf(C))
if(operation == "remove organ/implant")
qdel(organ)
@@ -55,4 +55,4 @@
var/obj/item/weapon/implantcase/case = new(get_turf(C))
case.imp = I
I.loc = case
case.update_icon()
case.update_icon()

View File

@@ -18,9 +18,9 @@
//- Check for any misplaced or stacked piece of wire
//- Identify how hard it is to break into the area and where the weak points are
//- Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels.
var/intercom_range_display_status = 0
var/list/admin_verbs_debug_mapping = list(
GLOBAL_PROTECT(admin_verbs_debug_mapping)
GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
/client/proc/do_not_use_these, //-errorage
/client/proc/camera_view, //-errorage
/client/proc/sec_camera_report, //-errorage
@@ -43,7 +43,7 @@ var/list/admin_verbs_debug_mapping = list(
/client/proc/cmd_show_at_list,
/client/proc/cmd_show_at_list,
/client/proc/manipulate_organs
)
))
/obj/effect/debugging/mapfix_marker
name = "map fix marker"
@@ -76,12 +76,12 @@ var/list/admin_verbs_debug_mapping = list(
if(!on)
var/list/seen = list()
for(var/obj/machinery/camera/C in cameranet.cameras)
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
for(var/turf/T in C.can_see())
seen[T]++
for(var/turf/T in seen)
T.maptext = "[seen[T]]"
feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Show Camera Range") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -95,7 +95,7 @@ var/list/admin_verbs_debug_mapping = list(
var/list/obj/machinery/camera/CL = list()
for(var/obj/machinery/camera/C in cameranet.cameras)
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
CL += C
var/output = {"<B>CAMERA ANNOMALITIES REPORT</B><HR>
@@ -123,12 +123,13 @@ var/list/admin_verbs_debug_mapping = list(
output += "</ul>"
usr << browse(output,"window=airreport;size=1000x500")
feedback_add_details("admin_verb","mCRP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Show Camera Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/intercom_view()
set category = "Mapping"
set name = "Intercom Range Display"
var/static/intercom_range_display_status = 0
if(intercom_range_display_status)
intercom_range_display_status = 0
else
@@ -143,7 +144,7 @@ var/list/admin_verbs_debug_mapping = list(
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
if (!(F in view(7,I.loc)))
qdel(F)
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Show Intercom Range") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_show_at_list()
set category = "Mapping"
@@ -153,13 +154,13 @@ var/list/admin_verbs_debug_mapping = list(
var/dat = {"<b>Coordinate list of Active Turfs at Roundstart</b>
<br>Real-time Active Turfs list you can see in Air Subsystem at active_turfs var<br>"}
for(var/i=1; i<=active_turfs_startlist.len; i++)
dat += active_turfs_startlist[i]
for(var/i=1; i<=GLOB.active_turfs_startlist.len; i++)
dat += GLOB.active_turfs_startlist[i]
dat += "<br>"
usr << browse(dat, "window=at_list")
feedback_add_details("admin_verb","mATL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Show Roundstart Active Turfs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/enable_debug_verbs()
set category = "Debug"
@@ -167,15 +168,15 @@ var/list/admin_verbs_debug_mapping = list(
if(!check_rights(R_DEBUG))
return
verbs -= /client/proc/enable_debug_verbs
verbs.Add(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping)
feedback_add_details("admin_verb","mDVE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
verbs.Add(/client/proc/disable_debug_verbs, GLOB.admin_verbs_debug_mapping)
feedback_add_details("admin_verb","Enable Debug Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/disable_debug_verbs()
set category = "Debug"
set name = "Debug verbs - Disable"
verbs.Remove(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping)
verbs.Remove(/client/proc/disable_debug_verbs, GLOB.admin_verbs_debug_mapping)
verbs += /client/proc/enable_debug_verbs
feedback_add_details("admin_verb", "mDVD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb", "Disable Debug Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_on_z_level()
set category = "Mapping"
@@ -218,7 +219,7 @@ var/list/admin_verbs_debug_mapping = list(
to_chat(world, line)*/
to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level]")
feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Count Objects Zlevel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_all()
set category = "Mapping"
@@ -245,17 +246,17 @@ var/list/admin_verbs_debug_mapping = list(
to_chat(world, line)*/
to_chat(world, "There are [count] objects of type [type_path] in the game world")
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Count Objects All") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//This proc is intended to detect lag problems relating to communication procs
var/global/say_disabled = 0
GLOBAL_VAR_INIT(say_disabled, FALSE)
/client/proc/disable_communication()
set category = "Mapping"
set name = "Disable all communication verbs"
say_disabled = !say_disabled
if(say_disabled)
GLOB.say_disabled = !GLOB.say_disabled
if(GLOB.say_disabled)
message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.")
else
message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")

View File

@@ -6,7 +6,7 @@
return
message_admins("[key_name_admin(usr)] is forcing a random map rotation.")
log_admin("[key_name(usr)] is forcing a random map rotation.")
ticker.maprotatechecked = 1
SSticker.maprotatechecked = 1
SSmapping.maprotate()
/client/proc/adminchangemap()
@@ -36,7 +36,7 @@
var/chosenmap = input("Choose a map to change to", "Change Map") as null|anything in maprotatechoices
if (!chosenmap)
return
ticker.maprotatechecked = 1
SSticker.maprotatechecked = 1
var/datum/map_config/VM = maprotatechoices[chosenmap]
message_admins("[key_name_admin(usr)] is changing the map to [VM.map_name]")
log_admin("[key_name(usr)] is changing the map to [VM.map_name]")

View File

@@ -12,7 +12,7 @@
method = vv_subtype_prompt(A.type)
src.massmodify_variables(A, var_name, method)
feedback_add_details("admin_verb","MEV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Mass Edit Variables") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/massmodify_variables(datum/O, var_name = "", method = 0)
if(!check_rights(R_VAREDIT))
@@ -32,21 +32,21 @@
else
variable = var_name
if(!variable)
if(!variable || !O.can_vv_get(variable))
return
var/default
var/var_value = O.vars[variable]
if(variable in VVckey_edit)
if(variable in GLOB.VVckey_edit)
to_chat(src, "It's forbidden to mass-modify ckeys. It'll crash everyone's client you dummy.")
return
if(variable in VVlocked)
if(variable in GLOB.VVlocked)
if(!check_rights(R_DEBUG))
return
if(variable in VVicon_edit_lock)
if(variable in GLOB.VVicon_edit_lock)
if(!check_rights(R_FUN|R_DEBUG))
return
if(variable in VVpixelmovement)
if(variable in GLOB.VVpixelmovement)
if(!check_rights(R_DEBUG))
return
var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
@@ -205,19 +205,19 @@
typecache = typecacheof(typecache)
. = list()
if (ispath(T, /mob))
for(var/mob/thing in mob_list)
for(var/mob/thing in GLOB.mob_list)
if (typecache[thing.type])
. += thing
CHECK_TICK
else if (ispath(T, /obj/machinery/door))
for(var/obj/machinery/door/thing in airlocks)
for(var/obj/machinery/door/thing in GLOB.airlocks)
if (typecache[thing.type])
. += thing
CHECK_TICK
else if (ispath(T, /obj/machinery))
for(var/obj/machinery/thing in machines)
for(var/obj/machinery/thing in GLOB.machines)
if (typecache[thing.type])
. += thing
CHECK_TICK
@@ -247,7 +247,7 @@
CHECK_TICK
else if (ispath(T, /client))
for(var/client/thing in clients)
for(var/client/thing in GLOB.clients)
if (typecache[thing.type])
. += thing
CHECK_TICK

View File

@@ -1,7 +1,11 @@
var/list/VVlocked = list("vars", "var_edited", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "force_ending")
var/list/VVicon_edit_lock = list("icon", "icon_state", "overlays", "underlays", "resize")
var/list/VVckey_edit = list("key", "ckey")
var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width", "bound_x", "bound_y")
GLOBAL_LIST_INIT(VVlocked, list("vars", "var_edited", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "force_ending"))
GLOBAL_PROTECT(VVlocked)
GLOBAL_LIST_INIT(VVicon_edit_lock, list("icon", "icon_state", "overlays", "underlays", "resize"))
GLOBAL_PROTECT(VVicon_edit_lock)
GLOBAL_LIST_INIT(VVckey_edit, list("key", "ckey"))
GLOBAL_PROTECT(VVckey_edit)
GLOBAL_LIST_INIT(VVpixelmovement, list("step_x", "step_y", "bound_height", "bound_width", "bound_x", "bound_y"))
GLOBAL_PROTECT(VVpixelmovement)
/client/proc/vv_get_class(var/var_value)
@@ -176,7 +180,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
if (VV_CLIENT)
.["value"] = input("Select reference:", "Reference", current_value) as null|anything in clients
.["value"] = input("Select reference:", "Reference", current_value) as null|anything in GLOB.clients
if (.["value"] == null)
.["class"] = null
return
@@ -524,19 +528,22 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
variable = input("Which var?","Var") as null|anything in names
if(!variable)
return
if(!O.can_vv_get(variable))
return
var_value = O.vars[variable]
if(variable in VVlocked)
if(variable in GLOB.VVlocked)
if(!check_rights(R_DEBUG))
return
if(variable in VVckey_edit)
if(variable in GLOB.VVckey_edit)
if(!check_rights(R_SPAWN|R_DEBUG))
return
if(variable in VVicon_edit_lock)
if(variable in GLOB.VVicon_edit_lock)
if(!check_rights(R_FUN|R_DEBUG))
return
if(variable in VVpixelmovement)
if(variable in GLOB.VVpixelmovement)
if(!check_rights(R_DEBUG))
return
var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")

View File

@@ -41,7 +41,7 @@
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_TRAITOR in applicant.client.prefs.be_special)
if(!applicant.stat)
if(applicant.mind)
@@ -77,7 +77,7 @@
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_CHANGELING in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
@@ -110,7 +110,7 @@
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_REV in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
@@ -152,7 +152,7 @@
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_CULTIST in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
@@ -185,7 +185,7 @@
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_SERVANT_OF_RATVAR in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
@@ -203,7 +203,7 @@
you see the truth. Ratvar, the Clockwork Justiciar, lies derelict and forgotten in an unseen realm, and he has selected you as one of his harbringers. You are now a servant of \
Ratvar, and you will bring him back.</span>")
add_servant_of_ratvar(H, TRUE)
ticker.mode.equip_servant(H)
SSticker.mode.equip_servant(H)
candidates.Remove(H)
return 1
@@ -241,13 +241,13 @@
var/nuke_code = random_nukecode()
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in nuke_list
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list
if(nuke)
nuke.r_code = nuke_code
//Let's find the spawn locations
var/list/turf/synd_spawn = list()
for(var/obj/effect/landmark/A in landmarks_list)
for(var/obj/effect/landmark/A in GLOB.landmarks_list)
if(A.name == "Syndicate-Spawn")
synd_spawn += get_turf(A)
continue
@@ -294,7 +294,7 @@
if(candidates.len >= 2) //Minimum 2 to be considered a squad
//Pick the lucky players
var/numagents = min(5,candidates.len) //How many commandos to spawn
var/list/spawnpoints = emergencyresponseteamspawn
var/list/spawnpoints = GLOB.emergencyresponseteamspawn
while(numagents && candidates.len)
if (numagents > spawnpoints.len)
numagents--
@@ -309,20 +309,20 @@
var/mob/living/carbon/human/Commando = new(spawnloc)
chosen_candidate.client.prefs.copy_to(Commando)
if(numagents == 1) //If Squad Leader
Commando.real_name = "Officer [pick(commando_names)]"
Commando.real_name = "Officer [pick(GLOB.commando_names)]"
Commando.equipOutfit(/datum/outfit/death_commando/officer)
else
Commando.real_name = "Trooper [pick(commando_names)]"
Commando.real_name = "Trooper [pick(GLOB.commando_names)]"
Commando.equipOutfit(/datum/outfit/death_commando)
Commando.dna.update_dna_identity()
Commando.key = chosen_candidate.key
Commando.mind.assigned_role = "Death Commando"
for(var/obj/machinery/door/poddoor/ert/door in airlocks)
for(var/obj/machinery/door/poddoor/ert/door in GLOB.airlocks)
spawn(0)
door.open()
//Assign antag status and the mission
ticker.mode.traitors += Commando.mind
SSticker.mode.traitors += Commando.mind
Commando.mind.special_role = "deathsquad"
var/datum/objective/missionobj = new
missionobj.owner = Commando.mind
@@ -370,7 +370,7 @@
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_GANG in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
@@ -382,9 +382,9 @@
if(candidates.len >= 2)
for(var/needs_assigned=2,needs_assigned>0,needs_assigned--)
H = pick(candidates)
if(gang_colors_pool.len)
if(GLOB.gang_colors_pool.len)
var/datum/gang/newgang = new()
ticker.mode.gangs += newgang
SSticker.mode.gangs += newgang
H.mind.make_Gang(newgang)
candidates.Remove(H)
else if(needs_assigned == 2)
@@ -402,7 +402,7 @@
var/mob/dead/observer/chosen_candidate = pick(candidates)
//Create the official
var/mob/living/carbon/human/newmob = new (pick(emergencyresponseteamspawn))
var/mob/living/carbon/human/newmob = new (pick(GLOB.emergencyresponseteamspawn))
chosen_candidate.client.prefs.copy_to(newmob)
newmob.real_name = newmob.dna.species.random_name(newmob.gender,1)
newmob.dna.update_dna_identity()
@@ -411,7 +411,7 @@
newmob.equipOutfit(/datum/outfit/centcom_official)
//Assign antag status and the mission
ticker.mode.traitors += newmob.mind
SSticker.mode.traitors += newmob.mind
newmob.mind.special_role = "official"
var/datum/objective/missionobj = new
missionobj.owner = newmob.mind
@@ -450,8 +450,13 @@
alert = "Blue"
if("Green: Centcom Official")
return makeOfficial()
var/teamsize = min(7,input("Maximum size of team? (7 max)", "Select Team Size",4) as null|num)
var/mission = input("Assign a mission to the Emergency Response Team", "Assign Mission", "Assist the station.")
var/teamcheck = input("Maximum size of team? (7 max)", "Select Team Size",4) as null|num
if(isnull(teamcheck))
return
var/teamsize = min(7,teamcheck)
var/mission = input("Assign a mission to the Emergency Response Team", "Assign Mission", "Assist the station.") as null|text
if(!mission)
return
var/list/mob/dead/observer/candidates = pollCandidates("Do you wish to be considered for a Code [alert] Nanotrasen Emergency Response Team?", "deathsquad", null)
var/teamSpawned = 0
@@ -462,7 +467,7 @@
if (alert == "Red")
numagents = min(teamsize,candidates.len)
redalert = 1
var/list/spawnpoints = emergencyresponseteamspawn
var/list/spawnpoints = GLOB.emergencyresponseteamspawn
while(numagents && candidates.len)
if (numagents > spawnpoints.len)
numagents--
@@ -475,7 +480,7 @@
//Spawn and equip the officer
var/mob/living/carbon/human/ERTOperative = new(spawnloc)
var/list/lastname = last_names
var/list/lastname = GLOB.last_names
chosen_candidate.client.prefs.copy_to(ERTOperative)
var/ertname = pick(lastname)
switch(numagents)
@@ -506,12 +511,12 @@
//Open the Armory doors
if(alert != "Blue")
for(var/obj/machinery/door/poddoor/ert/door in airlocks)
for(var/obj/machinery/door/poddoor/ert/door in GLOB.airlocks)
spawn(0)
door.open()
//Assign antag status and the mission
ticker.mode.traitors += ERTOperative.mind
SSticker.mode.traitors += ERTOperative.mind
ERTOperative.mind.special_role = "ERT"
var/datum/objective/missionobj = new
missionobj.owner = ERTOperative.mind

View File

@@ -1,16 +1,16 @@
var/highlander = FALSE
GLOBAL_VAR_INIT(highlander, FALSE)
/client/proc/only_one() //Gives everyone kilts, berets, claymores, and pinpointers, with the objective to hijack the emergency shuttle.
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("The game hasn't started yet!")
return
highlander = TRUE
GLOB.highlander = TRUE
send_to_playing_players("<span class='boldannounce'><font size=6>THERE CAN BE ONLY ONE</font></span>")
for(var/obj/item/weapon/disk/nuclear/N in poi_list)
for(var/obj/item/weapon/disk/nuclear/N in GLOB.poi_list)
N.relocate() //Gets it out of bags and such
for(var/mob/living/carbon/human/H in player_list)
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(H.stat == DEAD || !(H.client))
continue
H.make_scottish()
@@ -26,7 +26,7 @@ var/highlander = FALSE
addtimer(CALLBACK(src, .proc/only_one), 420)
/mob/living/carbon/human/proc/make_scottish()
ticker.mode.traitors += mind
SSticker.mode.traitors += mind
mind.special_role = "highlander"
dna.species.species_traits |= NOGUNS //nice try jackass
@@ -64,7 +64,7 @@ var/highlander = FALSE
equip_to_slot_or_del(W, slot_wear_id)
var/obj/item/weapon/claymore/highlander/H1 = new(src)
if(!highlander)
if(!GLOB.highlander)
H1.admin_spawned = TRUE //To prevent announcing
put_in_hands(H1)
H1.pickup(src) //For the stun shielding
@@ -79,15 +79,15 @@ var/highlander = FALSE
Activate it in your hand, and it will lead to the nearest target. Attack the nuclear authentication disk with it, and you will store it.</span>")
/proc/only_me()
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("The game hasn't started yet!")
return
for(var/mob/living/carbon/human/H in player_list)
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(H.stat == 2 || !(H.client)) continue
if(is_special_character(H)) continue
ticker.mode.traitors += H.mind
SSticker.mode.traitors += H.mind
H.mind.special_role = "[H.real_name] Prime"
var/datum/objective/hijackclone/hijack_objective = new /datum/objective/hijackclone
@@ -98,7 +98,7 @@ var/highlander = FALSE
H.mind.announce_objectives()
var/datum/gang/multiverse/G = new(src, "[H.real_name]")
ticker.mode.gangs += G
SSticker.mode.gangs += G
G.bosses += H.mind
G.add_gang_hud(H.mind)
H.mind.gang_datum = G

View File

@@ -9,7 +9,7 @@
log_admin("[key_name(usr)] has toggled the Panic Bunker, it is now [(config.panic_bunker?"on":"off")]")
message_admins("[key_name_admin(usr)] has toggled the Panic Bunker, it is now [(config.panic_bunker?"enabled":"disabled")].")
if (config.panic_bunker && (!dbcon || !dbcon.IsConnected()))
if (config.panic_bunker && (!GLOB.dbcon || !GLOB.dbcon.IsConnected()))
message_admins("The Database is not connected! Panic bunker will not work until the connection is reestablished.")
feedback_add_details("admin_verb","PANIC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Toggle Panic Bunker|[config.panic_bunker]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -1,6 +1,3 @@
#define SOUND_CHANNEL_ADMIN 777
var/sound/admin_sound
/client/proc/play_sound(S as sound)
set category = "Fun"
set name = "Play Global Sound"
@@ -11,24 +8,24 @@ var/sound/admin_sound
message_admins("[key_name_admin(src)] played sound [S]")
var/freq = 1
if(SSevent.holidays && SSevent.holidays[APRIL_FOOLS])
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
freq = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5)
to_chat(src, "You feel the Honkmother messing with your song...")
var/sound/admin_sound = new()
admin_sound.file = S
admin_sound.priority = 250
admin_sound.channel = SOUND_CHANNEL_ADMIN
admin_sound.channel = CHANNEL_ADMIN
admin_sound.frequency = freq
admin_sound.wait = 1
admin_sound.repeat = 0
admin_sound.status = SOUND_STREAM
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
if(M.client.prefs.toggles & SOUND_MIDI)
M << admin_sound
feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/play_local_sound(S as sound)
@@ -40,7 +37,7 @@ var/sound/admin_sound
log_admin("[key_name(src)] played a local sound [S]")
message_admins("[key_name_admin(src)] played a local sound [S]")
playsound(get_turf(src.mob), S, 50, 0, 0)
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Play Local Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/set_round_end_sound(S as sound)
set category = "Fun"
@@ -48,14 +45,14 @@ var/sound/admin_sound
if(!check_rights(R_SOUNDS))
return
if(ticker)
ticker.round_end_sound = fcopy_rsc(S)
if(SSticker)
SSticker.round_end_sound = fcopy_rsc(S)
else
return
log_admin("[key_name(src)] set the round end sound to [S]")
message_admins("[key_name_admin(src)] set the round end sound to [S]")
feedback_add_details("admin_verb","SRES") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Set Round End Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/stop_sounds()
set category = "Debug"
@@ -65,9 +62,7 @@ var/sound/admin_sound
log_admin("[key_name(src)] stopped all currently playing sounds.")
message_admins("[key_name_admin(src)] stopped all currently playing sounds.")
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
if(M.client)
M << sound(null)
feedback_add_details("admin_verb","SS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
#undef SOUND_CHANNEL_ADMIN
feedback_add_details("admin_verb","Stop All Playing Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -2,10 +2,9 @@
set name = "Possess Obj"
set category = "Object"
if(istype(O,/obj/singularity))
if(config.forbid_singulo_possession)
to_chat(usr, "It is forbidden to possess singularities.")
return
if(O.dangerous_possession && config.forbid_singulo_possession)
to_chat(usr, "[O] is too powerful for you to possess.")
return
var/turf/T = get_turf(O)
@@ -24,7 +23,7 @@
usr.name = O.name
usr.client.eye = O
usr.control_object = O
feedback_add_details("admin_verb","PO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Possess Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/proc/release(obj/O in world)
set name = "Release Obj"
@@ -42,12 +41,12 @@
usr.loc = O.loc
usr.client.eye = usr
usr.control_object = null
feedback_add_details("admin_verb","RO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Release Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/proc/givetestverbs(mob/M in mob_list)
/proc/givetestverbs(mob/M in GLOB.mob_list)
set desc = "Give this guy possess/release verbs"
set category = "Debug"
set name = "Give Possessing Verbs"
M.verbs += /proc/possess
M.verbs += /proc/release
feedback_add_details("admin_verb","GPV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Give Possessing Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -2,7 +2,7 @@
set category = "IC"
set name = "Pray"
if(say_disabled) //This is here to try to identify lag problems
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
@@ -25,8 +25,8 @@
cross = image('icons/obj/storage.dmi',"kingyellow")
font_color = "blue"
prayer_type = "CHAPLAIN PRAYER"
if(SSreligion.Bible_deity_name)
deity = SSreligion.Bible_deity_name
if(SSreligion.deity)
deity = SSreligion.deity
else if(iscultist(usr))
cross = image('icons/obj/storage.dmi',"tome")
font_color = "red"
@@ -35,7 +35,7 @@
msg = "<span class='adminnotice'>\icon[cross]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]: </font>[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)] [ADMIN_SMITE(src)]:</b> [msg]</span>"
for(var/client/C in admins)
for(var/client/C in GLOB.admins)
if(C.prefs.chat_toggles & CHAT_PRAYER)
to_chat(C, msg)
if(C.prefs.toggles & SOUND_PRAYERS)
@@ -43,39 +43,26 @@
C << 'sound/effects/pray.ogg'
to_chat(usr, "Your prayers have been received by the gods.")
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//log_admin("HELP: [key_name(src)]: [msg]")
/proc/Centcomm_announce(text , mob/Sender)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "<span class='adminnotice'>\
<b><font color=orange>CENTCOM:</font>\
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
[ADMIN_CENTCOM_REPLY(Sender)]:</b> \
[msg]</span>"
to_chat(admins, msg)
for(var/obj/machinery/computer/communications/C in machines)
msg = "<span class='adminnotice'><b><font color=orange>CENTCOM:</font>[ADMIN_FULLMONTY(Sender)] [ADMIN_SMITE(Sender)] [ADMIN_CENTCOM_REPLY(Sender)]:</b> [msg]</span>"
to_chat(GLOB.admins, msg)
for(var/obj/machinery/computer/communications/C in GLOB.machines)
C.overrideCooldown()
/proc/Syndicate_announce(text , mob/Sender)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "<span class='adminnotice'><b>\
<font color=crimson>SYNDICATE:</font>\
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
[ADMIN_SYNDICATE_REPLY(Sender)]:</b> \
[msg]</span>"
to_chat(admins, msg)
for(var/obj/machinery/computer/communications/C in machines)
msg = "<span class='adminnotice'><b><font color=crimson>SYNDICATE:</font>[ADMIN_FULLMONTY(Sender)] [ADMIN_SMITE(Sender)] [ADMIN_SYNDICATE_REPLY(Sender)]:</b> [msg]</span>"
to_chat(GLOB.admins, msg)
for(var/obj/machinery/computer/communications/C in GLOB.machines)
C.overrideCooldown()
/proc/Nuke_request(text , mob/Sender)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "<span class='adminnotice'>\
<b><font color=orange>NUKE CODE REQUEST:</font>\
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
[ADMIN_CENTCOM_REPLY(Sender)] \
[ADMIN_SET_SD_CODE]:</b> \
[msg]</span>"
to_chat(admins, msg)
for(var/obj/machinery/computer/communications/C in machines)
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST:</font>[ADMIN_FULLMONTY(Sender)] [ADMIN_SMITE(Sender)] [ADMIN_CENTCOM_REPLY(Sender)] [ADMIN_SET_SD_CODE]:</b> [msg]</span>"
to_chat(GLOB.admins, msg)
for(var/obj/machinery/computer/communications/C in GLOB.machines)
C.overrideCooldown()

View File

@@ -1,4 +1,4 @@
/client/proc/cmd_admin_drop_everything(mob/M in mob_list)
/client/proc/cmd_admin_drop_everything(mob/M in GLOB.mob_list)
set category = null
set name = "Drop Everything"
if(!holder)
@@ -16,10 +16,10 @@
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!")
feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Drop Everything") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_subtle_message(mob/M in mob_list)
/client/proc/cmd_admin_subtle_message(mob/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "Subtle Message"
@@ -42,7 +42,7 @@
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
message_admins("<span class='adminnotice'><b> SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]</span>")
feedback_add_details("admin_verb","SMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_world_narrate()
set category = "Special Verbs"
@@ -59,7 +59,7 @@
to_chat(world, "[msg]")
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] Sent a global narrate</span>")
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Global Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_direct_narrate(mob/M)
set category = "Special Verbs"
@@ -70,7 +70,7 @@
return
if(!M)
M = input("Direct narrate to whom?", "Active Players") as null|anything in player_list
M = input("Direct narrate to whom?", "Active Players") as null|anything in GLOB.player_list
if(!M)
return
@@ -83,7 +83,7 @@
to_chat(M, msg)
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
message_admins("<span class='adminnotice'><b> DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):</b> [msg]<BR></span>")
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Direct Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_local_narrate(atom/A)
set category = "Special Verbs"
@@ -105,9 +105,9 @@
log_admin("LocalNarrate: [key_name(usr)] at ([get_area(A)]): [msg]")
message_admins("<span class='adminnotice'><b> LocalNarrate: [key_name_admin(usr)] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[A.x];Y=[A.y];Z=[A.z]'>[get_area(A)]</a>):</b> [msg]<BR></span>")
feedback_add_details("admin_verb","LN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Local Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_godmode(mob/M in mob_list)
/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "Godmode"
if(!holder)
@@ -118,7 +118,7 @@
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
feedback_add_details("admin_verb","GOD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Godmode|[M.status_flags & GODMODE]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/proc/cmd_admin_mute(whom, mute_type, automute = 0)
@@ -127,19 +127,26 @@
var/muteunmute
var/mute_string
var/feedback_string
switch(mute_type)
if(MUTE_IC)
mute_string = "IC (say and emote)"
feedback_string = "IC"
if(MUTE_OOC)
mute_string = "OOC"
feedback_string = "OOC"
if(MUTE_PRAY)
mute_string = "pray"
feedback_string = "Pray"
if(MUTE_ADMINHELP)
mute_string = "adminhelp, admin PM and ASAY"
feedback_string = "Adminhelp"
if(MUTE_DEADCHAT)
mute_string = "deadchat and DSAY"
feedback_string = "Deadchat"
if(MUTE_ALL)
mute_string = "everything"
feedback_string = "Everything"
else
return
@@ -147,7 +154,7 @@
if(istype(whom, /client))
C = whom
else if(istext(whom))
C = directory[whom]
C = GLOB.directory[whom]
else
return
@@ -155,7 +162,7 @@
if(C)
P = C.prefs
else
P = preferences_datums[whom]
P = GLOB.preferences_datums[whom]
if(!P)
return
@@ -173,7 +180,7 @@
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(whom)] from [mute_string].")
if(C)
to_chat(C, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.")
feedback_add_details("admin_verb","AUTOMUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Auto Mute [feedback_string]|1") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
if(P.muted & mute_type)
@@ -187,14 +194,14 @@
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(whom)] from [mute_string].")
if(C)
to_chat(C, "You have been [muteunmute] from [mute_string] by [key_name(usr, include_name = FALSE)].")
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Mute [feedback_string]|[P.muted & mute_type]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//I use this proc for respawn character too. /N
/proc/create_xeno(ckey)
if(!ckey)
var/list/candidates = list()
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
if(M.stat != DEAD)
continue //we are not dead!
if(!(ROLE_ALIEN in M.client.prefs.be_special))
@@ -212,7 +219,7 @@
return 0
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")
var/obj/effect/landmark/spawn_here = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : pick(GLOB.latejoin)
var/mob/living/carbon/alien/new_xeno
switch(alien_caste)
if("Queen")
@@ -251,7 +258,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/mob/dead/observer/G_found
for(var/mob/dead/observer/G in player_list)
for(var/mob/dead/observer/G in GLOB.player_list)
if(G.ckey == input)
G_found = G
break
@@ -265,10 +272,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(G_found.mind.assigned_role=="Alien")
if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
var/turf/T
if(xeno_spawn.len)
T = pick(xeno_spawn)
if(GLOB.xeno_spawn.len)
T = pick(GLOB.xeno_spawn)
else
T = pick(latejoin)
T = pick(GLOB.latejoin)
var/mob/living/carbon/alien/new_xeno
switch(G_found.mind.special_role)//If they have a mind, we can determine which caste they were.
@@ -296,7 +303,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//check if they were a monkey
else if(findtext(G_found.real_name,"monkey"))
if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
var/mob/living/carbon/monkey/new_monkey = new(pick(latejoin))
var/mob/living/carbon/monkey/new_monkey = new(pick(GLOB.latejoin))
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
new_monkey.key = G_found.key
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.")
@@ -305,15 +312,15 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Ok, it's not a xeno or a monkey. So, spawn a human.
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
var/mob/living/carbon/human/new_character = new(pick(GLOB.latejoin))//The mob being spawned.
var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character.
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
/*Try and locate a record for the person being respawned through data_core.
/*Try and locate a record for the person being respawned through GLOB.data_core.
This isn't an exact science but it does the trick more often than not.*/
var/id = md5("[G_found.real_name][G_found.mind.assigned_role]")
record_found = find_record("id", id, data_core.locked)
record_found = find_record("id", id, GLOB.data_core.locked)
if(record_found)//If they have a record we can determine a few things.
new_character.real_name = record_found.fields["name"]
@@ -352,11 +359,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(new_character.mind.special_role)
if("traitor")
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
ticker.mode.equip_traitor(new_character)
SSticker.mode.equip_traitor(new_character)
if("Wizard")
new_character.loc = pick(wizardstart)
//ticker.mode.learn_basic_spells(new_character)
ticker.mode.equip_wizard(new_character)
new_character.loc = pick(GLOB.wizardstart)
//SSticker.mode.learn_basic_spells(new_character)
SSticker.mode.equip_wizard(new_character)
if("Syndicate")
var/obj/effect/landmark/synd_spawn = locate("landmark*Syndicate-Spawn")
if(synd_spawn)
@@ -364,7 +371,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
call(/datum/game_mode/proc/equip_syndicate)(new_character)
if("Space Ninja")
var/list/ninja_spawn = list()
for(var/obj/effect/landmark/L in landmarks_list)
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
if(L.name=="carpspawn")
ninja_spawn += L
new_character.equip_space_ninja()
@@ -379,11 +386,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
if("Cyborg")//More rigging to make em' work and check if they're traitor.
new_character = new_character.Robotize()
if(new_character.mind.special_role=="traitor")
ticker.mode.add_law_zero(new_character)
SSticker.mode.add_law_zero(new_character)
if("AI")
new_character = new_character.AIize()
if(new_character.mind.special_role=="traitor")
ticker.mode.add_law_zero(new_character)
SSticker.mode.add_law_zero(new_character)
else
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
@@ -392,7 +399,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
//Power to the user!
if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
data_core.manifest_inject(new_character)
GLOB.data_core.manifest_inject(new_character)
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
AnnounceArrival(new_character, new_character.mind.assigned_role)
@@ -401,7 +408,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
to_chat(new_character, "You have been fully respawned. Enjoy the game.")
feedback_add_details("admin_verb","RSPCH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Respawn Character") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return new_character
/client/proc/cmd_admin_add_freeform_ai_law()
@@ -424,9 +431,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
ion.announceEvent = announce_ion_laws
ion.ionMessage = input
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Add Custom AI Law") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_rejuvenate(mob/living/M in mob_list)
/client/proc/cmd_admin_rejuvenate(mob/living/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "Rejuvenate"
if(!holder)
@@ -441,7 +448,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
message_admins("<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!</span>")
feedback_add_details("admin_verb","REJU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Rejuvinate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_create_centcom_report()
set category = "Special Verbs"
@@ -453,17 +460,20 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!input)
return
var/confirm = alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", "Yes", "No")
var/confirm = alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", "Yes", "No", "Cancel")
var/announce_command_report = TRUE
if(confirm == "Yes")
priority_announce(input, null, 'sound/AI/commandreport.ogg')
announce_command_report = FALSE
switch(confirm)
if("Yes")
priority_announce(input, null, 'sound/AI/commandreport.ogg')
announce_command_report = FALSE
if("Cancel")
return
print_command_report(input,"[confirm=="Yes" ? "" : "Classified "][command_name()] Update",announce=announce_command_report)
print_command_report(input, "[announce_command_report ? "Classified " : ""][command_name()] Update", announce_command_report)
log_admin("[key_name(src)] has created a command report: [input]")
message_admins("[key_name_admin(src)] has created a command report")
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Create Command Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_change_command_name()
set category = "Special Verbs"
@@ -489,7 +499,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if (alert(src, "Are you sure you want to delete:\n[O]\nat ([O.x], [O.y], [O.z])?", "Confirmation", "Yes", "No") == "Yes")
log_admin("[key_name(usr)] deleted [O] at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] deleted [O] at ([O.x],[O.y],[O.z])")
feedback_add_details("admin_verb","DEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(isturf(O))
var/turf/T = O
T.ChangeTurf(T.baseturf)
@@ -504,7 +514,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
to_chat(src, "Only administrators may use this command.")
return
holder.manage_free_slots()
feedback_add_details("admin_verb","MFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Manage Job Slots") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world)
set category = "Special Verbs"
@@ -533,7 +543,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
explosion(O, devastation, heavy, light, flash, null, null,flames)
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
feedback_add_details("admin_verb","EXPL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
else
return
@@ -556,13 +566,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
empulse(O, heavy, light)
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] created an EM PUlse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","EM Pulse") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
else
return
/client/proc/cmd_admin_gib(mob/M in mob_list)
/client/proc/cmd_admin_gib(mob/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "Gib"
@@ -587,7 +597,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
M.gib()
else
M.gib(1)
feedback_add_details("admin_verb","GIB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Gib") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_gib_self()
set name = "Gibself"
@@ -597,17 +607,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(confirm == "Yes")
log_admin("[key_name(usr)] used gibself.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used gibself.</span>")
feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Gib Self") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
mob.gib(1, 1, 1)
/client/proc/cmd_admin_check_contents(mob/living/M in mob_list)
/client/proc/cmd_admin_check_contents(mob/living/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "Check Contents"
var/list/L = M.get_contents()
for(var/t in L)
to_chat(usr, "[t]")
feedback_add_details("admin_verb","CC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Check Contents") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_view_range()
set category = "Special Verbs"
@@ -622,7 +632,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
log_admin("[key_name(usr)] changed their view range to [view].")
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI
feedback_add_details("admin_verb","CVRA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Change View Range|[view]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_call_shuttle()
@@ -641,7 +651,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
SSshuttle.emergency.request()
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Call Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>")
return
@@ -658,7 +668,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
SSshuttle.emergency.cancel()
feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Cancel Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-recalled the emergency shuttle.</span>")
@@ -669,7 +679,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Make Everyone Random"
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
if(ticker && ticker.mode)
if(SSticker && SSticker.mode)
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!")
return
@@ -693,7 +703,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.")
config.force_random_names = 1
feedback_add_details("admin_verb","MER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Make Everyone Random") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_random_events()
@@ -708,7 +718,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
config.allow_random_events = 0
to_chat(usr, "Random events disabled")
message_admins("Admin [key_name_admin(usr)] has disabled random events.")
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Toggle Random Events|[config.allow_random_events]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_change_sec_level()
@@ -726,9 +736,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
log_admin("[key_name(usr)] changed the security level to [level]")
message_admins("[key_name_admin(usr)] changed the security level to [level]")
feedback_add_details("admin_verb","CSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Set Security Level [capitalize(level)]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in nuke_list)
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list)
set name = "Toggle Nuke"
set category = "Fun"
set popup_menu = 0
@@ -745,9 +755,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
log_admin("[key_name(usr)] [N.timing ? "activated" : "deactivated"] a nuke at ([N.x],[N.y],[N.z]).")
message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_COORDJMP(N)].")
feedback_add_details("admin_verb","TN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Toggle Nuke|[N.timing]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/list/datum/outfit/custom_outfits = list() //Admin created outfits
GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
/client/proc/create_outfits()
set category = "Debug"
@@ -930,28 +940,31 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
if(!holder) return
var/datum/atom_hud/A = huds[ANTAG_HUD_TRAITOR]
var/adding_hud = (usr in A.hudusers) ? 0 : 1
var/adding_hud = !has_antag_hud()
for(var/datum/atom_hud/H in huds)
for(var/datum/atom_hud/H in GLOB.huds)
if(istype(H, /datum/atom_hud/antag))
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
for(var/datum/gang/G in ticker.mode.gangs)
for(var/datum/gang/G in SSticker.mode.gangs)
var/datum/atom_hud/antag/H = G.ganghud
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
to_chat(usr, "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"].")
message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
feedback_add_details("admin_verb","TAH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Toggle Antag HUD|[adding_hud]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/has_antag_hud()
var/datum/atom_hud/A = GLOB.huds[ANTAG_HUD_TRAITOR]
return mob in A.hudusers
/client/proc/open_shuttle_manipulator()
set category = "Admin"
set name = "Shuttle Manipulator"
set desc = "Opens the shuttle manipulator UI."
for(var/obj/machinery/shuttle_manipulator/M in machines)
for(var/obj/machinery/shuttle_manipulator/M in GLOB.machines)
M.ui_interact(usr)
/client/proc/mass_zombie_infection()
@@ -967,12 +980,12 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
if(confirm != "Yes")
return
for(var/mob/living/carbon/human/H in mob_list)
for(var/mob/living/carbon/human/H in GLOB.mob_list)
new /obj/item/organ/zombie_infection(H)
message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.")
log_admin("[key_name(usr)] added a latent zombie infection to all humans.")
feedback_add_details("admin_verb","MZI")
feedback_add_details("admin_verb","Mass Zombie Infection")
/client/proc/mass_zombie_cure()
set category = "Fun"
@@ -985,12 +998,12 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
if(confirm != "Yes")
return
for(var/obj/item/organ/zombie_infection/I in zombie_infection_list)
for(var/obj/item/organ/zombie_infection/I in GLOB.zombie_infection_list)
qdel(I)
message_admins("[key_name_admin(usr)] cured all zombies.")
log_admin("[key_name(usr)] cured all zombies.")
feedback_add_details("admin_verb","MZC")
feedback_add_details("admin_verb","Mass Zombie Cure")
/client/proc/polymorph_all()
set category = "Fun"
@@ -1004,12 +1017,12 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
if(confirm != "Yes")
return
var/list/mobs = shuffle(living_mob_list.Copy()) // might change while iterating
var/list/mobs = shuffle(GLOB.living_mob_list.Copy()) // might change while iterating
var/who_did_it = key_name_admin(usr)
message_admins("[key_name_admin(usr)] started polymorphed all living mobs.")
log_admin("[key_name(usr)] polymorphed all living mobs.")
feedback_add_details("admin_verb","MASSWABBAJACK")
feedback_add_details("admin_verb","Polymorph All")
for(var/mob/living/M in mobs)
CHECK_TICK
@@ -1038,30 +1051,30 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
if(!input)
return
if(!ticker)
if(!SSticker)
return
ticker.selected_tip = input
SSticker.selected_tip = input
// If we've already tipped, then send it straight away.
if(ticker.tipped)
ticker.send_tip_of_the_round()
if(SSticker.tipped)
SSticker.send_tip_of_the_round()
message_admins("[key_name_admin(usr)] sent a tip of the round.")
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.")
feedback_add_details("admin_verb","TIP")
feedback_add_details("admin_verb","Show Tip")
#define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None"))
/proc/mass_purrbation()
for(var/M in mob_list)
for(var/M in GLOB.mob_list)
if(ishumanbasic(M))
purrbation_apply(M)
CHECK_TICK
/proc/mass_remove_purrbation()
for(var/M in mob_list)
for(var/M in GLOB.mob_list)
if(ishumanbasic(M))
purrbation_remove(M)
CHECK_TICK
@@ -1110,7 +1123,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
/datum/admins/proc/modify_goals()
var/dat = ""
for(var/datum/station_goal/S in ticker.mode.station_goals)
for(var/datum/station_goal/S in SSticker.mode.station_goals)
dat += "[S.name] - <a href='?src=\ref[S];announce=1'>Announce</a> | <a href='?src=\ref[S];remove=1'>Remove</a><br>"
dat += "<br><a href='?src=\ref[src];add_station_goal=1'>Add New Goal</a>"
usr << browse(dat, "window=goals;size=400x400")
@@ -1127,4 +1140,34 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
if (world.visibility && !world.reachable)
message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.")
feedback_add_details("admin_verb","HUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_toggle","Toggled Hub Visibility|[world.visibility]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/smite(mob/living/carbon/human/target as mob)
set name = "Smite"
set category = "Fun"
if(!holder)
return
var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_BSA)
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
if(QDELETED(target) || !punishment)
return
switch(punishment)
if(ADMIN_PUNISHMENT_LIGHTNING)
var/turf/T = get_step(get_step(target, NORTH), NORTH)
T.Beam(target, icon_state="lightning[rand(1,12)]", time = 5)
target.adjustFireLoss(75)
target.electrocution_animation(40)
to_chat(target, "<span class='userdanger'>The gods have punished you for your sins!</span>")
if(ADMIN_PUNISHMENT_BRAINDAMAGE)
target.adjustBrainLoss(75)
if(ADMIN_PUNISHMENT_GIB)
target.gib(FALSE)
if(ADMIN_PUNISHMENT_BSA)
bluespace_artillery(target)
message_admins("[key_name_admin(usr)] punished [key_name_admin(target)] with [punishment].")
log_admin("[key_name(usr)] punished [key_name(target)] with [punishment].")

View File

@@ -5,7 +5,7 @@
to_chat(usr, "<span class='adminnotice'>The Database is not enabled!</span>")
return
if (dbcon && dbcon.IsConnected())
if (GLOB.dbcon && GLOB.dbcon.IsConnected())
if (!check_rights(R_DEBUG,0))
alert("The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
return
@@ -14,17 +14,17 @@
if (reconnect != "Force Reconnect")
return
dbcon.Disconnect()
GLOB.dbcon.Disconnect()
log_admin("[key_name(usr)] has forced the database to disconnect")
message_admins("[key_name_admin(usr)] has <b>forced</b> the database to disconnect!")
feedback_add_details("admin_verb","FRDB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Force Reestablished Database Connection") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] is attempting to re-established the DB Connection")
message_admins("[key_name_admin(usr)] is attempting to re-established the DB Connection")
feedback_add_details("admin_verb","RDB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","Reestablished Database Connection") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
dbcon.failed_connections = 0
if(!dbcon.Connect())
message_admins("Database connection failed: " + dbcon.ErrorMsg())
GLOB.dbcon.failed_connections = 0
if(!GLOB.dbcon.Connect())
message_admins("Database connection failed: " + GLOB.dbcon.ErrorMsg())
else
message_admins("Database connection re-established")

View File

@@ -2,7 +2,7 @@
set category = "Fun"
set name = "Create AI Triumvirate"
if(ticker.current_state > GAME_STATE_PREGAME)
if(SSticker.current_state > GAME_STATE_PREGAME)
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.")
return
@@ -10,11 +10,11 @@
if(!job)
to_chat(usr, "Unable to locate the AI job")
return
if(ticker.triai)
ticker.triai = 0
if(SSticker.triai)
SSticker.triai = 0
to_chat(usr, "Only one AI will be spawned at round start.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has toggled off triple AIs at round start.</span>")
else
ticker.triai = 1
SSticker.triai = 1
to_chat(usr, "There will be an AI Triumvirate at round start.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has toggled on triple AIs at round start.</span>")

View File

@@ -1,22 +1,23 @@
#define WHITELISTFILE "config/whitelist.txt"
var/list/whitelist
GLOBAL_LIST(whitelist)
GLOBAL_PROTECT(whitelist)
/proc/load_whitelist()
whitelist = list()
GLOB.whitelist = list()
for(var/line in file2list(WHITELISTFILE))
if(!line)
continue
if(findtextEx(line,"#",1,2))
continue
whitelist += line
GLOB.whitelist += line
if(!whitelist.len)
whitelist = null
if(!GLOB.whitelist.len)
GLOB.whitelist = null
/proc/check_whitelist(var/ckey)
if(!whitelist)
if(!GLOB.whitelist)
return FALSE
. = (ckey in whitelist)
. = (ckey in GLOB.whitelist)
#undef WHITELISTFILE