Persist faction relationships in run checkpoints
This commit is contained in:
parent
0115d8048a
commit
e0a39b2fce
8 changed files with 73 additions and 6 deletions
|
|
@ -423,6 +423,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
.OrderBy(index => index)
|
||||
.ToArray() ?? Array.Empty<int>(),
|
||||
ActionBarBindings = ProjectActionBarBindings(),
|
||||
FactionRelationships = ProjectFactionRelationships(),
|
||||
Zones = Zone == null ? Array.Empty<AetheriaRuntimeZoneSnapshotCommit>() : new[] { ProjectZoneSnapshot(Zone) }
|
||||
};
|
||||
}
|
||||
|
|
@ -467,6 +468,20 @@ public class ActionGameManager : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
private AetheriaRuntimeFactionRelationshipCommit[] ProjectFactionRelationships()
|
||||
{
|
||||
return CurrentGalaxy?.FactionRelationships?
|
||||
.Where(pair => pair.Key != null)
|
||||
.OrderBy(pair => pair.Key.ID)
|
||||
.Select(pair => new AetheriaRuntimeFactionRelationshipCommit
|
||||
{
|
||||
CorporationLegacyId = pair.Key.ID == Guid.Empty ? "" : pair.Key.ID.ToString("D"),
|
||||
Relationship = pair.Value.ToString(),
|
||||
Standing = (int)pair.Value
|
||||
})
|
||||
.ToArray() ?? Array.Empty<AetheriaRuntimeFactionRelationshipCommit>();
|
||||
}
|
||||
|
||||
private AetheriaRuntimeZoneSnapshotCommit ProjectZoneSnapshot(Zone zone)
|
||||
{
|
||||
var galaxyZone = zone.GalaxyZone;
|
||||
|
|
|
|||
Loading…
Reference in a new issue