From c1d241594b9d4fc78280b01f2a89d886384c54b1 Mon Sep 17 00:00:00 2001 From: Cody Brittain Date: Sat, 13 Apr 2024 14:07:51 -0400 Subject: [PATCH] Planes & Layers part 2: Plane Masters (#18749) Part 2 of the PR series to bring /tg/'s and bay's plane masters to Aurora, the lack of which is blocking several features we want. This ports over the easier to understand Bay version of plane masters, which is detailed in the relevant readme file in the code. Example effect code for a warp effect is also in, which has been implemented for gravity catapults. Relies on #18741 --------- Signed-off-by: Matt Atlas Co-authored-by: Cody Brittain Co-authored-by: Matt Atlas --- aurorastation.dme | 3 +- code/__DEFINES/flags.dm | 10 +- code/__DEFINES/{_layers.dm => layers.dm} | 110 +++++--- code/__DEFINES/zcopy.dm | 3 - code/__HELPERS/icon_smoothing.dm | 4 +- code/__HELPERS/overlay.dm | 2 +- code/_onclick/hud/fullscreen.dm | 1 + code/_onclick/hud/rendering/_render_readme.md | 62 ++++ code/_onclick/hud/rendering/_renderer.dm | 264 ++++++++++++++++++ code/_onclick/hud/screen_objects.dm | 1 + code/_onclick/hud/skybox.dm | 3 +- code/controllers/subsystems/icon_cache.dm | 2 +- code/controllers/subsystems/skybox.dm | 4 +- code/controllers/subsystems/zcopy.dm | 239 ++++++++++++++-- code/game/atoms_movable.dm | 1 - .../endgame/supermatter_cascade/blob.dm | 1 + code/game/machinery/alarm.dm | 1 + code/game/machinery/atmoalter/canister.dm | 8 +- code/game/machinery/body_scanner.dm | 1 + code/game/machinery/computer/computer.dm | 1 + code/game/machinery/crusher_piston.dm | 1 + code/game/machinery/cryo.dm | 1 + code/game/machinery/doors/airlock.dm | 14 +- code/game/machinery/doors/firedoor.dm | 6 +- code/game/machinery/floor_light.dm | 2 +- code/game/machinery/lightswitch.dm | 1 + code/game/machinery/newscaster.dm | 1 + code/game/machinery/requests_console.dm | 1 + code/game/machinery/ringer.dm | 1 + code/game/machinery/stargazer.dm | 5 +- code/game/machinery/suit_cycler.dm | 1 + code/game/machinery/teleporter.dm | 4 +- code/game/machinery/vending.dm | 1 + code/game/objects/effects/misc.dm | 9 + code/game/objects/effects/overlays.dm | 3 +- code/game/objects/items.dm | 6 + .../objects/items/devices/radio/intercom.dm | 1 + .../objects/items/devices/slide_projector.dm | 4 +- code/game/objects/items/devices/t_scanner.dm | 1 + code/game/objects/items/skrell.dm | 3 +- code/game/objects/items/weapons/tools.dm | 3 +- code/game/objects/structures/light_pole.dm | 2 +- code/game/turfs/space/space.dm | 2 +- .../components/unary/vent_pump.dm | 4 +- .../components/unary/vent_scrubber.dm | 4 +- code/modules/atmospherics/pipes.dm | 12 +- code/modules/client/preferences.dm | 1 + .../clothing/under/accessories/accessory.dm | 4 +- code/modules/compass/compass_holder.dm | 2 + .../machinery/cooking_machines/oven.dm | 3 +- code/modules/economy/ATM.dm | 4 +- code/modules/economy/OrderTerminal.dm | 2 +- .../effects/shuttle_landing_warning.dm | 1 + .../heavy_vehicle/equipment/utility.dm | 73 +++++ code/modules/holodeck/HolodeckObjects.dm | 4 +- code/modules/lighting/lighting_overlay.dm | 3 +- code/modules/mining/machine_processing.dm | 2 +- code/modules/mining/machine_stacking.dm | 2 +- code/modules/mining/ore_detector.dm | 1 + code/modules/mob/abstract/new_player/login.dm | 4 - .../modules/mob/abstract/new_player/logout.dm | 4 - .../modules/mob/abstract/observer/observer.dm | 2 +- code/modules/mob/floating_messages.dm | 2 +- .../mob/living/carbon/human/update_icons.dm | 4 +- .../living/carbon/slime/slime_extractor.dm | 4 +- .../mob/living/silicon/robot/robot_helpers.dm | 13 +- .../constructs/constructs/cult_construct.dm | 9 +- .../simple_animal/hostile/ipc_zombie.dm | 6 +- .../hostile/rogue_maint_drone.dm | 3 +- .../simple_animal/hostile/space_fauna.dm | 3 +- code/modules/mob/login.dm | 6 + code/modules/mob/logout.dm | 3 + code/modules/mob/mob.dm | 10 + code/modules/multiz/turfs/open_space.dm | 1 - code/modules/multiz/zmimic/mimic_movable.dm | 17 +- code/modules/multiz/zmimic/mimic_turf.dm | 2 +- code/modules/organs/organ_icon.dm | 3 +- code/modules/organs/subtypes/unbreakable.dm | 3 +- .../overmap/exoplanets/decor/objs/monolith.dm | 2 +- code/modules/overmap/overmap_object.dm | 2 +- code/modules/power/apc.dm | 1 + code/modules/power/cable.dm | 4 +- code/modules/power/lights/fixtures.dm | 8 +- code/modules/power/radial_floodlight.dm | 4 +- .../power/singularity/field_generator.dm | 2 +- code/modules/power/singularity/generator.dm | 2 +- code/modules/power/tesla/coil.dm | 4 +- code/modules/power/tesla/energy_ball.dm | 2 +- code/modules/recycling/disposal.dm | 4 +- code/modules/turbolift/turbolift_map.dm | 4 +- code/modules/ventcrawl/ventcrawl.dm | 6 +- code/modules/weather/_weather.dm | 4 +- .../GeneralCamo - Plane Masters.yml | 43 +++ .../tirakqi_smuggler/tirakqi_smuggler.dm | 2 +- 94 files changed, 927 insertions(+), 182 deletions(-) rename code/__DEFINES/{_layers.dm => layers.dm} (56%) create mode 100644 code/_onclick/hud/rendering/_render_readme.md create mode 100644 code/_onclick/hud/rendering/_renderer.dm create mode 100644 html/changelogs/GeneralCamo - Plane Masters.yml diff --git a/aurorastation.dme b/aurorastation.dme index dd8ed153cb0..bee76fd245b 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -23,7 +23,6 @@ #include "code\__DEFINES\_compile_helpers.dm" #include "code\__DEFINES\_flags.dm" #include "code\__DEFINES\_helpers.dm" -#include "code\__DEFINES\_layers.dm" #include "code\__DEFINES\_macros.dm" #include "code\__DEFINES\_protect.dm" #include "code\__DEFINES\_tick.dm" @@ -73,6 +72,7 @@ #include "code\__DEFINES\important_recursive_contents.dm" #include "code\__DEFINES\items_clothing.dm" #include "code\__DEFINES\jobs.dm" +#include "code\__DEFINES\layers.dm" #include "code\__DEFINES\lighting.dm" #include "code\__DEFINES\logging.dm" #include "code\__DEFINES\machinery.dm" @@ -271,6 +271,7 @@ #include "code\_onclick\hud\screen_objects.dm" #include "code\_onclick\hud\skybox.dm" #include "code\_onclick\hud\spell_screen_objects.dm" +#include "code\_onclick\hud\rendering\_renderer.dm" #include "code\_onclick\hud\screen_object_types\ai_screen_objs.dm" #include "code\_onclick\hud\screen_object_types\borer.dm" #include "code\_onclick\hud\screen_object_types\internals.dm" diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index eb061cca3df..94d6a1756b3 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -10,6 +10,11 @@ var/global/list/bitflags = list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define ZM_ALLOW_ATMOS 4 // If this turf permits passage of air. #define ZM_MIMIC_NO_AO 8 // If the turf shouldn't apply regular turf AO and only do Z-mimic AO. #define ZM_NO_OCCLUDE 16 // Don't occlude below atoms if we're a non-mimic z-turf. +#define ZM_MIMIC_BASETURF 32 // We dont want to show space, we want to show the base turf of the area (for stuff like glass floors) + +// Movable flags. +#define ZMM_IGNORE 1 //! Do not copy this movable. +#define ZMM_MANGLE_PLANES 2 //! Check this movable's overlays/underlays for explicit plane use and mangle for compatibility with Z-Mimic. If you're using emissive overlays, you probably should be using this flag. Expensive, only use if necessary. // Convenience flag. #define ZM_MIMIC_DEFAULTS (ZM_MIMIC_BELOW) @@ -18,10 +23,11 @@ var/global/list/bitflags = list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 var/list/mimic_defines = list( "ZM_MIMIC_BELOW", "ZM_MIMIC_OVERWRITE", - "ZM_ALLOW_LIGHTING", +// "ZM_ALLOW_LIGHTING", //Exists on Nebula, but not Aurora? "ZM_ALLOW_ATMOS", "ZM_MIMIC_NO_AO", - "ZM_NO_OCCLUDE" + "ZM_NO_OCCLUDE", + "ZM_MIMIC_BASETURF" ) //EMP protection diff --git a/code/__DEFINES/_layers.dm b/code/__DEFINES/layers.dm similarity index 56% rename from code/__DEFINES/_layers.dm rename to code/__DEFINES/layers.dm index a693c5e155a..7bb194fdb9a 100644 --- a/code/__DEFINES/_layers.dm +++ b/code/__DEFINES/layers.dm @@ -1,3 +1,4 @@ +// Planes, layers, and defaults for _renderer.dm /* from stddef.dm, planes & layers built into byond. @@ -15,15 +16,31 @@ FLOAT_PLANE = -32767 */ +#define LOWEST_PLANE -200 + #define CLICKCATCHER_PLANE -100 -#define PLANE_SPACE_BACKGROUND -99 -#define PLANE_SPACE_PARALLAX (PLANE_SPACE_BACKGROUND + 1) // -98 -#define PLANE_SKYBOX (PLANE_SPACE_PARALLAX + 1) // -97 -#define PLANE_SPACE_DUST (PLANE_SPACE_PARALLAX + 1) // -96 -#define PLANE_ABOVE_PARALLAX (PLANE_SPACE_DUST + 1) // -95 +#define SPACE_PLANE -99 + #define SPACE_LAYER 1 -#define DEFAULT_PLANE 0 +#define SKYBOX_PLANE -98 + #define SKYBOX_LAYER 1 + +#define DUST_PLANE -97 + #define DEBRIS_LAYER 1 + #define DUST_LAYER 2 + +// Openspace uses planes -80 through -70. +#define OPENTURF_MAX_PLANE -70 +#define OPENTURF_MAX_DEPTH 10 // The maxiumum number of planes deep we'll go before we just dump everything on the same plane. + +#define OVER_OPENSPACE_PLANE -4 + +#define WARP_EFFECT_PLANE -3 + +#define BLACKNESS_PLANE 0 //Blackness plane as per DM documentation. + +#define DEFAULT_PLANE 1 #define PLATING_LAYER 1 //ABOVE PLATING #define HOLOMAP_LAYER 1.01 @@ -109,45 +126,68 @@ #define OBSERVER_LAYER 5.1 #define OBFUSCATION_LAYER 5.2 + #define OVERMAP_SECTOR_LAYER 60 + #define OVERMAP_IMPORTANT_SECTOR_LAYER 61 + #define OVERMAP_SHIP_LAYER 62 + #define OVERMAP_SHUTTLE_LAYER 63 + #define AREA_LAYER 999 -//FUTURE OVERMAP_PLANE - #define OVERMAP_SECTOR_LAYER 3.15 - #define OVERMAP_IMPORTANT_SECTOR_LAYER 3.16 - #define OVERMAP_SHIP_LAYER 3.17 - #define OVERMAP_SHUTTLE_LAYER 3.18 +#define OBSERVER_PLANE 3 -//FUTURE LIGHTING PLANE - #define LIGHTBULB_LAYER 10 - #define LIGHTING_LAYER 11 - #define ABOVE_LIGHTING_LAYER 12 +#define LIGHTING_PLANE 4 + #define LIGHTING_LAYER 1 -//FUTURE EFFECTS_ABOVE_LIGHTING_PLANE - #define EFFECTS_ABOVE_LIGHTING_LAYER 13 // For overlays you want to be above light. - #define EYEGLOW_LAYER 14 - #define BEAM_PROJECTILE_LAYER 15 - #define SUPERMATTER_WALL_LAYER 16 - #define SPEECH_INDICATOR_LAYER 17 +#define EFFECTS_ABOVE_LIGHTING_PLANE 5 + #define EYEGLOW_LAYER 1 + #define BEAM_PROJECTILE_LAYER 2 + #define SUPERMATTER_WALL_LAYER 3 + #define LIGHTNING_LAYER 4 -//FUTURE FULLSCREEN_PLANE - #define FULLSCREEN_LAYER 18 - #define DAMAGE_LAYER 19 - #define IMPAIRED_LAYER 20 - #define BLIND_LAYER 21 - #define CRIT_LAYER 22 +#define FULLSCREEN_PLANE 6 + #define FULLSCREEN_LAYER 1 + #define DAMAGE_LAYER 2 + #define IMPAIRED_LAYER 3 + #define BLIND_LAYER 4 + #define CRIT_LAYER 5 -//FUTURE HUD_PLANE - #define UNDER_HUD_LAYER 23 - #define HUD_BASE_LAYER 24 - #define HUD_ITEM_LAYER 25 - #define HUD_ABOVE_ITEM_LAYER 26 - #define RADIAL_BACKGROUND_LAYER 26.5 - #define RADIAL_BASE_LAYER 27 - #define RADIAL_CONTENT_LAYER 28 +#define HUD_PLANE 7 + #define UNDER_HUD_LAYER 1 + #define HUD_BASE_LAYER 2 + #define HUD_ITEM_LAYER 3 + #define HUD_ABOVE_ITEM_LAYER 4 + #define RADIAL_BACKGROUND_LAYER 5 + #define RADIAL_BASE_LAYER 6 + #define RADIAL_CONTENT_LAYER 7 + +//-------------------- Rendering --------------------- + +/// Semantics - The final compositor or a filter effect renderer +#define RENDER_GROUP_NONE null + +/// Things to be drawn within the game context +#define RENDER_GROUP_SCENE 990 + +/// Things to be drawn within the screen context +#define RENDER_GROUP_SCREEN 995 + +/// The final render group, for compositing +#define RENDER_GROUP_FINAL 999 + +/// Integer (One of `*_PLANE`). The atom's rendering plane. See `code\__defines\__renderer.dm` for a list of valid planes. Also see the DM Reference for `plane var (atom)`. +/atom/plane = DEFAULT_PLANE #define DEFAULT_APPEARANCE_FLAGS (PIXEL_SCALE) +#define DEFAULT_RENDERER_APPEARANCE_FLAGS (PLANE_MASTER | NO_CLIENT_COLOR) + +/atom/appearance_flags = DEFAULT_APPEARANCE_FLAGS +/atom/movable/appearance_flags = DEFAULT_APPEARANCE_FLAGS | TILE_BOUND // Most AMs are not visibly bigger than a tile. +/image/appearance_flags = DEFAULT_APPEARANCE_FLAGS +/mutable_appearance/appearance_flags = DEFAULT_APPEARANCE_FLAGS // Inherits /image but re docs, subject to change + /atom/proc/hud_layerise() + plane = HUD_PLANE layer = HUD_ITEM_LAYER /image/proc/turf_decal_layerise() diff --git a/code/__DEFINES/zcopy.dm b/code/__DEFINES/zcopy.dm index 833c5cffd5f..3df518d6de1 100644 --- a/code/__DEFINES/zcopy.dm +++ b/code/__DEFINES/zcopy.dm @@ -1,5 +1,2 @@ -#define OPENTURF_MAX_PLANE -71 -#define OPENTURF_CAP_PLANE -70 // The multiplier goes here so it'll be on top of every other overlay. -#define OPENTURF_MAX_DEPTH 10 // The maxiumum number of planes deep we'll go before we just dump everything on the same plane. #define SHADOWER_DARKENING_FACTOR 0.7 // The multiplication factor for openturf shadower darkness. Lighting will be multiplied by this. #define SHADOWER_DARKENING_COLOR "#999999" // The above, but as an RGB string for lighting-less turfs. diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index db27cb8cc89..37f336d9754 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -233,10 +233,10 @@ var/istate = "[((x + y) ^ ~(x * y) + z) % 25]" underlay_appearance.icon = 'icons/turf/space.dmi' underlay_appearance.icon_state = istate - underlay_appearance.plane = PLANE_SPACE_BACKGROUND + underlay_appearance.plane = SPACE_PLANE var/image/dust = image('icons/turf/space_parallax1.dmi', istate) - dust.plane = PLANE_SPACE_DUST + dust.plane = DUST_PLANE dust.alpha = 80 dust.blend_mode = BLEND_ADD U += dust diff --git a/code/__HELPERS/overlay.dm b/code/__HELPERS/overlay.dm index a91ba9104e5..50437886e71 100644 --- a/code/__HELPERS/overlay.dm +++ b/code/__HELPERS/overlay.dm @@ -43,7 +43,7 @@ /proc/make_screen_overlay(icon, icon_state, brightness_factor = null, glow_radius = 1) var/image/overlay = image(icon, icon_state) - overlay.layer = ABOVE_LIGHTING_LAYER + overlay.plane = EFFECTS_ABOVE_LIGHTING_PLANE var/image/underlay = image(overlay) underlay.alpha = 128 underlay.filters = filter(type="bloom", offset=glow_radius, size=glow_radius*2, threshold="#000") diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 31985b0a5cd..d004285be86 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -67,6 +67,7 @@ icon_state = "default" screen_loc = "CENTER-7,CENTER-7" mouse_opacity = MOUSE_OPACITY_TRANSPARENT + plane = FULLSCREEN_PLANE layer = FULLSCREEN_LAYER var/severity = 0 var/allstate = 0 //shows if it should show up for dead people too diff --git a/code/_onclick/hud/rendering/_render_readme.md b/code/_onclick/hud/rendering/_render_readme.md new file mode 100644 index 00000000000..3f1cd6c99af --- /dev/null +++ b/code/_onclick/hud/rendering/_render_readme.md @@ -0,0 +1,62 @@ +# The Render Readme + +1. [Byond internal functionality](#byond-internal-functionality) +2. [Known internal snowflake](#known-internal-snowflake) +3. [The rendering solution](#the-rendering-solution) +4. [Render plates](#render-plates) + +## Byond internal functionality +This part of the guide will assume that you have read the byond reference entry for rendering at www.byond.com/docs/ref//#/{notes}/renderer + +When you create an atom, this will always create an internal byond structure called an "appearance". This appearance you will likely be familiar with, as it is exposed through the /atom/var/appearance var. This appearance var holds data on how to render the object, ie what icon/icon_state/color etc it is using. Note that appearance vars will always copy, and do not hold a reference. When you update a var, for example lets pretend we add a filter, the appearance will be updated to include the filter. Note that, however, vis_contents objets are uniquely excluded from appearances. Then, when the filter is updated, the appearance will be recreated, and the atom marked as "dirty". After it has been updated, the SendMaps() function (sometimes also called maptick), which is a internal byond function that iterates over all objects in a clients view and in the clients.mob.contents, checks for "dirty" atoms, then resends any "dirty" appearances to clients as needed and unmarks them as dirty. This function is notoriosly slow, but we can see it's tick usage through the world.map_cpu var. We can also avoid more complex checks checking whether an object is visible on a clients screen by using the TILE_BOUND appearance flag. + +Finally, we arrive at clientside behavior, where we have two main clientside functions: GetMapIcons, and Render. GetMapIcons is repsonsible for actual rendering calculations on the clientside, such as "Group Icons and Set bounds", which performs clientside calculations for transform matrixes. Note that particles here are handled in a seperate thread and are not diplayed in the clientside profiler. Render handles the actual drawing of the screen. + +## Known internal snowflake +The following is an incomplete list of pitfalls that come from byond snowflake that are known, this list is obviously incomplete. + +1. Transforms are very slow on clientside. This is not usually noticable, but if you start using large amounts of them it will grind you to a halt quickly, regardless of whether its on overlays or objs +2. The darkness plane. The darkness plane has specific variables it needs to render correctly, and these can be found in the plane masters file. it is composed internally of two parts, a black mask over the clients screen, and a non rendering mask that blocks all luminosity=0 turfs and their contents from rendering if the SEE_BLACKNESS flag is set properly. It behaves very oddly, such as forcing itself to ALWAYS render or pre-render on blend_multiply blend mode or refusing to render the black mask properly otherwise. The blocker will always block rendering but the mask can be layered under other objects. +3. render_target/source. Render_target/source will only copy certain rendering instructions, and these are only defined as "etc." in the byond reference. Known non copied appearance vars include: blend_mode, plane, layer, vis_contents, mouse_opacity... +4. Large icons on the screen that peek over the edge will instead of only rendering partly like you would expect will instead stretch the screen while not adgusting the render buffer, which means that you can actively see as tiles and map objects are rendered. You can use this for an easy "offscreen" UI. +5. Numerically large filters on objects of any size will torpedo performance, even though large objects with small filters will perform massively better. (ie blur(size=20) BAD) +6. Texture Atlas: the texture atlas byond uses to render icons is very susceptible to corruption and can regularily replace icons with other icons or just not render at all. This can be exasperated by alt tabbing or pausing the dreamseeker process. +7. The renderer is awful code and lummox said he will try changing a large part of it for 515 so keep an eye on that +8. Byond uses DirectX 9 (Lummox said he wants to update to DirectX 11) +9. Particles are just fancy overlays and are not independent of their owner +10. Maptick items inside mob.contents are cheaper compared to most other movables + +## The rendering solution +One of the main issues with making pretty effects is how objects can only render to one plane, and how filters can only be applied to single objects. Quite simply it means we cant apply effects to multiple planes at once, and an effect to one plane only by treating it as a single unit: + +![](https://raw.githubusercontent.com/tgstation/documentation-assets/main/rendering/renderpipe_old.png) + +A semi-fix to stop from having to apply effects to every single plane is to use the render controllers, to automatically apply filters and colors automatically onto their controlled planes. + +The solution is thus instead we replace plane masters rendering directly to client with planes that render multiple planes onto them as objects in order to be able to affect multiple planes while treating them as a single object. This is done by relaying the plane using a "render relay" onto a "render plate" which acts as a plane master of plane masters of sorts, and since planes are rendered onto it as single objects any filters we apply to them will render over the planes, treating them as a single unit. + +![](https://raw.githubusercontent.com/tgstation/documentation-assets/main/rendering/renderpipe_refactored.png) + +We can also choose to render these by decreasing the scaling all applied effects (effect_size/number_of_plates_rendered_to) then rendering it onto multiple planes: + +![](https://raw.githubusercontent.com/tgstation/documentation-assets/main/rendering/renderpipe_refactored_multiple.png) + +Through these this allows us to treat planes as single objects, and lets us distort them as a single unit, most notably works wonders with the displacement filter. Specifically, here you can displacement_filter a plane onto a plate, which then will treat all the other planes rendered on that plate as a single unit. + +## Render plates + +The rendering system uses two objects to unify planes: render_relay and render_plates. Render relays use render_target/source and the relay_render_to_plane proc to replicate the plane master on the render relay. This render relay is then rendered onto a render_plate, which is a plane master that renders the render_relays onto itself. This plate can then be hierachically rendered with the same process until it reaches the master render_plate, which is the plate that will actually render to the player. These plates naturally in the byond style have quirks. For example, rendering to two plates will double any effects such as color or filters, and as such you need to carefully manage how you render them. Keep in mind as well that when sorting the layers for rendering on a plane that they should not be negative, this is handled automatically in relay_render_to_plane. When debugging note that mouse_opacity can act bizzarly with this method, such as only allowing you to click things that are layered over objects on a certain plane but auomatically setting the mouse_opacity should be handling this. Note that if you decide to manipulate a plane with internal byond objects that you will have to manually extrapolate the vars that are set if you want to render them to another plane (See blackness plane for example), and that this is not documented anywhere. + + +Goodluck and godspeed with coding + - Just another contributor + +## Baystation/Aurorastation Differences + +The bay implementation differs in some points but you can treat the prior sections as broadly accurate. + +- Locally we have refactored and simplified the above concepts down to `/atom/movable/renderer` and undifferentiated relay movables. +- There is no type destinction between renderers intended to draw normal entities and renderers intended to draw other renderers. +- We instead refer to these as "Plane Renderers" and "Group Renderers", and note that Group Renderers may render *other* Group Renderers in turn. +- We additionally add the extra "Effect Renderer" as a distinct concept. Effect renderers are more virtual, and drawn to other renderers by filters instead. +- See the comments in _renderer.dm for detail next to code. \ No newline at end of file diff --git a/code/_onclick/hud/rendering/_renderer.dm b/code/_onclick/hud/rendering/_renderer.dm new file mode 100644 index 00000000000..bec1cc93e78 --- /dev/null +++ b/code/_onclick/hud/rendering/_renderer.dm @@ -0,0 +1,264 @@ +/* * +* Renderers +* Renderers are virtual objects that act as draw groups of things, including +* other Renderers. Renderers are similar to older uses of PLANE_MASTER but +* employ render targets using the "*" slate prefix to draw off-screen, to be +* composited in a controlled and flexible order and in some cases, reuse for +* visual effects. +*/ + +/// The base /renderer definition and defaults. +/atom/movable/renderer + abstract_type = /atom/movable/renderer + appearance_flags = DEFAULT_RENDERER_APPEARANCE_FLAGS + screen_loc = "CENTER" + plane = LOWEST_PLANE + blend_mode = BLEND_OVERLAY + + /// The compositing renderer this renderer belongs to. + var/group = RENDER_GROUP_FINAL + + /// The relay movable used to composite this renderer to its group. + var/atom/movable/relay // Also see https://secure.byond.com/forum/?post=2141928 maybe. + + /// Optional blend mode override for the renderer's composition relay. + var/relay_blend_mode + + /// If text, uses the text or, if TRUE, uses "*AUTO-[name]" + var/render_target_name = TRUE + + var/mob/owner = null + + +/atom/movable/renderer/Destroy() + owner = null + QDEL_NULL(relay) + return ..() + + +INITIALIZE_IMMEDIATE(/atom/movable/renderer) + + +/atom/movable/renderer/Initialize(mapload, mob/owner) + . = ..() + if (. == INITIALIZE_HINT_QDEL) + return + src.owner = owner + if (isnull(group)) + if (istext(render_target_name)) + render_target = render_target_name + return + if (istext(render_target_name)) + render_target = render_target_name + else if (render_target_name) + render_target = "*[ckey(name)]" + relay = new + relay.screen_loc = "CENTER" + relay.appearance_flags = PASS_MOUSE | NO_CLIENT_COLOR | KEEP_TOGETHER + relay.name = "[render_target] relay" + relay.mouse_opacity = mouse_opacity + relay.render_source = render_target + relay.layer = (plane + abs(LOWEST_PLANE)) * 0.5 + relay.plane = group + if (isnull(relay_blend_mode)) + relay.blend_mode = blend_mode + else + relay.blend_mode = relay_blend_mode + +/** +* Graphic preferences +* +* Some renderers may be able to use a graphic preference to determine how to display effects. For example reduce particle counts or filter variables. +*/ +/atom/movable/renderer/proc/GraphicsUpdate() + return + + +/** +* Renderers on /mob +* We attach renderers to mobs for their lifespan. Only mobs with clients get +* renderers, and they are removed again when the mob loses its client. Mobs +* get their own unique renderer instances but it would not be inconceivable +* to share them globally. +*/ + +/// The list of renderers associated with this mob. +/mob/var/list/atom/movable/renderer/renderers + + +/// Creates the mob's renderers on /Login() +/mob/proc/CreateRenderers() + if (!renderers) + renderers = list() + for (var/atom/movable/renderer/renderer as anything in subtypesof(/atom/movable/renderer)) + if(ispath(renderer, /atom/movable/renderer/shared)) + continue + renderer = new renderer (null, src) + renderers[renderer] = renderer.plane // (renderer = plane) format for visual debugging + if (renderer.relay) + my_client.screen += renderer.relay + my_client.screen += renderer + + for (var/atom/movable/renderer/zrenderer as anything in GLOB.zmimic_renderers) + if (zrenderer.relay) + my_client.screen += zrenderer.relay + my_client.screen += zrenderer + +/// Removes the mob's renderers on /Logout() +/mob/proc/RemoveRenderers() + if(my_client) + for(var/atom/movable/renderer/renderer as anything in renderers) + my_client.screen -= renderer + if (renderer.relay) + my_client.screen -= renderer.relay + qdel(renderer) + for (var/atom/movable/renderer/renderer as anything in GLOB.zmimic_renderers) + my_client.screen -= renderer + if (renderers) + renderers.Cut() + +/* * +* Plane Renderers +* We treat some renderers as planes with layers. When some atom has the same plane +* as a Plane Renderer, it is drawn by that renderer. The layer of the atom determines +* its draw order within the scope of the renderer. The draw order of same-layered things +* is probably by atom contents order, but can be assumed not to matter - if it's out of +* order, it should have a more appropriate layer value. +* Higher plane values are composited over lower. Here, they are ordered from under to over. +*/ + +/// Handles byond internal letterboxing. Avoid touching. +/atom/movable/renderer/letterbox + name = "Letterbox" + group = RENDER_GROUP_SCENE + plane = BLACKNESS_PLANE + blend_mode = BLEND_MULTIPLY + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + +/atom/movable/renderer/space + name = "Space" + group = RENDER_GROUP_SCENE + plane = SPACE_PLANE + +/atom/movable/renderer/skybox + name = "Skybox" + group = RENDER_GROUP_SCENE + plane = SKYBOX_PLANE + relay_blend_mode = BLEND_MULTIPLY + +//Z Mimic planemasters -> Could apply scaling for parallax though that requires copying appearances from adjacent turfs +GLOBAL_LIST_EMPTY(zmimic_renderers) + +/hook/startup/proc/create_global_renderers() //Some (most) renderers probably do not need to be instantiated per mob. So may as well make them global and just add to screen + //Zmimic planemasters + for(var/i = 0 to OPENTURF_MAX_DEPTH) + GLOB.zmimic_renderers += new /atom/movable/renderer/shared/zmimic(null, null, OPENTURF_MAX_PLANE - i) + + return TRUE + +/atom/movable/renderer/shared/zmimic + name = "Zrenderer" + group = RENDER_GROUP_SCENE + +/atom/movable/renderer/shared/zmimic/Initialize(mapload, _owner, _plane) + plane = _plane + name = "Zrenderer [plane]" + . = ..() + +/atom/movable/renderer/shared/zmimic/Destroy() + GLOB.zmimic_renderers -= src + return ..() + +// Draws the game world; live mobs, items, turfs, etc. +/atom/movable/renderer/game + name = "Game" + group = RENDER_GROUP_SCENE + plane = DEFAULT_PLANE + +/// Draws observers; ghosts, camera eyes, etc. +/atom/movable/renderer/observers + name = "Observers" + group = RENDER_GROUP_SCENE + plane = OBSERVER_PLANE + + +/// Draws darkness effects. +/atom/movable/renderer/lighting + name = "Lighting" + group = RENDER_GROUP_SCENE + plane = LIGHTING_PLANE + relay_blend_mode = BLEND_MULTIPLY + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + +/// Draws visuals that should not be affected by darkness. +/atom/movable/renderer/above_lighting + name = "Above Lighting" + group = RENDER_GROUP_SCENE + plane = EFFECTS_ABOVE_LIGHTING_PLANE + + +/// Draws full screen visual effects, like pain and bluespace. +/atom/movable/renderer/screen_effects + name = "Screen Effects" + group = RENDER_GROUP_SCENE + plane = FULLSCREEN_PLANE + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + + +/// Draws user interface elements. +/atom/movable/renderer/interface + name = "Interface" + group = RENDER_GROUP_SCREEN + plane = HUD_PLANE + + +/* * +* Group renderers +* We treat some renderers as render groups that other renderers subscribe to. Renderers +* subscribe themselves to groups by setting a group value equal to the plane of a Group +* Renderer. This value is used for the Renderer's relay to include it into the Group, and +* the Renderer's plane is used as the relay's layer. +* Group renderers can subscribe themselves to other Group Renderers. This allows for more +* granular manipulation of how the final scene is composed. +*/ + +/// Render group for stuff INSIDE the typical game context - people, items, lighting, etc. +/atom/movable/renderer/scene_group + name = "Scene Group" + group = RENDER_GROUP_FINAL + plane = RENDER_GROUP_SCENE + +/// Render group for stuff OUTSIDE the typical game context - UI, full screen effects, etc. +/atom/movable/renderer/screen_group + name = "Screen Group" + group = RENDER_GROUP_FINAL + plane = RENDER_GROUP_SCREEN + + +/// Render group for final compositing before user display. +/atom/movable/renderer/final_group + name = "Final Group" + group = RENDER_GROUP_NONE + plane = RENDER_GROUP_FINAL + + +/* * +* Effect Renderers +* Some renderers are used to produce complex screen effects. These are drawn using filters +* rather than composition groups, and may be added to another renderer in the following +* fashion. Setting a render_target_name with no group is the expected patter for Effect +* Renderers as it allows them to draw to a slate that will be empty unless a relevant +* behavior, such as the effect atom below, causes them to be noticeable. +*/ + +/// Renders the /obj/effect/warp example effect as well as gravity catapult effects +/atom/movable/renderer/warp + name = "Warp Effect" + group = RENDER_GROUP_NONE + plane = WARP_EFFECT_PLANE + render_target_name = "*warp" + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + +/atom/movable/renderer/scene_group/Initialize() + . = ..() + filters += filter(type = "displace", render_source = "*warp", size = 5) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 9a14ebb63b8..ab5ba2a13c8 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -9,6 +9,7 @@ /obj/screen name = "" icon = 'icons/mob/screen/generic.dmi' + plane = HUD_PLANE layer = HUD_BASE_LAYER unacidable = 1 var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. diff --git a/code/_onclick/hud/skybox.dm b/code/_onclick/hud/skybox.dm index 9ffcac7ce27..e10be5e6015 100644 --- a/code/_onclick/hud/skybox.dm +++ b/code/_onclick/hud/skybox.dm @@ -4,8 +4,7 @@ anchored = TRUE simulated = FALSE screen_loc = "CENTER:-224,CENTER:-224" - plane = PLANE_SKYBOX - blend_mode = BLEND_MULTIPLY + plane = SKYBOX_PLANE /client var/obj/skybox/skybox diff --git a/code/controllers/subsystems/icon_cache.dm b/code/controllers/subsystems/icon_cache.dm index e2289dcb4e2..8cc103521d7 100644 --- a/code/controllers/subsystems/icon_cache.dm +++ b/code/controllers/subsystems/icon_cache.dm @@ -99,7 +99,7 @@ SUBSYSTEM_DEF(icon_cache) /datum/controller/subsystem/icon_cache/proc/build_dust_cache() for (var/i in 0 to 25) var/image/im = image('icons/turf/space_parallax1.dmi',"[i]") - im.plane = PLANE_SPACE_DUST + im.plane = DUST_PLANE im.alpha = 80 im.blend_mode = BLEND_ADD space_dust_cache["[i]"] = im diff --git a/code/controllers/subsystems/skybox.dm b/code/controllers/subsystems/skybox.dm index 16c5c7e6e1e..27456738003 100644 --- a/code/controllers/subsystems/skybox.dm +++ b/code/controllers/subsystems/skybox.dm @@ -17,13 +17,13 @@ SUBSYSTEM_DEF(skybox) space_appearance_cache = new(26) for (var/i in 0 to 25) var/mutable_appearance/dust = mutable_appearance('icons/turf/space_dust.dmi', "[i]") - dust.plane = PLANE_SPACE_DUST + dust.plane = DUST_PLANE dust.alpha = 80 dust.blend_mode = BLEND_ADD var/mutable_appearance/space = new /mutable_appearance(/turf/space) space.name = "space" - space.plane = PLANE_SPACE_BACKGROUND + space.plane = SPACE_PLANE space.icon_state = "white" space.overlays += dust space_appearance_cache[i + 1] = space.appearance diff --git a/code/controllers/subsystems/zcopy.dm b/code/controllers/subsystems/zcopy.dm index 3670eea3209..87c63336549 100644 --- a/code/controllers/subsystems/zcopy.dm +++ b/code/controllers/subsystems/zcopy.dm @@ -16,6 +16,15 @@ SUBSYSTEM_DEF(zcopy) var/multiqueue_skips_turf = 0 var/multiqueue_skips_object = 0 + // Caches for fixup. + var/list/fixup_cache = list() + var/list/fixup_known_good = list() + + // Fixup stats. + var/fixup_miss = 0 + var/fixup_noop = 0 + var/fixup_hit = 0 + // Highest Z level in a given Z-group for absolute layering. // zstm[zlev] = group_max var/list/zlev_maximums = list() @@ -90,6 +99,10 @@ SUBSYSTEM_DEF(zcopy) Skips: \ Turfs [multiqueue_skips_turf] \ Objects [multiqueue_skips_object]\ + Fixups: \ + Hits [fixup_hit] \ + Miss [fixup_miss]\ + No Operation [fixup_noop]\ " return ..() @@ -159,20 +172,14 @@ SUBSYSTEM_DEF(zcopy) // Z-Turf on the bottom-most level, just fake-copy space. // If this is ever true, that turf should always pass this condition, so don't bother cleaning up beyond the Destroy() hook. if (!T.below) // Z-turf on the bottom-most level, just fake-copy space. - if (T.z_flags & ZM_MIMIC_OVERWRITE) - T.appearance = SSskybox.space_appearance_cache[(((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25) + 1] - T.name = initial(T.name) - T.desc = initial(T.desc) - T.gender = initial(T.gender) + flush_z_state(T) + if(T.z_flags & ZM_MIMIC_BASETURF) + simple_appearance_copy(T, get_base_turf_by_area(T), OPENTURF_MAX_PLANE) else - // Some openturfs have icons, so we can't overwrite their appearance. - if (!T.mimic_underlay) - T.mimic_underlay = new(T) - var/atom/movable/openspace/turf_proxy/TO = T.mimic_underlay - TO.appearance = SSskybox.space_appearance_cache[(((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25) + 1] - TO.name = T.name - TO.gender = T.gender // Need to grab this too so PLURAL works properly in examine. - TO.mouse_opacity = initial(TO.mouse_opacity) + simple_appearance_copy(T, SSskybox.space_appearance_cache[(((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25) + 1]) + + T.z_generation += 1 + T.z_queued -= 1 if (no_mc_tick) CHECK_TICK @@ -197,10 +204,32 @@ SUBSYSTEM_DEF(zcopy) var/t_target = OPENTURF_MAX_PLANE - turf_depth // This is where the turf (but not the copied atoms) gets put. + + // Turf is set to mimic baseturf, handle that and bail. + if (T.z_flags & ZM_MIMIC_BASETURF) + flush_z_state(T) + simple_appearance_copy(T, get_base_turf_by_area(T), t_target) + + if (T.above) + T.above.update_mimic() + + T.z_queued -= 1 + + if (no_mc_tick) + CHECK_TICK + else if (MC_TICK_CHECK) + break + continue + + // If we previously were MZ_MIMIC_BASETURF, there might be an orphaned proxy. + else if (T.mimic_underlay) + QDEL_NULL(T.mimic_underlay) + // Handle space parallax & starlight. if (T.below.z_eventually_space) T.z_eventually_space = TRUE - t_target = PLANE_SPACE_BACKGROUND + if ((T.below.z_flags & ZM_MIMIC_OVERWRITE) || T.below.type == /turf/space) + t_target = SPACE_PLANE if (T.z_flags & ZM_MIMIC_OVERWRITE) // This openturf doesn't care about its icon, so we can just overwrite it. @@ -245,7 +274,7 @@ SUBSYSTEM_DEF(zcopy) // Add everything below us to the update queue. for (var/thing in T.below) var/atom/movable/object = thing - if (QDELETED(object) || object.no_z_overlay || object.loc != T.below || object.invisibility == INVISIBILITY_ABSTRACT) + if (QDELETED(object) || (object.z_flags & ZMM_IGNORE) || object.loc != T.below || object.invisibility == INVISIBILITY_ABSTRACT) // Don't queue deleted stuff, stuff that's not visible, blacklisted stuff, or stuff that's centered on another tile but intersects ours. continue @@ -261,18 +290,24 @@ SUBSYSTEM_DEF(zcopy) var/override_depth var/original_type = object.type var/original_z = object.z + var/have_performed_fixup = FALSE + switch (object.type) if (/atom/movable/openspace/mimic) var/atom/movable/openspace/mimic/OOO = object original_type = OOO.mimiced_type override_depth = OOO.override_depth original_z = OOO.original_z + have_performed_fixup = OOO.have_performed_fixup if (/atom/movable/openspace/turf_proxy, /atom/movable/openspace/turf_mimic) // If we're a turf overlay (the mimic for a non-OVERWRITE turf), we need to make sure copies of us respect space parallax too if (T.z_eventually_space) // Yes, this is an awful hack; I don't want to add yet another override_* var. - override_depth = OPENTURF_MAX_PLANE - PLANE_SPACE_BACKGROUND + override_depth = OPENTURF_MAX_PLANE - SPACE_PLANE + + if (/atom/movable/openspace/turf_mimic) + original_z += 1 var/atom/movable/openspace/mimic/OO = object.bound_overlay @@ -292,6 +327,7 @@ SUBSYSTEM_DEF(zcopy) OO.mimiced_type = original_type OO.override_depth = override_depth OO.original_z = original_z + OO.have_performed_fixup ||= have_performed_fixup // Multi-queue to maintain ordering of updates to these // queueing it multiple times will result in only the most recent @@ -351,6 +387,7 @@ SUBSYSTEM_DEF(zcopy) OO.set_dir(OO.associated_atom.dir) OO.appearance = OO.associated_atom + OO.z_flags = OO.associated_atom.z_flags OO.plane = OPENTURF_MAX_PLANE - OO.depth OO.opacity = FALSE @@ -359,6 +396,13 @@ SUBSYSTEM_DEF(zcopy) if (OO.bound_overlay) // If we have a bound overlay, queue it too. OO.update_above() + // If an atom has explicit plane sets on its overlays/underlays, we need to replace the appearance so they can be mangled to work with our planing. + if (OO.z_flags & ZMM_MANGLE_PLANES) + var/new_appearance = fixup_appearance_planes(OO.appearance) + if (new_appearance) + OO.appearance = new_appearance + OO.have_performed_fixup = TRUE + if (no_mc_tick) CHECK_TICK else if (MC_TICK_CHECK) @@ -368,11 +412,132 @@ SUBSYSTEM_DEF(zcopy) curr_ov.Cut(1, qo_idex) qo_idex = 1 +/datum/controller/subsystem/zcopy/proc/flush_z_state(turf/T) + if (T.below) // Z-Mimic turfs aren't necessarily above another turf. + if (T.below.mimic_above_copy) + QDEL_NULL(T.below.mimic_above_copy) + if (T.below.mimic_proxy) + QDEL_NULL(T.below.mimic_proxy) + QDEL_NULL(T.mimic_underlay) + for (var/atom/movable/openspace/mimic/OO in T) + qdel(OO) + +/datum/controller/subsystem/zcopy/proc/simple_appearance_copy(turf/T, new_appearance, target_plane) + if (T.z_flags & ZM_MIMIC_OVERWRITE) + T.appearance = new_appearance + T.name = initial(T.name) + T.desc = initial(T.desc) + T.gender = initial(T.gender) + if (T.plane == 0 && target_plane) + T.plane = target_plane + else + // Some openturfs have icons, so we can't overwrite their appearance. + if (!T.mimic_underlay) + T.mimic_underlay = new(T) + var/atom/movable/openspace/turf_proxy/TO = T.mimic_underlay + TO.appearance = new_appearance + TO.name = T.name + TO.gender = T.gender // Need to grab this too so PLURAL works properly in examine. + TO.mouse_opacity = initial(TO.mouse_opacity) + if (TO.plane == 0 && target_plane) + TO.plane = target_plane + +/// Generate a new appearance from `appearance` with planes mangled to work with Z-Mimic. Do not pass a depth. +/datum/controller/subsystem/zcopy/proc/fixup_appearance_planes(appearance, depth = 0) + + // Adding this to guard against a reported runtime - supposed to be impossible, so cause is unclear. + if(!appearance) + return null + + if (fixup_known_good[appearance]) + fixup_hit += 1 + return null + if (fixup_cache[appearance]) + fixup_hit += 1 + return fixup_cache[appearance] + + // If you have more than 4 layers of overlays within overlays, I dunno what to say. + if (depth > 4) + var/icon_name = "[appearance:icon]" + WARNING("Fixup of appearance with icon [icon_name || ""] exceeded maximum recursion limit, bailing") + return null + + var/plane_needs_fix = FALSE + + // Don't fixup the root object's plane. + if (depth > 0) + switch (appearance:plane) + if (DEFAULT_PLANE, FLOAT_PLANE) + plane_needs_fix = FALSE //For lint + else + plane_needs_fix = TRUE + + // Scan & fix overlays + var/list/fixed_overlays + if (appearance:overlays:len) + var/mutated = FALSE + var/fixed_appearance + for (var/i in 1 to appearance:overlays:len) + if ((fixed_appearance = .(appearance:overlays[i], depth + 1))) + mutated = TRUE + if (!fixed_overlays) + fixed_overlays = new( length(appearance:overlays)) + fixed_overlays[i] = fixed_appearance + + if (mutated) + for (var/i in 1 to length(fixed_overlays)) + if (fixed_overlays[i] == null) + fixed_overlays[i] = appearance:overlays[i] + + // Scan & fix underlays + var/list/fixed_underlays + if (appearance:underlays:len) + var/mutated = FALSE + var/fixed_appearance + for (var/i in 1 to appearance:underlays:len) + if ((fixed_appearance = .(appearance:underlays[i], depth + 1))) + mutated = TRUE + if (!fixed_underlays) + fixed_underlays = new( length(appearance:underlays)) + fixed_underlays[i] = fixed_appearance + + if (mutated) + for (var/i in 1 to length(fixed_overlays)) + if (fixed_underlays[i] == null) + fixed_underlays[i] = appearance:underlays[i] + + // If we did nothing (no violations), don't bother creating a new appearance + if (!plane_needs_fix && !fixed_overlays && !fixed_underlays) + fixup_noop += 1 + fixup_known_good[appearance] = TRUE + return null + + fixup_miss += 1 + + var/mutable_appearance/MA = new(appearance) + if (plane_needs_fix) + MA.plane = depth == 0 ? DEFAULT_PLANE : FLOAT_PLANE + MA.layer = FLY_LAYER // probably fine + + if (fixed_overlays) + MA.overlays = fixed_overlays + + if (fixed_underlays) + MA.underlays = fixed_underlays + + fixup_cache[appearance] = MA.appearance + + return MA + #define FMT_DEPTH(X) (X == null ? "(null)" : X) // This is a dummy object used so overlays can be shown in the analyzer. /atom/movable/openspace/debug +/atom/movable/openspace/debug/turf + var/turf/parent + var/computed_depth + /client/proc/analyze_openturf(turf/T) set name = "Analyze Openturf" set desc = "Show the layering of an openturf and everything it's mimicking." @@ -381,6 +546,17 @@ SUBSYSTEM_DEF(zcopy) if (!check_rights(R_DEBUG)) return + var/real_update_count = 0 + var/claimed_update_count = T.z_queued + var/list/tq = SSzcopy.queued_turfs.Copy() + for (var/turf/Tu in tq) + if (Tu == T) + real_update_count += 1 + + CHECK_TICK + + var/list/temp_objects = list() + var/is_above_space = T.is_above_space() var/list/out = list( "", @@ -395,10 +571,26 @@ SUBSYSTEM_DEF(zcopy) "Below: [!T.below ? "(nothing)" : "[T.below] at [T.below.x],[T.below.y],[T.below.z]"]", "Depth: [FMT_DEPTH(T.z_depth)] [T.z_depth == OPENTURF_MAX_DEPTH ? "(max)" : ""]", "Generation: [T.z_generation]", + "Update count: Claimed [claimed_update_count], Actual [real_update_count] - [claimed_update_count == real_update_count ? "OK" : "MISMATCH"]", "
    " ) + if (!T.below) + out += "

    Using synthetic rendering (Not Z).

    " + else if (T.z_flags & ZM_MIMIC_BASETURF) + out += "

    Using synthetic rendering (BASETURF).

    " + var/list/found_oo = list(T) + var/turf/Tbelow = T + while ((Tbelow = Tbelow.below)) + var/atom/movable/openspace/debug/turf/VTO = new + VTO.computed_depth = SSzcopy.zlev_maximums[Tbelow.z] - Tbelow.z + VTO.appearance = Tbelow + VTO.parent = Tbelow + VTO.plane = OPENTURF_MAX_PLANE - VTO.computed_depth + found_oo += VTO + temp_objects += VTO + for (var/atom/movable/openspace/O in T) found_oo += O @@ -409,6 +601,7 @@ SUBSYSTEM_DEF(zcopy) if (D.plane < -10000) // FLOAT_PLANE D.plane = T.shadower.plane found_oo += D + temp_objects += D sortTim(found_oo, GLOBAL_PROC_REF(cmp_planelayer)) @@ -428,7 +621,7 @@ SUBSYSTEM_DEF(zcopy) for (var/d in 0 to OPENTURF_MAX_DEPTH) var/pl = OPENTURF_MAX_PLANE - d if (!atoms_list_list["[pl]"]) - out += "Depth [d], plane [pl] - empty" + out += "Depth [d], plane [pl] — empty" continue out += "Depth [d], plane [pl]" @@ -437,11 +630,12 @@ SUBSYSTEM_DEF(zcopy) // Flush the list so we can find orphans. atoms_list_list -= "[pl]" - if (atoms_list_list["[PLANE_SPACE_BACKGROUND]"]) // Space parallax plane - out += "Space parallax plane ([PLANE_SPACE_BACKGROUND])" - SSzcopy.debug_fmt_planelist(atoms_list_list["[PLANE_SPACE_BACKGROUND]"], out, T) - atoms_list_list -= "[PLANE_SPACE_BACKGROUND]" + if (atoms_list_list["[SPACE_PLANE]"]) // Space parallax plane + out += "Space parallax plane ([SPACE_PLANE])" + SSzcopy.debug_fmt_planelist(atoms_list_list["[SPACE_PLANE]"], out, T) + atoms_list_list -= "[SPACE_PLANE]" + log_debug("atoms_list_list => [json_encode(atoms_list_list)]") for (var/key in atoms_list_list) out += "Unknown plane: [key]" SSzcopy.debug_fmt_planelist(atoms_list_list[key], out, T) @@ -452,6 +646,9 @@ SUBSYSTEM_DEF(zcopy) show_browser(usr, out.Join("
    "), "size=980x580;window=openturfanalysis-\ref[T]") + for (var/item in temp_objects) + qdel(item) + // Yes, I know this proc is a bit of a mess. Feel free to clean it up. /datum/controller/subsystem/zcopy/proc/debug_fmt_thing(atom/A, list/out, turf/original) if (istype(A, /atom/movable/openspace/mimic)) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index eccf2098335..00dd6a53d9a 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -37,7 +37,6 @@ var/can_hold_mob = FALSE var/list/contained_mobs - appearance_flags = DEFAULT_APPEARANCE_FLAGS | TILE_BOUND ///Holds information about any movement loops currently running/waiting to run on the movable. Lazy, will be null if nothing's going on var/datum/movement_packet/move_packet diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm index 6f0c1eb0da6..4a8a1d9fff0 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm @@ -6,6 +6,7 @@ icon = 'icons/turf/space.dmi' icon_state = "bluespace-n" + plane = EFFECTS_ABOVE_LIGHTING_PLANE layer = SUPERMATTER_WALL_LAYER light_color = COLOR_CYAN_BLUE light_power = 6 diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index dc9e344aeb2..a6a3e093d6a 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -110,6 +110,7 @@ pixel_x = 10; clicksound = /singleton/sound_category/button_sound clickvol = 30 obj_flags = OBJ_FLAG_MOVES_UNSUPPORTED + z_flags = ZMM_MANGLE_PLANES var/alarm_id = null var/breach_detection = 1 // Whether to use automatic breach detection or not diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 79e402934fd..c2cd69a3710 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -297,19 +297,19 @@ update_flag if(update_flag & 2) add_overlay("can-connector") if(update_flag & 4) - var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o0", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o0", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(indicator_overlay) set_light(1.4, 1, COLOR_RED_LIGHT) if(update_flag & 8) - var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o1", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o1", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(indicator_overlay) set_light(1.4, 1, COLOR_RED_LIGHT) else if(update_flag & 16) - var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o2", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o2", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(indicator_overlay) set_light(1.4, 1, COLOR_YELLOW) else if(update_flag & 32) - var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o3", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o3", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(indicator_overlay) set_light(1.4, 1, COLOR_BRIGHT_GREEN) diff --git a/code/game/machinery/body_scanner.dm b/code/game/machinery/body_scanner.dm index 93debc50e3a..e8553d89cd8 100644 --- a/code/game/machinery/body_scanner.dm +++ b/code/game/machinery/body_scanner.dm @@ -254,6 +254,7 @@ var/has_external_injuries = FALSE density = FALSE anchored = TRUE + z_flags = ZMM_MANGLE_PLANES component_types = list( /obj/item/circuitboard/bodyscannerconsole, /obj/item/stock_parts/scanning_module = 2, diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index e97ff28a9d2..43d440bf929 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -7,6 +7,7 @@ idle_power_usage = 300 active_power_usage = 300 clicksound = /singleton/sound_category/keyboard_sound + z_flags = ZMM_MANGLE_PLANES var/circuit = null //The path to the circuit board type. If circuit==null, the computer can't be disassembled. var/processing = 0 diff --git a/code/game/machinery/crusher_piston.dm b/code/game/machinery/crusher_piston.dm index 628921bb651..dd921bab501 100644 --- a/code/game/machinery/crusher_piston.dm +++ b/code/game/machinery/crusher_piston.dm @@ -11,6 +11,7 @@ opacity = 1 //Just 300 Watts here. Power is drawn by the piston when it moves idle_power_usage = 300 + z_flags = ZMM_MANGLE_PLANES var/obj/machinery/crusher_piston/pstn //Piston diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index dcf02797c63..d6379796815 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -24,6 +24,7 @@ anchored = TRUE layer = ABOVE_HUMAN_LAYER interact_offline = TRUE + z_flags = ZMM_MANGLE_PLANES var/on = 0 idle_power_usage = 20 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 02cb65a9159..d6405201e84 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1050,31 +1050,31 @@ About the new airlock wires panel: switch(state) if(AIRLOCK_CLOSED) if(lights && locked) - lights_overlay = overlay_image(bolts_file, layer = EFFECTS_ABOVE_LIGHTING_LAYER) + lights_overlay = overlay_image(bolts_file, plane = EFFECTS_ABOVE_LIGHTING_PLANE) set_light(1, 2, COLOR_RED_LIGHT) if(AIRLOCK_DENY) if(lights) - lights_overlay = overlay_image(deny_file, layer = EFFECTS_ABOVE_LIGHTING_LAYER) + lights_overlay = overlay_image(deny_file, plane = EFFECTS_ABOVE_LIGHTING_PLANE) set_light(1, 2, COLOR_RED_LIGHT) if(AIRLOCK_EMAG) - sparks_overlay = overlay_image(emag_file, layer = EFFECTS_ABOVE_LIGHTING_LAYER) + sparks_overlay = overlay_image(emag_file, plane = EFFECTS_ABOVE_LIGHTING_PLANE) if(AIRLOCK_CLOSING) if(lights) - lights_overlay = overlay_image(lights_file, layer = EFFECTS_ABOVE_LIGHTING_LAYER) + lights_overlay = overlay_image(lights_file, plane = EFFECTS_ABOVE_LIGHTING_PLANE) set_light(1, 2, COLOR_LIME) if(AIRLOCK_OPENING) if(lights) - lights_overlay = overlay_image(lights_file, layer = EFFECTS_ABOVE_LIGHTING_LAYER) + lights_overlay = overlay_image(lights_file, plane = EFFECTS_ABOVE_LIGHTING_PLANE) set_light(1, 2, COLOR_LIME) if(stat & BROKEN) - damage_overlay = overlay_image(sparks_broken_file, layer = EFFECTS_ABOVE_LIGHTING_LAYER) + damage_overlay = overlay_image(sparks_broken_file, plane = EFFECTS_ABOVE_LIGHTING_PLANE) else if (health < maxhealth * 3/4 && !(stat & NOPOWER)) - damage_overlay = overlay_image(sparks_damaged_file, layer = EFFECTS_ABOVE_LIGHTING_LAYER) + damage_overlay = overlay_image(sparks_damaged_file, plane = EFFECTS_ABOVE_LIGHTING_PLANE) if(welded) weld_overlay = welded_file diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 9e25deb5e3a..c5ecad0e8f1 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -466,7 +466,7 @@ if(blocked) add_overlay("welded") if(pdiff_alert) - add_overlay(overlay_image(icon, icon_state = "palert", layer = EFFECTS_ABOVE_LIGHTING_LAYER)) + add_overlay(overlay_image(icon, icon_state = "palert", plane = EFFECTS_ABOVE_LIGHTING_PLANE)) do_set_light = 1 if(dir_alerts) for (var/d = 1; d <= 4; d++) @@ -477,9 +477,9 @@ if (!dir_alerts[d]) continue if (dir_alerts[d] & FIREDOOR_ALERT_COLD) - add_overlay(overlay_image(icon, icon_state = "alert_cold", layer = EFFECTS_ABOVE_LIGHTING_LAYER)) + add_overlay(overlay_image(icon, icon_state = "alert_cold", plane = EFFECTS_ABOVE_LIGHTING_PLANE)) if (dir_alerts[d] & FIREDOOR_ALERT_HOT) - add_overlay(overlay_image(icon, icon_state = "alert_hot", layer = EFFECTS_ABOVE_LIGHTING_LAYER)) + add_overlay(overlay_image(icon, icon_state = "alert_hot", plane = EFFECTS_ABOVE_LIGHTING_PLANE)) do_set_light = TRUE else diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm index 55fe98647c0..d22e122c83f 100644 --- a/code/game/machinery/floor_light.dm +++ b/code/game/machinery/floor_light.dm @@ -5,7 +5,7 @@ var/list/floor_light_cache = list() icon = 'icons/obj/machinery/floor_light.dmi' icon_state = "base" desc = "A backlit floor panel." - layer = ABOVE_TILE_LAYER + layer = EXPOSED_WIRE_LAYER anchored = 0 use_power = POWER_USE_ACTIVE idle_power_usage = 2 diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index c6ed1b0c35d..426396a161c 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -12,6 +12,7 @@ var/area/area = null var/otherarea = null power_channel = LIGHT + z_flags = ZMM_MANGLE_PLANES // luminosity = 1 /obj/machinery/light_switch/Initialize() diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index a5358e881ee..48a34552dad 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -29,6 +29,7 @@ var/list/obj/machinery/newscaster/allCasters = list() anchored = TRUE appearance_flags = TILE_BOUND // prevents people from viewing the overlay through a wall obj_flags = OBJ_FLAG_MOVES_UNSUPPORTED + z_flags = ZMM_MANGLE_PLANES ///If the newscaster is broken, boolean var/isbroken = FALSE diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index df38e0bbec0..133830103f8 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -63,6 +63,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() ) anchored = TRUE appearance_flags = TILE_BOUND // prevents people from viewing the overlay through a wall + z_flags = ZMM_MANGLE_PLANES ///The list of all departments on the station (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department var/department = "Unknown" diff --git a/code/game/machinery/ringer.dm b/code/game/machinery/ringer.dm index 2cf68461731..2e29eb48ebb 100644 --- a/code/game/machinery/ringer.dm +++ b/code/game/machinery/ringer.dm @@ -21,6 +21,7 @@ pixel_x = 8; icon_state = "bell" anchored = TRUE appearance_flags = TILE_BOUND // prevents people from viewing the overlay through a wall + z_flags = ZMM_MANGLE_PLANES req_access = list() //what access it needs to link your pda diff --git a/code/game/machinery/stargazer.dm b/code/game/machinery/stargazer.dm index 1523e3a1397..f6f4687369c 100644 --- a/code/game/machinery/stargazer.dm +++ b/code/game/machinery/stargazer.dm @@ -4,14 +4,15 @@ icon_state = "stargazer_off" anchored = TRUE density = TRUE - layer = CAMERA_LAYER pixel_x = -32 pixel_y = -24 var/image/star_system_image /obj/machinery/stargazer/Initialize(mapload, d, populate_components) . = ..() - star_system_image = image(icon, null, "stargazer_[SSatlas.current_sector.name]", EFFECTS_ABOVE_LIGHTING_LAYER) + star_system_image = image(icon, null, "stargazer_[SSatlas.current_sector.name]") + star_system_image.plane = EFFECTS_ABOVE_LIGHTING_PLANE + star_system_image.layer = SUPERMATTER_WALL_LAYER power_change() /obj/machinery/stargazer/get_examine_text(mob/user, distance, is_adjacent, infix, suffix) diff --git a/code/game/machinery/suit_cycler.dm b/code/game/machinery/suit_cycler.dm index fe4a10db493..f916da88eb3 100644 --- a/code/game/machinery/suit_cycler.dm +++ b/code/game/machinery/suit_cycler.dm @@ -35,6 +35,7 @@ icon_state = "base" req_access = list(ACCESS_CAPTAIN, ACCESS_HEADS) + z_flags = ZMM_MANGLE_PLANES var/active = FALSE // PLEASE HOLD. var/safeties = TRUE // The cycler won't start with a living thing inside it unless safeties are off. diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 39d86d76855..65b421cdd2d 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -58,14 +58,14 @@ cut_overlays() if (engaged) var/image/I = image(icon, src, "[initial(icon_state)]_active_overlay") - I.layer = EFFECTS_ABOVE_LIGHTING_LAYER + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE add_overlay(I) set_light(4, 0.4) else set_light(0) if (operable()) var/image/I = image(icon, src, "[initial(icon_state)]_idle_overlay") - I.layer = EFFECTS_ABOVE_LIGHTING_LAYER + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE add_overlay(I) /obj/machinery/teleport/pad/proc/within_range(var/target) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index d52a398d173..fdb19091cdd 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -50,6 +50,7 @@ density = 1 clicksound = /singleton/sound_category/button_sound manufacturer = "idris" + z_flags = ZMM_MANGLE_PLANES var/icon_vend //Icon_state when vending var/deny_time // How long the physical icon state lasts, used cut the deny overlay diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm index 47f7aa22d7c..b52ecec5ed3 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -77,3 +77,12 @@ /obj/effect/constructing_effect/proc/end() qdel(src) + +/// Example of a warp filter +/obj/effect/effect/warp + plane = WARP_EFFECT_PLANE + appearance_flags = PIXEL_SCALE + icon = 'icons/effects/352x352.dmi' + icon_state = "singularity_s11" + pixel_x = -176 + pixel_y = -176 diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index 24b19a42ab8..954b5c87e11 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -15,7 +15,7 @@ icon='icons/effects/beam.dmi' icon_state="b_beam" blend_mode = BLEND_ADD - layer = EFFECTS_ABOVE_LIGHTING_LAYER + plane = EFFECTS_ABOVE_LIGHTING_PLANE animate_movement = FALSE var/tmp/atom/BeamSource @@ -47,6 +47,7 @@ name = "bluespace" icon = 'icons/turf/space.dmi' icon_state = "bluespacify" + plane = EFFECTS_ABOVE_LIGHTING_PLANE layer = SUPERMATTER_WALL_LAYER /obj/effect/overlay/temp diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 63614bbe277..dc0db73515e 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -477,6 +477,9 @@ SEND_SIGNAL(src, COMSIG_ITEM_DROPPED, user) + if(user && (z_flags & ZMM_MANGLE_PLANES)) + addtimer(CALLBACK(user, /mob/proc/check_emissive_equipment), 0, TIMER_UNIQUE) + /obj/item/proc/remove_item_verbs(mob/user) if(ismech(user)) //very snowflake, but necessary due to how mechs work return @@ -550,6 +553,9 @@ item_equipped_event.raise_event(src, user, slot) SEND_SIGNAL(src, COMSIG_ITEM_REMOVE, src) + if(user && (z_flags & ZMM_MANGLE_PLANES)) + addtimer(CALLBACK(user, /mob/proc/check_emissive_equipment), 0, TIMER_UNIQUE) + //sometimes we only want to grant the item's action if it's equipped in a specific slot. /obj/item/proc/item_action_slot_check(mob/user, slot) return TRUE diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index e402271db8c..739227002ca 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -29,6 +29,7 @@ pixel_x = 8; canhear_range = 2 atom_flags = ATOM_FLAG_NO_BLOOD obj_flags = OBJ_FLAG_MOVES_UNSUPPORTED | OBJ_FLAG_CONDUCTABLE + z_flags = ZMM_MANGLE_PLANES var/number = 0 var/obj/machinery/abstract/intercom_listener/power_interface var/global/list/screen_overlays diff --git a/code/game/objects/items/devices/slide_projector.dm b/code/game/objects/items/devices/slide_projector.dm index e67d767342e..2219ee3ef58 100644 --- a/code/game/objects/items/devices/slide_projector.dm +++ b/code/game/objects/items/devices/slide_projector.dm @@ -140,7 +140,7 @@ icon_state = "white" anchored = TRUE simulated = FALSE - layer = EFFECTS_ABOVE_LIGHTING_LAYER + plane = EFFECTS_ABOVE_LIGHTING_PLANE alpha = 100 var/datum/weakref/source @@ -159,7 +159,7 @@ return cut_overlays() var/mutable_appearance/MA = new(I) - MA.layer = EFFECTS_ABOVE_LIGHTING_LAYER + MA.plane = EFFECTS_ABOVE_LIGHTING_PLANE MA.appearance_flags = RESET_ALPHA MA.alpha = 170 MA.pixel_x = 0 diff --git a/code/game/objects/items/devices/t_scanner.dm b/code/game/objects/items/devices/t_scanner.dm index 97a090ca134..688eed9fa3f 100644 --- a/code/game/objects/items/devices/t_scanner.dm +++ b/code/game/objects/items/devices/t_scanner.dm @@ -95,6 +95,7 @@ . = overlay_cache[scanned] else var/image/I = image(scanned.icon, scanned.loc, scanned.icon_state, UNDER_HUD_LAYER, scanned.dir) + I.plane = HUD_PLANE //Pipes are special if(istype(scanned, /obj/machinery/atmospherics/pipe)) diff --git a/code/game/objects/items/skrell.dm b/code/game/objects/items/skrell.dm index 24a2160039e..5ab6c6f12bd 100644 --- a/code/game/objects/items/skrell.dm +++ b/code/game/objects/items/skrell.dm @@ -50,10 +50,11 @@ icon_state = "starprojection" mouse_opacity = TRUE duration = 30 SECONDS - layer = EFFECTS_ABOVE_LIGHTING_LAYER + plane = EFFECTS_ABOVE_LIGHTING_PLANE light_power = 1 light_range = 1 light_color = LIGHT_COLOR_HALOGEN + z_flags = ZMM_MANGLE_PLANES var/global/image/glow_state /obj/effect/temp_visual/constellation/Initialize() diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 8ef63771144..05222a262a3 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -304,7 +304,8 @@ update_icon() /obj/item/weldingtool/use_tool(atom/target, mob/living/user, delay, amount, volume, datum/callback/extra_checks) - var/image/welding_sparks = image('icons/effects/effects.dmi', welding_state, EFFECTS_ABOVE_LIGHTING_LAYER) + var/image/welding_sparks = image('icons/effects/effects.dmi', welding_state) + welding_sparks.plane = EFFECTS_ABOVE_LIGHTING_PLANE target.add_overlay(welding_sparks) . = ..() target.cut_overlay(welding_sparks) diff --git a/code/game/objects/structures/light_pole.dm b/code/game/objects/structures/light_pole.dm index dfbd2a05b9e..a71293bad57 100644 --- a/code/game/objects/structures/light_pole.dm +++ b/code/game/objects/structures/light_pole.dm @@ -51,7 +51,7 @@ /obj/effect/overlay/street_light icon = 'icons/obj/structure/urban/poles.dmi' icon_state = "street_light" - layer = EFFECTS_ABOVE_LIGHTING_LAYER + plane = EFFECTS_ABOVE_LIGHTING_PLANE /obj/effect/overlay/street_light/classic icon_state = "classic_lamp_light" diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index f96803759ea..cf6b0e6bd8e 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -7,7 +7,7 @@ footstep_sound = null //Override to make sure because yeah tracks_footprint = FALSE - plane = PLANE_SPACE_BACKGROUND + plane = SPACE_PLANE temperature = T20C thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT diff --git a/code/modules/atmospherics/components/unary/vent_pump.dm b/code/modules/atmospherics/components/unary/vent_pump.dm index 6414fb2579c..19866569840 100644 --- a/code/modules/atmospherics/components/unary/vent_pump.dm +++ b/code/modules/atmospherics/components/unary/vent_pump.dm @@ -90,8 +90,8 @@ /obj/machinery/atmospherics/unary/vent_pump/Initialize(mapload) if(mapload) var/turf/T = loc - var/image/I = image(icon, T, icon_state, EFFECTS_ABOVE_LIGHTING_LAYER, dir, pixel_x, pixel_y) - I.plane = 0 + var/image/I = image(icon, T, icon_state, dir, pixel_x, pixel_y) + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE I.color = color I.alpha = 125 LAZYADD(T.blueprints, I) diff --git a/code/modules/atmospherics/components/unary/vent_scrubber.dm b/code/modules/atmospherics/components/unary/vent_scrubber.dm index 1b20fd508a6..81b0a863b18 100644 --- a/code/modules/atmospherics/components/unary/vent_scrubber.dm +++ b/code/modules/atmospherics/components/unary/vent_scrubber.dm @@ -40,8 +40,8 @@ /obj/machinery/atmospherics/unary/vent_scrubber/Initialize(mapload) if(mapload) var/turf/T = loc - var/image/I = image(icon, T, icon_state, EFFECTS_ABOVE_LIGHTING_LAYER, dir, pixel_x, pixel_y) - I.plane = 0 + var/image/I = image(icon, T, icon_state, dir, pixel_x, pixel_y) + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE I.color = color I.alpha = 125 LAZYADD(T.blueprints, I) diff --git a/code/modules/atmospherics/pipes.dm b/code/modules/atmospherics/pipes.dm index 8f946dd6a00..46e6cec0631 100644 --- a/code/modules/atmospherics/pipes.dm +++ b/code/modules/atmospherics/pipes.dm @@ -177,8 +177,8 @@ /obj/machinery/atmospherics/pipe/simple/Initialize(mapload) if(mapload) var/turf/T = loc - var/image/I = image(icon, T, icon_state, EFFECTS_ABOVE_LIGHTING_LAYER, dir, pixel_x, pixel_y) - I.plane = 0 + var/image/I = image(icon, T, icon_state, dir, pixel_x, pixel_y) + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE I.color = color I.alpha = 125 LAZYADD(T.blueprints, I) @@ -493,8 +493,8 @@ /obj/machinery/atmospherics/pipe/manifold/Initialize(mapload) if(mapload) var/turf/T = loc - var/image/I = image(icon, T, icon_state, EFFECTS_ABOVE_LIGHTING_LAYER, dir, pixel_x, pixel_y) - I.plane = 0 + var/image/I = image(icon, T, icon_state, dir, pixel_x, pixel_y) + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE I.color = color I.alpha = 125 LAZYADD(T.blueprints, I) @@ -813,8 +813,8 @@ /obj/machinery/atmospherics/pipe/manifold4w/Initialize(mapload) if(mapload) var/turf/T = loc - var/image/I = image(icon, T, icon_state, EFFECTS_ABOVE_LIGHTING_LAYER, dir, pixel_x, pixel_y) - I.plane = 0 + var/image/I = image(icon, T, icon_state, dir, pixel_x, pixel_y) + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE I.color = color I.alpha = 125 LAZYADD(T.blueprints, I) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index c82a2250156..b67634aeff8 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -298,6 +298,7 @@ var/list/preferences_datums = list() client.screen |= O O.appearance = MA O.dir = D + O.plane = HUD_PLANE var/list/screen_locs = preview_screen_locs["[D]"] var/screen_x = screen_locs[1] var/screen_x_minor = screen_locs[2] diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index ca959131e69..11779c13ea1 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -1303,7 +1303,7 @@ icon = 'icons/clothing/accessories/led_collar.dmi' icon_state = "led_collar" item_state = "led_collar" - layer = EFFECTS_ABOVE_LIGHTING_LAYER + plane = EFFECTS_ABOVE_LIGHTING_PLANE contained_sprite = TRUE slot = ACCESSORY_SLOT_UTILITY_MINOR @@ -1321,6 +1321,6 @@ /obj/item/clothing/accessory/led_collar/get_accessory_mob_overlay(var/mob/living/carbon/human/H, var/force = FALSE) var/image/I = ..() - I.layer = EFFECTS_ABOVE_LIGHTING_LAYER + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE I.appearance_flags |= KEEP_APART return I diff --git a/code/modules/compass/compass_holder.dm b/code/modules/compass/compass_holder.dm index 35fd9773a43..3f623c92ced 100644 --- a/code/modules/compass/compass_holder.dm +++ b/code/modules/compass/compass_holder.dm @@ -31,6 +31,7 @@ compass_heading_marker.maptext = "
    " compass_heading_marker.filters = filter(type="drop_shadow", color = "#00ffffaa", size = 2, offset = 1,x = 0, y = 0) compass_heading_marker.layer = UNDER_HUD_LAYER + compass_heading_marker.plane = HUD_PLANE for(var/i in 0 to (360/(COMPASS_PERIOD))-1) var/image/I = new /image/compass_marker @@ -54,6 +55,7 @@ I.transform = M I.filters = filter(type="drop_shadow", color = "#77777777", size = 2, offset = 1,x = 0, y = 0) I.layer = UNDER_HUD_LAYER + I.plane = HUD_PLANE LAZYADD(compass_static_labels, I) rebuild_overlay_lists(TRUE) diff --git a/code/modules/cooking/machinery/cooking_machines/oven.dm b/code/modules/cooking/machinery/cooking_machines/oven.dm index b786c0cb855..3112c48981d 100644 --- a/code/modules/cooking/machinery/cooking_machines/oven.dm +++ b/code/modules/cooking/machinery/cooking_machines/oven.dm @@ -56,7 +56,8 @@ icon_state = "ovenopen" cut_overlays() if (!stat) - var/glow = image('icons/obj/machinery/cooking_machines.dmi', "oven_on", EFFECTS_ABOVE_LIGHTING_LAYER) + var/image/glow = image('icons/obj/machinery/cooking_machines.dmi', "oven_on") + glow.plane = EFFECTS_ABOVE_LIGHTING_PLANE add_overlay(glow) ..() diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 94f93240874..cd9317e8610 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -41,12 +41,12 @@ set_light(FALSE) return - var/mutable_appearance/screen_overlay = mutable_appearance(icon, "atm-active", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/screen_overlay = mutable_appearance(icon, "atm-active", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(screen_overlay) set_light(1.4, 1, COLOR_CYAN) if(held_card) - var/mutable_appearance/card_overlay = mutable_appearance(icon, "atm-cardin", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/card_overlay = mutable_appearance(icon, "atm-cardin", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(card_overlay) /obj/machinery/atm/process() diff --git a/code/modules/economy/OrderTerminal.dm b/code/modules/economy/OrderTerminal.dm index e2249c05f34..b2758bcf41b 100644 --- a/code/modules/economy/OrderTerminal.dm +++ b/code/modules/economy/OrderTerminal.dm @@ -39,7 +39,7 @@ set_light(FALSE) return - var/mutable_appearance/screen_overlay = mutable_appearance(icon, "kitchenterminal-active", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/screen_overlay = mutable_appearance(icon, "kitchenterminal-active", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(screen_overlay) set_light(1.4, 1, COLOR_CYAN) diff --git a/code/modules/effects/shuttle_landing_warning.dm b/code/modules/effects/shuttle_landing_warning.dm index 3998f85f98e..737045651e5 100644 --- a/code/modules/effects/shuttle_landing_warning.dm +++ b/code/modules/effects/shuttle_landing_warning.dm @@ -6,3 +6,4 @@ simulated = FALSE mouse_opacity = MOUSE_OPACITY_TRANSPARENT layer = UNDER_HUD_LAYER + plane = HUD_PLANE diff --git a/code/modules/heavy_vehicle/equipment/utility.dm b/code/modules/heavy_vehicle/equipment/utility.dm index 0aa216955c6..a3d726792f3 100644 --- a/code/modules/heavy_vehicle/equipment/utility.dm +++ b/code/modules/heavy_vehicle/equipment/utility.dm @@ -244,6 +244,57 @@ origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 4, TECH_MAGNET = 4) require_adjacent = FALSE + ///For when targetting a single object, will create a warp beam + var/datum/beam = null + var/max_dist = 6 + var/obj/effect/effect/warp/small/warpeffect = null + +/obj/effect/ebeam/warp + plane = WARP_EFFECT_PLANE + appearance_flags = DEFAULT_APPEARANCE_FLAGS | TILE_BOUND | NO_CLIENT_COLOR + z_flags = ZMM_IGNORE + +/obj/effect/effect/warp/small + plane = WARP_EFFECT_PLANE + appearance_flags = PIXEL_SCALE | NO_CLIENT_COLOR + icon = 'icons/effects/96x96.dmi' + icon_state = "singularity_s3" + pixel_x = -32 + pixel_y = -32 + z_flags = ZMM_IGNORE + +/obj/item/mecha_equipment/catapult/proc/beamdestroyed() + if(beam) + GLOB.destroyed_event.unregister(beam, src, .proc/beamdestroyed) + beam = null + if(locked) + if(owner) + for(var/pilot in owner.pilots) + to_chat(pilot, SPAN_NOTICE("Lock on \the [locked] disengaged.")) + endanimation() + locked = null + //It's possible beam self destroyed, match active + if(active) + deactivate() + +/obj/item/mecha_equipment/catapult/proc/endanimation() + if(locked) + animate(locked,pixel_y= initial(locked.pixel_y), time = 0) + +/obj/item/mecha_equipment/catapult/get_hardpoint_maptext() + var/string + if(locked) + string = locked.name + " - " + if(mode == 1) + string += "Pull" + else string += "Push" + return string + +/obj/item/mecha_equipment/catapult/deactivate() + . = ..() + if(beam) + QDEL_NULL(beam) + /obj/item/mecha_equipment/catapult/attack_self(var/mob/user) . = ..() if(.) @@ -264,18 +315,40 @@ to_chat(user, SPAN_NOTICE("Unable to lock on [target].")) return locked = AM + beam = owner.Beam(BeamTarget = target, icon_state = "r_beam", maxdistance = max_dist, beam_type = /obj/effect/ebeam/warp) + GLOB.destroyed_event.register(beam, src, .proc/beamdestroyed) + + animate(target,pixel_y= initial(target.pixel_y) - 2,time=1 SECOND, easing = SINE_EASING, flags = ANIMATION_PARALLEL, loop = -1) + animate(pixel_y= initial(target.pixel_y) + 2,time=1 SECOND) + + active=TRUE to_chat(user, SPAN_NOTICE("Locked onto \the [AM].")) return else if(target != locked) if(locked in view(owner)) INVOKE_ASYNC(locked, TYPE_PROC_REF(/atom/movable, throw_at), target, 14, 1.5, owner) log_and_message_admins("used [src] to throw [locked] at [target].", user, owner.loc) + endanimation() locked = null + deactivate() owner.use_cell_power(active_power_use * CELLRATE) else locked = null to_chat(user, SPAN_NOTICE("Lock on \the [locked] disengaged.")) + deactivate() if(CATAPULT_AREA) + if(!warpeffect) + warpeffect = new + warpeffect.forceMove(get_turf(target)) + var/matrix/start = matrix() + start.Scale(0) + var/matrix/end= matrix() + end.Scale(1) + warpeffect.alpha = 255 + warpeffect.transform = start + animate(warpeffect,transform = end, alpha = 0, time= 1.25 SECONDS) + addtimer(CALLBACK(warpeffect, /atom/movable/proc/forceMove, null), 1.25 SECONDS) + var/list/atoms = list() if(isturf(target)) atoms = range(target,3) diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index f4d629f6ca1..0ed9c398875 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -90,14 +90,14 @@ name = "\proper space" icon_state = "0" footstep_sound = null - plane = PLANE_SPACE_BACKGROUND + plane = SPACE_PLANE dynamic_lighting = 0 /turf/simulated/floor/holofloor/space/Initialize() . = ..() icon_state = "[((x + y) ^ ~(x * y) + z) % 25]" var/image/I = image('icons/turf/space_parallax1.dmi',"[icon_state]") - I.plane = PLANE_SPACE_DUST + I.plane = DUST_PLANE I.alpha = 80 I.blend_mode = BLEND_ADD add_overlay(I) diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm index 8d3208ebd30..05655ff0837 100644 --- a/code/modules/lighting/lighting_overlay.dm +++ b/code/modules/lighting/lighting_overlay.dm @@ -6,9 +6,10 @@ color = LIGHTING_BASE_MATRIX mouse_opacity = MOUSE_OPACITY_TRANSPARENT layer = LIGHTING_LAYER + plane = LIGHTING_PLANE invisibility = INVISIBILITY_LIGHTING simulated = 0 - blend_mode = BLEND_MULTIPLY + blend_mode = BLEND_OVERLAY appearance_flags = NO_CLIENT_COLOR var/needs_update = FALSE diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 0f47e09daba..a01b16849ee 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -38,7 +38,7 @@ /obj/machinery/mineral/processing_unit_console/Initialize(mapload, d, populate_components) . = ..() - var/mutable_appearance/screen_overlay = mutable_appearance(icon, "production_console-screen", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/screen_overlay = mutable_appearance(icon, "production_console-screen", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(screen_overlay) set_light(1.4, 1, COLOR_CYAN) diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm index 8a6f8e72e4d..72c7a0b414b 100644 --- a/code/modules/mining/machine_stacking.dm +++ b/code/modules/mining/machine_stacking.dm @@ -19,7 +19,7 @@ /obj/machinery/mineral/stacking_unit_console/Initialize(mapload, d, populate_components) ..() - var/mutable_appearance/screen_overlay = mutable_appearance(icon, "production_console-screen", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/screen_overlay = mutable_appearance(icon, "production_console-screen", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(screen_overlay) set_light(1.4, 1, COLOR_CYAN) return INITIALIZE_HINT_LATELOAD diff --git a/code/modules/mining/ore_detector.dm b/code/modules/mining/ore_detector.dm index aac1b308507..5dbc1c11fed 100644 --- a/code/modules/mining/ore_detector.dm +++ b/code/modules/mining/ore_detector.dm @@ -125,6 +125,7 @@ ore_ping.pixel_x = rand(-6, 6) ore_ping.pixel_y = rand(-6, 6) ore_ping.alpha = rand(180, 255) + ore_ping.plane = HUD_PLANE pixel_shift_to_turf(ore_ping, our_turf, turf) if(M.client) M.client.images += ore_ping diff --git a/code/modules/mob/abstract/new_player/login.dm b/code/modules/mob/abstract/new_player/login.dm index c53f6cf8703..4ff657a815d 100644 --- a/code/modules/mob/abstract/new_player/login.dm +++ b/code/modules/mob/abstract/new_player/login.dm @@ -1,6 +1,3 @@ -/mob/abstract/new_player - var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled - /mob/abstract/new_player/LateLogin() ..() @@ -11,7 +8,6 @@ mind.active = 1 mind.current = src - my_client = client set_sight(BLIND) GLOB.player_list |= src diff --git a/code/modules/mob/abstract/new_player/logout.dm b/code/modules/mob/abstract/new_player/logout.dm index 7dd17bd0f6e..fcf2a1cd6a7 100644 --- a/code/modules/mob/abstract/new_player/logout.dm +++ b/code/modules/mob/abstract/new_player/logout.dm @@ -2,10 +2,6 @@ ready = FALSE SSticker.update_ready_list(src) - // see login.dm - if(my_client) - my_client = null - ..() if(!spawning)//Here so that if they are spawning and log out, the other procs can play out and they will have a mob to come back to. key = null//We null their key before deleting the mob, so they are properly kicked out. diff --git a/code/modules/mob/abstract/observer/observer.dm b/code/modules/mob/abstract/observer/observer.dm index f8249e21a4a..2d01157c149 100644 --- a/code/modules/mob/abstract/observer/observer.dm +++ b/code/modules/mob/abstract/observer/observer.dm @@ -3,7 +3,7 @@ desc = "It's a g-g-g-g-ghooooost!" //jinkies! icon = 'icons/mob/mob.dmi' icon_state = "ghost" - layer = OBSERVER_LAYER + layer = OBSERVER_PLANE stat = DEAD density = 0 canmove = 0 diff --git a/code/modules/mob/floating_messages.dm b/code/modules/mob/floating_messages.dm index a8e928748be..46d869d7998 100644 --- a/code/modules/mob/floating_messages.dm +++ b/code/modules/mob/floating_messages.dm @@ -101,7 +101,7 @@ var/list/floating_chat_colors = list() var/image/I = image(null, attached_holder, layer = FLY_LAYER) I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA | KEEP_APART | PIXEL_SCALE - I.plane = FLOAT_PLANE + I.plane = HUD_PLANE I.layer = UNDER_HUD_LAYER I.pixel_x = (-round(I.maptext_width/2) + 16) + attached_holder.get_floating_chat_x_offset() I.appearance_flags = RESET_COLOR|RESET_ALPHA|RESET_TRANSFORM diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 70e5e17bf5f..0aa2f808b8d 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -90,10 +90,12 @@ There are several things that need to be remembered: #define GET_TAIL_LAYER (dir == NORTH ? TAIL_NORTH_LAYER : TAIL_SOUTH_LAYER) #define GET_TAIL_ACC_LAYER (dir == NORTH ? TAIL_NORTH_ACC_LAYER : TAIL_SOUTH_ACC_LAYER) -/proc/overlay_image(icon, icon_state,color, flags, layer) +/proc/overlay_image(icon, icon_state,color, flags, plane, layer) var/image/ret = image(icon,icon_state) ret.color = color ret.appearance_flags = PIXEL_SCALE | flags + if(plane) + ret.plane = plane if(layer) ret.layer = layer return ret diff --git a/code/modules/mob/living/carbon/slime/slime_extractor.dm b/code/modules/mob/living/carbon/slime/slime_extractor.dm index 1dfcf18b5f3..5e07d49746c 100644 --- a/code/modules/mob/living/carbon/slime/slime_extractor.dm +++ b/code/modules/mob/living/carbon/slime/slime_extractor.dm @@ -31,9 +31,9 @@ var/mutable_appearance/panel_overlay = mutable_appearance(icon, "[icon_state]-panel") add_overlay(panel_overlay) if(length(extract_slimes)) - var/mutable_appearance/interior_overlay = mutable_appearance(icon, "[icon_state]-interior", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/interior_overlay = mutable_appearance(icon, "[icon_state]-interior", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(interior_overlay) - var/mutable_appearance/spinning_overlay = mutable_appearance(icon, "[icon_state]-running", EFFECTS_ABOVE_LIGHTING_LAYER) + var/mutable_appearance/spinning_overlay = mutable_appearance(icon, "[icon_state]-running", plane = EFFECTS_ABOVE_LIGHTING_PLANE) add_overlay(spinning_overlay) set_light(2.5, 1, COLOR_VIOLET) else diff --git a/code/modules/mob/living/silicon/robot/robot_helpers.dm b/code/modules/mob/living/silicon/robot/robot_helpers.dm index c8b4d367432..023bd1bb2a3 100644 --- a/code/modules/mob/living/silicon/robot/robot_helpers.dm +++ b/code/modules/mob/living/silicon/robot/robot_helpers.dm @@ -31,23 +31,24 @@ /mob/living/silicon/robot/proc/setup_eye_cache() if(!module_sprites?[icontype]?[ROBOT_EYES]) return - var/eye_layer = src.layer + var/eye_plane = src.plane if(lights_on && layer == MOB_LAYER) // in case you're hiding. so eyes don't go through tables. - eye_layer = EFFECTS_ABOVE_LIGHTING_LAYER //make them glow in the dark if the lamp is on + eye_plane = EFFECTS_ABOVE_LIGHTING_PLANE //make them glow in the dark if the lamp is on var/eyeprefix = module_sprites[icontype][ROBOT_EYES] if(speed == -2) // For combat drones with the mobility module. cached_eye_overlays = list( - I_HELP = image(icon, "[eyeprefix]-roll-eyes_help", layer = eye_layer), - I_HURT = image(icon, "[eyeprefix]-roll-eyes_harm", layer = eye_layer) + I_HELP = image(icon, "[eyeprefix]-roll-eyes_help"), + I_HURT = image(icon, "[eyeprefix]-roll-eyes_harm") ) else cached_eye_overlays = list( - I_HELP = image(icon, "[eyeprefix]-eyes_help", layer = eye_layer), //Changed so icontype goes in front. Helps with parsing in this godforsaken engine known as BYOND. - I_HURT = image(icon, "[eyeprefix]-eyes_harm", layer = eye_layer) + I_HELP = image(icon, "[eyeprefix]-eyes_help"), //Changed so icontype goes in front. Helps with parsing in this godforsaken engine known as BYOND. + I_HURT = image(icon, "[eyeprefix]-eyes_harm") ) if(eye_overlay) cut_overlay(eye_overlay) eye_overlay = cached_eye_overlays[a_intent] + eye_overlay.plane = eye_plane add_overlay(eye_overlay) /mob/living/silicon/robot/proc/setup_panel_cache() diff --git a/code/modules/mob/living/simple_animal/constructs/constructs/cult_construct.dm b/code/modules/mob/living/simple_animal/constructs/constructs/cult_construct.dm index 9ae2f344726..3002d9afa23 100644 --- a/code/modules/mob/living/simple_animal/constructs/constructs/cult_construct.dm +++ b/code/modules/mob/living/simple_animal/constructs/constructs/cult_construct.dm @@ -121,11 +121,12 @@ /mob/living/simple_animal/construct/proc/add_glow() cut_overlays() - var/overlay_layer = EFFECTS_ABOVE_LIGHTING_LAYER - if(layer != MOB_LAYER) - overlay_layer = TURF_LAYER + 0.2 + var/overlay_plane = EFFECTS_ABOVE_LIGHTING_PLANE - add_overlay(image(icon, "glow-[icon_state]", overlay_layer)) + var/image/glow = image(icon, "glow-[icon_state]") + glow.plane = overlay_plane + + add_overlay(glow) set_light(2, -2, l_color = COLOR_WHITE) /mob/living/simple_animal/construct/Life() diff --git a/code/modules/mob/living/simple_animal/hostile/ipc_zombie.dm b/code/modules/mob/living/simple_animal/hostile/ipc_zombie.dm index 5844f0b954b..dfbc465c469 100644 --- a/code/modules/mob/living/simple_animal/hostile/ipc_zombie.dm +++ b/code/modules/mob/living/simple_animal/hostile/ipc_zombie.dm @@ -49,7 +49,8 @@ icon_state = pick("baseline_grey", "baseline_red", "baseline_green", "baseline_yellow") icon_dead = "[icon_state]_off" screen = pick("screen_blue", "screen_red", "screen_orange", "screen_lumi_eyes", "screen_goggles", "screen_console", "screen_static2", "screen_static3") - screen_overlay = image('icons/mob/npc/ipc_zombie.dmi', "[screen]", EFFECTS_ABOVE_LIGHTING_LAYER) + screen_overlay = image('icons/mob/npc/ipc_zombie.dmi', "[screen]") + screen_overlay.plane = plane = EFFECTS_ABOVE_LIGHTING_PLANE screen_overlay.appearance_flags = KEEP_APART add_overlay(screen_overlay) set_light(MINIMUM_USEFUL_LIGHT_RANGE, 2, LIGHT_COLOR_TUNGSTEN) @@ -57,7 +58,8 @@ /mob/living/simple_animal/hostile/ipc_zombie/update_icon() cut_overlays() if(screen && stat != DEAD) - screen_overlay = image('icons/mob/npc/ipc_zombie.dmi', "[screen]", EFFECTS_ABOVE_LIGHTING_LAYER) + screen_overlay = image('icons/mob/npc/ipc_zombie.dmi', "[screen]") + screen_overlay.plane = EFFECTS_ABOVE_LIGHTING_PLANE screen_overlay.appearance_flags = KEEP_APART add_overlay(screen_overlay) diff --git a/code/modules/mob/living/simple_animal/hostile/rogue_maint_drone.dm b/code/modules/mob/living/simple_animal/hostile/rogue_maint_drone.dm index ea26becfb15..3005dc1953c 100644 --- a/code/modules/mob/living/simple_animal/hostile/rogue_maint_drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/rogue_maint_drone.dm @@ -27,7 +27,8 @@ /mob/living/simple_animal/hostile/rogue_drone/Initialize() . = ..() name = "[initial(name)] ([rand(100, 999)])" - eye_overlay = image(icon, "[icon_state]-eyes_emag", layer = EFFECTS_ABOVE_LIGHTING_LAYER) + eye_overlay = image(icon, "[icon_state]-eyes_emag") + eye_overlay.plane = EFFECTS_ABOVE_LIGHTING_PLANE eye_overlay.appearance_flags = KEEP_APART add_overlay(eye_overlay) diff --git a/code/modules/mob/living/simple_animal/hostile/space_fauna.dm b/code/modules/mob/living/simple_animal/hostile/space_fauna.dm index 9d7121a2d47..42a2eb7ab55 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_fauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_fauna.dm @@ -177,7 +177,8 @@ /mob/living/simple_animal/hostile/carp/shark/reaver/eel/Initialize() . = ..() - eye_overlay = image(icon, "eel_eyeglow", layer = EFFECTS_ABOVE_LIGHTING_LAYER) + eye_overlay = image(icon, "eel_eyeglow") + eye_overlay.plane = EFFECTS_ABOVE_LIGHTING_PLANE eye_overlay.appearance_flags = KEEP_APART add_overlay(eye_overlay) set_light(MINIMUM_USEFUL_LIGHT_RANGE, 2, LIGHT_COLOR_TUNGSTEN) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 1a9f6f3475f..581fee27ca6 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -25,6 +25,9 @@ message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).",ckey=key_name(src)) +/mob + var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled + /** * Currently marked as SHOULD_NOT_OVERRIDE. * @@ -73,6 +76,8 @@ set_sight(sight|SEE_SELF) disconnect_time = null + my_client = client + player_age = client.player_age if(loc && !isturf(loc)) @@ -95,6 +100,7 @@ clear_important_client_contents(client) enable_client_mobs_in_contents(client) + CreateRenderers() update_client_color() add_click_catcher() diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index b23cda9ed8a..8211f367aad 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -7,9 +7,12 @@ disconnect_time = world.realtime log_access("Logout: [key_name(src)]",ckey=key_name(src)) SSstatistics.update_status() + RemoveRenderers() if(client) clear_important_client_contents(client) + my_client = null + if(admin_datums[src.ckey]) var/datum/admins/A = admin_datums[src.ckey] if (A.rights & (R_MOD|R_ADMIN) && SSticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing. diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 44cc6ccab9d..5943832e000 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1452,6 +1452,16 @@ return WEATHER_EXPOSED +/mob/proc/check_emissive_equipment() + var/old_zflags = z_flags + z_flags &= ~ZMM_MANGLE_PLANES + for(var/atom/movable/AM in get_equipped_items(TRUE)) + if(AM.z_flags & ZMM_MANGLE_PLANES) + z_flags |= ZMM_MANGLE_PLANES + break + if(old_zflags != z_flags) + UPDATE_OO_IF_PRESENT + #undef UNBUCKLED #undef PARTIALLY_BUCKLED #undef FULLY_BUCKLED diff --git a/code/modules/multiz/turfs/open_space.dm b/code/modules/multiz/turfs/open_space.dm index 26fa7059b54..bd337b873f8 100644 --- a/code/modules/multiz/turfs/open_space.dm +++ b/code/modules/multiz/turfs/open_space.dm @@ -7,7 +7,6 @@ name = "open space" icon = 'icons/turf/space.dmi' icon_state = "opendebug" - plane = PLANE_SPACE_BACKGROUND density = 0 pathweight = 100000 //Seriously, don't try and path over this one numbnuts is_hole = TRUE diff --git a/code/modules/multiz/zmimic/mimic_movable.dm b/code/modules/multiz/zmimic/mimic_movable.dm index 51f718c108f..02082720924 100644 --- a/code/modules/multiz/zmimic/mimic_movable.dm +++ b/code/modules/multiz/zmimic/mimic_movable.dm @@ -2,7 +2,7 @@ /// The mimic (if any) that's *directly* copying us. var/tmp/atom/movable/openspace/mimic/bound_overlay /// If TRUE, this atom is ignored by Z-Mimic. - var/no_z_overlay + var/z_flags /atom/movable/forceMove(atom/dest) . = ..(dest) @@ -75,12 +75,8 @@ icon_state = "dark" plane = OPENTURF_MAX_PLANE layer = MIMICED_LIGHTING_LAYER - blend_mode = BLEND_MULTIPLY - color = list( - SHADOWER_DARKENING_FACTOR, 0, 0, - 0, SHADOWER_DARKENING_FACTOR, 0, - 0, 0, SHADOWER_DARKENING_FACTOR - ) +// blend_mode = BLEND_MULTIPLY + color = "#00000033" /atom/movable/openspace/multiplier/Destroy() var/turf/myturf = loc @@ -93,9 +89,9 @@ appearance = LO layer = MIMICED_LIGHTING_LAYER plane = OPENTURF_MAX_PLANE - set_invisibility(101) - blend_mode = BLEND_MULTIPLY + set_invisibility(0) if (icon_state == null) + blend_mode = BLEND_MULTIPLY // We're using a color matrix, so just darken the colors across the board. // Bay stores lights as inverted so the lighting PM can invert it for darksight, but // we don't have a plane master, so invert it again. @@ -143,6 +139,7 @@ var/mimiced_type var/original_z var/override_depth + var/have_performed_fixup = FALSE /atom/movable/openspace/mimic/Initialize(mapload, ...) . = ..() @@ -190,7 +187,7 @@ /atom/movable/openspace/turf_proxy plane = OPENTURF_MAX_PLANE mouse_opacity = MOUSE_OPACITY_TRANSPARENT - no_z_overlay = TRUE // Only one of these should ever be visible at a time, the mimic logic will handle that. + z_flags = ZMM_IGNORE // Only one of these should ever be visible at a time, the mimic logic will handle that. /atom/movable/openspace/turf_proxy/attackby(obj/item/attacking_item, mob/user) loc.attackby(attacking_item, user) diff --git a/code/modules/multiz/zmimic/mimic_turf.dm b/code/modules/multiz/zmimic/mimic_turf.dm index a98cb8de1bb..e7f043de54f 100644 --- a/code/modules/multiz/zmimic/mimic_turf.dm +++ b/code/modules/multiz/zmimic/mimic_turf.dm @@ -21,7 +21,7 @@ /turf/Entered(atom/movable/thing, turf/oldLoc) . = ..() - if (thing.bound_overlay || thing.no_z_overlay || !TURF_IS_MIMICING(above)) + if (thing.bound_overlay || (thing.z_flags & ZMM_IGNORE) || !TURF_IS_MIMICING(above)) return above.update_mimic() diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index c62675f470e..9e9d3aecb2f 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -109,7 +109,8 @@ return var/datum/vampire/vampire = H.mind.antag_datums[MODE_VAMPIRE] if(vampire && (vampire.status & VAMP_FRENZIED)) - var/image/return_image = image(H.species.eyes_icons, H, "[H.species.eyes]_frenzy", EFFECTS_ABOVE_LIGHTING_LAYER) + var/image/return_image = image(H.species.eyes_icons, H, "[H.species.eyes]_frenzy") + return_image.plane = EFFECTS_ABOVE_LIGHTING_PLANE return_image.appearance_flags = KEEP_APART LAZYADD(additional_images, return_image) return list(return_image) diff --git a/code/modules/organs/subtypes/unbreakable.dm b/code/modules/organs/subtypes/unbreakable.dm index d061eb9bd19..70e62b70101 100644 --- a/code/modules/organs/subtypes/unbreakable.dm +++ b/code/modules/organs/subtypes/unbreakable.dm @@ -44,6 +44,7 @@ limb_flags = ORGAN_CAN_AMPUTATE /obj/item/organ/external/head/unbreakable/revenant/get_additional_images(var/mob/living/carbon/human/H) - var/image/return_image = image(H.species.eyes_icons, H, "[H.species.eyes]_glow", EFFECTS_ABOVE_LIGHTING_LAYER) + var/image/return_image = image(H.species.eyes_icons, H, "[H.species.eyes]_glow") + return_image.plane = EFFECTS_ABOVE_LIGHTING_PLANE return_image.appearance_flags = KEEP_APART return list(return_image) diff --git a/code/modules/overmap/exoplanets/decor/objs/monolith.dm b/code/modules/overmap/exoplanets/decor/objs/monolith.dm index 7b0d5fa8b75..bf8c13023ca 100644 --- a/code/modules/overmap/exoplanets/decor/objs/monolith.dm +++ b/code/modules/overmap/exoplanets/decor/objs/monolith.dm @@ -22,7 +22,7 @@ var/image/I = image(icon,"[icon_state]decor") I.appearance_flags = RESET_COLOR I.color = get_random_colour(0, 150, 255) - I.layer = EFFECTS_ABOVE_LIGHTING_LAYER + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE add_overlay(I) set_light(0.3, 0.1, 2, l_color = I.color) diff --git a/code/modules/overmap/overmap_object.dm b/code/modules/overmap/overmap_object.dm index 996e868b550..01102d197d2 100644 --- a/code/modules/overmap/overmap_object.dm +++ b/code/modules/overmap/overmap_object.dm @@ -102,7 +102,7 @@ return INITIALIZE_HINT_QDEL if(known) - layer = EFFECTS_ABOVE_LIGHTING_LAYER + plane = EFFECTS_ABOVE_LIGHTING_PLANE for(var/obj/machinery/computer/ship/helm/H in SSmachinery.machinery) H.get_known_sectors() update_icon() diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 1e0d5d426c1..163643f8857 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -367,6 +367,7 @@ gfi_layer_rotation = GFI_ROTATION_DEFDIR clicksound = /singleton/sound_category/switch_sound obj_flags = OBJ_FLAG_MOVES_UNSUPPORTED + z_flags = ZMM_MANGLE_PLANES var/area/area var/areastring = null var/obj/item/cell/cell diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 7399988978c..35302fd6b77 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -85,8 +85,8 @@ By design, d1 is the smallest direction and d2 is the highest GLOB.cable_list += src if(mapload) - var/image/I = image(icon, T, icon_state, EFFECTS_ABOVE_LIGHTING_LAYER, dir, pixel_x, pixel_y) - I.plane = 0 + var/image/I = image(icon, T, icon_state, dir, pixel_x, pixel_y) + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE I.alpha = 125 I.color = color LAZYADD(T.blueprints, I) diff --git a/code/modules/power/lights/fixtures.dm b/code/modules/power/lights/fixtures.dm index 3536cfcb606..d4ebf2ad6ac 100644 --- a/code/modules/power/lights/fixtures.dm +++ b/code/modules/power/lights/fixtures.dm @@ -76,7 +76,7 @@ icon_state = "floortube_example" base_state = "floortube" desc = "A lighting fixture. This one is set into the floor." - layer = TURF_DETAIL_LAYER + layer = ABOVE_TILE_LAYER fitting_has_empty_icon = TRUE fitting_is_on_floor = TRUE @@ -100,8 +100,8 @@ icon_state = "floor_example" base_state = "floor" desc = "A small lighting fixture. This one is set into the floor." - layer = TURF_DETAIL_LAYER fitting_is_on_floor = TRUE + layer = ABOVE_TILE_LAYER /obj/machinery/light/small/emergency icon_state = "bulb_emergency_preview" @@ -245,9 +245,9 @@ if (on) var/image/I = LIGHT_FIXTURE_CACHE(icon, "[base_state]_on", target_color) if (!fitting_is_on_floor) - I.layer = EFFECTS_ABOVE_LIGHTING_LAYER + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE else - I.layer = layer + I.plane = plane add_overlay(I) else add_overlay(LIGHT_FIXTURE_CACHE(icon, "[base_state]_off", target_color)) diff --git a/code/modules/power/radial_floodlight.dm b/code/modules/power/radial_floodlight.dm index be0b8111827..b2250259ea9 100644 --- a/code/modules/power/radial_floodlight.dm +++ b/code/modules/power/radial_floodlight.dm @@ -62,4 +62,6 @@ /obj/machinery/power/radial_floodlight/update_icon() cut_overlays() if(on) - add_overlay(image(icon, src, "[icon_state]-light", EFFECTS_ABOVE_LIGHTING_LAYER)) + var/image/light = image(icon, src, "[icon_state]-light") + light.plane = EFFECTS_ABOVE_LIGHTING_PLANE + add_overlay(light) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 62eac8d2646..2ec1e850668 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -53,7 +53,7 @@ field_generator power level display if(state == 2) add_overlay("+welding") var/image/lights_image = image(icon, null, "+lights") - lights_image.layer = EFFECTS_ABOVE_LIGHTING_LAYER + lights_image.plane = EFFECTS_ABOVE_LIGHTING_PLANE add_overlay(lights_image) /obj/machinery/field_generator/process() diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index f99c4552753..29dfea4ec06 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -15,7 +15,7 @@ if(anchored) add_overlay("[icon_state]+bolts") var/image/lights_image = image(icon, null, "[icon_state]+lights") - lights_image.layer = EFFECTS_ABOVE_LIGHTING_LAYER + lights_image.plane = EFFECTS_ABOVE_LIGHTING_PLANE add_overlay(lights_image) /obj/machinery/the_singularitygen/process() diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index a030963542f..eb79c514744 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -18,7 +18,7 @@ if(anchored) add_overlay("[icon_state]+bolts") var/image/lights_image = image(icon, null, "[icon_state]+lights") - lights_image.layer = EFFECTS_ABOVE_LIGHTING_LAYER + lights_image.plane = EFFECTS_ABOVE_LIGHTING_PLANE add_overlay(lights_image) /obj/machinery/power/tesla_coil/RefreshParts() @@ -79,7 +79,7 @@ if(anchored) add_overlay("[icon_state]+bolts") var/image/lights_image = image(icon, null, "[icon_state]+lights") - lights_image.layer = EFFECTS_ABOVE_LIGHTING_LAYER + lights_image.plane = EFFECTS_ABOVE_LIGHTING_PLANE add_overlay(lights_image) /obj/machinery/power/grounding_rod/attackby(obj/item/attacking_item, mob/user) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 2199e1077f2..a163348eb38 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -17,7 +17,7 @@ dissipate = 1 dissipate_delay = 10 dissipate_strength = 1 - layer = EFFECTS_ABOVE_LIGHTING_LAYER + plane = EFFECTS_ABOVE_LIGHTING_PLANE blend_mode = BLEND_ADD var/failed_direction = 0 var/list/orbiting_balls = list() diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index afaf852b94d..dadebd8b497 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -796,8 +796,8 @@ if(mapload) var/turf/T = loc - var/image/I = image(icon, T, icon_state, EFFECTS_ABOVE_LIGHTING_LAYER, dir, pixel_x, pixel_y) - I.plane = 0 + var/image/I = image(icon, T, icon_state, dir, pixel_x, pixel_y) + I.plane = EFFECTS_ABOVE_LIGHTING_PLANE I.alpha = 125 LAZYADD(T.blueprints, I) diff --git a/code/modules/turbolift/turbolift_map.dm b/code/modules/turbolift/turbolift_map.dm index 7762e9ade2e..89bc541ba14 100644 --- a/code/modules/turbolift/turbolift_map.dm +++ b/code/modules/turbolift/turbolift_map.dm @@ -206,8 +206,8 @@ light1.set_dir(SOUTH) light2.set_dir(NORTH) - light1.no_z_overlay = 1 - light2.no_z_overlay = 1 + light1.z_flags = ZMM_IGNORE + light2.z_flags = ZMM_IGNORE // Update area. if(az > areas_to_use.len) diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm index 18e7654b81f..1289eced8d5 100644 --- a/code/modules/ventcrawl/ventcrawl.dm +++ b/code/modules/ventcrawl/ventcrawl.dm @@ -228,12 +228,14 @@ var/global/list/can_enter_vent_with = list( for(var/datum/pipeline/pipeline in network.line_members) for(var/obj/machinery/atmospherics/A in (pipeline.members || pipeline.edges)) // Adds pipe and manifold images if(!A.pipe_image) - A.pipe_image = image(A, A.loc, layer = ABOVE_LIGHTING_LAYER, dir = A.dir) + A.pipe_image = image(A, A.loc, dir = A.dir) + A.pipe_image.plane = EFFECTS_ABOVE_LIGHTING_PLANE pipes_shown += A.pipe_image client.images += A.pipe_image for (var/obj/machinery/atmospherics/V in network.normal_members) // Adds vent and scrubber images if (!V.pipe_image || istype(V, /obj/machinery/atmospherics/unary/vent_pump/)) - V.pipe_image = image(V, V.loc, layer = ABOVE_LIGHTING_LAYER, dir = V.dir) + V.pipe_image = image(V, V.loc, dir = V.dir) + V.pipe_image.plane = EFFECTS_ABOVE_LIGHTING_PLANE pipes_shown += V.pipe_image client.images += V.pipe_image diff --git a/code/modules/weather/_weather.dm b/code/modules/weather/_weather.dm index e9432b108af..6ee73c77347 100644 --- a/code/modules/weather/_weather.dm +++ b/code/modules/weather/_weather.dm @@ -91,8 +91,8 @@ // Dummy object for lightning flash animation. /obj/abstract/lightning_overlay - plane = DEFAULT_PLANE + 1 //Future EMISSIVE_PLANE - layer = ABOVE_LIGHTING_LAYER + plane = EFFECTS_ABOVE_LIGHTING_PLANE //Future EMISSIVE_PLANE + layer = LIGHTNING_LAYER icon = 'icons/effects/weather.dmi' icon_state = "full" alpha = 0 diff --git a/html/changelogs/GeneralCamo - Plane Masters.yml b/html/changelogs/GeneralCamo - Plane Masters.yml new file mode 100644 index 00000000000..750e0f02aef --- /dev/null +++ b/html/changelogs/GeneralCamo - Plane Masters.yml @@ -0,0 +1,43 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: GeneralCamo + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - refactor: "Ported plane masters from Bay." + - refactor: "Ported some Z-Mimic changes/improvements/bugfixes from Nebula/Bay." + - bugfix: "Floor lights no longer render under floor decals." \ No newline at end of file diff --git a/maps/away/ships/tirakqi_smuggler/tirakqi_smuggler.dm b/maps/away/ships/tirakqi_smuggler/tirakqi_smuggler.dm index 321138a9aea..7c733d7d528 100644 --- a/maps/away/ships/tirakqi_smuggler/tirakqi_smuggler.dm +++ b/maps/away/ships/tirakqi_smuggler/tirakqi_smuggler.dm @@ -201,7 +201,7 @@ name = "\proper holospace" icon_state = "void" footstep_sound = null - plane = PLANE_SPACE_BACKGROUND + plane = SPACE_PLANE dynamic_lighting = 0 /turf/simulated/floor/holofloor/tirakqi_cosmocage/update_dirt()