mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
Merge branch 'master' into Hallucinations3.0
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||
|
||||
|
||||
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS) )
|
||||
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS) )
|
||||
set name = "Investigate"
|
||||
set category = "Admin"
|
||||
if(!holder)
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
query_log = "[usr.ckey]([usr]) [query_log]"
|
||||
log_game(query_log)
|
||||
NOTICE(query_log)
|
||||
var/list/runtime_tracker = list()
|
||||
var/runtimes_list = ""
|
||||
var/runtimes = 0
|
||||
var/objs_all = 0
|
||||
var/objs_eligible = 0
|
||||
var/start_time = REALTIMEOFDAY
|
||||
@@ -76,11 +73,7 @@
|
||||
var/list/objs = list()
|
||||
|
||||
for(var/type in select_types)
|
||||
try
|
||||
objs += SDQL_get_all(type, from_objs)
|
||||
catch(var/exception/e)
|
||||
runtime_tracker += SDQL_parse_exception(e)
|
||||
runtimes++
|
||||
objs += SDQL_get_all(type, from_objs)
|
||||
CHECK_TICK
|
||||
objs_all = objs.len
|
||||
|
||||
@@ -88,53 +81,26 @@
|
||||
var/objs_temp = objs
|
||||
objs = list()
|
||||
for(var/datum/d in objs_temp)
|
||||
try
|
||||
if(SDQL_expression(d, query_tree["where"]))
|
||||
objs += d
|
||||
objs_eligible++
|
||||
catch(var/exception/e)
|
||||
runtime_tracker += SDQL_parse_exception(e)
|
||||
runtimes++
|
||||
if(SDQL_expression(d, query_tree["where"]))
|
||||
objs += d
|
||||
objs_eligible++
|
||||
CHECK_TICK
|
||||
|
||||
switch(query_tree[1])
|
||||
if("call")
|
||||
for(var/datum/d in objs)
|
||||
try
|
||||
world.SDQL_var(d, query_tree["call"][1], source = d)
|
||||
catch(var/exception/e)
|
||||
runtime_tracker += SDQL_parse_exception(e)
|
||||
runtimes++
|
||||
world.SDQL_var(d, query_tree["call"][1], source = d)
|
||||
CHECK_TICK
|
||||
|
||||
|
||||
if("delete")
|
||||
for(var/datum/d in objs)
|
||||
try
|
||||
qdel(d)
|
||||
catch(var/exception/e)
|
||||
runtime_tracker += SDQL_parse_exception(e)
|
||||
runtimes++
|
||||
SDQL_qdel_datum(d)
|
||||
CHECK_TICK
|
||||
|
||||
if("select")
|
||||
var/text = ""
|
||||
for(var/datum/t in objs)
|
||||
try
|
||||
text += "<A HREF='?_src_=vars;Vars=\ref[t]'>\ref[t]</A>"
|
||||
if(istype(t, /atom))
|
||||
var/atom/a = t
|
||||
if(a.x)
|
||||
text += ": [t] at ([a.x], [a.y], [a.z])<br>"
|
||||
|
||||
else if(a.loc && a.loc.x)
|
||||
text += ": [t] in [a.loc] at ([a.loc.x], [a.loc.y], [a.loc.z])<br>"
|
||||
else
|
||||
text += ": [t]<br>"
|
||||
else
|
||||
text += ": [t]<br>"
|
||||
catch(var/exception/e)
|
||||
runtime_tracker += SDQL_parse_exception(e)
|
||||
runtimes++
|
||||
text += SDQL_gen_vv_href(t)
|
||||
CHECK_TICK
|
||||
usr << browse(text, "window=SDQL-result")
|
||||
|
||||
@@ -142,21 +108,7 @@
|
||||
if("set" in query_tree)
|
||||
var/list/set_list = query_tree["set"]
|
||||
for(var/datum/d in objs)
|
||||
try
|
||||
for(var/list/sets in set_list)
|
||||
var/datum/temp = d
|
||||
var/i = 0
|
||||
for(var/v in sets)
|
||||
if(++i == sets.len)
|
||||
temp.vv_edit_var(v, SDQL_expression(d, set_list[sets]))
|
||||
break
|
||||
if(temp.vars.Find(v) && (istype(temp.vars[v], /datum)))
|
||||
temp = temp.vars[v]
|
||||
else
|
||||
break
|
||||
catch(var/exception/e)
|
||||
runtime_tracker += SDQL_parse_exception(e)
|
||||
runtimes++
|
||||
SDQL_internal_vv(d, set_list)
|
||||
CHECK_TICK
|
||||
|
||||
var/end_time = REALTIMEOFDAY
|
||||
@@ -164,18 +116,39 @@
|
||||
to_chat(usr, "<span class='admin'>SDQL query results: [query_text]</span>")
|
||||
to_chat(usr, "<span class='admin'>SDQL query completed: [objs_all] objects selected by path, and [objs_eligible] objects executed on after WHERE filtering if applicable.</span>")
|
||||
to_chat(usr, "<span class='admin'>SDQL query took [end_time/10] seconds to complete.</span>")
|
||||
if(runtimes)
|
||||
to_chat(usr, "<span class='boldwarning'>SDQL query encountered [runtimes] runtimes!</span>")
|
||||
to_chat(usr, "<span class='boldwarning'>Opening runtime tracking window.</span>")
|
||||
runtimes_list = runtime_tracker.Join()
|
||||
usr << browse(runtimes_list, "window=SDQL-runtimes")
|
||||
|
||||
/proc/SDQL_parse_exception(exception/E)
|
||||
var/list/returning = list()
|
||||
returning += "Runtime Error: [E.name]<BR>"
|
||||
returning += "Occured at line [E.line] file [E.file]<BR>"
|
||||
returning += "Description: [E.desc]<BR>"
|
||||
return returning
|
||||
/proc/SDQL_qdel_datum(datum/d)
|
||||
qdel(d)
|
||||
|
||||
/proc/SDQL_gen_vv_href(t)
|
||||
var/text = ""
|
||||
text += "<A HREF='?_src_=vars;Vars=\ref[t]'>\ref[t]</A>"
|
||||
if(istype(t, /atom))
|
||||
var/atom/a = t
|
||||
var/turf/T = a.loc
|
||||
var/turf/actual = get_turf(a)
|
||||
if(istype(T))
|
||||
text += ": [t] at turf [T] [COORD(T)]<br>"
|
||||
else if(a.loc && istype(actual))
|
||||
text += ": [t] in [a.loc] at turf [actual] [COORD(actual)]<br>"
|
||||
else
|
||||
text += ": [t]<br>"
|
||||
else
|
||||
text += ": [t]<br>"
|
||||
return text
|
||||
|
||||
/proc/SDQL_internal_vv(d, list/set_list)
|
||||
for(var/list/sets in set_list)
|
||||
var/datum/temp = d
|
||||
var/i = 0
|
||||
for(var/v in sets)
|
||||
if(++i == sets.len)
|
||||
temp.vv_edit_var(v, SDQL_expression(d, set_list[sets]))
|
||||
break
|
||||
if(temp.vars.Find(v) && (istype(temp.vars[v], /datum)))
|
||||
temp = temp.vars[v]
|
||||
else
|
||||
break
|
||||
|
||||
/proc/SDQL_parse(list/query_list)
|
||||
var/datum/SDQL_parser/parser = new()
|
||||
|
||||
@@ -194,11 +194,14 @@
|
||||
valueholder = input(user,"Enter variable value:" ,"Value") as turf in world
|
||||
if(AREA_BUILDMODE)
|
||||
var/list/gen_paths = subtypesof(/datum/mapGenerator)
|
||||
|
||||
var/type = input(user,"Select Generator Type","Type") as null|anything in gen_paths
|
||||
var/list/options = list()
|
||||
for(var/path in gen_paths)
|
||||
var/datum/mapGenerator/MP = path
|
||||
options[initial(MP.buildmode_name)] = path
|
||||
var/type = input(user,"Select Generator Type","Type") as null|anything in options
|
||||
if(!type) return
|
||||
|
||||
generator_path = type
|
||||
generator_path = options[type]
|
||||
cornerA = null
|
||||
cornerB = null
|
||||
|
||||
@@ -342,7 +345,12 @@
|
||||
if(cornerA && cornerB)
|
||||
if(!generator_path)
|
||||
to_chat(user, "<span class='warning'>Select generator type first.</span>")
|
||||
return
|
||||
var/datum/mapGenerator/G = new generator_path
|
||||
if(istype(G, /datum/mapGenerator/repair/reload_station_map))
|
||||
if(GLOB.reloading_map)
|
||||
to_chat(user, "<span class='boldwarning'>You are already reloading an area! Please wait for it to fully finish loading before trying to load another!</span>")
|
||||
return
|
||||
G.defineRegion(cornerA,cornerB,1)
|
||||
G.generate()
|
||||
cornerA = null
|
||||
|
||||
@@ -1157,14 +1157,14 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
set category = "Server"
|
||||
set name = "Toggle Hub"
|
||||
|
||||
world.visibility = (!world.visibility)
|
||||
world.update_hub_visibility(!GLOB.hub_visibility)
|
||||
|
||||
log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(world.visibility?"on":"off")] the hub.")
|
||||
message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(world.visibility?"on":"off")] the hub.")
|
||||
if (world.visibility && !world.reachable)
|
||||
log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
||||
message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
||||
if (GLOB.hub_visibility && !world.reachable)
|
||||
message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.")
|
||||
|
||||
SSblackbox.add_details("admin_toggle","Toggled Hub Visibility|[world.visibility]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.add_details("admin_toggle","Toggled Hub Visibility|[GLOB.hub_visibility]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/smite(mob/living/carbon/human/target as mob)
|
||||
set name = "Smite"
|
||||
|
||||
Reference in New Issue
Block a user