diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm
index e8e75c132a..054a8e36eb 100644
--- a/code/__DEFINES/admin.dm
+++ b/code/__DEFINES/admin.dm
@@ -74,6 +74,7 @@
#define ADMIN_PUNISHMENT_MAZING "Puzzle"
#define ADMIN_PUNISHMENT_PIE "Cream Pie"
#define ADMIN_PUNISHMENT_CUSTOM_PIE "Custom Cream Pie"
+#define ADMIN_PUNISHMENT_PICKLE "Pickle-ify"
#define AHELP_ACTIVE 1
#define AHELP_CLOSED 2
diff --git a/code/__DEFINES/vv.dm b/code/__DEFINES/vv.dm
index 889e1bb1c0..101330cc8b 100644
--- a/code/__DEFINES/vv.dm
+++ b/code/__DEFINES/vv.dm
@@ -76,6 +76,13 @@
#define VV_HK_ADDCOMPONENT "addcomponent"
#define VV_HK_MODIFY_TRAITS "modtraits"
+// /datum/gas_mixture
+#define VV_HK_SET_MOLES "set_moles"
+#define VV_HK_EMPTY "empty"
+#define VV_HK_SET_TEMPERATURE "set_temp"
+#define VV_HK_PARSE_GASSTRING "parse_gasstring"
+#define VV_HK_SET_VOLUME "set_volume"
+
// /atom
#define VV_HK_MODIFY_TRANSFORM "atom_transform"
#define VV_HK_ADD_REAGENT "addreagent"
diff --git a/code/controllers/configuration/config_entry.dm b/code/controllers/configuration/config_entry.dm
index 7e8b1c8f38..259082a6ba 100644
--- a/code/controllers/configuration/config_entry.dm
+++ b/code/controllers/configuration/config_entry.dm
@@ -83,7 +83,7 @@
var/auto_trim = TRUE
/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)
if(!VASProcCallGuard(str_val))
@@ -110,7 +110,7 @@
return FALSE
/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) && ..()
/datum/config_entry/flag
@@ -216,7 +216,7 @@
return FALSE
/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)
return key
diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm
index a16de2ba4c..4ee3a01956 100644
--- a/code/controllers/subsystem.dm
+++ b/code/controllers/subsystem.dm
@@ -210,10 +210,10 @@
/datum/controller/subsystem/vv_edit_var(var_name, var_value)
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
if (var_value)
next_fire = world.time + wait
- if ("queued_priority") //editing this breaks things.
- return 0
+ if (NAMEOF(src, queued_priority)) //editing this breaks things.
+ return FALSE
. = ..()
diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm
index d6991a40b4..dc1f246e3d 100644
--- a/code/controllers/subsystem/blackbox.dm
+++ b/code/controllers/subsystem/blackbox.dm
@@ -60,9 +60,9 @@ SUBSYSTEM_DEF(blackbox)
/datum/controller/subsystem/blackbox/vv_edit_var(var_name, var_value)
switch(var_name)
- if("feedback")
+ if(NAMEOF(src, feedback))
return FALSE
- if("sealed")
+ if(NAMEOF(src, sealed))
if(var_value)
return Seal()
return FALSE
diff --git a/code/controllers/subsystem/title.dm b/code/controllers/subsystem/title.dm
index b19cf47693..bd843f959d 100644
--- a/code/controllers/subsystem/title.dm
+++ b/code/controllers/subsystem/title.dm
@@ -47,7 +47,7 @@ SUBSYSTEM_DEF(title)
. = ..()
if(.)
switch(var_name)
- if("icon")
+ if(NAMEOF(src, icon))
if(splash_turf)
splash_turf.icon = icon
@@ -66,4 +66,4 @@ SUBSYSTEM_DEF(title)
icon = SStitle.icon
splash_turf = SStitle.splash_turf
file_path = SStitle.file_path
- previous_icon = SStitle.previous_icon
\ No newline at end of file
+ previous_icon = SStitle.previous_icon
diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm
index 51dc4ee8f7..7adc634621 100644
--- a/code/datums/components/material_container.dm
+++ b/code/datums/components/material_container.dm
@@ -105,7 +105,7 @@
/// Proc specifically for inserting items, returns the amount of materials entered.
/datum/component/material_container/proc/insert_item(obj/item/I, var/multiplier = 1, stack_amt)
- if(!I)
+ if(QDELETED(I))
return FALSE
multiplier = CEILING(multiplier, 0.01)
diff --git a/code/datums/elements/flavor_text.dm b/code/datums/elements/flavor_text.dm
index 92251861ed..3562345d26 100644
--- a/code/datums/elements/flavor_text.dm
+++ b/code/datums/elements/flavor_text.dm
@@ -82,9 +82,10 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
return
if(href_list["show_flavor"])
var/atom/target = locate(href_list["show_flavor"])
+ var/mob/living/L = target
var/text = texts_by_atom[target]
if(text)
- usr << browse("
[target.name][replacetext(texts_by_atom[target], "\n", "
")]", "window=[target.name];size=500x200")
+ usr << browse("[isliving(target) ? L.get_visible_name() : target.name][replacetext(texts_by_atom[target], "\n", "
")]", "window=[isliving(target) ? L.get_visible_name() : target.name];size=500x200")
onclose(usr, "[target.name]")
return TRUE
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 2783dc3db2..da34e04df2 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -748,7 +748,7 @@
flags_1 |= ADMIN_SPAWNED_1
. = ..()
switch(var_name)
- if("color")
+ if(NAMEOF(src, color))
add_atom_colour(color, ADMIN_COLOUR_PRIORITY)
/atom/vv_get_dropdown()
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index fd19a31763..dab44cfe3e 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -121,25 +121,25 @@
if((var_name in careful_edits) && (var_value % world.icon_size) != 0)
return FALSE
switch(var_name)
- if("x")
+ if(NAMEOF(src, x))
var/turf/T = locate(var_value, y, z)
if(T)
forceMove(T)
return TRUE
return FALSE
- if("y")
+ if(NAMEOF(src, y))
var/turf/T = locate(x, var_value, z)
if(T)
forceMove(T)
return TRUE
return FALSE
- if("z")
+ if(NAMEOF(src, z))
var/turf/T = locate(x, y, var_value)
if(T)
forceMove(T)
return TRUE
return FALSE
- if("loc")
+ if(NAMEOF(src, loc))
if(istype(var_value, /atom))
forceMove(var_value)
return TRUE
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 8959cd8cc9..68f5c8de08 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -188,7 +188,7 @@
/obj/machinery/door/airlock/vv_edit_var(var_name)
. = ..()
switch (var_name)
- if ("cyclelinkeddir")
+ if (NAMEOF(src, cyclelinkeddir))
cyclelinkairlock()
/obj/machinery/door/airlock/check_access_ntnet(datum/netdata/data)
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index 3bb67e2a1c..8937106601 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -287,7 +287,7 @@
if(!.)
return
switch(var_name)
- if("shuttle_id")
+ if(NAMEOF(src, shuttle_id))
update()
/obj/machinery/status_display/shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override)
diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm
index db82093f0b..5b1b86b9e4 100644
--- a/code/game/objects/items/cards_ids.dm
+++ b/code/game/objects/items/cards_ids.dm
@@ -224,7 +224,7 @@
. = ..()
if(.)
switch(var_name)
- if("assignment","registered_name")
+ if(NAMEOF(src, assignment),NAMEOF(src, registered_name)) //,NAMEOF(src, registered_age))
update_label()
/obj/item/card/id/attack_self(mob/user)
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index ba3eba9bd3..fb3b1535ed 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -37,13 +37,9 @@
if("anchored")
setAnchored(vval)
return TRUE
- if("obj_flags")
+ if(NAMEOF(src, obj_flags))
if ((obj_flags & DANGEROUS_POSSESSION) && !(vval & DANGEROUS_POSSESSION))
return FALSE
- if("control_object")
- var/obj/O = vval
- if(istype(O) && (O.obj_flags & DANGEROUS_POSSESSION))
- return FALSE
return ..()
/obj/Initialize()
diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm
index 65b487bd05..b78826b23b 100644
--- a/code/game/turfs/closed.dm
+++ b/code/game/turfs/closed.dm
@@ -83,7 +83,7 @@
. = ..()
if(.)
switch(var_name)
- if("icon")
+ if(NAMEOF(src, icon))
SStitle.icon = icon
/turf/closed/indestructible/riveted
diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm
index bbd6b55e4f..68b9a8e341 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -55,7 +55,7 @@
if(AH)
message_admins("[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.")
- var/msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as message|null
+ var/msg = stripped_multiline_input(src,"Message:", "Private message to [key_name(C, 0, 0)]")
if (!msg)
message_admins("[key_name_admin(src)] has cancelled their reply to [key_name(C, 0, 0)]'s admin help.")
return
@@ -87,10 +87,10 @@
if(irc)
- if(!ircreplyamount) //to prevent people from spamming irc
+ if(!ircreplyamount) //to prevent people from spamming irc/discord
return
if(!msg)
- msg = input(src,"Message:", "Private message to Administrator") as text|null
+ msg = stripped_multiline_input(src,"Message:", "Private message to Administrator")
if(!msg)
return
@@ -112,7 +112,7 @@
//get message text, limit it's length.and clean/escape html
if(!msg)
- msg = input(src,"Message:", "Private message to [key_name(recipient, 0, 0)]") as message|null
+ msg = stripped_multiline_input(src,"Message:", "Private message to [key_name(recipient, 0, 0)]")
msg = trim(msg)
if(!msg)
return
@@ -191,7 +191,7 @@
spawn() //so we don't hold the caller proc up
var/sender = src
var/sendername = key
- var/reply = input(recipient, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
+ var/reply = stripped_multiline_input(recipient, msg,"Admin PM from-[sendername]", "") //show message and await a reply
if(recipient && reply)
if(sender)
recipient.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index bf541534c9..ea219c0d45 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -1289,7 +1289,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
if(!check_rights(R_ADMIN) || !check_rights(R_FUN))
return
- var/list/punishment_list = list(ADMIN_PUNISHMENT_PIE, ADMIN_PUNISHMENT_CUSTOM_PIE, ADMIN_PUNISHMENT_FIREBALL, ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_BSA, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_SUPPLYPOD_QUICK, ADMIN_PUNISHMENT_SUPPLYPOD, ADMIN_PUNISHMENT_MAZING, ADMIN_PUNISHMENT_ROD)
+ var/list/punishment_list = list(ADMIN_PUNISHMENT_PIE, ADMIN_PUNISHMENT_CUSTOM_PIE, ADMIN_PUNISHMENT_FIREBALL, ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_BSA, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_SUPPLYPOD_QUICK, ADMIN_PUNISHMENT_SUPPLYPOD, ADMIN_PUNISHMENT_MAZING, ADMIN_PUNISHMENT_ROD, ADMIN_PUNISHMENT_PICKLE)
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
@@ -1354,7 +1354,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
if(ADMIN_PUNISHMENT_PIE)
var/obj/item/reagent_containers/food/snacks/pie/cream/nostun/creamy = new(get_turf(target))
creamy.splat(target)
- if (ADMIN_PUNISHMENT_CUSTOM_PIE)
+ if(ADMIN_PUNISHMENT_CUSTOM_PIE)
var/obj/item/reagent_containers/food/snacks/pie/cream/nostun/A = new()
if(!A.reagents)
var/amount = input(usr, "Specify the reagent size of [A]", "Set Reagent Size", 50) as num|null
@@ -1367,6 +1367,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
if(amount)
A.reagents.add_reagent(chosen_id, amount)
A.splat(target)
+ if(ADMIN_PUNISHMENT_PICKLE)
+ target.turn_into_pickle()
punish_log(target, punishment)
diff --git a/code/modules/antagonists/swarmer/swarmer.dm b/code/modules/antagonists/swarmer/swarmer.dm
index d0e36394ab..e559313aff 100644
--- a/code/modules/antagonists/swarmer/swarmer.dm
+++ b/code/modules/antagonists/swarmer/swarmer.dm
@@ -399,13 +399,13 @@
return FALSE
/obj/structure/lattice/catwalk/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
- . = ..()
var/turf/here = get_turf(src)
for(var/A in here.contents)
var/obj/structure/cable/C = A
if(istype(C))
to_chat(S, "Disrupting the power grid would bring no benefit to us. Aborting.")
return FALSE
+ return ..()
/obj/item/deactivated_swarmer/IntegrateAmount()
return 50
diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
index 43e54dc2c7..7af823e8a9 100644
--- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm
+++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
@@ -16,6 +16,8 @@ GLOBAL_LIST_INIT(meta_gas_dangers, meta_gas_danger_list())
GLOBAL_LIST_INIT(meta_gas_ids, meta_gas_id_list())
GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
/datum/gas_mixture
+ /// Never ever set this variable, hooked into vv_get_var for view variables viewing.
+ var/gas_list_view_only
var/initial_volume = CELL_VOLUME //liters
var/list/reaction_results
var/list/analyzer_results //used for analyzer feedback - not initialized until its used
@@ -29,9 +31,75 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
reaction_results = new
/datum/gas_mixture/vv_edit_var(var_name, var_value)
- if(var_name == "_extools_pointer_gasmixture")
+ if(var_name == NAMEOF(src, _extools_pointer_gasmixture))
return FALSE // please no. segfaults bad.
+ if(var_name == NAMEOF(src, gas_list_view_only))
+ return FALSE
return ..()
+
+/datum/gas_mixture/vv_get_var(var_name)
+ . = ..()
+ if(var_name == NAMEOF(src, gas_list_view_only))
+ var/list/dummy = get_gases()
+ for(var/gas in dummy)
+ dummy[gas] = get_moles(gas)
+ return debug_variable("gases (READ ONLY)", dummy, 0, src)
+
+/datum/gas_mixture/vv_get_dropdown()
+ . = ..()
+ VV_DROPDOWN_OPTION("", "---")
+ VV_DROPDOWN_OPTION(VV_HK_PARSE_GASSTRING, "Parse Gas String")
+ VV_DROPDOWN_OPTION(VV_HK_EMPTY, "Empty")
+ VV_DROPDOWN_OPTION(VV_HK_SET_MOLES, "Set Moles")
+ VV_DROPDOWN_OPTION(VV_HK_SET_TEMPERATURE, "Set Temperature")
+ VV_DROPDOWN_OPTION(VV_HK_SET_VOLUME, "Set Volume")
+
+/datum/gas_mixture/vv_do_topic(list/href_list)
+ . = ..()
+ if(!.)
+ return
+ if(href_list[VV_HK_PARSE_GASSTRING])
+ var/gasstring = input(usr, "Input Gas String (WARNING: Advanced. Don't use this unless you know how these work.", "Gas String Parse") as text|null
+ if(!istext(gasstring))
+ return
+ log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Set to gas string [gasstring].")
+ message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Set to gas string [gasstring].")
+ parse_gas_string(gasstring)
+ if(href_list[VV_HK_EMPTY])
+ log_admin("[key_name(usr)] emptied gas mixture [REF(src)].")
+ message_admins("[key_name(usr)] emptied gas mixture [REF(src)].")
+ clear()
+ if(href_list[VV_HK_SET_MOLES])
+ var/list/gases = get_gases()
+ for(var/gas in gases)
+ gases[gas] = get_moles(gas)
+ var/gastype = input(usr, "What kind of gas?", "Set Gas") as null|anything in subtypesof(/datum/gas)
+ if(!ispath(gastype, /datum/gas))
+ return
+ var/amount = input(usr, "Input amount", "Set Gas", gases[gastype] || 0) as num|null
+ if(!isnum(amount))
+ return
+ amount = max(0, amount)
+ log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Set gas type [gastype] to [amount] moles.")
+ message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Set gas type [gastype] to [amount] moles.")
+ set_moles(gastype, amount)
+ if(href_list[VV_HK_SET_TEMPERATURE])
+ var/temp = input(usr, "Set the temperature of this mixture to?", "Set Temperature", return_temperature()) as num|null
+ if(!isnum(temp))
+ return
+ temp = max(2.7, temp)
+ log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Changed temperature to [temp].")
+ message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Changed temperature to [temp].")
+ set_temperature(temp)
+ if(href_list[VV_HK_SET_VOLUME])
+ var/volume = input(usr, "Set the volume of this mixture to?", "Set Volume", return_volume()) as num|null
+ if(!isnum(volume))
+ return
+ volume = max(0, volume)
+ log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Changed volume to [volume].")
+ message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Changed volume to [volume].")
+ set_volume(volume)
+
/*
/datum/gas_mixture/Del()
__gasmixture_unregister()
@@ -169,7 +237,7 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
set_moles(path, text2num(gas[id]))
archive()
return 1
-
+
/datum/gas_mixture/react(datum/holder)
. = NO_REACTION
if(!total_moles())
diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm
index 8ae002dd2f..0d98fcecd6 100644
--- a/code/modules/client/client_procs.dm
+++ b/code/modules/client/client_procs.dm
@@ -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
. = ..()
diff --git a/code/modules/lighting/lighting_area.dm b/code/modules/lighting/lighting_area.dm
index 58e9a4337a..7e54456483 100644
--- a/code/modules/lighting/lighting_area.dm
+++ b/code/modules/lighting/lighting_area.dm
@@ -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 ..()
\ No newline at end of file
+ return ..()
diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm
index 779dd9c3ea..71702bef12 100644
--- a/code/modules/lighting/lighting_atom.dm
+++ b/code/modules/lighting/lighting_atom.dm
@@ -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
diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm
index 512fa8f3e4..940ee089e5 100644
--- a/code/modules/mining/machine_processing.dm
+++ b/code/modules/mining/machine_processing.dm
@@ -98,6 +98,8 @@
process_ore(AM)
/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O)
+ if(QDELETED(O))
+ return
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/material_amount = materials.get_item_material_amount(O)
if(!materials.has_space(material_amount))
diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm
index a7b7a84b27..8a6193ec0c 100644
--- a/code/modules/mining/machine_redemption.dm
+++ b/code/modules/mining/machine_redemption.dm
@@ -57,6 +57,8 @@
. += "The status display reads: Smelting [ore_multiplier] sheet(s) per piece of ore.
Reward point generation at [point_upgrade*100]%.
Ore pickup speed at [ore_pickup_rate]."
/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O)
+ if(QDELETED(O))
+ return
var/datum/component/material_container/mat_container = materials.mat_container
if (!mat_container)
return
diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm
index 5a83955bce..a5ff27e75e 100644
--- a/code/modules/mining/machine_stacking.dm
+++ b/code/modules/mining/machine_stacking.dm
@@ -92,6 +92,8 @@
return ..()
/obj/machinery/mineral/stacking_machine/HasProximity(atom/movable/AM)
+ if(QDELETED(AM))
+ return
if(istype(AM, /obj/item/stack/sheet) && AM.loc == get_step(src, input_dir))
process_sheet(AM)
@@ -104,6 +106,8 @@
return TRUE
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp)
+ if(QDELETED(inp))
+ return
var/key = inp.merge_type
var/obj/item/stack/sheet/storage = stack_list[key]
if(!storage) //It's the first of this sheet added
diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm
index 84c6c416b7..f8e34d8fd7 100644
--- a/code/modules/mining/mint.dm
+++ b/code/modules/mining/mint.dm
@@ -123,3 +123,5 @@
bag_to_use = new(src) //make a new bag if we can't find or use the old one.
unload_mineral(bag_to_use) //just forcemove memes.
O.forceMove(bag_to_use) //don't bother sending the signal, the new bag is empty and all that.
+
+ SSblackbox.record_feedback("amount", "coins_minted", 1)
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 7a1c1c8682..d2442291ac 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -842,13 +842,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
@@ -933,7 +933,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)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 1a3927e35e..2c3e0b7422 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -1204,30 +1204,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(
diff --git a/code/modules/mob/living/simple_animal/pickle.dm b/code/modules/mob/living/simple_animal/pickle.dm
new file mode 100644
index 0000000000..09365fa7e2
--- /dev/null
+++ b/code/modules/mob/living/simple_animal/pickle.dm
@@ -0,0 +1,29 @@
+//funniest shit i've ever seen
+
+/mob/living/simple_animal/pickle
+ name = "pickle"
+ desc = "It's a pickle. It might just be the funniest thing you have ever seen."
+ health = 100
+ maxHealth = 100
+ icon = 'icons/mob/32x64.dmi'
+ icon_state = "pickle"
+ del_on_death = TRUE
+ deathmessage = "The pickle implodes into its own existential dread and disappears!"
+ friendly_verb_continuous = "tickles"
+ friendly_verb_simple = "tickle"
+ var/mob/living/original_body
+
+/mob/living/simple_animal/pickle/UnarmedAttack(atom/A)
+ ..() //we want the tickle emote to go before the laugh
+ if(ismob(A))
+ var/mob/laugher = A
+ laugher.emote("laugh")
+
+/mob/living/simple_animal/pickle/Destroy(force, kill_body = TRUE)
+ if(original_body)
+ if(kill_body)
+ original_body.adjustOrganLoss(ORGAN_SLOT_BRAIN, 200) //to be fair, you have to have a very high iq to understand-
+ original_body.forceMove(get_turf(src))
+ if(mind)
+ mind.transfer_to(original_body)
+ ..()
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index 5fd94c8a89..8f86f8edc4 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -581,3 +581,20 @@
. = new_mob
qdel(src)
+
+/mob/living/proc/turn_into_pickle()
+ //if they're already a pickle, turn them back instead
+ if(istype(src, /mob/living/simple_animal/pickle))
+ qdel(src, FALSE) //this means the body inside the pickle will be dropped without killing it
+ else
+ //make a new pickle on the tile and move their mind into it if possible
+ var/mob/living/simple_animal/pickle/new_pickle = new /mob/living/simple_animal/pickle(get_turf(src))
+ new_pickle.original_body = src
+ if(mind)
+ mind.transfer_to(new_pickle)
+ //give them their old access if any
+ var/obj/item/card/id/mob_access_card = get_idcard()
+ if(mob_access_card)
+ new_pickle.access_card = mob_access_card
+ //move old body inside the pickle for safekeeping (when they die, we'll return the corpse because we're nice)
+ src.forceMove(new_pickle)
diff --git a/code/modules/movespeed/_movespeed_modifier.dm b/code/modules/movespeed/_movespeed_modifier.dm
index 0976f4d067..a338919c4b 100644
--- a/code/modules/movespeed/_movespeed_modifier.dm
+++ b/code/modules/movespeed/_movespeed_modifier.dm
@@ -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))
diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm
index a599ec9deb..c32afab342 100644
--- a/code/modules/paperwork/folders.dm
+++ b/code/modules/paperwork/folders.dm
@@ -50,6 +50,14 @@
name = "folder - '[inputvalue]'"
+/obj/item/folder/Destroy()
+ for(var/obj/important_thing in contents)
+ if(!(important_thing.resistance_flags & INDESTRUCTIBLE))
+ continue
+ important_thing.forceMove(drop_location()) //don't destroy round critical content such as objective documents.
+ return ..()
+
+
/obj/item/folder/attack_self(mob/user)
var/dat = "[name]"
diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm
index c788b9b033..ba6311a94d 100644
--- a/code/modules/power/cell.dm
+++ b/code/modules/power/cell.dm
@@ -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
diff --git a/code/modules/projectiles/ammunition/energy/special.dm b/code/modules/projectiles/ammunition/energy/special.dm
index 994b0f7f01..ab180cb629 100644
--- a/code/modules/projectiles/ammunition/energy/special.dm
+++ b/code/modules/projectiles/ammunition/energy/special.dm
@@ -75,4 +75,9 @@
/obj/item/ammo_casing/energy/shrink
projectile_type = /obj/item/projectile/beam/shrink
select_name = "shrink ray"
- e_cost = 200
\ No newline at end of file
+ e_cost = 200
+
+/obj/item/ammo_casing/energy/pickle //ammo for an adminspawn gun
+ projectile_type = /obj/item/projectile/energy/pickle
+ select_name = "pickle ray"
+ e_cost = 0
\ No newline at end of file
diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm
index 8f9e364302..c2b821dfcf 100644
--- a/code/modules/projectiles/guns/energy.dm
+++ b/code/modules/projectiles/guns/energy.dm
@@ -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
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index b55e26b6a3..6489920b98 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -329,3 +329,11 @@
add_overlay("emitter_carbine_empty")
else
add_overlay("emitter_carbine")
+
+//the pickle ray
+/obj/item/gun/energy/pickle_gun
+ name = "pickle ray"
+ desc = "funniest shit i've ever seen"
+ icon_state = "decloner"
+ no_pin_required = TRUE
+ ammo_type = list(/obj/item/ammo_casing/energy/pickle)
\ No newline at end of file
diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm
index 0c8a9deaf8..ebc4a2f2a4 100644
--- a/code/modules/projectiles/guns/magic.dm
+++ b/code/modules/projectiles/guns/magic.dm
@@ -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()
diff --git a/code/modules/projectiles/projectile/energy/misc.dm b/code/modules/projectiles/projectile/energy/misc.dm
index d5346b954d..bfa15e9ef8 100644
--- a/code/modules/projectiles/projectile/energy/misc.dm
+++ b/code/modules/projectiles/projectile/energy/misc.dm
@@ -13,3 +13,13 @@
damage_type = TOX
knockdown = 100
range = 7
+
+/obj/item/projectile/energy/pickle //projectile for adminspawn only gun
+ name = "pickle-izing beam"
+ icon_state = "declone"
+
+/obj/item/projectile/energy/pickle/on_hit(atom/target)
+ //we don't care if they blocked it, they're turning into a pickle
+ if(isliving(target))
+ var/mob/living/living_target = target
+ living_target.turn_into_pickle() //yes this is a real proc
diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm
index 7ef52aef25..c9ca4e9ba3 100644
--- a/code/modules/projectiles/projectile/magic.dm
+++ b/code/modules/projectiles/projectile/magic.dm
@@ -207,7 +207,8 @@
/mob/living/simple_animal/pet/fox,
/mob/living/simple_animal/butterfly,
/mob/living/simple_animal/pet/cat/cak,
- /mob/living/simple_animal/chick)
+ /mob/living/simple_animal/chick,
+ /mob/living/simple_animal/pickle)
new_mob = new path(M.loc)
if("humanoid")
diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm
index cadd9ba04f..f66d687a92 100644
--- a/code/modules/recycling/conveyor2.dm
+++ b/code/modules/recycling/conveyor2.dm
@@ -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)
. = ..()
diff --git a/code/modules/shuttle/arrivals.dm b/code/modules/shuttle/arrivals.dm
index 190db2c362..8322c6cdd8 100644
--- a/code/modules/shuttle/arrivals.dm
+++ b/code/modules/shuttle/arrivals.dm
@@ -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 ..()
diff --git a/html/changelog.html b/html/changelog.html
index e5b5c98aa1..ccfb04740f 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -50,6 +50,22 @@
-->
+
16 July 2020
+
DeltaFire15 updated:
+
+ - Fixes a zeolite runtime caused by a missing check.
+
+
Sneakyrat6 updated:
+
+ - Fixes being able to meta people real name with OOC Notes
+
+
timothyteakettle updated:
+
+ - travelling traders from another dimension can now visit the station in search of something specific, and reward you for giving it to them
+ - small error with pet carrier logic fixed and also making sure simple mobs are catered for properly inside bluespace jars
+ - fixes coin related issue
+
+
15 July 2020
Sonic121x updated:
diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml
index dd0a479114..662e458972 100644
--- a/html/changelogs/.all_changelog.yml
+++ b/html/changelogs/.all_changelog.yml
@@ -26361,3 +26361,14 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
2020-07-15:
Sonic121x:
- bugfix: Paramedic jumpsuit
+2020-07-16:
+ DeltaFire15:
+ - bugfix: Fixes a zeolite runtime caused by a missing check.
+ Sneakyrat6:
+ - bugfix: Fixes being able to meta people real name with OOC Notes
+ timothyteakettle:
+ - rscadd: travelling traders from another dimension can now visit the station in
+ search of something specific, and reward you for giving it to them
+ - bugfix: small error with pet carrier logic fixed and also making sure simple mobs
+ are catered for properly inside bluespace jars
+ - bugfix: fixes coin related issue
diff --git a/html/changelogs/AutoChangeLog-pr-12738.yml b/html/changelogs/AutoChangeLog-pr-12738.yml
deleted file mode 100644
index 883e4a10ac..0000000000
--- a/html/changelogs/AutoChangeLog-pr-12738.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-author: "timothyteakettle"
-delete-after: True
-changes:
- - rscadd: "travelling traders from another dimension can now visit the station in search of something specific, and reward you for giving it to them"
- - bugfix: "small error with pet carrier logic fixed and also making sure simple mobs are catered for properly inside bluespace jars"
diff --git a/html/changelogs/AutoChangeLog-pr-12774.yml b/html/changelogs/AutoChangeLog-pr-12774.yml
deleted file mode 100644
index 85373e1b9a..0000000000
--- a/html/changelogs/AutoChangeLog-pr-12774.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "DeltaFire15"
-delete-after: True
-changes:
- - bugfix: "Fixes a zeolite runtime caused by a missing check."
diff --git a/html/changelogs/AutoChangeLog-pr-12782.yml b/html/changelogs/AutoChangeLog-pr-12782.yml
deleted file mode 100644
index 07200e4345..0000000000
--- a/html/changelogs/AutoChangeLog-pr-12782.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "timothyteakettle"
-delete-after: True
-changes:
- - bugfix: "fixes coin related issue"
diff --git a/html/changelogs/AutoChangeLog-pr-12791.yml b/html/changelogs/AutoChangeLog-pr-12791.yml
new file mode 100644
index 0000000000..740e2b2c28
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-12791.yml
@@ -0,0 +1,4 @@
+author: "timothyteakettle"
+delete-after: True
+changes:
+ - rscadd: "recent culinary and scientific advancements have brought forth new pickle related technologies"
diff --git a/html/changelogs/AutoChangeLog-pr-12798.yml b/html/changelogs/AutoChangeLog-pr-12798.yml
new file mode 100644
index 0000000000..4c44d33b4c
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-12798.yml
@@ -0,0 +1,10 @@
+author: "ShizCalev, Fikou"
+delete-after: True
+changes:
+ - bugfix: "Added some sanity checking for varedit values."
+ - bugfix: "Fixed an exploit involving coins and mints that could crash the server."
+ - bugfix: "Fixed an exploit that would allow you to destroy round-critical / indestructible items with folders."
+ - bugfix: "Swarmers can no longer cut power lines by deconstructing catwalks underneath them."
+ - bugfix: "Fixed a scenario that allowed infinite resource generation via ore machines."
+ - bugfix: "you can no longer inject html in ahelps"
+ - admin: "you cant either, jannies"
diff --git a/icons/mob/32x64.dmi b/icons/mob/32x64.dmi
index 32b25ba739..79a4c8a7fd 100644
Binary files a/icons/mob/32x64.dmi and b/icons/mob/32x64.dmi differ
diff --git a/icons/obj/pet_carrier.dmi b/icons/obj/pet_carrier.dmi
index b3c11be98f..b02f9d6ce4 100644
Binary files a/icons/obj/pet_carrier.dmi and b/icons/obj/pet_carrier.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index a7b67b8072..793d0f9a99 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -2542,6 +2542,7 @@
#include "code\modules\mob\living\simple_animal\corpse.dm"
#include "code\modules\mob\living\simple_animal\damage_procs.dm"
#include "code\modules\mob\living\simple_animal\parrot.dm"
+#include "code\modules\mob\living\simple_animal\pickle.dm"
#include "code\modules\mob\living\simple_animal\shade.dm"
#include "code\modules\mob\living\simple_animal\simple_animal.dm"
#include "code\modules\mob\living\simple_animal\simple_animal_vr.dm"