mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
This commit is contained in:
@@ -83,7 +83,7 @@
|
|||||||
var/auto_trim = TRUE
|
var/auto_trim = TRUE
|
||||||
|
|
||||||
/datum/config_entry/string/vv_edit_var(var_name, var_value)
|
/datum/config_entry/string/vv_edit_var(var_name, var_value)
|
||||||
return var_name != "auto_trim" && ..()
|
return var_name != NAMEOF(src, auto_trim) && ..()
|
||||||
|
|
||||||
/datum/config_entry/string/ValidateAndSet(str_val, during_load)
|
/datum/config_entry/string/ValidateAndSet(str_val, during_load)
|
||||||
if(!VASProcCallGuard(str_val))
|
if(!VASProcCallGuard(str_val))
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/datum/config_entry/number/vv_edit_var(var_name, var_value)
|
/datum/config_entry/number/vv_edit_var(var_name, var_value)
|
||||||
var/static/list/banned_edits = list("max_val", "min_val", "integer")
|
var/static/list/banned_edits = list(NAMEOF(src, max_val), NAMEOF(src, min_val), NAMEOF(src, integer))
|
||||||
return !(var_name in banned_edits) && ..()
|
return !(var_name in banned_edits) && ..()
|
||||||
|
|
||||||
/datum/config_entry/flag
|
/datum/config_entry/flag
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/datum/config_entry/keyed_list/vv_edit_var(var_name, var_value)
|
/datum/config_entry/keyed_list/vv_edit_var(var_name, var_value)
|
||||||
return var_name != "splitter" && ..()
|
return var_name != NAMEOF(src, splitter) && ..()
|
||||||
|
|
||||||
/datum/config_entry/keyed_list/proc/preprocess_key(key)
|
/datum/config_entry/keyed_list/proc/preprocess_key(key)
|
||||||
return key
|
return key
|
||||||
|
|||||||
@@ -210,10 +210,10 @@
|
|||||||
|
|
||||||
/datum/controller/subsystem/vv_edit_var(var_name, var_value)
|
/datum/controller/subsystem/vv_edit_var(var_name, var_value)
|
||||||
switch (var_name)
|
switch (var_name)
|
||||||
if ("can_fire")
|
if (NAMEOF(src, can_fire))
|
||||||
//this is so the subsystem doesn't rapid fire to make up missed ticks causing more lag
|
//this is so the subsystem doesn't rapid fire to make up missed ticks causing more lag
|
||||||
if (var_value)
|
if (var_value)
|
||||||
next_fire = world.time + wait
|
next_fire = world.time + wait
|
||||||
if ("queued_priority") //editing this breaks things.
|
if (NAMEOF(src, queued_priority)) //editing this breaks things.
|
||||||
return 0
|
return FALSE
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ SUBSYSTEM_DEF(blackbox)
|
|||||||
|
|
||||||
/datum/controller/subsystem/blackbox/vv_edit_var(var_name, var_value)
|
/datum/controller/subsystem/blackbox/vv_edit_var(var_name, var_value)
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("feedback")
|
if(NAMEOF(src, feedback))
|
||||||
return FALSE
|
return FALSE
|
||||||
if("sealed")
|
if(NAMEOF(src, sealed))
|
||||||
if(var_value)
|
if(var_value)
|
||||||
return Seal()
|
return Seal()
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ SUBSYSTEM_DEF(title)
|
|||||||
. = ..()
|
. = ..()
|
||||||
if(.)
|
if(.)
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("icon")
|
if(NAMEOF(src, icon))
|
||||||
if(splash_turf)
|
if(splash_turf)
|
||||||
splash_turf.icon = icon
|
splash_turf.icon = icon
|
||||||
|
|
||||||
@@ -66,4 +66,4 @@ SUBSYSTEM_DEF(title)
|
|||||||
icon = SStitle.icon
|
icon = SStitle.icon
|
||||||
splash_turf = SStitle.splash_turf
|
splash_turf = SStitle.splash_turf
|
||||||
file_path = SStitle.file_path
|
file_path = SStitle.file_path
|
||||||
previous_icon = SStitle.previous_icon
|
previous_icon = SStitle.previous_icon
|
||||||
|
|||||||
@@ -741,7 +741,7 @@
|
|||||||
flags_1 |= ADMIN_SPAWNED_1
|
flags_1 |= ADMIN_SPAWNED_1
|
||||||
. = ..()
|
. = ..()
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("color")
|
if(NAMEOF(src, color))
|
||||||
add_atom_colour(color, ADMIN_COLOUR_PRIORITY)
|
add_atom_colour(color, ADMIN_COLOUR_PRIORITY)
|
||||||
|
|
||||||
/atom/vv_get_dropdown()
|
/atom/vv_get_dropdown()
|
||||||
|
|||||||
@@ -120,25 +120,25 @@
|
|||||||
if((var_name in careful_edits) && (var_value % world.icon_size) != 0)
|
if((var_name in careful_edits) && (var_value % world.icon_size) != 0)
|
||||||
return FALSE
|
return FALSE
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("x")
|
if(NAMEOF(src, x))
|
||||||
var/turf/T = locate(var_value, y, z)
|
var/turf/T = locate(var_value, y, z)
|
||||||
if(T)
|
if(T)
|
||||||
forceMove(T)
|
forceMove(T)
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
if("y")
|
if(NAMEOF(src, y))
|
||||||
var/turf/T = locate(x, var_value, z)
|
var/turf/T = locate(x, var_value, z)
|
||||||
if(T)
|
if(T)
|
||||||
forceMove(T)
|
forceMove(T)
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
if("z")
|
if(NAMEOF(src, z))
|
||||||
var/turf/T = locate(x, y, var_value)
|
var/turf/T = locate(x, y, var_value)
|
||||||
if(T)
|
if(T)
|
||||||
forceMove(T)
|
forceMove(T)
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
if("loc")
|
if(NAMEOF(src, loc))
|
||||||
if(istype(var_value, /atom))
|
if(istype(var_value, /atom))
|
||||||
forceMove(var_value)
|
forceMove(var_value)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|||||||
@@ -188,7 +188,7 @@
|
|||||||
/obj/machinery/door/airlock/vv_edit_var(var_name)
|
/obj/machinery/door/airlock/vv_edit_var(var_name)
|
||||||
. = ..()
|
. = ..()
|
||||||
switch (var_name)
|
switch (var_name)
|
||||||
if ("cyclelinkeddir")
|
if (NAMEOF(src, cyclelinkeddir))
|
||||||
cyclelinkairlock()
|
cyclelinkairlock()
|
||||||
|
|
||||||
/obj/machinery/door/airlock/check_access_ntnet(datum/netdata/data)
|
/obj/machinery/door/airlock/check_access_ntnet(datum/netdata/data)
|
||||||
|
|||||||
@@ -287,7 +287,7 @@
|
|||||||
if(!.)
|
if(!.)
|
||||||
return
|
return
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("shuttle_id")
|
if(NAMEOF(src, shuttle_id))
|
||||||
update()
|
update()
|
||||||
|
|
||||||
/obj/machinery/status_display/shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override)
|
/obj/machinery/status_display/shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override)
|
||||||
|
|||||||
@@ -224,7 +224,7 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
if(.)
|
if(.)
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("assignment","registered_name")
|
if(NAMEOF(src, assignment),NAMEOF(src, registered_name)) //,NAMEOF(src, registered_age))
|
||||||
update_label()
|
update_label()
|
||||||
|
|
||||||
/obj/item/card/id/attack_self(mob/user)
|
/obj/item/card/id/attack_self(mob/user)
|
||||||
|
|||||||
@@ -37,13 +37,9 @@
|
|||||||
if("anchored")
|
if("anchored")
|
||||||
setAnchored(vval)
|
setAnchored(vval)
|
||||||
return TRUE
|
return TRUE
|
||||||
if("obj_flags")
|
if(NAMEOF(src, obj_flags))
|
||||||
if ((obj_flags & DANGEROUS_POSSESSION) && !(vval & DANGEROUS_POSSESSION))
|
if ((obj_flags & DANGEROUS_POSSESSION) && !(vval & DANGEROUS_POSSESSION))
|
||||||
return FALSE
|
return FALSE
|
||||||
if("control_object")
|
|
||||||
var/obj/O = vval
|
|
||||||
if(istype(O) && (O.obj_flags & DANGEROUS_POSSESSION))
|
|
||||||
return FALSE
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/Initialize()
|
/obj/Initialize()
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
if(.)
|
if(.)
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("icon")
|
if(NAMEOF(src, icon))
|
||||||
SStitle.icon = icon
|
SStitle.icon = icon
|
||||||
|
|
||||||
/turf/closed/indestructible/riveted
|
/turf/closed/indestructible/riveted
|
||||||
|
|||||||
@@ -891,13 +891,13 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
|||||||
|
|
||||||
/client/vv_edit_var(var_name, var_value)
|
/client/vv_edit_var(var_name, var_value)
|
||||||
switch (var_name)
|
switch (var_name)
|
||||||
if ("holder")
|
if (NAMEOF(src, holder))
|
||||||
return FALSE
|
return FALSE
|
||||||
if ("ckey")
|
if (NAMEOF(src, ckey))
|
||||||
return FALSE
|
return FALSE
|
||||||
if ("key")
|
if (NAMEOF(src, key))
|
||||||
return FALSE
|
return FALSE
|
||||||
if("view")
|
if(NAMEOF(src, view))
|
||||||
change_view(var_value)
|
change_view(var_value)
|
||||||
return TRUE
|
return TRUE
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/area/vv_edit_var(var_name, var_value)
|
/area/vv_edit_var(var_name, var_value)
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("dynamic_lighting")
|
if(NAMEOF(src, dynamic_lighting))
|
||||||
set_dynamic_lighting(var_value)
|
set_dynamic_lighting(var_value)
|
||||||
return TRUE
|
return TRUE
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -89,17 +89,17 @@
|
|||||||
|
|
||||||
/atom/vv_edit_var(var_name, var_value)
|
/atom/vv_edit_var(var_name, var_value)
|
||||||
switch (var_name)
|
switch (var_name)
|
||||||
if ("light_range")
|
if (NAMEOF(src, light_range))
|
||||||
set_light(l_range=var_value)
|
set_light(l_range=var_value)
|
||||||
datum_flags |= DF_VAR_EDITED
|
datum_flags |= DF_VAR_EDITED
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
if ("light_power")
|
if (NAMEOF(src, light_power))
|
||||||
set_light(l_power=var_value)
|
set_light(l_power=var_value)
|
||||||
datum_flags |= DF_VAR_EDITED
|
datum_flags |= DF_VAR_EDITED
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
if ("light_color")
|
if (NAMEOF(src, light_color))
|
||||||
set_light(l_color=var_value)
|
set_light(l_color=var_value)
|
||||||
datum_flags |= DF_VAR_EDITED
|
datum_flags |= DF_VAR_EDITED
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|||||||
@@ -837,13 +837,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
|||||||
/mob/dead/observer/vv_edit_var(var_name, var_value)
|
/mob/dead/observer/vv_edit_var(var_name, var_value)
|
||||||
. = ..()
|
. = ..()
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("icon")
|
if(NAMEOF(src, icon))
|
||||||
ghostimage_default.icon = icon
|
ghostimage_default.icon = icon
|
||||||
ghostimage_simple.icon = icon
|
ghostimage_simple.icon = icon
|
||||||
if("icon_state")
|
if(NAMEOF(src, icon_state))
|
||||||
ghostimage_default.icon_state = icon_state
|
ghostimage_default.icon_state = icon_state
|
||||||
ghostimage_simple.icon_state = icon_state
|
ghostimage_simple.icon_state = icon_state
|
||||||
if("fun_verbs")
|
if(NAMEOF(src, fun_verbs))
|
||||||
if(fun_verbs)
|
if(fun_verbs)
|
||||||
verbs += /mob/dead/observer/verb/boo
|
verbs += /mob/dead/observer/verb/boo
|
||||||
verbs += /mob/dead/observer/verb/possess
|
verbs += /mob/dead/observer/verb/possess
|
||||||
@@ -925,7 +925,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
|||||||
|
|
||||||
/mob/dead/observer/vv_edit_var(var_name, var_value)
|
/mob/dead/observer/vv_edit_var(var_name, var_value)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(var_name == "invisibility")
|
if(var_name == NAMEOF(src, invisibility))
|
||||||
set_invisibility(invisibility) // updates light
|
set_invisibility(invisibility) // updates light
|
||||||
|
|
||||||
/proc/set_observer_default_invisibility(amount, message=null)
|
/proc/set_observer_default_invisibility(amount, message=null)
|
||||||
|
|||||||
@@ -1196,30 +1196,29 @@
|
|||||||
|
|
||||||
/mob/living/vv_edit_var(var_name, var_value)
|
/mob/living/vv_edit_var(var_name, var_value)
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if ("maxHealth")
|
if (NAMEOF(src, maxHealth))
|
||||||
if (!isnum(var_value) || var_value <= 0)
|
if (!isnum(var_value) || var_value <= 0)
|
||||||
return FALSE
|
return FALSE
|
||||||
if("stat")
|
if(NAMEOF(src, stat))
|
||||||
if((stat == DEAD) && (var_value < DEAD))//Bringing the dead back to life
|
if((stat == DEAD) && (var_value < DEAD))//Bringing the dead back to life
|
||||||
GLOB.dead_mob_list -= src
|
GLOB.dead_mob_list -= src
|
||||||
GLOB.alive_mob_list += src
|
GLOB.alive_mob_list += src
|
||||||
if((stat < DEAD) && (var_value == DEAD))//Kill he
|
if((stat < DEAD) && (var_value == DEAD))//Kill he
|
||||||
GLOB.alive_mob_list -= src
|
GLOB.alive_mob_list -= src
|
||||||
GLOB.dead_mob_list += src
|
GLOB.dead_mob_list += src
|
||||||
|
if(NAMEOF(src, health)) //this doesn't work. gotta use procs instead.
|
||||||
|
return FALSE
|
||||||
. = ..()
|
. = ..()
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("eye_blind")
|
if(NAMEOF(src, eye_blind))
|
||||||
set_blindness(var_value)
|
set_blindness(var_value)
|
||||||
if("eye_damage")
|
if(NAMEOF(src, eye_blurry))
|
||||||
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
|
|
||||||
E?.setOrganDamage(var_value)
|
|
||||||
if("eye_blurry")
|
|
||||||
set_blurriness(var_value)
|
set_blurriness(var_value)
|
||||||
if("maxHealth")
|
if(NAMEOF(src, maxHealth))
|
||||||
updatehealth()
|
updatehealth()
|
||||||
if("resize")
|
if(NAMEOF(src, resize))
|
||||||
update_transform()
|
update_transform()
|
||||||
if("lighting_alpha")
|
if(NAMEOF(src, lighting_alpha))
|
||||||
sync_lighting_plane_alpha()
|
sync_lighting_plane_alpha()
|
||||||
|
|
||||||
/mob/living/proc/do_adrenaline(
|
/mob/living/proc/do_adrenaline(
|
||||||
|
|||||||
@@ -144,6 +144,10 @@ GLOBAL_LIST_EMPTY(movespeed_modification_cache)
|
|||||||
|
|
||||||
/// Handles the special case of editing the movement var
|
/// Handles the special case of editing the movement var
|
||||||
/mob/vv_edit_var(var_name, var_value)
|
/mob/vv_edit_var(var_name, var_value)
|
||||||
|
if(var_name == NAMEOF(src, control_object))
|
||||||
|
var/obj/O = var_name
|
||||||
|
if(!istype(O) || (O.obj_flags & DANGEROUS_POSSESSION))
|
||||||
|
return FALSE
|
||||||
var/slowdown_edit = (var_name == NAMEOF(src, cached_multiplicative_slowdown))
|
var/slowdown_edit = (var_name == NAMEOF(src, cached_multiplicative_slowdown))
|
||||||
var/diff
|
var/diff
|
||||||
if(slowdown_edit && isnum(cached_multiplicative_slowdown) && isnum(var_value))
|
if(slowdown_edit && isnum(cached_multiplicative_slowdown) && isnum(var_value))
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
/obj/item/stock_parts/cell/vv_edit_var(var_name, var_value)
|
/obj/item/stock_parts/cell/vv_edit_var(var_name, var_value)
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("self_recharge")
|
if(NAMEOF(src, self_recharge))
|
||||||
if(var_value)
|
if(var_value)
|
||||||
START_PROCESSING(SSobj, src)
|
START_PROCESSING(SSobj, src)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -290,7 +290,7 @@
|
|||||||
|
|
||||||
/obj/item/gun/energy/vv_edit_var(var_name, var_value)
|
/obj/item/gun/energy/vv_edit_var(var_name, var_value)
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("selfcharge")
|
if(NAMEOF(src, selfcharge))
|
||||||
if(var_value)
|
if(var_value)
|
||||||
START_PROCESSING(SSobj, src)
|
START_PROCESSING(SSobj, src)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -83,6 +83,6 @@
|
|||||||
|
|
||||||
/obj/item/gun/magic/vv_edit_var(var_name, var_value)
|
/obj/item/gun/magic/vv_edit_var(var_name, var_value)
|
||||||
. = ..()
|
. = ..()
|
||||||
switch (var_name)
|
switch(var_name)
|
||||||
if ("charges")
|
if(NAMEOF(src, charges))
|
||||||
recharge_newshot()
|
recharge_newshot()
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
|
|||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/machinery/conveyor/vv_edit_var(var_name, var_value)
|
/obj/machinery/conveyor/vv_edit_var(var_name, var_value)
|
||||||
if (var_name == "id")
|
if (var_name == NAMEOF(src, id))
|
||||||
// if "id" is varedited, update our list membership
|
// if "id" is varedited, update our list membership
|
||||||
LAZYREMOVE(GLOB.conveyors_by_id[id], src)
|
LAZYREMOVE(GLOB.conveyors_by_id[id], src)
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -243,7 +243,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
|
|||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/machinery/conveyor_switch/vv_edit_var(var_name, var_value)
|
/obj/machinery/conveyor_switch/vv_edit_var(var_name, var_value)
|
||||||
if (var_name == "id")
|
if (var_name == NAMEOF(src, id))
|
||||||
// if "id" is varedited, update our list membership
|
// if "id" is varedited, update our list membership
|
||||||
LAZYREMOVE(GLOB.conveyors_by_id[id], src)
|
LAZYREMOVE(GLOB.conveyors_by_id[id], src)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -201,6 +201,6 @@
|
|||||||
|
|
||||||
/obj/docking_port/mobile/arrivals/vv_edit_var(var_name, var_value)
|
/obj/docking_port/mobile/arrivals/vv_edit_var(var_name, var_value)
|
||||||
switch(var_name)
|
switch(var_name)
|
||||||
if("perma_docked")
|
if(NAMEOF(src, perma_docked))
|
||||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("arrivals shuttle", "[var_value ? "stopped" : "started"]"))
|
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("arrivals shuttle", "[var_value ? "stopped" : "started"]"))
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
Reference in New Issue
Block a user