From 1c76ea533439dcd7fca15a2dd500a44dc6158883 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 19 Dec 2022 08:58:43 +0100 Subject: [PATCH] [MIRROR] Changes our map_format to SIDE_MAP [MDB IGNORE] (#18070) * Changes our map_format to SIDE_MAP (#70162) ## About The Pull Request This does nothing currently, but will allow me to test for layering issues on LIVE, rather then in just wallening. Oh also I'm packaging in a fix to one of my macros that I wrote wrong, as a joke [removes SEE_BLACKNESS usage, because we actually cannot use it effectively](https://github.com/tgstation/tgstation/pull/70162/commits/c9a19dd7cce95038340ebd5c1a6e4cb27ee7c9ee) [c9a19dd](https://github.com/tgstation/tgstation/pull/70162/commits/c9a19dd7cce95038340ebd5c1a6e4cb27ee7c9ee) Sidemap removes the ability to control it on a plane, so it basically just means there's an uncontrollable black slate even if you have other toggles set. This just like, removes that, since it's silly [fixes weird layering on solars and ai portraits. Pixel y was casuing things to render below who shouldn't](https://github.com/tgstation/tgstation/pull/70162/commits/3885b9d9ed634cdc4c8041b19df5b5ea9a1a37ae) [3885b9d](https://github.com/tgstation/tgstation/pull/70162/commits/3885b9d9ed634cdc4c8041b19df5b5ea9a1a37ae) [Fixes flicker issues](https://github.com/tgstation/tgstation/pull/70162/commits/2defc0ad20a0ee7d12e0b071f6d31b6127b8765d) [2defc0a](https://github.com/tgstation/tgstation/pull/70162/commits/2defc0ad20a0ee7d12e0b071f6d31b6127b8765d) Offsetting the vis_contents'd objects down physically, and then up visually resolves the confliciting that was going on between the text and its display. This resolves the existing reported flickering issues [fixes plated food not appearing in world](https://github.com/tgstation/tgstation/pull/70162/commits/28a34c64f830660d7fb1cc669b9fc3ed9f5c7d61) [28a34c6](https://github.com/tgstation/tgstation/pull/70162/commits/28a34c64f830660d7fb1cc669b9fc3ed9f5c7d61) pixel_y'd vis_contents strikes again. It's a tad hacky but we'll just use pixel_z for this [Adds wall and upper wall plane masters](https://github.com/tgstation/tgstation/pull/70162/commits/89fe2b4eb40edc36879e4e1954dee8616be94522) [89fe2b4](https://github.com/tgstation/tgstation/pull/70162/commits/89fe2b4eb40edc36879e4e1954dee8616be94522) We use these + the floor and space planes to build a mask of all the visible turfs. Then we take that, stick it in a plane master, and mask the emissive plane with it. This solves the lighting fulldark screen object getting cut by emissives Shifts some planes around to match this new layering. Also ensures we only shift fullscreen objects if they don't object to it. [compresses plane master controllers](https://github.com/tgstation/tgstation/pull/70162/commits/bd64cc196a4265d42809eebbd1afa46fa33a576d) [bd64cc1](https://github.com/tgstation/tgstation/pull/70162/commits/bd64cc196a4265d42809eebbd1afa46fa33a576d) we don't use them for much rn, but we might in future so I'm keeping it as a convienince thing :cl: refactor: The logic of how we well, render things has changed. Make an issue report if anything looks funky, particularly layers. PLEASE USE YOUR EYES /:cl: Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> * Changes our map_format to SIDE_MAP * Modular! Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> Co-authored-by: Funce --- .github/guides/VISUALS.md | 2 +- code/__DEFINES/layers.dm | 37 +++++--- code/__DEFINES/sight.dm | 1 + code/__HELPERS/_planes.dm | 2 +- code/_onclick/hud/fullscreen.dm | 13 +-- code/_onclick/hud/rendering/_render_readme.md | 2 +- code/_onclick/hud/rendering/plane_master.dm | 94 ++++++------------- .../hud/rendering/plane_master_controller.dm | 42 ++------- code/_onclick/hud/rendering/render_plate.dm | 44 ++++++--- code/datums/actions/mobs/adjust_vision.dm | 1 - code/datums/brain_damage/imaginary_friend.dm | 2 +- code/game/machinery/status_display.dm | 3 + code/game/objects/effects/decals/decal.dm | 1 + code/game/turfs/closed/_closed.dm | 1 + code/game/turfs/closed/minerals.dm | 4 +- .../game/turfs/open/floor/reinforced_floor.dm | 4 +- .../antagonists/cult/cult_turf_overlay.dm | 24 ++--- .../antagonists/disease/disease_mob.dm | 2 +- .../heretic/mobs/maid_in_mirror.dm | 2 +- code/modules/antagonists/revenant/revenant.dm | 2 +- code/modules/food_and_drinks/plate.dm | 10 ++ .../modules/hallucination/bubblegum_attack.dm | 2 + .../ruins/objects_and_mobs/necropolis_gate.dm | 1 + code/modules/mob/camera/camera.dm | 2 +- code/modules/mob/dead/dead.dm | 2 +- code/modules/mob/living/carbon/alien/alien.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 2 +- code/modules/mob/living/living_defines.dm | 1 - code/modules/mob/living/silicon/ai/ai.dm | 2 +- .../living/silicon/ai/ai_portrait_picker.dm | 4 +- .../mob/living/simple_animal/constructs.dm | 2 +- .../simple_animal/friendly/drone/_drone.dm | 2 +- .../simple_animal/guardian/types/support.dm | 1 + .../living/simple_animal/heretic_monsters.dm | 8 +- .../hostile/bosses/paperwizard.dm | 4 +- .../living/simple_animal/hostile/eyeballs.dm | 2 +- .../living/simple_animal/hostile/statue.dm | 2 +- .../simple_animal/hostile/venus_human_trap.dm | 2 +- code/modules/mob/status_procs.dm | 5 +- code/modules/power/solar.dm | 16 ++-- code/modules/power/tracker.dm | 16 ++-- code/modules/shuttle/navigation_computer.dm | 2 +- code/world.dm | 1 + .../code/liquid_systems/liquid_effect.dm | 2 +- 44 files changed, 173 insertions(+), 203 deletions(-) diff --git a/.github/guides/VISUALS.md b/.github/guides/VISUALS.md index 0bd46b920da..74a6c83cf08 100644 --- a/.github/guides/VISUALS.md +++ b/.github/guides/VISUALS.md @@ -335,7 +335,7 @@ That said, there is some nuance here so I'ma get into that. - `SEE_BLACKNESS`: This relates heavily to [planes](#planes), essentially typically the "blackness" (that darkness that masks things that you can't see) is rendered separately, out of our control as "users". However, if the `SEE_BLACKNESS` flag is set, it will instead render on plane 0, the default BYOND plane. -This allows us to capture it, and say, blur it, or redraw it elsewhere. Very very powerful, we always have this flag set. +This allows us to capture it, and say, blur it, or redraw it elsewhere. This is in theory very powerful, but not possible with the 'side_map' [map format](https://www.byond.com/docs/ref/#/world/var/map_format) ## BYOND Lighting diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index fd93e4c9105..70134486de4 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -15,13 +15,15 @@ #define GRAVITY_PULSE_PLANE -12 #define GRAVITY_PULSE_RENDER_TARGET "*GRAVPULSE_RENDER_TARGET" -#define RENDER_PLANE_TRANSPARENT -9 //Transparent plane that shows openspace underneath the floor +#define RENDER_PLANE_TRANSPARENT -11 //Transparent plane that shows openspace underneath the floor -#define FLOOR_PLANE -8 +#define FLOOR_PLANE -10 -#define GAME_PLANE -7 -#define GAME_PLANE_FOV_HIDDEN -6 -#define GAME_PLANE_UPPER -5 +#define WALL_PLANE -9 +#define GAME_PLANE -8 +#define GAME_PLANE_FOV_HIDDEN -7 +#define GAME_PLANE_UPPER -6 +#define WALL_PLANE_UPPER -5 #define GAME_PLANE_UPPER_FOV_HIDDEN -4 ///Slightly above the game plane but does not catch mouse clicks. Useful for certain visuals that should be clicked through, like seethrough trees @@ -30,7 +32,7 @@ #define RENDER_PLANE_GAME_WORLD -1 -#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals +#define DEFAULT_PLANE 0 //Marks out the default plane, even if we don't use it #define AREA_PLANE 2 #define MASSIVE_OBJ_PLANE 3 @@ -47,11 +49,16 @@ /// This plane masks out lighting to create an "emissive" effect, ie for glowing lights in otherwise dark areas. #define EMISSIVE_PLANE 14 +#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE" -#define RENDER_PLANE_LIGHTING 15 +/// Masks the emissive plane +#define EMISSIVE_MASK_PLANE 15 +#define EMISSIVE_MASK_RENDER_TARGET "*EMISSIVE_MASK_PLANE" + +#define RENDER_PLANE_LIGHTING 16 ///Things that should render ignoring lighting -#define ABOVE_LIGHTING_PLANE 16 +#define ABOVE_LIGHTING_PLANE 17 ///---------------- MISC ----------------------- @@ -96,16 +103,20 @@ // PLANE_SPACE layer(s) #define SPACE_LAYER 1.8 -//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define. Most floors (FLOOR_PLANE) and walls (GAME_PLANE) use this. +//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define. Most floors (FLOOR_PLANE) and walls (WALL_PLANE) use this. -// GAME_PLANE layers +//FLOOR_PLANE layers #define CULT_OVERLAY_LAYER 2.01 #define MID_TURF_LAYER 2.02 #define HIGH_TURF_LAYER 2.03 #define TURF_PLATING_DECAL_LAYER 2.031 #define TURF_DECAL_LAYER 2.039 //Makes turf decals appear in DM how they will look inworld. #define ABOVE_OPEN_TURF_LAYER 2.04 + +//WALL_PLANE layers #define CLOSED_TURF_LAYER 2.05 + +// GAME_PLANE layers #define BULLET_HOLE_LAYER 2.06 #define ABOVE_NORMAL_TURF_LAYER 2.08 #define LATTICE_LAYER 2.2 @@ -170,11 +181,12 @@ // GAME_PLANE_UPPER layers #define ABOVE_MOB_LAYER 4.1 #define WALL_OBJ_LAYER 4.25 +// WALL_PLANE_UPPER layers #define EDGED_TURF_LAYER 4.3 #define ON_EDGED_TURF_LAYER 4.35 -#define SPACEVINE_LAYER 4.4 // GAME_PLANE_UPPER_FOV_HIDDEN layers +#define SPACEVINE_LAYER 4.4 #define LARGE_MOB_LAYER 4.5 #define SPACEVINE_MOB_LAYER 4.6 @@ -182,6 +194,7 @@ #define ABOVE_ALL_MOB_LAYER 4.7 // ABOVE_GAME_PLANE layers +#define NAVIGATION_EYE_LAYER 4.9 //#define FLY_LAYER 5 //For easy recordkeeping; this is a byond define #define GASFIRE_LAYER 5.05 #define RIPPLE_LAYER 5.1 @@ -199,8 +212,6 @@ //Layering order of these is not particularly meaningful. //Important part is the seperation of the planes for control via plane_master -/// The render target used by the emissive layer. -#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE" /// The layer you should use if you _really_ don't want an emissive overlay to be blocked. #define EMISSIVE_LAYER_UNBLOCKABLE 9999 diff --git a/code/__DEFINES/sight.dm b/code/__DEFINES/sight.dm index 924049db8ff..09ae20fee08 100644 --- a/code/__DEFINES/sight.dm +++ b/code/__DEFINES/sight.dm @@ -52,6 +52,7 @@ //#define SEE_THRU (1<<9) /// render dark tiles as blackness (Note, this basically means we draw dark tiles to plane 0) /// we can then hijack that plane with a plane master, and start drawing it anywhere we want +/// NOTE: this does not function with the SIDE_MAP map format. So we can't. :( //#define SEE_BLACKNESS (1<<10) /// Bitfield of sight flags that show things "inside" the blackness plane diff --git a/code/__HELPERS/_planes.dm b/code/__HELPERS/_planes.dm index d8306c356d4..a7fc3fc7db5 100644 --- a/code/__HELPERS/_planes.dm +++ b/code/__HELPERS/_planes.dm @@ -16,7 +16,7 @@ /// Takes a z reference that we are unsure of, sanity checks it /// Returns either its offset, or 0 if it's not a valid ref -#define GET_TURF_PLANE_OFFSET(z_reference) ((SSmapping.max_plane_offset && isatom(z_reference)) ? GET_Z_PLANE_OFFSET(z_reference.z) : 0) +#define GET_TURF_PLANE_OFFSET(z_reference) ((SSmapping.max_plane_offset && isatom(z_reference) && z_reference.z) ? GET_Z_PLANE_OFFSET(z_reference.z) : 0) /// Essentially just an unsafe version of GET_TURF_PLANE_OFFSET() /// Takes a z value we returns its offset with a list lookup /// Will runtime during parts of init. Be careful :) diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index b4d0a9d7184..9b157b9d7eb 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -14,7 +14,8 @@ screen.update_for_view(client.view) client.screen += screen - SET_PLANE_EXPLICIT(screen, PLANE_TO_TRUE(screen.plane), src) + if(screen.needs_offsetting) + SET_PLANE_EXPLICIT(screen, PLANE_TO_TRUE(screen.plane), src) return screen @@ -66,10 +67,10 @@ /mob/proc/relayer_fullscreens() var/turf/our_lad = get_turf(src) var/offset = GET_TURF_PLANE_OFFSET(our_lad) - var/atom/movable/screen/fullscreen/screen for(var/category in screens) - screen = screens[category] - screen.plane = GET_NEW_PLANE(initial(screen.plane), offset) + var/atom/movable/screen/fullscreen/screen = screens[category] + if(screen.needs_offsetting) + screen.plane = GET_NEW_PLANE(initial(screen.plane), offset) /atom/movable/screen/fullscreen icon = 'icons/hud/screen_full.dmi' @@ -81,6 +82,7 @@ var/view = 7 var/severity = 0 var/show_when_dead = FALSE + var/needs_offsetting = TRUE /atom/movable/screen/fullscreen/proc/update_for_view(client_view) if (screen_loc == "CENTER-7,CENTER-7" && view != client_view) @@ -198,18 +200,17 @@ plane = LIGHTING_PLANE blend_mode = BLEND_OVERLAY show_when_dead = TRUE + needs_offsetting = FALSE //Provides darkness to the back of the lighting plane /atom/movable/screen/fullscreen/lighting_backdrop/lit invisibility = INVISIBILITY_LIGHTING layer = BACKGROUND_LAYER+21 color = "#000" - show_when_dead = TRUE //Provides whiteness in case you don't see lights so everything is still visible /atom/movable/screen/fullscreen/lighting_backdrop/unlit layer = BACKGROUND_LAYER+20 - show_when_dead = TRUE /atom/movable/screen/fullscreen/see_through_darkness icon_state = "nightvision" diff --git a/code/_onclick/hud/rendering/_render_readme.md b/code/_onclick/hud/rendering/_render_readme.md index 8441f398b70..2c1cd559a58 100644 --- a/code/_onclick/hud/rendering/_render_readme.md +++ b/code/_onclick/hud/rendering/_render_readme.md @@ -20,7 +20,7 @@ B) Use the undocumented debug printer which reads of data on icons rendering, th 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. +2. The darkness plane. This is unused, as it doesn't work with our rendering format, so this section is purely academic. 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. 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) diff --git a/code/_onclick/hud/rendering/plane_master.dm b/code/_onclick/hud/rendering/plane_master.dm index 9a37ee05a49..d71c0cfe5ef 100644 --- a/code/_onclick/hud/rendering/plane_master.dm +++ b/code/_onclick/hud/rendering/plane_master.dm @@ -245,6 +245,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master)
If you want something to look as if it has parallax on it, draw it to this plane." plane = PLANE_SPACE appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR + render_relay_planes = list(RENDER_PLANE_GAME, EMISSIVE_MASK_PLANE) critical = PLANE_CRITICAL_FUCKO_PARALLAX // goes funny when touched. no idea why I don't trust byond ///Contains space parallax @@ -312,6 +313,13 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master) name = "Floor" documentation = "The well, floor. This is mostly used as a sorting mechanism, but it also lets us create a \"border\" around the game world plane, so its drop shadow will actually work." plane = FLOOR_PLANE + render_relay_planes = list(RENDER_PLANE_GAME, EMISSIVE_MASK_PLANE) + +/atom/movable/screen/plane_master/wall + name = "Wall" + documentation = "Holds all walls. We render this onto the game world. Separate so we can use this + space and floor planes as a guide for where byond blackness is NOT." + plane = WALL_PLANE + render_relay_planes = list(RENDER_PLANE_GAME_WORLD, EMISSIVE_MASK_PLANE) /atom/movable/screen/plane_master/game name = "Lower game world" @@ -355,6 +363,13 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master) plane = GAME_PLANE_UPPER render_relay_planes = list(RENDER_PLANE_GAME_WORLD) +/atom/movable/screen/plane_master/wall_upper + name = "Upper wall" + documentation = "There are some walls that want to render above most things (mostly minerals since they shift over.\ +
We draw them to their own plane so we can hijack them for our emissive mask stuff" + plane = WALL_PLANE_UPPER + render_relay_planes = list(RENDER_PLANE_GAME_WORLD, EMISSIVE_MASK_PLANE) + /atom/movable/screen/plane_master/game_world_upper_fov_hidden name = "Upper game world fov hidden" documentation = "Just as we need a place to draw things \"above\" the hidden fov plane, we also need to be able to hide stuff that draws over the upper game plane." @@ -381,76 +396,20 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master) render_relay_planes = list(RENDER_PLANE_GAME_WORLD) /** - * Plane master handling byond internal blackness - * vars are set as to replicate behavior when rendering to other planes - * do not touch this unless you know what you are doing + * Plane master that byond will by default draw to + * Shouldn't be used, exists to prevent people using plane 0 + * NOTE: If we used SEE_BLACKNESS on a map format that wasn't SIDE_MAP, this is where its darkness would land + * This would allow us to control it and do fun things. But we can't because side map doesn't support it, so this is just a stub */ -// Blackness renders weird when you view down openspace, because of transforms and borders and such -// This is a consequence of not using lummy's grouped transparency, but I couldn't get that to work without totally fucking up -// Sight flags, and shooting vis_contents usage to the moon. So we're doin it different. -// Look into lessening this, maybe mirror down all the time? idk -// Part of the issue is it isn't actually the blackness plane, it's just normal blackness -// (If image vis contents worked (it should in 515), and we were ok with a maptick cost (wait for threaded maptick)) this could be fixed -/atom/movable/screen/plane_master/blackness - name = "Darkness" +/atom/movable/screen/plane_master/default + name = "Default" documentation = "This is quite fiddly, so bear with me. By default (in byond) everything in the game is rendered onto plane 0. It's the default plane. \
But, because we've moved everything we control off plane 0, all that's left is stuff byond internally renders. \ -
What we're doing here is using plane 0 to capture \"Blackness\", or the mask that hides tiles. Note, this only works if our mob has the SEE_PIXELS or SEE_BLACKNESS sight flags.\ -
We relay this plane master (on plane 0) down to other copies of itself, depending on the layer your mob is on at the moment.\ -
Of note: plane master blackness, and the blackness that comes from having nothing to display look similar, but are not the same thing,\ - mind yourself when you're working with this plane, you might have accidentially been trying to work with the wrong thing." - plane = BLACKNESS_PLANE - appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR - // Note: we don't set this to blend multiply because it just dies when its alpha is modified, because of fun byond bugs - // Marked as multiz_scaled = FALSE because it should not scale, scaling lets you see "through" the floor +
What I'd like to do with this is capture byond blackness by giving mobs the SEE_BLACKNESS sight flag. \ +
But we CAN'T because SEE_BLACKNESS does not work with our rendering format. So I just eat it I guess" + plane = DEFAULT_PLANE multiz_scaled = FALSE - -/atom/movable/screen/plane_master/blackness/show_to(mob/mymob) - . = ..() - if(!.) - return - if(offset != 0) - // You aren't the source? don't change yourself - return - RegisterSignal(mymob, COMSIG_MOB_SIGHT_CHANGE, PROC_REF(handle_sight_value)) - handle_sight_value(mymob, mymob.sight, 0) - var/datum/hud/hud = home.our_hud - if(hud) - RegisterSignal(hud, COMSIG_HUD_OFFSET_CHANGED, PROC_REF(on_offset_change)) - offset_change(0, hud?.current_plane_offset || 0) - -/atom/movable/screen/plane_master/blackness/hide_from(mob/oldmob) - . = ..() - if(offset != 0) - return - UnregisterSignal(oldmob, COMSIG_MOB_SIGHT_CHANGE) - var/datum/hud/hud = home.our_hud - if(hud) - UnregisterSignal(hud, COMSIG_HUD_OFFSET_CHANGED, PROC_REF(on_offset_change)) - -/// Reacts to some new plane master value -/atom/movable/screen/plane_master/blackness/proc/handle_sight_value(datum/source, new_sight, old_sight) - SIGNAL_HANDLER - // Tryin to set a sight flag that cuts blackness eh? - if(new_sight & BLACKNESS_CUTTING) - // Better set alpha then, so it'll actually work - // We just get the one because there is only one blackness PM, it's just mirrored around - disable_alpha() - else - enable_alpha() - -/atom/movable/screen/plane_master/blackness/proc/on_offset_change(datum/source, old_offset, new_offset) - SIGNAL_HANDLER - offset_change(old_offset, new_offset) - -/atom/movable/screen/plane_master/blackness/proc/offset_change(old_offset, new_offset) - // Basically, the rule here is the blackness we harvest from the mob using the SEE_BLACKNESS flag will be relayed to the darkness - // Plane that we're actually on - if(old_offset != 0) // If our old target wasn't just ourselves - remove_relay_from(GET_NEW_PLANE(plane, old_offset)) - - if(new_offset != 0) - add_relay_to(GET_NEW_PLANE(plane, new_offset)) + start_hidden = TRUE // Doesn't DO anything, exists to hold this place /atom/movable/screen/plane_master/area name = "Area" @@ -520,7 +479,8 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master) /atom/movable/screen/plane_master/emissive/Initialize(mapload) . = ..() - add_filter("em_block_masking", 1, color_matrix_filter(GLOB.em_mask_matrix)) + add_filter("emissive_mask", 1, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(EMISSIVE_MASK_RENDER_TARGET, offset))) + add_filter("em_block_masking", 2, color_matrix_filter(GLOB.em_mask_matrix)) /atom/movable/screen/plane_master/pipecrawl name = "Pipecrawl" diff --git a/code/_onclick/hud/rendering/plane_master_controller.dm b/code/_onclick/hud/rendering/plane_master_controller.dm index 58fc1bb9963..ff2c6853fa6 100644 --- a/code/_onclick/hud/rendering/plane_master_controller.dm +++ b/code/_onclick/hud/rendering/plane_master_controller.dm @@ -1,4 +1,6 @@ ///Atom that manages and controls multiple planes. It's an atom so we can hook into add_filter etc. Multiple controllers can control one plane. +///Of note: plane master controllers are currently not very extensively used, because render plates fill a semi similar niche +///This could well change someday, and I'd like to keep this stuff around, so we use it for a few cases just out of convenience /atom/movable/plane_master_controller ///List of planes as defines in this controllers control var/list/controlled_planes = list() @@ -77,49 +79,17 @@ INITIALIZE_IMMEDIATE(/atom/movable/plane_master_controller) pm_iterator.update_atom_colour() +/// Exists for convienience when referencing all game render plates /atom/movable/plane_master_controller/game name = PLANE_MASTERS_GAME controlled_planes = list( - FLOOR_PLANE, - RENDER_PLANE_TRANSPARENT, - GAME_PLANE, - GAME_PLANE_FOV_HIDDEN, - GAME_PLANE_UPPER, - GAME_PLANE_UPPER_FOV_HIDDEN, - ABOVE_GAME_PLANE, - MASSIVE_OBJ_PLANE, - GHOST_PLANE, - POINT_PLANE, - LIGHTING_PLANE, - AREA_PLANE, + RENDER_PLANE_GAME ) -/// Controller of all planes we're ok with changing with colorblind logic +/// Exists for convienience when referencing all game render plates /atom/movable/plane_master_controller/colorblind name = PLANE_MASTERS_COLORBLIND controlled_planes = list( - PLANE_SPACE_PARALLAX, - GRAVITY_PULSE_PLANE, - FLOOR_PLANE, - GAME_PLANE, - GAME_PLANE_FOV_HIDDEN, - GAME_PLANE_UPPER, - GAME_PLANE_UPPER_FOV_HIDDEN, - SEETHROUGH_PLANE, - ABOVE_GAME_PLANE, - MASSIVE_OBJ_PLANE, - GHOST_PLANE, - POINT_PLANE, - LIGHTING_PLANE, - O_LIGHTING_VISUAL_PLANE, - ABOVE_LIGHTING_PLANE, - CAMERA_STATIC_PLANE, - PIPECRAWL_IMAGES_PLANE, - HIGH_GAME_PLANE, - FULLSCREEN_PLANE, - RUNECHAT_PLANE, - HUD_PLANE, - ABOVE_HUD_PLANE, - AREA_PLANE, + RENDER_PLANE_MASTER ) diff --git a/code/_onclick/hud/rendering/render_plate.dm b/code/_onclick/hud/rendering/render_plate.dm index 47c1c495382..ccb4b809ee4 100644 --- a/code/_onclick/hud/rendering/render_plate.dm +++ b/code/_onclick/hud/rendering/render_plate.dm @@ -79,6 +79,10 @@ . = ..() add_filter("displacer", 1, displacement_map_filter(render_source = OFFSET_RENDER_TARGET(GRAVITY_PULSE_RENDER_TARGET, offset), size = 10)) +// Blackness renders weird when you view down openspace, because of transforms and borders and such +// This is a consequence of not using lummy's grouped transparency, but I couldn't get that to work without totally fucking up +// Sight flags, and shooting vis_contents usage to the moon. So we're doin it different. +// If image vis contents worked (it should in 515), and we were ok with a maptick cost (wait for threaded maptick) this could be fixed /atom/movable/screen/plane_master/rendering_plate/transparent name = "Transparent plate" documentation = "The master rendering plate from the offset below ours will be mirrored onto this plane. That way we achive a \"stack\" effect.\ @@ -123,6 +127,21 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT critical = PLANE_CRITICAL_DISPLAY +/*! + * This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers. + * + * Emissive overlays are pasted with an atom color that converts them to be entirely some specific color. + * Emissive blockers are pasted with an atom color that converts them to be entirely some different color. + * Emissive overlays and emissive blockers are put onto the same plane. + * The layers for the emissive overlays and emissive blockers cause them to mask eachother similar to normal BYOND objects. + * A color matrix filter is applied to the emissive plane to mask out anything that isn't whatever the emissive color is. + * This is then used to alpha mask the lighting plane. + */ +/atom/movable/screen/plane_master/rendering_plate/lighting/Initialize(mapload) + . = ..() + add_filter("emissives", 1, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(EMISSIVE_RENDER_TARGET, offset), flags = MASK_INVERSE)) + add_filter("object_lighting", 2, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(O_LIGHTING_VISUAL_RENDER_TARGET, offset), flags = MASK_INVERSE)) + /atom/movable/screen/plane_master/rendering_plate/lighting/show_to(mob/mymob) . = ..() if(!.) @@ -164,20 +183,17 @@ else enable_alpha() -/*! - * This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers. - * - * Emissive overlays are pasted with an atom color that converts them to be entirely some specific color. - * Emissive blockers are pasted with an atom color that converts them to be entirely some different color. - * Emissive overlays and emissive blockers are put onto the same plane. - * The layers for the emissive overlays and emissive blockers cause them to mask eachother similar to normal BYOND objects. - * A color matrix filter is applied to the emissive plane to mask out anything that isn't whatever the emissive color is. - * This is then used to alpha mask the lighting plane. - */ -/atom/movable/screen/plane_master/rendering_plate/lighting/Initialize(mapload) - . = ..() - add_filter("emissives", 1, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(EMISSIVE_RENDER_TARGET, offset), flags = MASK_INVERSE)) - add_filter("object_lighting", 2, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(O_LIGHTING_VISUAL_RENDER_TARGET, offset), flags = MASK_INVERSE)) +/atom/movable/screen/plane_master/rendering_plate/mask_emissive + name = "Emissive Mask" + documentation = "Any part of this plane that is transparent will be transparent in the emissive plane.\ +
This is done to ensure emissives don't light things up \"through\" the darkness that normally sits at the bottom of the lighting plane.\ +
We relay copies of the space, floor and wall planes to it, so we can use them as masks. Then we just boost any existing alpha to 100% and we're done." + plane = EMISSIVE_MASK_PLANE + appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR + color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,255, 0,0,0,0) + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + render_target = EMISSIVE_MASK_RENDER_TARGET + render_relay_planes = list() ///render plate for OOC stuff like ghosts, hud-screen effects, etc /atom/movable/screen/plane_master/rendering_plate/non_game diff --git a/code/datums/actions/mobs/adjust_vision.dm b/code/datums/actions/mobs/adjust_vision.dm index a54688a2eb9..f595ef3e4b3 100644 --- a/code/datums/actions/mobs/adjust_vision.dm +++ b/code/datums/actions/mobs/adjust_vision.dm @@ -35,5 +35,4 @@ living_owner.lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE else living_owner.lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE - living_owner.sight &= ~SEE_BLACKNESS living_owner.update_sight() diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm index 1ed20540b45..3d2af7012b9 100644 --- a/code/datums/brain_damage/imaginary_friend.dm +++ b/code/datums/brain_damage/imaginary_friend.dm @@ -62,7 +62,7 @@ desc = "A wonderful yet fake friend." see_in_dark = 0 lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE - sight = SEE_BLACKNESS + sight = NONE mouse_opacity = MOUSE_OPACITY_ICON see_invisible = SEE_INVISIBLE_LIVING invisibility = INVISIBILITY_MAXIMUM diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 5586121f08e..d5beaecf1b0 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -133,6 +133,9 @@ qdel(overlay) var/obj/effect/overlay/status_display_text/new_status_display_text = new(src, line_y, message, text_color, header_text_color) + // Draw our object visually "in front" of this display, taking advantage of sidemap + new_status_display_text.pixel_y = -32 + new_status_display_text.pixel_z = 32 vis_contents += new_status_display_text return new_status_display_text diff --git a/code/game/objects/effects/decals/decal.dm b/code/game/objects/effects/decals/decal.dm index a4cf5dfa465..2c4e3fc164d 100644 --- a/code/game/objects/effects/decals/decal.dm +++ b/code/game/objects/effects/decals/decal.dm @@ -34,6 +34,7 @@ /obj/effect/turf_decal icon = 'icons/turf/decals.dmi' icon_state = "warningline" + plane = FLOOR_PLANE layer = TURF_DECAL_LAYER anchored = TRUE diff --git a/code/game/turfs/closed/_closed.dm b/code/game/turfs/closed/_closed.dm index 7f12b5481b1..668a8bb33c9 100644 --- a/code/game/turfs/closed/_closed.dm +++ b/code/game/turfs/closed/_closed.dm @@ -1,5 +1,6 @@ /turf/closed layer = CLOSED_TURF_LAYER + plane = WALL_PLANE turf_flags = IS_SOLID opacity = TRUE density = TRUE diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm index b8688357ba9..e49952ab4ca 100644 --- a/code/game/turfs/closed/minerals.dm +++ b/code/game/turfs/closed/minerals.dm @@ -12,7 +12,7 @@ opacity = TRUE density = TRUE layer = EDGED_TURF_LAYER - plane = GAME_PLANE_UPPER + plane = WALL_PLANE_UPPER base_icon_state = "smoothrocks" // This is static @@ -669,7 +669,7 @@ /turf/closed/mineral/gibtonite/proc/explosive_reaction(mob/user = null) if(stage == GIBTONITE_UNSTRUCK) activated_overlay = mutable_appearance('icons/turf/smoothrocks.dmi', "rock_Gibtonite_inactive", ON_EDGED_TURF_LAYER) //shows in gaps between pulses if there are any - SET_PLANE(activated_overlay, GAME_PLANE_UPPER, src) + SET_PLANE(activated_overlay, WALL_PLANE_UPPER, src) add_overlay(activated_overlay) name = "gibtonite deposit" desc = "An active gibtonite reserve. Run!" diff --git a/code/game/turfs/open/floor/reinforced_floor.dm b/code/game/turfs/open/floor/reinforced_floor.dm index f58172e4ceb..d006e38819a 100644 --- a/code/game/turfs/open/floor/reinforced_floor.dm +++ b/code/game/turfs/open/floor/reinforced_floor.dm @@ -193,7 +193,7 @@ desc = "The air smells strange over this sinister flooring." icon_state = "cult" floor_tile = null - var/obj/effect/cult_turf/overlay/floor/bloodcult/realappearance + var/obj/effect/cult_turf/realappearance /turf/open/floor/engine/cult/Initialize(mapload) @@ -203,7 +203,7 @@ if (!mapload) new /obj/effect/temp_visual/cult/turf/floor(src) - realappearance = new /obj/effect/cult_turf/overlay/floor/bloodcult(src) + realappearance = new /obj/effect/cult_turf(src) realappearance.linked = src /turf/open/floor/engine/cult/Destroy() diff --git a/code/modules/antagonists/cult/cult_turf_overlay.dm b/code/modules/antagonists/cult/cult_turf_overlay.dm index 5bc4474c880..e2324b5f933 100644 --- a/code/modules/antagonists/cult/cult_turf_overlay.dm +++ b/code/modules/antagonists/cult/cult_turf_overlay.dm @@ -1,28 +1,24 @@ -//an "overlay" used by clockwork walls and floors to appear normal to mesons. -/obj/effect/cult_turf/overlay +//an "overlay" used by cult walls and floors to appear normal to mesons. +/obj/effect/cult_turf + icon = 'icons/turf/floors.dmi' + icon_state = "cult" + plane = FLOOR_PLANE + layer = CULT_OVERLAY_LAYER mouse_opacity = MOUSE_OPACITY_TRANSPARENT anchored = TRUE var/atom/linked -/obj/effect/cult_turf/overlay/examine(mob/user) +/obj/effect/cult_turf/examine(mob/user) if(linked) linked.examine(user) -/obj/effect/cult_turf/overlay/singularity_act() +/obj/effect/cult_turf/singularity_act() return -/obj/effect/cult_turf/overlay/singularity_pull() +/obj/effect/cult_turf/singularity_pull() return -/obj/effect/cult_turf/overlay/Destroy() +/obj/effect/cult_turf/Destroy() if(linked) linked = null . = ..() - -/obj/effect/cult_turf/overlay/floor - icon = 'icons/turf/floors.dmi' - icon_state = "clockwork_floor" - layer = CULT_OVERLAY_LAYER - -/obj/effect/cult_turf/overlay/floor/bloodcult - icon_state = "cult" diff --git a/code/modules/antagonists/disease/disease_mob.dm b/code/modules/antagonists/disease/disease_mob.dm index 1bdab40d402..5e6ed7222ce 100644 --- a/code/modules/antagonists/disease/disease_mob.dm +++ b/code/modules/antagonists/disease/disease_mob.dm @@ -20,7 +20,7 @@ the new instance inside the host to be updated to the template's stats. see_invisible = SEE_INVISIBLE_LIVING layer = BELOW_MOB_LAYER lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE - sight = SEE_SELF|SEE_THRU|SEE_BLACKNESS + sight = SEE_SELF|SEE_THRU initial_language_holder = /datum/language_holder/universal var/freemove = TRUE diff --git a/code/modules/antagonists/heretic/mobs/maid_in_mirror.dm b/code/modules/antagonists/heretic/mobs/maid_in_mirror.dm index 176acfd103b..8d5e57685b9 100644 --- a/code/modules/antagonists/heretic/mobs/maid_in_mirror.dm +++ b/code/modules/antagonists/heretic/mobs/maid_in_mirror.dm @@ -14,7 +14,7 @@ health = 80 melee_damage_lower = 12 melee_damage_upper = 16 - sight = SEE_MOBS | SEE_OBJS | SEE_TURFS | SEE_BLACKNESS + sight = SEE_MOBS | SEE_OBJS | SEE_TURFS death_message = "shatters and vanishes, releasing a gust of cold air." loot = list( /obj/item/shard, diff --git a/code/modules/antagonists/revenant/revenant.dm b/code/modules/antagonists/revenant/revenant.dm index 7fc9a10642a..acb8709bd34 100644 --- a/code/modules/antagonists/revenant/revenant.dm +++ b/code/modules/antagonists/revenant/revenant.dm @@ -20,7 +20,7 @@ maxHealth = INFINITY plane = GHOST_PLANE healable = FALSE - sight = SEE_SELF | SEE_BLACKNESS + sight = SEE_SELF throwforce = 0 see_in_dark = NIGHTVISION_FOV_RANGE diff --git a/code/modules/food_and_drinks/plate.dm b/code/modules/food_and_drinks/plate.dm index 5a1af43a15c..7f417d28862 100644 --- a/code/modules/food_and_drinks/plate.dm +++ b/code/modules/food_and_drinks/plate.dm @@ -48,6 +48,11 @@ item_to_plate.vis_flags |= VIS_INHERIT_PLANE RegisterSignal(item_to_plate, COMSIG_MOVABLE_MOVED, PROC_REF(ItemMoved)) RegisterSignal(item_to_plate, COMSIG_PARENT_QDELETING, PROC_REF(ItemMoved)) + // We gotta offset ourselves via pixel_w/z, so we don't end up z fighting with the plane + item_to_plate.pixel_w = item_to_plate.pixel_x + item_to_plate.pixel_z = item_to_plate.pixel_y + item_to_plate.pixel_x = 0 + item_to_plate.pixel_y = 0 update_appearance() ///This proc cleans up any signals on the item when it is removed from a plate, and ensures it has the correct state again. @@ -56,6 +61,11 @@ removed_item.vis_flags &= ~VIS_INHERIT_PLANE vis_contents -= removed_item UnregisterSignal(removed_item, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING)) + // Resettt + removed_item.pixel_x = removed_item.pixel_w + removed_item.pixel_y = removed_item.pixel_z + removed_item.pixel_w = 0 + removed_item.pixel_z = 0 ///This proc is called by signals that remove the food from the plate. /obj/item/plate/proc/ItemMoved(obj/item/moved_item, atom/OldLoc, Dir, Forced) diff --git a/code/modules/hallucination/bubblegum_attack.dm b/code/modules/hallucination/bubblegum_attack.dm index 921bf09b361..5ee39ed8e86 100644 --- a/code/modules/hallucination/bubblegum_attack.dm +++ b/code/modules/hallucination/bubblegum_attack.dm @@ -37,8 +37,10 @@ if(hallucinator.client) fake_broken_wall = image('icons/turf/floors.dmi', wall_source, "plating", layer = TURF_LAYER) + SET_PLANE_EXPLICIT(fake_broken_wall, FLOOR_PLANE, wall_source) fake_broken_wall.override = TRUE fake_rune = image('icons/effects/96x96.dmi', target_landing_image_turf, "landing", layer = ABOVE_OPEN_TURF_LAYER) + SET_PLANE_EXPLICIT(fake_rune, FLOOR_PLANE, wall_source) hallucinator.client?.images |= fake_broken_wall hallucinator.client?.images |= fake_rune diff --git a/code/modules/mapfluff/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/mapfluff/ruins/objects_and_mobs/necropolis_gate.dm index 67c02c412ed..8d7ed7e6f2f 100644 --- a/code/modules/mapfluff/ruins/objects_and_mobs/necropolis_gate.dm +++ b/code/modules/mapfluff/ruins/objects_and_mobs/necropolis_gate.dm @@ -249,6 +249,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate) name = "stone tile" icon = 'icons/turf/boss_floors.dmi' icon_state = "pristine_tile1" + plane = FLOOR_PLANE layer = ABOVE_OPEN_TURF_LAYER anchored = TRUE resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm index 1a68768b85c..851fac29028 100644 --- a/code/modules/mob/camera/camera.dm +++ b/code/modules/mob/camera/camera.dm @@ -8,7 +8,7 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT see_in_dark = 7 invisibility = INVISIBILITY_ABSTRACT // No one can see us - sight = SEE_SELF | SEE_BLACKNESS + sight = SEE_SELF move_on_shuttle = FALSE /// Toggles if the camera can use emotes var/has_emotes = FALSE diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index cddc12fe3d9..d1822221d2b 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -3,7 +3,7 @@ INITIALIZE_IMMEDIATE(/mob/dead) /mob/dead - sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF | SEE_BLACKNESS + sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF move_resist = INFINITY throwforce = 0 diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 280bf41c97b..f35c2f6bc1b 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -4,7 +4,7 @@ gender = FEMALE //All xenos are girls!! dna = null faction = list(ROLE_ALIEN) - sight = SEE_MOBS | SEE_BLACKNESS + sight = SEE_MOBS see_in_dark = 4 verb_say = "hisses" initial_language_holder = /datum/language_holder/alien diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 9ae02310ecc..04d11950faf 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -620,7 +620,7 @@ set_invis_see(see_override) if(SSmapping.level_trait(z, ZTRAIT_NOXRAY)) - new_sight = SEE_BLACKNESS + new_sight = NONE set_sight(new_sight) return ..() diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index fbee0dea003..f092f7f68cd 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -1,6 +1,5 @@ /mob/living see_invisible = SEE_INVISIBLE_LIVING - sight = SEE_BLACKNESS see_in_dark = 2 hud_possible = list(HEALTH_HUD,STATUS_HUD,ANTAG_HUD) pressure_resistance = 10 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 786ec7f4fa0..f6df60b125c 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -21,7 +21,7 @@ density = TRUE status_flags = CANSTUN|CANPUSH combat_mode = TRUE //so we always get pushed instead of trying to swap - sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_BLACKNESS + sight = SEE_TURFS | SEE_MOBS | SEE_OBJS see_in_dark = NIGHTVISION_FOV_RANGE hud_type = /datum/hud/ai med_hud = DATA_HUD_MEDICAL_BASIC diff --git a/code/modules/mob/living/silicon/ai/ai_portrait_picker.dm b/code/modules/mob/living/silicon/ai/ai_portrait_picker.dm index b64c0e38996..15f64a026ac 100644 --- a/code/modules/mob/living/silicon/ai/ai_portrait_picker.dm +++ b/code/modules/mob/living/silicon/ai/ai_portrait_picker.dm @@ -77,11 +77,11 @@ if(w == 23 || h == 23) to_chat(ai, span_notice("Small note: 23x23 Portraits are accepted, but they do not fit perfectly inside the display frame.")) MA.pixel_x = 5 - MA.pixel_y = 5 + MA.pixel_z = 5 else if(w == 24 || h == 24) to_chat(ai, span_notice("Portrait Accepted. Enjoy!")) MA.pixel_x = 4 - MA.pixel_y = 4 + MA.pixel_z = 4 else to_chat(ai, span_warning("Sorry, only 23x23 and 24x24 Portraits are accepted.")) return diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 4575f710591..34c9817606e 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -404,7 +404,7 @@ icon_living = "harvester" maxHealth = 40 health = 40 - sight = SEE_MOBS | SEE_BLACKNESS + sight = SEE_MOBS melee_damage_lower = 15 melee_damage_upper = 20 attack_verb_continuous = "butchers" diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm index e1a83da81b2..c4e4f550ae1 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm @@ -30,7 +30,7 @@ healable = 0 density = FALSE pass_flags = PASSTABLE | PASSMOB - sight = SEE_TURFS | SEE_OBJS| SEE_BLACKNESS + sight = SEE_TURFS | SEE_OBJS status_flags = (CANPUSH | CANSTUN | CANKNOCKDOWN) gender = NEUTER mob_biotypes = MOB_ROBOTIC diff --git a/code/modules/mob/living/simple_animal/guardian/types/support.dm b/code/modules/mob/living/simple_animal/guardian/types/support.dm index 841ab3b5446..aa3f44b3004 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/support.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/support.dm @@ -96,6 +96,7 @@ light_range = MINIMUM_USEFUL_LIGHT_RANGE density = FALSE anchored = TRUE + plane = FLOOR_PLANE layer = ABOVE_OPEN_TURF_LAYER /obj/structure/receiving_pad/New(loc, mob/living/simple_animal/hostile/guardian/healer/G) diff --git a/code/modules/mob/living/simple_animal/heretic_monsters.dm b/code/modules/mob/living/simple_animal/heretic_monsters.dm index a4e7c5ca416..dcd61f1b584 100644 --- a/code/modules/mob/living/simple_animal/heretic_monsters.dm +++ b/code/modules/mob/living/simple_animal/heretic_monsters.dm @@ -53,7 +53,7 @@ melee_damage_upper = 10 maxHealth = 65 health = 65 - sight = SEE_MOBS|SEE_OBJS|SEE_TURFS|SEE_BLACKNESS + sight = SEE_MOBS|SEE_OBJS|SEE_TURFS loot = list(/obj/effect/gibspawner/human, /obj/item/bodypart/arm/left, /obj/item/organ/internal/eyes) actions_to_add = list( /datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash/long, @@ -357,7 +357,7 @@ health = 75 melee_damage_lower = 15 melee_damage_upper = 20 - sight = SEE_TURFS|SEE_BLACKNESS + sight = SEE_TURFS actions_to_add = list( /datum/action/cooldown/spell/aoe/rust_conversion/small, /datum/action/cooldown/spell/basic_projectile/rust_wave/short, @@ -397,7 +397,7 @@ health = 75 melee_damage_lower = 15 melee_damage_upper = 20 - sight = SEE_TURFS|SEE_BLACKNESS + sight = SEE_TURFS actions_to_add = list( /datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash, /datum/action/cooldown/spell/pointed/cleave, @@ -415,7 +415,7 @@ health = 150 melee_damage_lower = 15 melee_damage_upper = 20 - sight = SEE_MOBS|SEE_BLACKNESS + sight = SEE_MOBS actions_to_add = list( /datum/action/cooldown/spell/shapeshift/eldritch, /datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash, diff --git a/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm b/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm index 713120b84a7..f2878850936 100644 --- a/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm +++ b/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm @@ -171,7 +171,7 @@ /obj/effect/temp_visual/paper_scatter name = "scattering paper" desc = "Pieces of paper scattering to the wind." - layer = ABOVE_OPEN_TURF_LAYER + layer = ABOVE_NORMAL_TURF_LAYER plane = GAME_PLANE icon = 'icons/effects/effects.dmi' icon_state = "paper_scatter" @@ -182,7 +182,7 @@ /obj/effect/temp_visual/paperwiz_dying name = "craft portal" desc = "A wormhole sucking the wizard into the void. Neat." - layer = ABOVE_OPEN_TURF_LAYER + layer = ABOVE_NORMAL_TURF_LAYER plane = GAME_PLANE icon = 'icons/effects/effects.dmi' icon_state = "paperwiz_poof" diff --git a/code/modules/mob/living/simple_animal/hostile/eyeballs.dm b/code/modules/mob/living/simple_animal/hostile/eyeballs.dm index d771236797a..bc84e60936c 100644 --- a/code/modules/mob/living/simple_animal/hostile/eyeballs.dm +++ b/code/modules/mob/living/simple_animal/hostile/eyeballs.dm @@ -32,7 +32,7 @@ faction = list("spooky") del_on_death = 1 lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE - sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS|SEE_BLACKNESS + sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS /mob/living/simple_animal/hostile/eyeball/Initialize(mapload) . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 0f4fc1a787c..3ff0a3a19ee 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -46,7 +46,7 @@ search_objects = 1 // So that it can see through walls - sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS|SEE_BLACKNESS + sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS move_force = MOVE_FORCE_EXTREMELY_STRONG move_resist = MOVE_FORCE_EXTREMELY_STRONG diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm index 01f3f96edc4..5500b4bfd29 100644 --- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm +++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm @@ -145,7 +145,7 @@ atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) unsuitable_atmos_damage = 0 /// copied over from the code from eyeballs (the mob) to make it easier for venus human traps to see in kudzu that doesn't have the transparency mutation - sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS|SEE_BLACKNESS + sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE faction = list("hostile","vines","plants") initial_language_holder = /datum/language_holder/venus diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index 46ada131802..74d5d019aea 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -106,9 +106,6 @@ /// See [code\__DEFINES\sight.dm] for more details /mob/proc/set_sight(new_value) SHOULD_CALL_PARENT(TRUE) - // Can't turn this off, because we need it to make a plane master we need exist - // Sorry brother - new_value |= SEE_BLACKNESS if(sight == new_value) return var/old_sight = sight @@ -136,7 +133,7 @@ /// see_in_dark is essentially just a range value /// Basically, if a tile has 0 luminosity affecting it, it will be counted as "dark" /// Then, if said tile is farther then see_in_dark from your mob, it will, rather then being rendered -/// As a normal tile with contents, instead be covered by "darkness", the same sort exposed by SEE_BLACKNESS +/// As a normal tile with contents, instead be covered by "darkness". This effectively means it gets masked away, we don't even try to draw it. /// You can see this effect by going somewhere dark, and cranking the alpha on the lighting plane to 0 /mob/proc/set_see_in_dark(new_dark) SHOULD_CALL_PARENT(TRUE) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 1fcea0897f7..0e5f348b29c 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -1,7 +1,7 @@ #define SOLAR_GEN_RATE 1500 #define OCCLUSION_DISTANCE 20 -#define PANEL_Y_OFFSET 13 -#define PANEL_EDGE_Y_OFFSET (PANEL_Y_OFFSET - 2) +#define PANEL_Z_OFFSET 13 +#define PANEL_EDGE_Z_OFFSET (PANEL_Z_OFFSET - 2) /obj/machinery/power/solar name = "solar panel" @@ -33,8 +33,8 @@ /obj/machinery/power/solar/Initialize(mapload, obj/item/solar_assembly/S) . = ..() - panel_edge = add_panel_overlay("solar_panel_edge", PANEL_EDGE_Y_OFFSET) - panel = add_panel_overlay("solar_panel", PANEL_Y_OFFSET) + panel_edge = add_panel_overlay("solar_panel_edge", PANEL_EDGE_Z_OFFSET) + panel = add_panel_overlay("solar_panel", PANEL_Z_OFFSET) Make(S) connect_to_network() @@ -51,14 +51,14 @@ SET_PLANE(panel_edge, PLANE_TO_TRUE(panel_edge.plane), new_turf) SET_PLANE(panel, PLANE_TO_TRUE(panel.plane), new_turf) -/obj/machinery/power/solar/proc/add_panel_overlay(icon_state, y_offset) +/obj/machinery/power/solar/proc/add_panel_overlay(icon_state, z_offset) var/obj/effect/overlay/overlay = new() overlay.vis_flags = VIS_INHERIT_ID | VIS_INHERIT_ICON overlay.appearance_flags = TILE_BOUND overlay.icon_state = icon_state overlay.layer = FLY_LAYER SET_PLANE_EXPLICIT(overlay, ABOVE_GAME_PLANE, src) - overlay.pixel_y = y_offset + overlay.pixel_z = z_offset vis_contents += overlay return overlay @@ -559,5 +559,5 @@ #undef SOLAR_GEN_RATE #undef OCCLUSION_DISTANCE -#undef PANEL_Y_OFFSET -#undef PANEL_EDGE_Y_OFFSET +#undef PANEL_Z_OFFSET +#undef PANEL_EDGE_Z_OFFSET diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index 3242144235a..7a5fa92ece3 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -1,5 +1,5 @@ -#define TRACKER_Y_OFFSET 13 -#define TRACKER_EDGE_Y_OFFSET (TRACKER_Y_OFFSET - 2) +#define TRACKER_Z_OFFSET 13 +#define TRACKER_EDGE_Z_OFFSET (TRACKER_Z_OFFSET - 2) //Solar tracker @@ -25,8 +25,8 @@ /obj/machinery/power/tracker/Initialize(mapload, obj/item/solar_assembly/S) . = ..() - tracker_dish_edge = add_panel_overlay("tracker_edge", TRACKER_EDGE_Y_OFFSET) - tracker_dish = add_panel_overlay("tracker", TRACKER_Y_OFFSET) + tracker_dish_edge = add_panel_overlay("tracker_edge", TRACKER_EDGE_Z_OFFSET) + tracker_dish = add_panel_overlay("tracker", TRACKER_Z_OFFSET) Make(S) connect_to_network() @@ -43,14 +43,14 @@ SET_PLANE(tracker_dish_edge, PLANE_TO_TRUE(tracker_dish_edge.plane), new_turf) SET_PLANE(tracker_dish, PLANE_TO_TRUE(tracker_dish.plane), new_turf) -/obj/machinery/power/tracker/proc/add_panel_overlay(icon_state, y_offset) +/obj/machinery/power/tracker/proc/add_panel_overlay(icon_state, z_offset) var/obj/effect/overlay/overlay = new() overlay.vis_flags = VIS_INHERIT_ID | VIS_INHERIT_ICON overlay.appearance_flags = TILE_BOUND overlay.icon_state = icon_state overlay.layer = FLY_LAYER SET_PLANE_EXPLICIT(overlay, ABOVE_GAME_PLANE, src) - overlay.pixel_y = y_offset + overlay.pixel_y = z_offset vis_contents += overlay return overlay @@ -152,5 +152,5 @@ /obj/item/electronics/tracker name = "tracker electronics" -#undef TRACKER_Y_OFFSET -#undef TRACKER_EDGE_Y_OFFSET +#undef TRACKER_Z_OFFSET +#undef TRACKER_EDGE_Z_OFFSET diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index b05a40e88da..e2c9811370b 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -195,7 +195,7 @@ var/image/I = V var/image/newI = image('icons/effects/alphacolors.dmi', the_eye.loc, "blue") newI.loc = I.loc //It is highly unlikely that any landing spot including a null tile will get this far, but better safe than sorry. - newI.layer = ABOVE_OPEN_TURF_LAYER + newI.layer = NAVIGATION_EYE_LAYER SET_PLANE_EXPLICIT(newI, ABOVE_GAME_PLANE, V) newI.mouse_opacity = 0 the_eye.placed_images += newI diff --git a/code/world.dm b/code/world.dm index 71a9853d01f..af3cdf80e70 100644 --- a/code/world.dm +++ b/code/world.dm @@ -19,6 +19,7 @@ hub_password = "kMZy3U5jJHSiBQjr" name = "/tg/ Station 13" fps = 20 + map_format = SIDE_MAP #ifdef FIND_REF_NO_CHECK_TICK loop_checks = FALSE #endif diff --git a/modular_skyrat/modules/liquids/code/liquid_systems/liquid_effect.dm b/modular_skyrat/modules/liquids/code/liquid_systems/liquid_effect.dm index ed7bdb8104e..2ee35d8c403 100644 --- a/modular_skyrat/modules/liquids/code/liquid_systems/liquid_effect.dm +++ b/modular_skyrat/modules/liquids/code/liquid_systems/liquid_effect.dm @@ -604,7 +604,7 @@ smoothing_flags = NONE icon_state = "ocean" base_icon_state = "ocean" - plane = BLACKNESS_PLANE //Same as weather, etc. + plane = DEFAULT_PLANE //Same as weather, etc. layer = ABOVE_MOB_LAYER starting_temp = T20C-150 no_effects = TRUE