Add 'antilight' overlay on corner turfs to make them look good

This commit is contained in:
Aronai Sieyes
2020-03-13 13:47:56 -04:00
parent 0ae769aea3
commit cb6fd27d45
2 changed files with 18 additions and 1 deletions

View File

@@ -83,6 +83,16 @@
var/turf/under_turf //Underlay override turf path. var/turf/under_turf //Underlay override turf path.
var/join_flags = 0 //Bitstring to represent adjacency of joining walls 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/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() /turf/simulated/shuttle/Destroy()
landed_holder = null landed_holder = null
@@ -143,13 +153,20 @@
under_ma = new(under) under_ma = new(under)
if(under_ma) 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.icon_state = "white"
under_ma.plane = SPACE_PLANE under_ma.plane = SPACE_PLANE
us.underlays = list(under_ma) us.underlays = list(under_ma)
appearance = us 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 return under
/turf/simulated/shuttle/floor /turf/simulated/shuttle/floor

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB