mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 23:51:17 +01:00
Ports the TG globals controller and converts globals. (#18057)
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -124,7 +124,7 @@
|
||||
|
||||
"IN" (or "FROM", that works too but it's kinda weird to read),
|
||||
is the list of objects to work on. This defaults to world if not provided.
|
||||
But doing something like "IN living_mob_list" is quite handy and can optimize your query.
|
||||
But doing something like "in living_mob_list" is quite handy and can optimize your query.
|
||||
All names inside the IN block are global scope, so you can do living_mob_list (a global var) easily.
|
||||
You can also run it on a single object. Because SDQL is that convenient even for single operations.
|
||||
|
||||
@@ -305,8 +305,8 @@
|
||||
SPAN_NOTICE("SDQL query completed: [objs_all] objects selected by path, and [selectors_used ? objs_eligible : objs_all] objects executed on after WHERE filtering/MAPping if applicable."),\
|
||||
SPAN_NOTICE("SDQL combined querys took [DisplayTimeText(end_time_total)] to complete.")) + combined_refs
|
||||
|
||||
var/global/list/sdql2_queries =list()
|
||||
var/global/obj/effect/statclick/sdql2_vv_all/sdql2_vv_statobj = new(null, "VIEW VARIABLES (all)", null)
|
||||
GLOBAL_LIST_INIT(sdql2_queries, GLOB.sdql2_queries || list())
|
||||
GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null, "VIEW VARIABLES (all)", null))
|
||||
|
||||
/datum/sdql2_query
|
||||
var/list/query_tree
|
||||
@@ -343,7 +343,7 @@ var/global/obj/effect/statclick/sdql2_vv_all/sdql2_vv_statobj = new(null, "VIEW
|
||||
if(!LAZYLEN(tree))
|
||||
qdel(src)
|
||||
return
|
||||
LAZYADD(sdql2_queries, src)
|
||||
LAZYADD(GLOB.sdql2_queries, src)
|
||||
superuser = SU
|
||||
allow_admin_interact = admin_interact
|
||||
query_tree = tree
|
||||
@@ -359,7 +359,7 @@ var/global/obj/effect/statclick/sdql2_vv_all/sdql2_vv_statobj = new(null, "VIEW
|
||||
obj_count_finished = null
|
||||
select_text = null
|
||||
select_refs = null
|
||||
sdql2_queries -= src
|
||||
GLOB.sdql2_queries -= src
|
||||
return ..()
|
||||
|
||||
/datum/sdql2_query/proc/get_query_text()
|
||||
@@ -524,7 +524,7 @@ var/global/obj/effect/statclick/sdql2_vv_all/sdql2_vv_statobj = new(null, "VIEW
|
||||
finished = TRUE
|
||||
. = TRUE
|
||||
if(show_next_to_key)
|
||||
var/client/C = directory[show_next_to_key]
|
||||
var/client/C = GLOB.directory[show_next_to_key]
|
||||
if(C)
|
||||
var/mob/showmob = C.mob
|
||||
to_chat(showmob, "<span class='admin'>SDQL query results: [get_query_text()]<br>\
|
||||
@@ -789,7 +789,7 @@ var/global/obj/effect/statclick/sdql2_vv_all/sdql2_vv_statobj = new(null, "VIEW
|
||||
var/list/new_args = list()
|
||||
for(var/arg in arguments)
|
||||
new_args[++new_args.len] = SDQL_expression(source, arg)
|
||||
if(object == "global") // Global proc.
|
||||
if(object == GLOB) // Global proc.
|
||||
return call("/proc/[procname]")(arglist(new_args))
|
||||
return call(object, procname)(arglist(new_args))
|
||||
|
||||
@@ -1043,13 +1043,13 @@ var/global/obj/effect/statclick/sdql2_vv_all/sdql2_vv_statobj = new(null, "VIEW
|
||||
if("world")
|
||||
v = world
|
||||
if("global")
|
||||
v = "global"
|
||||
v = GLOB
|
||||
if("MC")
|
||||
v = Master
|
||||
if("FS")
|
||||
v = Failsafe
|
||||
if("CFG")
|
||||
v = config
|
||||
v = GLOB.config
|
||||
else
|
||||
if(copytext(expression[start], 1, 3) == "SS") //Subsystem //3 == length("SS") + 1
|
||||
var/SSname = copytext_char(expression[start], 3)
|
||||
@@ -1066,6 +1066,8 @@ var/global/obj/effect/statclick/sdql2_vv_all/sdql2_vv_statobj = new(null, "VIEW
|
||||
v = SSmatch
|
||||
else
|
||||
return null
|
||||
else if(object == GLOB) // Shitty ass hack kill me.
|
||||
v = expression[start]
|
||||
if(long)
|
||||
if(expression[start + 1] == ".")
|
||||
return SDQL_var(v, expression[start + 2], null, source, superuser, query)
|
||||
@@ -1212,7 +1214,7 @@ var/global/obj/effect/statclick/sdql2_vv_all/sdql2_vv_statobj = new(null, "VIEW
|
||||
message_admins("[key_name_admin(usr)] non-holder clicked on a statclick! ([src])")
|
||||
log_admin("non-holder clicked on a statclick! ([src])")
|
||||
return
|
||||
usr.client.debug_variables(sdql2_queries)
|
||||
usr.client.debug_variables(GLOB.sdql2_queries)
|
||||
|
||||
#undef SDQL2_HALT_CHECK
|
||||
#undef SDQL2_IS_RUNNING
|
||||
|
||||
@@ -16,24 +16,24 @@
|
||||
data += "Currently [world.visibility ? "<font color='green'>VISIBLE</font>" : "<span class='warning'>HIDDEN</span>"]. <a href='?_src_=holder;access_control=hub'>Toggle</a><br><hr>"
|
||||
|
||||
data += "<h2>IP Intel Settings:</h2><br><ul>"
|
||||
data += "<li>Current warning level: [config.ipintel_rating_bad ? "[config.ipintel_rating_bad]" : "<span class='warning'>DISABLED</span>"]. <a href='?_src_=holder;access_control=intel_bad'>Edit</a></li>"
|
||||
data += "<li>Current kick level: [config.ipintel_rating_kick ? "[config.ipintel_rating_kick]" : "<span class='warning'>DISABLED</span>"]. <a href='?_src_=holder;access_control=intel_kick'>Edit</a></li>"
|
||||
data += "<li>Current warning level: [GLOB.config.ipintel_rating_bad ? "[GLOB.config.ipintel_rating_bad]" : "<span class='warning'>DISABLED</span>"]. <a href='?_src_=holder;access_control=intel_bad'>Edit</a></li>"
|
||||
data += "<li>Current kick level: [GLOB.config.ipintel_rating_kick ? "[GLOB.config.ipintel_rating_kick]" : "<span class='warning'>DISABLED</span>"]. <a href='?_src_=holder;access_control=intel_kick'>Edit</a></li>"
|
||||
data += "</ul><hr>"
|
||||
|
||||
data += "<h2>Player Age Settings:</h2><br><ul>"
|
||||
data += "<li>New players: [config.access_deny_new_players ? "<span class='warning'>DENIED</span>" : "<font color='green'>ALLOWED</font>"]. <a href='?_src_=holder;access_control=new_players;'>Toggle</a></li>"
|
||||
data += "<li>Account age restriction: [config.access_deny_new_accounts == -1 ? "<span class='warning'>DISABLED</span>" : "[config.access_deny_new_accounts] DAYS"]. <a href='?_src_=holder;access_control=new_accounts;'>Edit</a></li>"
|
||||
data += "<li>New players: [GLOB.config.access_deny_new_players ? "<span class='warning'>DENIED</span>" : "<font color='green'>ALLOWED</font>"]. <a href='?_src_=holder;access_control=new_players;'>Toggle</a></li>"
|
||||
data += "<li>Account age restriction: [GLOB.config.access_deny_new_accounts == -1 ? "<span class='warning'>DISABLED</span>" : "[GLOB.config.access_deny_new_accounts] DAYS"]. <a href='?_src_=holder;access_control=new_accounts;'>Edit</a></li>"
|
||||
data += "</ul><hr>"
|
||||
|
||||
data += "<h2>VM Detection Settings:</h2><br><ul>"
|
||||
data += "<li>VM identifier count to warn on: [config.access_warn_vms ? "[config.access_warn_vms]" : "<span class='warning'>DISABLED</span>"]. <a href='?_src_=holder;access_control=vm_warn;'>Edit</a></li>"
|
||||
data += "<li>VM identifier count to kick on: [config.access_deny_vms ? "[config.access_deny_vms]" : "<span class='warning'>DISABLED</span>"]. <a href='?_src_=holder;access_control=vm_kick;'>Edit</a></li>"
|
||||
data += "<li>VM identifier count to warn on: [GLOB.config.access_warn_vms ? "[GLOB.config.access_warn_vms]" : "<span class='warning'>DISABLED</span>"]. <a href='?_src_=holder;access_control=vm_warn;'>Edit</a></li>"
|
||||
data += "<li>VM identifier count to kick on: [GLOB.config.access_deny_vms ? "[GLOB.config.access_deny_vms]" : "<span class='warning'>DISABLED</span>"]. <a href='?_src_=holder;access_control=vm_kick;'>Edit</a></li>"
|
||||
data += "</ul>"
|
||||
|
||||
data += "<h2>Guest join settings:</h2><br><ul>"
|
||||
data += "<li>Guests [(config.guests_allowed || config.external_auth) ? "<font color='green'>CAN</font>" : "<span class='warning'>CAN NOT</span>"] join.</li>"
|
||||
data += "<li>Guests [config.guests_allowed ? "<font color='green'>CAN</font>" : "<span class='warning'>CAN NOT</span>"] play. <a href='?_src_=holder;access_control=guest;'>Toggle</a></li>"
|
||||
data += "<li>External authetification: [config.external_auth ? "<font color='green'>ENABLED</font>" : "<span class='warning'>DISABLED</span>"]. <a href='?_src_=holder;access_control=external_auth;'>Toggle</a></li>"
|
||||
data += "<li>Guests [(GLOB.config.guests_allowed || GLOB.config.external_auth) ? "<font color='green'>CAN</font>" : "<span class='warning'>CAN NOT</span>"] join.</li>"
|
||||
data += "<li>Guests [GLOB.config.guests_allowed ? "<font color='green'>CAN</font>" : "<span class='warning'>CAN NOT</span>"] play. <a href='?_src_=holder;access_control=guest;'>Toggle</a></li>"
|
||||
data += "<li>External authetification: [GLOB.config.external_auth ? "<font color='green'>ENABLED</font>" : "<span class='warning'>DISABLED</span>"]. <a href='?_src_=holder;access_control=external_auth;'>Toggle</a></li>"
|
||||
data += "</ul>"
|
||||
|
||||
config_window.set_user(src.mob)
|
||||
@@ -51,37 +51,37 @@
|
||||
|
||||
switch(control)
|
||||
if ("intel_bad")
|
||||
var/num = input("Please set the new threshold for warning based on IPintel (0 to disable).", "New Threshold", config.ipintel_rating_kick) as num
|
||||
var/num = input("Please set the new threshold for warning based on IPintel (0 to disable).", "New Threshold", GLOB.config.ipintel_rating_kick) as num
|
||||
if (num < 0 || num > 1)
|
||||
to_chat(usr, "<span class='warning'>Invalid number. Cancelling.</span>")
|
||||
return
|
||||
|
||||
config.ipintel_rating_bad = num
|
||||
GLOB.config.ipintel_rating_bad = num
|
||||
if (num)
|
||||
log_and_message_admins("has set the IPIntel warn threshold to [num].")
|
||||
else
|
||||
log_and_message_admins("has disabled warn based on IPIntel.")
|
||||
if ("intel_kick")
|
||||
var/num = input("Please set the new threshold for kicking based on IPintel (0 to disable).", "New Threshold", config.ipintel_rating_kick) as num
|
||||
var/num = input("Please set the new threshold for kicking based on IPintel (0 to disable).", "New Threshold", GLOB.config.ipintel_rating_kick) as num
|
||||
if (num < 0 || num > 1)
|
||||
to_chat(usr, "<span class='warning'>Invalid number. Cancelling.</span>")
|
||||
return
|
||||
|
||||
config.ipintel_rating_kick = num
|
||||
GLOB.config.ipintel_rating_kick = num
|
||||
if (num)
|
||||
log_and_message_admins("has set the IPIntel kick threshold to [num].")
|
||||
else
|
||||
log_and_message_admins("has disabled kicking based on IPIntel.")
|
||||
if ("new_players")
|
||||
config.access_deny_new_players = !config.access_deny_new_players
|
||||
log_and_message_admins("has [config.access_deny_new_players ? "ENABLED" : "DISABLED"] the kicking of new players.")
|
||||
GLOB.config.access_deny_new_players = !GLOB.config.access_deny_new_players
|
||||
log_and_message_admins("has [GLOB.config.access_deny_new_players ? "ENABLED" : "DISABLED"] the kicking of new players.")
|
||||
if ("new_accounts")
|
||||
var/num = input("Please set the new threshold for denying access based on BYOND account age. (-1 to disable.)", "New Threshold", config.access_deny_new_accounts) as num
|
||||
var/num = input("Please set the new threshold for denying access based on BYOND account age. (-1 to disable.)", "New Threshold", GLOB.config.access_deny_new_accounts) as num
|
||||
if (num < 0 && num != -1)
|
||||
to_chat(usr, "<span class='warning'>Invalid number. Cancelling.</span>")
|
||||
return
|
||||
|
||||
config.access_deny_new_accounts = num
|
||||
GLOB.config.access_deny_new_accounts = num
|
||||
if (num != -1)
|
||||
log_and_message_admins("has set the access barrier for new BYOND accounts to [num] days.")
|
||||
else
|
||||
@@ -89,25 +89,25 @@
|
||||
if ("vm_warn")
|
||||
var/num = input("Please set the new threshold for warning on login based on positive VM identifiers. (0 to disable.)", "New Threshold") in list(0, 1, 2)
|
||||
|
||||
config.access_warn_vms = num
|
||||
GLOB.config.access_warn_vms = num
|
||||
if (num)
|
||||
log_and_message_admins("has set players with [config.access_warn_vms] positive identifiers out of 2 for VM usage to be warned.")
|
||||
log_and_message_admins("has set players with [GLOB.config.access_warn_vms] positive identifiers out of 2 for VM usage to be warned.")
|
||||
else
|
||||
log_and_message_admins("has disabled warnings based on potential VM usage.")
|
||||
if ("vm_kick")
|
||||
var/num = input("Please set the new threshold for warning on login based on positive VM identifiers. (0 to disable.)", "New Threshold") in list(0, 1, 2)
|
||||
|
||||
config.access_deny_vms = num
|
||||
GLOB.config.access_deny_vms = num
|
||||
if (num)
|
||||
log_and_message_admins("has set players with [config.access_deny_vms] positive identifiers out of 2 for VM usage to be warned.")
|
||||
log_and_message_admins("has set players with [GLOB.config.access_deny_vms] positive identifiers out of 2 for VM usage to be warned.")
|
||||
else
|
||||
log_and_message_admins("has disabled warnings based on potential VM usage.")
|
||||
if ("hub")
|
||||
togglehubvisibility()
|
||||
if ("external_auth")
|
||||
config.external_auth = !config.external_auth
|
||||
GLOB.config.external_auth = !GLOB.config.external_auth
|
||||
if ("guest")
|
||||
config.guests_allowed = !config.guests_allowed
|
||||
GLOB.config.guests_allowed = !GLOB.config.guests_allowed
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>Unknown control message sent. Cancelling.</span>")
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
//explode the input msg into a list
|
||||
var/list/msglist = splittext(msg, " ")
|
||||
|
||||
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
|
||||
|
||||
@@ -116,7 +116,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
var/admin_number_present = 0
|
||||
var/admin_number_afk = 0
|
||||
|
||||
for(var/s in staff)
|
||||
for(var/s in GLOB.staff)
|
||||
var/client/C = s
|
||||
if((R_ADMIN|R_MOD) & C.holder.rights)
|
||||
admin_number_present++
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/mob/abstract/observer/on_mob_jump()
|
||||
stop_following()
|
||||
|
||||
/client/proc/Jump(var/area/A in all_areas)
|
||||
/client/proc/Jump(var/area/A in GLOB.all_areas)
|
||||
set name = "Jump to Area"
|
||||
set desc = "Area to jump to"
|
||||
set category = "Admin"
|
||||
@@ -15,7 +15,7 @@
|
||||
if(istype(usr, /mob/abstract/new_player))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
usr.on_mob_jump()
|
||||
usr.forceMove(pick(get_area_turfs(A)))
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(isnewplayer(usr))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]",admin_key=key_name(usr))
|
||||
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
|
||||
usr.on_mob_jump()
|
||||
@@ -45,7 +45,7 @@
|
||||
alert("Admin jumping disabled")
|
||||
return
|
||||
|
||||
/client/proc/jumptomob(var/mob/M in mob_list)
|
||||
/client/proc/jumptomob(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Jump to Mob Admin"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
if(isnewplayer(usr))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]", admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||
if(src.mob)
|
||||
@@ -77,7 +77,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
|
||||
return
|
||||
|
||||
if (config.allow_admin_jump)
|
||||
if (GLOB.config.allow_admin_jump)
|
||||
if(src.mob)
|
||||
var/mob/A = src.mob
|
||||
A.on_mob_jump()
|
||||
@@ -97,7 +97,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
var/list/zlevels = list()
|
||||
for(var/z=0, z<world.maxz, z++)
|
||||
zlevels += z
|
||||
@@ -123,7 +123,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
var/list/shuttles = list()
|
||||
for(var/shuttle_tag in SSshuttle.shuttles)
|
||||
shuttles += shuttle_tag
|
||||
@@ -147,7 +147,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
var/list/ships = list()
|
||||
for(var/ship in SSshuttle.ships)
|
||||
ships += ship
|
||||
@@ -171,7 +171,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
var/list/sectors = list()
|
||||
for(var/sector in SSshuttle.initialized_sectors)
|
||||
sectors += sector
|
||||
@@ -198,9 +198,9 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
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)
|
||||
@@ -215,13 +215,13 @@
|
||||
else
|
||||
alert("Admin jumping disabled")
|
||||
|
||||
/client/proc/Getmob(var/mob/M in mob_list)
|
||||
/client/proc/Getmob(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
|
||||
M.on_mob_jump()
|
||||
@@ -238,9 +238,9 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
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)
|
||||
@@ -263,9 +263,9 @@
|
||||
set name = "Send Mob"
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in all_areas
|
||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in GLOB.all_areas
|
||||
if(A)
|
||||
if(config.allow_admin_jump)
|
||||
if(GLOB.config.allow_admin_jump)
|
||||
M.on_mob_jump()
|
||||
M.forceMove(pick(get_area_turfs(A)))
|
||||
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//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 as mob in mob_list)
|
||||
/client/proc/cmd_admin_pm_context(mob/M as mob in GLOB.mob_list)
|
||||
set category = null
|
||||
set name = "Admin PM Mob"
|
||||
if(!holder)
|
||||
@@ -17,7 +17,7 @@
|
||||
to_chat(src, "<span class='warning'>Error: Admin-PM-Panel: Only administrators may use this command.</span>")
|
||||
return
|
||||
var/list/client/targets[0]
|
||||
for(var/p in clients)
|
||||
for(var/p in GLOB.clients)
|
||||
var/client/T = p
|
||||
if(T.mob)
|
||||
if(istype(T.mob, /mob/abstract/new_player))
|
||||
@@ -114,7 +114,7 @@
|
||||
C.adminhelped = NOT_ADMINHELPED
|
||||
|
||||
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
|
||||
if(config.popup_admin_pm)
|
||||
if(GLOB.config.popup_admin_pm)
|
||||
spawn(0) //so we don't hold the caller proc up
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
@@ -154,7 +154,7 @@
|
||||
ticket.append_message(src.ckey, C.ckey, msg)
|
||||
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
for(var/s in staff)
|
||||
for(var/s in GLOB.staff)
|
||||
var/client/X = s
|
||||
//check client/X is an admin and isn't the sender or recipient
|
||||
if(X == C || X == src)
|
||||
@@ -181,7 +181,7 @@
|
||||
to_chat(src, "<span class='pm'><span class='out'>" + create_text_tag("PM <-", src) + " to <span class='name'>Discord-[sender]</span>: <span class='message linkify'>[msg]</span></span></span>")
|
||||
|
||||
log_admin("PM: [key_name(src)]->Discord-[sender]: [msg]")
|
||||
for(var/s in staff)
|
||||
for(var/s in GLOB.staff)
|
||||
var/client/C = s
|
||||
if(C == src)
|
||||
continue
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
log_admin("ADMIN: [key_name(src)] : [msg]",admin_key=key_name(src))
|
||||
|
||||
if(check_rights(R_ADMIN,0))
|
||||
for(var/s in staff)
|
||||
for(var/s in GLOB.staff)
|
||||
var/client/C = s
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
to_chat(C, "<span class='admin_channel'>" + create_text_tag("ADMIN", C) + " <span class='name'>[key_name(usr, 1)]</span>([admin_jump_link(mob, src)]): <span class='message linkify'>[msg]</span></span>")
|
||||
@@ -33,7 +33,7 @@
|
||||
var/sender_name = key_name(usr, 1)
|
||||
if(check_rights(R_ADMIN, 0))
|
||||
sender_name = "<span class='admin'>[sender_name]</span>"
|
||||
for(var/s in staff)
|
||||
for(var/s in GLOB.staff)
|
||||
var/client/C = s
|
||||
if ((R_ADMIN|R_MOD) & C.holder.rights)
|
||||
to_chat(C, "<span class='mod_channel'>" + create_text_tag("MOD", C) + " <span class='name'>[sender_name]</span>(<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message linkify'>[msg]</span></span>")
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
if(check_rights(R_DEV,0))
|
||||
msg = "<span class='devsay'>[create_text_tag("DEV")] <EM>[key_name(usr, 0, 1, 0)]</EM>: <span class='message linkify'>[msg]</span></span>"
|
||||
for(var/s in staff)
|
||||
for(var/s in GLOB.staff)
|
||||
var/client/C = s
|
||||
if(C.holder.rights & (R_ADMIN|R_DEV))
|
||||
to_chat(C, msg)
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
if(check_rights((R_CCIAA|R_ADMIN),0))
|
||||
msg = "<span class='cciaasay'>[create_text_tag("CCIA")] <EM>[key_name(usr, 0, 1, 0)]</EM>: <span class='message linkify'>[msg]</span></span>"
|
||||
for(var/s in staff)
|
||||
for(var/s in GLOB.staff)
|
||||
var/client/C = s
|
||||
if(C.holder.rights & (R_ADMIN|R_CCIAA))
|
||||
to_chat(C, msg)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if (holder.fakekey)
|
||||
display_name = holder.fakekey
|
||||
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if (check_rights(R_ADMIN|R_MOD|R_CCIAA, 0, M) && M.client.aooc_mute_holder_check() == FALSE)
|
||||
to_chat(M, "<span class='aooc'>" + create_text_tag("A-OOC", M.client) + " <EM>[get_options_bar(src, 0, 1, 1)](<A HREF='?_src_=holder;adminplayerobservejump=\ref[src.mob]'>JMP</A>):</EM> <span class='message linkify'>[msg]</span></span>")
|
||||
else if (M.mind && M.mind.special_role && M.client && player_is_antag(M.mind))
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
to_chat(usr, "Checking for overlapping pipes...")
|
||||
next_turf:
|
||||
for(var/turf/T in world)
|
||||
for(var/dir in cardinal)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
var/list/connect_types = list(1 = 0, 2 = 0, 3 = 0)
|
||||
for(var/obj/machinery/atmospherics/pipe in T)
|
||||
if(dir & pipe.initialize_directions)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
return 1
|
||||
|
||||
/client/proc/bst_post_spawn(mob/living/carbon/human/bst/bst)
|
||||
spark(bst, 3, alldirs)
|
||||
spark(bst, 3, GLOB.alldirs)
|
||||
bst.anchored = FALSE
|
||||
|
||||
/mob/living/carbon/human/bst
|
||||
@@ -164,7 +164,7 @@
|
||||
return
|
||||
|
||||
src.custom_emote(VISIBLE_MESSAGE,"presses a button on their suit, followed by a polite bow.")
|
||||
spark(src, 5, alldirs)
|
||||
spark(src, 5, GLOB.alldirs)
|
||||
QDEL_IN(src, 10)
|
||||
animate(src, alpha = 0, time = 9, easing = QUAD_EASING)
|
||||
if(key)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/proc/togglebuildmode(mob/M as mob in player_list)
|
||||
/proc/togglebuildmode(mob/M as mob in GLOB.player_list)
|
||||
set name = "Toggle Build Mode"
|
||||
set category = "Special Verbs"
|
||||
if(M.client)
|
||||
@@ -211,7 +211,7 @@
|
||||
if("number")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
|
||||
if("mob-reference")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in mob_list
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in GLOB.mob_list
|
||||
if("obj-reference")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
|
||||
if("turf-reference")
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null, MAX_BOOK_MESSAGE_LEN, extra = 0)
|
||||
var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg) as message|null, MAX_BOOK_MESSAGE_LEN, extra = 0)
|
||||
if(!input || input == "")
|
||||
custom_event_msg = null
|
||||
GLOB.custom_event_msg = null
|
||||
log_admin("[usr.key] has cleared the custom event text.",admin_key=key_name(usr))
|
||||
message_admins("[key_name_admin(usr)] has cleared the custom event text.")
|
||||
return
|
||||
@@ -17,11 +17,11 @@
|
||||
log_admin("[usr.key] has changed the custom event text.",admin_key=key_name(usr))
|
||||
message_admins("[key_name_admin(usr)] has changed the custom event text.")
|
||||
|
||||
custom_event_msg = input
|
||||
GLOB.custom_event_msg = input
|
||||
|
||||
to_world("<h1 class='alert'>Custom Event</h1>")
|
||||
to_world("<h2 class='alert'>A custom event is starting. OOC Info:</h2>")
|
||||
to_world("<span class='alert'>[custom_event_msg]</span>")
|
||||
to_world("<span class='alert'>[GLOB.custom_event_msg]</span>")
|
||||
to_world("<br>")
|
||||
|
||||
// normal verb for players to view info
|
||||
@@ -29,12 +29,12 @@
|
||||
set category = "OOC"
|
||||
set name = "Custom Event Info"
|
||||
|
||||
if(!custom_event_msg || custom_event_msg == "")
|
||||
if(!GLOB.custom_event_msg || GLOB.custom_event_msg == "")
|
||||
to_chat(src, "There currently is no known custom event taking place.")
|
||||
to_chat(src, "Keep in mind: it is possible that an admin has not properly set this.")
|
||||
return
|
||||
|
||||
to_chat(src, "<h1 class='alert'>Custom Event</h1>")
|
||||
to_chat(src, "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>")
|
||||
to_chat(src, "<span class='alert'>[custom_event_msg]</span>")
|
||||
to_chat(src, "<span class='alert'>[GLOB.custom_event_msg]</span>")
|
||||
to_chat(src, "<br>")
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
set name = "Debug-Game"
|
||||
if(!check_rights(R_DEBUG|R_DEV)) 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.",admin_key=key_name(usr))
|
||||
else
|
||||
Debug2 = 1
|
||||
GLOB.Debug2 = 1
|
||||
message_admins("[key_name(src)] toggled debugging on.")
|
||||
log_admin("[key_name(src)] toggled debugging on.",admin_key=key_name(usr))
|
||||
|
||||
switch(alert("Do you want to print all logs to world? This should ONLY EVER HAPPEN IN CRISIS OR DURING DEBUGGING / DEVELOPMENT.", "All logs to world?", "No", "Yes"))
|
||||
if("Yes")
|
||||
config.all_logs_to_chat = 1
|
||||
GLOB.config.all_logs_to_chat = 1
|
||||
else
|
||||
config.all_logs_to_chat = 0
|
||||
GLOB.config.all_logs_to_chat = 0
|
||||
|
||||
feedback_add_details("admin_verb","DG2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
set name = "Debugs Toggle"
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
var/target = input(usr, "Select which log to toggle", "Debugs Toggle", null) in sortAssoc(config.logsettings)
|
||||
var/target = input(usr, "Select which log to toggle", "Debugs Toggle", null) in sortAssoc(GLOB.config.logsettings)
|
||||
if(target)
|
||||
config.logsettings[target] = !config.logsettings[target]
|
||||
to_chat(usr, "The log category [target] is now [config.logsettings[target]]")
|
||||
GLOB.config.logsettings[target] = !GLOB.config.logsettings[target]
|
||||
to_chat(usr, "The log category [target] is now [GLOB.config.logsettings[target]]")
|
||||
|
||||
/client/proc/DebugToggleAll()
|
||||
set category = "Debug"
|
||||
@@ -37,8 +37,8 @@
|
||||
|
||||
switch(alert("Do you want to turn on ALL LOGS?.", "All logs to ON?", "No", "Yes"))
|
||||
if("Yes")
|
||||
for(var/k in config.logsettings)
|
||||
config.logsettings[k] = TRUE
|
||||
for(var/k in GLOB.config.logsettings)
|
||||
GLOB.config.logsettings[k] = TRUE
|
||||
|
||||
// callproc moved to code/modules/admin/callproc
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
usr.show_message(t, 1)
|
||||
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(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_robotize(var/mob/M in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make Robot"
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_animalize(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_animalize(var/mob/M in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make Simple Animal"
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
M.Animalize()
|
||||
|
||||
|
||||
/client/proc/cmd_admin_slimeize(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_slimeize(var/mob/M in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make slime"
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
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(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_grantfullaccess(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Grant Full Access"
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
log_admin("[key_name(src)] has granted [M.key] full access.",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has granted [M.key] full access.</span>", 1)
|
||||
|
||||
/client/proc/cmd_assume_direct_control(var/mob/M in mob_list)
|
||||
/client/proc/cmd_assume_direct_control(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Assume direct control"
|
||||
set desc = "Direct intervention"
|
||||
@@ -288,7 +288,7 @@
|
||||
var/list/chosen_observers = list()
|
||||
var/next_observer = "NotGeeves"
|
||||
while(next_observer)
|
||||
var/list/valid_choices = player_list.Copy()
|
||||
var/list/valid_choices = GLOB.player_list.Copy()
|
||||
for(var/choice in valid_choices)
|
||||
if(choice in chosen_observers)
|
||||
valid_choices -= choice
|
||||
@@ -305,7 +305,7 @@
|
||||
H.ckey = O.ckey
|
||||
qdel(O)
|
||||
|
||||
/client/proc/cmd_admin_dress(mob/living/carbon/human/H in human_mob_list)
|
||||
/client/proc/cmd_admin_dress(mob/living/carbon/human/H in GLOB.human_mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Set Human Outfit"
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
|
||||
/client/proc/do_dressing(var/mob/living/carbon/human/M = null)
|
||||
if(!M || !istype(M))
|
||||
M = input("Select a mob you would like to dress.", "Set Human Outfit") as null|anything in human_mob_list
|
||||
M = input("Select a mob you would like to dress.", "Set Human Outfit") as null|anything in GLOB.human_mob_list
|
||||
if(!M)
|
||||
return
|
||||
|
||||
@@ -388,19 +388,19 @@
|
||||
|
||||
switch(input("Which list?") in list("Players","Staff","Mobs","Living Mobs","Dead Mobs","Frozen Mobs","Clients"))
|
||||
if("Players")
|
||||
to_chat(usr, jointext(player_list,", "))
|
||||
to_chat(usr, jointext(GLOB.player_list,", "))
|
||||
if("Staff")
|
||||
to_chat(usr, jointext(staff,", "))
|
||||
to_chat(usr, jointext(GLOB.staff,", "))
|
||||
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("Frozen Mobs")
|
||||
to_chat(usr, jointext(frozen_crew,", "))
|
||||
to_chat(usr, jointext(GLOB.frozen_crew,", "))
|
||||
if("Clients")
|
||||
to_chat(usr, jointext(clients,", "))
|
||||
to_chat(usr, jointext(GLOB.clients,", "))
|
||||
|
||||
// DNA2 - Admin Hax
|
||||
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
var/largest_click_time = 0
|
||||
var/mob/largest_move_mob = null
|
||||
var/mob/largest_click_mob = null
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(!M.client)
|
||||
continue
|
||||
if(M.next_move >= largest_move_time)
|
||||
@@ -105,7 +105,7 @@
|
||||
if(!check_rights(R_SERVER|R_DEV))
|
||||
return
|
||||
|
||||
if (config.use_forumuser_api)
|
||||
if (GLOB.config.use_forumuser_api)
|
||||
update_admins_from_api(FALSE)
|
||||
|
||||
log_and_message_admins("manually reloaded admins.")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
if(!check_rights(R_DEBUG|R_DEV))
|
||||
return
|
||||
|
||||
var/cfg_fps = (10 / config.Ticklag)
|
||||
var/cfg_fps = (10 / GLOB.config.Ticklag)
|
||||
var/new_fps = round(input("Sets game frames-per-second. Can potentially break the game (default: [cfg_fps])","FPS", world.fps) as num|null)
|
||||
|
||||
if(new_fps <= 0)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
to_chat(src, "<span class='warning'>Only Admins may use this command.</span>")
|
||||
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, "<span class='warning'>Error: giveruntimelog(): Client not found.</span>")
|
||||
return
|
||||
@@ -85,7 +85,7 @@
|
||||
set category = "Admin"
|
||||
|
||||
var/text_signal_log = ""
|
||||
for(var/log in signal_log)
|
||||
for(var/log in GLOB.signal_log)
|
||||
text_signal_log += "[log]<br>"
|
||||
|
||||
var/datum/browser/signal_win = new(usr, "signallog", "Signal Log", 550, 500)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
return
|
||||
|
||||
var/rounded_wtime = round(world.time)
|
||||
rustg_file_write(file2text(map), "data/logs/[diary_date_string]_[rounded_wtime]_[map]")
|
||||
rustg_file_write(file2text(map), "data/logs/[GLOB.diary_date_string]_[rounded_wtime]_[map]")
|
||||
|
||||
var/datum/map_template/M = new(list(map), "[map]")
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ var/intercom_range_display_status = 0
|
||||
qdel(C)
|
||||
|
||||
if(camera_range_display_status)
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
new/obj/effect/debugging/camera_range(C.loc)
|
||||
feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -72,7 +72,7 @@ var/intercom_range_display_status = 0
|
||||
|
||||
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)
|
||||
if (isturf(C.loc))
|
||||
CL += C
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
O.vars[variable] = initial_var
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
if(variable=="light_range")
|
||||
M.set_light(new_value)
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if (M.type == O.type)
|
||||
if(variable=="light_range")
|
||||
M.set_light(new_value)
|
||||
@@ -284,7 +284,7 @@
|
||||
O.vars[variable] = new_value
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
O.vars[variable] = new_value
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -383,7 +383,7 @@
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ var/list/VVicon_edit_lock = list("icon", "icon_state", "overlays", "underlays")
|
||||
var/list/VVckey_edit = list("key", "ckey")
|
||||
|
||||
// The paranoia box. Specify a var name => bitflags required to edit it.
|
||||
// Allows the securing of specific variables for, for example, config. That alter
|
||||
// Allows the securing of specific variables for, for example, GLOB.config. That alter
|
||||
// how players could join! Definitely not something you want folks to touch if they
|
||||
// don't have the perms.
|
||||
var/list/VVdynamic_lock = list(
|
||||
@@ -619,11 +619,11 @@ var/list/VVdynamic_lock = list(
|
||||
return
|
||||
|
||||
if((O.vars[variable] == 2) && (var_new < 2))//Bringing the dead back to life
|
||||
dead_mob_list -= O
|
||||
living_mob_list += O
|
||||
GLOB.dead_mob_list -= O
|
||||
GLOB.living_mob_list += O
|
||||
if((O.vars[variable] < 2) && (var_new == 2))//Kill he
|
||||
living_mob_list -= O
|
||||
dead_mob_list += O
|
||||
GLOB.living_mob_list -= O
|
||||
GLOB.dead_mob_list += O
|
||||
O.vars[variable] = var_new
|
||||
else
|
||||
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
|
||||
|
||||
@@ -15,7 +15,7 @@ var/list/sounds_cache = list()
|
||||
|
||||
log_admin("[key_name(src)] played sound [S]",admin_key=key_name(src))
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client.prefs.toggles & SOUND_MIDI)
|
||||
sound_to(M, uploaded_sound)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set category = "Object"
|
||||
|
||||
if(istype(O,/obj/singularity))
|
||||
if(config.forbid_singulo_possession)
|
||||
if(GLOB.config.forbid_singulo_possession)
|
||||
to_chat(usr, "It is forbidden to possess singularities.")
|
||||
return
|
||||
|
||||
@@ -44,7 +44,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 as mob in mob_list)
|
||||
/proc/givetestverbs(mob/M as mob in GLOB.mob_list)
|
||||
set desc = "Give this guy possess/release verbs"
|
||||
set category = "Debug"
|
||||
set name = "Give Possessing Verbs"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/image/cross = image('icons/obj/library.dmi',"bible")
|
||||
msg = "<span class='notice'>[icon2html(cross, src)] <b><font color=purple>PRAY: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) ([admin_jump_link(src, src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]</span>"
|
||||
|
||||
for(var/s in staff)
|
||||
for(var/s in GLOB.staff)
|
||||
var/client/C = s
|
||||
if(C.holder.rights & (R_ADMIN|R_MOD|R_FUN))
|
||||
if(C.prefs.toggles & CHAT_PRAYER)
|
||||
@@ -32,7 +32,7 @@
|
||||
var/cciaa_present = 0
|
||||
var/cciaa_afk = 0
|
||||
|
||||
for(var/s in staff)
|
||||
for(var/s in GLOB.staff)
|
||||
var/client/C = s
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
to_chat(C, msg_admin)
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
/proc/Syndicate_announce(var/msg, var/mob/Sender)
|
||||
msg = "<span class='notice'><b><font color=crimson>ILLEGAL:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
for(var/s in staff)
|
||||
for(var/s in GLOB.staff)
|
||||
var/client/C = s
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
to_chat(C, msg)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/client/proc/cmd_admin_drop_everything(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_drop_everything(mob/M as mob in GLOB.mob_list)
|
||||
set category = null
|
||||
set name = "Drop Everything"
|
||||
if(!holder)
|
||||
@@ -17,7 +17,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 as mob in mob_list)
|
||||
/client/proc/cmd_admin_subtle_message(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Subtle Message"
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(!check_rights(R_MOD|R_ADMIN, 0))
|
||||
highlight_special_characters = 0
|
||||
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(C.player_age == "Requires database")
|
||||
missing_ages = 1
|
||||
continue
|
||||
@@ -143,7 +143,7 @@
|
||||
message_admins("<span class='notice'>\bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR></span>", 1)
|
||||
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_godmode(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_godmode(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Godmode"
|
||||
if(!holder)
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
/proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
if(automute)
|
||||
if(!config.automute_on) return
|
||||
if(!GLOB.config.automute_on) return
|
||||
else
|
||||
if(!usr || !usr.client)
|
||||
return
|
||||
@@ -237,7 +237,7 @@ Ccomp's first proc.
|
||||
|
||||
var/list/mobs = list()
|
||||
var/list/ghosts = list()
|
||||
var/list/sortmob = sortAtom(mob_list) // get the mob list.
|
||||
var/list/sortmob = sortAtom(GLOB.mob_list) // get the mob list.
|
||||
var/any=0
|
||||
for(var/mob/abstract/observer/M in sortmob)
|
||||
mobs.Add(M) //filter it where it's only ghosts
|
||||
@@ -270,7 +270,7 @@ Ccomp's first proc.
|
||||
return
|
||||
|
||||
var/mob/abstract/observer/G = ghosts[target]
|
||||
if(G.has_enabled_antagHUD && config.antag_hud_restricted)
|
||||
if(G.has_enabled_antagHUD && GLOB.config.antag_hud_restricted)
|
||||
var/response = alert(src, "Are you sure you wish to allow this individual to play?","Ghost has used AntagHUD","Yes","No")
|
||||
if(response == "No") return
|
||||
|
||||
@@ -294,8 +294,8 @@ Ccomp's first proc.
|
||||
G.can_reenter_corpse = 1
|
||||
|
||||
G:show_message(text("<span class='notice'><B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B></span>"), 1)
|
||||
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the [config.respawn_delay] minute respawn limit", admin_key=key_name(usr), ckey=key_name(G))
|
||||
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the [config.respawn_delay] minute respawn limit", 1)
|
||||
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the [GLOB.config.respawn_delay] minute respawn limit", admin_key=key_name(usr), ckey=key_name(G))
|
||||
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the [GLOB.config.respawn_delay] minute respawn limit", 1)
|
||||
|
||||
/client/proc/allow_stationbound_reset(mob/living/silicon/robot/R in range(world.view))
|
||||
set category = "Special Verbs"
|
||||
@@ -329,7 +329,7 @@ Ccomp's first proc.
|
||||
if(!holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
var/action=""
|
||||
if(config.antag_hud_allowed)
|
||||
if(GLOB.config.antag_hud_allowed)
|
||||
for(var/mob/abstract/observer/g in get_ghosts())
|
||||
if(!g.client.holder) //Remove the verb from non-admin ghosts
|
||||
remove_verb(g, /mob/abstract/observer/verb/toggle_antagHUD)
|
||||
@@ -337,7 +337,7 @@ Ccomp's first proc.
|
||||
g.antagHUD = 0 // Disable it on those that have it enabled
|
||||
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
|
||||
to_chat(g, "<span class='warning'>The Administrator has disabled AntagHUD.</span> ")
|
||||
config.antag_hud_allowed = 0
|
||||
GLOB.config.antag_hud_allowed = 0
|
||||
to_chat(src, "<span class='danger'>AntagHUD usage has been disabled.</span>")
|
||||
action = "disabled"
|
||||
else
|
||||
@@ -345,7 +345,7 @@ Ccomp's first proc.
|
||||
if(!g.client.holder) // Add the verb back for all non-admin ghosts
|
||||
add_verb(g, /mob/abstract/observer/verb/toggle_antagHUD)
|
||||
to_chat(g, "<span class='notice'><B>The Administrator has enabled AntagHUD.</B></span>") // Notify all observers they can now use AntagHUD)
|
||||
config.antag_hud_allowed = 1
|
||||
GLOB.config.antag_hud_allowed = 1
|
||||
action = "enabled"
|
||||
to_chat(src, "<span class='notice'><B>AntagHUD usage has been enabled.</B></span>")
|
||||
|
||||
@@ -362,11 +362,11 @@ Ccomp's first proc.
|
||||
if(!holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
var/action=""
|
||||
if(config.antag_hud_restricted)
|
||||
if(GLOB.config.antag_hud_restricted)
|
||||
for(var/mob/abstract/observer/g in get_ghosts())
|
||||
to_chat(g, "<span class='notice'><B>The administrator has lifted restrictions on joining the round if you use AntagHUD</B></span>")
|
||||
action = "lifted restrictions"
|
||||
config.antag_hud_restricted = 0
|
||||
GLOB.config.antag_hud_restricted = 0
|
||||
to_chat(src, "<span class='notice'><B>AntagHUD restrictions have been lifted</B></span>")
|
||||
else
|
||||
for(var/mob/abstract/observer/g in get_ghosts())
|
||||
@@ -375,7 +375,7 @@ Ccomp's first proc.
|
||||
g.antagHUD = 0
|
||||
g.has_enabled_antagHUD = 0
|
||||
action = "placed restrictions"
|
||||
config.antag_hud_restricted = 1
|
||||
GLOB.config.antag_hud_restricted = 1
|
||||
to_chat(src, "<span class='danger'>AntagHUD restrictions have been enabled</span>")
|
||||
|
||||
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD",admin_key=key_name(usr))
|
||||
@@ -399,7 +399,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
var/mob/abstract/observer/G_found
|
||||
for(var/mob/abstract/observer/G in player_list)
|
||||
for(var/mob/abstract/observer/G in GLOB.player_list)
|
||||
if(G.ckey == input)
|
||||
G_found = G
|
||||
break
|
||||
@@ -408,7 +408,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
to_chat(usr, "<span class='warning'>There is no active key like that in the game or the person is not currently a ghost.</span>")
|
||||
return
|
||||
|
||||
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/record/general/locked/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
|
||||
@@ -505,12 +505,12 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/input = sanitize(input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null)
|
||||
if(!input)
|
||||
return
|
||||
for(var/mob/living/silicon/ai/M in mob_list)
|
||||
for(var/mob/living/silicon/ai/M in GLOB.mob_list)
|
||||
if (M.stat == 2)
|
||||
to_chat(usr, "Upload failed. No signal is being detected from the AI.")
|
||||
else
|
||||
M.add_ion_law(input)
|
||||
for(var/mob/living/silicon/ai/O in mob_list)
|
||||
for(var/mob/living/silicon/ai/O in GLOB.mob_list)
|
||||
to_chat(O, "<span class='danger'>" + input + "...LAWS UPDATED</span>")
|
||||
O.show_laws()
|
||||
|
||||
@@ -522,7 +522,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
command_announcement.Announce("Incoming ion storm detected near the ship. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
|
||||
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 as mob in mob_list)
|
||||
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Rejuvenate"
|
||||
if(!holder)
|
||||
@@ -533,7 +533,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!istype(M))
|
||||
alert("Cannot revive a ghost")
|
||||
return
|
||||
if(config.allow_admin_rev)
|
||||
if(GLOB.config.allow_admin_rev)
|
||||
M.revive()
|
||||
|
||||
log_admin("[key_name(usr)] healed / revived [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
|
||||
@@ -558,10 +558,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
switch(reporttype)
|
||||
if("Template")
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
to_chat(src, "<span class='notice'>Unable to connect to the database.</span>")
|
||||
return
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT title, message FROM ss13_ccia_general_notice_list WHERE deleted_at IS NULL")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT title, message FROM ss13_ccia_general_notice_list WHERE deleted_at IS NULL")
|
||||
query.Execute()
|
||||
|
||||
var/list/template_names = list()
|
||||
@@ -706,7 +706,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
else
|
||||
return
|
||||
|
||||
/client/proc/cmd_admin_gib(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_gib(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Gib"
|
||||
|
||||
@@ -742,7 +742,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] used gibself.</span>", 1)
|
||||
feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_dust(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_dust(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Turn to dust"
|
||||
|
||||
@@ -797,7 +797,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
to_chat(M, "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/")
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=[mins]&server=[replacetext(config.server_name, "#", "")]")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=[mins]&server=[replacetext(GLOB.config.server_name, "#", "")]")
|
||||
del(M.client)
|
||||
qdel(M)
|
||||
else
|
||||
@@ -812,7 +812,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
to_chat(M, "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/")
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=perma&server=[replacetext(config.server_name, "#", "")]")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=perma&server=[replacetext(GLOB.config.server_name, "#", "")]")
|
||||
del(M.client)
|
||||
qdel(M)
|
||||
*/
|
||||
@@ -822,7 +822,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
// I will both remove their SVN access and permanently ban them from my servers.
|
||||
return
|
||||
|
||||
/client/proc/cmd_admin_check_contents(mob/living/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_check_contents(mob/living/M as mob in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Check Contents"
|
||||
|
||||
@@ -961,7 +961,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
log_admin("[key_name(src)] has [evacuation_controller.deny ? "denied" : "allowed"] the evacuation to be called.",admin_key=key_name(usr))
|
||||
message_admins("[key_name_admin(usr)] has [evacuation_controller.deny ? "denied" : "allowed"] the evacuation to be called.")
|
||||
|
||||
/client/proc/cmd_admin_attack_log(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_attack_log(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Attack Log"
|
||||
|
||||
@@ -1012,12 +1012,12 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
|
||||
if(!check_rights(R_SERVER)) return
|
||||
|
||||
if(!config.allow_random_events)
|
||||
config.allow_random_events = 1
|
||||
if(!GLOB.config.allow_random_events)
|
||||
GLOB.config.allow_random_events = 1
|
||||
to_chat(usr, "Random events enabled")
|
||||
message_admins("Admin [key_name_admin(usr)] has enabled random events.", 1)
|
||||
else
|
||||
config.allow_random_events = 0
|
||||
GLOB.config.allow_random_events = 0
|
||||
to_chat(usr, "Random events disabled")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
|
||||
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -1050,17 +1050,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
var/list/possible_categories = list("Random") + tips_by_category.Copy()
|
||||
var/list/possible_categories = list("Random") + GLOB.tips_by_category.Copy()
|
||||
var/input = input(usr, "Please specify the tip category that you want to send to the players.", "Tip", "Random") as null|anything in possible_categories
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/datum/tip/tip_datum
|
||||
if(input == "Random")
|
||||
var/chosen_tip_category = pick(tips_by_category)
|
||||
tip_datum = tips_by_category[chosen_tip_category]
|
||||
var/chosen_tip_category = pick(GLOB.tips_by_category)
|
||||
tip_datum = GLOB.tips_by_category[chosen_tip_category]
|
||||
else
|
||||
tip_datum = tips_by_category[input]
|
||||
tip_datum = GLOB.tips_by_category[input]
|
||||
|
||||
SSticker.send_tip_of_the_round(pick(tip_datum.messages))
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
if (!warned_ckey || !istext(warned_ckey))
|
||||
return
|
||||
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
to_chat(usr, "<span class='warning'>Error: warn(): Database Connection failed, reverting to legacy systems.</span>")
|
||||
usr.client.warn_legacy(warned_ckey)
|
||||
return
|
||||
@@ -30,19 +30,19 @@
|
||||
|
||||
var/warned_computerid = null
|
||||
var/warned_ip = null
|
||||
var/client/C = directory[warned_ckey]
|
||||
var/client/C = GLOB.directory[warned_ckey]
|
||||
if (C)
|
||||
warned_computerid = C.computer_id
|
||||
warned_ip = C.address
|
||||
else
|
||||
var/DBQuery/lookup_query = dbcon.NewQuery("SELECT ip, computerid FROM ss13_player WHERE ckey = :ckey:")
|
||||
var/DBQuery/lookup_query = GLOB.dbcon.NewQuery("SELECT ip, computerid FROM ss13_player WHERE ckey = :ckey:")
|
||||
lookup_query.Execute(list("ckey" = warned_ckey))
|
||||
|
||||
if (lookup_query.NextRow())
|
||||
warned_ip = lookup_query.item[1]
|
||||
warned_computerid = lookup_query.item[2]
|
||||
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO ss13_warnings (id, time, game_id, severity, reason, notes, ckey, computerid, ip, a_ckey, a_ip, a_computerid) VALUES (null, Now(), :game_id:, :warning_severity:, :warning_reason:, :warning_notes:, :warned_ckey:, :warned_computerid:, :warned_ip:, :a_ckey:, :a_ip:, :a_computerid:)")
|
||||
var/DBQuery/insert_query = GLOB.dbcon.NewQuery("INSERT INTO ss13_warnings (id, time, game_id, severity, reason, notes, ckey, computerid, ip, a_ckey, a_ip, a_computerid) VALUES (null, Now(), :game_id:, :warning_severity:, :warning_reason:, :warning_notes:, :warned_ckey:, :warned_computerid:, :warned_ip:, :a_ckey:, :a_ip:, :a_computerid:)")
|
||||
insert_query.Execute(list("game_id" = game_id,"warning_severity" = warning_severity, "warning_reason" = warning_reason, "warning_notes" = warning_notes, "warned_ckey" = warned_ckey, "warned_computerid" = warned_computerid, "warned_ip" = warned_ip, "a_ckey" = ckey, "a_ip" = address, "a_computerid" = computer_id))
|
||||
|
||||
notes_add_sql(warned_ckey, "Warning added by [ckey], for: [warning_reason]. || Notes regarding the warning: [warning_notes].", src, warned_ip, warned_computerid)
|
||||
@@ -66,7 +66,7 @@
|
||||
return
|
||||
|
||||
var/datum/preferences/D
|
||||
var/client/C = directory[warned_ckey]
|
||||
var/client/C = GLOB.directory[warned_ckey]
|
||||
if(C) D = C.prefs
|
||||
else D = preferences_datums[warned_ckey]
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
var/dcolor = "#ffaaaa" //dark colour, severity = 1
|
||||
var/ecolor = "#e3e3e3" //gray colour, expired = 1
|
||||
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
alert("Connection to the SQL database lost. Aborting. Please alert an Administrator or a member of staff.")
|
||||
return
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
// Notifications
|
||||
//
|
||||
|
||||
var/DBQuery/notification_query = dbcon.NewQuery({"SELECT
|
||||
var/DBQuery/notification_query = GLOB.dbcon.NewQuery({"SELECT
|
||||
id, message, created_by
|
||||
FROM ss13_player_notifications
|
||||
WHERE
|
||||
@@ -163,7 +163,7 @@
|
||||
dat += "<th width='60%'>REASON</th>"
|
||||
dat += "</tr>"
|
||||
|
||||
var/DBQuery/search_query = dbcon.NewQuery("SELECT id, time, severity, reason, a_ckey, acknowledged, expired FROM ss13_warnings WHERE visible = 1 AND (ckey = :ckey: OR computerid = :computer_id: OR ip = :address:) ORDER BY time DESC;")
|
||||
var/DBQuery/search_query = GLOB.dbcon.NewQuery("SELECT id, time, severity, reason, a_ckey, acknowledged, expired FROM ss13_warnings WHERE visible = 1 AND (ckey = :ckey: OR computerid = :computer_id: OR ip = :address:) ORDER BY time DESC;")
|
||||
search_query.Execute(list("ckey" = ckey, "computer_id" = computer_id, "address" = address))
|
||||
|
||||
while (search_query.NextRow())
|
||||
@@ -211,11 +211,11 @@
|
||||
if (!warning_id)
|
||||
return
|
||||
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
alert("Connection to SQL database failed while attempting to update your warning's status!")
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("UPDATE ss13_warnings SET acknowledged = 1 WHERE id = :warning_id:;")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("UPDATE ss13_warnings SET acknowledged = 1 WHERE id = :warning_id:;")
|
||||
query.Execute(list("warning_id" = warning_id))
|
||||
|
||||
warnings_check()
|
||||
@@ -226,11 +226,11 @@
|
||||
log_world("ERROR: Error: Argument ID for notificaton acknowledgement not supplied.")
|
||||
return
|
||||
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
log_world("ERROR: Unable to establish db connection during notification acknowledgement.")
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery({"UPDATE ss13_player_notifications
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery({"UPDATE ss13_player_notifications
|
||||
SET acked_by = :ckey:, acked_at = NOW()
|
||||
WHERE id = :id: AND ckey = :ckey:
|
||||
"})
|
||||
@@ -246,20 +246,20 @@
|
||||
var/count = 0
|
||||
var/count_expire = 0
|
||||
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
return
|
||||
|
||||
var/list/client_details = list("ckey" = ckey, "computer_id" = computer_id, "address" = address)
|
||||
|
||||
var/DBQuery/expire_query = dbcon.NewQuery("SELECT id FROM ss13_warnings WHERE (acknowledged = 1 AND expired = 0 AND DATE_SUB(CURDATE(),INTERVAL 3 MONTH) > time) AND (ckey = :ckey: OR computerid = :computer_id: OR ip = :address:)")
|
||||
var/DBQuery/expire_query = GLOB.dbcon.NewQuery("SELECT id FROM ss13_warnings WHERE (acknowledged = 1 AND expired = 0 AND DATE_SUB(CURDATE(),INTERVAL 3 MONTH) > time) AND (ckey = :ckey: OR computerid = :computer_id: OR ip = :address:)")
|
||||
expire_query.Execute(client_details)
|
||||
while (expire_query.NextRow())
|
||||
var/warning_id = text2num(expire_query.item[1])
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE ss13_warnings SET expired = 1 WHERE id = :warning_id:")
|
||||
var/DBQuery/update_query = GLOB.dbcon.NewQuery("UPDATE ss13_warnings SET expired = 1 WHERE id = :warning_id:")
|
||||
update_query.Execute(list("warning_id" = warning_id))
|
||||
count_expire++
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM ss13_warnings WHERE (visible = 1 AND acknowledged = 0 AND expired = 0) AND (ckey = :ckey: OR computerid = :computer_id: OR ip = :address:)")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT id FROM ss13_warnings WHERE (visible = 1 AND acknowledged = 0 AND expired = 0) AND (ckey = :ckey: OR computerid = :computer_id: OR ip = :address:)")
|
||||
query.Execute(client_details)
|
||||
while (query.NextRow())
|
||||
count++
|
||||
@@ -276,18 +276,18 @@
|
||||
* A proc used to gather if someone has Unacknowledged Warnings
|
||||
*/
|
||||
/client/proc/fetch_unacked_warning_count()
|
||||
if (!dbcon)
|
||||
if (!GLOB.dbcon)
|
||||
return
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
return
|
||||
var/count = 0
|
||||
|
||||
var/DBQuery/warning_count_query = dbcon.NewQuery("SELECT COUNT(*) FROM ss13_warnings WHERE (visible = 1 AND acknowledged = 0 AND expired = 0) AND (ckey = :ckey: OR computerid = :computer_id: OR ip = :address:)")
|
||||
var/DBQuery/warning_count_query = GLOB.dbcon.NewQuery("SELECT COUNT(*) FROM ss13_warnings WHERE (visible = 1 AND acknowledged = 0 AND expired = 0) AND (ckey = :ckey: OR computerid = :computer_id: OR ip = :address:)")
|
||||
warning_count_query.Execute(list("ckey" = ckey, "computer_id" = computer_id, "address" = address))
|
||||
if(warning_count_query.NextRow())
|
||||
count += text2num(warning_count_query.item[1])
|
||||
|
||||
var/DBQuery/notification_count_query = dbcon.NewQuery("SELECT COUNT(*) FROM ss13_player_notifications WHERE ckey = :ckey: AND acked_at is NULL and type IN ('player_greeting','player_greeting_chat')")
|
||||
var/DBQuery/notification_count_query = GLOB.dbcon.NewQuery("SELECT COUNT(*) FROM ss13_player_notifications WHERE ckey = :ckey: AND acked_at is NULL and type IN ('player_greeting','player_greeting_chat')")
|
||||
notification_count_query.Execute(list("ckey" = ckey))
|
||||
if(notification_count_query.NextRow())
|
||||
count += text2num(notification_count_query.item[1])
|
||||
@@ -317,7 +317,7 @@
|
||||
var/dcolor = "#ffdddd" //dark colour, severity = 1
|
||||
var/ecolor = "#e3e3e3" //gray colour, expired = 1
|
||||
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
alert("Connection to the SQL database lost. Aborting. Please alert the database admin!")
|
||||
return
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
paramtwo = "AND ckey = :ckey: "
|
||||
query_details["ckey"] = playerckey
|
||||
|
||||
var/DBQuery/search_query = dbcon.NewQuery("SELECT id, time, severity, reason, notes, ckey, a_ckey, acknowledged, expired, edited, lasteditor, lasteditdate FROM ss13_warnings WHERE visible = 1 [paramone] [paramtwo] ORDER BY time DESC;")
|
||||
var/DBQuery/search_query = GLOB.dbcon.NewQuery("SELECT id, time, severity, reason, notes, ckey, a_ckey, acknowledged, expired, edited, lasteditor, lasteditdate FROM ss13_warnings WHERE visible = 1 [paramone] [paramtwo] ORDER BY time DESC;")
|
||||
search_query.Execute(query_details)
|
||||
|
||||
while (search_query.NextRow())
|
||||
@@ -419,7 +419,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEV|R_CCIAA))
|
||||
return
|
||||
|
||||
if (!establish_db_connection(dbcon))
|
||||
if (!establish_db_connection(GLOB.dbcon))
|
||||
log_world("ERROR: Unable to establish db connection while adding a notification.")
|
||||
return
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
return
|
||||
|
||||
//Validate ckey
|
||||
var/DBQuery/validatequery = dbcon.NewQuery("SELECT id FROM ss13_player WHERE ckey = :ckey:")
|
||||
var/DBQuery/validatequery = GLOB.dbcon.NewQuery("SELECT id FROM ss13_player WHERE ckey = :ckey:")
|
||||
validatequery.Execute(list("ckey" = ckey))
|
||||
|
||||
if (validatequery.RowCount() == 0)
|
||||
@@ -450,7 +450,7 @@
|
||||
to_chat(usr,"You need to specify a notification message.")
|
||||
return
|
||||
|
||||
var/DBQuery/addquery = dbcon.NewQuery("INSERT INTO ss13_player_notifications (`ckey`, `type`, `message`, `created_by`) VALUES (:ckey:, :type:, :message:, :a_ckey:)")
|
||||
var/DBQuery/addquery = GLOB.dbcon.NewQuery("INSERT INTO ss13_player_notifications (`ckey`, `type`, `message`, `created_by`) VALUES (:ckey:, :type:, :message:, :a_ckey:)")
|
||||
addquery.Execute(list("ckey" = ckey, "type" = type, "message" = message, "a_ckey" = usr.ckey))
|
||||
to_chat(usr,"Notification added.")
|
||||
|
||||
@@ -463,7 +463,7 @@
|
||||
if(!warning_id || !warning_edit)
|
||||
return
|
||||
|
||||
if(!establish_db_connection(dbcon))
|
||||
if(!establish_db_connection(GLOB.dbcon))
|
||||
alert("Connection to the SQL database lost. Aborting. Please alert the database admin!")
|
||||
return
|
||||
|
||||
@@ -473,7 +473,7 @@
|
||||
var/notes
|
||||
var/list/query_details = list("warning_id" = warning_id, "a_ckey" = usr.ckey)
|
||||
|
||||
var/DBQuery/initial_query = dbcon.NewQuery("SELECT ckey, reason, notes FROM ss13_warnings WHERE id = :warning_id:")
|
||||
var/DBQuery/initial_query = GLOB.dbcon.NewQuery("SELECT ckey, reason, notes FROM ss13_warnings WHERE id = :warning_id:")
|
||||
initial_query.Execute(query_details)
|
||||
while (initial_query.NextRow())
|
||||
ckey = initial_query.item[1]
|
||||
@@ -494,7 +494,7 @@
|
||||
switch (warning_edit)
|
||||
if ("delete")
|
||||
if(alert("Delete this warning?", "Delete?", "Yes", "No") == "Yes")
|
||||
var/DBQuery/deleteQuery = dbcon.NewQuery("UPDATE ss13_warnings SET visible = 0 WHERE id = :warning_id:")
|
||||
var/DBQuery/deleteQuery = GLOB.dbcon.NewQuery("UPDATE ss13_warnings SET visible = 0 WHERE id = :warning_id:")
|
||||
deleteQuery.Execute(query_details)
|
||||
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] deleted one of [ckey]'s warnings.</span>")
|
||||
@@ -510,7 +510,7 @@
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/reason_query = dbcon.NewQuery("UPDATE ss13_warnings SET reason = :new_reason:, edited = 1, lasteditor = :a_ckey:, lasteditdate = NOW() WHERE id = :warning_id:")
|
||||
var/DBQuery/reason_query = GLOB.dbcon.NewQuery("UPDATE ss13_warnings SET reason = :new_reason:, edited = 1, lasteditor = :a_ckey:, lasteditdate = NOW() WHERE id = :warning_id:")
|
||||
reason_query.Execute(query_details)
|
||||
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] edited one of [ckey]'s warning reasons.</span>")
|
||||
@@ -523,7 +523,7 @@
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/notes_query = dbcon.NewQuery("UPDATE ss13_warnings SET notes = :new_notes:, edited = 1, lasteditor = :a_ckey:, lasteditdate = NOW() WHERE id = :warning_id:")
|
||||
var/DBQuery/notes_query = GLOB.dbcon.NewQuery("UPDATE ss13_warnings SET notes = :new_notes:, edited = 1, lasteditor = :a_ckey:, lasteditdate = NOW() WHERE id = :warning_id:")
|
||||
notes_query.Execute(query_details)
|
||||
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] edited one of [ckey]'s warning notes.</span>")
|
||||
|
||||
Reference in New Issue
Block a user