[MIRROR] Cleanup (#12525)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-03-13 16:58:50 -07:00
committed by GitHub
parent e9da721226
commit 45f04c0a27
25 changed files with 51 additions and 42 deletions
@@ -19,7 +19,7 @@
power_rating = 30000 //7500 W ~ 10 HP //VOREStation Edit - 30000 W
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY //connects to regular and supply pipes
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
var/area/initial_loc
level = 1
+4 -2
View File
@@ -75,9 +75,11 @@
// Emissive blocking.
/// Uses vis_overlays to leverage caching so that very few new items need to be made for the overlay. For anything that doesn't change outline or opaque area much or at all.
#define EMISSIVE_BLOCK_GENERIC 1
#define EMISSIVE_BLOCK_GENERIC 0
/// Uses a dedicated render_target object to copy the entire appearance in real time to the blocking layer. For things that can change in appearance a lot from the base state, like humans.
#define EMISSIVE_BLOCK_UNIQUE 2
#define EMISSIVE_BLOCK_UNIQUE 1
/// Don't block any emissives. Useful for things like, pieces of paper?
#define EMISSIVE_BLOCK_NONE 2
/// The color matrix applied to all emissive overlays. Should be solely dependent on alpha and not have RGB overlap with [EM_BLOCK_COLOR].
#define EMISSIVE_COLOR list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 1,1,1,0)
+4 -4
View File
@@ -69,7 +69,7 @@
#define DET_AUTO 0x04
//Returns a newline-separated list that counts equal-ish items, outputting count and item names, optionally with icons and specific determiners
/proc/counting_english_list(var/list/input, var/mob/user, output_icons = TRUE, determiners = DET_NONE, nothing_text = "nothing", line_prefix = "\t", first_item_prefix = "\n", last_item_suffix = "\n", and_text = "\n", comma_text = "\n", final_comma_text = ",") //CHOMPEdit
/proc/counting_english_list(client/viewer, var/list/input, output_icons = TRUE, determiners = DET_NONE, nothing_text = "nothing", line_prefix = "\t", first_item_prefix = "\n", last_item_suffix = "\n", and_text = "\n", comma_text = "\n", final_comma_text = ",")
var/list/counts = list() // counted input items
var/list/items = list() // actual objects for later reference (for icons and formatting)
@@ -96,7 +96,7 @@
// atoms/items/objects can be pretty and whatnot
var/atom/A = item
if(output_icons && isicon(A.icon) && !ismob(A)) // mobs tend to have unusable icons
item_str += "[icon2html(A,user)]&nbsp;" //CHOMPEdit
item_str += "[icon2html(A, viewer)]&nbsp;"
switch(determiners)
if(DET_NONE) item_str += A.name
if(DET_DEFINITE) item_str += "\the [A]"
@@ -118,8 +118,8 @@
return english_list(out, nothing_text, and_text, comma_text, final_comma_text)
//A "preset" for counting_english_list that displays the list "inline" (comma separated)
/proc/inline_counting_english_list(var/list/input, output_icons = TRUE, determiners = DET_NONE, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "", line_prefix = "", first_item_prefix = "", last_item_suffix = "")
return counting_english_list(input, output_icons, determiners, nothing_text, and_text, comma_text, final_comma_text)
/proc/inline_counting_english_list(client/viewer, var/list/input, output_icons = TRUE, determiners = DET_NONE, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "", line_prefix = "", first_item_prefix = "", last_item_suffix = "")
return counting_english_list(viewer, input, output_icons, determiners, nothing_text, and_text, comma_text, final_comma_text)
//Returns list element or null. Should prevent "index out of bounds" error.
/proc/listgetindex(var/list/list,index)
+1 -1
View File
@@ -1,7 +1,7 @@
// Clickable stat() button.
/obj/effect/statclick
name = "Initializing..."
blocks_emissive = FALSE // EMISSIVE_BLOCK_NONE
blocks_emissive = EMISSIVE_BLOCK_NONE
var/target
INITIALIZE_IMMEDIATE(/obj/effect/statclick)
+17 -10
View File
@@ -37,20 +37,27 @@
/atom/movable/Initialize(mapload)
. = ..()
switch(blocks_emissive)
if(EMISSIVE_BLOCK_GENERIC)
var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, plane = PLANE_EMISSIVE, alpha = src.alpha)
gen_emissive_blocker.color = GLOB.em_block_color
gen_emissive_blocker.dir = dir
gen_emissive_blocker.appearance_flags |= appearance_flags
// Note, this should be refactored to drop priority overlays
add_overlay(list(gen_emissive_blocker), TRUE)
if(EMISSIVE_BLOCK_UNIQUE)
#if EMISSIVE_BLOCK_GENERIC != 0
#error EMISSIVE_BLOCK_GENERIC is expected to be 0 to facilitate a weird optimization hack where we rely on it being the most common.
#error Read the comment in code/game/atoms_movable.dm for details.
#endif
if (blocks_emissive)
if (blocks_emissive == EMISSIVE_BLOCK_UNIQUE)
render_target = ref(src)
em_block = new(src, render_target)
em_block = new(null, src)
// Note, this should be refactored to drop priority overlays
add_overlay(list(em_block), TRUE)
RegisterSignal(em_block, COMSIG_QDELETING, PROC_REF(emblocker_gc))
else
var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, plane = PLANE_EMISSIVE, alpha = src.alpha)
gen_emissive_blocker.color = GLOB.em_block_color
gen_emissive_blocker.dir = dir
gen_emissive_blocker.appearance_flags |= appearance_flags
// Note, this should be refactored to drop priority overlays
add_overlay(list(gen_emissive_blocker), TRUE)
if(opacity)
AddElement(/datum/element/light_blocking)
if(icon_scale_x != DEFAULT_ICON_SCALE_X || icon_scale_y != DEFAULT_ICON_SCALE_Y || icon_rotation != DEFAULT_ICON_ROTATION)
+1 -1
View File
@@ -8,7 +8,7 @@
use_power = USE_POWER_IDLE
idle_power_usage = 300
active_power_usage = 300
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
var/processing = 0
var/icon_keyboard = "generic_key"
+1 -1
View File
@@ -7,7 +7,7 @@ FIRE ALARM
icon = 'icons/obj/monitors.dmi'
icon_state = "fire"
layer = ABOVE_WINDOW_LAYER
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
vis_flags = VIS_HIDE // They have an emissive that looks bad in openspace due to their wall-mounted nature
var/detecting = 1.0
var/working = 1.0
+1 -1
View File
@@ -11,7 +11,7 @@
use_power = USE_POWER_IDLE
idle_power_usage = 10
power_channel = LIGHT
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
vis_flags = VIS_HIDE // They have an emissive that looks bad in openspace due to their wall-mounted nature
var/on = 1
var/area/area = null
+1 -1
View File
@@ -73,7 +73,7 @@
light_color = COLOR_WHITE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
light_on = TRUE
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
/obj/effect/dummy/lighting_obj/Initialize(mapload, _range, _power, _color, _duration)
. = ..()
+2 -2
View File
@@ -144,7 +144,7 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
alpha = 0
vis_flags = NONE
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
/obj/effect/overlay/light_visible/Destroy(force)
if(!force)
@@ -161,7 +161,7 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
vis_flags = NONE
alpha = 110
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
var/static/matrix/normal_transform
+2 -1
View File
@@ -139,7 +139,7 @@
var/digest_stage = null
var/d_mult_old = 1 //digest stage descriptions
var/d_mult = 1 //digest stage descriptions
var/d_stage_overlay //digest stage effects
var/image/d_stage_overlay //digest stage effects
var/gurgled = FALSE
var/oldname
var/cleanname
@@ -169,6 +169,7 @@
M.update_held_icons()
/obj/item/Destroy()
d_stage_overlay = null
if(item_tf_spawn_allowed)
GLOB.item_tf_spawnpoints -= src
if(ismob(loc))
@@ -357,12 +357,10 @@
// Proc: end_video()
// Parameters: reason - the text reason to print for why it ended
// Description: Ends the video call by clearing video_source
/obj/item/communicator/proc/end_video(var/reason)
/obj/item/communicator/proc/end_video()
UnregisterSignal(video_source, COMSIG_MOVABLE_ATTEMPTED_MOVE)
show_static()
video_source = null
. = span_danger("[bicon(src)] [reason ? reason : "Video session ended"].")
visible_message(.)
update_icon()
@@ -97,7 +97,7 @@
. += "It is full."
if(!opened && isobserver(user))
. += "It contains: [counting_english_list(contents, user)]" //CHOMPEdit
. += "It contains: [counting_english_list(user.client, contents)]"
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
if(wall_mounted)
+1 -1
View File
@@ -311,7 +311,7 @@
icon = 'icons/obj/flora/deadtrees.dmi'
icon_state = "tree_sif"
base_state = "tree_sif"
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
product = /obj/item/stack/material/log/sif
catalogue_data = list(/datum/category_item/catalogue/flora/sif_tree)
randomize_size = TRUE
@@ -6,8 +6,6 @@ ADMIN_VERB_AND_CONTEXT_MENU(debug_variables, (R_DEBUG|R_SERVER|R_ADMIN|R_SPAWN|R
// This is kept as a separate proc because admins are able to show VV to non-admins
/client/proc/debug_variables(datum/thing in world)
set category = "Debug.Investigate"
set name = "View Variables"
//set src in world
var/static/cookieoffset = rand(1, 9999) //to force cookies to reset after the round.
+1 -1
View File
@@ -98,7 +98,7 @@
/obj/item/anomaly_scanner/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
var/list/data = list()
var/obj/effect/anomaly/anom = buffered_anomaly.resolve()
var/obj/effect/anomaly/anom = buffered_anomaly?.resolve()
if(!istype(anom))
return data
+3 -1
View File
@@ -24,9 +24,11 @@
get_asset_datum(/datum/asset/simple/preferences),
get_asset_datum(/datum/asset/spritesheet/preferences),
get_asset_datum(/datum/asset/json/preferences),
get_asset_datum(/datum/asset/spritesheet_batched/pai_icons),
)
if(GLOB.asset_datums[/datum/asset/spritesheet_batched/pai_icons])
assets += get_asset_datum(/datum/asset/spritesheet_batched/pai_icons)
for (var/datum/preference_middleware/preference_middleware as anything in middleware)
assets += preference_middleware.get_ui_assets()
@@ -65,10 +65,10 @@
usr.put_in_l_hand(src)
src.add_fingerprint(usr)
/obj/item/clothing/examine(var/mob/user)
/obj/item/clothing/examine(mob/user)
. = ..(user)
if(LAZYLEN(accessories))
. += "It has the following attached: [counting_english_list(accessories, user)]" //CHOMPEdit
. += "It has the following attached: [counting_english_list(user.client, accessories)]"
/**
* Attach accessory A to src
+1 -1
View File
@@ -26,7 +26,7 @@
///Lazylist to keep track on the sources of illumination.
var/list/affected_dynamic_lights
///Either FALSE, [EMISSIVE_BLOCK_GENERIC], or [EMISSIVE_BLOCK_UNIQUE]
var/blocks_emissive = FALSE
var/blocks_emissive = EMISSIVE_BLOCK_NONE
///Internal holder for emissive blocker object, do not use directly use blocks_emissive
var/atom/movable/emissive_blocker/em_block
@@ -2,7 +2,7 @@
real_name = "Test Dummy"
status_flags = CANPUSH
has_huds = FALSE
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
no_vore = TRUE //Dummies don't need bellies.
/mob/living/carbon/human/dummy/Initialize(mapload)
@@ -185,6 +185,7 @@
//no stripping of simplemobs
strip_pref = FALSE
blocks_emissive = EMISSIVE_BLOCK_UNIQUE // Note, this should be refactored to drop priority overlays
/mob/living/simple_mob/Initialize(mapload)
remove_verb(src, /mob/verb/observe)
@@ -24,7 +24,7 @@
// If you create a program which is limited to Laptops and Consoles you don't have to add it's icon_state overlay for Tablets too, for example.
icon = null // This thing isn't meant to be used on it's own. Subtypes should supply their own icon.
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
var/overlay_icon = null // Icon file used for overlays
icon_state = null
center_of_mass_x = 0
+1 -1
View File
@@ -100,7 +100,7 @@ GLOBAL_LIST_EMPTY(apcs)
use_power = USE_POWER_OFF
clicksound = "switch"
req_access = list(ACCESS_ENGINE_EQUIP)
blocks_emissive = FALSE
blocks_emissive = EMISSIVE_BLOCK_NONE
vis_flags = VIS_HIDE // They have an emissive that looks bad in openspace due to their wall-mounted nature
var/area/area
var/areastring = null
+1
View File
@@ -209,6 +209,7 @@
playsound(src, 'sound/effects/spray3.ogg', 50, 1)
temp = "Cleared Successfully!"
color_matrix_last = DEFAULT_COLORMATRIX
update_tgui_static_data(ui.user, ui)
return TRUE
if("set_matrix_color")
color_matrix_last[params["color"]] = params["value"]
@@ -86,10 +86,9 @@
additional_desc = "There appear to be [pick("dark","faintly glowing","pungent","bright")] [pick("red","purple","green","blue")] stains inside."
if(ARCHAEO_URN)
item_type = "urn"
new_item = new /obj/item/reagent_containers/glass/replenishing(src.loc)
new_item = new /obj/item/reagent_containers/glass/beaker(src.loc)
if(prob(33))
LAZYSET(new_item.origin_tech, TECH_ARCANE, 1)
new_item = new /obj/item/reagent_containers/glass/beaker(src.loc)
new_item.icon = 'icons/obj/xenoarchaeology.dmi'
new_item.icon_state = "urn[rand(1,2)]"
apply_image_decorations = TRUE