Files
Aurora.3/code/game/turfs/simulated/floor.dm
KanoandGitHub 6c27e4c3c3 Fixes exoplanet turf edge icons (#23009)
## About PR
- Fixes an issue with exoplanet turf edge icons layering below the
adjacent turfs
 
- Exoplanet turfs no longer attempt to add edge icons by default,
instead this is specified wherever it's relevant (this is still enabled
by default in base floor type, and honestly shouldn't be the case since
there's maybe 10 turf types need this vs every single turf in existence,
but i don't have the energy to go through them all)

  - Removed an icon edge irrelevant turf

- Fixes exoplanet chasm turfs appearing red (no name icon in the file)
because it was trying to add edge turfs that had no icons with that name
  
  
<img width="808" height="983" alt="Screenshot_22"
src="https://github.com/user-attachments/assets/c1605ba7-eec4-4f1e-8950-c51d943dde9e"
/>

<sub>the red eye sees all, remember our promise....</sub>
2026-08-06 09:33:13 +00:00

138 lines
3.4 KiB
Plaintext

/turf/simulated/floor
name = "plating"
desc = "The naked hull."
icon = 'icons/turf/flooring/plating.dmi'
icon_state = "plating"
is_outside = OUTSIDE_AREA
explosion_resistance = 1
// Damage to flooring.
var/broken
var/burnt
var/broken_overlay
var/burned_overlay
// Flooring data.
var/flooring_override
var/initial_flooring
var/singleton/flooring/flooring
var/mineral = MATERIAL_STEEL
thermal_conductivity = 0.040
heat_capacity = 10000
var/lava = 0
/// 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)
return "floor"
/turf/simulated/floor/disassembly_hints(mob/user, distance, is_adjacent)
. += ..()
if(flooring)
var/list/can_remove_with = list()
if(flooring.flags & TURF_REMOVE_CROWBAR)
can_remove_with += "crowbars"
if(flooring.flags & TURF_IS_FRAGILE)
can_remove_with += SPAN_WARNING("crowbars")
if(flooring.flags & TURF_REMOVE_SCREWDRIVER)
can_remove_with += "screwdrivers"
if(flooring.flags & TURF_REMOVE_SHOVEL)
can_remove_with += "shovels"
if(flooring.flags & TURF_REMOVE_WRENCH)
can_remove_with += "wrenches"
if(flooring.flags & TURF_REMOVE_WELDER)
can_remove_with += "welding tools"
if(!length(can_remove_with))
can_remove_with = "nothing!"
. += SPAN_NOTICE("\The [src] can be removed with: [english_list(can_remove_with)].")
/turf/simulated/floor/is_plating()
return !flooring
/turf/simulated/floor/Initialize(mapload, var/floortype)
. = ..()
if(!floortype && initial_flooring)
floortype = initial_flooring
if(floortype)
set_flooring(GET_SINGLETON(floortype), mapload)
/turf/simulated/floor/proc/set_flooring(singleton/flooring/newflooring, mapload)
if (!mapload)
make_plating(defer_icon_update = 1)
flooring = newflooring
if (mapload)
queue_icon_update()
else
queue_icon_update(1)
levelupdate()
//This proc will set floor_type to null and the update_icon() proc will then change the icon_state of the turf
//This proc auto corrects the grass tiles' siding.
/turf/simulated/floor/proc/make_plating(var/place_product, var/defer_icon_update)
ClearOverlays()
if(islist(decals))
decals.Cut()
decals = null
name = base_name
desc = base_desc
icon = base_icon
icon_state = base_icon_state
color = base_color
if(flooring)
flooring.on_remove()
if(flooring.build_type && place_product)
new flooring.build_type(src)
flooring = null
broken = null
burnt = null
flooring_override = null
levelupdate()
// Set light to zero, so glowing turfs cease to glow if turned into plating.
set_light(0)
// Check if this still needs to have starlight - if it does, it'll be given back its starlight.
update_starlight()
if(!defer_icon_update)
update_icon(1)
/turf/simulated/floor/levelupdate()
for(var/obj/O in src)
O.hide(O.hides_under_flooring() && src.flooring)
if(flooring)
layer = TURF_LAYER
else
layer = PLATING_LAYER
/turf/simulated/floor/is_floor()
return TRUE
/turf/simulated/floor/reset_color()
if(flooring)
color = flooring.color
else
..()
/turf/simulated/floor/shuttle_ceiling
name = "hull plating"
icon = 'icons/turf/flooring/tiles.dmi'
icon_state = "reinforced_light"
/turf/simulated/IgniteTurf(power, fire_color)
if(turf_fire)
turf_fire.AddPower(power)
return
new /obj/turf_fire(src, power, fire_color)