mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 15:39:57 +01:00
Misc tweaks (#3916)
changes: /obj/visual_effect has been repathed to /obj/effect/visual. Openspace movables will no longer use the space plane when on an openturf mimicing a space turf. Lights now only update on direction change if your direction actually changed. Fixed some bad set_dir() procs that were either pointless or that didn't return parent. Mapped-in or maint dirtier-spawned glowing goo no longer self-deletes after 2 minutes. Fixed an issue that may have caused some openspace movables to not properly handle direction changes.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/obj/visual_effect
|
||||
/obj/effect/visual
|
||||
name = "effect"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
anchored = 1
|
||||
@@ -10,24 +10,24 @@
|
||||
var/life_ticks_max // The high limit for the random tick picker.
|
||||
var/life_ticks_min // The low limit for the random tick picker.
|
||||
|
||||
/obj/visual_effect/New(var/life_min = 3 SECONDS, var/life_max = 5 SECONDS)
|
||||
..()
|
||||
/obj/effect/visual/Initialize(var/life_min = 3 SECONDS, var/life_max = 5 SECONDS)
|
||||
. = ..()
|
||||
life_ticks_min = life_min
|
||||
life_ticks_max = life_max
|
||||
if (!life_ticks)
|
||||
life_ticks = rand(life_ticks_min, life_ticks_max)
|
||||
|
||||
// Called when the visual_effect is manifested.
|
||||
/obj/visual_effect/proc/start()
|
||||
/obj/effect/visual/proc/start()
|
||||
|
||||
// Called every effects processor tick. Return value determines what the process does to this object.
|
||||
/obj/visual_effect/proc/tick()
|
||||
/obj/effect/visual/proc/tick()
|
||||
if (!life_ticks)
|
||||
return EFFECT_DESTROY
|
||||
|
||||
life_ticks--
|
||||
return EFFECT_CONTINUE
|
||||
|
||||
/obj/visual_effect/Destroy()
|
||||
/obj/effect/visual/Destroy()
|
||||
STOP_VISUAL(src)
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user