63 Commits

Author SHA1 Message Date
BeBright
a76b6213a9 MingGetBriefing -> MindGetBriefing (#41413)
Co-authored-by: BeBright <98597725+be1bright@users.noreply.github.com>
2025-11-13 16:24:28 +00:00
Pieter-Jan Briers
0c97520276 Fix usages of TryIndex() (#39124)
* Fix usages of TryIndex()

Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)

This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)

This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.

Fixes #39115

Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.

* fix tests

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-09-09 18:17:56 +02:00
slarticodefast
9c546a0072 Predict Mind Roles (#39611) 2025-08-21 03:10:07 +02:00
slarticodefast
2743dcf67f Move mind role components to shared (#39606) 2025-08-13 12:51:46 +02:00
Kyle Tyo
0e1ff2644f Command resolve killing and LEC conversions batch 2 (#38367)
commit progress
2025-06-17 20:01:28 +02:00
Errant
bf76ba28e2 MindRemoveRole refactor (#34880)
* MindRemoveRole refactor

* role removal logstring rework

* zombiesystem fix
2025-05-17 16:24:32 +10:00
Kyle Tyo
a711912cba Unused dependency cleanup. (#36760)
* take 2! fight!!!

* final touches

* reeeeeee
2025-04-20 15:56:39 +02:00
Milon
3fc9bcbbbe remove Session from MindComponent (#34753)
* yummy

* fix tests
2025-04-19 00:23:01 +02:00
slarticodefast
9ff43f344e Show paradox clones in deadchat (#35940)
show clones in deadchat
2025-03-26 16:30:14 +01:00
slarticodefast
bce9b4b05b Paradox Clone (#35794)
* polymorph fixes

* paradox clone

* forensics cleanup

* bump doors

* 4

* attribution

* polymorphn't

* clean up objectives

* Update Resources/ServerInfo/Guidebook/Antagonist/MinorAntagonists.xml

* review

* add virtual items to blacklist

* allow them to roll sleeper agent
2025-03-13 10:09:07 -07:00
keronshb
68de58eb66 THE WIZARD (#35406)
* Adds Survivor Antag

* Adds Survivor Role

* Adds Survivor Rule ECS, adds a survivor role event, adds make antagonist to  random global spawn spell

* Moves Survivor Ensurecomp to event handler. Makes Add Survivor Role a broadcast. Adds Survivor Component. Removes redundant briefing.

* Adds Survivor Antagonist role type for admins to keep track of this easier, adds it to Survivor.

* Adds access to survivor game rule system

* Adds Survivor Rule

* Adds end of round survivor text

* Adds end of round reporting logic. Adds logic to start the survivor rule.

* Changes desc from centcomm to shuttle

* survivor (S)

* Checks if they're alive on the shuttle instead of centcomm.

* ftl text selection based on number of survivors.

* Removed Survivor Antagonist, replaced it with Free Agent.

* Adds InvalidForGlobalSpawnSpell tag, checks for it on spawnspell, and adds it to a zombified person.

* Changes logic so we launch the game rule if it hasnt launched yet. Moves rule logic starting to server. Moved survivor rule logic out of event and into Start method.

* Fixes invalid entity issue

* Descs for Survivor Rule and Survivor comps

* Moves Survivor Rule to its own yml

* Checks for dead survivors, changes survivor checks for mind. Adds survivor comp to mind to fix any mindswap issues. Same for invalid survivor tag

* Changes shuttle xform call to just mapid

* Protoid fix

* THE WIZARD

* Wizard spawner

* adds the correct state

* Wizard preset and weight

* Fixes wizard rule

* Weight back to 100%

* Adds Random Metadata

* Wizard locs

* Puts requirements in the right place

* Adds wiz ghost spawner and mob

* wizard spawnpoint fix + shuttle mapping

* wizard loadout + fix wizard spawning + wizard random name

* comment

* Adds Wizard testing

* FIXES SHUTTLE ISSUE BASED REI

* THE WIZARD LOBBY SONG. Special thanks to song creator Chris Remo for allowing us to use this.

* Free Objective ECS + Base Free Objective

* Space Wizard Federation for Wiz Obj issuer.

* Wizard Objectives

* Moves wizard shuttle to base wizard rule. Gives Wizard their objectives. Removes WizardRule

* Renames midround to subgamemodes. Adds wizard sub game mode.

* Adds SubWizard to SubGameModesRule. Adds a SubGameMode with no wizard. Adds No SubGamemodeRule for Wizard preset

* Wizard midround event

* Fixes wizard midround

* Wizard Guidebook

* Removes todo

* Fixes text

* Removes wizard rule ECS, not needed

* Wizard jetpack

---------

Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
2025-02-25 22:34:07 -07:00
keronshb
3192914fc5 Fix/Addition - Wizard Survivor Antag Status (#35226) 2025-02-23 12:24:36 -05:00
Errant
46d58bf22a 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>
2025-01-11 22:17:26 +01:00
Errant
93c7bdc134 Mind Role Entities (#31318)
* 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

* minor cleanup

* remove createdTime datafield

* now actually using the event replacement I made for role time tracking

* weh
2024-10-10 10:48:56 +02:00
SlamBamActionman
61a1e89339 Add codeword highlighting (#30092)
* Added codeword highlighting

* Updated to support more codeword roles, color is set serverside

* Review feedback

* Change to a Component-based system using SessionSpecific

* Tidied up CanGetState, set Access restrictions on component

* Clean-up

* Makes the injection ignore brackets, restore some codewords, remove "Taste/Touch" from adjectives
2024-08-23 11:14:38 +02:00
slarticodefast
0a4b220854 remove TerminatorRoleComponent (#30733) 2024-08-10 08:46:49 -04:00
deltanedas
d9bac82402 localize RoleBriefing (#28824)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2024-06-12 22:24:08 -04:00
SlamBamActionman
f544c91298 Revert Exterminator pending newmed/redesign (#26978)
* Reverts Exterminator

* Includes commented out parts + sprites

* Readd stuff, comment out yaml

* Popup ads

* review

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-04-28 15:45:54 +10:00
Jake Huxell
59e46aab93 Reduced Warning Count By 130 For Full Rebuilds (#26518)
* remove deprecated entity coordinate extension functions. Reduces warning count by approximately 50

* final toCoords Removed

* Remove all unused variables and dead code paths

* remove always true variable, should be a cvar or something instead

* remove superfluous variables from tests
2024-03-29 16:28:16 +11:00
Rainfey
4e6c59cfe5 Refactor antag rule code (#23445)
* Initial Pass, Rev, Thief

* Zombie initial pass

* Rebase, Traitor

* Nukeops, More overloads

* Revert RevolutionaryRuleComponent

* Use TryRoundStartAttempt, Rewrite nukie spawning

* Comments, Add task scheduler to GameRuleSystem

* Zombie initial testing done

* Sort methods, rework GameRuleTask

* Add CCVar, Initial testing continues

* Might as well get rid of the obsolete logging

* Oops, i dont know how to log apparently

* Suggested formatting fixes

* Suggested changes

* Fix merge issues

* Minor optimisation

* Allowed thief to choose other antags

* Review changes

* Spawn items on floor first, then inserting

* minor tweaks

* Shift as much as possible to ProtoId<>

* Remove unneeded

* Add exclusive antag attribute

* Fix merge issues

* Minor formatting fix

* Convert to struct

* Cleanup

* Review cleanup (need to test a lot)

* Some fixes, (mostly) tested

* oop

* Pass tests (for real)

---------

Co-authored-by: Rainfall <rainfey0+git@gmail.com>
Co-authored-by: AJCM <AJCM@tutanota.com>
2024-02-29 17:25:10 +11:00
Vyacheslav Kovalevsky
7311ce671f Store ninja objectives in conditions 2 (#20894)
* move spider charge target from role

* shorter field names

* remove ninja role comment

* remove unused systems in SpaceNinjaSystem

* GenericAntagObjectivesAddedEvent

* check if warp point is on same map

* remove unnecessary import

* add missing loc when spider charge has no target

* a

* remove spider charge target requirement comp

* inline SpiderChargeTitle

* allow planting charge without objective

* remove map check

* fix role check when planting

* obj.Target

* Fix merge

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-01-29 15:06:32 +11:00
deltanedas
52532e4075 exterminator midround minor antag (#19946)
* terminator locale

* terminate objective

* terminator components and shared system

* terminator roles rules and system

* terminator events

* skeleton recolour

* terminator and endoskeleton

* ghost role spawn

* damage modifier sets

* :trollface:

* :trollface:

* add antag prototype

* ghost role locale

* skynet

* :trollface:

* :trollface:

* :trollface:

* add endoskeleton body prototype

* :trollface:

* :trollface:

* smite locale

* implement terminate smite

* :trollface:

* :trollface:

* implement PopupBehavior

* endoskeleton transform popup

* move stuff from shared to server since nothing actually used it

* recolour everything

* update parts

* :trollface:

* :trollface:

* ok fire was using the damage set, back to 1.0

* tweak

* :trollface:

* :trollface:

* simplemob ops

* 1 rule per pro

* :trollface:

* :trollface:

* update some sprites

* structural damage

* :trollface:

* :trollface:

* Revert "update some sprites"

This reverts commit 459196c6a8942c5412885d5fe2f1a83a48408ddc.

* offbrand, add die objective to maybe remove fear of murderbone

* add shut down objective to the list

* fix ghost role

* fix control mob

* :trollface:

* :trollface:

* please

* naming

* code changes for GenericAntag terminator

* yml changes for GenericAntag terminator

* :trollface:

* moved kill objective override to an objective component

* use kill objective override

* fix

* oh

* locale changes

* change burn to heat for skin melting gib

* change some endoskeleton stuff

* pro

* i already did this dementia ops

* objective

* fix

* pro

* swap out full sprite

* update parts

* forgor

* fix mind transfer

* type

* endoskeleton has 500 mass

* evil

* fishops

* warops

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-12-24 20:16:56 -07:00
Ed
144af233c4 New Thief minor antagonist (#21520)
* start working

* add right-click thief antagins
some architecture restruct

* add meh thief greeting audio

* add thief subgamemode to Traitors gamemode

* add late join thief (not tested yet)
add briefing

* add pacifism

* add Steal tasks to thief

* fix crash thief+traitor on person

* add new condition: collection steal

* add tracking of succes collection objective

* add stamp collection target
remove some boring steal target
add check pulling entity to collection target

* finalize first 2 group objective

* start merging stealing objective systems

* merging

* finish merging. Now traitor steal objective work better

* we don't check the items of pullable sentient entity

* clear naming, enable thief signle item objective start

* objective pack add

* finish with steal item objectives

* convert string to ProtoId<>

* some clean up

* add thieves to revolution game mode

* Update Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl

Co-authored-by: Flareguy <78941145+Flareguy@users.noreply.github.com>

* Update Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl

Co-authored-by: Flareguy <78941145+Flareguy@users.noreply.github.com>

* update pacifism: fix crashing, monkey-thief without pacified

* adaptive animal briefing, cleaning locales

* add structure steal objectives

* remove RCD target

* add thiefs to manifest, but bug with traitor duplications

* add escape objective

* add chat briefing

* setup animal objective group system

* add animal steal objectives

* add animal objectives notroleconditions

* add morty

* now thief mode has a chance of not launching Now there are a random number of thieves per round from 1 to 3

* 6 hours of trying to fix duplicate tasks. Failure

* added thief pinpointer (buggy)

* start thief backpack UI work

* revert pinpointer for scope reason

* UI continue work

* add thief starter kits content

* remove ERP kit :trollface:

* finally! giving starting items to thief. Now it playable, but still need more work

* clean up

* fix

* fox

* add merged items into thief
new Starting Kit (buggy)

* fix YES antag menu

* objection tweaks

* remove hearts objective, working on spawning things from toolbox

* smug

* fixes

* add race specifier objective condition LAMPS

* meh

* fix fix fix

* the alive

* Adding stamps

* Update backpack.ftl

* Revert1

* Revert ftl

* add voice mask to communicator kit

* Update Resources/Locale/en-US/administration/antag.ftl

Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>

* Update Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl

Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>

* Update Resources/Locale/en-US/thief/backpack.ftl

Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>

* Update Resources/Locale/en-US/objectives/conditions/steal.ftl

Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>

* Update Resources/Locale/en-US/thief/backpack.ftl

Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>

* Update Resources/Locale/en-US/thief/backpack.ftl

Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>

* Update Resources/Locale/en-US/thief/backpack.ftl

Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>

* Update Resources/Locale/en-US/thief/backpack.ftl

Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>

* Update Resources/Locale/en-US/prototypes/roles/antags.ftl

Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>

* Update Resources/Locale/en-US/thief/backpack.ftl

Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>

* update

* fix

* more reusable function, add documentation

* fix doc

* faint fixes

---------

Co-authored-by: Flareguy <78941145+Flareguy@users.noreply.github.com>
Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>
2023-12-24 02:58:28 -07:00
deltanedas
24476721af rev roundend shows converted count (#21854)
* add ConvertedCount field to role

* make objectives roundend title logic reusable

* change rev system + use GetTitle

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-11-27 14:43:48 -07:00
DrSmugleaf
dc3b6e31b2 Fix Client RoleSystem not inheriting SharedRoleSystem, network job component (#21436) 2023-11-07 14:44:53 -08:00
Slava0135
6f8c2b7e52 Use conditions to store progress for Ninja objectives (#20254)
* TryGetObjectiveComp

* helper function to get objective

* store N of jacked doors in condition

* store called in threat bool in condition

* store techs in steal research condition

* fix access

* remove unused transform system

* use popup from shared system

* fix formatting

* condition => obj everywhere

* i fogror to remove downloaded nodes from role

* change signature

* use query

* View Variables

* spider charge detonated => condition
2023-10-10 09:32:10 +03:00
deltanedas
a365568a7a give revs briefing (#20749)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-10-05 08:05:09 -07:00
DrSmugleaf
066054982d Fix revolutionaries not being considered antags (#20739) 2023-10-04 22:40:52 -06:00
coolmankid12345
9df5ded9ad Revolutionaries (#18477)
Co-authored-by: coolmankid12345 <coolmankid12345@users.noreply.github.com>
Co-authored-by: EmoGarbage404 <retron404@gmail.com>
2023-10-04 18:47:33 -07:00
deltanedas
94a11f28ca dragon refactor, objectives and use GenericAntag (#20201)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-09-30 13:18:01 -07:00
metalgearsloth
e1a91466f1 Fix playtime tracker (#20014) 2023-09-11 17:42:25 +10:00
metalgearsloth
b77265314b Make role timer tooltips pretty (#19605)
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2023-09-11 15:44:21 +10:00
deltanedas
24810d916b ninja 2 electric boogaloo (#15534)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-09-10 16:20:27 +10:00
Nemanja
cc5e185c6e Fix initial infected transformation (#19735) 2023-09-08 17:29:49 -04:00
deltanedas
7842f0d055 decouple briefing from traitor (#19668)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-08-31 14:29:45 -07:00
DrSmugleaf
3f3ba6ac62 Move minds, roles, jobs and objectives to shared (#19679) 2023-08-30 21:46:11 -07:00
Nemanja
4d677f0685 1v1 me first to 31 no powerups [Deathmatch Gamemode] (#19467)
Co-authored-by: Kara <lunarautomaton6@gmail.com>
2023-08-30 18:06:15 -07:00
DrSmugleaf
084ad5415c Fix jobs not getting their round start message (#19643) 2023-08-29 17:50:23 -05:00
DrSmugleaf
9567ae3b7f Fixed not tracking job playtime (#19639) 2023-08-29 13:39:16 -07:00
DrSmugleaf
15c0211fb2 Refactor minds to be entities with components, make roles components (#19591)
Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
2023-08-28 16:53:24 -07:00
Nemanja
7ddee71379 More borg tweaks (#19143)
* borg tweaks but i'm gonna go code fun stuff first

* werkin' on it

* a ton of tweaks

* fuck everyone and then myself
2023-08-14 18:34:23 -05:00
ShadowCommander
dd7032a860 Mind ECS (#16826) 2023-06-19 04:33:19 +10:00
Vyacheslav Titov
2e241691aa Refactoring of roles and notifications about antagonist assignment (#16864)
* Refactoring of antagonist roles and notifications about antagonist role assignment.
Refactoring of traitor assignment methods and bug fixing.

* Announcement files moved, code is adjusted to new revision

* Play to entity changed to play to global cause of mono audio restrictions.

* Path to audio files changed to sound specifiers, unique alerts for each role.

* Uncommited changes

* New alert sounds for each antag role.

* PR review fixes

* Antagonist role assignment sound notifications moved to Systems, sounds moved to Components.

* License update

* Fixed naming and redundant parameters

---------

Co-authored-by: Титов Вячеслав Витальевич <rincew1nd@yandex.ru>
2023-06-07 01:15:22 -06:00
Leon Friedrich
4d71b1b81e Revert "Mind ecs" (#14881) 2023-03-27 08:24:00 +11:00
ShadowCommander
bfc4da9377 Mind ecs (#14412) 2023-03-26 14:31:13 -04:00
Visne
c6d3e4f3bd Fix warnings and code cleanup/fixes (#13570) 2023-01-19 13:56:45 +11:00
Mervill
9c27f8417b Show the station name on spawn (#12128) 2022-10-22 14:51:51 -07:00
Kara
db1dfc8958 Command perm modifications (#11273)
* Command perm modifications

* actually not this one

* string
2022-09-14 19:02:38 -05:00
Pieter-Jan Briers
e852ada6c8 Play time tracking: Job timers 3: more titles: when the (#9978)
Co-authored-by: Veritius <veritiusgaming@gmail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-08-07 16:00:42 +10:00
Rane
cfe39123a7 Allow non-humanoid roles (#9604) 2022-07-10 20:10:03 -05:00