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:
Kashargul
2026-01-06 13:50:28 +01:00
committed by GitHub
parent ca11933fcc
commit c7c3a151ec
16 changed files with 178 additions and 249 deletions
+2
View File
@@ -44,10 +44,12 @@
gen_emissive_blocker.color = GLOB.em_block_color
gen_emissive_blocker.dir = dir
gen_emissive_blocker.appearance_flags |= appearance_flags
// Note, this should be refactored to drop priority overlays
add_overlay(list(gen_emissive_blocker), TRUE)
if(EMISSIVE_BLOCK_UNIQUE)
render_target = ref(src)
em_block = new(src, render_target)
// Note, this should be refactored to drop priority overlays
add_overlay(list(em_block), TRUE)
RegisterSignal(em_block, COMSIG_QDELETING, PROC_REF(emblocker_gc))
if(opacity)
@@ -41,6 +41,7 @@
var/mob/living/simple_mob/SM = L
SM.friends |= src.owner
// Note, this should be refactored to drop priority overlays
L.add_overlay(control_overlay, TRUE)
controlled_mobs |= L
@@ -68,7 +68,7 @@
message_admins("[key_name(user, user.client)](<A href='byond://?_src_=holder;[HrefToken()];adminmoreinfo=\ref[user]'>?</A>) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse")
target.add_overlay(image_overlay, TRUE)
target.add_overlay(image_overlay)
to_chat(user, "Bomb has been planted. Timer counting down from [timer].")
spawn(timer*10)
explode(get_turf(target))
@@ -90,7 +90,7 @@
else
target.ex_act(1)
if(target)
target.cut_overlay(image_overlay, TRUE)
target.cut_overlay(image_overlay)
qdel(src)
/obj/item/plastique/attack(mob/M as mob, mob/user as mob, def_zone)
@@ -10,7 +10,7 @@
var/turf/T = get_turf(target)
if((T.z in using_map.station_levels) || (T.z in using_map.admin_levels))
target.visible_message(span_danger("\The [src] lets out a loud beep as safeties trigger, before imploding and falling apart."))
target.cut_overlay(image_overlay, TRUE)
target.cut_overlay(image_overlay)
qdel(src)
return 0
else
@@ -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)
+12 -4
View File
@@ -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)