Floating bodies: FloatingBodyId, KinematicBody.Step, Zone.NextBodyId and the three drift settings

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-07 14:52:12 +02:00
commit 38c47d80ed
5 changed files with 205 additions and 0 deletions

View file

@ -81,6 +81,10 @@ public class Zone
// of touching a shared stream.
public uint CombatSeed { get; }
// The one source of floating item and mine ids: zone-scoped, from 1, never reused. Runtime state, not saved.
private uint _lastBodyId;
public FloatingBodyId NextBodyId() => new FloatingBodyId(++_lastBodyId);
public Zone(ItemManager itemManager, PlanetSettings settings, ZonePack pack, GalaxyZone galaxyZone, Galaxy galaxy)
{
_time = pack.Time;