diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index a04df4f373b..028c05cca76 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -771,8 +771,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define STABILIZED_LIGHT_PINK_TRAIT "stabilized_light_pink" /// Given by the multiple_lives component to the previous body of the mob upon death. #define EXPIRED_LIFE_TRAIT "expired_life" -/// Trait given to a ghost when they orbit something. -#define GHOST_ORBITING_TRAIT "ghost_orbiting" +/// Trait given to an atom/movable when they orbit something. +#define ORBITING_TRAIT "orbiting" /** * Trait granted by [/mob/living/carbon/Initialize] and diff --git a/code/datums/components/orbiter.dm b/code/datums/components/orbiter.dm index 2eeae48436c..d748e31e289 100644 --- a/code/datums/components/orbiter.dm +++ b/code/datums/components/orbiter.dm @@ -69,6 +69,8 @@ orbiter.orbiting.end_orbit(orbiter) orbiter_list[orbiter] = TRUE orbiter.orbiting = src + + ADD_TRAIT(orbiter, TRAIT_NO_FLOATING_ANIM, ORBITING_TRAIT) RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, .proc/orbiter_move_react) SEND_SIGNAL(parent, COMSIG_ATOM_ORBIT_BEGIN, orbiter) @@ -118,6 +120,8 @@ orbiter_mob.updating_glide_size = TRUE orbiter_mob.glide_size = 8 + REMOVE_TRAIT(orbiter, TRAIT_NO_FLOATING_ANIM, ORBITING_TRAIT) + if(!refreshing && !length(orbiter_list) && !QDELING(src)) qdel(src) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 69b86fb7bab..c4db965fa45 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -493,14 +493,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/orbit() setDir(2)//reset dir so the right directional sprites show up - ADD_TRAIT(src, TRAIT_NO_FLOATING_ANIM, GHOST_ORBITING_TRAIT) return ..() /mob/dead/observer/stop_orbit(datum/component/orbiter/orbits) . = ..() //restart our floating animation after orbit is done. pixel_y = base_pixel_y - REMOVE_TRAIT(src, TRAIT_NO_FLOATING_ANIM, GHOST_ORBITING_TRAIT) /mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak set category = "Ghost"