Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xeno Orbit Menu #6373

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/modules/mob/dead/observer/orbit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
var/datum/caste_datum/caste = xeno.caste
serialized["caste"] = caste.caste_type
serialized["icon"] = caste.minimap_icon
serialized["hivenumber"] = xeno.hivenumber
xenos += list(serialized)
continue

Expand Down
12 changes: 10 additions & 2 deletions tgui/packages/tgui/interfaces/Orbit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,25 @@ const ObservableSearch = () => {
const xenoSplitter = (members: Array<Observable>) => {
const primeHive: Array<Observable> = [];
const corruptedHive: Array<Observable> = [];
const forsakenHive: Array<Observable> = [];
const otherHives: Array<Observable> = [];

members.forEach((x) => {
if (x.full_name?.includes('Corrupted')) {
if (x.hivenumber?.includes('normal')) {
primeHive.push(x);
} else if (x.hivenumber?.includes('corrupted')) {
corruptedHive.push(x);
} else if (x.hivenumber?.includes('forsaken')) {
forsakenHive.push(x);
} else {
primeHive.push(x);
otherHives.push(x);
}
});
const squads = [
buildSquadObservable('Prime', 'xeno', primeHive),
buildSquadObservable('Corrupted', 'green', corruptedHive),
buildSquadObservable('Forsaken', 'grey', forsakenHive),
buildSquadObservable('Other', 'light-grey', otherHives),
];
return squads;
};
Expand Down
1 change: 1 addition & 0 deletions tgui/packages/tgui/interfaces/Orbit/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export type Observable = {
nickname?: string;
orbiters?: number;
ref: string;
hivenumber: string;
};

export type SquadObservable = {
Expand Down
Loading