mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-17 10:57:19 +01:00
eebb8b971c
Soft-ish port of https://github.com/NebulaSS13/Nebula/pull/540. Except we call them singletons. Repaths all materials as singletons instead of datums, and replaces material defines from strings to paths so that we can just run GET_SINGLETON instead of needing to use SSMaterials. This is Step One. This PR has no player-facing changes. changes: - refactor: "Repaths /material to /singleton/material." - refactor: "Replaces all material string defines to path defines, replacing SSmaterials procs w/ GET_SINGLETON instead." - refactor: "Removes all material var edited objects from all maps, adding new presets where necessary." - refactor: "Updates recipes unit test to run all recipes against all material singletons." --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com> Co-authored-by: kano-dot <bhutanlikanoxy@gmail.com>
136 lines
3.3 KiB
Plaintext
136 lines
3.3 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
|
|
|
|
/// If the turf should generate details. Default: TRUE
|
|
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)
|