Threat refactor #432
Labels
Difficulty: Easy
This issue would be easy to do, and has little uncertainty in scope and implementation
Priority: Medium
This ticket is in scope for a future patch
Refactor
Code maintainability, style, or other non-functional changes
Threats and how they are valued, generated, and manipulated before sending to the threat manager of an NPC are all over the place
Some are here: https://github.com/OpenPerpetuum/PerpetuumServer/blob/Development/src/Perpetuum/Zones/NpcSystem/ThreatManager.cs#L12-L35
But then the relevant amounts and details live elsewhere like:
https://github.com/OpenPerpetuum/PerpetuumServer/blob/Development/src/Perpetuum/Modules/EnergyNeutralizerModule.cs#L51-L52
https://github.com/OpenPerpetuum/PerpetuumServer/blob/Development/src/Perpetuum/Modules/EnergyTransfererModule.cs#L49
https://github.com/OpenPerpetuum/PerpetuumServer/blob/Development/src/Perpetuum/Modules/EnergyVampireModule.cs#L60
https://github.com/OpenPerpetuum/PerpetuumServer/blob/Development/src/Perpetuum/Zones/NpcSystem/Npc.cs#L973
And a few other places (use find all references for
ThreatType
)It would be a bit easier to track and manage all the bespoke values and modifiers of threat if they were in one place.
This will help developers reason about and communicate threat value calculation changes to designers and players.
The text was updated successfully, but these errors were encountered: