Persist faction relationships in run checkpoints
This commit is contained in:
parent
0115d8048a
commit
e0a39b2fce
8 changed files with 73 additions and 6 deletions
|
|
@ -226,6 +226,7 @@ public static class AetheriaRuntimeCommitLogApplier
|
|||
CurrentZoneEntityIndex = checkpoint.CurrentZoneEntityIndex,
|
||||
DiscoveredZoneIndices = ToIntArray(checkpoint.DiscoveredZoneIndices),
|
||||
ActionBarBindings = ToActionBarBindings(checkpoint.ActionBarBindings),
|
||||
FactionRelationships = ToFactionRelationships(checkpoint.FactionRelationships),
|
||||
UpdatedAtUtc = updatedAtUtc
|
||||
};
|
||||
|
||||
|
|
@ -328,6 +329,19 @@ public static class AetheriaRuntimeCommitLogApplier
|
|||
.ToArray();
|
||||
}
|
||||
|
||||
private static AetheriaFactionRelationshipState[] ToFactionRelationships(
|
||||
IReadOnlyList<AetheriaRuntimeFactionRelationshipCommit>? relationships)
|
||||
{
|
||||
return (relationships ?? Array.Empty<AetheriaRuntimeFactionRelationshipCommit>())
|
||||
.Select(relationship => new AetheriaFactionRelationshipState
|
||||
{
|
||||
FactionKey = ReferenceKey("aetheria.corporation", relationship.CorporationLegacyId ?? ""),
|
||||
Relationship = relationship.Relationship ?? "",
|
||||
Standing = relationship.Standing
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
private static CultRecordKey LoadoutKey(string name)
|
||||
{
|
||||
return new CultRecordKey($"global:aetheria.loadout_template.{StableToken(name)}.v1");
|
||||
|
|
|
|||
|
|
@ -358,6 +358,9 @@ public sealed class AetheriaFactionRelationshipState
|
|||
public string FactionKey { get; set; } = "";
|
||||
|
||||
[Key(1)]
|
||||
public string Relationship { get; set; } = "";
|
||||
|
||||
[Key(2)]
|
||||
public double Standing { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ run state, zone state, entity snapshots, item slots, weapon groups, action-bar
|
|||
bindings, and stat grids. Runtime checkpoints include current action-bar
|
||||
bindings as stable typed targets: input control path, binding kind, item
|
||||
definition reference, equipment index, behavior index, or weapon-group index.
|
||||
They also include current faction relationship rows as typed corporation
|
||||
references plus relationship tokens and numeric standings.
|
||||
Player settings include player name, tutorial flag,
|
||||
story-file hash cursors, gameplay formatting, graphics preferences, input
|
||||
binding overrides, and action-bar inputs. Do not preserve `SavedGame`, Unity
|
||||
|
|
@ -105,9 +107,10 @@ Typed corporation documents include the legacy short name, the true description
|
|||
field from key 3, name-file and boss-hull legacy IDs, influence distance,
|
||||
allegiance count, full allegiance edges, and music bank IDs. Corporation
|
||||
documents are `aetheria.corporation.v2` records because runtime generation
|
||||
needs actual allegiance weights, not only display counts. Runtime object graphs,
|
||||
typed behavior factory construction, and simulation state remain legacy until
|
||||
dedicated typed runtime documents exist.
|
||||
needs actual allegiance weights, not only display counts. Runtime checkpoints
|
||||
now persist session faction relationships into typed run state, but broader
|
||||
runtime object graphs, typed behavior factory construction, and simulation
|
||||
state remain legacy until dedicated typed runtime documents exist.
|
||||
Typed name-file documents are `aetheria.name_file.v2` records. They carry the
|
||||
legacy ID, display name, count, compact sample names for surfaces, and the full
|
||||
name array needed to move `Galaxy`/Markov name generation off legacy
|
||||
|
|
|
|||
Loading…
Reference in a new issue