Files
Bubberstation/code/controllers/subsystem
Jacquerel 9f3430b360 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.
/🆑
2023-09-01 11:54:36 -04:00
..
2023-07-25 15:07:42 -06:00
2023-08-13 14:46:51 -06:00
2023-07-22 17:16:22 +02:00
2023-06-23 10:35:43 +02:00
2023-07-26 19:10:55 +02:00
2023-08-26 02:25:16 +01:00