Updates SDQL2 to the latest TG version and adds variable protection. (#17997)

* 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

* discord protection

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2023-12-25 17:10:35 +00:00
committed by GitHub
co-authored by Matt Atlas
parent af318acfc1
commit 12487c94bb
53 changed files with 2014 additions and 1042 deletions
+2 -2
View File
@@ -124,10 +124,10 @@
var/x_offset = round(sin(Angle) * (N + world.icon_size/2))
var/y_offset = round(cos(Angle) * (N + world.icon_size/2))
//Position the effect so the beam is one continuous line
segment.x += SIMPLE_SIGN(x_offset) * Floor(abs(x_offset)/world.icon_size)
segment.x += SIMPLE_SIGN(x_offset) * FLOOR(abs(x_offset)/world.icon_size)
x_offset %= world.icon_size
segment.y += SIMPLE_SIGN(y_offset) * Floor(abs(y_offset)/world.icon_size)
segment.y += SIMPLE_SIGN(y_offset) * FLOOR(abs(y_offset)/world.icon_size)
y_offset %= world.icon_size
segment.pixel_x = x_offset
+11
View File
@@ -101,3 +101,14 @@
/datum/proc/process()
set waitfor = FALSE
return PROCESS_KILL
/datum/proc/can_vv_get(var_name)
return TRUE
/datum/proc/vv_edit_var(var_name, var_value) //called whenever a var is edited
if(var_name == NAMEOF(src, vars))
return FALSE
if(!can_vv_get(var_name))
return FALSE
vars[var_name] = var_value
return TRUE
+2
View File
@@ -3,6 +3,8 @@
var/value
var/details
GENERAL_PROTECT_DATUM(/datum/feedback_variable)
/datum/feedback_variable/New(var/param_variable,var/param_value = 0)
variable = param_variable
value = param_value
+2 -2
View File
@@ -124,10 +124,10 @@
return new /datum/position(src)
/datum/point/proc/return_px()
return Modulus(x, world.icon_size) - 16 - 1
return MODULUS(x, world.icon_size) - 16 - 1
/datum/point/proc/return_py()
return Modulus(y, world.icon_size) - 16 - 1
return MODULUS(y, world.icon_size) - 16 - 1
/datum/point/vector