mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
Orbits are now a subsystem (#20632)
* Sleepless perfect orbits #MOGA We bind to Moved() and use datums and lists to track the orbits, no more sleeps, no more delay. * Adds some null checks to orbit checks * Forget to set orbiting. Also sets orbiters before orbiting, to avoid edge cases of deleting a list then recreating it. * Improves orbit, adds subsystem for orbits. Most orbit loc changes will happen on move, subsystem runs every 2 ticks to make up for when that isn't the case.
This commit is contained in:
committed by
oranges
parent
fa5c08442d
commit
f71dc2c9a3
@@ -95,7 +95,7 @@
|
||||
</span>"
|
||||
|
||||
if(wisp.orbiting)
|
||||
var/atom/A = wisp.orbiting
|
||||
var/atom/A = wisp.orbiting.orbiting
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/M = A
|
||||
M.sight &= ~SEE_MOBS
|
||||
@@ -534,8 +534,15 @@
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/contents = T.GetAllContents()
|
||||
var/mob/dead/observer/current_spirits = list()
|
||||
for(var/mob/dead/observer/G in dead_mob_list)
|
||||
if(G.orbiting in contents)
|
||||
var/list/orbiters = list()
|
||||
for(var/thing in contents)
|
||||
var/atom/A = thing
|
||||
if (A.orbiters)
|
||||
orbiters += A.orbiters
|
||||
|
||||
for(var/thing in orbiters)
|
||||
if (isobserver(thing))
|
||||
var/mob/dead/observer/G = thing
|
||||
ghost_counter++
|
||||
G.invisibility = 0
|
||||
current_spirits |= G
|
||||
|
||||
Reference in New Issue
Block a user