From 828ebb20cf11ddd36072d134b1c25db2f264cc50 Mon Sep 17 00:00:00 2001 From: nemvar <47324920+nemvar@users.noreply.github.com> Date: Tue, 14 Jan 2020 01:52:20 +0100 Subject: [PATCH] Allows calling procs in SDQL update queries without storing the return anywhere. (#48690) * Adds everything that's needed for SDQL varedit macros * Removes unused proc * Allows calling procs in update queries without setting the return anywhere. * Readds a line * Removes file wrapper --- code/modules/admin/verbs/SDQL2/SDQL_2.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index 5e2d4cc51cb..c987c5ac1f0 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -99,6 +99,10 @@ Don't crash the server, OK? + "UPDATE /mob/living/carbon/monkey SET #null = forceMove(usr.loc)" + + Writing "#null" in front of the "=" will call the proc and discard the return value. + A quick recommendation: before you run something like a DELETE or another query.. Run it through SELECT first. You'd rather not gib every player on accident. @@ -777,6 +781,9 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null var/datum/temp = d var/i = 0 for(var/v in sets) + if(v == "#null") + SDQL_expression(d, set_list[sets]) + break if(++i == sets.len) if(superuser) if(temp.vars.Find(v))