Transform cone prettier

This commit is contained in:
Aronai Sieyes
2021-06-25 11:06:52 -04:00
parent 525639a2be
commit 1983be6a12
3 changed files with 33 additions and 10 deletions
+1 -5
View File
@@ -116,14 +116,10 @@
. = ..()
vis_contents += light_spot
/obj/effect/abstract/directional_lighting/proc/face_light(atom/movable/source, distance)
/obj/effect/abstract/directional_lighting/proc/face_light(atom/movable/source, angle, distance)
if(!loc) // We're in nullspace
return
var/turf/Ts = get_turf(source)
var/turf/To = get_turf(src)
var/angle = Get_Angle(Ts, To)
// Save ourselves some matrix math
if(angle != trans_angle)
trans_angle = angle
+14
View File
@@ -161,6 +161,20 @@
alpha = 110
blocks_emissive = FALSE
var/static/matrix/normal_transform
/obj/effect/overlay/light_cone/Initialize()
. = ..()
apply_standard_transform()
/obj/effect/overlay/light_cone/proc/reset_transform(apply_standard)
transform = initial(transform)
if(apply_standard)
apply_standard_transform()
/obj/effect/overlay/light_cone/proc/apply_standard_transform()
transform = transform.Translate(-32, -32)
/obj/effect/overlay/light_cone/Destroy(force)
if(!force)
stack_trace("Directional light cone deleted, but not by our component")