Persist mining tool state in typed snapshots

This commit is contained in:
Meta Vens 2026-06-14 16:07:33 +01:00
commit a67a228c6b
10 changed files with 89 additions and 8 deletions

View file

@ -916,6 +916,17 @@ public class ActionGameManager : MonoBehaviour
ResourceScannerScanDuration = resourceScanner.ScanDuration
};
}
else if (behavior is MiningTool miningTool)
{
state = new AetheriaRuntimeBehaviorStateCommit
{
MiningToolAsteroidBeltId = miningTool.AsteroidBelt == Guid.Empty
? ""
: miningTool.AsteroidBelt.ToString("D"),
MiningToolAsteroidIndex = miningTool.Asteroid,
MiningToolRange = miningTool.Range
};
}
if (state == null)
continue;