mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Add 'antilight' overlay on corner turfs to make them look good
This commit is contained in:
@@ -83,6 +83,16 @@
|
||||
var/turf/under_turf //Underlay override turf path.
|
||||
var/join_flags = 0 //Bitstring to represent adjacency of joining walls
|
||||
var/join_group = "shuttle" //A tag for what other walls to join with. Null if you don't want them to.
|
||||
var/static/list/antilight_cache
|
||||
|
||||
/turf/simulated/shuttle/New()
|
||||
..()
|
||||
if(!antilight_cache)
|
||||
antilight_cache = list()
|
||||
for(var/diag in cornerdirs)
|
||||
var/image/I = image(LIGHTING_ICON, null, icon_state = "diagonals", layer = 10, dir = diag)
|
||||
I.plane = PLANE_LIGHTING
|
||||
antilight_cache["[diag]"] = I
|
||||
|
||||
/turf/simulated/shuttle/Destroy()
|
||||
landed_holder = null
|
||||
@@ -143,13 +153,20 @@
|
||||
under_ma = new(under)
|
||||
|
||||
if(under_ma)
|
||||
if(ispath(under,/turf/space)) //Scramble space turfs
|
||||
if(ispath(under,/turf/space)) //Space gets weird treatment
|
||||
under_ma.icon_state = "white"
|
||||
under_ma.plane = SPACE_PLANE
|
||||
us.underlays = list(under_ma)
|
||||
|
||||
appearance = us
|
||||
|
||||
//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)
|
||||
else
|
||||
cut_overlay(antilight_cache["[join_flags]"], TRUE)
|
||||
|
||||
return under
|
||||
|
||||
/turf/simulated/shuttle/floor
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.7 KiB |
Reference in New Issue
Block a user