Skip to content

Commit

Permalink
TGS Test Merge (#6373)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Jun 4, 2024
2 parents e3808a4 + c0d3b66 commit 96457cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
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

0 comments on commit 96457cd

Please sign in to comment.