OpenRA
OpenRA copied to clipboard
ProductionQueue, cache MostLikelyProducer?
version bleed
The two classic production queue classes each contain 3 similar looking LINQ queries. In two of them items are sorted by two columns. One of them is MostLikelyProducer
.
MostLikelyProducer
seems to be called by multiple caller amongst which the ProductionPaletteWidget
.
Proposal/question:
-
Can't the
MostLikelyProducer
be cached per logic tick? Or could it cause bugs depending on the order in which logic is executed and i.e. ticks on later actors may influence the result. -
Can't the two or three/four queries turned into one or two? Tick, MostLikelyProducer, BuildUnit, GetBuildTime.