diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 998955107a9..61b2ecaab01 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -50,7 +50,7 @@ #define GAME_PLANE -6 #define PLATING_LAYER 1 //ABOVE PLATING - #define HOLOMAP_LAYER 1.01 + #define ABOVE_PLATING_LAYER 1.01 #define DECAL_PLATING_LAYER 1.02 #define DISPOSALS_PIPE_LAYER 1.03 #define LATTICE_LAYER 1.04 diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 0d89b1a29cf..c2d716a00b0 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -23,7 +23,9 @@ heat_capacity = 10000 var/lava = 0 - /// If the turf should generate details. Default: TRUE + /// Used for simple turf icon smoothing, which just adds edges to the turf if it's adjacent to a different type turf. + /// See `update_icon()` for the use case. + // ideally this shouldn't be true by default, not all turfs have edges var/has_edge_icon = TRUE /turf/simulated/floor/examine_descriptor(mob/user) diff --git a/code/modules/overmap/exoplanets/decor/_turfs.dm b/code/modules/overmap/exoplanets/decor/_turfs.dm index 08f160a6f82..b557916377a 100644 --- a/code/modules/overmap/exoplanets/decor/_turfs.dm +++ b/code/modules/overmap/exoplanets/decor/_turfs.dm @@ -9,6 +9,7 @@ has_resources = TRUE footstep_sound = SFX_FOOTSTEP_ASTEROID turf_flags = TURF_FLAG_BACKGROUND + has_edge_icon = FALSE var/diggable = 1 var/dirt_color = "#7c5e42" @@ -100,10 +101,13 @@ AddOverlays(resource_indicator) if(LAZYLEN(decals)) AddOverlays(decals) + + var/list/overlay_group = list() for(var/direction in GLOB.cardinals) var/turf/turf_to_check = get_step(src,direction) if(!istype(turf_to_check, type)) var/image/rock_side = image(icon, "edge[pick(0,1,2)]", dir = turn(direction, 180)) + rock_side.layer = ABOVE_PLATING_LAYER switch(direction) if(NORTH) rock_side.pixel_y += world.icon_size @@ -113,10 +117,13 @@ rock_side.pixel_x += world.icon_size if(WEST) rock_side.pixel_x -= world.icon_size - overlays += rock_side + overlay_group += rock_side + else if(update_neighbors) turf_to_check.update_icon() + AddOverlays(overlay_group) + /turf/simulated/floor/exoplanet/water/shallow name = "shallow water" desc = "Some water shallow enough to wade through." diff --git a/code/modules/overmap/exoplanets/decor/turfs/abyss.dm b/code/modules/overmap/exoplanets/decor/turfs/abyss.dm index 9574b8adee4..0298781659b 100644 --- a/code/modules/overmap/exoplanets/decor/turfs/abyss.dm +++ b/code/modules/overmap/exoplanets/decor/turfs/abyss.dm @@ -5,6 +5,7 @@ smoothing_flags = SMOOTH_TRUE | SMOOTH_BORDER | SMOOTH_NO_CLEAR_ICON smoothing_hints = SMOOTHHINT_CUT_F | SMOOTHHINT_ONLY_MATCH_TURF | SMOOTHHINT_TARGETS_NOT_UNIQUE icon_state = "smooth" + has_resources = FALSE var/static/list/forbidden_types = typecacheof(list( /obj/singularity, /obj/structure/lattice, @@ -19,7 +20,6 @@ /obj/structure/sign, /obj/structure/machinery/atmospherics/pipe )) - has_resources = FALSE /turf/simulated/floor/exoplanet/abyss/Initialize() . = ..() diff --git a/code/modules/overmap/exoplanets/decor/turfs/assunzione.dm b/code/modules/overmap/exoplanets/decor/turfs/assunzione.dm index 42ddc32b2a7..f8967b59c88 100644 --- a/code/modules/overmap/exoplanets/decor/turfs/assunzione.dm +++ b/code/modules/overmap/exoplanets/decor/turfs/assunzione.dm @@ -8,6 +8,3 @@ /turf/simulated/floor/exoplanet/assunzione/Initialize(mapload) . = ..() icon_state = "rust[rand(1,12)]" - -/turf/simulated/floor/exoplanet/assunzione/no_edge - has_edge_icon = FALSE diff --git a/code/modules/overmap/exoplanets/decor/turfs/carpet.dm b/code/modules/overmap/exoplanets/decor/turfs/carpet.dm index ee87b3eb2e3..0d83902585e 100644 --- a/code/modules/overmap/exoplanets/decor/turfs/carpet.dm +++ b/code/modules/overmap/exoplanets/decor/turfs/carpet.dm @@ -7,6 +7,7 @@ initial_flooring = /singleton/flooring/carpet footstep_sound = SFX_FOOTSTEP_CARPET has_resources = FALSE + has_edge_icon = TRUE /turf/simulated/floor/exoplanet/carpet/art icon_state = "artcarpet" diff --git a/code/modules/overmap/exoplanets/decor/turfs/grass.dm b/code/modules/overmap/exoplanets/decor/turfs/grass.dm index 0e03a36a4c7..fb00ca60f42 100644 --- a/code/modules/overmap/exoplanets/decor/turfs/grass.dm +++ b/code/modules/overmap/exoplanets/decor/turfs/grass.dm @@ -6,6 +6,7 @@ icon_state = "greygrass" color = "#799c4b" footstep_sound = SFX_FOOTSTEP_GRASS + has_edge_icon = TRUE /turf/simulated/floor/exoplanet/grass/Initialize() . = ..() @@ -36,7 +37,7 @@ icon = 'icons/turf/flooring/grass.dmi' icon_state = "grass_stalk" color = null - has_edge_icon = null + has_edge_icon = FALSE /turf/simulated/floor/exoplanet/grass/marsh name = "marshy ground" @@ -44,7 +45,7 @@ icon = 'icons/turf/fungal_marsh.dmi' icon_state = "marsh" color = null - has_edge_icon = null + has_edge_icon = FALSE footstep_sound = SFX_FOOTSTEP_WATER /turf/simulated/floor/exoplanet/grass/marsh/Initialize() diff --git a/code/modules/overmap/exoplanets/decor/turfs/konyang.dm b/code/modules/overmap/exoplanets/decor/turfs/konyang.dm index 9e1dfd07355..7bc5e756852 100644 --- a/code/modules/overmap/exoplanets/decor/turfs/konyang.dm +++ b/code/modules/overmap/exoplanets/decor/turfs/konyang.dm @@ -1,14 +1,3 @@ -/turf/simulated/floor/exoplanet/konyang - name = "dense mossy grass" - gender = PLURAL - desc = "An alien moss covers the ground." - icon = 'icons/turf/flooring/exoplanet/konyang.dmi' - icon_state = "grass" - footstep_sound = SFX_FOOTSTEP_GRASS - -/turf/simulated/floor/exoplanet/konyang/no_edge - has_edge_icon = FALSE - /obj/effect/konyang_foam name = "coastal sea foam" icon = 'icons/turf/flooring/exoplanet/konyang.dmi' @@ -31,44 +20,62 @@ icon_state = "mist_center" layer = 5.1 -/turf/simulated/floor/exoplanet/konyang/wilting//manually mapped. To be surrounded by normal grass +/turf/simulated/floor/exoplanet/konyang + name = "dense mossy grass" + gender = PLURAL + desc = "An alien moss covers the ground." + icon = 'icons/turf/flooring/exoplanet/konyang.dmi' + icon_state = "grass" + footstep_sound = SFX_FOOTSTEP_GRASS + has_edge_icon = TRUE + +/turf/simulated/floor/exoplanet/konyang/no_edge + has_edge_icon = FALSE + +// manually mapped. To be surrounded by normal grass +/turf/simulated/floor/exoplanet/konyang/wilting name = "wilting mossy grass" desc = "An alien moss covers the ground. This patch doesn't look so healthy..." icon = 'icons/turf/flooring/exoplanet/konyang/moss_transition_1.dmi' icon_state = "unsmooth" + has_edge_icon = FALSE smoothing_flags = SMOOTH_MORE | SMOOTH_BORDER | SMOOTH_NO_CLEAR_ICON canSmoothWith = list(/turf/simulated/floor/exoplanet/konyang/wilting, /turf/simulated/floor/exoplanet/konyang/pink) -/turf/simulated/floor/exoplanet/konyang/pink//manually mapped. To be surrounded by wilting grass +// manually mapped. To be surrounded by wilting grass +/turf/simulated/floor/exoplanet/konyang/pink name = "blossoming mossy grass" desc = "The moss here is blooming in a shade of pink." icon = 'icons/turf/flooring/exoplanet/konyang/moss_transition_2.dmi' icon_state = "unsmooth" + has_edge_icon = FALSE smoothing_flags = SMOOTH_TRUE -/turf/simulated/floor/exoplanet/dirt_konyang//a different path entirely so it will allow for edges to generate from grass +// a different path entirely so it will allow for edges to generate from grass +/turf/simulated/floor/exoplanet/dirt_konyang name = "compacted dirt" desc = "A patch of dirt." icon = 'icons/turf/flooring/exoplanet/konyang.dmi' icon_state = "dirt" - layer = 1.99//to let the grass edges go over it, which otherwise doesnt happen due to positioning and byond layering + layer = 1.99 // to let the grass edges go over it, which otherwise doesnt happen due to positioning and byond layering footstep_sound = SFX_FOOTSTEP_ASTEROID - has_edge_icon = FALSE -/turf/simulated/floor/exoplanet/dirt_konyang/cave - name = "dense compacted dirt" - -/turf/simulated/floor/exoplanet/dirt_konyang/cave/Initialize() // to make these tiles dark even on daytime exoplanets - . = ..() - set_light(0, 1, null) - footprint_color = null - update_icon(1) - -/turf/simulated/floor/exoplanet/dirt_konyang/sand//same as above +// same as above +/turf/simulated/floor/exoplanet/dirt_konyang/sand name = "fine coastal sand" desc = "Some fine, white sand." icon = 'icons/turf/flooring/exoplanet/konyang/konyang_beach.dmi' icon_state = "sand" footstep_sound = SFX_FOOTSTEP_ASTEROID smoothing_flags = SMOOTH_FALSE - has_edge_icon = FALSE + +/turf/simulated/floor/exoplanet/dirt_konyang/cave + name = "dense compacted dirt" + +// to make these tiles dark even on daytime exoplanets +/turf/simulated/floor/exoplanet/dirt_konyang/cave/Initialize() + . = ..() + set_light(0, 1, null) + footprint_color = null + update_icon(1) + diff --git a/code/modules/overmap/exoplanets/decor/turfs/mineral.dm b/code/modules/overmap/exoplanets/decor/turfs/mineral.dm index 1c4f81a4487..a4dceba677e 100644 --- a/code/modules/overmap/exoplanets/decor/turfs/mineral.dm +++ b/code/modules/overmap/exoplanets/decor/turfs/mineral.dm @@ -11,7 +11,6 @@ icon = 'icons/turf/flooring/ice_cavern.dmi' icon_state = "icy_rock" temperature = T0C - 5 - has_edge_icon = FALSE /turf/simulated/floor/exoplanet/mineral/adhomai/Initialize(mapload) . = ..() diff --git a/html/changelogs/kano-exoplanet-turf-icon-fix.yml b/html/changelogs/kano-exoplanet-turf-icon-fix.yml new file mode 100644 index 00000000000..1d702cdf780 --- /dev/null +++ b/html/changelogs/kano-exoplanet-turf-icon-fix.yml @@ -0,0 +1,5 @@ +author: kano +delete-after: True +changes: + - bugfix: "Fixed an issue with exoplanet turf edge icons layering below the adjacent turfs." + - code_imp: "Exoplanet turfs no longer attempt to add edge icons by default." diff --git a/maps/away/away_site/assunzione/port_volturno/port_volturno.dmm b/maps/away/away_site/assunzione/port_volturno/port_volturno.dmm index f5035960725..cccf5a98e5c 100644 --- a/maps/away/away_site/assunzione/port_volturno/port_volturno.dmm +++ b/maps/away/away_site/assunzione/port_volturno/port_volturno.dmm @@ -15427,7 +15427,7 @@ pixel_y = 24; density = 0 }, -/turf/simulated/floor/exoplanet/assunzione/no_edge, +/turf/simulated/floor/exoplanet/assunzione, /area/port_volturno/interior/witch_hand/bar) "kQv" = ( /obj/structure/stairs/west, @@ -20786,7 +20786,7 @@ /obj/effect/decal/curb/corner{ dir = 8 }, -/turf/simulated/floor/exoplanet/assunzione/no_edge, +/turf/simulated/floor/exoplanet/assunzione, /area/port_volturno/interior/witch_hand/bar) "owW" = ( /obj/structure/machinery/papershredder{ @@ -32557,7 +32557,7 @@ /obj/structure/table/reinforced/wood{ pixel_y = 3 }, -/turf/simulated/floor/exoplanet/assunzione/no_edge, +/turf/simulated/floor/exoplanet/assunzione, /area/port_volturno/interior/witch_hand/bar) "wKA" = ( /obj/effect/decal/cleanable/dirt,