mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-12 10:42:37 +00:00
* Generate theft objective target list more consistently (#78045) ## About The Pull Request Fixes #77943 Moves the generation of traitor theft objective targets from `new` of `/datum/objective/steal` to `initialize` of `/datum/controller/subsystem/traitor` `/datum/objective/steal` we would generate the full list of possible theft targets _only_ if the list was already empty. A recent PR added a secondary "destroy item" objective which has no rep prerequisite, as a result it is initialised as soon as a traitor datum is assigned. Importantly this happens _before_ the traitor's theft objective is assigned. The "destroy item" objective generates its own item targets using the "theft item" datum as it is a type of thievery, this pollutes the list to contain more than 0 entries. From this point on the only things people can be assigned to steal are the items that traitors can be assigned to destroy early in a round, which aren't valid for most kinds of theft objective. Making the subsystem generate the list before traitor datums are assigned resolves the race condition, the number of rounds where _nobody_ has any kind of theft objective and this list is unused is exceedingly small. ## Why It's Good For The Game You can get primary theft objectives again. ## Changelog 🆑 fix: Traitors should generate with "free objective" less often, and will once more be assigned to steal things. /🆑 * Generate theft objective target list more consistently --------- Co-authored-by: Jacquerel <hnevard@gmail.com>