Letter N
2020-07-16 20:05:37 +08:00
parent e21d0b7a53
commit 2afab07b4a
22 changed files with 53 additions and 54 deletions

View File

@@ -891,13 +891,13 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
/client/vv_edit_var(var_name, var_value)
switch (var_name)
if ("holder")
if (NAMEOF(src, holder))
return FALSE
if ("ckey")
if (NAMEOF(src, ckey))
return FALSE
if ("key")
if (NAMEOF(src, key))
return FALSE
if("view")
if(NAMEOF(src, view))
change_view(var_value)
return TRUE
. = ..()

View File

@@ -24,7 +24,7 @@
/area/vv_edit_var(var_name, var_value)
switch(var_name)
if("dynamic_lighting")
if(NAMEOF(src, dynamic_lighting))
set_dynamic_lighting(var_value)
return TRUE
return ..()
return ..()

View File

@@ -89,17 +89,17 @@
/atom/vv_edit_var(var_name, var_value)
switch (var_name)
if ("light_range")
if (NAMEOF(src, light_range))
set_light(l_range=var_value)
datum_flags |= DF_VAR_EDITED
return TRUE
if ("light_power")
if (NAMEOF(src, light_power))
set_light(l_power=var_value)
datum_flags |= DF_VAR_EDITED
return TRUE
if ("light_color")
if (NAMEOF(src, light_color))
set_light(l_color=var_value)
datum_flags |= DF_VAR_EDITED
return TRUE

View File

@@ -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)
. = ..()
switch(var_name)
if("icon")
if(NAMEOF(src, icon))
ghostimage_default.icon = icon
ghostimage_simple.icon = icon
if("icon_state")
if(NAMEOF(src, icon_state))
ghostimage_default.icon_state = icon_state
ghostimage_simple.icon_state = icon_state
if("fun_verbs")
if(NAMEOF(src, fun_verbs))
if(fun_verbs)
verbs += /mob/dead/observer/verb/boo
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)
. = ..()
if(var_name == "invisibility")
if(var_name == NAMEOF(src, invisibility))
set_invisibility(invisibility) // updates light
/proc/set_observer_default_invisibility(amount, message=null)

View File

@@ -1196,30 +1196,29 @@
/mob/living/vv_edit_var(var_name, var_value)
switch(var_name)
if ("maxHealth")
if (NAMEOF(src, maxHealth))
if (!isnum(var_value) || var_value <= 0)
return FALSE
if("stat")
if(NAMEOF(src, stat))
if((stat == DEAD) && (var_value < DEAD))//Bringing the dead back to life
GLOB.dead_mob_list -= src
GLOB.alive_mob_list += src
if((stat < DEAD) && (var_value == DEAD))//Kill he
GLOB.alive_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)
if("eye_blind")
if(NAMEOF(src, eye_blind))
set_blindness(var_value)
if("eye_damage")
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
E?.setOrganDamage(var_value)
if("eye_blurry")
if(NAMEOF(src, eye_blurry))
set_blurriness(var_value)
if("maxHealth")
if(NAMEOF(src, maxHealth))
updatehealth()
if("resize")
if(NAMEOF(src, resize))
update_transform()
if("lighting_alpha")
if(NAMEOF(src, lighting_alpha))
sync_lighting_plane_alpha()
/mob/living/proc/do_adrenaline(

View File

@@ -144,6 +144,10 @@ GLOBAL_LIST_EMPTY(movespeed_modification_cache)
/// Handles the special case of editing the movement var
/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/diff
if(slowdown_edit && isnum(cached_multiplicative_slowdown) && isnum(var_value))

View File

@@ -45,7 +45,7 @@
/obj/item/stock_parts/cell/vv_edit_var(var_name, var_value)
switch(var_name)
if("self_recharge")
if(NAMEOF(src, self_recharge))
if(var_value)
START_PROCESSING(SSobj, src)
else

View File

@@ -290,7 +290,7 @@
/obj/item/gun/energy/vv_edit_var(var_name, var_value)
switch(var_name)
if("selfcharge")
if(NAMEOF(src, selfcharge))
if(var_value)
START_PROCESSING(SSobj, src)
else

View File

@@ -83,6 +83,6 @@
/obj/item/gun/magic/vv_edit_var(var_name, var_value)
. = ..()
switch (var_name)
if ("charges")
switch(var_name)
if(NAMEOF(src, charges))
recharge_newshot()

View File

@@ -68,7 +68,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
. = ..()
/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
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)
if (var_name == "id")
if (var_name == NAMEOF(src, id))
// if "id" is varedited, update our list membership
LAZYREMOVE(GLOB.conveyors_by_id[id], src)
. = ..()

View File

@@ -201,6 +201,6 @@
/obj/docking_port/mobile/arrivals/vv_edit_var(var_name, var_value)
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"]"))
return ..()