mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-03 12:50:36 +00:00
* Added "Display Initialize() Log" admin debug command so you can see it mid-round. * Ported the core of the overlays management subsystem from /tg - Added SSoverlays subsystem for compiling overlay lists and applying them to atoms in a controlled anti-lag subsystem. - Added vars and procs to atom which should eventually replace all direct interaction with BYOND's /atom/overlays var outside the subsystem. - Added OVERLAY_QUEUED flag to var/atom/flags bitfield. - Added small framework for subsystem performance tracking. So far used only by SSoverlays - Added admin debug command "Display overlay Log" to see performance stats mid-round. * Fix runtime on universal pipe adaptor update_icons * Workaround for appearance_bro not initialized Unfortuantely BYOND's initialization order is strange, and the appearance_bro var is only half initialized when map starts to load, causing errors. We temporarily fix by moving it to be a global-scoped global. * Convert fire alarms to use add_overlay() A good first test. * Convert turfs to use add_overlays(), eliminating the turf_overlay_holder! - Converted as much as I could find about turf overlays to use add_overlay(). - This should be enough to stop BYOND from crashing, so we can eliminate the turf_overlay_holder hack. - This also lets us remove the anti-corruption hacks from walls and open space. - ZAS gas overlays can use priority overlays, so this also fixes the gas-goes-away-when-crowbarring-plating issue. - Stuff like that * Convert turf overlay interactions to use add_overlay. Note: This is a plain and simple conversion of existing code to use SSoverlays. However I look at the line changed, and note that that line likely never fully worked as intended, as it has no way of re-applying itself. I would make it use a priority overlay, but there is no code present for *removing* said overlay from neighbors when it is no longer required. That code should be implemented by original author.
84 lines
2.1 KiB
Plaintext
84 lines
2.1 KiB
Plaintext
/turf/simulated/floor
|
|
name = "plating"
|
|
desc = "Unfinished flooring."
|
|
icon = 'icons/turf/flooring/plating.dmi'
|
|
icon_state = "plating"
|
|
|
|
// Damage to flooring.
|
|
var/broken
|
|
var/burnt
|
|
|
|
// Plating data.
|
|
var/base_name = "plating"
|
|
var/base_desc = "The naked hull."
|
|
var/base_icon = 'icons/turf/flooring/plating.dmi'
|
|
var/base_icon_state = "plating"
|
|
var/static/list/base_footstep_sounds = list("human" = list(
|
|
'sound/effects/footstep/plating1.ogg',
|
|
'sound/effects/footstep/plating2.ogg',
|
|
'sound/effects/footstep/plating3.ogg',
|
|
'sound/effects/footstep/plating4.ogg',
|
|
'sound/effects/footstep/plating5.ogg'))
|
|
|
|
// Flooring data.
|
|
var/flooring_override
|
|
var/initial_flooring
|
|
var/decl/flooring/flooring
|
|
var/mineral = DEFAULT_WALL_MATERIAL
|
|
|
|
thermal_conductivity = 0.040
|
|
heat_capacity = 10000
|
|
var/lava = 0
|
|
|
|
/turf/simulated/floor/is_plating()
|
|
return !flooring
|
|
|
|
/turf/simulated/floor/New(var/newloc, var/floortype)
|
|
..(newloc)
|
|
if(!floortype && initial_flooring)
|
|
floortype = initial_flooring
|
|
if(floortype)
|
|
set_flooring(get_flooring_data(floortype))
|
|
else
|
|
footstep_sounds = base_footstep_sounds
|
|
|
|
/turf/simulated/floor/proc/set_flooring(var/decl/flooring/newflooring)
|
|
make_plating(defer_icon_update = 1)
|
|
flooring = newflooring
|
|
footstep_sounds = newflooring.footstep_sounds
|
|
update_icon(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)
|
|
|
|
cut_overlays()
|
|
if(islist(decals))
|
|
decals.Cut()
|
|
decals = null
|
|
|
|
name = base_name
|
|
desc = base_desc
|
|
icon = base_icon
|
|
icon_state = base_icon_state
|
|
footstep_sounds = base_footstep_sounds
|
|
|
|
if(flooring)
|
|
if(flooring.build_type && place_product)
|
|
new flooring.build_type(src)
|
|
flooring = null
|
|
|
|
set_light(0)
|
|
broken = null
|
|
burnt = null
|
|
flooring_override = null
|
|
levelupdate()
|
|
|
|
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)
|