Role Types (#33420)

* mindcomponent namespace

* wip MindRole stuff

* admin player tab

* mindroletype comment

* mindRolePrototype redesign

* broken param

* wip RoleType implementation

* basic role type switching for antags

* traitor fix

* fix AdminPanel update

* the renameningTM

* cleanup

* feature uncreeping

* roletypes on mind roles

* update MindComponent.RoleType when MindRoles change

* ghostrole configuration

* ghostrole config improvements

* live update of roleType on the character window

* logging stuff and notes

* remove thing no one asked for

* weh

* Mind Role Entities wip

* headrev count fix

* silicon stuff, cleanup

* exclusive antag config, cleanup

* jobroleadd overwerite

* logging stuff

* MindHasRole cleanup, admin log stuff

* last second cleanup

* ocd

* move roletypeprototype to its own file, minor note stuff

* remove Roletype.Created

* log stuff

* roletype setup for ghostroles and autotraitor reinforcements

* ghostrole type configs

* adjustable admin overlay

* cleanup

* fix this in its own PR

* silicon antagonist

* borg stuff

* mmi roletype handling

* spawnable borg roletype handling

* weh

* ghost role cleanup

* weh

* RoleEvent update

* polish

* log stuff

* admin overlay config

* ghostrolecomponent cleanup

* weh

* admin overlay code cleanup

* minor cleanup

* Obsolete MindRoleAddedEvent

* comment

* minor code cleanup

* MindOnDoGreeting fix

* Role update message

* fix duplicate job greeting for cyborgs

* fix emag job message dupe

* nicer-looking role type update

* crew aligned

* syndicate assault borg role fix

* fix test fail

* fix a merge mistake

* fix LoneOp role type

* Update Content.Client/Administration/AdminNameOverlay.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Shared/Roles/SharedRoleSystem.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* comment formatting

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* change logging category

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* fix a space

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* use MindAddRoles

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* get MindComponent from TryGetMind

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* move var declaration outside loop

* remove TryComp

* take RoleEnum behind the barn

* don't use ensurecomp unnecessarily

* cvar comments

* toggleableghostrolecomponent documentation

* skrek

* use EntProtoId

* mindrole config

* merge baserolecomponent into basemindrolecomponent

* ai and borg silicon role tweaks

* formatting

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* I will end you (the color)

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* use LocId type for a locale id

* update RoleEvent documentation

* update RoleEvent documentation

* remove obsolete MindRoleAddedEvent

* refine MindRolesUpdate()

* use dependency

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* inject dependency

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* roleType.Name no longer required

* reformatted draw code logic

* GhostRoleMarkerRoleComponent comment

* minor SharedRoleSystem cleanup

* StartingMindRoleComponent, unhardcode roundstart silicon

* Update Content.Shared/Roles/SharedRoleSystem.cs

* remove a whitespace

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
Errant
2025-01-11 22:17:26 +01:00
committed by GitHub
parent 3da354304d
commit 46d58bf22a
65 changed files with 744 additions and 106 deletions

View File

@@ -19,6 +19,8 @@
name: ghost-role-information-rat-king-name
description: ghost-role-information-rat-king-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
raffle:
settings: default
- type: GhostRoleMobSpawner
@@ -40,6 +42,8 @@
name: ghost-role-information-remilia-name
description: ghost-role-information-remilia-description
rules: ghost-role-information-familiar-rules
mindRoles:
- MindRoleGhostRoleFamiliar
raffle:
settings: short
- type: GhostRoleMobSpawner
@@ -61,6 +65,8 @@
name: ghost-role-information-cerberus-name
description: ghost-role-information-cerberus-description
rules: ghost-role-information-familiar-rules
mindRoles:
- MindRoleGhostRoleFamiliar
raffle:
settings: default
- type: GhostRoleMobSpawner
@@ -81,6 +87,8 @@
components:
- type: GhostRole
rules: ghost-role-information-rules-default-team-antagonist
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: default
- type: GhostRoleMobSpawner
@@ -101,6 +109,8 @@
name: ghost-role-information-loneop-name
description: ghost-role-information-loneop-description
rules: ghost-role-information-loneop-rules
mindRoles:
- MindRoleGhostRoleSoloAntagonist
- type: Sprite
sprite: Markers/jobs.rsi
layers:
@@ -117,6 +127,8 @@
name: roles-antag-nuclear-operative-commander-name
description: roles-antag-nuclear-operative-commander-objective
rules: ghost-role-information-rules-default-team-antagonist
mindRoles:
- MindRoleGhostRoleTeamAntagonist
- type: entity
categories: [ HideSpawnMenu, Spawner ]
@@ -127,6 +139,8 @@
name: roles-antag-nuclear-operative-agent-name
description: roles-antag-nuclear-operative-agent-objective
rules: ghost-role-information-rules-default-team-antagonist
mindRoles:
- MindRoleGhostRoleTeamAntagonist
- type: entity
categories: [ HideSpawnMenu, Spawner ]
@@ -137,6 +151,8 @@
name: roles-antag-nuclear-operative-name
description: roles-antag-nuclear-operative-objective
rules: ghost-role-information-rules-default-team-antagonist
mindRoles:
- MindRoleGhostRoleTeamAntagonist
- type: entity
categories: [ HideSpawnMenu, Spawner ]
@@ -147,6 +163,8 @@
name: ghost-role-information-space-dragon-name
description: ghost-role-information-space-dragon-description
rules: ghost-role-information-space-dragon-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
- type: Sprite
layers:
- state: green
@@ -162,6 +180,8 @@
name: ghost-role-information-space-ninja-name
description: ghost-role-information-space-ninja-description
rules: ghost-role-information-antagonist-rules
mindRoles:
- MindRoleGhostRoleSoloAntagonist
raffle:
settings: default
- type: Sprite

View File

@@ -313,6 +313,7 @@
access: [["SyndicateAgent"], ["NuclearOperative"]]
- type: SiliconLawProvider
laws: SyndicateStatic
subverted: true
- type: IntrinsicRadioTransmitter
channels:
- Binary

View File

@@ -443,6 +443,8 @@
name: ghost-role-information-mothroach-name
description: ghost-role-information-mothroach-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
- type: Fixtures
fixtures:
fix1:
@@ -1403,6 +1405,9 @@
name: ghost-role-information-monkey-name
description: ghost-role-information-monkey-description
rules: ghost-role-information-syndicate-reinforcement-rules
mindRoles:
# This is for syndicate monkeys that randomly gain sentience, thus have no summoner to team with
- MindRoleGhostRoleSoloAntagonist
raffle:
settings: default
- type: GhostTakeoverAvailable
@@ -1610,6 +1615,8 @@
name: ghost-role-information-mouse-name
description: ghost-role-information-mouse-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
- type: GhostTakeoverAvailable
- type: Speech
speechSounds: Squeak
@@ -2397,6 +2404,8 @@
name: ghost-role-information-giant-spider-name
description: ghost-role-information-giant-spider-description
rules: ghost-role-information-giant-spider-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: short
- type: GhostTakeoverAvailable
@@ -2968,6 +2977,8 @@
allowMovement: true
description: ghost-role-information-SyndiCat-description
rules: ghost-role-information-SyndiCat-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: default
- type: GhostTakeoverAvailable

View File

@@ -11,6 +11,8 @@
name: ghost-role-information-behonker-name
description: ghost-role-information-behonker-description
rules: ghost-role-information-antagonist-rules
mindRoles:
- MindRoleGhostRoleSoloAntagonist
raffle:
settings: default
- type: GhostTakeoverAvailable

View File

@@ -170,6 +170,8 @@
name: ghost-role-information-sentient-carp-name
description: ghost-role-information-sentient-carp-description
rules: ghost-role-information-space-dragon-summoned-carp-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: short
- type: GhostTakeoverAvailable

View File

@@ -232,6 +232,8 @@
prob: 0
description: ghost-role-information-angry-slimes-description
rules: ghost-role-information-angry-slimes-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: short
- type: NpcFactionMember

View File

@@ -13,6 +13,8 @@
name: ghost-role-information-hellspawn-name
description: ghost-role-information-hellspawn-description
rules: ghost-role-information-antagonist-rules
mindRoles:
- MindRoleGhostRoleSoloAntagonist
raffle:
settings: default
- type: RotationVisuals

View File

@@ -91,6 +91,8 @@
name: ghost-role-information-rat-king-name
description: ghost-role-information-rat-king-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
raffle:
settings: default
- type: GhostTakeoverAvailable

View File

@@ -38,6 +38,8 @@
name: ghost-role-information-revenant-name
description: ghost-role-information-revenant-description
rules: ghost-role-information-antagonist-rules
mindRoles:
- MindRoleGhostRoleSoloAntagonist
raffle:
settings: default
- type: GhostTakeoverAvailable

View File

@@ -204,6 +204,8 @@
name: ghost-role-information-honkbot-name
description: ghost-role-information-honkbot-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
raffle:
settings: default
- type: GhostTakeoverAvailable
@@ -236,6 +238,8 @@
name: ghost-role-information-jonkbot-name
description: ghost-role-information-jonkbot-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
raffle:
settings: default
- type: InteractionPopup
@@ -370,6 +374,8 @@
name: ghost-role-information-mimebot-name
description: ghost-role-information-mimebot-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
raffle:
settings: default
- type: GhostTakeoverAvailable

View File

@@ -167,6 +167,8 @@
- type: GhostRole
description: ghost-role-information-angry-slimes-description
rules: ghost-role-information-angry-slimes-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: short
@@ -205,6 +207,8 @@
- type: GhostRole
description: ghost-role-information-angry-slimes-description
rules: ghost-role-information-angry-slimes-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: short
@@ -242,5 +246,7 @@
- type: GhostRole
description: ghost-role-information-angry-slimes-description
rules: ghost-role-information-angry-slimes-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: short

View File

@@ -385,6 +385,8 @@
name: ghost-role-information-snail-name
description: ghost-role-information-snail-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
- type: GhostTakeoverAvailable
- type: Emoting
- type: Sprite

View File

@@ -15,6 +15,8 @@
name: ghost-role-information-space-dragon-name
description: ghost-role-information-space-dragon-description
rules: ghost-role-information-space-dragon-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: default
- type: GhostTakeoverAvailable
@@ -152,7 +154,7 @@
- DoorBumpOpener
- type: Puller
needsHands: false
- type: entity
parent: BaseMobDragon
id: MobDragon

View File

@@ -11,6 +11,8 @@
name: ghost-role-information-remilia-name
description: ghost-role-information-remilia-description
rules: ghost-role-information-familiar-rules
mindRoles:
- MindRoleGhostRoleFamiliar
- type: GhostTakeoverAvailable
- type: Grammar
attributes:
@@ -44,6 +46,8 @@
name: ghost-role-information-cerberus-name
description: ghost-role-information-cerberus-description
rules: ghost-role-information-familiar-rules
mindRoles:
- MindRoleGhostRoleFamiliar
raffle:
settings: default
- type: GhostTakeoverAvailable

View File

@@ -14,6 +14,8 @@
name: ghost-role-information-guardian-name
description: ghost-role-information-guardian-description
rules: ghost-role-information-familiar-rules
mindRoles:
- MindRoleGhostRoleFamiliar
raffle:
settings: default
- type: GhostTakeoverAvailable

View File

@@ -42,6 +42,8 @@
rules: ghost-role-information-Death-Squad-rules
raffle:
settings: short
mindRoles:
- MindRoleGhostRoleFamiliar
- type: Loadout
prototypes: [ DeathSquadGear ]
roleLoadout: [ RoleSurvivalEVA ]

View File

@@ -378,7 +378,7 @@
unlistedNumber: true
requiresPower: false
- type: Holopad
- type: StationAiWhitelist
- type: StationAiWhitelist
- type: UserInterface
interfaces:
enum.HolopadUiKey.AiRequestWindow:
@@ -442,6 +442,9 @@
- HideContextMenu
- StationAi
- NoConsoleSound
- type: StartingMindRole
mindRole: "MindRoleSiliconBrain"
silent: true
# Hologram projection that the AI's eye tracks.
- type: entity
@@ -505,6 +508,9 @@
cell_slot:
name: power-cell-slot-component-slot-name-default
startingItem: PowerCellMedium
- type: StartingMindRole
mindRole: "MindRoleSiliconBrain"
silent: true
- type: entity
id: PlayerBorgSyndicateAssaultBattery

View File

@@ -18,6 +18,8 @@
name: ghost-role-information-skeleton-pirate-name
description: ghost-role-information-skeleton-pirate-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
raffle:
settings: default
- type: GhostTakeoverAvailable
@@ -35,6 +37,8 @@
name: ghost-role-information-skeleton-biker-name
description: ghost-role-information-skeleton-biker-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
raffle:
settings: default
- type: GhostTakeoverAvailable
@@ -51,6 +55,8 @@
name: ghost-role-information-closet-skeleton-name
description: ghost-role-information-closet-skeleton-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
raffle:
settings: default
- type: GhostTakeoverAvailable

View File

@@ -26,6 +26,8 @@
name: ghost-role-information-syndicate-reinforcement-spy-name
description: ghost-role-information-syndicate-reinforcement-spy-description
rules: ghost-role-information-syndicate-reinforcement-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: default
- type: GhostRoleMobSpawner
@@ -43,6 +45,8 @@
name: ghost-role-information-nukeop-reinforcement-name
description: ghost-role-information-nukeop-reinforcement-description
rules: ghost-role-information-nukeop-reinforcement-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: default
- type: GhostRoleMobSpawner
@@ -58,6 +62,8 @@
name: ghost-role-information-syndicate-monkey-reinforcement-name
description: ghost-role-information-syndicate-monkey-reinforcement-description
rules: ghost-role-information-syndicate-reinforcement-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: default
- type: GhostRoleMobSpawner
@@ -85,6 +91,8 @@
name: ghost-role-information-SyndiCat-name
description: ghost-role-information-SyndiCat-description
rules: ghost-role-information-syndicate-reinforcement-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
raffle:
settings: default
- type: GhostRoleMobSpawner
@@ -103,6 +111,8 @@
name: ghost-role-information-syndicate-cyborg-assault-name
description: ghost-role-information-syndicate-cyborg-description
rules: ghost-role-information-silicon-rules
mindRoles:
- MindRoleGhostRoleSilicon
raffle:
settings: default
- type: GhostRoleMobSpawner

View File

@@ -38,6 +38,8 @@
roleName: pai-system-role-name
roleDescription: pai-system-role-description
roleRules: ghost-role-information-familiar-rules
mindRoles:
- MindRoleGhostRoleFamiliar
wipeVerbText: pai-system-wipe-device-verb-text
wipeVerbPopup: pai-system-wiped-device
stopSearchVerbText: pai-system-stop-searching-verb-text
@@ -91,6 +93,8 @@
roleName: pai-system-role-name-syndicate
roleDescription: pai-system-role-description-syndicate
roleRules: ghost-role-information-familiar-rules
mindRoles:
- MindRoleGhostRoleFamiliar
- type: IntrinsicRadioTransmitter
channels:
- Syndicate
@@ -123,6 +127,8 @@
roleName: pai-system-role-name-potato
roleDescription: pai-system-role-description-potato
roleRules: ghost-role-information-familiar-rules
mindRoles:
- MindRoleGhostRoleFamiliar
- type: Appearance
- type: GenericVisualizer
visuals:

View File

@@ -89,6 +89,8 @@
roleName: positronic-brain-role-name
roleDescription: positronic-brain-role-description
roleRules: ghost-role-information-silicon-rules
mindRoles:
- MindRoleGhostRoleSilicon
wipeVerbText: positronic-brain-wipe-device-verb-text
wipeVerbPopup: positronic-brain-wiped-device
stopSearchVerbText: positronic-brain-stop-searching-verb-text

View File

@@ -201,7 +201,7 @@
definitions:
- prefRoles: [ Traitor ]
mindRoles:
- MindRoleTraitor
- MindRoleTraitorReinforcement
- type: entity
id: Revolutionary

View File

@@ -22,14 +22,70 @@
components:
- type: ObserverRole
#Ghostrole Marker
#Ghost Roles
- type: entity
parent: BaseMindRole
id: MindRoleGhostMarker
id: MindRoleGhostRoleNeutral
name: Ghost Role
components:
- type: GhostRoleMarkerRole
- type: entity
parent: BaseMindRole
id: MindRoleGhostRoleFamiliar
name: Ghost Role (Familiar)
components:
- type: MindRole
roleType: Familiar
- type: GhostRoleMarkerRole
- type: entity
parent: BaseMindRole
id: MindRoleGhostRoleFreeAgent
name: Ghost Role (Free Agent)
components:
- type: MindRole
roleType: FreeAgent
- type: GhostRoleMarkerRole
- type: entity
parent: BaseMindRole
id: MindRoleGhostRoleSilicon
name: Ghost Role (Silicon)
components:
- type: MindRole
roleType: Silicon
- type: GhostRoleMarkerRole
- type: entity
parent: BaseMindRole
id: MindRoleGhostRoleSiliconAntagonist
name: Ghost Role (Silicon Antagonist)
components:
- type: MindRole
roleType: SiliconAntagonist
- type: GhostRoleMarkerRole
- type: entity
parent: BaseMindRole
id: MindRoleGhostRoleSoloAntagonist
name: Ghost Role (Solo Antagonist)
components:
- type: MindRole
roleType: SoloAntagonist
- type: GhostRoleMarkerRole
- type: entity
parent: BaseMindRole
id: MindRoleGhostRoleTeamAntagonist
name: Ghost Role (Team Antagonist)
components:
- type: MindRole
roleType: TeamAntagonist
- type: GhostRoleMarkerRole
# The Job MindRole holds the mob's Job prototype
- type: entity
parent: BaseMindRole
@@ -38,16 +94,26 @@
# description:
# MindRoleComponent.JobPrototype is filled by SharedJobSystem
# Subverted Silicon
# Silicon
- type: entity
parent: BaseMindRole
id: MindRoleSiliconBrain
name: Borg Brain Role
components:
- type: MindRole
roleType: Silicon
- type: SiliconBrainRole
- type: entity
parent: BaseMindRoleAntag
id: MindRoleSubvertedSilicon
name: Subverted Silicon Role
description:
components:
- type: SubvertedSiliconRole
- type: MindRole
antagPrototype: SubvertedSilicon
roleType: SiliconAntagonist
- type: SubvertedSiliconRole
# Dragon
- type: entity
@@ -58,6 +124,7 @@
components:
- type: MindRole
antagPrototype: Dragon
roleType: TeamAntagonist
exclusiveAntag: true
- type: DragonRole
- type: RoleBriefing
@@ -72,6 +139,7 @@
components:
- type: MindRole
antagPrototype: SpaceNinja
roleType: SoloAntagonist
exclusiveAntag: true
- type: NinjaRole
@@ -83,6 +151,7 @@
# description: mind-role-nukeops-description
components:
- type: MindRole
roleType: TeamAntagonist
exclusiveAntag: true
antagPrototype: Nukeops
- type: NukeopsRole
@@ -115,6 +184,7 @@
- type: MindRole
antagPrototype: HeadRev
exclusiveAntag: true
roleType: TeamAntagonist
- type: RevolutionaryRole
- type: entity
@@ -135,6 +205,7 @@
components:
- type: MindRole
antagPrototype: Thief
roleType: SoloAntagonist
- type: ThiefRole
# Traitors
@@ -147,6 +218,7 @@
- type: MindRole
antagPrototype: Traitor
exclusiveAntag: true
roleType: SoloAntagonist
- type: TraitorRole
- type: entity
@@ -158,6 +230,15 @@
- type: MindRole
antagPrototype: TraitorSleeper
- type: entity
parent: MindRoleTraitor
id: MindRoleTraitorReinforcement
name: Syndicate Reinforcement Role
# description: mind-role-syndicate-reinforcement-description
components:
- type: MindRole
roleType: TeamAntagonist
# Zombie Squad
- type: entity
parent: BaseMindRoleAntag
@@ -168,6 +249,7 @@
- type: MindRole
antagPrototype: InitialInfected
exclusiveAntag: true
roleType: TeamAntagonist
- type: InitialInfectedRole
- type: entity
@@ -179,4 +261,5 @@
- type: MindRole
antagPrototype: Zombie
exclusiveAntag: true
roleType: TeamAntagonist
- type: ZombieRole

View File

@@ -0,0 +1,37 @@
# For use by Role Types
# Do not touch these
- type: roleType
id: Neutral
name: role-type-crew-aligned-name
color: '#eeeeee'
- type: roleType
id: SoloAntagonist
name: role-type-solo-antagonist-name
color: '#d82000'
- type: roleType
id: TeamAntagonist
name: role-type-team-antagonist-name
color: '#d82000'
- type: roleType
id: FreeAgent
name: role-type-free-agent-name
color: '#ffff00'
- type: roleType
id: Familiar
name: role-type-familiar-name
color: '#6495ed'
- type: roleType
id: Silicon
name: role-type-silicon-name
color: '#6495ed'
- type: roleType
id: SiliconAntagonist
name: role-type-silicon-antagonist-name
color: '#c832e6'

View File

@@ -193,6 +193,8 @@
name: ghost-role-information-artifact-name
description: ghost-role-information-artifact-description
rules: ghost-role-information-freeagent-rules
mindRoles:
- MindRoleGhostRoleFreeAgent
raffle:
settings: default
- type: GhostTakeoverAvailable