Merge branch 'master' into upstream-merge-33246

This commit is contained in:
LetterJay
2017-12-20 00:27:06 -06:00
committed by GitHub
808 changed files with 14650 additions and 10287 deletions
+12 -6
View File
@@ -24,10 +24,14 @@
message_admins("<span class='danger'>ERROR: Non-admin [key_name(usr, usr.client)] attempted to execute a SDQL query!</span>")
log_admin("Non-admin [usr.ckey]([usr]) attempted to execute a SDQL query!")
return FALSE
var/list/results = world.SDQL2_query(query_text, key_name_admin(usr), "[usr.ckey]([usr])")
for(var/I in 1 to 3)
to_chat(usr, results[I])
/world/proc/SDQL2_query(query_text, log_entry1, log_entry2)
var/query_log = "executed SDQL query: \"[query_text]\"."
message_admins("[key_name_admin(usr)] [query_log]")
query_log = "[usr.ckey]([usr]) [query_log]"
message_admins("[log_entry1] [query_log]")
query_log = "[log_entry2] [query_log]"
log_game(query_log)
NOTICE(query_log)
var/objs_all = 0
@@ -49,6 +53,7 @@
if(!querys || querys.len < 1)
return
var/list/refs = list()
for(var/list/query_tree in querys)
var/list/from_objs = list()
var/list/select_types = list()
@@ -100,6 +105,7 @@
var/text = ""
for(var/datum/t in objs)
text += SDQL_gen_vv_href(t)
refs[REF(t)] = TRUE
CHECK_TICK
usr << browse(text, "window=SDQL-result")
@@ -112,9 +118,9 @@
var/end_time = REALTIMEOFDAY
end_time -= start_time
to_chat(usr, "<span class='admin'>SDQL query results: [query_text]</span>")
to_chat(usr, "<span class='admin'>SDQL query completed: [objs_all] objects selected by path, and [objs_eligible] objects executed on after WHERE filtering if applicable.</span>")
to_chat(usr, "<span class='admin'>SDQL query took [DisplayTimeText(end_time)] to complete.</span>")
return list("<span class='admin'>SDQL query results: [query_text]</span>",\
"<span class='admin'>SDQL query completed: [objs_all] objects selected by path, and [objs_eligible] objects executed on after WHERE filtering if applicable.</span>",\
"<span class='admin'>SDQL query took [DisplayTimeText(end_time)] to complete.</span>") + refs
/proc/SDQL_qdel_datum(datum/d)
qdel(d)
@@ -429,7 +435,7 @@
else if(expression[start + 1] == "\[" && islist(v))
var/list/L = v
var/index = SDQL_expression(source, expression[start + 2])
if(isnum(index) && (!IsInteger(index) || L.len < index))
if(isnum(index) && (!ISINTEGER(index) || L.len < index))
to_chat(usr, "<span class='danger'>Invalid list index: [index]</span>")
return null
return L[index]
+2 -2
View File
@@ -34,7 +34,7 @@
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
usr.loc = T
usr.forceMove(T)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Turf") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -137,7 +137,7 @@
admin_ticket_log(M, msg)
if(M)
M.forceMove(get_turf(usr))
usr.loc = M.loc
usr.forceMove(M.loc)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sendmob(mob/M in sortmobs())
+4 -2
View File
@@ -110,7 +110,9 @@ GLOBAL_PROTECT(LastAdminCalledProc)
/proc/WrapAdminProcCall(target, procname, list/arguments)
var/current_caller = GLOB.AdminProcCaller
var/ckey = usr.client.ckey
var/ckey = usr ? usr.client.ckey : GLOB.AdminProcCaller
if(!ckey)
CRASH("WrapAdminProcCall with no ckey: [target] [procname] [english_list(arguments)]")
if(current_caller && current_caller != ckey)
to_chat(usr, "<span class='adminnotice'>Another set of admin called procs are still running, your proc will be run after theirs finish.</span>")
UNTIL(!GLOB.AdminProcCaller)
@@ -737,7 +739,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
Plasma.air_contents.gases[/datum/gas/plasma][MOLES] = 70
Rad.drainratio = 0
Rad.loaded_tank = Plasma
Plasma.loc = Rad
Plasma.forceMove(Rad)
if(!Rad.active)
Rad.toggle_power()
@@ -55,5 +55,5 @@
else if(I) // Put the implant in case.
var/obj/item/implantcase/case = new(get_turf(C))
case.imp = I
I.loc = case
I.forceMove(case)
case.update_icon()
+5 -13
View File
@@ -238,26 +238,18 @@
if(agentcount < 3)
return 0
var/nuke_code = random_nukecode()
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/leader_chosen = FALSE
var/spawnpos = 1 //Decides where they'll spawn. 1=leader.
var/datum/objective_team/nuclear/nuke_team
for(var/mob/c in chosen)
if(spawnpos > GLOB.nukeop_start.len)
spawnpos = 1 //Ran out of spawns. Let's loop back to the first non-leader position
var/mob/living/carbon/human/new_character=makeBody(c)
if(!leader_chosen)
leader_chosen = TRUE
new_character.mind.make_Nuke(pick(GLOB.nukeop_leader_start), nuke_code, TRUE)
var/datum/antagonist/nukeop/N = new_character.mind.add_antag_datum(/datum/antagonist/nukeop/leader)
nuke_team = N.nuke_team
else
new_character.mind.make_Nuke(GLOB.nukeop_start[spawnpos], nuke_code)
spawnpos++
new_character.mind.add_antag_datum(/datum/antagonist/nukeop,nuke_team)
return 1
else
return 0
+1 -1
View File
@@ -12,7 +12,7 @@
var/vol = input(usr, "What volume would you like the sound to play at?",, 100) as null|num
if(!vol)
return
vol = Clamp(vol, 1, 100)
vol = CLAMP(vol, 1, 100)
var/sound/admin_sound = new()
admin_sound.file = S
+2 -1
View File
@@ -386,7 +386,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
A.equip_wizard()
if("Syndicate")
new_character.forceMove(pick(GLOB.nukeop_start))
call(/datum/game_mode/proc/equip_syndicate)(new_character)
var/datum/antagonist/nukeop/N = new_character.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE)
N.equip_op()
if("Space Ninja")
var/list/ninja_spawn = list()
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)