SDQL Spells & Menu to Give Them to Players (#58118)

SDQL spells are spells that execute an SDQL query. This requires a config flag to be enabled in game_options.txt. When enabled, admins with debug verbs have the ability to open a menu allowing them to define all the relevant vars for the spell, including icons and spell requirements.

It also fixes a bug with superuser SDQL queries always runtime if they try to call a proc.

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
This commit is contained in:
Y0SH1M4S73R
2021-04-28 03:23:51 +03:00
committed by GitHub
co-authored by Emmett Gaines Aleksej Komarov
parent 6f2576680f
commit 3bd7a0db6b
8 changed files with 1640 additions and 5 deletions
+2 -2
View File
@@ -803,8 +803,8 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null
for(var/arg in arguments)
new_args[++new_args.len] = SDQL_expression(source, arg)
if(object == GLOB) // Global proc.
return superuser? (call("/proc/[procname]")(new_args)) : (WrapAdminProcCall(GLOBAL_PROC, procname, new_args))
return superuser? (call(object, procname)(new_args)) : (WrapAdminProcCall(object, procname, new_args))
return superuser ? (call("/proc/[procname]")(arglist(new_args))) : (WrapAdminProcCall(GLOBAL_PROC, procname, new_args))
return superuser ? (call(object, procname)(arglist(new_args))) : (WrapAdminProcCall(object, procname, new_args))
/datum/sdql2_query/proc/SDQL_function_async(datum/object, procname, list/arguments, source)
set waitfor = FALSE