mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Fix conflicts
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
if(!available_vr_spawnpoints || !available_vr_spawnpoints.len) //(re)build spawnpoint lists
|
||||
available_vr_spawnpoints = list()
|
||||
for(var/obj/effect/landmark/vr_spawn/V in landmarks_list)
|
||||
for(var/obj/effect/landmark/vr_spawn/V in GLOB.landmarks_list)
|
||||
available_vr_spawnpoints[V.vr_category] = list()
|
||||
var/turf/T = get_turf(V)
|
||||
if(T)
|
||||
@@ -80,7 +80,7 @@
|
||||
ui_interact(occupant)
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
/obj/machinery/vr_sleeper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "vr_sleeper", "VR Sleeper", 475, 340, master_ui, state)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
+42
-44
@@ -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)"
|
||||
@@ -189,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>"
|
||||
@@ -205,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
|
||||
@@ -245,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
|
||||
@@ -280,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)
|
||||
@@ -291,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>"
|
||||
@@ -329,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)
|
||||
@@ -338,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>"
|
||||
@@ -359,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"
|
||||
@@ -389,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 += {"
|
||||
@@ -461,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
|
||||
GLOB.admin_notice = new_admin_notice
|
||||
return
|
||||
|
||||
/datum/admins/proc/toggleooc()
|
||||
@@ -490,7 +488,7 @@ var/global/BSACooldown = 0
|
||||
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.")
|
||||
@@ -529,8 +527,8 @@ 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>")
|
||||
@@ -556,13 +554,13 @@ var/global/BSACooldown = 0
|
||||
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!
|
||||
|
||||
@@ -585,11 +583,11 @@ var/global/BSACooldown = 0
|
||||
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!
|
||||
|
||||
/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
|
||||
@@ -638,7 +636,7 @@ var/global/BSACooldown = 0
|
||||
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/datum/admins/proc/show_traitor_panel(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"
|
||||
@@ -658,8 +656,8 @@ var/global/BSACooldown = 0
|
||||
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>")
|
||||
@@ -671,18 +669,18 @@ var/global/BSACooldown = 0
|
||||
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>")
|
||||
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_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
var/ai_number = 0
|
||||
for(var/mob/living/silicon/S in mob_list)
|
||||
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>")
|
||||
@@ -770,7 +768,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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,7 +23,10 @@ var/list/admin_verbs_default = list(
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/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
|
||||
@@ -66,17 +72,14 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/resetSNPC, /* Resets any interactive crewmembers in the world */
|
||||
/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,
|
||||
@@ -99,11 +102,12 @@ var/list/admin_verbs_fun = list(
|
||||
/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,
|
||||
@@ -119,9 +123,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,
|
||||
@@ -155,20 +161,18 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/view_runtimes,
|
||||
/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,
|
||||
@@ -245,31 +249,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 += 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
|
||||
@@ -278,19 +282,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,
|
||||
@@ -316,7 +320,7 @@ 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>")
|
||||
@@ -437,10 +441,10 @@ var/list/admin_verbs_hideable = list(
|
||||
|
||||
/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()
|
||||
@@ -448,11 +452,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"
|
||||
@@ -501,7 +505,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)
|
||||
@@ -515,7 +519,7 @@ 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
|
||||
@@ -543,7 +547,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()
|
||||
@@ -552,7 +556,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()
|
||||
@@ -563,18 +567,18 @@ 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)
|
||||
@@ -591,7 +595,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."
|
||||
@@ -604,11 +608,11 @@ var/list/admin_verbs_hideable = list(
|
||||
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!
|
||||
|
||||
/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!
|
||||
@@ -666,8 +670,8 @@ var/list/admin_verbs_hideable = list(
|
||||
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>")
|
||||
@@ -685,7 +689,7 @@ 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>")
|
||||
@@ -708,7 +712,7 @@ var/list/admin_verbs_hideable = list(
|
||||
j = 100
|
||||
|
||||
do
|
||||
area = pick(the_station_areas)
|
||||
area = pick(GLOB.the_station_areas)
|
||||
|
||||
if (area)
|
||||
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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), ";")
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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), ";")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
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'>[SSticker.delay_end ? "End Round Normally" : "Delay Round End"]</a>"
|
||||
var/connected_players = clients.len
|
||||
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++
|
||||
@@ -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))
|
||||
@@ -441,7 +441,7 @@
|
||||
dat += "</table>"
|
||||
|
||||
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/start_state.num_territories)*100, 1)]% Control</B></td><td></td></tr>"
|
||||
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)
|
||||
@@ -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)
|
||||
@@ -591,7 +591,7 @@
|
||||
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(SSticker.mode, /datum/game_mode/blob) || blob_minds.len)
|
||||
@@ -599,7 +599,7 @@
|
||||
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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
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
|
||||
@@ -352,7 +352,7 @@
|
||||
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)
|
||||
@@ -365,7 +365,7 @@
|
||||
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 player_list)
|
||||
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
|
||||
@@ -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,7 +415,7 @@
|
||||
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")
|
||||
@@ -424,7 +424,7 @@
|
||||
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")
|
||||
@@ -450,7 +450,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 +477,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 +487,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")
|
||||
@@ -545,7 +545,7 @@
|
||||
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 +577,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))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/proc/create_message(type, target_ckey, admin_ckey, text, timestamp, server, secret, logged = 1, browse)
|
||||
if(!dbcon.Connect())
|
||||
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.Connect())
|
||||
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.Connect())
|
||||
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.Connect())
|
||||
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.Connect())
|
||||
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.Connect())
|
||||
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())
|
||||
|
||||
+80
-80
@@ -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
|
||||
|
||||
@@ -242,7 +242,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
|
||||
@@ -466,8 +466,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()
|
||||
@@ -483,14 +483,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
|
||||
|
||||
@@ -498,12 +498,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)
|
||||
@@ -518,12 +518,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()
|
||||
|
||||
@@ -599,8 +599,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))
|
||||
@@ -618,8 +618,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))
|
||||
@@ -637,8 +637,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))
|
||||
@@ -656,8 +656,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))
|
||||
@@ -675,8 +675,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))
|
||||
@@ -694,8 +694,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))
|
||||
@@ -713,8 +713,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))
|
||||
@@ -732,8 +732,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))
|
||||
@@ -880,42 +880,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
|
||||
@@ -1109,7 +1109,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())
|
||||
@@ -1196,7 +1196,7 @@
|
||||
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"])
|
||||
@@ -1205,13 +1205,13 @@
|
||||
|
||||
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"])
|
||||
@@ -1220,12 +1220,12 @@
|
||||
|
||||
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"])
|
||||
@@ -1234,11 +1234,11 @@
|
||||
|
||||
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))
|
||||
|
||||
@@ -1313,7 +1313,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!")
|
||||
@@ -1363,7 +1363,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)")
|
||||
@@ -1389,7 +1389,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)")
|
||||
@@ -1412,7 +1412,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.)")
|
||||
@@ -1442,7 +1442,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.)")
|
||||
@@ -1579,7 +1579,7 @@
|
||||
output_devil_info(M)
|
||||
|
||||
else if(href_list["adminmoreinfo"])
|
||||
var/mob/M = locate(href_list["adminmoreinfo"]) in mob_list
|
||||
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
|
||||
@@ -1714,7 +1714,7 @@
|
||||
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
|
||||
@@ -1722,7 +1722,7 @@
|
||||
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
|
||||
@@ -1808,7 +1808,7 @@
|
||||
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
|
||||
@@ -1818,7 +1818,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/living/L = locate(href_list["languagemenu"]) in mob_list
|
||||
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
|
||||
@@ -1996,7 +1996,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
|
||||
@@ -2005,7 +2005,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
|
||||
@@ -2013,7 +2013,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()
|
||||
@@ -2028,11 +2028,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]!")
|
||||
@@ -2056,12 +2056,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()
|
||||
|
||||
@@ -2085,10 +2085,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()
|
||||
@@ -2096,7 +2096,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()
|
||||
|
||||
@@ -2219,14 +2219,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]\".")
|
||||
|
||||
@@ -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
|
||||
@@ -80,7 +80,7 @@
|
||||
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
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
//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)
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
/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)" : ""]"
|
||||
|
||||
|
||||
@@ -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"
|
||||
@@ -38,7 +38,7 @@
|
||||
feedback_add_details("admin_verb","JT") //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"
|
||||
|
||||
@@ -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)
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
feedback_add_details("admin_verb","JK") //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"
|
||||
@@ -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)
|
||||
@@ -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))))
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -72,7 +72,7 @@
|
||||
if(whom == "IRCKEY")
|
||||
irc = 1
|
||||
else
|
||||
C = directory[whom]
|
||||
C = GLOB.directory[whom]
|
||||
else if(istype(whom,/client))
|
||||
C = whom
|
||||
if(irc)
|
||||
@@ -177,13 +177,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)]->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)]->[key_name(C, X, 0)]:</B> \blue [keywordparsedmsg]</font>" )
|
||||
|
||||
@@ -192,7 +192,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"
|
||||
@@ -229,12 +229,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
|
||||
|
||||
@@ -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!
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
feedback_add_details("admin_verb","CP") //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)])")
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return
|
||||
feedback_add_details("admin_verb","CPOW") //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]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/client/proc/bluespace_artillery(mob/M in mob_list)
|
||||
/client/proc/bluespace_artillery(mob/M in GLOB.mob_list)
|
||||
if(!holder || !check_rights(R_FUN))
|
||||
return
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
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
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
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.")
|
||||
|
||||
@@ -171,13 +171,13 @@ 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!
|
||||
|
||||
/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"
|
||||
|
||||
@@ -193,7 +193,7 @@ 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"
|
||||
|
||||
@@ -211,7 +211,7 @@ 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"
|
||||
|
||||
@@ -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
|
||||
@@ -259,7 +259,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
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!
|
||||
|
||||
/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"
|
||||
|
||||
@@ -276,7 +276,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
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"
|
||||
|
||||
@@ -293,40 +293,39 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
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]/"))
|
||||
@@ -388,7 +387,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
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!
|
||||
|
||||
/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"
|
||||
|
||||
@@ -428,7 +427,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
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"
|
||||
@@ -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,7 +572,7 @@ 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]
|
||||
@@ -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
|
||||
|
||||
@@ -757,11 +756,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>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] [GLOB.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.")
|
||||
log_admin("[key_name(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
|
||||
|
||||
/client/proc/view_runtimes()
|
||||
set category = "Debug"
|
||||
@@ -771,7 +770,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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,8 +85,8 @@
|
||||
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
|
||||
@@ -99,8 +99,8 @@
|
||||
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
|
||||
|
||||
@@ -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,7 +76,7 @@ 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)
|
||||
@@ -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>
|
||||
@@ -129,6 +129,7 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
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
|
||||
@@ -153,8 +154,8 @@ 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")
|
||||
@@ -167,13 +168,13 @@ 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)
|
||||
verbs.Add(/client/proc/disable_debug_verbs, GLOB.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!
|
||||
|
||||
/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!
|
||||
|
||||
@@ -249,13 +250,13 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
|
||||
|
||||
//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.")
|
||||
|
||||
@@ -37,16 +37,16 @@
|
||||
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
|
||||
|
||||
@@ -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
|
||||
@@ -527,16 +531,16 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
|
||||
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")
|
||||
|
||||
@@ -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)
|
||||
@@ -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,15 +309,15 @@
|
||||
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()
|
||||
|
||||
@@ -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,7 +382,7 @@
|
||||
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()
|
||||
SSticker.mode.gangs += newgang
|
||||
H.mind.make_Gang(newgang)
|
||||
@@ -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()
|
||||
@@ -467,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--
|
||||
@@ -480,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)
|
||||
@@ -511,7 +511,7 @@
|
||||
|
||||
//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()
|
||||
|
||||
|
||||
@@ -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(!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()
|
||||
@@ -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
|
||||
@@ -83,7 +83,7 @@ var/highlander = FALSE
|
||||
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
|
||||
|
||||
|
||||
@@ -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!
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
|
||||
var/sound/admin_sound
|
||||
|
||||
/client/proc/play_sound(S as sound)
|
||||
set category = "Fun"
|
||||
set name = "Play Global Sound"
|
||||
@@ -24,7 +21,7 @@ var/sound/admin_sound
|
||||
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
|
||||
|
||||
@@ -65,7 +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!
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
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!
|
||||
|
||||
/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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -49,20 +49,20 @@
|
||||
/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_SMITE(Sender)] [ADMIN_CENTCOM_REPLY(Sender)]:</b> [msg]</span>"
|
||||
to_chat(admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
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_SMITE(Sender)] [ADMIN_SYNDICATE_REPLY(Sender)]:</b> [msg]</span>"
|
||||
to_chat(admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
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_SMITE(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)
|
||||
to_chat(GLOB.admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in GLOB.machines)
|
||||
C.overrideCooldown()
|
||||
|
||||
@@ -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)
|
||||
@@ -19,7 +19,7 @@
|
||||
feedback_add_details("admin_verb","DEVR") //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"
|
||||
|
||||
@@ -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
|
||||
@@ -107,7 +107,7 @@
|
||||
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!
|
||||
|
||||
/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)
|
||||
@@ -147,7 +147,7 @@
|
||||
if(istype(whom, /client))
|
||||
C = whom
|
||||
else if(istext(whom))
|
||||
C = directory[whom]
|
||||
C = GLOB.directory[whom]
|
||||
else
|
||||
return
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
if(C)
|
||||
P = C.prefs
|
||||
else
|
||||
P = preferences_datums[whom]
|
||||
P = GLOB.preferences_datums[whom]
|
||||
if(!P)
|
||||
return
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
/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 +212,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 +251,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 +265,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 +296,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 +305,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"]
|
||||
@@ -354,7 +354,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
|
||||
SSticker.mode.equip_traitor(new_character)
|
||||
if("Wizard")
|
||||
new_character.loc = pick(wizardstart)
|
||||
new_character.loc = pick(GLOB.wizardstart)
|
||||
//SSticker.mode.learn_basic_spells(new_character)
|
||||
SSticker.mode.equip_wizard(new_character)
|
||||
if("Syndicate")
|
||||
@@ -364,7 +364,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()
|
||||
@@ -392,7 +392,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)
|
||||
@@ -426,7 +426,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
feedback_add_details("admin_verb","IONC") //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)
|
||||
@@ -565,7 +565,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
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"
|
||||
|
||||
@@ -603,7 +603,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
feedback_add_details("admin_verb","GIBS") //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"
|
||||
|
||||
@@ -731,7 +731,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
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!
|
||||
|
||||
/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
|
||||
@@ -750,7 +750,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
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!
|
||||
|
||||
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"
|
||||
@@ -935,7 +935,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
|
||||
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)
|
||||
|
||||
@@ -949,7 +949,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
feedback_add_details("admin_verb","TAH") //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 = huds[ANTAG_HUD_TRAITOR]
|
||||
var/datum/atom_hud/A = GLOB.huds[ANTAG_HUD_TRAITOR]
|
||||
return mob in A.hudusers
|
||||
|
||||
/client/proc/open_shuttle_manipulator()
|
||||
@@ -957,7 +957,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
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()
|
||||
@@ -973,7 +973,7 @@ 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.")
|
||||
@@ -991,7 +991,7 @@ 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.")
|
||||
@@ -1010,7 +1010,7 @@ 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.")
|
||||
@@ -1061,13 +1061,13 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
#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
|
||||
|
||||
@@ -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,7 +14,7 @@
|
||||
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!
|
||||
@@ -23,8 +23,8 @@
|
||||
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!
|
||||
|
||||
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")
|
||||
@@ -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
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
if((istype(W, /obj/item/weapon/weldingtool) && W:welding))
|
||||
if(!status)
|
||||
status = 1
|
||||
bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
|
||||
GLOB.bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
|
||||
message_admins("[key_name_admin(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]")
|
||||
to_chat(user, "<span class='notice'>A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.</span>")
|
||||
else
|
||||
status = 0
|
||||
bombers += "[key_name(user)] unwelded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
|
||||
GLOB.bombers += "[key_name(user)] unwelded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
|
||||
to_chat(user, "<span class='notice'>The hole has been closed.</span>")
|
||||
add_fingerprint(user)
|
||||
..()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/obj/item/device/assembly/control/activate()
|
||||
cooldown = 1
|
||||
var/openclose
|
||||
for(var/obj/machinery/door/poddoor/M in machines)
|
||||
for(var/obj/machinery/door/poddoor/M in GLOB.machines)
|
||||
if(M.id == src.id)
|
||||
if(openclose == null)
|
||||
openclose = M.density
|
||||
@@ -49,7 +49,7 @@
|
||||
cooldown = 1
|
||||
var/doors_need_closing = FALSE
|
||||
var/list/obj/machinery/door/airlock/open_or_close = list()
|
||||
for(var/obj/machinery/door/airlock/D in airlocks)
|
||||
for(var/obj/machinery/door/airlock/D in GLOB.airlocks)
|
||||
if(D.id_tag == src.id)
|
||||
if(specialfunctions & OPEN)
|
||||
open_or_close += D
|
||||
@@ -84,20 +84,20 @@
|
||||
|
||||
/obj/item/device/assembly/control/massdriver/activate()
|
||||
cooldown = 1
|
||||
for(var/obj/machinery/door/poddoor/M in machines)
|
||||
for(var/obj/machinery/door/poddoor/M in GLOB.machines)
|
||||
if (M.id == src.id)
|
||||
spawn( 0 )
|
||||
M.open()
|
||||
|
||||
sleep(10)
|
||||
|
||||
for(var/obj/machinery/mass_driver/M in machines)
|
||||
for(var/obj/machinery/mass_driver/M in GLOB.machines)
|
||||
if(M.id == src.id)
|
||||
M.drive()
|
||||
|
||||
sleep(60)
|
||||
|
||||
for(var/obj/machinery/door/poddoor/M in machines)
|
||||
for(var/obj/machinery/door/poddoor/M in GLOB.machines)
|
||||
if (M.id == src.id)
|
||||
spawn( 0 )
|
||||
M.close()
|
||||
@@ -112,12 +112,12 @@
|
||||
|
||||
/obj/item/device/assembly/control/igniter/activate()
|
||||
cooldown = 1
|
||||
for(var/obj/machinery/sparker/M in machines)
|
||||
for(var/obj/machinery/sparker/M in GLOB.machines)
|
||||
if (M.id == src.id)
|
||||
spawn( 0 )
|
||||
M.ignite()
|
||||
|
||||
for(var/obj/machinery/igniter/M in machines)
|
||||
for(var/obj/machinery/igniter/M in GLOB.machines)
|
||||
if(M.id == src.id)
|
||||
M.use_power(50)
|
||||
M.on = !M.on
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
/obj/item/device/assembly/control/flasher/activate()
|
||||
cooldown = 1
|
||||
for(var/obj/machinery/flasher/M in machines)
|
||||
for(var/obj/machinery/flasher/M in GLOB.machines)
|
||||
if(M.id == src.id)
|
||||
spawn(0)
|
||||
M.flash()
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
/obj/item/device/assembly/control/crematorium/activate()
|
||||
cooldown = 1
|
||||
for (var/obj/structure/bodycontainer/crematorium/C in crematoriums)
|
||||
for (var/obj/structure/bodycontainer/crematorium/C in GLOB.crematoriums)
|
||||
if (C.id == id)
|
||||
C.cremate(usr)
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ Code:
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
var/turf/T = get_turf(src)
|
||||
if(usr)
|
||||
lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
|
||||
GLOB.lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
|
||||
|
||||
|
||||
return
|
||||
@@ -153,7 +153,7 @@ Code:
|
||||
return
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_CHAT)
|
||||
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_CHAT)
|
||||
return
|
||||
|
||||
// Embedded signaller used in grenade construction.
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
if(timing && istype(holder, /obj/item/device/transfer_valve))
|
||||
var/timer_message = "[key_name_admin(usr)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) activated [src] attachment on [holder]."
|
||||
message_admins(timer_message)
|
||||
bombers += timer_message
|
||||
GLOB.bombers += timer_message
|
||||
log_game("[key_name(usr)] activated [src] attachment for [loc]")
|
||||
update_icon()
|
||||
if(href_list["repeat"])
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
..()
|
||||
SSair.hotspots += src
|
||||
perform_exposure()
|
||||
setDir(pick(cardinal))
|
||||
setDir(pick(GLOB.cardinal))
|
||||
air_update_turf()
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/turf/proc/CalculateAdjacentTurfs()
|
||||
var/list/atmos_adjacent_turfs = src.atmos_adjacent_turfs
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/T = get_step(src, direction)
|
||||
if(!T)
|
||||
continue
|
||||
@@ -72,11 +72,11 @@
|
||||
|
||||
var/turf/curloc = src
|
||||
|
||||
for (var/direction in diagonals)
|
||||
for (var/direction in GLOB.diagonals)
|
||||
var/matchingDirections = 0
|
||||
var/turf/S = get_step(curloc, direction)
|
||||
|
||||
for (var/checkDirection in cardinal)
|
||||
for (var/checkDirection in GLOB.cardinal)
|
||||
var/turf/checkTurf = get_step(S, checkDirection)
|
||||
if(!S.atmos_adjacent_turfs || !S.atmos_adjacent_turfs[checkTurf])
|
||||
continue
|
||||
|
||||
@@ -364,7 +364,7 @@
|
||||
/turf/open/conductivity_directions()
|
||||
if(blocks_air)
|
||||
return ..()
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/T = get_step(src, direction)
|
||||
if(!(T in atmos_adjacent_turfs) && !(atmos_supeconductivity & direction))
|
||||
. |= direction
|
||||
@@ -393,7 +393,7 @@
|
||||
|
||||
if(conductivity_directions)
|
||||
//Conduct with tiles around me
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(conductivity_directions & direction)
|
||||
var/turf/neighbor = get_step(src,direction)
|
||||
|
||||
|
||||
@@ -7,22 +7,22 @@ What are the archived variables for?
|
||||
#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that
|
||||
once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */
|
||||
|
||||
var/list/meta_gas_info = meta_gas_list() //see ATMOSPHERICS/gas_types.dm
|
||||
var/list/gaslist_cache = init_gaslist_cache()
|
||||
GLOBAL_LIST_INIT(meta_gas_info, meta_gas_list()) //see ATMOSPHERICS/gas_types.dm
|
||||
GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
|
||||
|
||||
/proc/init_gaslist_cache()
|
||||
. = list()
|
||||
for(var/id in meta_gas_info)
|
||||
for(var/id in GLOB.meta_gas_info)
|
||||
var/list/cached_gas = new(3)
|
||||
|
||||
.[id] = cached_gas
|
||||
|
||||
cached_gas[MOLES] = 0
|
||||
cached_gas[ARCHIVE] = 0
|
||||
cached_gas[GAS_META] = meta_gas_info[id]
|
||||
cached_gas[GAS_META] = GLOB.meta_gas_info[id]
|
||||
|
||||
#define GASLIST(id, out_list)\
|
||||
var/list/tmp_gaslist = gaslist_cache[id];\
|
||||
var/list/tmp_gaslist = GLOB.gaslist_cache[id];\
|
||||
out_list = tmp_gaslist.Copy();
|
||||
|
||||
/datum/gas_mixture
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/hardcoded_gases = list("o2","n2","co2","plasma") //the main four gases, which were at one time hardcoded
|
||||
GLOBAL_LIST_INIT(hardcoded_gases, list("o2","n2","co2","plasma")) //the main four gases, which were at one time hardcoded
|
||||
|
||||
/proc/meta_gas_list()
|
||||
. = new /list
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
idle_power_usage = 4
|
||||
active_power_usage = 8
|
||||
power_channel = ENVIRON
|
||||
req_access = list(access_atmospherics)
|
||||
req_access = list(GLOB.access_atmospherics)
|
||||
obj_integrity = 250
|
||||
max_integrity = 250
|
||||
integrity_failure = 80
|
||||
@@ -158,7 +158,7 @@
|
||||
return UI_CLOSE
|
||||
|
||||
/obj/machinery/airalarm/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "airalarm", name, 440, 650, master_ui, state)
|
||||
@@ -277,11 +277,11 @@
|
||||
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max1", "selected" = selected.max1))
|
||||
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max2", "selected" = selected.max2))
|
||||
|
||||
for(var/gas_id in meta_gas_info)
|
||||
for(var/gas_id in GLOB.meta_gas_info)
|
||||
if(!(gas_id in TLV)) // We're not interested in this gas, it seems.
|
||||
continue
|
||||
selected = TLV[gas_id]
|
||||
thresholds += list(list("name" = meta_gas_info[gas_id][META_GAS_NAME], "settings" = list()))
|
||||
thresholds += list(list("name" = GLOB.meta_gas_info[gas_id][META_GAS_NAME], "settings" = list()))
|
||||
thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min2", "selected" = selected.min2))
|
||||
thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min1", "selected" = selected.min1))
|
||||
thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max1", "selected" = selected.max1))
|
||||
@@ -389,7 +389,7 @@
|
||||
/obj/machinery/airalarm/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_TO_AIRALARM)
|
||||
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_TO_AIRALARM)
|
||||
|
||||
/obj/machinery/airalarm/proc/send_signal(target, list/command)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise
|
||||
if(!radio_connection)
|
||||
@@ -403,7 +403,7 @@
|
||||
signal.data["tag"] = target
|
||||
signal.data["sigtype"] = "command"
|
||||
|
||||
radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM)
|
||||
radio_connection.post_signal(src, signal, GLOB.RADIO_FROM_AIRALARM)
|
||||
// to_chat(world, text("Signal [] Broadcasted to []", command, target))
|
||||
|
||||
return 1
|
||||
|
||||
@@ -67,7 +67,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
node_connects.len = device_type
|
||||
|
||||
for(DEVICE_TYPE_LOOP)
|
||||
for(var/D in cardinal)
|
||||
for(var/D in GLOB.cardinal)
|
||||
if(D & GetInitDirections())
|
||||
if(D in node_connects)
|
||||
continue
|
||||
@@ -170,7 +170,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
var/fuck_you_dir = get_dir(src, user) // Because fuck you...
|
||||
if(!fuck_you_dir)
|
||||
fuck_you_dir = pick(cardinal)
|
||||
fuck_you_dir = pick(GLOB.cardinal)
|
||||
var/turf/target = get_edge_target_turf(user, fuck_you_dir)
|
||||
var/range = pressures/250
|
||||
var/speed = range/5
|
||||
@@ -245,7 +245,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
var/obj/machinery/atmospherics/target_move = findConnecting(direction)
|
||||
if(target_move)
|
||||
if(target_move.can_crawl_through())
|
||||
if(is_type_in_list(target_move, ventcrawl_machinery))
|
||||
if(is_type_in_list(target_move, GLOB.ventcrawl_machinery))
|
||||
user.forceMove(target_move.loc) //handle entering and so on.
|
||||
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>","<span class='notice'>You climb out the ventilation system.")
|
||||
else
|
||||
@@ -258,7 +258,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
user.last_played_vent = world.time
|
||||
playsound(src, 'sound/machines/ventcrawl.ogg', 50, 1, -3)
|
||||
else
|
||||
if((direction & initialize_directions) || is_type_in_list(src, ventcrawl_machinery) && can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
|
||||
if((direction & initialize_directions) || is_type_in_list(src, GLOB.ventcrawl_machinery) && can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
|
||||
user.forceMove(src.loc)
|
||||
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>","<span class='notice'>You climb out the ventilation system.")
|
||||
user.canmove = 0
|
||||
@@ -267,7 +267,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/AltClick(mob/living/L)
|
||||
if(is_type_in_list(src, ventcrawl_machinery))
|
||||
if(is_type_in_list(src, GLOB.ventcrawl_machinery))
|
||||
L.handle_ventcrawl(src)
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -126,7 +126,7 @@ Acts like a normal vent, but has an input AND output.
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
if(frequency)
|
||||
radio_connection = SSradio.add_object(src, frequency, filter = RADIO_ATMOSIA)
|
||||
radio_connection = SSradio.add_object(src, frequency, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
@@ -147,7 +147,7 @@ Acts like a normal vent, but has an input AND output.
|
||||
"external" = external_pressure_bound,
|
||||
"sigtype" = "status"
|
||||
)
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ Passive gate is similar to the regular pump except:
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
if(frequency)
|
||||
radio_connection = SSradio.add_object(src, frequency, filter = RADIO_ATMOSIA)
|
||||
radio_connection = SSradio.add_object(src, frequency, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
@@ -88,12 +88,12 @@ Passive gate is similar to the regular pump except:
|
||||
"sigtype" = "status"
|
||||
)
|
||||
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_pump", name, 335, 115, master_ui, state)
|
||||
|
||||
@@ -77,7 +77,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
if(frequency)
|
||||
radio_connection = SSradio.add_object(src, frequency, filter = RADIO_ATMOSIA)
|
||||
radio_connection = SSradio.add_object(src, frequency, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
@@ -95,12 +95,12 @@ Thus, the two variables affect pump operation are set in New():
|
||||
"sigtype" = "status"
|
||||
)
|
||||
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_pump", name, 335, 115, master_ui, state)
|
||||
|
||||
@@ -95,7 +95,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_pump", name, 310, 115, master_ui, state)
|
||||
|
||||
@@ -31,7 +31,7 @@ Iconnery
|
||||
|
||||
/obj/machinery/atmospherics/components/proc/icon_addbroken(var/connected = 0)
|
||||
var/unconnected = (~connected) & initialize_directions
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(unconnected & direction)
|
||||
underlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_exposed", direction)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
if(frequency)
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
|
||||
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/Destroy()
|
||||
if(SSradio)
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/update_icon()
|
||||
cut_overlays()
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(direction & initialize_directions)
|
||||
var/obj/machinery/atmospherics/node = findConnecting(direction)
|
||||
if(node)
|
||||
@@ -113,7 +113,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_filter", name, 475, 155, master_ui, state)
|
||||
@@ -154,9 +154,9 @@
|
||||
filter_type = ""
|
||||
var/filter_name = "nothing"
|
||||
var/gas = params["mode"]
|
||||
if(gas in meta_gas_info)
|
||||
if(gas in GLOB.meta_gas_info)
|
||||
filter_type = gas
|
||||
filter_name = meta_gas_info[gas][META_GAS_NAME]
|
||||
filter_name = GLOB.meta_gas_info[gas][META_GAS_NAME]
|
||||
investigate_log("was set to filter [filter_name] by [key_name(usr)]", "atmos")
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/mixer/update_icon()
|
||||
cut_overlays()
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(direction & initialize_directions)
|
||||
var/obj/machinery/atmospherics/node = findConnecting(direction)
|
||||
if(node)
|
||||
@@ -117,7 +117,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/mixer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_mixer", name, 370, 165, master_ui, state)
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = notcontained_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "cryo", name, 400, 550, master_ui, state)
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
return UI_CLOSE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/thermomachine/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "thermomachine", name, 400, 240, master_ui, state)
|
||||
|
||||
@@ -178,8 +178,8 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/atmosinit()
|
||||
//some vents work his own spesial way
|
||||
radio_filter_in = frequency==1439?(RADIO_FROM_AIRALARM):null
|
||||
radio_filter_out = frequency==1439?(RADIO_TO_AIRALARM):null
|
||||
radio_filter_in = frequency==1439?(GLOB.RADIO_FROM_AIRALARM):null
|
||||
radio_filter_out = frequency==1439?(GLOB.RADIO_TO_AIRALARM):null
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
broadcast_status()
|
||||
|
||||
@@ -142,8 +142,8 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/atmosinit()
|
||||
radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null
|
||||
radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null
|
||||
radio_filter_in = frequency==initial(frequency)?(GLOB.RADIO_FROM_AIRALARM):null
|
||||
radio_filter_out = frequency==initial(frequency)?(GLOB.RADIO_TO_AIRALARM):null
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
broadcast_status()
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
reconcile_air()
|
||||
update = air.react()
|
||||
|
||||
var/pipenetwarnings = 10
|
||||
|
||||
/datum/pipeline/proc/build_pipeline(obj/machinery/atmospherics/base)
|
||||
var/volume = 0
|
||||
if(istype(base, /obj/machinery/atmospherics/pipe))
|
||||
@@ -57,6 +55,7 @@ var/pipenetwarnings = 10
|
||||
if(!members.Find(item))
|
||||
|
||||
if(item.parent)
|
||||
var/static/pipenetwarnings = 10
|
||||
if(pipenetwarnings > 0)
|
||||
warning("build_pipeline(): [item.type] added to a pipenet while still having one. (pipes leading to the same spot stacking in one turf) Nearby: ([item.x], [item.y], [item.z])")
|
||||
pipenetwarnings -= 1
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
device_type = BINARY
|
||||
|
||||
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/SetInitDirections()
|
||||
if(dir in diagonals)
|
||||
if(dir in GLOB.diagonals)
|
||||
initialize_directions_he = dir
|
||||
switch(dir)
|
||||
if(NORTH,SOUTH)
|
||||
|
||||
@@ -16,7 +16,7 @@ The regular pipe you see everywhere, including bent ones.
|
||||
device_type = BINARY
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/SetInitDirections()
|
||||
if(dir in diagonals)
|
||||
if(dir in GLOB.diagonals)
|
||||
initialize_directions = dir
|
||||
switch(dir)
|
||||
if(NORTH,SOUTH)
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = physical_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "canister", name, 420, 405, master_ui, state)
|
||||
@@ -364,7 +364,7 @@
|
||||
if("restricted")
|
||||
restricted = !restricted
|
||||
if(restricted)
|
||||
req_access = list(access_engine)
|
||||
req_access = list(GLOB.access_engine)
|
||||
else
|
||||
req_access = list()
|
||||
. = TRUE
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/pump/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = physical_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "portable_pump", name, 420, 415, master_ui, state)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = physical_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "portable_scrubber", name, 420, 335, master_ui, state)
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
if(..())
|
||||
return
|
||||
var/A
|
||||
A = input("Area to bombard", "Open Fire", A) in teleportlocs
|
||||
var/area/thearea = teleportlocs[A]
|
||||
A = input("Area to bombard", "Open Fire", A) in GLOB.teleportlocs
|
||||
var/area/thearea = GLOB.teleportlocs[A]
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if(reload < reload_cooldown)
|
||||
@@ -58,8 +58,8 @@
|
||||
|
||||
/*/mob/proc/openfire()
|
||||
var/A
|
||||
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
|
||||
var/area/thearea = teleportlocs[A]
|
||||
A = input("Area to jump bombard", "Open Fire", A) in GLOB.teleportlocs
|
||||
var/area/thearea = GLOB.teleportlocs[A]
|
||||
priority_announce("Bluespace artillery fire detected. Brace for impact.")
|
||||
spawn(30)
|
||||
var/list/L = list()
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/obj/item/weapon/twohanded/ctf/process()
|
||||
if(world.time > reset_cooldown)
|
||||
forceMove(get_turf(src.reset))
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
to_chat(M, "<span class='userdanger'>\The [src] has been returned to base!</span>")
|
||||
@@ -63,7 +63,7 @@
|
||||
dropped(user)
|
||||
return
|
||||
user.anchored = TRUE
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
to_chat(M, "<span class='userdanger'>\The [src] has been taken!</span>")
|
||||
@@ -74,7 +74,7 @@
|
||||
user.anchored = FALSE
|
||||
reset_cooldown = world.time + 200 //20 seconds
|
||||
START_PROCESSING(SSobj, src)
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
to_chat(M, "<span class='userdanger'>\The [src] has been dropped!</span>")
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
/proc/toggle_all_ctf(mob/user)
|
||||
var/ctf_enabled = FALSE
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
for(var/obj/machinery/capture_the_flag/CTF in GLOB.machines)
|
||||
ctf_enabled = CTF.toggle_ctf()
|
||||
message_admins("[key_name_admin(user)] has [ctf_enabled? "enabled" : "disabled"] CTF!")
|
||||
notify_ghosts("CTF has been [ctf_enabled? "enabled" : "disabled"]!",'sound/effects/ghost2.ogg')
|
||||
@@ -163,10 +163,10 @@
|
||||
/obj/effect/ctf,
|
||||
/obj/item/weapon/twohanded/ctf
|
||||
))
|
||||
poi_list |= src
|
||||
GLOB.poi_list |= src
|
||||
|
||||
/obj/machinery/capture_the_flag/Destroy()
|
||||
poi_list.Remove(src)
|
||||
GLOB.poi_list.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/capture_the_flag/process()
|
||||
@@ -218,7 +218,7 @@
|
||||
spawn_team_member(new_team_member)
|
||||
return
|
||||
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
for(var/obj/machinery/capture_the_flag/CTF in GLOB.machines)
|
||||
if(CTF == src || CTF.ctf_enabled == FALSE)
|
||||
continue
|
||||
if(user.ckey in CTF.team_members)
|
||||
@@ -264,7 +264,7 @@
|
||||
if(flag.team != src.team)
|
||||
user.transferItemToLoc(flag, get_turf(flag.reset), TRUE)
|
||||
points++
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
to_chat(M, "<span class='userdanger'>[user.real_name] has captured \the [flag], scoring a point for [team] team! They now have [points]/[points_to_win] points!</span>")
|
||||
@@ -272,7 +272,7 @@
|
||||
victory()
|
||||
|
||||
/obj/machinery/capture_the_flag/proc/victory()
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
to_chat(M, "<span class='narsie'>[team] team wins!</span>")
|
||||
@@ -280,10 +280,10 @@
|
||||
for(var/obj/item/weapon/twohanded/ctf/W in M)
|
||||
M.dropItemToGround(W)
|
||||
M.dust()
|
||||
for(var/obj/machinery/control_point/control in machines)
|
||||
for(var/obj/machinery/control_point/control in GLOB.machines)
|
||||
control.icon_state = "dominator"
|
||||
control.controlling = null
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
for(var/obj/machinery/capture_the_flag/CTF in GLOB.machines)
|
||||
if(CTF.ctf_enabled == TRUE)
|
||||
CTF.points = 0
|
||||
CTF.control_points = 0
|
||||
@@ -327,7 +327,7 @@
|
||||
ctf_enabled = FALSE
|
||||
arena_reset = FALSE
|
||||
var/area/A = get_area(src)
|
||||
for(var/i in mob_list)
|
||||
for(var/i in GLOB.mob_list)
|
||||
var/mob/M = i
|
||||
if((get_area(A) == A) && (M.ckey in team_members))
|
||||
M.dust()
|
||||
@@ -336,13 +336,13 @@
|
||||
recently_dead_ckeys.Cut()
|
||||
|
||||
/obj/machinery/capture_the_flag/proc/instagib_mode()
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
for(var/obj/machinery/capture_the_flag/CTF in GLOB.machines)
|
||||
if(CTF.ctf_enabled == TRUE)
|
||||
CTF.ctf_gear = CTF.instagib_gear
|
||||
CTF.respawn_cooldown = INSTAGIB_RESPAWN
|
||||
|
||||
/obj/machinery/capture_the_flag/proc/normal_mode()
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
for(var/obj/machinery/capture_the_flag/CTF in GLOB.machines)
|
||||
if(CTF.ctf_enabled == TRUE)
|
||||
CTF.ctf_gear = initial(ctf_gear)
|
||||
CTF.respawn_cooldown = DEFAULT_RESPAWN
|
||||
@@ -508,7 +508,7 @@
|
||||
/datum/outfit/ctf/red/post_equip(mob/living/carbon/human/H)
|
||||
..()
|
||||
var/obj/item/device/radio/R = H.ears
|
||||
R.set_frequency(REDTEAM_FREQ)
|
||||
R.set_frequency(GLOB.REDTEAM_FREQ)
|
||||
R.freqlock = TRUE
|
||||
R.independent = TRUE
|
||||
H.dna.species.stunmod = 0
|
||||
@@ -516,7 +516,7 @@
|
||||
/datum/outfit/ctf/blue/post_equip(mob/living/carbon/human/H)
|
||||
..()
|
||||
var/obj/item/device/radio/R = H.ears
|
||||
R.set_frequency(BLUETEAM_FREQ)
|
||||
R.set_frequency(GLOB.BLUETEAM_FREQ)
|
||||
R.freqlock = TRUE
|
||||
R.independent = TRUE
|
||||
H.dna.species.stunmod = 0
|
||||
@@ -593,7 +593,7 @@
|
||||
/obj/effect/ctf/ammo/proc/reload(mob/living/M)
|
||||
if(!ishuman(M))
|
||||
return
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
for(var/obj/machinery/capture_the_flag/CTF in GLOB.machines)
|
||||
if(M in CTF.spawned_mobs)
|
||||
var/outfit = CTF.ctf_gear
|
||||
var/datum/outfit/O = new outfit
|
||||
@@ -613,7 +613,7 @@
|
||||
|
||||
/obj/effect/ctf/dead_barricade/Initialize(mapload)
|
||||
..()
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
for(var/obj/machinery/capture_the_flag/CTF in GLOB.machines)
|
||||
CTF.dead_barricades += src
|
||||
|
||||
/obj/effect/ctf/dead_barricade/proc/respawn()
|
||||
@@ -649,11 +649,11 @@
|
||||
|
||||
/obj/machinery/control_point/proc/capture(mob/user)
|
||||
if(do_after(user, 30, target = src))
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
for(var/obj/machinery/capture_the_flag/CTF in GLOB.machines)
|
||||
if(CTF.ctf_enabled && (user.ckey in CTF.team_members))
|
||||
controlling = CTF
|
||||
icon_state = "dominator-[CTF.team]"
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
to_chat(M, "<span class='userdanger'>[user.real_name] has captured \the [src], claiming it for [CTF.team]! Go take it back!</span>")
|
||||
|
||||
@@ -41,10 +41,10 @@
|
||||
if(instant || (roundstart && (mapload || (SSticker && SSticker.current_state > GAME_STATE_SETTING_UP))))
|
||||
create()
|
||||
else
|
||||
poi_list |= src
|
||||
GLOB.poi_list |= src
|
||||
|
||||
/obj/effect/mob_spawn/Destroy()
|
||||
poi_list.Remove(src)
|
||||
GLOB.poi_list.Remove(src)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/mob_spawn/proc/special(mob/M)
|
||||
@@ -258,7 +258,7 @@
|
||||
back = /obj/item/weapon/storage/backpack
|
||||
has_id = 1
|
||||
id_job = "Operative"
|
||||
id_access_list = list(access_syndicate)
|
||||
id_access_list = list(GLOB.access_syndicate)
|
||||
|
||||
/obj/effect/mob_spawn/human/syndicatecommando
|
||||
name = "Syndicate Commando"
|
||||
@@ -272,7 +272,7 @@
|
||||
pocket1 = /obj/item/weapon/tank/internals/emergency_oxygen
|
||||
has_id = 1
|
||||
id_job = "Operative"
|
||||
id_access_list = list(access_syndicate)
|
||||
id_access_list = list(GLOB.access_syndicate)
|
||||
|
||||
///////////Civilians//////////////////////
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
glasses = /obj/item/clothing/glasses/sunglasses/reagent
|
||||
has_id = 1
|
||||
id_job = "Bartender"
|
||||
id_access_list = list(access_bar)
|
||||
id_access_list = list(GLOB.access_bar)
|
||||
|
||||
/obj/effect/mob_spawn/human/bartender/alive
|
||||
death = FALSE
|
||||
@@ -386,7 +386,7 @@
|
||||
glasses = /obj/item/clothing/glasses/sunglasses
|
||||
has_id = 1
|
||||
id_job = "Bridge Officer"
|
||||
id_access_list = list(access_cent_captain)
|
||||
id_access_list = list(GLOB.access_cent_captain)
|
||||
|
||||
/obj/effect/mob_spawn/human/commander
|
||||
name = "Commander"
|
||||
@@ -401,7 +401,7 @@
|
||||
pocket1 = /obj/item/weapon/lighter
|
||||
has_id = 1
|
||||
id_job = "Commander"
|
||||
id_access_list = list(access_cent_captain)
|
||||
id_access_list = list(GLOB.access_cent_captain)
|
||||
|
||||
/obj/effect/mob_spawn/human/nanotrasensoldier
|
||||
name = "Nanotrasen Private Security Officer"
|
||||
@@ -414,7 +414,7 @@
|
||||
back = /obj/item/weapon/storage/backpack/security
|
||||
has_id = 1
|
||||
id_job = "Private Security Force"
|
||||
id_access_list = list(access_cent_specops)
|
||||
id_access_list = list(GLOB.access_cent_specops)
|
||||
|
||||
/obj/effect/mob_spawn/human/commander/alive
|
||||
death = FALSE
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/exile
|
||||
name = "exile implants"
|
||||
req_access = list(access_hos)
|
||||
req_access = list(GLOB.access_hos)
|
||||
|
||||
/obj/structure/closet/secure_closet/exile/New()
|
||||
..()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/obj/machinery/gateway/centerstation/the_gateway = null
|
||||
GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation)
|
||||
|
||||
/obj/machinery/gateway
|
||||
name = "gateway"
|
||||
@@ -16,7 +16,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
|
||||
var/can_link = FALSE //Is this the centerpiece?
|
||||
|
||||
/obj/machinery/gateway/Initialize()
|
||||
randomspawns = awaydestinations
|
||||
randomspawns = GLOB.awaydestinations
|
||||
update_icon()
|
||||
if(!istype(src, /obj/machinery/gateway/centerstation) && !istype(src, /obj/machinery/gateway/centeraway))
|
||||
switch(dir)
|
||||
@@ -38,7 +38,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
|
||||
var/turf/T = loc
|
||||
var/ready = FALSE
|
||||
|
||||
for(var/i in alldirs)
|
||||
for(var/i in GLOB.alldirs)
|
||||
T = get_step(loc, i)
|
||||
var/obj/machinery/gateway/G = locate(/obj/machinery/gateway) in T
|
||||
if(G)
|
||||
@@ -77,12 +77,12 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
|
||||
|
||||
/obj/machinery/gateway/centerstation/New()
|
||||
..()
|
||||
if(!the_gateway)
|
||||
the_gateway = src
|
||||
if(!GLOB.the_gateway)
|
||||
GLOB.the_gateway = src
|
||||
|
||||
/obj/machinery/gateway/centerstation/Destroy()
|
||||
if(the_gateway == src)
|
||||
the_gateway = null
|
||||
if(GLOB.the_gateway == src)
|
||||
GLOB.the_gateway = null
|
||||
return ..()
|
||||
|
||||
//this is da important part wot makes things go
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/obj/structure/academy_wizard_spawner/process()
|
||||
if(next_check < world.time)
|
||||
if(!current_wizard)
|
||||
for(var/mob/living/L in player_list)
|
||||
for(var/mob/living/L in GLOB.player_list)
|
||||
if(L.z == src.z && L.stat != DEAD && !(faction in L.faction))
|
||||
summon_wizard()
|
||||
break
|
||||
@@ -160,7 +160,7 @@
|
||||
user.death()
|
||||
if(3)
|
||||
//Swarm of creatures
|
||||
for(var/direction in alldirs)
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/turf/T = get_turf(src)
|
||||
new /mob/living/simple_animal/hostile/creature(get_step(T,direction))
|
||||
if(4)
|
||||
@@ -180,7 +180,7 @@
|
||||
//Throw
|
||||
user.Stun(3)
|
||||
user.adjustBruteLoss(50)
|
||||
var/throw_dir = pick(cardinal)
|
||||
var/throw_dir = pick(GLOB.cardinal)
|
||||
var/atom/throw_target = get_edge_target_turf(user, throw_dir)
|
||||
user.throw_at(throw_target, 200, 4)
|
||||
if(8)
|
||||
@@ -203,7 +203,7 @@
|
||||
if(13)
|
||||
//Mad Dosh
|
||||
var/turf/Start = get_turf(src)
|
||||
for(var/direction in alldirs)
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/turf/T = get_step(Start,direction)
|
||||
if(rand(0,1))
|
||||
new /obj/item/stack/spacecash/c1000(T)
|
||||
@@ -284,7 +284,7 @@
|
||||
if(!target_mob)
|
||||
return
|
||||
var/turf/Start = get_turf(user)
|
||||
for(var/direction in alldirs)
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/turf/T = get_step(Start,direction)
|
||||
if(!T.density)
|
||||
target_mob.Move(T)
|
||||
|
||||
@@ -72,23 +72,23 @@
|
||||
*/
|
||||
|
||||
//These vars hold the code itself, they'll be generated at round-start
|
||||
var/sc_safecode1 = "[rand(0,9)]"
|
||||
var/sc_safecode2 = "[rand(0,9)]"
|
||||
var/sc_safecode3 = "[rand(0,9)]"
|
||||
var/sc_safecode4 = "[rand(0,9)]"
|
||||
var/sc_safecode5 = "[rand(0,9)]"
|
||||
GLOBAL_VAR_INIT(sc_safecode1, "[rand(0,9)]")
|
||||
GLOBAL_VAR_INIT(sc_safecode2, "[rand(0,9)]")
|
||||
GLOBAL_VAR_INIT(sc_safecode3, "[rand(0,9)]")
|
||||
GLOBAL_VAR_INIT(sc_safecode4, "[rand(0,9)]")
|
||||
GLOBAL_VAR_INIT(sc_safecode5, "[rand(0,9)]")
|
||||
|
||||
//Pieces of paper actually containing the hints
|
||||
/obj/item/weapon/paper/sc_safehint_paper_prison
|
||||
name = "smudged paper"
|
||||
|
||||
/obj/item/weapon/paper/sc_safehint_paper_prison/New()
|
||||
info = "<i>The ink is smudged, you can only make out a couple numbers:</i> '[sc_safecode1]**[sc_safecode4]*'"
|
||||
info = "<i>The ink is smudged, you can only make out a couple numbers:</i> '[GLOB.sc_safecode1]**[GLOB.sc_safecode4]*'"
|
||||
|
||||
/obj/item/weapon/paper/sc_safehint_paper_hydro
|
||||
name = "shredded paper"
|
||||
/obj/item/weapon/paper/sc_safehint_paper_hydro/New()
|
||||
info = "<i>Although the paper is shredded, you can clearly see the number:</i> '[sc_safecode2]'"
|
||||
info = "<i>Although the paper is shredded, you can clearly see the number:</i> '[GLOB.sc_safecode2]'"
|
||||
|
||||
/obj/item/weapon/paper/sc_safehint_paper_caf
|
||||
name = "blood-soaked paper"
|
||||
@@ -99,7 +99,7 @@ var/sc_safecode5 = "[rand(0,9)]"
|
||||
name = "hidden paper"
|
||||
/obj/item/weapon/paper/sc_safehint_paper_bible/New()
|
||||
info = {"<i>It would appear that the pen hidden with the paper had leaked ink over the paper.
|
||||
However you can make out the last three digits:</i>'[sc_safecode3][sc_safecode4][sc_safecode5]'
|
||||
However you can make out the last three digits:</i>'[GLOB.sc_safecode3][GLOB.sc_safecode4][GLOB.sc_safecode5]'
|
||||
"}
|
||||
|
||||
/obj/item/weapon/paper/sc_safehint_paper_shuttle
|
||||
@@ -123,7 +123,7 @@ var/sc_safecode5 = "[rand(0,9)]"
|
||||
|
||||
/obj/item/weapon/storage/secure/safe/sc_ssafe/New()
|
||||
..()
|
||||
l_code = "[sc_safecode1][sc_safecode2][sc_safecode3][sc_safecode4][sc_safecode5]"
|
||||
l_code = "[GLOB.sc_safecode1][GLOB.sc_safecode2][GLOB.sc_safecode3][GLOB.sc_safecode4][GLOB.sc_safecode5]"
|
||||
l_set = 1
|
||||
new /obj/item/weapon/gun/energy/mindflayer(src)
|
||||
new /obj/item/device/soulstone(src)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
if("Peace")
|
||||
to_chat(user, "<B>Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.</B>")
|
||||
to_chat(user, "You feel as if you just narrowly avoided a terrible fate...")
|
||||
for(var/mob/living/simple_animal/hostile/faithless/F in mob_list)
|
||||
for(var/mob/living/simple_animal/hostile/faithless/F in GLOB.mob_list)
|
||||
F.death()
|
||||
|
||||
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
// How much "space" we give the edge of the map
|
||||
var/global/list/potentialRandomZlevels = generateMapList(filename = "config/awaymissionconfig.txt")
|
||||
GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/awaymissionconfig.txt"))
|
||||
|
||||
/proc/createRandomZlevel()
|
||||
if(awaydestinations.len) //crude, but it saves another var!
|
||||
if(GLOB.awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
if(potentialRandomZlevels && potentialRandomZlevels.len)
|
||||
if(GLOB.potentialRandomZlevels && GLOB.potentialRandomZlevels.len)
|
||||
to_chat(world, "<span class='boldannounce'>Loading away mission...</span>")
|
||||
var/map = pick(potentialRandomZlevels)
|
||||
var/map = pick(GLOB.potentialRandomZlevels)
|
||||
load_new_z_level(map)
|
||||
to_chat(world, "<span class='boldannounce'>Away mission loaded.</span>")
|
||||
|
||||
/proc/reset_gateway_spawns(reset = FALSE)
|
||||
for(var/obj/machinery/gateway/G in world)
|
||||
if(reset)
|
||||
G.randomspawns = awaydestinations
|
||||
G.randomspawns = GLOB.awaydestinations
|
||||
else
|
||||
G.randomspawns.Add(awaydestinations)
|
||||
G.randomspawns.Add(GLOB.awaydestinations)
|
||||
|
||||
/obj/effect/landmark/awaystart
|
||||
name = "away mission spawn"
|
||||
desc = "Randomly picked away mission spawn points"
|
||||
|
||||
/obj/effect/landmark/awaystart/New()
|
||||
awaydestinations += src
|
||||
GLOB.awaydestinations += src
|
||||
..()
|
||||
|
||||
/obj/effect/landmark/awaystart/Destroy()
|
||||
awaydestinations -= src
|
||||
GLOB.awaydestinations -= src
|
||||
return ..()
|
||||
|
||||
/proc/generateMapList(filename)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
board.emagged = TRUE
|
||||
|
||||
/obj/machinery/computer/cargo/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "cargo", name, 1000, 800, master_ui, state)
|
||||
|
||||
@@ -27,7 +27,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
then the player gets the profit from selling his own wasted time.
|
||||
*/
|
||||
/proc/export_item_and_contents(atom/movable/AM, contraband, emagged, dry_run=FALSE)
|
||||
if(!exports_list.len)
|
||||
if(!GLOB.exports_list.len)
|
||||
setupExports()
|
||||
|
||||
var/sold_str = ""
|
||||
@@ -38,7 +38,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
// We go backwards, so it'll be innermost objects sold first
|
||||
for(var/i in reverseRange(contents))
|
||||
var/atom/movable/thing = i
|
||||
for(var/datum/export/E in exports_list)
|
||||
for(var/datum/export/E in GLOB.exports_list)
|
||||
if(!E)
|
||||
continue
|
||||
if(E.applies_to(thing, contraband, emagged))
|
||||
@@ -134,10 +134,10 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
total_cost = 0
|
||||
total_amount = 0
|
||||
|
||||
var/list/exports_list = list()
|
||||
GLOBAL_LIST_EMPTY(exports_list)
|
||||
|
||||
/proc/setupExports()
|
||||
for(var/subtype in subtypesof(/datum/export))
|
||||
var/datum/export/E = new subtype
|
||||
if(E.export_types && E.export_types.len) // Exports without a type are invalid/base types
|
||||
exports_list += E
|
||||
GLOB.exports_list += E
|
||||
|
||||
+25
-25
@@ -40,7 +40,7 @@
|
||||
/datum/supply_pack/emergency/spacesuit
|
||||
name = "Space Suit Crate"
|
||||
cost = 3000
|
||||
access = access_eva
|
||||
access = GLOB.access_eva
|
||||
contains = list(/obj/item/clothing/suit/space,
|
||||
/obj/item/clothing/suit/space,
|
||||
/obj/item/clothing/head/helmet/space,
|
||||
@@ -121,7 +121,7 @@
|
||||
/datum/supply_pack/emergency/atmostank
|
||||
name = "Firefighting Watertank"
|
||||
cost = 1000
|
||||
access = access_atmospherics
|
||||
access = GLOB.access_atmospherics
|
||||
contains = list(/obj/item/weapon/watertank/atmos)
|
||||
crate_name = "firefighting watertank crate"
|
||||
crate_type = /obj/structure/closet/crate/secure
|
||||
@@ -144,7 +144,7 @@
|
||||
/datum/supply_pack/emergency/weedcontrol
|
||||
name = "Weed Control Crate"
|
||||
cost = 1500
|
||||
access = access_hydroponics
|
||||
access = GLOB.access_hydroponics
|
||||
contains = list(/obj/item/weapon/scythe,
|
||||
/obj/item/clothing/mask/gas,
|
||||
/obj/item/weapon/grenade/chem_grenade/antiweed,
|
||||
@@ -209,7 +209,7 @@
|
||||
|
||||
/datum/supply_pack/security
|
||||
group = "Security"
|
||||
access = access_security
|
||||
access = GLOB.access_security
|
||||
crate_type = /obj/structure/closet/crate/secure/gear
|
||||
|
||||
/datum/supply_pack/security/supplies
|
||||
@@ -290,7 +290,7 @@
|
||||
crate_name = "forensics crate"
|
||||
|
||||
/datum/supply_pack/security/armory
|
||||
access = access_armory
|
||||
access = GLOB.access_armory
|
||||
crate_type = /obj/structure/closet/crate/secure/weapon
|
||||
|
||||
/datum/supply_pack/security/armory/riothelmets
|
||||
@@ -378,7 +378,7 @@
|
||||
/datum/supply_pack/security/armory/fire
|
||||
name = "Incendiary Weapons Crate"
|
||||
cost = 1500
|
||||
access = access_heads
|
||||
access = GLOB.access_heads
|
||||
contains = list(/obj/item/weapon/flamethrower/full,
|
||||
/obj/item/weapon/tank/internals/plasma,
|
||||
/obj/item/weapon/tank/internals/plasma,
|
||||
@@ -510,7 +510,7 @@
|
||||
/datum/supply_pack/science/nitrous_oxide_canister
|
||||
name = "Nitrous Oxide Canister"
|
||||
cost = 3000
|
||||
access = access_atmospherics
|
||||
access = GLOB.access_atmospherics
|
||||
contains = list(/obj/machinery/portable_atmospherics/canister/nitrous_oxide)
|
||||
crate_name = "nitrous oxide canister crate"
|
||||
crate_type = /obj/structure/closet/crate/secure
|
||||
@@ -620,7 +620,7 @@
|
||||
/datum/supply_pack/engineering/engine
|
||||
name = "Emitter Crate"
|
||||
cost = 1500
|
||||
access = access_ce
|
||||
access = GLOB.access_ce
|
||||
contains = list(/obj/machinery/power/emitter,
|
||||
/obj/machinery/power/emitter)
|
||||
crate_name = "emitter crate"
|
||||
@@ -669,7 +669,7 @@
|
||||
/datum/supply_pack/engineering/engine/supermatter_shard
|
||||
name = "Supermatter Shard Crate"
|
||||
cost = 10000
|
||||
access = access_ce
|
||||
access = GLOB.access_ce
|
||||
contains = list(/obj/machinery/power/supermatter_shard)
|
||||
crate_name = "supermatter shard crate"
|
||||
crate_type = /obj/structure/closet/crate/secure/engineering
|
||||
@@ -782,7 +782,7 @@
|
||||
/datum/supply_pack/medical/virus
|
||||
name = "Virus Crate"
|
||||
cost = 2500
|
||||
access = access_cmo
|
||||
access = GLOB.access_cmo
|
||||
contains = list(/obj/item/weapon/reagent_containers/glass/bottle/flu_virion,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/cold,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion,
|
||||
@@ -839,7 +839,7 @@
|
||||
/datum/supply_pack/science/robotics
|
||||
name = "Robotics Assembly Crate"
|
||||
cost = 1000
|
||||
access = access_robotics
|
||||
access = GLOB.access_robotics
|
||||
contains = list(/obj/item/device/assembly/prox_sensor,
|
||||
/obj/item/device/assembly/prox_sensor,
|
||||
/obj/item/device/assembly/prox_sensor,
|
||||
@@ -853,7 +853,7 @@
|
||||
/datum/supply_pack/science/robotics/mecha_ripley
|
||||
name = "Circuit Crate (Ripley APLU)"
|
||||
cost = 3000
|
||||
access = access_robotics
|
||||
access = GLOB.access_robotics
|
||||
contains = list(/obj/item/weapon/book/manual/ripley_build_and_repair,
|
||||
/obj/item/weapon/circuitboard/mecha/ripley/main,
|
||||
/obj/item/weapon/circuitboard/mecha/ripley/peripherals)
|
||||
@@ -863,7 +863,7 @@
|
||||
/datum/supply_pack/science/robotics/mecha_odysseus
|
||||
name = "Circuit Crate (Odysseus)"
|
||||
cost = 2500
|
||||
access = access_robotics
|
||||
access = GLOB.access_robotics
|
||||
contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals,
|
||||
/obj/item/weapon/circuitboard/mecha/odysseus/main)
|
||||
crate_name = "\improper Odysseus circuit crate"
|
||||
@@ -872,7 +872,7 @@
|
||||
/datum/supply_pack/science/plasma
|
||||
name = "Plasma Assembly Crate"
|
||||
cost = 1000
|
||||
access = access_tox_storage
|
||||
access = GLOB.access_tox_storage
|
||||
contains = list(/obj/item/weapon/tank/internals/plasma,
|
||||
/obj/item/weapon/tank/internals/plasma,
|
||||
/obj/item/weapon/tank/internals/plasma,
|
||||
@@ -891,7 +891,7 @@
|
||||
/datum/supply_pack/science/shieldwalls
|
||||
name = "Shield Generators"
|
||||
cost = 2000
|
||||
access = access_teleporter
|
||||
access = GLOB.access_teleporter
|
||||
contains = list(/obj/machinery/shieldwallgen,
|
||||
/obj/machinery/shieldwallgen,
|
||||
/obj/machinery/shieldwallgen,
|
||||
@@ -902,7 +902,7 @@
|
||||
/datum/supply_pack/science/transfer_valves
|
||||
name = "Tank Transfer Valves Crate"
|
||||
cost = 6000
|
||||
access = access_rd
|
||||
access = GLOB.access_rd
|
||||
contains = list(/obj/item/device/transfer_valve,
|
||||
/obj/item/device/transfer_valve)
|
||||
crate_name = "tank transfer valves crate"
|
||||
@@ -912,7 +912,7 @@
|
||||
/datum/supply_pack/science/bz_canister
|
||||
name = "BZ Canister"
|
||||
cost = 2000
|
||||
access_any = list(access_rd, access_atmospherics)
|
||||
access_any = list(GLOB.access_rd, GLOB.access_atmospherics)
|
||||
contains = list(/obj/machinery/portable_atmospherics/canister/bz)
|
||||
crate_name = "bz canister crate"
|
||||
crate_type = /obj/structure/closet/crate/secure/science
|
||||
@@ -921,7 +921,7 @@
|
||||
/datum/supply_pack/science/freon_canister
|
||||
name = "Freon Canister"
|
||||
cost = 6000
|
||||
access_any = list(access_rd, access_atmospherics)
|
||||
access_any = list(GLOB.access_rd, GLOB.access_atmospherics)
|
||||
contains = list(/obj/machinery/portable_atmospherics/canister/freon)
|
||||
crate_name = "freon canister crate"
|
||||
crate_type = /obj/structure/closet/crate/secure/science
|
||||
@@ -930,7 +930,7 @@
|
||||
/datum/supply_pack/science/research
|
||||
name = "Machine Prototype Crate"
|
||||
cost = 8000
|
||||
access = access_research
|
||||
access = GLOB.access_research
|
||||
contains = list(/obj/item/device/machineprototype)
|
||||
crate_name = "machine prototype crate"
|
||||
crate_type = /obj/structure/closet/crate/secure/science
|
||||
@@ -986,7 +986,7 @@
|
||||
contains = list(/obj/item/weapon/storage/backpack/dufflebag/clown/cream_pie)
|
||||
crate_name = "party equipment crate"
|
||||
contraband = TRUE
|
||||
access = access_theatre
|
||||
access = GLOB.access_theatre
|
||||
crate_type = /obj/structure/closet/crate/secure
|
||||
|
||||
/datum/supply_pack/organic/monkey
|
||||
@@ -1111,7 +1111,7 @@
|
||||
/datum/supply_pack/organic/hydroponics/hydrotank
|
||||
name = "Hydroponics Backpack Crate"
|
||||
cost = 1000
|
||||
access = access_hydroponics
|
||||
access = GLOB.access_hydroponics
|
||||
contains = list(/obj/item/weapon/watertank)
|
||||
crate_name = "hydroponics backpack crate"
|
||||
crate_type = /obj/structure/closet/crate/secure
|
||||
@@ -1284,7 +1284,7 @@
|
||||
/datum/supply_pack/misc/minerkit
|
||||
name = "Shaft Miner Starter Kit"
|
||||
cost = 2500
|
||||
access = access_qm
|
||||
access = GLOB.access_qm
|
||||
contains = list(/obj/item/weapon/pickaxe/mini,
|
||||
/obj/item/clothing/glasses/meson,
|
||||
/obj/item/device/t_scanner/adv_mining_scanner/lesser,
|
||||
@@ -1459,7 +1459,7 @@
|
||||
/datum/supply_pack/misc/janitor/janitank
|
||||
name = "Janitor Backpack Crate"
|
||||
cost = 1000
|
||||
access = access_janitor
|
||||
access = GLOB.access_janitor
|
||||
contains = list(/obj/item/weapon/watertank/janitor)
|
||||
crate_name = "janitor backpack crate"
|
||||
crate_type = /obj/structure/closet/crate/secure
|
||||
@@ -1492,7 +1492,7 @@
|
||||
/datum/supply_pack/misc/costume
|
||||
name = "Standard Costume Crate"
|
||||
cost = 1000
|
||||
access = access_theatre
|
||||
access = GLOB.access_theatre
|
||||
contains = list(/obj/item/weapon/storage/backpack/clown,
|
||||
/obj/item/clothing/shoes/clown_shoes,
|
||||
/obj/item/clothing/mask/gas/clown_hat,
|
||||
@@ -1685,7 +1685,7 @@
|
||||
crate_name = "librarian engraving/scribbling crate"
|
||||
cost = 3000
|
||||
contains = list(/obj/item/soapstone)
|
||||
access = access_library
|
||||
access = GLOB.access_library
|
||||
crate_type = /obj/structure/closet/crate/secure
|
||||
|
||||
|
||||
|
||||
@@ -141,16 +141,16 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
//These datums are used to populate the asset cache, the proc "register()" does this.
|
||||
|
||||
//all of our asset datums, used for referring to these later
|
||||
/var/global/list/asset_datums = list()
|
||||
GLOBAL_LIST_EMPTY(asset_datums)
|
||||
|
||||
//get a assetdatum or make a new one
|
||||
/proc/get_asset_datum(var/type)
|
||||
if (!(type in asset_datums))
|
||||
if (!(type in GLOB.asset_datums))
|
||||
return new type()
|
||||
return asset_datums[type]
|
||||
return GLOB.asset_datums[type]
|
||||
|
||||
/datum/asset/New()
|
||||
asset_datums[type] = src
|
||||
GLOB.asset_datums[type] = src
|
||||
|
||||
/datum/asset/proc/register()
|
||||
return
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
return
|
||||
|
||||
//Logs all hrefs
|
||||
if(config && config.log_hrefs && href_logfile)
|
||||
href_logfile << "<small>[time_stamp(show_ds = TRUE)] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
|
||||
if(config && config.log_hrefs && GLOB.href_logfile)
|
||||
GLOB.href_logfile << "<small>[time_stamp(show_ds = TRUE)] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
|
||||
|
||||
// Admin PM
|
||||
if(href_list["priv_msg"])
|
||||
@@ -138,8 +138,7 @@
|
||||
//CONNECT//
|
||||
///////////
|
||||
#if (PRELOAD_RSC == 0)
|
||||
var/list/external_rsc_urls
|
||||
var/next_external_rsc = 0
|
||||
GLOBAL_LIST(external_rsc_urls)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -151,13 +150,14 @@ var/next_external_rsc = 0
|
||||
return null
|
||||
|
||||
#if (PRELOAD_RSC == 0)
|
||||
var/static/next_external_rsc = 0
|
||||
if(external_rsc_urls && external_rsc_urls.len)
|
||||
next_external_rsc = Wrap(next_external_rsc+1, 1, external_rsc_urls.len+1)
|
||||
preload_rsc = external_rsc_urls[next_external_rsc]
|
||||
#endif
|
||||
|
||||
clients += src
|
||||
directory[ckey] = src
|
||||
GLOB.clients += src
|
||||
GLOB.directory[ckey] = src
|
||||
|
||||
//Admin Authorisation
|
||||
var/localhost_addresses = list("127.0.0.1", "::1")
|
||||
@@ -167,9 +167,9 @@ var/next_external_rsc = 0
|
||||
var/datum/admins/localhost_holder = new(localhost_rank, ckey)
|
||||
localhost_holder.associate(src)
|
||||
if(config.autoadmin)
|
||||
if(!admin_datums[ckey])
|
||||
if(!GLOB.admin_datums[ckey])
|
||||
var/datum/admin_rank/autorank
|
||||
for(var/datum/admin_rank/R in admin_ranks)
|
||||
for(var/datum/admin_rank/R in GLOB.admin_ranks)
|
||||
if(R.name == config.autoadmin_rank)
|
||||
autorank = R
|
||||
break
|
||||
@@ -177,17 +177,17 @@ var/next_external_rsc = 0
|
||||
to_chat(world, "Autoadmin rank not found")
|
||||
else
|
||||
var/datum/admins/D = new(autorank, ckey)
|
||||
admin_datums[ckey] = D
|
||||
holder = admin_datums[ckey]
|
||||
GLOB.admin_datums[ckey] = D
|
||||
holder = GLOB.admin_datums[ckey]
|
||||
if(holder)
|
||||
admins |= src
|
||||
GLOB.admins |= src
|
||||
holder.owner = src
|
||||
|
||||
//preferences datum - also holds some persistent data for the client (because we may as well keep these datums to a minimum)
|
||||
prefs = preferences_datums[ckey]
|
||||
prefs = GLOB.preferences_datums[ckey]
|
||||
if(!prefs)
|
||||
prefs = new /datum/preferences(src)
|
||||
preferences_datums[ckey] = prefs
|
||||
GLOB.preferences_datums[ckey] = prefs
|
||||
prefs.last_ip = address //these are gonna be used for banning
|
||||
prefs.last_id = computer_id //these are gonna be used for banning
|
||||
if(world.byond_version >= 511 && byond_version >= 511 && prefs.clientfps)
|
||||
@@ -197,7 +197,7 @@ var/next_external_rsc = 0
|
||||
log_access("Login: [key_name(src)] from [address ? address : "localhost"]-[computer_id] || BYOND v[byond_version]")
|
||||
var/alert_mob_dupe_login = FALSE
|
||||
if(config.log_access)
|
||||
for(var/I in clients)
|
||||
for(var/I in GLOB.clients)
|
||||
if(I == src)
|
||||
continue
|
||||
var/client/C = I
|
||||
@@ -256,22 +256,22 @@ var/next_external_rsc = 0
|
||||
qdel(src)
|
||||
return 0
|
||||
|
||||
if( (world.address == address || !address) && !host )
|
||||
host = key
|
||||
if( (world.address == address || !address) && !GLOB.host )
|
||||
GLOB.host = key
|
||||
world.update_status()
|
||||
|
||||
if(holder)
|
||||
add_admin_verbs()
|
||||
to_chat(src, get_message_output("memo"))
|
||||
adminGreet()
|
||||
if((global.comms_key == "default_pwd" || length(global.comms_key) <= 6) && global.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms.
|
||||
if((GLOB.comms_key == "default_pwd" || length(GLOB.comms_key) <= 6) && GLOB.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms.
|
||||
to_chat(src, "<span class='danger'>The server's API key is either too short or is the default value! Consider changing it immediately!</span>")
|
||||
|
||||
add_verbs_from_config()
|
||||
set_client_age_from_db()
|
||||
|
||||
if (isnum(player_age) && player_age == -1) //first connection
|
||||
if (config.panic_bunker && !holder && !(ckey in deadmins))
|
||||
if (config.panic_bunker && !holder && !(ckey in GLOB.deadmins))
|
||||
log_access("Failed Login: [key] - New account attempting to connect during panic bunker")
|
||||
message_admins("<span class='adminnotice'>Failed Login: [key] - New account attempting to connect during panic bunker</span>")
|
||||
to_chat(src, "Sorry but the server is currently not accepting connections from never before seen players.")
|
||||
@@ -292,7 +292,7 @@ var/next_external_rsc = 0
|
||||
else if (isnum(player_age) && player_age < config.notify_new_player_age)
|
||||
message_admins("New user: [key_name_admin(src)] just connected with an age of [player_age] day[(player_age==1?"":"s")]")
|
||||
|
||||
if(!IsGuestKey(key) && dbcon.IsConnected())
|
||||
if(!IsGuestKey(key) && GLOB.dbcon.IsConnected())
|
||||
findJoinDate()
|
||||
|
||||
sync_client_with_db(tdata)
|
||||
@@ -306,17 +306,17 @@ var/next_external_rsc = 0
|
||||
|
||||
screen += void
|
||||
|
||||
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates.
|
||||
if(prefs.lastchangelog != GLOB.changelog_hash) //bolds the changelog button on the interface so we know there are updates.
|
||||
to_chat(src, "<span class='info'>You have unread updates in the changelog.</span>")
|
||||
if(config.aggressive_changelog)
|
||||
changelog()
|
||||
else
|
||||
winset(src, "infowindow.changelog", "font-style=bold")
|
||||
|
||||
if(ckey in clientmessages)
|
||||
for(var/message in clientmessages[ckey])
|
||||
if(ckey in GLOB.clientmessages)
|
||||
for(var/message in GLOB.clientmessages[ckey])
|
||||
to_chat(src, message)
|
||||
clientmessages.Remove(ckey)
|
||||
GLOB.clientmessages.Remove(ckey)
|
||||
|
||||
if(config && config.autoconvert_notes)
|
||||
convert_notes_sql(ckey)
|
||||
@@ -339,9 +339,9 @@ var/next_external_rsc = 0
|
||||
if(holder)
|
||||
adminGreet(1)
|
||||
holder.owner = null
|
||||
admins -= src
|
||||
directory -= ckey
|
||||
clients -= src
|
||||
GLOB.admins -= src
|
||||
GLOB.directory -= ckey
|
||||
GLOB.clients -= src
|
||||
if(movingmob != null)
|
||||
movingmob.client_mobs_in_contents -= mob
|
||||
UNSETEMPTY(movingmob.client_mobs_in_contents)
|
||||
@@ -354,12 +354,12 @@ var/next_external_rsc = 0
|
||||
if (IsGuestKey(src.key))
|
||||
return
|
||||
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
return
|
||||
|
||||
var/sql_ckey = sanitizeSQL(src.ckey)
|
||||
|
||||
var/DBQuery/query_get_client_age = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
|
||||
var/DBQuery/query_get_client_age = GLOB.dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
|
||||
if(!query_get_client_age.Execute())
|
||||
return
|
||||
|
||||
@@ -375,18 +375,18 @@ var/next_external_rsc = 0
|
||||
if (IsGuestKey(src.key))
|
||||
return
|
||||
|
||||
if (!dbcon.Connect())
|
||||
if (!GLOB.dbcon.Connect())
|
||||
return
|
||||
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
|
||||
var/DBQuery/query_get_ip = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = INET_ATON('[address]') AND ckey != '[sql_ckey]'")
|
||||
var/DBQuery/query_get_ip = GLOB.dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = INET_ATON('[address]') AND ckey != '[sql_ckey]'")
|
||||
query_get_ip.Execute()
|
||||
related_accounts_ip = ""
|
||||
while(query_get_ip.NextRow())
|
||||
related_accounts_ip += "[query_get_ip.item[1]], "
|
||||
|
||||
var/DBQuery/query_get_cid = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]' AND ckey != '[sql_ckey]'")
|
||||
var/DBQuery/query_get_cid = GLOB.dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]' AND ckey != '[sql_ckey]'")
|
||||
if(!query_get_cid.Execute())
|
||||
return
|
||||
related_accounts_cid = ""
|
||||
@@ -405,13 +405,13 @@ var/next_external_rsc = 0
|
||||
var/sql_admin_rank = sanitizeSQL(admin_rank)
|
||||
|
||||
|
||||
var/DBQuery/query_log_player = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), INET_ATON('[sql_ip]'), '[sql_computerid]', '[sql_admin_rank]') ON DUPLICATE KEY UPDATE lastseen = VALUES(lastseen), ip = VALUES(ip), computerid = VALUES(computerid), lastadminrank = VALUES(lastadminrank)")
|
||||
var/DBQuery/query_log_player = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), INET_ATON('[sql_ip]'), '[sql_computerid]', '[sql_admin_rank]') ON DUPLICATE KEY UPDATE lastseen = VALUES(lastseen), ip = VALUES(ip), computerid = VALUES(computerid), lastadminrank = VALUES(lastadminrank)")
|
||||
if(!query_log_player.Execute())
|
||||
return
|
||||
|
||||
//Logging player access
|
||||
|
||||
var/DBQuery/query_log_connection = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`server_ip`,`server_port`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),INET_ATON('[world.internet_address]'),'[world.port]','[sql_ckey]',INET_ATON('[sql_ip]'),'[sql_computerid]')")
|
||||
var/DBQuery/query_log_connection = GLOB.dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`server_ip`,`server_port`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),INET_ATON('[world.internet_address]'),'[world.port]','[sql_ckey]',INET_ATON('[sql_ip]'),'[sql_computerid]')")
|
||||
query_log_connection.Execute()
|
||||
|
||||
/client/proc/check_randomizer(topic)
|
||||
@@ -467,7 +467,7 @@ var/next_external_rsc = 0
|
||||
cidcheck -= ckey
|
||||
else
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
var/DBQuery/query_cidcheck = dbcon.NewQuery("SELECT computerid FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
|
||||
var/DBQuery/query_cidcheck = GLOB.dbcon.NewQuery("SELECT computerid FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
|
||||
query_cidcheck.Execute()
|
||||
|
||||
var/lastcid
|
||||
@@ -495,13 +495,13 @@ var/next_external_rsc = 0
|
||||
var/const/adminckey = "CID-Error"
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
//check to see if we noted them in the last day.
|
||||
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT id FROM [format_table_name("messages")] WHERE type = 'note' AND targetckey = '[sql_ckey]' AND adminckey = '[adminckey]' AND timestamp + INTERVAL 1 DAY < NOW()")
|
||||
var/DBQuery/query_get_notes = GLOB.dbcon.NewQuery("SELECT id FROM [format_table_name("messages")] WHERE type = 'note' AND targetckey = '[sql_ckey]' AND adminckey = '[adminckey]' AND timestamp + INTERVAL 1 DAY < NOW()")
|
||||
if(!query_get_notes.Execute())
|
||||
return
|
||||
if(query_get_notes.NextRow())
|
||||
return
|
||||
//regardless of above, make sure their last note is not from us, as no point in repeating the same note over and over.
|
||||
query_get_notes = dbcon.NewQuery("SELECT adminckey FROM [format_table_name("messages")] WHERE targetckey = '[sql_ckey]' ORDER BY timestamp DESC LIMIT 1")
|
||||
query_get_notes = GLOB.dbcon.NewQuery("SELECT adminckey FROM [format_table_name("messages")] WHERE targetckey = '[sql_ckey]' ORDER BY timestamp DESC LIMIT 1")
|
||||
if(!query_get_notes.Execute())
|
||||
return
|
||||
if(query_get_notes.NextRow())
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var/list/clientmessages = list()
|
||||
GLOBAL_LIST_EMPTY(clientmessages)
|
||||
|
||||
/proc/addclientmessage(var/ckey, var/message)
|
||||
ckey = ckey(ckey)
|
||||
if (!ckey || !message)
|
||||
return
|
||||
if (!(ckey in clientmessages))
|
||||
clientmessages[ckey] = list()
|
||||
clientmessages[ckey] += message
|
||||
if (!(ckey in GLOB.clientmessages))
|
||||
GLOB.clientmessages[ckey] = list()
|
||||
GLOB.clientmessages[ckey] += message
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
var/list/preferences_datums = list()
|
||||
GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
|
||||
|
||||
@@ -104,10 +104,10 @@ var/list/preferences_datums = list()
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
custom_names["ai"] = pick(ai_names)
|
||||
custom_names["cyborg"] = pick(ai_names)
|
||||
custom_names["clown"] = pick(clown_names)
|
||||
custom_names["mime"] = pick(mime_names)
|
||||
custom_names["ai"] = pick(GLOB.ai_names)
|
||||
custom_names["cyborg"] = pick(GLOB.ai_names)
|
||||
custom_names["clown"] = pick(GLOB.clown_names)
|
||||
custom_names["mime"] = pick(GLOB.mime_names)
|
||||
if(istype(C))
|
||||
if(!IsGuestKey(C.key))
|
||||
load_path(C.ckey)
|
||||
@@ -343,7 +343,7 @@ var/list/preferences_datums = list()
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if("wings" in pref_species.mutant_bodyparts && r_wings_list.len >1)
|
||||
if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
dat += "<h3>Wings</h3>"
|
||||
@@ -381,7 +381,7 @@ var/list/preferences_datums = list()
|
||||
dat += "<b>Announce Login:</b> <a href='?_src_=prefs;preference=announce_login'>[(toggles & ANNOUNCE_LOGIN)?"On":"Off"]</a><br>"
|
||||
|
||||
if(unlock_content || check_rights_for(user.client, R_ADMIN))
|
||||
dat += "<b>OOC:</b> <span style='border: 1px solid #161616; background-color: [ooccolor ? ooccolor : normal_ooc_colour];'> </span> <a href='?_src_=prefs;preference=ooccolor;task=input'>Change</a><br>"
|
||||
dat += "<b>OOC:</b> <span style='border: 1px solid #161616; background-color: [ooccolor ? ooccolor : GLOB.normal_ooc_colour];'> </span> <a href='?_src_=prefs;preference=ooccolor;task=input'>Change</a><br>"
|
||||
|
||||
if(unlock_content)
|
||||
dat += "<b>BYOND Membership Publicity:</b> <a href='?_src_=prefs;preference=publicity'>[(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]</a><br>"
|
||||
@@ -452,13 +452,13 @@ var/list/preferences_datums = list()
|
||||
src.be_special = list()
|
||||
|
||||
|
||||
for (var/i in special_roles)
|
||||
for (var/i in GLOB.special_roles)
|
||||
if(jobban_isbanned(user, i))
|
||||
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;jobbancheck=[i]'>BANNED</a><br>"
|
||||
else
|
||||
var/days_remaining = null
|
||||
if(config.use_age_restriction_for_jobs && ispath(special_roles[i])) //If it's a game mode antag, check if the player meets the minimum age
|
||||
var/mode_path = special_roles[i]
|
||||
if(config.use_age_restriction_for_jobs && ispath(GLOB.special_roles[i])) //If it's a game mode antag, check if the player meets the minimum age
|
||||
var/mode_path = GLOB.special_roles[i]
|
||||
var/datum/game_mode/temp_mode = new mode_path
|
||||
days_remaining = temp_mode.get_remaining_days(user.client)
|
||||
|
||||
@@ -542,7 +542,7 @@ var/list/preferences_datums = list()
|
||||
else
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[NON-HUMAN\]</b></font></td></tr>"
|
||||
continue
|
||||
if((rank in command_positions) || (rank == "AI"))//Bold head jobs
|
||||
if((rank in GLOB.command_positions) || (rank == "AI"))//Bold head jobs
|
||||
HTML += "<b><span class='dark'>[rank]</span></b>"
|
||||
else
|
||||
HTML += "<span class='dark'>[rank]</span>"
|
||||
@@ -746,7 +746,7 @@ var/list/preferences_datums = list()
|
||||
if(href_list["jobbancheck"])
|
||||
var/job = sanitizeSQL(href_list["jobbancheck"])
|
||||
var/sql_ckey = sanitizeSQL(user.ckey)
|
||||
var/DBQuery/query_get_jobban = dbcon.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[job]'")
|
||||
var/DBQuery/query_get_jobban = GLOB.dbcon.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[job]'")
|
||||
if(!query_get_jobban.warn_execute())
|
||||
return
|
||||
if(query_get_jobban.NextRow())
|
||||
@@ -815,7 +815,7 @@ var/list/preferences_datums = list()
|
||||
if("s_tone")
|
||||
skin_tone = random_skin_tone()
|
||||
if("bag")
|
||||
backbag = pick(backbaglist)
|
||||
backbag = pick(GLOB.backbaglist)
|
||||
if("all")
|
||||
random_character()
|
||||
|
||||
@@ -823,12 +823,12 @@ var/list/preferences_datums = list()
|
||||
switch(href_list["preference"])
|
||||
if("ghostform")
|
||||
if(unlock_content)
|
||||
var/new_form = input(user, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in ghost_forms
|
||||
var/new_form = input(user, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_forms
|
||||
if(new_form)
|
||||
ghost_form = new_form
|
||||
if("ghostorbit")
|
||||
if(unlock_content)
|
||||
var/new_orbit = input(user, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND", null) as null|anything in ghost_orbits
|
||||
var/new_orbit = input(user, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND", null) as null|anything in GLOB.ghost_orbits
|
||||
if(new_orbit)
|
||||
ghost_orbit = new_orbit
|
||||
|
||||
@@ -878,23 +878,23 @@ var/list/preferences_datums = list()
|
||||
if("hair_style")
|
||||
var/new_hair_style
|
||||
if(gender == MALE)
|
||||
new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in hair_styles_male_list
|
||||
new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_male_list
|
||||
else
|
||||
new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in hair_styles_female_list
|
||||
new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_female_list
|
||||
if(new_hair_style)
|
||||
hair_style = new_hair_style
|
||||
|
||||
if("next_hair_style")
|
||||
if (gender == MALE)
|
||||
hair_style = next_list_item(hair_style, hair_styles_male_list)
|
||||
hair_style = next_list_item(hair_style, GLOB.hair_styles_male_list)
|
||||
else
|
||||
hair_style = next_list_item(hair_style, hair_styles_female_list)
|
||||
hair_style = next_list_item(hair_style, GLOB.hair_styles_female_list)
|
||||
|
||||
if("previous_hair_style")
|
||||
if (gender == MALE)
|
||||
hair_style = previous_list_item(hair_style, hair_styles_male_list)
|
||||
hair_style = previous_list_item(hair_style, GLOB.hair_styles_male_list)
|
||||
else
|
||||
hair_style = previous_list_item(hair_style, hair_styles_female_list)
|
||||
hair_style = previous_list_item(hair_style, GLOB.hair_styles_female_list)
|
||||
|
||||
if("facial")
|
||||
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference") as null|color
|
||||
@@ -904,45 +904,45 @@ var/list/preferences_datums = list()
|
||||
if("facial_hair_style")
|
||||
var/new_facial_hair_style
|
||||
if(gender == MALE)
|
||||
new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in facial_hair_styles_male_list
|
||||
new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_male_list
|
||||
else
|
||||
new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in facial_hair_styles_female_list
|
||||
new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_female_list
|
||||
if(new_facial_hair_style)
|
||||
facial_hair_style = new_facial_hair_style
|
||||
|
||||
if("next_facehair_style")
|
||||
if (gender == MALE)
|
||||
facial_hair_style = next_list_item(facial_hair_style, facial_hair_styles_male_list)
|
||||
facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_male_list)
|
||||
else
|
||||
facial_hair_style = next_list_item(facial_hair_style, facial_hair_styles_female_list)
|
||||
facial_hair_style = next_list_item(facial_hair_style, GLOB.facial_hair_styles_female_list)
|
||||
|
||||
if("previous_facehair_style")
|
||||
if (gender == MALE)
|
||||
facial_hair_style = previous_list_item(facial_hair_style, facial_hair_styles_male_list)
|
||||
facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_male_list)
|
||||
else
|
||||
facial_hair_style = previous_list_item(facial_hair_style, facial_hair_styles_female_list)
|
||||
facial_hair_style = previous_list_item(facial_hair_style, GLOB.facial_hair_styles_female_list)
|
||||
|
||||
if("underwear")
|
||||
var/new_underwear
|
||||
if(gender == MALE)
|
||||
new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in underwear_m
|
||||
new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_m
|
||||
else
|
||||
new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in underwear_f
|
||||
new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_f
|
||||
if(new_underwear)
|
||||
underwear = new_underwear
|
||||
|
||||
if("undershirt")
|
||||
var/new_undershirt
|
||||
if(gender == MALE)
|
||||
new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_m
|
||||
new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_m
|
||||
else
|
||||
new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_f
|
||||
new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_f
|
||||
if(new_undershirt)
|
||||
undershirt = new_undershirt
|
||||
|
||||
if("socks")
|
||||
var/new_socks
|
||||
new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in socks_list
|
||||
new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in GLOB.socks_list
|
||||
if(new_socks)
|
||||
socks = new_socks
|
||||
|
||||
@@ -953,10 +953,10 @@ var/list/preferences_datums = list()
|
||||
|
||||
if("species")
|
||||
|
||||
var/result = input(user, "Select a species", "Species Selection") as null|anything in roundstart_species
|
||||
var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_species
|
||||
|
||||
if(result)
|
||||
var/newtype = roundstart_species[result]
|
||||
var/newtype = GLOB.roundstart_species[result]
|
||||
pref_species = new newtype()
|
||||
//Now that we changed our species, we must verify that the mutant colour is still allowed.
|
||||
var/temp_hsv = RGBtoHSV(features["mcolor"])
|
||||
@@ -976,66 +976,66 @@ var/list/preferences_datums = list()
|
||||
|
||||
if("tail_lizard")
|
||||
var/new_tail
|
||||
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in tails_list_lizard
|
||||
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.tails_list_lizard
|
||||
if(new_tail)
|
||||
features["tail_lizard"] = new_tail
|
||||
|
||||
if("tail_human")
|
||||
var/new_tail
|
||||
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in tails_list_human
|
||||
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.tails_list_human
|
||||
if(new_tail)
|
||||
features["tail_human"] = new_tail
|
||||
|
||||
if("snout")
|
||||
var/new_snout
|
||||
new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in snouts_list
|
||||
new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in GLOB.snouts_list
|
||||
if(new_snout)
|
||||
features["snout"] = new_snout
|
||||
|
||||
if("horns")
|
||||
var/new_horns
|
||||
new_horns = input(user, "Choose your character's horns:", "Character Preference") as null|anything in horns_list
|
||||
new_horns = input(user, "Choose your character's horns:", "Character Preference") as null|anything in GLOB.horns_list
|
||||
if(new_horns)
|
||||
features["horns"] = new_horns
|
||||
|
||||
if("ears")
|
||||
var/new_ears
|
||||
new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in ears_list
|
||||
new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in GLOB.ears_list
|
||||
if(new_ears)
|
||||
features["ears"] = new_ears
|
||||
|
||||
if("wings")
|
||||
var/new_wings
|
||||
new_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in r_wings_list
|
||||
new_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.r_wings_list
|
||||
if(new_wings)
|
||||
features["wings"] = new_wings
|
||||
|
||||
if("frills")
|
||||
var/new_frills
|
||||
new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in frills_list
|
||||
new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in GLOB.frills_list
|
||||
if(new_frills)
|
||||
features["frills"] = new_frills
|
||||
|
||||
if("spines")
|
||||
var/new_spines
|
||||
new_spines = input(user, "Choose your character's spines:", "Character Preference") as null|anything in spines_list
|
||||
new_spines = input(user, "Choose your character's spines:", "Character Preference") as null|anything in GLOB.spines_list
|
||||
if(new_spines)
|
||||
features["spines"] = new_spines
|
||||
|
||||
if("body_markings")
|
||||
var/new_body_markings
|
||||
new_body_markings = input(user, "Choose your character's body markings:", "Character Preference") as null|anything in body_markings_list
|
||||
new_body_markings = input(user, "Choose your character's body markings:", "Character Preference") as null|anything in GLOB.body_markings_list
|
||||
if(new_body_markings)
|
||||
features["body_markings"] = new_body_markings
|
||||
|
||||
if("legs")
|
||||
var/new_legs
|
||||
new_legs = input(user, "Choose your character's legs:", "Character Preference") as null|anything in legs_list
|
||||
new_legs = input(user, "Choose your character's legs:", "Character Preference") as null|anything in GLOB.legs_list
|
||||
if(new_legs)
|
||||
features["legs"] = new_legs
|
||||
|
||||
if("s_tone")
|
||||
var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in skin_tones
|
||||
var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in GLOB.skin_tones
|
||||
if(new_s_tone)
|
||||
skin_tone = new_s_tone
|
||||
|
||||
@@ -1045,12 +1045,12 @@ var/list/preferences_datums = list()
|
||||
ooccolor = sanitize_ooccolor(new_ooccolor)
|
||||
|
||||
if("bag")
|
||||
var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in backbaglist
|
||||
var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in GLOB.backbaglist
|
||||
if(new_backbag)
|
||||
backbag = new_backbag
|
||||
|
||||
if("uplink_loc")
|
||||
var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in uplink_spawn_loc_list
|
||||
var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in GLOB.uplink_spawn_loc_list
|
||||
if(new_loc)
|
||||
uplink_spawn_loc = new_loc
|
||||
|
||||
@@ -1097,7 +1097,7 @@ var/list/preferences_datums = list()
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("sec_dept")
|
||||
var/department = input(user, "Choose your prefered security department:", "Security Departments") as null|anything in security_depts_prefs
|
||||
var/department = input(user, "Choose your prefered security department:", "Security Departments") as null|anything in GLOB.security_depts_prefs
|
||||
if(department)
|
||||
prefered_security_department = department
|
||||
|
||||
@@ -1249,9 +1249,9 @@ var/list/preferences_datums = list()
|
||||
var/firstspace = findtext(real_name, " ")
|
||||
var/name_length = length(real_name)
|
||||
if(!firstspace) //we need a surname
|
||||
real_name += " [pick(last_names)]"
|
||||
real_name += " [pick(GLOB.last_names)]"
|
||||
else if(firstspace == name_length)
|
||||
real_name += "[pick(last_names)]"
|
||||
real_name += "[pick(GLOB.last_names)]"
|
||||
|
||||
character.real_name = real_name
|
||||
character.name = character.real_name
|
||||
|
||||
@@ -106,7 +106,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
//It's only really meant to avoid annoying frequent players
|
||||
//if your savefile is 3 months out of date, then 'tough shit'.
|
||||
/datum/preferences/proc/update_character(current_version, savefile/S)
|
||||
if(pref_species && !(pref_species.id in roundstart_species))
|
||||
if(pref_species && !(pref_species.id in GLOB.roundstart_species))
|
||||
var/rando_race = pick(config.roundstart_races)
|
||||
pref_species = new rando_race()
|
||||
|
||||
@@ -195,10 +195,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
||||
clientfps = sanitize_integer(clientfps, 0, 1000, 0)
|
||||
parallax = sanitize_integer(parallax, PARALLAX_INSANE, PARALLAX_DISABLE, null)
|
||||
ghost_form = sanitize_inlist(ghost_form, ghost_forms, initial(ghost_form))
|
||||
ghost_orbit = sanitize_inlist(ghost_orbit, ghost_orbits, initial(ghost_orbit))
|
||||
ghost_accs = sanitize_inlist(ghost_accs, ghost_accs_options, GHOST_ACCS_DEFAULT_OPTION)
|
||||
ghost_others = sanitize_inlist(ghost_others, ghost_others_options, GHOST_OTHERS_DEFAULT_OPTION)
|
||||
ghost_form = sanitize_inlist(ghost_form, GLOB.ghost_forms, initial(ghost_form))
|
||||
ghost_orbit = sanitize_inlist(ghost_orbit, GLOB.ghost_orbits, initial(ghost_orbit))
|
||||
ghost_accs = sanitize_inlist(ghost_accs, GLOB.ghost_accs_options, GHOST_ACCS_DEFAULT_OPTION)
|
||||
ghost_others = sanitize_inlist(ghost_others, GLOB.ghost_others_options, GHOST_OTHERS_DEFAULT_OPTION)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -262,8 +262,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
//Species
|
||||
var/species_id
|
||||
S["species"] >> species_id
|
||||
if(config.mutant_races && species_id && (species_id in roundstart_species))
|
||||
var/newtype = roundstart_species[species_id]
|
||||
if(config.mutant_races && species_id && (species_id in GLOB.roundstart_species))
|
||||
var/newtype = GLOB.roundstart_species[species_id]
|
||||
pref_species = new newtype()
|
||||
else
|
||||
var/rando_race = pick(config.roundstart_races)
|
||||
@@ -339,33 +339,33 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
be_random_body = sanitize_integer(be_random_body, 0, 1, initial(be_random_body))
|
||||
gender = sanitize_gender(gender)
|
||||
if(gender == MALE)
|
||||
hair_style = sanitize_inlist(hair_style, hair_styles_male_list)
|
||||
facial_hair_style = sanitize_inlist(facial_hair_style, facial_hair_styles_male_list)
|
||||
underwear = sanitize_inlist(underwear, underwear_m)
|
||||
undershirt = sanitize_inlist(undershirt, undershirt_m)
|
||||
hair_style = sanitize_inlist(hair_style, GLOB.hair_styles_male_list)
|
||||
facial_hair_style = sanitize_inlist(facial_hair_style, GLOB.hair_styles_male_list)
|
||||
underwear = sanitize_inlist(underwear, GLOB.underwear_m)
|
||||
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_m)
|
||||
else
|
||||
hair_style = sanitize_inlist(hair_style, hair_styles_female_list)
|
||||
facial_hair_style = sanitize_inlist(facial_hair_style, facial_hair_styles_female_list)
|
||||
underwear = sanitize_inlist(underwear, underwear_f)
|
||||
undershirt = sanitize_inlist(undershirt, undershirt_f)
|
||||
socks = sanitize_inlist(socks, socks_list)
|
||||
hair_style = sanitize_inlist(hair_style, GLOB.hair_styles_female_list)
|
||||
facial_hair_style = sanitize_inlist(facial_hair_style, GLOB.facial_hair_styles_female_list)
|
||||
underwear = sanitize_inlist(underwear, GLOB.underwear_f)
|
||||
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_f)
|
||||
socks = sanitize_inlist(socks, GLOB.socks_list)
|
||||
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
|
||||
hair_color = sanitize_hexcolor(hair_color, 3, 0)
|
||||
facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0)
|
||||
eye_color = sanitize_hexcolor(eye_color, 3, 0)
|
||||
skin_tone = sanitize_inlist(skin_tone, skin_tones)
|
||||
backbag = sanitize_inlist(backbag, backbaglist, initial(backbag))
|
||||
uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, uplink_spawn_loc_list, initial(uplink_spawn_loc))
|
||||
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones)
|
||||
backbag = sanitize_inlist(backbag, GLOB.backbaglist, initial(backbag))
|
||||
uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, GLOB.uplink_spawn_loc_list, initial(uplink_spawn_loc))
|
||||
features["mcolor"] = sanitize_hexcolor(features["mcolor"], 3, 0)
|
||||
features["tail_lizard"] = sanitize_inlist(features["tail_lizard"], tails_list_lizard)
|
||||
features["tail_human"] = sanitize_inlist(features["tail_human"], tails_list_human, "None")
|
||||
features["snout"] = sanitize_inlist(features["snout"], snouts_list)
|
||||
features["horns"] = sanitize_inlist(features["horns"], horns_list)
|
||||
features["ears"] = sanitize_inlist(features["ears"], ears_list, "None")
|
||||
features["frills"] = sanitize_inlist(features["frills"], frills_list)
|
||||
features["spines"] = sanitize_inlist(features["spines"], spines_list)
|
||||
features["body_markings"] = sanitize_inlist(features["body_markings"], body_markings_list)
|
||||
features["feature_lizard_legs"] = sanitize_inlist(features["legs"], legs_list, "Normal Legs")
|
||||
features["tail_lizard"] = sanitize_inlist(features["tail_lizard"], GLOB.tails_list_lizard)
|
||||
features["tail_human"] = sanitize_inlist(features["tail_human"], GLOB.tails_list_human, "None")
|
||||
features["snout"] = sanitize_inlist(features["snout"], GLOB.snouts_list)
|
||||
features["horns"] = sanitize_inlist(features["horns"], GLOB.horns_list)
|
||||
features["ears"] = sanitize_inlist(features["ears"], GLOB.ears_list, "None")
|
||||
features["frills"] = sanitize_inlist(features["frills"], GLOB.frills_list)
|
||||
features["spines"] = sanitize_inlist(features["spines"], GLOB.spines_list)
|
||||
features["body_markings"] = sanitize_inlist(features["body_markings"], GLOB.body_markings_list)
|
||||
features["feature_lizard_legs"] = sanitize_inlist(features["legs"], GLOB.legs_list, "Normal Legs")
|
||||
|
||||
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
|
||||
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
|
||||
|
||||
@@ -158,14 +158,9 @@
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_MIDI)
|
||||
to_chat(src, "You will now hear any sounds uploaded by admins.")
|
||||
if(admin_sound)
|
||||
to_chat(src, admin_sound)
|
||||
else
|
||||
to_chat(src, "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled.")
|
||||
if(admin_sound && !(admin_sound.status & SOUND_PAUSED))
|
||||
admin_sound.status |= SOUND_PAUSED
|
||||
to_chat(src, admin_sound)
|
||||
admin_sound.status ^= SOUND_PAUSED
|
||||
to_chat(src, "You will no longer hear sounds uploaded by admins")
|
||||
mob.stop_sound_channel(CHANNEL_ADMIN)
|
||||
feedback_add_details("admin_verb","TMidi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/stop_client_sounds()
|
||||
@@ -226,16 +221,16 @@
|
||||
src.ambience_playing = 0
|
||||
feedback_add_details("admin_verb", "SAmbi") //If you are copy-pasting this, I bet you read this comment expecting to see the same thing :^)
|
||||
|
||||
var/global/list/ghost_forms = list("ghost","ghostking","ghostian2","skeleghost","ghost_red","ghost_black", \
|
||||
GLOBAL_LIST_INIT(ghost_forms, list("ghost","ghostking","ghostian2","skeleghost","ghost_red","ghost_black", \
|
||||
"ghost_blue","ghost_yellow","ghost_green","ghost_pink", \
|
||||
"ghost_cyan","ghost_dblue","ghost_dred","ghost_dgreen", \
|
||||
"ghost_dcyan","ghost_grey","ghost_dyellow","ghost_dpink", "ghost_purpleswirl","ghost_funkypurp","ghost_pinksherbert","ghost_blazeit",\
|
||||
"ghost_mellow","ghost_rainbow","ghost_camo","ghost_fire", "catghost")
|
||||
"ghost_mellow","ghost_rainbow","ghost_camo","ghost_fire", "catghost"))
|
||||
/client/proc/pick_form()
|
||||
if(!is_content_unlocked())
|
||||
alert("This setting is for accounts with BYOND premium only.")
|
||||
return
|
||||
var/new_form = input(src, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in ghost_forms
|
||||
var/new_form = input(src, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_forms
|
||||
if(new_form)
|
||||
prefs.ghost_form = new_form
|
||||
prefs.save_preferences()
|
||||
@@ -243,13 +238,13 @@ var/global/list/ghost_forms = list("ghost","ghostking","ghostian2","skeleghost",
|
||||
var/mob/dead/observer/O = mob
|
||||
O.update_icon(new_form)
|
||||
|
||||
var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOST_ORBIT_SQUARE,GHOST_ORBIT_HEXAGON,GHOST_ORBIT_PENTAGON)
|
||||
GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOST_ORBIT_SQUARE,GHOST_ORBIT_HEXAGON,GHOST_ORBIT_PENTAGON))
|
||||
|
||||
/client/proc/pick_ghost_orbit()
|
||||
if(!is_content_unlocked())
|
||||
alert("This setting is for accounts with BYOND premium only.")
|
||||
return
|
||||
var/new_orbit = input(src, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND",null) as null|anything in ghost_orbits
|
||||
var/new_orbit = input(src, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_orbits
|
||||
if(new_orbit)
|
||||
prefs.ghost_orbit = new_orbit
|
||||
prefs.save_preferences()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set name = "OOC" //Gave this shit a shorter name so you only have to time out "ooc" rather than "ooc message" to use it --NeoFite
|
||||
set category = "OOC"
|
||||
|
||||
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
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!ooc_allowed)
|
||||
if(!GLOB.ooc_allowed)
|
||||
to_chat(src, "<span class='danger'>OOC is globally muted.</span>")
|
||||
return
|
||||
if(!dooc_allowed && (mob.stat == DEAD))
|
||||
if(!GLOB.dooc_allowed && (mob.stat == DEAD))
|
||||
to_chat(usr, "<span class='danger'>OOC for dead mobs has been turned off.</span>")
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
@@ -57,9 +57,9 @@
|
||||
var/keyname = key
|
||||
if(prefs.unlock_content)
|
||||
if(prefs.toggles & MEMBER_PUBLIC)
|
||||
keyname = "<font color='[prefs.ooccolor ? prefs.ooccolor : normal_ooc_colour]'><img style='width:9px;height:9px;' class=icon src=\ref['icons/member_content.dmi'] iconstate=blag>[keyname]</font>"
|
||||
keyname = "<font color='[prefs.ooccolor ? prefs.ooccolor : GLOB.normal_ooc_colour]'><img style='width:9px;height:9px;' class=icon src=\ref['icons/member_content.dmi'] iconstate=blag>[keyname]</font>"
|
||||
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(C.prefs.chat_toggles & CHAT_OOC)
|
||||
if(holder)
|
||||
if(!holder.fakekey || C.holder)
|
||||
@@ -68,33 +68,33 @@
|
||||
else
|
||||
to_chat(C, "<span class='adminobserverooc'><span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>")
|
||||
else
|
||||
to_chat(C, "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[holder.fakekey ? holder.fakekey : key]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
to_chat(C, "<font color='[GLOB.normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[holder.fakekey ? holder.fakekey : key]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
else if(!(key in C.prefs.ignoring))
|
||||
to_chat(C, "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[keyname]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
to_chat(C, "<font color='[GLOB.normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[keyname]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
|
||||
/proc/toggle_ooc(toggle = null)
|
||||
if(toggle != null) //if we're specifically en/disabling ooc
|
||||
if(toggle != ooc_allowed)
|
||||
ooc_allowed = toggle
|
||||
if(toggle != GLOB.ooc_allowed)
|
||||
GLOB.ooc_allowed = toggle
|
||||
else
|
||||
return
|
||||
else //otherwise just toggle it
|
||||
ooc_allowed = !ooc_allowed
|
||||
to_chat(world, "<B>The OOC channel has been globally [ooc_allowed ? "enabled" : "disabled"].</B>")
|
||||
GLOB.ooc_allowed = !GLOB.ooc_allowed
|
||||
to_chat(world, "<B>The OOC channel has been globally [GLOB.ooc_allowed ? "enabled" : "disabled"].</B>")
|
||||
|
||||
var/global/normal_ooc_colour = OOC_COLOR
|
||||
GLOBAL_VAR_INIT(normal_ooc_colour, OOC_COLOR)
|
||||
|
||||
/client/proc/set_ooc(newColor as color)
|
||||
set name = "Set Player OOC Color"
|
||||
set desc = "Modifies player OOC Color"
|
||||
set category = "Fun"
|
||||
normal_ooc_colour = sanitize_ooccolor(newColor)
|
||||
GLOB.normal_ooc_colour = sanitize_ooccolor(newColor)
|
||||
|
||||
/client/proc/reset_ooc()
|
||||
set name = "Reset Player OOC Color"
|
||||
set desc = "Returns player OOC Color to default"
|
||||
set category = "Fun"
|
||||
normal_ooc_colour = OOC_COLOR
|
||||
GLOB.normal_ooc_colour = OOC_COLOR
|
||||
|
||||
/client/verb/colorooc()
|
||||
set name = "Set Your OOC Color"
|
||||
@@ -129,8 +129,8 @@ var/global/normal_ooc_colour = OOC_COLOR
|
||||
set category = "Admin"
|
||||
set desc ="Check the admin notice if it has been set"
|
||||
|
||||
if(admin_notice)
|
||||
to_chat(src, "<span class='boldnotice'>Admin Notice:</span>\n \t [admin_notice]")
|
||||
if(GLOB.admin_notice)
|
||||
to_chat(src, "<span class='boldnotice'>Admin Notice:</span>\n \t [GLOB.admin_notice]")
|
||||
else
|
||||
to_chat(src, "<span class='notice'>There are no admin notices at the moment.</span>")
|
||||
|
||||
@@ -139,8 +139,8 @@ var/global/normal_ooc_colour = OOC_COLOR
|
||||
set category = "OOC"
|
||||
set desc ="Check the Message of the Day"
|
||||
|
||||
if(join_motd)
|
||||
to_chat(src, "<div class=\"motd\">[join_motd]</div>")
|
||||
if(GLOB.join_motd)
|
||||
to_chat(src, "<div class=\"motd\">[GLOB.join_motd]</div>")
|
||||
else
|
||||
to_chat(src, "<span class='notice'>The Message of the Day has not been set.</span>")
|
||||
|
||||
@@ -169,7 +169,7 @@ var/global/normal_ooc_colour = OOC_COLOR
|
||||
set category = "OOC"
|
||||
set desc ="Ignore a player's messages on the OOC channel"
|
||||
|
||||
var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in sortKey(clients)
|
||||
var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in sortKey(GLOB.clients)
|
||||
if(!selection)
|
||||
return
|
||||
if(selection == src)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/mob/dead/observer/G = src.mob
|
||||
if(!G.started_as_observer)//If you aghost to do this, KorPhaeron will deadmin you in your sleep.
|
||||
log_admin("[key_name(usr)] checked advanced who in-round")
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
var/entry = "\t[C.key]"
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += " <i>(as [C.holder.fakekey])</i>"
|
||||
@@ -37,14 +37,14 @@
|
||||
entry += " ([round(C.avgping, 1)]ms)"
|
||||
Lines += entry
|
||||
else//If they don't have +ADMIN, only show hidden admins
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
var/entry = "\t[C.key]"
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += " <i>(as [C.holder.fakekey])</i>"
|
||||
entry += " ([round(C.avgping, 1)]ms)"
|
||||
Lines += entry
|
||||
else
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(C.holder && C.holder.fakekey)
|
||||
Lines += "[C.holder.fakekey] ([round(C.avgping, 1)]ms)"
|
||||
else
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
var/msg = "<b>Current Admins:</b>\n"
|
||||
if(holder)
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
msg += "\t[C] is a [C.holder.rank]"
|
||||
|
||||
if(C.holder.fakekey)
|
||||
@@ -79,7 +79,7 @@
|
||||
msg += " (AFK)"
|
||||
msg += "\n"
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(C.is_afk())
|
||||
continue //Don't show afk admins to adminwho
|
||||
if(!C.holder.fakekey)
|
||||
|
||||
@@ -160,10 +160,10 @@
|
||||
if(!damaged_clothes)
|
||||
update_clothes_damaged_state(TRUE)
|
||||
|
||||
var/list/damaged_clothes_icons = list()
|
||||
|
||||
/obj/item/clothing/proc/update_clothes_damaged_state(damaging = TRUE)
|
||||
var/index = "\ref[initial(icon)]-[initial(icon_state)]"
|
||||
var/static/list/damaged_clothes_icons = list()
|
||||
if(damaging)
|
||||
damaged_clothes = 1
|
||||
var/icon/damaged_clothes_icon = damaged_clothes_icons[index]
|
||||
@@ -646,7 +646,7 @@ BLIND // can't see anything
|
||||
var/icon/female_s = icon("icon"='icons/mob/uniform.dmi', "icon_state"="[(type == FEMALE_UNIFORM_FULL) ? "female_full" : "female_top"]")
|
||||
female_clothing_icon.Blend(female_s, ICON_MULTIPLY)
|
||||
female_clothing_icon = fcopy_rsc(female_clothing_icon)
|
||||
female_clothing_icons[index] = female_clothing_icon
|
||||
GLOB.female_clothing_icons[index] = female_clothing_icon
|
||||
|
||||
/obj/item/clothing/under/verb/toggle()
|
||||
set name = "Adjust Suit Sensors"
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
/obj/item/clothing/glasses/hud/equipped(mob/living/carbon/human/user, slot)
|
||||
..()
|
||||
if(hud_type && slot == slot_glasses)
|
||||
var/datum/atom_hud/H = huds[hud_type]
|
||||
var/datum/atom_hud/H = GLOB.huds[hud_type]
|
||||
H.add_hud_to(user)
|
||||
|
||||
/obj/item/clothing/glasses/hud/dropped(mob/living/carbon/human/user)
|
||||
..()
|
||||
if(hud_type && istype(user) && user.glasses == src)
|
||||
var/datum/atom_hud/H = huds[hud_type]
|
||||
var/datum/atom_hud/H = GLOB.huds[hud_type]
|
||||
H.remove_hud_from(user)
|
||||
|
||||
/obj/item/clothing/glasses/hud/emp_act(severity)
|
||||
@@ -161,7 +161,7 @@
|
||||
return
|
||||
|
||||
if (hud_type)
|
||||
var/datum/atom_hud/H = huds[hud_type]
|
||||
var/datum/atom_hud/H = GLOB.huds[hud_type]
|
||||
H.remove_hud_from(user)
|
||||
|
||||
if (hud_type == DATA_HUD_MEDICAL_ADVANCED)
|
||||
@@ -172,7 +172,7 @@
|
||||
hud_type = DATA_HUD_SECURITY_ADVANCED
|
||||
|
||||
if (hud_type)
|
||||
var/datum/atom_hud/H = huds[hud_type]
|
||||
var/datum/atom_hud/H = GLOB.huds[hud_type]
|
||||
H.add_hud_to(user)
|
||||
|
||||
/obj/item/clothing/glasses/hud/toggle/thermal
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
L.implant(H, null, 1)
|
||||
|
||||
var/obj/item/device/radio/R = H.ears
|
||||
R.set_frequency(CENTCOM_FREQ)
|
||||
R.set_frequency(GLOB.CENTCOM_FREQ)
|
||||
R.freqlock = 1
|
||||
|
||||
var/obj/item/weapon/card/id/W = H.wear_id
|
||||
@@ -188,7 +188,7 @@
|
||||
var/obj/item/weapon/card/id/W = H.wear_id
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_centcom_access("Centcom Official")
|
||||
W.access += access_weapons
|
||||
W.access += GLOB.access_weapons
|
||||
W.assignment = "Centcom Official"
|
||||
W.registered_name = H.real_name
|
||||
W.update_label()
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
W.update_label()
|
||||
|
||||
var/obj/item/device/radio/headset/R = H.ears
|
||||
R.set_frequency(CENTCOM_FREQ)
|
||||
R.set_frequency(GLOB.CENTCOM_FREQ)
|
||||
R.freqlock = 1
|
||||
|
||||
/datum/outfit/wizard
|
||||
@@ -355,7 +355,7 @@
|
||||
return
|
||||
|
||||
var/obj/item/device/radio/R = H.ears
|
||||
R.set_frequency(CENTCOM_FREQ)
|
||||
R.set_frequency(GLOB.CENTCOM_FREQ)
|
||||
R.freqlock = 1
|
||||
|
||||
var/obj/item/weapon/implant/mindshield/L = new/obj/item/weapon/implant/mindshield(H)//Here you go Deuryn
|
||||
|
||||
@@ -617,7 +617,7 @@
|
||||
for(var/i in 1 to knockback)
|
||||
target = get_step(target, direction)
|
||||
for(var/i in 1 to knockback/3)
|
||||
target = get_step(target, pick(alldirs))
|
||||
target = get_step(target, pick(GLOB.alldirs))
|
||||
if(knockback)
|
||||
victim.throw_at(target, knockback, part_manip.rating)
|
||||
if(isobj(victim))
|
||||
@@ -635,7 +635,7 @@
|
||||
if(move)
|
||||
while(momentum_x != 0 || momentum_y != 0)
|
||||
sleep(2)
|
||||
step(wearer, pick(cardinal))
|
||||
step(wearer, pick(GLOB.cardinal))
|
||||
momentum_decay()
|
||||
adjust_momentum(0, 0, 10)
|
||||
wearer.visible_message("<span class='warning'>[wearer]'s flight suit crashes into the ground!</span>")
|
||||
@@ -1266,13 +1266,13 @@
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/flightsuit/equipped(mob/living/carbon/human/wearer, slot)
|
||||
..()
|
||||
for(var/hudtype in datahuds)
|
||||
var/datum/atom_hud/H = huds[hudtype]
|
||||
var/datum/atom_hud/H = GLOB.huds[hudtype]
|
||||
H.add_hud_to(wearer)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/flightsuit/dropped(mob/living/carbon/human/wearer)
|
||||
..()
|
||||
for(var/hudtype in datahuds)
|
||||
var/datum/atom_hud/H = huds[hudtype]
|
||||
var/datum/atom_hud/H = GLOB.huds[hudtype]
|
||||
H.remove_hud_from(wearer)
|
||||
if(zoom)
|
||||
toggle_zoom(wearer, TRUE)
|
||||
|
||||
@@ -430,13 +430,13 @@
|
||||
to_chat(user, ("<span class='warning'>Your [user.glasses] prevents you using [src]'s diagnostic visor HUD.</span>"))
|
||||
else
|
||||
onboard_hud_enabled = 1
|
||||
var/datum/atom_hud/DHUD = huds[DATA_HUD_DIAGNOSTIC]
|
||||
var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_DIAGNOSTIC]
|
||||
DHUD.add_hud_to(user)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/rd/dropped(mob/living/carbon/human/user)
|
||||
..()
|
||||
if(onboard_hud_enabled && !(user.glasses && istype(user.glasses, /obj/item/clothing/glasses/hud/diagnostic)))
|
||||
var/datum/atom_hud/DHUD = huds[DATA_HUD_DIAGNOSTIC]
|
||||
var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_DIAGNOSTIC]
|
||||
DHUD.remove_hud_from(user)
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/rd
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
var/image/I = image(icon = 'icons/mob/robots.dmi' , icon_state = "robot", loc = H)
|
||||
I.override = 1
|
||||
I.add_overlay(image(icon = 'icons/mob/robots.dmi' , icon_state = "robot_e")) //gotta look realistic
|
||||
H.add_alt_appearance("standard_borg_disguise", I, silicon_mobs+H) //you look like a robot to robots! (including yourself because you're totally a robot)
|
||||
H.add_alt_appearance("standard_borg_disguise", I, GLOB.silicon_mobs+H) //you look like a robot to robots! (including yourself because you're totally a robot)
|
||||
|
||||
|
||||
/obj/item/clothing/suit/snowman
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
desc = "A terribly ragged and frayed grey jumpsuit. It looks like it hasn't been washed in over a decade."
|
||||
|
||||
/obj/item/clothing/under/color/grey/glorf/hit_reaction(mob/living/carbon/human/owner)
|
||||
owner.forcesay(hit_appends)
|
||||
owner.forcesay(GLOB.hit_appends)
|
||||
return 0
|
||||
|
||||
/obj/item/clothing/under/color/blue
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user