mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 21:19:44 +01:00
Transform cone prettier
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user