refactor(runtime): acknowledge exact world host projections
This commit is contained in:
parent
73d0b54e38
commit
18d17d8bb1
17 changed files with 1677 additions and 72 deletions
|
|
@ -96,9 +96,15 @@ public readonly record struct RuntimeWorldEnvironmentSnapshot(
|
|||
WeatherKind Weather,
|
||||
EnvironOverride EnvironOverride);
|
||||
|
||||
public readonly record struct RuntimeWorldEnvironmentOwnershipSnapshot(
|
||||
bool IsInitialized,
|
||||
int DayGroupDefinitionCount,
|
||||
int ActiveDayGroupCount);
|
||||
|
||||
public interface IRuntimeWorldEnvironmentView
|
||||
{
|
||||
RuntimeWorldEnvironmentSnapshot Snapshot { get; }
|
||||
RuntimeWorldEnvironmentOwnershipSnapshot Ownership { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -152,6 +158,15 @@ public sealed class RuntimeWorldEnvironmentState
|
|||
Weather.Kind,
|
||||
Weather.Override);
|
||||
|
||||
public RuntimeWorldEnvironmentOwnershipSnapshot Ownership =>
|
||||
CaptureOwnership();
|
||||
|
||||
public RuntimeWorldEnvironmentOwnershipSnapshot CaptureOwnership() =>
|
||||
new(
|
||||
IsInitialized,
|
||||
_definition?.DayGroups.Count ?? 0,
|
||||
ActiveDayGroupIndex >= 0 ? 1 : 0);
|
||||
|
||||
public void Initialize(RuntimeWorldEnvironmentDefinition definition)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(definition);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue