mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
set parent.orbiters on register (#47344)
This commit is contained in:
@@ -14,19 +14,22 @@
|
||||
|
||||
orbiters = list()
|
||||
|
||||
var/atom/master = parent
|
||||
master.orbiters = src
|
||||
|
||||
begin_orbit(orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation)
|
||||
|
||||
/datum/component/orbiter/PostTransfer()
|
||||
if(!isatom(parent) || isarea(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
/datum/component/orbiter/RegisterWithParent()
|
||||
var/atom/target = parent
|
||||
target.orbiters = src
|
||||
while(ismovableatom(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react)
|
||||
target = target.loc
|
||||
|
||||
/datum/component/orbiter/UnregisterFromParent()
|
||||
var/atom/target = parent
|
||||
target.orbiters = null
|
||||
while(ismovableatom(target))
|
||||
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
|
||||
target = target.loc
|
||||
|
||||
Reference in New Issue
Block a user