mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01:00
up ports the TG overlays subsystem update (#18945)
* up ports the TG overlays subsystem update * . * . * . * . * for spell * . * cutting --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
ca11933fcc
commit
c7c3a151ec
@@ -66,6 +66,7 @@
|
||||
return mining_overlay_cache["[cache_id]_[direction]"]
|
||||
|
||||
/turf/simulated/wall/solidrock/update_icon(var/update_neighbors)
|
||||
cut_overlays()
|
||||
if(density)
|
||||
var/image/I
|
||||
for(var/i = 1 to 4)
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
/obj/landed_holder/proc/land_on(var/turf/T)
|
||||
//Gather destination information
|
||||
var/obj/landed_holder/new_holder = new(null)
|
||||
T.lighting_clear_overlay()
|
||||
new_holder.turf_type = T.type
|
||||
new_holder.dir = T.dir
|
||||
new_holder.icon = T.icon
|
||||
@@ -33,11 +34,12 @@
|
||||
|
||||
//Set the destination to be like us
|
||||
var/turf/simulated/shuttle/new_dest = T.ChangeTurf(my_turf.type,,1)
|
||||
my_turf.lighting_clear_overlay()
|
||||
new_dest.set_dir(my_turf.dir)
|
||||
new_dest.icon_state = my_turf.icon_state
|
||||
new_dest.icon = my_turf.icon
|
||||
new_dest.copy_overlays(my_turf, TRUE)
|
||||
new_dest.underlays = my_turf.underlays
|
||||
new_dest.underlays = my_turf.underlays.Copy()
|
||||
new_dest.decals = my_turf.decals
|
||||
//Shuttle specific stuff
|
||||
new_dest.interior_corner = my_turf.interior_corner
|
||||
@@ -45,6 +47,7 @@
|
||||
new_dest.under_turf = my_turf.under_turf
|
||||
new_dest.join_flags = my_turf.join_flags
|
||||
new_dest.join_group = my_turf.join_group
|
||||
new_dest.lighting_build_overlay()
|
||||
|
||||
// Associate the holder with the new turf.
|
||||
new_holder.my_turf = new_dest
|
||||
@@ -61,12 +64,14 @@
|
||||
//Change our source to whatever it was before
|
||||
if(turf_type)
|
||||
new_source = my_turf.ChangeTurf(turf_type,,1)
|
||||
new_source.lighting_clear_overlay()
|
||||
new_source.set_dir(dir)
|
||||
new_source.icon_state = icon_state
|
||||
new_source.icon = icon
|
||||
new_source.copy_overlays(src, TRUE)
|
||||
new_source.underlays = underlays
|
||||
new_source.underlays = underlays.Copy()
|
||||
new_source.decals = decals
|
||||
new_source.lighting_build_overlay()
|
||||
else
|
||||
new_source = my_turf.ChangeTurf(base_turf ? base_turf : get_base_turf_by_area(my_turf),,1)
|
||||
|
||||
@@ -96,19 +101,22 @@
|
||||
I.plane = PLANE_LIGHTING
|
||||
antilight_cache["[diag]"] = I
|
||||
|
||||
if(takes_underlays)
|
||||
underlay_update()
|
||||
|
||||
/turf/simulated/shuttle/Destroy()
|
||||
landed_holder = null
|
||||
return ..()
|
||||
|
||||
// For joined corners touching static lighting turfs, add an overlay to cancel out that part of our lighting overlay.
|
||||
/turf/simulated/shuttle/proc/update_breaklights()
|
||||
cut_overlay(antilight_cache["[join_flags]"], TRUE)
|
||||
cut_overlay(antilight_cache["[join_flags]"])
|
||||
if(!(join_flags in GLOB.cornerdirs)) //We're not joined at an angle
|
||||
return
|
||||
//Dynamic lighting dissolver
|
||||
var/turf/T = get_step(src, turn(join_flags,180))
|
||||
if(!T || !T.dynamic_lighting || !get_area(T).dynamic_lighting)
|
||||
add_overlay(antilight_cache["[join_flags]"], TRUE)
|
||||
add_overlay(antilight_cache["[join_flags]"])
|
||||
|
||||
/turf/simulated/shuttle/proc/underlay_update()
|
||||
if(!takes_underlays)
|
||||
|
||||
Reference in New Issue
Block a user