diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 0cdad4f7241..1ba6879005b 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -2,35 +2,31 @@ //KEEP THESE IN A NICE ACSCENDING ORDER, PLEASE //NEVER HAVE ANYTHING BELOW THIS PLANE ADJUST IF YOU NEED MORE SPACE -#define LOWEST_EVER_PLANE -100 +#define LOWEST_EVER_PLANE -50 -#define FIELD_OF_VISION_BLOCKER_PLANE -90 +// Doesn't really layer, just throwing this in here cause it's the best place imo +#define FIELD_OF_VISION_BLOCKER_PLANE -45 #define FIELD_OF_VISION_BLOCKER_RENDER_TARGET "*FIELD_OF_VISION_BLOCKER_RENDER_TARGET" -#define CLICKCATCHER_PLANE -80 +#define CLICKCATCHER_PLANE -40 -#define PLANE_SPACE -25 +#define PLANE_SPACE -21 #define PLANE_SPACE_PARALLAX -20 -#define GRAVITY_PULSE_PLANE -13 +#define GRAVITY_PULSE_PLANE -12 #define GRAVITY_PULSE_RENDER_TARGET "*GRAVPULSE_RENDER_TARGET" -#define RENDER_PLANE_TRANSPARENT -12 //Transparent plane that shows openspace underneath the floor +#define RENDER_PLANE_TRANSPARENT -11 //Transparent plane that shows openspace underneath the floor -#define TRANSPARENT_FLOOR_PLANE -11 +#define TRANSPARENT_FLOOR_PLANE -10 -#define FLOOR_PLANE -10 - -#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 +#define FLOOR_PLANE -6 +#define WALL_PLANE -5 +#define GAME_PLANE -4 +#define ABOVE_GAME_PLANE -3 ///Slightly above the game plane but does not catch mouse clicks. Useful for certain visuals that should be clicked through, like seethrough trees -#define SEETHROUGH_PLANE -3 -#define ABOVE_GAME_PLANE -2 +#define SEETHROUGH_PLANE -2 #define RENDER_PLANE_GAME_WORLD -1 @@ -91,31 +87,36 @@ //-------------------- HUD --------------------- //HUD layer defines -#define HUD_PLANE 40 -#define ABOVE_HUD_PLANE 41 +#define HUD_PLANE 35 +#define ABOVE_HUD_PLANE 36 ///Plane of the "splash" icon used that shows on the lobby screen -#define SPLASHSCREEN_PLANE 50 +#define SPLASHSCREEN_PLANE 37 // The largest plane here must still be less than RENDER_PLANE_GAME //-------------------- Rendering --------------------- -#define RENDER_PLANE_GAME 100 -#define RENDER_PLANE_NON_GAME 101 +#define RENDER_PLANE_GAME 40 +/// If fov is enabled we'll draw game to this and do shit to it +#define RENDER_PLANE_GAME_MASKED 41 +/// The bit of the game plane that is let alone is sent here +#define RENDER_PLANE_GAME_UNMASKED 42 +#define RENDER_PLANE_NON_GAME 45 // Only VERY special planes should be here, as they are above not just the game, but the UI planes as well. /// Plane related to the menu when pressing Escape. /// Needed so that we can apply a blur effect to EVERYTHING, and guarantee we are above all UI. -#define ESCAPE_MENU_PLANE 105 +#define ESCAPE_MENU_PLANE 46 -#define RENDER_PLANE_MASTER 110 +#define RENDER_PLANE_MASTER 50 // Lummox I swear to god I will find you // NOTE! You can only ever have planes greater then -10000, if you add too many with large offsets you will brick multiz // Same can be said for large multiz maps. Tread carefully mappers #define HIGHEST_EVER_PLANE RENDER_PLANE_MASTER /// The range unique planes can be in +/// Try and keep this to a nice whole number, so it's easy to look at a plane var and know what's going on #define PLANE_RANGE (HIGHEST_EVER_PLANE - LOWEST_EVER_PLANE) // PLANE_SPACE layer(s) @@ -188,8 +189,6 @@ #define NOT_HIGH_OBJ_LAYER 3.5 #define HIGH_OBJ_LAYER 3.6 #define BELOW_MOB_LAYER 3.7 - -// GAME_PLANE_FOV_HIDDEN layers #define LOW_MOB_LAYER 3.75 #define LYING_MOB_LAYER 3.8 #define VEHICLE_LAYER 3.9 @@ -199,21 +198,16 @@ #define MOB_ABOVE_PIGGYBACK_LAYER 4.06 #define MOB_UPPER_LAYER 4.07 #define HITSCAN_PROJECTILE_LAYER 4.09 //above all mob but still hidden by FoV - -// GAME_PLANE_UPPER layers #define ABOVE_MOB_LAYER 4.1 #define WALL_OBJ_LAYER 4.25 #define TRAM_SIGNAL_LAYER 4.26 -// WALL_PLANE_UPPER layers #define EDGED_TURF_LAYER 4.3 #define ON_EDGED_TURF_LAYER 4.35 - -// GAME_PLANE_UPPER_FOV_HIDDEN layers #define SPACEVINE_LAYER 4.4 #define LARGE_MOB_LAYER 4.5 #define SPACEVINE_MOB_LAYER 4.6 -// Intermediate layer used by both GAME_PLANE_FOV_HIDDEN and ABOVE_GAME_PLANE +// Intermediate layer used by both GAME_PLANE and ABOVE_GAME_PLANE #define ABOVE_ALL_MOB_LAYER 4.7 // ABOVE_GAME_PLANE layers @@ -229,6 +223,8 @@ */ #define WATER_VISUAL_OVERLAY_LAYER 1000 +// SEETHROUGH_PLANE layers here, tho it has no layer values + //---------- LIGHTING ------------- // LIGHTING_PLANE layers diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index 2c7f8c0fea2..703b3476fd9 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -415,6 +415,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai // Being close enough to the supermatter makes it heal at higher temperatures // and emit less heat. Present on /mob or /datum/mind #define TRAIT_SUPERMATTER_SOOTHER "supermatter_soother" +/// Mob has fov applied to it +#define TRAIT_FOV_APPLIED "fov_applied" /// Trait added when a revenant is visible. #define TRAIT_REVENANT_REVEALED "revenant_revealed" diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index 844bb8b9a09..7bc2f8100b8 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -200,6 +200,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_FORBID_MINING_SHUTTLE_CONSOLE_OUTSIDE_STATION" = TRAIT_FORBID_MINING_SHUTTLE_CONSOLE_OUTSIDE_STATION, "TRAIT_FORCED_GRAVITY" = TRAIT_FORCED_GRAVITY, "TRAIT_FORCED_STANDING" = TRAIT_FORCED_STANDING, + "TRAIT_FOV_APPLIED" = TRAIT_FOV_APPLIED, "TRAIT_FREE_FLOAT_MOVEMENT" = TRAIT_FREE_FLOAT_MOVEMENT, "TRAIT_FREE_HYPERSPACE_MOVEMENT" = TRAIT_FREE_HYPERSPACE_MOVEMENT, "TRAIT_FREE_HYPERSPACE_SOFTCORDON_MOVEMENT" = TRAIT_FREE_HYPERSPACE_SOFTCORDON_MOVEMENT, diff --git a/code/_onclick/hud/rendering/plane_masters/plane_master_subtypes.dm b/code/_onclick/hud/rendering/plane_masters/plane_master_subtypes.dm index 8988b2f7f33..63206afdaa9 100644 --- a/code/_onclick/hud/rendering/plane_masters/plane_master_subtypes.dm +++ b/code/_onclick/hud/rendering/plane_masters/plane_master_subtypes.dm @@ -1,3 +1,38 @@ +/atom/movable/screen/plane_master/field_of_vision_blocker + name = "Field of vision blocker" + documentation = "This is one of those planes that's only used as a filter. It cuts out a portion of the game plate and does effects to it." + plane = FIELD_OF_VISION_BLOCKER_PLANE + appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR + render_target = FIELD_OF_VISION_BLOCKER_RENDER_TARGET + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + render_relay_planes = list() + // We do NOT allow offsetting, because there's no case where you would want to block only one layer, at least currently + allows_offsetting = FALSE + // We mark as multiz_scaled FALSE so transforms don't effect us, and we draw to the planes below us as if they were us. + // This is safe because we will ALWAYS be on the top z layer, so it DON'T MATTER + multiz_scaled = FALSE + +/atom/movable/screen/plane_master/field_of_vision_blocker/show_to(mob/mymob) + . = ..() + if(!. || !mymob) + return . + RegisterSignal(mymob, SIGNAL_ADDTRAIT(TRAIT_FOV_APPLIED), PROC_REF(fov_enabled), override = TRUE) + RegisterSignal(mymob, SIGNAL_REMOVETRAIT(TRAIT_FOV_APPLIED), PROC_REF(fov_disabled), override = TRUE) + if(HAS_TRAIT(mymob, TRAIT_FOV_APPLIED)) + fov_enabled(mymob) + else + fov_disabled(mymob) + +/atom/movable/screen/plane_master/field_of_vision_blocker/proc/fov_enabled(mob/source) + SIGNAL_HANDLER + if(force_hidden == FALSE) + return + unhide_plane(source) + +/atom/movable/screen/plane_master/field_of_vision_blocker/proc/fov_disabled(mob/source) + SIGNAL_HANDLER + hide_plane(source) + /atom/movable/screen/plane_master/clickcatcher name = "Click Catcher" documentation = "Contains the screen object we use as a backdrop to catch clicks on portions of the screen that would otherwise contain nothing else. \ @@ -168,69 +203,17 @@ add_relay_to(GET_NEW_PLANE(EMISSIVE_RENDER_PLATE, offset), relay_layer = EMISSIVE_WALL_LAYER, relay_color = GLOB.em_block_color) /atom/movable/screen/plane_master/game - name = "Lower game world" - documentation = "Exists mostly because of FOV shit. Basically, if you've just got a normal not ABOVE fov thing, and you don't want it masked, stick it here yeah?" + name = "Game" + documentation = "Holds most non floor/wall things. Anything on this plane \"wants\" to interlayer depending on position." plane = GAME_PLANE render_relay_planes = list(RENDER_PLANE_GAME_WORLD) -/atom/movable/screen/plane_master/game_world_fov_hidden - name = "lower game world fov hidden" - documentation = "If you want something to be hidden by fov, stick it on this plane. We're masked by the fov blocker plane, so the items on us can actually well, disappear." - plane = GAME_PLANE_FOV_HIDDEN +/atom/movable/screen/plane_master/game_world_above + name = "Upper Game" + documentation = "For stuff you want to draw like the game plane, but not ever below its contents" + plane = ABOVE_GAME_PLANE render_relay_planes = list(RENDER_PLANE_GAME_WORLD) -/atom/movable/screen/plane_master/game_world_fov_hidden/Initialize(mapload, datum/hud/hud_owner) - . = ..() - add_filter("vision_cone", 1, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(FIELD_OF_VISION_BLOCKER_RENDER_TARGET, offset), flags = MASK_INVERSE)) - -/atom/movable/screen/plane_master/field_of_vision_blocker - name = "Field of vision blocker" - documentation = "This is one of those planes that's only used as a filter. It masks out things that want to be hidden by fov.\ -
Literally just contains FOV images, or masks." - plane = FIELD_OF_VISION_BLOCKER_PLANE - appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR - render_target = FIELD_OF_VISION_BLOCKER_RENDER_TARGET - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - render_relay_planes = list() - // We do NOT allow offsetting, because there's no case where you would want to block only one layer, at least currently - allows_offsetting = FALSE - start_hidden = TRUE - // We mark as multiz_scaled FALSE so transforms don't effect us, and we draw to the planes below us as if they were us. - // This is safe because we will ALWAYS be on the top z layer, so it DON'T MATTER - multiz_scaled = FALSE - -/atom/movable/screen/plane_master/field_of_vision_blocker/Initialize(mapload, datum/hud/hud_owner, datum/plane_master_group/home, offset) - . = ..() - mirror_parent_hidden() - -/atom/movable/screen/plane_master/game_world_upper - name = "Upper game world" - documentation = "Ok so fov is kinda fucky, because planes in byond serve both as effect groupings and as rendering orderers. Since that's true, we need a plane that we can stick stuff that draws above fov blocked stuff on." - 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, LIGHT_MASK_PLANE) - -/atom/movable/screen/plane_master/wall_upper/Initialize(mapload, datum/hud/hud_owner, datum/plane_master_group/home, offset) - . = ..() - add_relay_to(GET_NEW_PLANE(EMISSIVE_RENDER_PLATE, offset), relay_layer = EMISSIVE_WALL_LAYER, relay_color = GLOB.em_block_color) - -/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." - plane = GAME_PLANE_UPPER_FOV_HIDDEN - render_relay_planes = list(RENDER_PLANE_GAME_WORLD) - -/atom/movable/screen/plane_master/game_world_upper_fov_hidden/Initialize(mapload, datum/hud/hud_owner) - . = ..() - // Dupe of the other hidden plane - add_filter("vision_cone", 1, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(FIELD_OF_VISION_BLOCKER_RENDER_TARGET, offset), flags = MASK_INVERSE)) - /atom/movable/screen/plane_master/seethrough name = "Seethrough" documentation = "Holds the seethrough versions (done using image overrides) of large objects. Mouse transparent, so you can click through them." @@ -239,12 +222,6 @@ render_relay_planes = list(RENDER_PLANE_GAME_WORLD) start_hidden = TRUE -/atom/movable/screen/plane_master/game_world_above - name = "Above game world" - documentation = "We need a place that's unmasked by fov that also draws above the upper game world fov hidden plane. I told you fov was hacky man." - plane = ABOVE_GAME_PLANE - render_relay_planes = list(RENDER_PLANE_GAME_WORLD) - /** * Plane master that byond will by default draw to * Shouldn't be used, exists to prevent people using plane 0 diff --git a/code/_onclick/hud/rendering/render_plate.dm b/code/_onclick/hud/rendering/render_plate.dm index 26541d488e2..d6a4f6d21c2 100644 --- a/code/_onclick/hud/rendering/render_plate.dm +++ b/code/_onclick/hud/rendering/render_plate.dm @@ -72,7 +72,8 @@ /atom/movable/screen/plane_master/rendering_plate/game_plate name = "Game rendering plate" documentation = "Holds all objects that are ahhh, in character? is maybe the best way to describe it.\ -
We apply a displacement effect from the gravity pulse plane too, so we can warp the game world." +
We apply a displacement effect from the gravity pulse plane too, so we can warp the game world.\ +
If we have fov enabled we'll relay this onto two different rendering plates to apply fov effects to only a portion. If not, we just draw straight to master" plane = RENDER_PLANE_GAME render_relay_planes = list(RENDER_PLANE_MASTER) @@ -84,6 +85,97 @@ // We're basically using alpha as better constant here btw add_filter("spook_color", 2, color_matrix_filter(list(0.75,0.13,0.13,0, 0.13,0.7,0.13,0, 0.13,0.13,0.75,0, -0.06,-0.09,-0.08,1, 0,0,0,0))) +/atom/movable/screen/plane_master/rendering_plate/game_plate/show_to(mob/mymob) + . = ..() + if(!. || !mymob) + return . + RegisterSignal(mymob, SIGNAL_ADDTRAIT(TRAIT_FOV_APPLIED), PROC_REF(fov_enabled), override = TRUE) + RegisterSignal(mymob, SIGNAL_REMOVETRAIT(TRAIT_FOV_APPLIED), PROC_REF(fov_disabled), override = TRUE) + if(HAS_TRAIT(mymob, TRAIT_FOV_APPLIED)) + fov_enabled(mymob) + else + fov_disabled(mymob) + +/atom/movable/screen/plane_master/rendering_plate/game_plate/proc/fov_enabled(mob/source) + SIGNAL_HANDLER + add_relay_to(RENDER_PLANE_GAME_UNMASKED) + add_relay_to(RENDER_PLANE_GAME_MASKED) + remove_relay_from(RENDER_PLANE_MASTER) + +/atom/movable/screen/plane_master/rendering_plate/game_plate/proc/fov_disabled(mob/source) + SIGNAL_HANDLER + remove_relay_from(RENDER_PLANE_GAME_UNMASKED) + remove_relay_from(RENDER_PLANE_GAME_MASKED) + add_relay_to(RENDER_PLANE_MASTER) + +///renders the parts of the plate unmasked by fov +/atom/movable/screen/plane_master/rendering_plate/unmasked_game_plate + name = "Unmasked Game rendering plate" + documentation = "Holds the bits of the game plate that aren't impacted by fov.\ +
We use an alpha mask to cut out the bits we plan on dealing with elsewhere" + plane = RENDER_PLANE_GAME_UNMASKED + render_relay_planes = list(RENDER_PLANE_MASTER) + +/atom/movable/screen/plane_master/rendering_plate/unmasked_game_plate/Initialize(mapload, datum/hud/hud_owner, datum/plane_master_group/home, offset) + . = ..() + add_filter("fov_handled", 1, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(FIELD_OF_VISION_BLOCKER_RENDER_TARGET, offset), flags = MASK_INVERSE)) + +/atom/movable/screen/plane_master/rendering_plate/unmasked_game_plate/show_to(mob/mymob) + . = ..() + if(!. || !mymob) + return . + RegisterSignal(mymob, SIGNAL_ADDTRAIT(TRAIT_FOV_APPLIED), PROC_REF(fov_enabled), override = TRUE) + RegisterSignal(mymob, SIGNAL_REMOVETRAIT(TRAIT_FOV_APPLIED), PROC_REF(fov_disabled), override = TRUE) + if(HAS_TRAIT(mymob, TRAIT_FOV_APPLIED)) + fov_enabled(mymob) + else + fov_disabled(mymob) + +/atom/movable/screen/plane_master/rendering_plate/unmasked_game_plate/proc/fov_enabled(mob/source) + SIGNAL_HANDLER + if(force_hidden == FALSE) + return + unhide_plane(source) + +/atom/movable/screen/plane_master/rendering_plate/unmasked_game_plate/proc/fov_disabled(mob/source) + SIGNAL_HANDLER + hide_plane(source) + +///renders the parts of the plate masked by fov +/atom/movable/screen/plane_master/rendering_plate/masked_game_plate + name = "FOV Game rendering plate" + documentation = "Contains the bits of the game plate that are hidden by some form of fov\ +
Applies a color matrix to dim and create contrast, alongside a blur. Goal is only half being able to see stuff" + plane = RENDER_PLANE_GAME_MASKED + render_relay_planes = list(RENDER_PLANE_MASTER) + +/atom/movable/screen/plane_master/rendering_plate/masked_game_plate/Initialize(mapload, datum/hud/hud_owner, datum/plane_master_group/home, offset) + . = ..() + add_filter("fov_blur", 1, gauss_blur_filter(1.8)) + add_filter("fov_handled_space", 2, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(FIELD_OF_VISION_BLOCKER_RENDER_TARGET, offset))) + add_filter("fov_matrix", 3, color_matrix_filter(list(0.5,-0.15,-0.15,0, -0.15,0.5,-0.15,0, -0.15,-0.15,0.5,0, 0,0,0,1, 0,0,0,0))) + +/atom/movable/screen/plane_master/rendering_plate/masked_game_plate/show_to(mob/mymob) + . = ..() + if(!. || !mymob) + return . + RegisterSignal(mymob, SIGNAL_ADDTRAIT(TRAIT_FOV_APPLIED), PROC_REF(fov_enabled), override = TRUE) + RegisterSignal(mymob, SIGNAL_REMOVETRAIT(TRAIT_FOV_APPLIED), PROC_REF(fov_disabled), override = TRUE) + if(HAS_TRAIT(mymob, TRAIT_FOV_APPLIED)) + fov_enabled(mymob) + else + fov_disabled(mymob) + +/atom/movable/screen/plane_master/rendering_plate/masked_game_plate/proc/fov_enabled(mob/source) + SIGNAL_HANDLER + if(force_hidden == FALSE) + return + unhide_plane(source) + +/atom/movable/screen/plane_master/rendering_plate/masked_game_plate/proc/fov_disabled(mob/source) + SIGNAL_HANDLER + hide_plane(source) + // 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. diff --git a/code/datums/actions/mobs/lava_swoop.dm b/code/datums/actions/mobs/lava_swoop.dm index 7532ccfda08..a5acc29bab6 100644 --- a/code/datums/actions/mobs/lava_swoop.dm +++ b/code/datums/actions/mobs/lava_swoop.dm @@ -199,7 +199,6 @@ icon = 'icons/mob/simple/lavaland/96x96megafauna.dmi' icon_state = "dragon" layer = ABOVE_ALL_MOB_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN pixel_x = -32 duration = 10 randomdir = FALSE diff --git a/code/datums/beam.dm b/code/datums/beam.dm index 6b138387290..152de6ec1e1 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -179,7 +179,6 @@ /obj/effect/ebeam mouse_opacity = MOUSE_OPACITY_TRANSPARENT - plane = GAME_PLANE_UPPER_FOV_HIDDEN layer = ABOVE_ALL_MOB_LAYER anchored = TRUE var/emissive = TRUE diff --git a/code/datums/brain_damage/special.dm b/code/datums/brain_damage/special.dm index 81d354a19e8..d9348f98f4b 100644 --- a/code/datums/brain_damage/special.dm +++ b/code/datums/brain_damage/special.dm @@ -100,7 +100,6 @@ image_icon = 'icons/effects/effects.dmi' image_state = "bluestream" image_layer = ABOVE_MOB_LAYER - image_plane = GAME_PLANE_UPPER var/obj/effect/client_image_holder/bluespace_stream/linked_to /obj/effect/client_image_holder/bluespace_stream/Initialize(mapload, list/mobs_which_see_us) diff --git a/code/datums/components/fov_handler.dm b/code/datums/components/fov_handler.dm index 8b9c2c74e5e..73d04a6b0e6 100644 --- a/code/datums/components/fov_handler.dm +++ b/code/datums/components/fov_handler.dm @@ -10,8 +10,6 @@ var/fov_angle = FOV_180_DEGREES /// The blocker mask applied to a client's screen var/atom/movable/screen/fov_blocker/blocker_mask - /// The shadow mask applied to a client's screen - var/atom/movable/screen/fov_shadow/visual_shadow /datum/component/fov_handler/Initialize(fov_type = FOV_180_DEGREES) if(!isliving(parent)) @@ -22,12 +20,9 @@ qdel(src) //no QDEL hint for components, and we dont want this to print a warning regarding bad component application return - for(var/atom/movable/screen/plane_master/plane_master as anything in mob_parent.hud_used.get_true_plane_masters(FIELD_OF_VISION_BLOCKER_PLANE)) - plane_master.unhide_plane(mob_parent) + ADD_TRAIT(mob_parent, TRAIT_FOV_APPLIED, REF(src)) blocker_mask = new - visual_shadow = new - visual_shadow.alpha = parent_client?.prefs.read_preference(/datum/preference/numeric/fov_darkness) set_fov_angle(fov_type) on_dir_change(mob_parent, mob_parent.dir, mob_parent.dir) update_fov_size() @@ -35,21 +30,17 @@ /datum/component/fov_handler/Destroy() var/mob/living/mob_parent = parent - for(var/atom/movable/screen/plane_master/plane_master as anything in mob_parent.hud_used.get_true_plane_masters(FIELD_OF_VISION_BLOCKER_PLANE)) - plane_master.hide_plane(mob_parent) + REMOVE_TRAIT(mob_parent, TRAIT_FOV_APPLIED, REF(src)) if(applied_mask) remove_mask() if(blocker_mask) // In a case of early deletion due to volatile client QDEL_NULL(blocker_mask) - if(visual_shadow) // In a case of early deletion due to volatile client - QDEL_NULL(visual_shadow) return ..() /datum/component/fov_handler/proc/set_fov_angle(new_angle) fov_angle = new_angle blocker_mask.icon_state = "[fov_angle]" - visual_shadow.icon_state = "[fov_angle]_v" /// Updates the size of the FOV masks by comparing them to client view size. /datum/component/fov_handler/proc/update_fov_size() @@ -70,8 +61,8 @@ var/y_scale = view_size[2] / current_fov_y current_fov_x = view_size[1] current_fov_y = view_size[2] - visual_shadow.transform = blocker_mask.transform = new_matrix.Scale(x_scale, y_scale) - visual_shadow.transform = blocker_mask.transform = new_matrix.Translate(x_shift * 16, y_shift * 16) + blocker_mask.transform = new_matrix.Scale(x_scale, y_scale) + blocker_mask.transform = new_matrix.Translate(x_shift * 16, y_shift * 16) /// Updates the mask application to client by checking `stat` and `eye` /datum/component/fov_handler/proc/update_mask() @@ -98,13 +89,10 @@ var/client/parent_client = parent_mob.client // Prevents stupid ass hard deletes parent_mob.hud_used.always_visible_inventory -= blocker_mask - parent_mob.hud_used.always_visible_inventory -= visual_shadow if(!parent_client) //Love client volatility!! return applied_mask = FALSE parent_client.screen -= blocker_mask - parent_client.screen -= visual_shadow - /datum/component/fov_handler/proc/add_mask() var/mob/parent_mob = parent @@ -113,15 +101,12 @@ return applied_mask = TRUE parent_client.screen += blocker_mask - parent_client.screen += visual_shadow parent_mob.hud_used.always_visible_inventory += blocker_mask - parent_mob.hud_used.always_visible_inventory += visual_shadow /// When a direction of the user changes, so do the masks /datum/component/fov_handler/proc/on_dir_change(mob/source, old_dir, new_dir) SIGNAL_HANDLER blocker_mask.dir = new_dir - visual_shadow.dir = new_dir /// When a mob logs out, delete the component /datum/component/fov_handler/proc/mob_logout(mob/source) diff --git a/code/datums/components/riding/riding.dm b/code/datums/components/riding/riding.dm index c8c969a8c6b..98024e1a00e 100644 --- a/code/datums/components/riding/riding.dm +++ b/code/datums/components/riding/riding.dm @@ -26,8 +26,6 @@ var/list/directional_vehicle_layers = list() /// same as above but instead of layer you have a list(px, py) var/list/directional_vehicle_offsets = list() - /// planes of the rider - var/list/directional_rider_planes = list() /// allow typecache for only certain turfs, forbid to allow all but those. allow only certain turfs will take precedence. var/list/allowed_turf_typecache /// allow typecache for only certain turfs, forbid to allow all but those. allow only certain turfs will take precedence. @@ -108,7 +106,6 @@ var/atom/movable/movable_parent = parent handle_vehicle_layer(movable_parent.dir) handle_vehicle_offsets(movable_parent.dir) - handle_rider_plane(movable_parent.dir) if(rider.pulling == source) rider.stop_pulling() @@ -138,20 +135,9 @@ . = AM.layer AM.layer = . -/datum/component/riding/proc/handle_rider_plane(dir) - var/atom/movable/movable_parent = parent - var/target_plane = directional_rider_planes["[dir]"] - if(isnull(target_plane)) - return - for(var/mob/buckled_mob in movable_parent.buckled_mobs) - SET_PLANE_EXPLICIT(buckled_mob, target_plane, movable_parent) - /datum/component/riding/proc/set_vehicle_dir_layer(dir, layer) directional_vehicle_layers["[dir]"] = layer -/datum/component/riding/proc/set_rider_dir_plane(dir, plane) - directional_rider_planes["[dir]"] = plane - /// This is called after the ridden atom is successfully moved and is used to handle icon stuff /datum/component/riding/proc/vehicle_moved(datum/source, oldloc, dir, forced) SIGNAL_HANDLER @@ -166,7 +152,6 @@ return // runtimed with piggy's without this, look into this more handle_vehicle_offsets(dir) handle_vehicle_layer(dir) - handle_rider_plane(dir) /// Turning is like moving /datum/component/riding/proc/vehicle_turned(datum/source, _old_dir, new_dir) diff --git a/code/datums/components/riding/riding_mob.dm b/code/datums/components/riding/riding_mob.dm index 75292c01012..6a7734530bd 100644 --- a/code/datums/components/riding/riding_mob.dm +++ b/code/datums/components/riding/riding_mob.dm @@ -500,10 +500,6 @@ /datum/component/riding/creature/leaper/handle_specials() . = ..() set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(17, 46), TEXT_SOUTH = list(17,51), TEXT_EAST = list(27, 46), TEXT_WEST = list(6, 46))) - set_rider_dir_plane(SOUTH, GAME_PLANE_UPPER) - set_rider_dir_plane(NORTH, GAME_PLANE) - set_rider_dir_plane(EAST, GAME_PLANE_UPPER) - set_rider_dir_plane(WEST, GAME_PLANE_UPPER) /datum/component/riding/creature/leaper/Initialize(mob/living/riding_mob, force = FALSE, ride_check_flags = NONE, potion_boost = FALSE) . = ..() diff --git a/code/datums/components/tactical.dm b/code/datums/components/tactical.dm index ec78f3dfeb9..e8e54926949 100644 --- a/code/datums/components/tactical.dm +++ b/code/datums/components/tactical.dm @@ -40,7 +40,6 @@ var/obj/item/master = parent var/image/I = image(icon = master.icon, icon_state = master.icon_state, loc = user) - SET_PLANE_EXPLICIT(I, GAME_PLANE_FOV_HIDDEN, master) I.copy_overlays(master) I.override = TRUE source.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/everyone, "sneaking_mission", I) diff --git a/code/datums/elements/immerse.dm b/code/datums/elements/immerse.dm index 1a3b37d6530..900c096aa65 100644 --- a/code/datums/elements/immerse.dm +++ b/code/datums/elements/immerse.dm @@ -109,7 +109,7 @@ SIGNAL_HANDLER if(HAS_TRAIT(movable, TRAIT_IMMERSED)) return - if(movable.layer >= ABOVE_ALL_MOB_LAYER || !ISINRANGE(movable.plane, MUTATE_PLANE(FLOOR_PLANE, source), MUTATE_PLANE(GAME_PLANE_UPPER_FOV_HIDDEN, source))) + if(movable.layer >= ABOVE_ALL_MOB_LAYER || !ISINRANGE(movable.plane, MUTATE_PLANE(FLOOR_PLANE, source), MUTATE_PLANE(GAME_PLANE, source))) return if(is_type_in_typecache(movable, movables_to_ignore)) return diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index c2479dca08d..cc81496e09d 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -6,7 +6,6 @@ use_power = ACTIVE_POWER_USE active_power_usage = BASE_MACHINE_ACTIVE_CONSUMPTION * 0.02 layer = WALL_OBJ_LAYER - plane = GAME_PLANE_UPPER resistance_flags = FIRE_PROOF damage_deflection = 12 armor_type = /datum/armor/machinery_camera diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index d1382371553..f95aa5f2bc7 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -98,7 +98,6 @@ max_integrity = 20 mouse_opacity = MOUSE_OPACITY_TRANSPARENT layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER /obj/structure/emergency_shield/cult/barrier density = FALSE //toggled on right away by the parent rune diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm index daaddb00ce0..8a80692f1a9 100644 --- a/code/game/objects/effects/decals/cleanable/misc.dm +++ b/code/game/objects/effects/decals/cleanable/misc.dm @@ -129,7 +129,6 @@ desc = "Somebody should remove that." gender = NEUTER layer = WALL_OBJ_LAYER - plane = GAME_PLANE_UPPER icon_state = "cobweb1" resistance_flags = FLAMMABLE beauty = -100 diff --git a/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm b/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm index 9a13e68c1b1..efb5b1fbb91 100644 --- a/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm +++ b/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm @@ -17,7 +17,6 @@ anchored = TRUE density = FALSE layer = EDGED_TURF_LAYER - plane = GAME_PLANE_UPPER mouse_opacity = MOUSE_OPACITY_TRANSPARENT animate_movement = NO_STEPS /// The types of turfs that this foam cannot spread to. @@ -298,7 +297,6 @@ opacity = TRUE // changed in New() anchored = TRUE layer = EDGED_TURF_LAYER - plane = GAME_PLANE_UPPER resistance_flags = FIRE_PROOF | ACID_PROOF name = "foamed metal" desc = "A lightweight foamed metal wall that can be used as base to construct a wall." diff --git a/code/game/objects/effects/spiderwebs.dm b/code/game/objects/effects/spiderwebs.dm index 9a3d6c9c8e3..5023f9bd825 100644 --- a/code/game/objects/effects/spiderwebs.dm +++ b/code/game/objects/effects/spiderwebs.dm @@ -114,7 +114,7 @@ opacity = TRUE density = TRUE max_integrity = 90 - plane = GAME_PLANE_UPPER + layer = ABOVE_MOB_LAYER resistance_flags = FIRE_PROOF | FREEZE_PROOF /obj/structure/spider/solid/Initialize(mapload) @@ -130,7 +130,7 @@ opacity = TRUE max_integrity = 60 alpha = 200 - plane = GAME_PLANE_UPPER + layer = ABOVE_MOB_LAYER resistance_flags = FIRE_PROOF | FREEZE_PROOF /obj/structure/spider/passage/Initialize(mapload) diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index 393b9fdb708..6c96f24e336 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -21,7 +21,6 @@ if(SOUTH) target_pixel_y = -16 layer = ABOVE_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) if(EAST) target_pixel_x = 16 if(WEST) @@ -36,12 +35,10 @@ target_pixel_x = 16 target_pixel_y = -16 layer = ABOVE_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) if(SOUTHWEST) target_pixel_x = -16 target_pixel_y = -16 layer = ABOVE_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration) /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter diff --git a/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm b/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm index 1e8577bbd3a..81c854f2c3e 100644 --- a/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm +++ b/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm @@ -3,7 +3,6 @@ icon = 'icons/obj/weapons/guns/projectiles.dmi' icon_state = "nothing" layer = HITSCAN_PROJECTILE_LAYER - plane = GAME_PLANE_FOV_HIDDEN anchored = TRUE mouse_opacity = MOUSE_OPACITY_TRANSPARENT appearance_flags = LONG_GLIDE diff --git a/code/game/objects/effects/temporary_visuals/temporary_visual.dm b/code/game/objects/effects/temporary_visuals/temporary_visual.dm index 0d5b7bf1463..9669b4ed290 100644 --- a/code/game/objects/effects/temporary_visuals/temporary_visual.dm +++ b/code/game/objects/effects/temporary_visuals/temporary_visual.dm @@ -3,7 +3,6 @@ icon_state = "nothing" anchored = TRUE layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER mouse_opacity = MOUSE_OPACITY_TRANSPARENT ///time, in deciseconds, that this object will exist var/duration = 10 diff --git a/code/game/objects/items/kirby_plants/kirbyplants.dm b/code/game/objects/items/kirby_plants/kirbyplants.dm index 571f7d9d7ee..26199bcd42c 100644 --- a/code/game/objects/items/kirby_plants/kirbyplants.dm +++ b/code/game/objects/items/kirby_plants/kirbyplants.dm @@ -6,7 +6,6 @@ base_icon_state = "plant-01" desc = "A little bit of nature contained in a pot." layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER w_class = WEIGHT_CLASS_HUGE force = 10 throwforce = 13 diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm index 8f357e05139..8b7ff362046 100644 --- a/code/game/objects/items/theft_tools.dm +++ b/code/game/objects/items/theft_tools.dm @@ -157,13 +157,10 @@ inhand_icon_state = null //touching it dusts you, so no need for an inhand icon. pulseicon = "supermatter_sliver_pulse" layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER - /obj/item/nuke_core/supermatter_sliver/attack_tk(mob/user) // no TK dusting memes return - /obj/item/nuke_core/supermatter_sliver/can_be_pulled(user) // no drag memes return FALSE diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index c83fefb2fce..059f78b80c9 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -161,7 +161,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /obj/item/claymore/highlander/process() if(ishuman(loc)) var/mob/living/carbon/human/holder = loc - SET_PLANE_EXPLICIT(holder, GAME_PLANE_UPPER_FOV_HIDDEN, src) //NO HIDING BEHIND PLANTS FOR YOU, DICKWEED (HA GET IT, BECAUSE WEEDS ARE PLANTS) + layer = ABOVE_ALL_MOB_LAYER //NO HIDING BEHIND PLANTS FOR YOU, DICKWEED (HA GET IT, BECAUSE WEEDS ARE PLANTS) ADD_TRAIT(holder, TRAIT_NOBLOOD, HIGHLANDER_TRAIT) //AND WE WON'T BLEED OUT LIKE COWARDS else if(!(flags_1 & ADMIN_SPAWNED_1)) @@ -285,7 +285,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 return INITIALIZE_HINT_QDEL /obj/item/claymore/highlander/robot/process() - SET_PLANE_IMPLICIT(loc, GAME_PLANE_UPPER_FOV_HIDDEN) + layer = ABOVE_ALL_MOB_LAYER /obj/item/katana name = "katana" diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index e637ecc274e..886d0b9bcba 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -338,7 +338,6 @@ integrity_failure = 0.05 var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive layer = MOB_LAYER - plane = GAME_PLANE_FOV_HIDDEN /// Ref to the hugger within. var/obj/item/clothing/mask/facehugger/child ///Proximity monitor associated with this atom, needed for proximity checks. diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index f3f272b131c..b24c0807a1f 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -109,10 +109,8 @@ /obj/structure/chair/proc/handle_layer() if(has_buckled_mobs() && dir == NORTH) layer = ABOVE_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER_FOV_HIDDEN) else layer = OBJ_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE) /obj/structure/chair/post_buckle_mob(mob/living/M) . = ..() @@ -179,7 +177,6 @@ /obj/structure/chair/comfy/proc/gen_armrest() armrest = GetArmrest() armrest.layer = ABOVE_MOB_LAYER - SET_PLANE_EXPLICIT(armrest, GAME_PLANE_UPPER, src) update_armrest() /obj/structure/chair/comfy/proc/GetArmrest() diff --git a/code/game/objects/structures/beds_chairs/pew.dm b/code/game/objects/structures/beds_chairs/pew.dm index 21bf0fbf09c..6388247e8c4 100644 --- a/code/game/objects/structures/beds_chairs/pew.dm +++ b/code/game/objects/structures/beds_chairs/pew.dm @@ -33,10 +33,8 @@ /obj/structure/chair/pew/left/proc/gen_armrest() leftpewarmrest = GetLeftPewArmrest() leftpewarmrest.layer = ABOVE_MOB_LAYER - SET_PLANE_EXPLICIT(leftpewarmrest, GAME_PLANE_UPPER, src) update_leftpewarmrest() - /obj/structure/chair/pew/left/proc/GetLeftPewArmrest() return mutable_appearance('icons/obj/chairs_wide.dmi', "pewend_left_armrest") @@ -76,7 +74,6 @@ /obj/structure/chair/pew/right/proc/gen_armrest() rightpewarmrest = GetRightPewArmrest() rightpewarmrest.layer = ABOVE_MOB_LAYER - SET_PLANE_EXPLICIT(rightpewarmrest, GAME_PLANE_UPPER, src) update_rightpewarmrest() /obj/structure/chair/pew/right/proc/GetRightPewArmrest() diff --git a/code/game/objects/structures/beds_chairs/sofa.dm b/code/game/objects/structures/beds_chairs/sofa.dm index 076f95f4dc9..bf9a221929b 100644 --- a/code/game/objects/structures/beds_chairs/sofa.dm +++ b/code/game/objects/structures/beds_chairs/sofa.dm @@ -36,7 +36,6 @@ path/corner/color_name {\ /obj/structure/chair/sofa/proc/gen_armrest() armrest = mutable_appearance(initial(icon), "[icon_state]_armrest", ABOVE_MOB_LAYER) - SET_PLANE_EXPLICIT(armrest, GAME_PLANE_UPPER, src) update_armrest() /obj/structure/chair/sofa/electrify_self(obj/item/assembly/shock_kit/input_shock_kit, mob/user, list/overlays_from_child_procs) diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 4baed44187b..03ce2faff02 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -86,7 +86,6 @@ LINEN BINS /obj/item/bedsheet/proc/coverup(mob/living/sleeper) layer = ABOVE_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) pixel_x = 0 pixel_y = 0 balloon_alert(sleeper, "covered") diff --git a/code/game/objects/structures/deployable_turret.dm b/code/game/objects/structures/deployable_turret.dm index 0e810526bdc..ac4b35678c9 100644 --- a/code/game/objects/structures/deployable_turret.dm +++ b/code/game/objects/structures/deployable_turret.dm @@ -12,7 +12,6 @@ max_integrity = 100 buckle_lying = 0 layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER var/view_range = 2.5 var/cooldown = 0 /// The projectile that the turret fires @@ -101,7 +100,6 @@ M.put_in_hands(TC) M.pixel_y = 14 layer = ABOVE_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) setDir(SOUTH) playsound(src,'sound/mecha/mechmove01.ogg', 50, TRUE) set_anchored(TRUE) @@ -136,43 +134,34 @@ switch(dir) if(NORTH) layer = BELOW_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE) user.pixel_x = 0 user.pixel_y = -14 if(NORTHEAST) layer = BELOW_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE) user.pixel_x = -8 user.pixel_y = -4 if(EAST) layer = ABOVE_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) user.pixel_x = -14 user.pixel_y = 0 if(SOUTHEAST) layer = BELOW_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE) user.pixel_x = -8 user.pixel_y = 4 if(SOUTH) layer = ABOVE_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) - plane = GAME_PLANE_UPPER user.pixel_x = 0 user.pixel_y = 14 if(SOUTHWEST) layer = BELOW_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE) user.pixel_x = 8 user.pixel_y = 4 if(WEST) layer = ABOVE_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) user.pixel_x = 14 user.pixel_y = 0 if(NORTHWEST) layer = BELOW_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE) user.pixel_x = 8 user.pixel_y = -4 diff --git a/code/game/objects/structures/fluff.dm b/code/game/objects/structures/fluff.dm index 57207cf7aba..a38659aaefe 100644 --- a/code/game/objects/structures/fluff.dm +++ b/code/game/objects/structures/fluff.dm @@ -74,7 +74,7 @@ density = TRUE deconstructible = FALSE layer = EDGED_TURF_LAYER - plane = GAME_PLANE_UPPER + /** * A variety of statue in disrepair; parts are broken off and a gemstone is missing */ diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm index ca019c05c12..bc56b3838ca 100644 --- a/code/game/objects/structures/guillotine.dm +++ b/code/game/objects/structures/guillotine.dm @@ -42,7 +42,6 @@ buckle_lying = 0 buckle_prevents_pull = TRUE layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER /// The sound the guillotine makes when it successfully cuts off a head var/drop_sound = 'sound/weapons/guillotine.ogg' /// The current state of the blade diff --git a/code/game/objects/structures/gym/weight_machine.dm b/code/game/objects/structures/gym/weight_machine.dm index 761db678b38..56b96e5bbd8 100644 --- a/code/game/objects/structures/gym/weight_machine.dm +++ b/code/game/objects/structures/gym/weight_machine.dm @@ -1,6 +1,6 @@ #define WORKOUT_XP 5 #define EXERCISE_STATUS_DURATION 20 SECONDS -#define SAFE_DRUNK_LEVEL 39 +#define SAFE_DRUNK_LEVEL 39 /obj/structure/weightmachine name = "chest press machine" @@ -146,7 +146,6 @@ end_workout() return FALSE var/mutable_appearance/workout = mutable_appearance(icon, "[base_icon_state]-o", ABOVE_MOB_LAYER) - SET_PLANE_EXPLICIT(workout, GAME_PLANE_UPPER, src) flick_overlay_view(workout, 0.8 SECONDS) flick("[base_icon_state]-u", src) var/mob/living/user = buckled_mobs[1] diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index bd20ef405fc..2fa25dee9fa 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -24,7 +24,7 @@ var/turf/our_turf = get_turf(src) if(use_vis_overlay) alpha = 0 - SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, MUTATE_PLANE(GAME_PLANE_UPPER, our_turf), dir, add_appearance_flags = RESET_ALPHA) //you see mobs under it, but you hit them like they are above it + SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, MUTATE_PLANE(GAME_PLANE, our_turf), dir, add_appearance_flags = RESET_ALPHA) //you see mobs under it, but you hit them like they are above it if(source_projector) projector = source_projector LAZYADD(projector.signs, src) diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index 31e433f7ae3..6dd3eb800a3 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -36,7 +36,7 @@ /obj/structure/plasticflaps/proc/gen_overlay() var/turf/our_turf = get_turf(src) - SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, MUTATE_PLANE(GAME_PLANE_UPPER, our_turf), dir, add_appearance_flags = RESET_ALPHA) //you see mobs under it, but you hit them like they are above it + SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, MUTATE_PLANE(GAME_PLANE, our_turf), dir, add_appearance_flags = RESET_ALPHA) //you see mobs under it, but you hit them like they are above it /obj/structure/plasticflaps/examine(mob/user) . = ..() diff --git a/code/game/objects/structures/railings.dm b/code/game/objects/structures/railings.dm index fb69570eea5..3604bd06c63 100644 --- a/code/game/objects/structures/railings.dm +++ b/code/game/objects/structures/railings.dm @@ -9,7 +9,6 @@ anchored = TRUE pass_flags_self = LETPASSTHROW|PASSSTRUCTURE layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER /// armor is a little bit less than a grille. max_integrity about half that of a grille. armor_type = /datum/armor/structure_railing max_integrity = 25 @@ -164,7 +163,6 @@ icon = 'icons/obj/structures.dmi' icon_state = "wooden_railing" item_deconstruct = /obj/item/stack/sheet/mineral/wood - plane = GAME_PLANE_FOV_HIDDEN layer = ABOVE_MOB_LAYER /obj/structure/railing/wooden_fence/Initialize(mapload) diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm index a4f931bf987..f14c1dfa227 100644 --- a/code/game/objects/structures/shower.dm +++ b/code/game/objects/structures/shower.dm @@ -197,7 +197,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16)) return var/mutable_appearance/water_falling = mutable_appearance('icons/obj/watercloset.dmi', "water", ABOVE_MOB_LAYER) water_falling.color = mix_color_from_reagents(reagents.reagent_list) - SET_PLANE_EXPLICIT(water_falling, GAME_PLANE_UPPER, src) switch(dir) if(NORTH) water_falling.pixel_y += pixel_shift diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 531df729957..b343cd85f50 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -760,12 +760,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sink/kitchen, (-16)) open = !open if(open) layer = SIGN_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE) set_density(FALSE) set_opacity(FALSE) else layer = WALL_OBJ_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) set_density(TRUE) if(opaque_closed) set_opacity(TRUE) @@ -878,7 +876,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sink/kitchen, (-16)) /obj/structure/curtain/cloth/fancy/mechanical/proc/close() icon_state = "[icon_type]-closed" layer = WALL_OBJ_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) set_density(TRUE) open = FALSE if(opaque_closed) diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm index 283e10fe19f..7d1d85ce84d 100644 --- a/code/game/turfs/closed/minerals.dm +++ b/code/game/turfs/closed/minerals.dm @@ -6,13 +6,17 @@ name = "rock" icon = MAP_SWITCH('icons/turf/smoothrocks.dmi', 'icons/turf/mining.dmi') icon_state = "rock" + smoothing_groups = SMOOTH_GROUP_CLOSED_TURFS + SMOOTH_GROUP_MINERAL_WALLS + canSmoothWith = SMOOTH_GROUP_MINERAL_WALLS smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER baseturfs = /turf/open/misc/asteroid/airless initial_gas_mix = AIRLESS_ATMOS opacity = TRUE density = TRUE + // We're a BIG wall, larger then 32x32, so we need to be on the game plane + // Otherwise we'll draw under shit in weird ways + plane = GAME_PLANE layer = EDGED_TURF_LAYER - plane = WALL_PLANE_UPPER base_icon_state = "smoothrocks" // This is static @@ -35,14 +39,15 @@ /turf/closed/mineral/Initialize(mapload) - var/static/list/smoothing_groups = SMOOTH_GROUP_CLOSED_TURFS + SMOOTH_GROUP_MINERAL_WALLS - var/static/list/canSmoothWith = SMOOTH_GROUP_MINERAL_WALLS - - // The cost of the list() being in the type def is very large for something as common as minerals - src.smoothing_groups = smoothing_groups - src.canSmoothWith = canSmoothWith - - return ..() + . = ..() + // Mineral turfs are big, so they need to be on the game plane at a high layer + // But they're also turfs, so we need to cut them out from the light mask plane + // So we draw them as if they were on the game plane, and then overlay a copy onto + // The wall plane (so emissives/light masks behave) + // I am so sorry + var/static/mutable_appearance/wall_overlay = mutable_appearance('icons/turf/mining.dmi', "rock", appearance_flags = RESET_TRANSFORM) + wall_overlay.plane = MUTATE_PLANE(WALL_PLANE, src) + overlays += wall_overlay // Inlined version of the bump click element. way faster this way, the element's nice but it's too much overhead /turf/closed/mineral/Bumped(atom/movable/bumped_atom) @@ -685,7 +690,6 @@ /turf/closed/mineral/gibtonite/proc/explosive_reaction(mob/user = null) if(stage == GIBTONITE_UNSTRUCK) activated_overlay = mutable_appearance('icons/turf/smoothrocks_overlays.dmi', "rock_Gibtonite_inactive", ON_EDGED_TURF_LAYER) //shows in gaps between pulses if there are any - 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/modules/antagonists/heretic/knife_effect.dm b/code/modules/antagonists/heretic/knife_effect.dm index b1a02fb6800..0bf5a5a4b8c 100644 --- a/code/modules/antagonists/heretic/knife_effect.dm +++ b/code/modules/antagonists/heretic/knife_effect.dm @@ -3,7 +3,7 @@ name = "knife" icon = 'icons/obj/service/kitchen.dmi' icon_state = "knife" - plane = GAME_PLANE_FOV_HIDDEN + layer = LOW_MOB_LAYER /// The color the knife glows around it. var/glow_color = "#ececff" diff --git a/code/modules/art/statues.dm b/code/modules/art/statues.dm index 717f4335969..2158104b6ee 100644 --- a/code/modules/art/statues.dm +++ b/code/modules/art/statues.dm @@ -569,7 +569,7 @@ Moving interrupts content_ma.pixel_y = 0 content_ma.alpha = 255 - var/static/list/plane_whitelist = list(FLOAT_PLANE, GAME_PLANE, GAME_PLANE_UPPER, GAME_PLANE_FOV_HIDDEN, GAME_PLANE_UPPER, GAME_PLANE_UPPER_FOV_HIDDEN, FLOOR_PLANE) + var/static/list/plane_whitelist = list(FLOAT_PLANE, GAME_PLANE, FLOOR_PLANE) /// Ideally we'd have knowledge what we're removing but i'd have to be done on target appearance retrieval var/list/overlays_to_remove = list() diff --git a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm index b71dc05d776..8a9deaf5dea 100644 --- a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm +++ b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm @@ -10,7 +10,6 @@ name = "crystallizer" desc = "Used to crystallize or solidify gases." layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER density = TRUE max_integrity = 300 armor_type = /datum/armor/binary_crystallizer diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index b0775359896..f501e17085d 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -17,7 +17,6 @@ // and will crop the head off. icon_state = "mask_bg" layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER mouse_opacity = MOUSE_OPACITY_TRANSPARENT pixel_y = 22 appearance_flags = KEEP_TOGETHER diff --git a/code/modules/basketball/hoop.dm b/code/modules/basketball/hoop.dm index dd0585e0742..32699de1dc9 100644 --- a/code/modules/basketball/hoop.dm +++ b/code/modules/basketball/hoop.dm @@ -53,9 +53,6 @@ /obj/structure/hoop/update_overlays() . = ..() - if(dir & NORTH) - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) - var/dir_offset_x = 0 var/dir_offset_y = 0 @@ -72,7 +69,6 @@ var/mutable_appearance/scoreboard = mutable_appearance('icons/obj/signs.dmi', "basketball_scorecard") scoreboard.pixel_x = dir_offset_x scoreboard.pixel_y = dir_offset_y - SET_PLANE_EXPLICIT(scoreboard, GAME_PLANE, src) . += scoreboard var/ones = total_score % 10 diff --git a/code/modules/cargo/gondolapod.dm b/code/modules/cargo/gondolapod.dm index f3dca7a3dca..36ceff8ad51 100644 --- a/code/modules/cargo/gondolapod.dm +++ b/code/modules/cargo/gondolapod.dm @@ -65,13 +65,13 @@ /mob/living/simple_animal/pet/gondola/gondolapod/setOpened() opened = TRUE - SET_PLANE_IMPLICIT(src, GAME_PLANE) + layer = initial(layer) update_appearance() addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, setClosed)), 50) /mob/living/simple_animal/pet/gondola/gondolapod/setClosed() opened = FALSE - SET_PLANE_IMPLICIT(src, GAME_PLANE_FOV_HIDDEN) + layer = LOW_MOB_LAYER update_appearance() /mob/living/simple_animal/pet/gondola/gondolapod/death() diff --git a/code/modules/client/preferences/fov_darkness.dm b/code/modules/client/preferences/fov_darkness.dm deleted file mode 100644 index b0146e10b40..00000000000 --- a/code/modules/client/preferences/fov_darkness.dm +++ /dev/null @@ -1,17 +0,0 @@ -/datum/preference/numeric/fov_darkness - category = PREFERENCE_CATEGORY_GAME_PREFERENCES - savefile_key = "fov_darkness" - savefile_identifier = PREFERENCE_PLAYER - - minimum = 0 - maximum = 255 - -/datum/preference/numeric/fov_darkness/create_default_value() - return 255 - -/datum/preference/numeric/fov_darkness/apply_to_client_updated(client/client, value) - if(client.mob) - var/datum/component/fov_handler/fov_component = client.mob.GetComponent(/datum/component/fov_handler) - if(!fov_component) - return - fov_component.visual_shadow.alpha = value diff --git a/code/modules/events/space_vines/vine_structure.dm b/code/modules/events/space_vines/vine_structure.dm index ab5a1e0f87e..4b3a10d9256 100644 --- a/code/modules/events/space_vines/vine_structure.dm +++ b/code/modules/events/space_vines/vine_structure.dm @@ -7,7 +7,6 @@ anchored = TRUE density = FALSE layer = SPACEVINE_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN mouse_opacity = MOUSE_OPACITY_OPAQUE //Clicking anywhere on the turf is good enough pass_flags = PASSTABLE | PASSGRILLE max_integrity = 50 diff --git a/code/modules/food_and_drinks/machinery/food_cart.dm b/code/modules/food_and_drinks/machinery/food_cart.dm index b7a47b11d62..235b7a395ad 100644 --- a/code/modules/food_and_drinks/machinery/food_cart.dm +++ b/code/modules/food_and_drinks/machinery/food_cart.dm @@ -137,4 +137,3 @@ icon = 'icons/obj/fluff/3x3.dmi' icon_state = "stand" layer = ABOVE_MOB_LAYER//big mobs will still go over the tent, this is fine and cool - plane = GAME_PLANE_UPPER diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index 046e835c50c..1b95c69b7ae 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -146,7 +146,7 @@ build_stab_overlay() /obj/structure/punji_sticks/proc/build_stab_overlay() - stab_overlay = mutable_appearance(icon, "[icon_state]_stab", layer = ABOVE_MOB_LAYER, offset_spokesman = src, plane = GAME_PLANE_FOV_HIDDEN) + stab_overlay = mutable_appearance(icon, "[icon_state]_stab", layer = ABOVE_MOB_LAYER) /obj/structure/punji_sticks/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents) . = ..() diff --git a/code/modules/mapfluff/ruins/lavalandruin_code/watcher_grave.dm b/code/modules/mapfluff/ruins/lavalandruin_code/watcher_grave.dm index 75ac48c2467..f3b321b88b2 100644 --- a/code/modules/mapfluff/ruins/lavalandruin_code/watcher_grave.dm +++ b/code/modules/mapfluff/ruins/lavalandruin_code/watcher_grave.dm @@ -143,7 +143,6 @@ icon = 'icons/mob/simple/lavaland/lavaland_monsters.dmi' icon_state = "watcher_baby" layer = EDGED_TURF_LAYER // Don't render under lightbulbs - plane = GAME_PLANE_UPPER mouse_opacity = MOUSE_OPACITY_TRANSPARENT pixel_y = 22 alpha = 0 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 f2734bb7b05..6ce6056b477 100644 --- a/code/modules/mapfluff/ruins/objects_and_mobs/necropolis_gate.dm +++ b/code/modules/mapfluff/ruins/objects_and_mobs/necropolis_gate.dm @@ -81,7 +81,6 @@ icon = 'icons/effects/96x96.dmi' icon_state = "gate_blocker" layer = EDGED_TURF_LAYER - plane = GAME_PLANE_UPPER pixel_x = -32 pixel_y = -32 mouse_opacity = MOUSE_OPACITY_TRANSPARENT diff --git a/code/modules/mob/living/basic/guardian/guardian_types/lightning.dm b/code/modules/mob/living/basic/guardian/guardian_types/lightning.dm index 31426475754..b2ac9d66e8c 100644 --- a/code/modules/mob/living/basic/guardian/guardian_types/lightning.dm +++ b/code/modules/mob/living/basic/guardian/guardian_types/lightning.dm @@ -92,4 +92,3 @@ /obj/effect/ebeam/chain name = "lightning chain" layer = LYING_MOB_LAYER - plane = GAME_PLANE_FOV_HIDDEN diff --git a/code/modules/mob/living/basic/heretic/star_gazer.dm b/code/modules/mob/living/basic/heretic/star_gazer.dm index 8f454fd7f78..e503cd65aea 100644 --- a/code/modules/mob/living/basic/heretic/star_gazer.dm +++ b/code/modules/mob/living/basic/heretic/star_gazer.dm @@ -34,7 +34,6 @@ can_buckle_to = FALSE mob_size = MOB_SIZE_HUGE layer = LARGE_MOB_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN flags_1 = PREVENT_CONTENTS_EXPLOSION_1 ai_controller = /datum/ai_controller/basic_controller/star_gazer diff --git a/code/modules/mob/living/basic/jungle/leaper/leaper_abilities.dm b/code/modules/mob/living/basic/jungle/leaper/leaper_abilities.dm index 8ff9edd1476..efc09410db4 100644 --- a/code/modules/mob/living/basic/jungle/leaper/leaper_abilities.dm +++ b/code/modules/mob/living/basic/jungle/leaper/leaper_abilities.dm @@ -42,7 +42,6 @@ icon = 'icons/obj/weapons/guns/projectiles.dmi' icon_state = "leaper_bubble_pop" layer = ABOVE_ALL_MOB_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN duration = 3 SECONDS /obj/effect/temp_visual/leaper_projectile_impact/Initialize(mapload) @@ -160,7 +159,6 @@ icon = 'icons/obj/weapons/guns/projectiles.dmi' icon_state = "leaper" layer = ABOVE_ALL_MOB_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN duration = 1 SECONDS /obj/effect/temp_visual/blood_drop_rising/Initialize(mapload) @@ -172,7 +170,6 @@ icon = 'icons/effects/effects.dmi' icon_state = "blood_effect_falling" layer = ABOVE_ALL_MOB_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN duration = 0.7 SECONDS pixel_y = 60 diff --git a/code/modules/mob/living/basic/jungle/venus_human_trap.dm b/code/modules/mob/living/basic/jungle/venus_human_trap.dm index b59ec233bd0..f9306afe20e 100644 --- a/code/modules/mob/living/basic/jungle/venus_human_trap.dm +++ b/code/modules/mob/living/basic/jungle/venus_human_trap.dm @@ -16,7 +16,6 @@ icon = 'icons/mob/spacevines.dmi' icon_state = "bud0" layer = SPACEVINE_MOB_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN opacity = FALSE canSmoothWith = null smoothing_flags = NONE @@ -135,7 +134,6 @@ health_doll_icon = "venus_human_trap" mob_biotypes = MOB_ORGANIC | MOB_PLANT layer = SPACEVINE_MOB_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN health = 100 maxHealth = 100 obj_damage = 60 diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index b09513c42de..a613e2ad839 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -6,7 +6,6 @@ throw_speed = 3 throw_range = 5 layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER zone = BODY_ZONE_HEAD slot = ORGAN_SLOT_BRAIN organ_flags = ORGAN_ORGANIC | ORGAN_VITAL diff --git a/code/modules/mob/living/carbon/alien/adult/queen.dm b/code/modules/mob/living/carbon/alien/adult/queen.dm index df03ce3fa9e..f2093738eac 100644 --- a/code/modules/mob/living/carbon/alien/adult/queen.dm +++ b/code/modules/mob/living/carbon/alien/adult/queen.dm @@ -9,7 +9,6 @@ bubble_icon = "alienroyal" mob_size = MOB_SIZE_LARGE layer = LARGE_MOB_LAYER //above most mobs, but below speechbubbles - plane = GAME_PLANE_UPPER_FOV_HIDDEN pressure_resistance = 200 //Because big, stompy xenos should not be blown around like paper. butcher_results = list(/obj/item/food/meat/slab/xeno = 20, /obj/item/stack/sheet/animalhide/xeno = 3) @@ -23,11 +22,11 @@ /mob/living/carbon/alien/adult/royal/on_lying_down(new_lying_angle) . = ..() - SET_PLANE_IMPLICIT(src, GAME_PLANE_FOV_HIDDEN) //So it won't hide smaller mobs. + layer = LYING_MOB_LAYER /mob/living/carbon/alien/adult/royal/on_standing_up(new_lying_angle) . = ..() - SET_PLANE_IMPLICIT(src, initial(plane)) + layer = initial(layer) /mob/living/carbon/alien/adult/royal/can_inject(mob/user, target_zone, injection_flags) return FALSE diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index dad5c3b1aad..cffdd1f648f 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -22,7 +22,6 @@ tint = 3 flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH layer = MOB_LAYER - plane = GAME_PLANE_FOV_HIDDEN max_integrity = 100 item_flags = XENOMORPH_HOLDABLE var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case diff --git a/code/modules/mob/living/living_fov.dm b/code/modules/mob/living/living_fov.dm index 279e8bebe32..0f400017515 100644 --- a/code/modules/mob/living/living_fov.dm +++ b/code/modules/mob/living/living_fov.dm @@ -133,10 +133,3 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT plane = FIELD_OF_VISION_BLOCKER_PLANE screen_loc = "BOTTOM,LEFT" - -/atom/movable/screen/fov_shadow - icon = 'icons/effects/fov/field_of_view.dmi' - icon_state = "90_v" - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - plane = ABOVE_LIGHTING_PLANE - screen_loc = "BOTTOM,LEFT" diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm index 19b189de5d9..ca8478c16a0 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm @@ -25,7 +25,6 @@ pull_force = MOVE_FORCE_OVERPOWERING mob_size = MOB_SIZE_HUGE layer = LARGE_MOB_LAYER //Looks weird with them slipping under mineral walls and cameras and shit otherwise - plane = GAME_PLANE_UPPER_FOV_HIDDEN mouse_opacity = MOUSE_OPACITY_OPAQUE // Easier to click on in melee, they're giant targets anyway flags_1 = PREVENT_CONTENTS_EXPLOSION_1 /// Crusher loot dropped when the megafauna is killed with a crusher diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm index c4ab1f1c417..a3d56af8b89 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm @@ -23,7 +23,6 @@ environment_smash = ENVIRONMENT_SMASH_NONE sentience_type = SENTIENCE_BOSS layer = LARGE_MOB_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN var/mob/living/set_target var/datum/move_loop/has_target/force_move/our_loop diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm index b1430b19324..a8672c1940a 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm @@ -18,7 +18,6 @@ harm_intent_damage = 0 //Punching elites gets you nowhere stat_attack = HARD_CRIT layer = LARGE_MOB_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN sentience_type = SENTIENCE_BOSS var/chosen_attack = 1 var/list/attack_action_types = list() diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index be218941aea..245afb86932 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -9,7 +9,6 @@ /mob density = TRUE layer = MOB_LAYER - plane = GAME_PLANE_FOV_HIDDEN animate_movement = SLIDE_STEPS hud_possible = list(ANTAG_HUD) pressure_resistance = 8 diff --git a/code/modules/mod/mod_link.dm b/code/modules/mod/mod_link.dm index 8a3340fad3e..8629a75cbdf 100644 --- a/code/modules/mod/mod_link.dm +++ b/code/modules/mod/mod_link.dm @@ -47,23 +47,19 @@ if(newdir & NORTH) other_visual.pixel_y = 13 other_visual.layer = BELOW_MOB_LAYER - SET_PLANE_IMPLICIT(other_visual, GAME_PLANE_FOV_HIDDEN) if(newdir & SOUTH) other_visual.pixel_y = -24 other_visual.layer = ABOVE_ALL_MOB_LAYER - SET_PLANE_IMPLICIT(other_visual, GAME_PLANE_UPPER_FOV_HIDDEN) new_transform.Scale(-1, 1) new_transform.Translate(-1, 0) if(newdir & EAST) other_visual.pixel_x = 14 other_visual.layer = BELOW_MOB_LAYER - SET_PLANE_IMPLICIT(other_visual, GAME_PLANE_FOV_HIDDEN) new_transform.Shear(0.5, 0) new_transform.Scale(0.65, 1) if(newdir & WEST) other_visual.pixel_x = -14 other_visual.layer = BELOW_MOB_LAYER - SET_PLANE_IMPLICIT(other_visual, GAME_PLANE_FOV_HIDDEN) new_transform.Shear(-0.5, 0) new_transform.Scale(0.65, 1) other_visual.transform = new_transform diff --git a/code/modules/mod/modules/modules_supply.dm b/code/modules/mod/modules/modules_supply.dm index 3c5f89d0d1b..999502db795 100644 --- a/code/modules/mod/modules/modules_supply.dm +++ b/code/modules/mod/modules/modules_supply.dm @@ -245,7 +245,7 @@ mod.wearer.visible_message(span_warning("[mod.wearer] starts whirring!"), \ blind_message = span_hear("You hear a whirring sound.")) playsound(src, 'sound/items/modsuit/loader_charge.ogg', 75, TRUE) - lightning = mutable_appearance('icons/effects/effects.dmi', "electricity3", offset_spokesman = src, plane = GAME_PLANE_FOV_HIDDEN) + lightning = mutable_appearance('icons/effects/effects.dmi', "electricity3", layer = LOW_MOB_LAYER) mod.wearer.add_overlay(lightning) balloon_alert(mod.wearer, "you start charging...") var/power = launch_time diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 4d32559ce71..1e561c60307 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -190,7 +190,6 @@ GLOBAL_LIST_EMPTY(gravity_generators) if(count <= 3) // Their sprite is the top part of the generator part.set_density(FALSE) part.layer = WALL_OBJ_LAYER - SET_PLANE(part, GAME_PLANE_UPPER, our_turf) part.sprite_number = count part.main_part = src generator_parts += part diff --git a/code/modules/power/lighting/light.dm b/code/modules/power/lighting/light.dm index e28b9767bb1..31f1606972b 100644 --- a/code/modules/power/lighting/light.dm +++ b/code/modules/power/lighting/light.dm @@ -5,7 +5,6 @@ icon_state = "tube" desc = "A lighting fixture." layer = WALL_OBJ_LAYER - plane = GAME_PLANE_UPPER max_integrity = 100 use_power = ACTIVE_POWER_USE idle_power_usage = BASE_MACHINE_IDLE_CONSUMPTION * 0.02 diff --git a/code/modules/power/lighting/light_construct.dm b/code/modules/power/lighting/light_construct.dm index 5be904dad86..905ae72c2e3 100644 --- a/code/modules/power/lighting/light_construct.dm +++ b/code/modules/power/lighting/light_construct.dm @@ -5,7 +5,6 @@ icon_state = "tube-construct-stage1" anchored = TRUE layer = WALL_OBJ_LAYER - plane = GAME_PLANE_UPPER max_integrity = 200 armor_type = /datum/armor/structure_light_construct diff --git a/code/modules/power/supermatter/supermatter_variants.dm b/code/modules/power/supermatter/supermatter_variants.dm index 2390ab3d0b7..9d69066a535 100644 --- a/code/modules/power/supermatter/supermatter_variants.dm +++ b/code/modules/power/supermatter/supermatter_variants.dm @@ -19,7 +19,6 @@ absorption_ratio = 0.125 explosion_power = 12 layer = ABOVE_MOB_LAYER - plane = GAME_PLANE_UPPER moveable = TRUE /// Shard SM with it's processing disabled. diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 0d77e67c1e8..0df2ba2855d 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -14,7 +14,6 @@ generic_canpass = FALSE blocks_emissive = EMISSIVE_BLOCK_GENERIC layer = MOB_LAYER - plane = GAME_PLANE_FOV_HIDDEN //The sound this plays on impact. var/hitsound = 'sound/weapons/pierce.ogg' var/hitsound_wall = "" diff --git a/code/modules/projectiles/projectile/special/curse.dm b/code/modules/projectiles/projectile/special/curse.dm index 49abb8c4f3d..23df9c9c50a 100644 --- a/code/modules/projectiles/projectile/special/curse.dm +++ b/code/modules/projectiles/projectile/special/curse.dm @@ -7,7 +7,6 @@ base_icon_state = "cursehand" hitsound = 'sound/effects/curse4.ogg' layer = LARGE_MOB_LAYER - plane = GAME_PLANE_UPPER_FOV_HIDDEN damage_type = BURN damage = 10 paralyze = 20 diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index d9c75670f4e..e308d13f2cf 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -202,7 +202,6 @@ GLOBAL_VAR_INIT(bsa_unlock, FALSE) /obj/machinery/bsa/full/proc/get_layer() top_layer = mutable_appearance(icon, layer = ABOVE_MOB_LAYER) - SET_PLANE_EXPLICIT(top_layer, GAME_PLANE_UPPER, src) switch(dir) if(WEST) top_layer.icon_state = "top_west" diff --git a/code/modules/transport/tram/tram_signals.dm b/code/modules/transport/tram/tram_signals.dm index 9983b32fe33..de185cf9dcc 100644 --- a/code/modules/transport/tram/tram_signals.dm +++ b/code/modules/transport/tram/tram_signals.dm @@ -5,7 +5,6 @@ icon = 'icons/obj/tram/crossing_signal.dmi' icon_state = "crossing-inbound" base_icon_state = "crossing-inbound" - plane = GAME_PLANE_UPPER layer = TRAM_SIGNAL_LAYER max_integrity = 250 integrity_failure = 0.25 @@ -73,7 +72,7 @@ desc = "Indicates to pedestrians if it's safe to cross the tracks." icon = 'icons/obj/tram/crossing_signal.dmi' icon_state = "crossing-inbound" - plane = GAME_PLANE_UPPER + layer = TRAM_SIGNAL_LAYER max_integrity = 250 integrity_failure = 0.25 idle_power_usage = BASE_MACHINE_IDLE_CONSUMPTION * 2.4 diff --git a/code/modules/vehicles/_vehicle.dm b/code/modules/vehicles/_vehicle.dm index ca666292a3f..4eca7cd4eba 100644 --- a/code/modules/vehicles/_vehicle.dm +++ b/code/modules/vehicles/_vehicle.dm @@ -6,7 +6,6 @@ max_integrity = 300 armor_type = /datum/armor/obj_vehicle layer = VEHICLE_LAYER - plane = GAME_PLANE_FOV_HIDDEN density = TRUE anchored = FALSE blocks_emissive = EMISSIVE_BLOCK_GENERIC diff --git a/code/modules/vehicles/atv.dm b/code/modules/vehicles/atv.dm index b72449de091..aa9a963a101 100644 --- a/code/modules/vehicles/atv.dm +++ b/code/modules/vehicles/atv.dm @@ -59,22 +59,18 @@ turret.pixel_x = base_pixel_x turret.pixel_y = base_pixel_y + 4 turret.layer = ABOVE_MOB_LAYER - SET_PLANE(turret, GAME_PLANE_UPPER, our_turf) if(EAST) turret.pixel_x = base_pixel_x - 12 turret.pixel_y = base_pixel_y + 4 turret.layer = OBJ_LAYER - SET_PLANE(turret, GAME_PLANE, our_turf) if(SOUTH) turret.pixel_x = base_pixel_x turret.pixel_y = base_pixel_y + 4 turret.layer = OBJ_LAYER - SET_PLANE(turret, GAME_PLANE, our_turf) if(WEST) turret.pixel_x = base_pixel_x + 12 turret.pixel_y = base_pixel_y + 4 turret.layer = OBJ_LAYER - SET_PLANE(turret, GAME_PLANE, our_turf) /obj/vehicle/ridden/atv/welder_act(mob/living/user, obj/item/W) if(user.combat_mode) diff --git a/code/modules/vehicles/mecha/combat/savannah_ivanov.dm b/code/modules/vehicles/mecha/combat/savannah_ivanov.dm index 1aa4223b98c..c784219e3c3 100644 --- a/code/modules/vehicles/mecha/combat/savannah_ivanov.dm +++ b/code/modules/vehicles/mecha/combat/savannah_ivanov.dm @@ -147,7 +147,6 @@ chassis.movedelay = 1 chassis.density = FALSE chassis.layer = ABOVE_ALL_MOB_LAYER - SET_PLANE(chassis, GAME_PLANE_UPPER_FOV_HIDDEN, launch_turf) animate(chassis, alpha = 0, time = 8, easing = QUAD_EASING|EASE_IN, flags = ANIMATION_PARALLEL) animate(chassis, pixel_z = 400, time = 10, easing = QUAD_EASING|EASE_IN, flags = ANIMATION_PARALLEL) //Animate our rising mech (just like pods hehe) addtimer(CALLBACK(src, PROC_REF(begin_landing)), 2 SECONDS) diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 3b01e87983c..37179dd36f4 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -746,7 +746,6 @@ tilted = TRUE tilted_rotation = picked_rotation layer = ABOVE_MOB_LAYER - SET_PLANE_IMPLICIT(src, GAME_PLANE_UPPER) if(get_turf(fatty) != get_turf(src)) throw_at(get_turf(fatty), 1, 1, spin = FALSE, quickstart = FALSE) @@ -1016,7 +1015,6 @@ tilted = FALSE layer = initial(layer) - SET_PLANE_IMPLICIT(src, initial(plane)) var/matrix/to_turn = turn(transform, -tilted_rotation) animate(src, transform = to_turn, 0.2 SECONDS) diff --git a/icons/effects/fov/field_of_view.dmi b/icons/effects/fov/field_of_view.dmi index 8086773d140..8a15ae18a92 100644 Binary files a/icons/effects/fov/field_of_view.dmi and b/icons/effects/fov/field_of_view.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 43f1d3bd343..38e760ff9b0 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3543,7 +3543,6 @@ #include "code\modules\client\preferences\clothing.dm" #include "code\modules\client\preferences\darkened_flash.dm" #include "code\modules\client\preferences\food_allergy.dm" -#include "code\modules\client\preferences\fov_darkness.dm" #include "code\modules\client\preferences\fps.dm" #include "code\modules\client\preferences\gender.dm" #include "code\modules\client\preferences\ghost.dm" diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/fov_darkness.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/fov_darkness.tsx deleted file mode 100644 index 8f6073c8f65..00000000000 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/fov_darkness.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { Feature, FeatureNumberInput } from '../base'; - -export const fov_darkness: Feature = { - name: 'Field of view darkness', - category: 'GAMEPLAY', - description: - 'The density of darkness of field of vision cones you may have by wearing restrictive eye cover.', - component: FeatureNumberInput, -};