diff --git a/code/modules/mob/dead/observer/orbit.dm b/code/modules/mob/dead/observer/orbit.dm index 06e404a43555..5fe27c5e5167 100644 --- a/code/modules/mob/dead/observer/orbit.dm +++ b/code/modules/mob/dead/observer/orbit.dm @@ -65,7 +65,7 @@ var/is_admin = FALSE if(user && user.client) - is_admin = check_other_rights(user.client, R_ADMIN, FALSE) + is_admin = check_client_rights(user.client, R_ADMIN, FALSE) var/list/pois = getpois(skip_mindless = !is_admin, specify_dead_role = FALSE) for(var/name in pois) var/list/serialized = list() diff --git a/tgui/packages/tgui/interfaces/Orbit/helpers.ts b/tgui/packages/tgui/interfaces/Orbit/helpers.ts index a43aaf1ff0b0..9facaf339b29 100644 --- a/tgui/packages/tgui/interfaces/Orbit/helpers.ts +++ b/tgui/packages/tgui/interfaces/Orbit/helpers.ts @@ -31,7 +31,9 @@ export const getDisplayName = (full_name: string, nickname?: string) => { }; /** Returns the display color for certain health percentages */ -export const getHealthColor = (health: number) => { +export const getHealthColor = (health?: number) => { + if (!health) return 'bad'; + switch (true) { case health > HEALTH.Good: return 'good'; diff --git a/tgui/packages/tgui/interfaces/Orbit/index.tsx b/tgui/packages/tgui/interfaces/Orbit/index.tsx index e9e345995271..83dfe3b361b2 100644 --- a/tgui/packages/tgui/interfaces/Orbit/index.tsx +++ b/tgui/packages/tgui/interfaces/Orbit/index.tsx @@ -215,6 +215,8 @@ const ObservableItem = ( const [autoObserve] = useLocalState(context, 'autoObserve', false); + const displayHealth = typeof health === 'number'; + return (