Persist entity session state in checkpoints

This commit is contained in:
Meta Vens 2026-06-14 13:58:46 +01:00
commit 6bcf6444b9
8 changed files with 191 additions and 8 deletions

View file

@ -312,6 +312,15 @@ try
PositionZ = 3.0,
DirectionX = 0.0,
DirectionY = 1.0,
VelocityX = 4.0,
VelocityY = -2.0,
TargetEntityIndex = 0,
IsActive = true,
HeatsinksEnabled = false,
OverrideShutdown = true,
TractorPower = 12.5,
Heatstroke = 0.25,
Hypothermia = 0.125,
HullItemDefinitionLegacyId = "smoke:hull",
Equipment = new[]
{
@ -328,6 +337,16 @@ try
}
},
WeaponGroups = new[] { new[] { 0 } },
ActiveConsumables = new[]
{
new AetheriaRuntimeActiveConsumableCommit
{
ItemDefinitionLegacyId = "smoke:consumable",
Quality = 0.75,
RemainingDuration = 3.0,
Duration = 5.0
}
},
StatGrids = new[]
{
new AetheriaRuntimeEntityStatGridCommit
@ -403,6 +422,18 @@ try
zone.Bodies[0].Resources[0].ItemKey == "aetheria.item_definition:legacy:smoke:ore" &&
zone.Bodies[0].Asteroids.Length == 1 &&
entity?.Equipment.Length == 1 &&
entity.Velocity.X == 4.0 &&
entity.Velocity.Y == -2.0 &&
entity.TargetEntityKey == "global:aetheria.run_state.smoke-run.zone.0.entity.0.v1" &&
entity.IsActive &&
!entity.HeatsinksEnabled &&
entity.OverrideShutdown &&
entity.TractorPower == 12.5 &&
entity.Heatstroke == 0.25 &&
entity.Hypothermia == 0.125 &&
entity.ActiveConsumables.Length == 1 &&
entity.ActiveConsumables[0].ItemKey == "aetheria.item_definition:legacy:smoke:consumable" &&
entity.ActiveConsumables[0].RemainingDuration == 3.0 &&
entity.WeaponGroups.Length == 1 &&
entity.StatGrids.Length == 2 &&
entity.StatGrids.Any(grid => grid.Name == "temperature" && grid.Values.Length == 2 && grid.Values[1] == 281.0) &&