mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-17 18:14:25 +01:00
More helpers and a smol fix
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
if(!show_bottom_level(our_turf) && prune_on_fail) //If we cant show whats below, and we prune on fail, change the turf to plating as a fallback
|
||||
our_turf.ChangeTurf(/turf/simulated/floor/plating)
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
if(init)
|
||||
below_turf?.update_icon() // So the 'ceiling-less' overlay gets added.
|
||||
our_turf.vis_contents += below_turf
|
||||
@@ -67,11 +69,11 @@
|
||||
/datum/element/turf_z_transparency/proc/show_bottom_level(turf/our_turf)
|
||||
if(!show_bottom_level)
|
||||
return FALSE
|
||||
var/turf/path = get_base_turf(our_turf.z) || /turf/space
|
||||
var/turf/path = get_base_turf_by_area(our_turf) || /turf/space
|
||||
if(!ispath(path))
|
||||
path = text2path(path)
|
||||
if(!ispath(path))
|
||||
warning("Z-level [our_turf.z] has invalid baseturf '[get_base_turf(our_turf.z)]'")
|
||||
warning("Z-level [our_turf] has invalid baseturf '[get_base_turf_by_area(our_turf)]' in area '[get_area(our_turf)]'")
|
||||
path = /turf/space
|
||||
|
||||
var/do_plane = ispath(path, /turf/space) ? SPACE_PLANE : null
|
||||
|
||||
@@ -30,18 +30,25 @@ var/list/floor_decals = list()
|
||||
set_dir(supplied_dir) // TODO - Why can't this line be done in initialize/New()?
|
||||
var/turf/T = get_turf(src)
|
||||
if(istype(T, /turf/simulated/floor) || istype(T, /turf/unsimulated/floor) || istype(T, /turf/simulated/shuttle/floor))
|
||||
var/cache_key = "[alpha]-[color]-[dir]-[icon_state]-[T.layer]"
|
||||
var/cache_key = get_cache_key(T)
|
||||
var/image/I = floor_decals[cache_key]
|
||||
if(!I)
|
||||
I = image(icon = icon, icon_state = icon_state, dir = dir)
|
||||
I.layer = MAPPER_DECAL_LAYER
|
||||
I.color = color
|
||||
I.alpha = alpha
|
||||
I = make_decal_image()
|
||||
floor_decals[cache_key] = I
|
||||
LAZYADD(T.decals, I) // Add to its decals list (so it remembers to re-apply after it cuts overlays)
|
||||
T.add_overlay(I) // Add to its current overlays too.
|
||||
return T
|
||||
|
||||
/obj/effect/floor_decal/proc/make_decal_image()
|
||||
var/image/I = image(icon = icon, icon_state = icon_state, dir = dir)
|
||||
I.layer = MAPPER_DECAL_LAYER
|
||||
I.color = color
|
||||
I.alpha = alpha
|
||||
return I
|
||||
|
||||
/obj/effect/floor_decal/proc/get_cache_key(var/turf/T)
|
||||
return "[alpha]-[color]-[dir]-[icon_state]-[T.layer]"
|
||||
|
||||
/obj/effect/floor_decal/reset
|
||||
name = "reset marker"
|
||||
|
||||
|
||||
@@ -52,15 +52,17 @@
|
||||
/obj/machinery/ion_engine/Initialize()
|
||||
. = ..()
|
||||
controller = new(src)
|
||||
|
||||
var/image/i = image('icons/turf/shuttle_parts_vr.dmi', "ion_overlay") // VOREStation Edit
|
||||
i.plane = PLANE_LIGHTING_ABOVE // VOREStation Edit
|
||||
add_overlay(i) // VOREStation Edit
|
||||
add_glow()
|
||||
|
||||
/obj/machinery/ion_engine/Destroy()
|
||||
QDEL_NULL(controller)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/ion_engine/proc/add_glow()
|
||||
var/image/i = image('icons/turf/shuttle_parts_vr.dmi', "ion_overlay") // VOREStation Edit
|
||||
i.plane = PLANE_LIGHTING_ABOVE // VOREStation Edit
|
||||
add_overlay(i) // VOREStation Edit
|
||||
|
||||
/obj/machinery/ion_engine/proc/get_status()
|
||||
. = list()
|
||||
.+= "Location: [get_area(src)]."
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.3 KiB |
Reference in New Issue
Block a user