race quit, transfer state, refactor

This commit is contained in:
Ilia Denisov
2026-02-07 01:59:11 +02:00
parent 43ba5eb07c
commit fc73cbf83a
27 changed files with 520 additions and 341 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ func (c *Cache) ShipGroupShipClass(groupIndex int) *game.ShipType {
func (c *Cache) RaceIndex(ID uuid.UUID) int {
if c.cacheRaceIndexByID == nil {
c.cacheRaceIndexByID = make(map[uuid.UUID]int)
for i := range c.g.Race {
for i := range c.listRaceIdx() {
c.cacheRaceIndexByID[c.g.Race[i].ID] = i
}
}