mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Makes SDQL use vv_edit_var (#24854)
* Makes SDQL use vv_edit_var * Fix shit
This commit is contained in:
@@ -10,9 +10,6 @@
|
||||
var/autoadmin = 0
|
||||
var/autoadmin_rank = "Game Admin"
|
||||
|
||||
/datum/protected_configuration/SDQL_update()
|
||||
return FALSE
|
||||
|
||||
/datum/protected_configuration/vv_get_var(var_name)
|
||||
return debug_variable(var_name, "SECRET", 0, src)
|
||||
|
||||
|
||||
@@ -26,10 +26,14 @@
|
||||
var/datum/forced_movement/force_moving = null //handled soley by forced_movement.dm
|
||||
var/floating = FALSE
|
||||
|
||||
/atom/movable/SDQL_update(const/var_name, new_value)
|
||||
if(var_name == "step_x" || var_name == "step_y" || var_name == "step_size" || var_name == "bound_x" || var_name == "bound_y" || var_name == "bound_width" || var_name == "bound_height")
|
||||
/atom/movable/vv_edit_var(var_name, var_value)
|
||||
var/static/list/banned_edits = list("step_x", "step_y", "step_size")
|
||||
var/static/list/careful_edits = list("bound_x", "bound_y", "bound_width", "bound_height")
|
||||
if(var_name in banned_edits)
|
||||
return FALSE //PLEASE no.
|
||||
. = ..()
|
||||
if((var_name in careful_edits) && (var_value % world.icon_size) != 0)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/atom/movable/Move(atom/newloc, direct = 0)
|
||||
if(!loc || !newloc) return 0
|
||||
|
||||
@@ -26,8 +26,9 @@
|
||||
var/requires_activation //add to air processing after initialize?
|
||||
var/changing_turf = FALSE
|
||||
|
||||
/turf/SDQL_update(const/var_name, new_value)
|
||||
if(var_name == "x" || var_name == "y" || var_name == "z")
|
||||
/turf/vv_edit_var(var_name, new_value)
|
||||
var/static/list/banned_edits = list("x", "y", "z")
|
||||
if(var_name in banned_edits)
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -823,8 +823,4 @@ var/global/BSACooldown = 0
|
||||
string = pick(
|
||||
"Admin login: [key_name(src)]")
|
||||
if(string)
|
||||
message_admins("[string]")
|
||||
|
||||
|
||||
/datum/admins/SDQL_update()
|
||||
return FALSE //No.
|
||||
message_admins("[string]")
|
||||
@@ -6,9 +6,6 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
var/list/adds
|
||||
var/list/subs
|
||||
|
||||
/datum/admin_rank/SDQL_update()
|
||||
return FALSE //Nice try trivialadmin!
|
||||
|
||||
/datum/admin_rank/New(init_name, init_rights, list/init_adds, list/init_subs)
|
||||
name = init_name
|
||||
switch(name)
|
||||
|
||||
@@ -18,10 +18,6 @@
|
||||
|
||||
*/
|
||||
|
||||
/datum/proc/SDQL_update(const/var_name, new_value)
|
||||
vars[var_name] = new_value
|
||||
return TRUE
|
||||
|
||||
/client/proc/SDQL2_query(query_text as message)
|
||||
set category = "Debug"
|
||||
if(!check_rights(R_DEBUG)) //Shouldn't happen... but just to be safe.
|
||||
@@ -146,7 +142,7 @@
|
||||
var/i = 0
|
||||
for(var/v in sets)
|
||||
if(++i == sets.len)
|
||||
temp.SDQL_update(v, SDQL_expression(d, set_list[sets]))
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user