Skip to content

Commit

Permalink
Separates Factions In Observe/Follow Tab (#5058)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->

# About the pull request

Separates the factions from a generic 'ERT Faction' tab into their own
separate one's for each of the main factions, this includes.

- WY
- UPP
- CLF
- Freelancers
- Mercenaries
- Contractors
- Dutch's Dozen
- TWE RMC
- CMB Marshals

The remaining factions (mostly memes, unused or admin ones) are kept in
the current 'ERT' panel.

# Explain why it's good for the game

Better gauge as a observer who the present factions are, helps in the
uncommon circumstances where multiple factions are in play.


# Testing Photographs and Procedure
<!-- Include any screenshots/videos/debugging steps of the modified code
functioning successfully, ideally including edge cases. -->
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
label your changes in the changelog. Please note that maintainers freely
reserve the right to remove and add tags should they deem it
appropriate. You can attempt to finagle the system all you want, but
it's best to shoot for clear communication right off the bat. -->
<!-- If you add a name after the ':cl', that name will be used in the
changelog. You must add your CKEY after the CL if your GitHub name
doesn't match. Maintainers freely reserve the right to remove and add
tags should they deem it appropriate. -->

:cl:
add: Factions are now properly separated in the observe menu as a ghost.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! -->

---------

Co-authored-by: Steelpoint <[email protected]>
  • Loading branch information
Steelpoint and Steelpoint authored Dec 21, 2023
1 parent 4158cdb commit df6fce4
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 2 deletions.
10 changes: 9 additions & 1 deletion code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,16 @@ GLOBAL_LIST_INIT(whitelist_hierarchy, list(WHITELIST_NORMAL, WHITELIST_COUNCIL,

#define FACTION_LIST_MARINE list(FACTION_MARINE)
#define FACTION_LIST_HUMANOID list(FACTION_MARINE, FACTION_PMC, FACTION_WY, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_MARSHAL, FACTION_UPP, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE, FACTION_TWE)
#define FACTION_LIST_ERT list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_MARSHAL, FACTION_TWE)
#define FACTION_LIST_ERT list(FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO)
#define FACTION_LIST_WY list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_UPP list(FACTION_UPP)
#define FACTION_LIST_CLF list(FACTION_CLF)
#define FACTION_LIST_TWE list(FACTION_TWE)
#define FACTION_LIST_FREELANCER list(FACTION_FREELANCER)
#define FACTION_LIST_CONTRACTOR list(FACTION_CONTRACTOR)
#define FACTION_LIST_MERCENARY list(FACTION_MERCENARY)
#define FACTION_LIST_MARSHAL list(FACTION_MARSHAL)
#define FACTION_LIST_DUTCH list(FACTION_DUTCH)
#define FACTION_LIST_MARINE_WY list(FACTION_MARINE, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_MARINE_UPP list(FACTION_MARINE, FACTION_UPP)
#define FACTION_LIST_MARINE_TWE list(FACTION_MARINE, FACTION_TWE)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/contractor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
rank = JOB_CONTRACTOR
idtype = /obj/item/card/id/data
faction = FACTION_CONTRACTOR
faction_group = FACTION_LIST_ERT
faction_group = list(FACTION_CONTRACTOR)
languages = list(LANGUAGE_ENGLISH, LANGUAGE_SPANISH, LANGUAGE_RUSSIAN)
var/human_versus_human = FALSE
var/headset_type = /obj/item/device/radio/headset/distress/contractor
Expand Down
36 changes: 36 additions & 0 deletions code/modules/mob/dead/observer/orbit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@
var/list/survivors = list()
var/list/xenos = list()
var/list/ert_members = list()
var/list/upp = list()
var/list/clf = list()
var/list/wy = list()
var/list/twe = list()
var/list/freelancer = list()
var/list/contractor = list()
var/list/mercenary = list()
var/list/dutch = list()
var/list/marshal = list()
var/list/synthetics = list()
var/list/predators = list()
var/list/animals = list()
Expand Down Expand Up @@ -132,12 +141,30 @@

if(SSticker.mode.is_in_endgame == TRUE && !is_mainship_level(M.z) && !(human.faction in FACTION_LIST_ERT))
escaped += list(serialized)
else if(human.faction in FACTION_LIST_WY)
wy += list(serialized)
else if(issynth(human) && !isinfiltratorsynthetic(human))
synthetics += list(serialized)
else if(isyautja(human))
predators += list(serialized)
else if(human.faction in FACTION_LIST_ERT)
ert_members += list(serialized)
else if(human.faction in FACTION_LIST_UPP)
upp += list(serialized)
else if(human.faction in FACTION_LIST_CLF)
clf += list(serialized)
else if(human.faction in FACTION_LIST_TWE)
twe += list(serialized)
else if(human.faction in FACTION_LIST_FREELANCER)
freelancer += list(serialized)
else if(human.faction in FACTION_LIST_CONTRACTOR)
contractor += list(serialized)
else if(human.faction in FACTION_LIST_MERCENARY)
mercenary += list(serialized)
else if(human.faction in FACTION_LIST_MARSHAL)
marshal += list(serialized)
else if(human.faction in FACTION_LIST_DUTCH)
dutch += list(serialized)
else if(human.faction in FACTION_LIST_MARINE)
marines += list(serialized)
else if(issurvivorjob(human.job))
Expand All @@ -156,6 +183,15 @@
data["survivors"] = survivors
data["xenos"] = xenos
data["ert_members"] = ert_members
data["upp"] = upp
data["clf"] = clf
data["wy"] = wy
data["twe"] = twe
data["freelancer"] = freelancer
data["contractor"] = contractor
data["mercenary"] = mercenary
data["dutch"] = dutch
data["marshal"] = marshal
data["synthetics"] = synthetics
data["predators"] = predators
data["animals"] = animals
Expand Down
46 changes: 46 additions & 0 deletions tgui/packages/tgui/interfaces/Orbit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ const ObservableContent = (props, context) => {
survivors = [],
xenos = [],
ert_members = [],
upp = [],
clf = [],
wy = [],
twe = [],
freelancer = [],
mercenary = [],
contractor = [],
dutch = [],
marshal = [],
synthetics = [],
predators = [],
animals = [],
Expand Down Expand Up @@ -145,6 +154,43 @@ const ObservableContent = (props, context) => {
section={synthetics}
title="Synthetics"
/>
<ObservableSection
color="green"
section={upp}
title="Union of Progressive Peoples"
/>
<ObservableSection
color="teal"
section={clf}
title="Colonial Liberation Front"
/>
<ObservableSection color="white" section={wy} title="Weyland Yutani" />
<ObservableSection
color="red"
section={twe}
title="Royal Marines Commando"
/>
<ObservableSection
color="orange"
section={freelancer}
title="Freelancers"
/>
<ObservableSection
color="label"
section={mercenary}
title="Mercenaries"
/>
<ObservableSection
color="light-grey"
section={contractor}
title="Military Contractors"
/>
<ObservableSection color="good" section={dutch} title="Dutchs Dozen" />
<ObservableSection
color="dark-blue"
section={marshal}
title="Colonial Marshal Bureau"
/>
<ObservableSection color="green" section={predators} title="Predators" />
<ObservableSection color="olive" section={escaped} title="Escaped" />
<ObservableSection section={vehicles} title="Vehicles" />
Expand Down
9 changes: 9 additions & 0 deletions tgui/packages/tgui/interfaces/Orbit/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ export type OrbitData = {
survivors: Observable[];
xenos: Observable[];
ert_members: Observable[];
upp: Observable[];
twe: Observable[];
clf: Observable[];
wy: Observable[];
freelancer: Observable[];
contractor: Observable[];
mercenary: Observable[];
dutch: Observable[];
marshal: Observable[];
synthetics: Observable[];
predators: Observable[];
animals: Observable[];
Expand Down

0 comments on commit df6fce4

Please sign in to comment.