Persist turret controller state in typed snapshots
This commit is contained in:
parent
cd009fa9a9
commit
6deea479dd
11 changed files with 91 additions and 8 deletions
|
|
@ -584,6 +584,16 @@ try
|
|||
StatModifierApplied = true,
|
||||
StatModifierExecuted = true,
|
||||
StatModifierTargetStatCount = 2
|
||||
},
|
||||
new AetheriaRuntimeBehaviorStateCommit
|
||||
{
|
||||
OwnerKind = "equipment",
|
||||
OwnerIndex = 14,
|
||||
BehaviorIndex = 0,
|
||||
BehaviorKind = "TurretController",
|
||||
TurretControllerWeaponCount = 2,
|
||||
TurretControllerShotSpeed = 80.0,
|
||||
TurretControllerPredictShots = true
|
||||
}
|
||||
},
|
||||
StatGrids = new[]
|
||||
|
|
@ -704,7 +714,7 @@ try
|
|||
entity.WeaponStates[3].BehaviorKind == "LockWeapon" &&
|
||||
entity.WeaponStates[3].LockProgress == 0.65 &&
|
||||
entity.WeaponStates[3].LockTargetEntityKey == "global:aetheria.run_state.smoke-run.zone.0.entity.0.v1" &&
|
||||
entity.BehaviorStates.Length == 14 &&
|
||||
entity.BehaviorStates.Length == 15 &&
|
||||
entity.BehaviorStates[0].BehaviorKind == "Sensor" &&
|
||||
entity.BehaviorStates[0].Pinging &&
|
||||
entity.BehaviorStates[0].PingRadius == 1200.0 &&
|
||||
|
|
@ -749,6 +759,10 @@ try
|
|||
entity.BehaviorStates[13].StatModifierApplied &&
|
||||
entity.BehaviorStates[13].StatModifierExecuted &&
|
||||
entity.BehaviorStates[13].StatModifierTargetStatCount == 2 &&
|
||||
entity.BehaviorStates[14].BehaviorKind == "TurretController" &&
|
||||
entity.BehaviorStates[14].TurretControllerWeaponCount == 2 &&
|
||||
entity.BehaviorStates[14].TurretControllerShotSpeed == 80.0 &&
|
||||
entity.BehaviorStates[14].TurretControllerPredictShots &&
|
||||
entity.WeaponGroups.Length == 1 &&
|
||||
entity.StatGrids.Length == 2 &&
|
||||
entity.StatGrids.Any(grid => grid.Name == "temperature" && grid.Values.Length == 2 && grid.Values[1] == 281.0) &&
|
||||
|
|
@ -804,7 +818,7 @@ try
|
|||
packageEntities[0].WeaponStates[2].AmmoIntervalProgress != 0.6 ||
|
||||
packageEntities[0].WeaponStates[3].LockProgress != 0.65 ||
|
||||
packageEntities[0].WeaponStates[3].LockTargetEntityKey != "global:aetheria.run_state.smoke-run.zone.0.entity.0.v1" ||
|
||||
packageEntities[0].BehaviorStates.Count != 14 ||
|
||||
packageEntities[0].BehaviorStates.Count != 15 ||
|
||||
packageEntities[0].BehaviorStates[3].CapacitorCharge != 7.5 ||
|
||||
packageEntities[0].BehaviorStates[4].AetherDriveRpmY != 900.0 ||
|
||||
packageEntities[0].BehaviorStates[4].AetherDriveMaximumRpm != 2400.0 ||
|
||||
|
|
@ -821,6 +835,9 @@ try
|
|||
!packageEntities[0].BehaviorStates[12].TriggerPulled ||
|
||||
!packageEntities[0].BehaviorStates[13].StatModifierApplied ||
|
||||
packageEntities[0].BehaviorStates[13].StatModifierTargetStatCount != 2 ||
|
||||
packageEntities[0].BehaviorStates[14].TurretControllerWeaponCount != 2 ||
|
||||
packageEntities[0].BehaviorStates[14].TurretControllerShotSpeed != 80.0 ||
|
||||
!packageEntities[0].BehaviorStates[14].TurretControllerPredictShots ||
|
||||
packageEntities[0].StatGrids.Count != 2 ||
|
||||
packageEntities[0].StatGrids.All(grid => grid.Name != "temperature" || grid.Values.Count != 2 || grid.Values[1] != 281.0))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue