using System.Collections.Generic;
using DatReaderWriter.DBObjs;
// Environment collides with System.Environment under implicit usings — alias it.
using DatEnvironment = DatReaderWriter.DBObjs.Environment;
namespace AcDream.Core.World;
///
/// The parsed dat objects ApplyLoadedTerrainLocked needs, pre-read by the
/// streaming worker under _datLock so the apply makes ZERO DatCollection
/// calls and the update thread never blocks on the worker's lock (the FPS
/// 30↔200 swing was that lock-wait). Keyed by the same dat id the apply would
/// have passed to _dats.Get<T>.
///
public sealed record PhysicsDatBundle(
LandBlockInfo? Info,
IReadOnlyDictionary EnvCells,
IReadOnlyDictionary Environments,
IReadOnlyDictionary Setups,
IReadOnlyDictionary GfxObjs)
{
/// Empty bundle for far-tier landblocks (no cells / buildings /
/// entities) and for non-streaming construction.
public static readonly PhysicsDatBundle Empty = new(
null,
new Dictionary(),
new Dictionary(),
new Dictionary(),
new Dictionary());
}