space-wizards / RobustToolbox

Robust multiplayer game engine, used by Space Station 14
https://spacestation14.io
Other
547 stars 408 forks source link

Prototype manager needs a cached way to get entity prototypes by component #5323

Open DrSmugleaf opened 3 months ago

DrSmugleaf commented 3 months ago

A system subscribes to PrototypesReloadedEventArgs It cares about all entity prototypes with a specific component (for example surgery) It now has to loop all of them on initialize and skip if component not found, and get all changed ones when PrototypesReloadedEventArgs fires doing the same

This times however many systems do this pattern and it starts getting out of hand with how many systems are going to loop all entity prototypes

metalgearsloth commented 3 months ago

Something something arch world + make prototypes entities