Last active
April 7, 2025 18:54
-
-
Save pjmagee/4c973fc22e9a768e04808bb6b3425a87 to your computer and use it in GitHub Desktop.
my source generator wrote this
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <auto-generated/> | |
#nullable enable | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using MageeSoft.PDX.CE; | |
namespace MageeSoft.PDX.CE.Models | |
{ | |
public partial class Gamestate | |
{ | |
/// <summary>Original key: achievement</summary> | |
public List<int>? Achievement { get; set; } = new(); | |
/// <summary>Original key: additional_crisis_strength</summary> | |
public int AdditionalCrisisStrength { get; set; } | |
/// <summary>Original key: agreements</summary> | |
public GamestateAgreements? Agreements { get; set; } | |
/// <summary>Original key: ambient_object</summary> | |
public Dictionary<int, GamestateAmbientObjectValue?>? AmbientObject { get; set; } = new(); | |
/// <summary>Original key: archaeological_sites</summary> | |
public GamestateArchaeologicalSites? ArchaeologicalSites { get; set; } | |
/// <summary>Original key: army</summary> | |
public Dictionary<int, GamestateArmyValue>? Army { get; set; } = new(); | |
/// <summary>Original key: astral_rifts</summary> | |
public GamestateAstralRifts? AstralRifts { get; set; } | |
/// <summary>Original key: automation_resources</summary> | |
public Dictionary<int, object?>? AutomationResources { get; set; } = new(); | |
/// <summary>Original key: buildings</summary> | |
public Dictionary<int, GamestateBuildingsValue>? Buildings { get; set; } = new(); | |
/// <summary>Original key: bypasses</summary> | |
public Dictionary<int, GamestateBypassesValue>? Bypasses { get; set; } = new(); | |
/// <summary>Original key: clusters</summary> | |
public List<GamestateClustersItem>? Clusters { get; set; } = new(); | |
/// <summary>Original key: construction</summary> | |
public GamestateConstruction? Construction { get; set; } | |
/// <summary>Original key: council_positions</summary> | |
public GamestateCouncilPositions? CouncilPositions { get; set; } | |
/// <summary>Original key: country</summary> | |
public Dictionary<int, GamestateCountryValue?>? Country { get; set; } = new(); | |
/// <summary>Original key: date</summary> | |
public DateTime Date { get; set; } | |
/// <summary>Original key: date_distortion</summary> | |
public bool DateDistortion { get; set; } | |
/// <summary>Original key: debris</summary> | |
public Dictionary<int, GamestateDebrisValue?>? Debris { get; set; } = new(); | |
/// <summary>Original key: deposit</summary> | |
public Dictionary<int, GamestateDepositValue>? Deposit { get; set; } = new(); | |
/// <summary>Original key: dummy_species</summary> | |
public int DummySpecies { get; set; } | |
/// <summary>Original key: espionage_assets</summary> | |
public Dictionary<int, GamestateEspionageAssetsValue>? EspionageAssets { get; set; } = new(); | |
/// <summary>Original key: espionage_operations</summary> | |
public GamestateEspionageOperations? EspionageOperations { get; set; } | |
/// <summary>Original key: exhibits</summary> | |
public Dictionary<int, GamestateExhibitsValue>? Exhibits { get; set; } = new(); | |
/// <summary>Original key: federation</summary> | |
public Dictionary<int, object?>? Federation { get; set; } = new(); | |
/// <summary>Original key: fired_event_ids</summary> | |
public List<string>? FiredEventIds { get; set; } = new(); | |
/// <summary>Original key: first_contacts</summary> | |
public GamestateFirstContacts? FirstContacts { get; set; } | |
/// <summary>Original key: flags</summary> | |
public GamestateFlags? Flags { get; set; } | |
/// <summary>Original key: fleet</summary> | |
public Dictionary<int, GamestateFleetValue>? Fleet { get; set; } = new(); | |
/// <summary>Original key: fleet_template</summary> | |
public Dictionary<int, GamestateFleetTemplateValue>? FleetTemplate { get; set; } = new(); | |
/// <summary>Original key: galactic_community</summary> | |
public GamestateGalacticCommunity? GalacticCommunity { get; set; } | |
/// <summary>Original key: galactic_object</summary> | |
public Dictionary<int, GamestateGalacticObjectValue>? GalacticObject { get; set; } = new(); | |
/// <summary>Original key: galaxy</summary> | |
public GamestateGalaxy? Galaxy { get; set; } | |
/// <summary>Original key: galaxy_radius</summary> | |
public float GalaxyRadius { get; set; } | |
/// <summary>Original key: global_ship_design</summary> | |
public List<GamestateGlobalShipDesignItem>? GlobalShipDesign { get; set; } = new(); | |
/// <summary>Original key: ground_combat</summary> | |
public Dictionary<int, string?>? GroundCombat { get; set; } = new(); | |
/// <summary>Original key: last_created_ambient_object</summary> | |
public int LastCreatedAmbientObject { get; set; } | |
/// <summary>Original key: last_created_army</summary> | |
public int LastCreatedArmy { get; set; } | |
/// <summary>Original key: last_created_cosmic_storm</summary> | |
public int LastCreatedCosmicStorm { get; set; } | |
/// <summary>Original key: last_created_country</summary> | |
public int LastCreatedCountry { get; set; } | |
/// <summary>Original key: last_created_design</summary> | |
public int LastCreatedDesign { get; set; } | |
/// <summary>Original key: last_created_fleet</summary> | |
public int LastCreatedFleet { get; set; } | |
/// <summary>Original key: last_created_leader</summary> | |
public int LastCreatedLeader { get; set; } | |
/// <summary>Original key: last_created_pop</summary> | |
public int LastCreatedPop { get; set; } | |
/// <summary>Original key: last_created_pop_faction</summary> | |
public int LastCreatedPopFaction { get; set; } | |
/// <summary>Original key: last_created_ship</summary> | |
public int LastCreatedShip { get; set; } | |
/// <summary>Original key: last_created_species_ref</summary> | |
public int LastCreatedSpeciesRef { get; set; } | |
/// <summary>Original key: last_created_system</summary> | |
public int LastCreatedSystem { get; set; } | |
/// <summary>Original key: last_diplo_action_id</summary> | |
public int LastDiploActionId { get; set; } | |
/// <summary>Original key: last_event_id</summary> | |
public int LastEventId { get; set; } | |
/// <summary>Original key: last_killed_country_name</summary> | |
public GamestateLastKilledCountryName? LastKilledCountryName { get; set; } | |
/// <summary>Original key: last_notification_id</summary> | |
public int LastNotificationId { get; set; } | |
/// <summary>Original key: last_refugee_country</summary> | |
public int LastRefugeeCountry { get; set; } | |
/// <summary>Original key: leaders</summary> | |
public Dictionary<int, GamestateLeadersValue?>? Leaders { get; set; } = new(); | |
/// <summary>Original key: market</summary> | |
public GamestateMarket? Market { get; set; } | |
/// <summary>Original key: megastructures</summary> | |
public Dictionary<int, GamestateMegastructuresValue>? Megastructures { get; set; } = new(); | |
/// <summary>Original key: missile</summary> | |
public Dictionary<long, GamestateMissileValue?>? Missile { get; set; } = new(); | |
/// <summary>Original key: name</summary> | |
public string? Name { get; set; } | |
/// <summary>Original key: name_list</summary> | |
public Dictionary<int, object?>? NameList { get; set; } = new(); | |
/// <summary>Original key: natural_wormholes</summary> | |
public Dictionary<int, GamestateNaturalWormholesValue>? NaturalWormholes { get; set; } = new(); | |
/// <summary>Original key: nebula</summary> | |
public GamestateNebula? Nebula { get; set; } | |
/// <summary>Original key: open_player_event_selection_history</summary> | |
public GamestateOpenPlayerEventSelectionHistory? OpenPlayerEventSelectionHistory { get; set; } | |
/// <summary>Original key: orbital_line</summary> | |
public Dictionary<int, GamestateOrbitalLineValue>? OrbitalLine { get; set; } = new(); | |
/// <summary>Original key: planets</summary> | |
public GamestatePlanets? Planets { get; set; } | |
/// <summary>Original key: player</summary> | |
public List<GamestatePlayerItem>? Player { get; set; } = new(); | |
/// <summary>Original key: pop</summary> | |
public Dictionary<int, GamestatePopValue>? Pop { get; set; } = new(); | |
/// <summary>Original key: pop_factions</summary> | |
public Dictionary<int, GamestatePopFactionsValue?>? PopFactions { get; set; } = new(); | |
/// <summary>Original key: random_count</summary> | |
public int RandomCount { get; set; } | |
/// <summary>Original key: random_log_day</summary> | |
public int RandomLogDay { get; set; } | |
/// <summary>Original key: random_name_database</summary> | |
public GamestateRandomNameDatabase? RandomNameDatabase { get; set; } | |
/// <summary>Original key: random_seed</summary> | |
public int RandomSeed { get; set; } | |
/// <summary>Original key: required_dlcs</summary> | |
public List<string>? RequiredDlcs { get; set; } = new(); | |
/// <summary>Original key: rim_galactic_objects</summary> | |
public List<int>? RimGalacticObjects { get; set; } = new(); | |
/// <summary>Original key: saved_event_target</summary> | |
public GamestateSavedEventTarget? SavedEventTarget { get; set; } | |
/// <summary>Original key: saved_leaders</summary> | |
public GamestateSavedLeaders? SavedLeaders { get; set; } | |
/// <summary>Original key: sectors</summary> | |
public Dictionary<int, GamestateSectorsValue>? Sectors { get; set; } = new(); | |
/// <summary>Original key: ship_design</summary> | |
public Dictionary<int, GamestateShipDesignValue?>? ShipDesign { get; set; } = new(); | |
/// <summary>Original key: ships</summary> | |
public Dictionary<int, GamestateShipsValue?>? Ships { get; set; } = new(); | |
/// <summary>Original key: show_politics_tab</summary> | |
public bool ShowPoliticsTab { get; set; } | |
/// <summary>Original key: situations</summary> | |
public GamestateSituations? Situations { get; set; } | |
/// <summary>Original key: slave_market_manager</summary> | |
public Dictionary<int, object?>? SlaveMarketManager { get; set; } = new(); | |
/// <summary>Original key: species_db</summary> | |
public Dictionary<int, GamestateSpeciesDbValue>? SpeciesDb { get; set; } = new(); | |
/// <summary>Original key: spy_networks</summary> | |
public Dictionary<int, GamestateSpyNetworksValue?>? SpyNetworks { get; set; } = new(); | |
/// <summary>Original key: starbase_mgr</summary> | |
public GamestateStarbaseMgr? StarbaseMgr { get; set; } | |
/// <summary>Original key: storm_influence_fields</summary> | |
public GamestateStormInfluenceFields? StormInfluenceFields { get; set; } | |
/// <summary>Original key: storms</summary> | |
public GamestateStorms? Storms { get; set; } | |
/// <summary>Original key: strike_craft</summary> | |
public Dictionary<int, string?>? StrikeCraft { get; set; } = new(); | |
/// <summary>Original key: system_initializer_counter</summary> | |
public GamestateSystemInitializerCounter? SystemInitializerCounter { get; set; } | |
/// <summary>Original key: tick</summary> | |
public int Tick { get; set; } | |
/// <summary>Original key: trade_deal</summary> | |
public Dictionary<int, object?>? TradeDeal { get; set; } = new(); | |
/// <summary>Original key: trade_routes</summary> | |
public Dictionary<int, GamestateTradeRoutesValue>? TradeRoutes { get; set; } = new(); | |
/// <summary>Original key: trade_routes_manager</summary> | |
public GamestateTradeRoutesManager? TradeRoutesManager { get; set; } | |
/// <summary>Original key: truce</summary> | |
public Dictionary<int, GamestateTruceValue?>? Truce { get; set; } = new(); | |
/// <summary>Original key: used_color</summary> | |
public string? UsedColor { get; set; } | |
/// <summary>Original key: used_species_names</summary> | |
public GamestateUsedSpeciesNames? UsedSpeciesNames { get; set; } | |
/// <summary>Original key: used_species_portrait</summary> | |
public GamestateUsedSpeciesPortrait? UsedSpeciesPortrait { get; set; } | |
/// <summary>Original key: used_symbols</summary> | |
public List<long>? UsedSymbols { get; set; } = new(); | |
/// <summary>Original key: version</summary> | |
public string? Version { get; set; } | |
/// <summary>Original key: version_control_revision</summary> | |
public int VersionControlRevision { get; set; } | |
/// <summary>Original key: vivarium_critters</summary> | |
public Dictionary<int, GamestateVivariumCrittersValue>? VivariumCritters { get; set; } = new(); | |
/// <summary>Original key: war</summary> | |
public Dictionary<int, GamestateWarValue?>? War { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new Gamestate instance.</summary> | |
public static Gamestate Load(SaveObject saveObject) | |
{ | |
var model = new Gamestate(); | |
if (saveObject.TryGet<SaveArray>(@"achievement", out var achievementArr) && achievementArr != null) | |
{ | |
model.Achievement = achievementArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetInt(@"additional_crisis_strength", out int? additionalCrisisStrength)) | |
{ | |
model.AdditionalCrisisStrength = additionalCrisisStrength!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"agreements", out var agreementsObj) && agreementsObj != null) | |
{ | |
model.Agreements = GamestateAgreements.Load(agreementsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ambient_object", out var ambientObjectDictObj) && ambientObjectDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateAmbientObjectValue?>(); | |
foreach (var kvp in ambientObjectDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateAmbientObjectValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.AmbientObject = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"archaeological_sites", out var archaeologicalSitesObj) && archaeologicalSitesObj != null) | |
{ | |
model.ArchaeologicalSites = GamestateArchaeologicalSites.Load(archaeologicalSitesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"army", out var armyDictObj) && armyDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateArmyValue>(); | |
foreach (var kvp in armyDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateArmyValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Army = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"astral_rifts", out var astralRiftsObj) && astralRiftsObj != null) | |
{ | |
model.AstralRifts = GamestateAstralRifts.Load(astralRiftsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"automation_resources", out var automationResourcesDictObj) && automationResourcesDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in automationResourcesDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.AutomationResources = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildings", out var buildingsDictObj) && buildingsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateBuildingsValue>(); | |
foreach (var kvp in buildingsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateBuildingsValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Buildings = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"bypasses", out var bypassesDictObj) && bypassesDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateBypassesValue>(); | |
foreach (var kvp in bypassesDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateBypassesValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Bypasses = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveArray>(@"clusters", out var clustersArr) && clustersArr != null) | |
{ | |
model.Clusters = clustersArr.Items.OfType<SaveObject>().Select(GamestateClustersItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"construction", out var constructionObj) && constructionObj != null) | |
{ | |
model.Construction = GamestateConstruction.Load(constructionObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"council_positions", out var councilPositionsObj) && councilPositionsObj != null) | |
{ | |
model.CouncilPositions = GamestateCouncilPositions.Load(councilPositionsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"country", out var countryDictObj) && countryDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateCountryValue?>(); | |
foreach (var kvp in countryDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateCountryValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.Country = dictBuilder; | |
} | |
if (saveObject.TryGetDateTime(@"date", out DateTime? date)) | |
{ | |
model.Date = date!.Value; | |
} | |
if (saveObject.TryGetBool(@"date_distortion", out bool? dateDistortion)) | |
{ | |
model.DateDistortion = dateDistortion!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"debris", out var debrisDictObj) && debrisDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateDebrisValue?>(); | |
foreach (var kvp in debrisDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateDebrisValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.Debris = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"deposit", out var depositDictObj) && depositDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateDepositValue>(); | |
foreach (var kvp in depositDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateDepositValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Deposit = dictBuilder; | |
} | |
if (saveObject.TryGetInt(@"dummy_species", out int? dummySpecies)) | |
{ | |
model.DummySpecies = dummySpecies!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"espionage_assets", out var espionageAssetsDictObj) && espionageAssetsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateEspionageAssetsValue>(); | |
foreach (var kvp in espionageAssetsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateEspionageAssetsValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.EspionageAssets = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"espionage_operations", out var espionageOperationsObj) && espionageOperationsObj != null) | |
{ | |
model.EspionageOperations = GamestateEspionageOperations.Load(espionageOperationsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"exhibits", out var exhibitsDictObj) && exhibitsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateExhibitsValue>(); | |
foreach (var kvp in exhibitsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateExhibitsValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Exhibits = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"federation", out var federationDictObj) && federationDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in federationDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.Federation = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveArray>(@"fired_event_ids", out var firedEventIdsArr) && firedEventIdsArr != null) | |
{ | |
model.FiredEventIds = firedEventIdsArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"first_contacts", out var firstContactsObj) && firstContactsObj != null) | |
{ | |
model.FirstContacts = GamestateFirstContacts.Load(firstContactsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"flags", out var flagsObj) && flagsObj != null) | |
{ | |
model.Flags = GamestateFlags.Load(flagsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"fleet", out var fleetDictObj) && fleetDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateFleetValue>(); | |
foreach (var kvp in fleetDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateFleetValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Fleet = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"fleet_template", out var fleetTemplateDictObj) && fleetTemplateDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateFleetTemplateValue>(); | |
foreach (var kvp in fleetTemplateDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateFleetTemplateValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.FleetTemplate = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"galactic_community", out var galacticCommunityObj) && galacticCommunityObj != null) | |
{ | |
model.GalacticCommunity = GamestateGalacticCommunity.Load(galacticCommunityObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"galactic_object", out var galacticObjectDictObj) && galacticObjectDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateGalacticObjectValue>(); | |
foreach (var kvp in galacticObjectDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateGalacticObjectValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.GalacticObject = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"galaxy", out var galaxyObj) && galaxyObj != null) | |
{ | |
model.Galaxy = GamestateGalaxy.Load(galaxyObj); | |
} | |
if (saveObject.TryGetFloat(@"galaxy_radius", out float? galaxyRadius)) | |
{ | |
model.GalaxyRadius = galaxyRadius!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"global_ship_design", out var globalShipDesignArr) && globalShipDesignArr != null) | |
{ | |
model.GlobalShipDesign = globalShipDesignArr.Items.OfType<SaveObject>().Select(GamestateGlobalShipDesignItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ground_combat", out var groundCombatDictObj) && groundCombatDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, string?>(); | |
foreach (var kvp in groundCombatDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'string'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.GroundCombat = dictBuilder; | |
} | |
if (saveObject.TryGetInt(@"last_created_ambient_object", out int? lastCreatedAmbientObject)) | |
{ | |
model.LastCreatedAmbientObject = lastCreatedAmbientObject!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_army", out int? lastCreatedArmy)) | |
{ | |
model.LastCreatedArmy = lastCreatedArmy!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_cosmic_storm", out int? lastCreatedCosmicStorm)) | |
{ | |
model.LastCreatedCosmicStorm = lastCreatedCosmicStorm!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_country", out int? lastCreatedCountry)) | |
{ | |
model.LastCreatedCountry = lastCreatedCountry!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_design", out int? lastCreatedDesign)) | |
{ | |
model.LastCreatedDesign = lastCreatedDesign!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_fleet", out int? lastCreatedFleet)) | |
{ | |
model.LastCreatedFleet = lastCreatedFleet!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_leader", out int? lastCreatedLeader)) | |
{ | |
model.LastCreatedLeader = lastCreatedLeader!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_pop", out int? lastCreatedPop)) | |
{ | |
model.LastCreatedPop = lastCreatedPop!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_pop_faction", out int? lastCreatedPopFaction)) | |
{ | |
model.LastCreatedPopFaction = lastCreatedPopFaction!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_ship", out int? lastCreatedShip)) | |
{ | |
model.LastCreatedShip = lastCreatedShip!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_species_ref", out int? lastCreatedSpeciesRef)) | |
{ | |
model.LastCreatedSpeciesRef = lastCreatedSpeciesRef!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_created_system", out int? lastCreatedSystem)) | |
{ | |
model.LastCreatedSystem = lastCreatedSystem!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_diplo_action_id", out int? lastDiploActionId)) | |
{ | |
model.LastDiploActionId = lastDiploActionId!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_event_id", out int? lastEventId)) | |
{ | |
model.LastEventId = lastEventId!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"last_killed_country_name", out var lastKilledCountryNameObj) && lastKilledCountryNameObj != null) | |
{ | |
model.LastKilledCountryName = GamestateLastKilledCountryName.Load(lastKilledCountryNameObj); | |
} | |
if (saveObject.TryGetInt(@"last_notification_id", out int? lastNotificationId)) | |
{ | |
model.LastNotificationId = lastNotificationId!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_refugee_country", out int? lastRefugeeCountry)) | |
{ | |
model.LastRefugeeCountry = lastRefugeeCountry!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"leaders", out var leadersDictObj) && leadersDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateLeadersValue?>(); | |
foreach (var kvp in leadersDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateLeadersValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.Leaders = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"market", out var marketObj) && marketObj != null) | |
{ | |
model.Market = GamestateMarket.Load(marketObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"megastructures", out var megastructuresDictObj) && megastructuresDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateMegastructuresValue>(); | |
foreach (var kvp in megastructuresDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateMegastructuresValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Megastructures = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"missile", out var missileDictObj) && missileDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<long, GamestateMissileValue?>(); | |
foreach (var kvp in missileDictObj.Properties) | |
{ | |
if (long.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateMissileValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.Missile = dictBuilder; | |
} | |
if (saveObject.TryGetString(@"name", out string? name)) | |
{ | |
model.Name = name; | |
} | |
if (saveObject.TryGet<SaveObject>(@"name_list", out var nameListDictObj) && nameListDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in nameListDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.NameList = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"natural_wormholes", out var naturalWormholesDictObj) && naturalWormholesDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateNaturalWormholesValue>(); | |
foreach (var kvp in naturalWormholesDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateNaturalWormholesValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.NaturalWormholes = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"nebula", out var nebulaObj) && nebulaObj != null) | |
{ | |
model.Nebula = GamestateNebula.Load(nebulaObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"open_player_event_selection_history", out var openPlayerEventSelectionHistoryObj) && openPlayerEventSelectionHistoryObj != null) | |
{ | |
model.OpenPlayerEventSelectionHistory = GamestateOpenPlayerEventSelectionHistory.Load(openPlayerEventSelectionHistoryObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"orbital_line", out var orbitalLineDictObj) && orbitalLineDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateOrbitalLineValue>(); | |
foreach (var kvp in orbitalLineDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateOrbitalLineValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.OrbitalLine = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"planets", out var planetsObj) && planetsObj != null) | |
{ | |
model.Planets = GamestatePlanets.Load(planetsObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"player", out var playerArr) && playerArr != null) | |
{ | |
model.Player = playerArr.Items.OfType<SaveObject>().Select(GamestatePlayerItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop", out var popDictObj) && popDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestatePopValue>(); | |
foreach (var kvp in popDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestatePopValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Pop = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_factions", out var popFactionsDictObj) && popFactionsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestatePopFactionsValue?>(); | |
foreach (var kvp in popFactionsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestatePopFactionsValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.PopFactions = dictBuilder; | |
} | |
if (saveObject.TryGetInt(@"random_count", out int? randomCount)) | |
{ | |
model.RandomCount = randomCount!.Value; | |
} | |
if (saveObject.TryGetInt(@"random_log_day", out int? randomLogDay)) | |
{ | |
model.RandomLogDay = randomLogDay!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"random_name_database", out var randomNameDatabaseObj) && randomNameDatabaseObj != null) | |
{ | |
model.RandomNameDatabase = GamestateRandomNameDatabase.Load(randomNameDatabaseObj); | |
} | |
if (saveObject.TryGetInt(@"random_seed", out int? randomSeed)) | |
{ | |
model.RandomSeed = randomSeed!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"required_dlcs", out var requiredDlcsArr) && requiredDlcsArr != null) | |
{ | |
model.RequiredDlcs = requiredDlcsArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"rim_galactic_objects", out var rimGalacticObjectsArr) && rimGalacticObjectsArr != null) | |
{ | |
model.RimGalacticObjects = rimGalacticObjectsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"saved_event_target", out var savedEventTargetObj) && savedEventTargetObj != null) | |
{ | |
model.SavedEventTarget = GamestateSavedEventTarget.Load(savedEventTargetObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"saved_leaders", out var savedLeadersObj) && savedLeadersObj != null) | |
{ | |
model.SavedLeaders = GamestateSavedLeaders.Load(savedLeadersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"sectors", out var sectorsDictObj) && sectorsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateSectorsValue>(); | |
foreach (var kvp in sectorsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateSectorsValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Sectors = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"ship_design", out var shipDesignDictObj) && shipDesignDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateShipDesignValue?>(); | |
foreach (var kvp in shipDesignDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateShipDesignValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.ShipDesign = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"ships", out var shipsDictObj) && shipsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateShipsValue?>(); | |
foreach (var kvp in shipsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateShipsValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.Ships = dictBuilder; | |
} | |
if (saveObject.TryGetBool(@"show_politics_tab", out bool? showPoliticsTab)) | |
{ | |
model.ShowPoliticsTab = showPoliticsTab!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"situations", out var situationsObj) && situationsObj != null) | |
{ | |
model.Situations = GamestateSituations.Load(situationsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"slave_market_manager", out var slaveMarketManagerDictObj) && slaveMarketManagerDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in slaveMarketManagerDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.SlaveMarketManager = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"species_db", out var speciesDbDictObj) && speciesDbDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateSpeciesDbValue>(); | |
foreach (var kvp in speciesDbDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateSpeciesDbValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.SpeciesDb = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"spy_networks", out var spyNetworksDictObj) && spyNetworksDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateSpyNetworksValue?>(); | |
foreach (var kvp in spyNetworksDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateSpyNetworksValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.SpyNetworks = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_mgr", out var starbaseMgrObj) && starbaseMgrObj != null) | |
{ | |
model.StarbaseMgr = GamestateStarbaseMgr.Load(starbaseMgrObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"storm_influence_fields", out var stormInfluenceFieldsObj) && stormInfluenceFieldsObj != null) | |
{ | |
model.StormInfluenceFields = GamestateStormInfluenceFields.Load(stormInfluenceFieldsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"storms", out var stormsObj) && stormsObj != null) | |
{ | |
model.Storms = GamestateStorms.Load(stormsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"strike_craft", out var strikeCraftDictObj) && strikeCraftDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, string?>(); | |
foreach (var kvp in strikeCraftDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'string'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.StrikeCraft = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"system_initializer_counter", out var systemInitializerCounterObj) && systemInitializerCounterObj != null) | |
{ | |
model.SystemInitializerCounter = GamestateSystemInitializerCounter.Load(systemInitializerCounterObj); | |
} | |
if (saveObject.TryGetInt(@"tick", out int? tick)) | |
{ | |
model.Tick = tick!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_deal", out var tradeDealDictObj) && tradeDealDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in tradeDealDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.TradeDeal = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_routes", out var tradeRoutesDictObj) && tradeRoutesDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateTradeRoutesValue>(); | |
foreach (var kvp in tradeRoutesDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateTradeRoutesValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.TradeRoutes = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_routes_manager", out var tradeRoutesManagerObj) && tradeRoutesManagerObj != null) | |
{ | |
model.TradeRoutesManager = GamestateTradeRoutesManager.Load(tradeRoutesManagerObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"truce", out var truceDictObj) && truceDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateTruceValue?>(); | |
foreach (var kvp in truceDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateTruceValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.Truce = dictBuilder; | |
} | |
if (saveObject.TryGetString(@"used_color", out string? usedColor)) | |
{ | |
model.UsedColor = usedColor; | |
} | |
if (saveObject.TryGet<SaveObject>(@"used_species_names", out var usedSpeciesNamesObj) && usedSpeciesNamesObj != null) | |
{ | |
model.UsedSpeciesNames = GamestateUsedSpeciesNames.Load(usedSpeciesNamesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"used_species_portrait", out var usedSpeciesPortraitObj) && usedSpeciesPortraitObj != null) | |
{ | |
model.UsedSpeciesPortrait = GamestateUsedSpeciesPortrait.Load(usedSpeciesPortraitObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"used_symbols", out var usedSymbolsArr) && usedSymbolsArr != null) | |
{ | |
model.UsedSymbols = usedSymbolsArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetString(@"version", out string? version)) | |
{ | |
model.Version = version; | |
} | |
if (saveObject.TryGetInt(@"version_control_revision", out int? versionControlRevision)) | |
{ | |
model.VersionControlRevision = versionControlRevision!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"vivarium_critters", out var vivariumCrittersDictObj) && vivariumCrittersDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateVivariumCrittersValue>(); | |
foreach (var kvp in vivariumCrittersDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateVivariumCrittersValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.VivariumCritters = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"war", out var warDictObj) && warDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateWarValue?>(); | |
foreach (var kvp in warDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateWarValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.War = dictBuilder; | |
} | |
return model; | |
} | |
public class GamestateAgreements | |
{ | |
/// <summary>Original key: agreements</summary> | |
public Dictionary<int, GamestateAgreementsAgreementsValue>? Agreements { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateAgreements instance.</summary> | |
public static GamestateAgreements Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAgreements(); | |
if (saveObject.TryGet<SaveObject>(@"agreements", out var agreementsDictObj) && agreementsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateAgreementsAgreementsValue>(); | |
foreach (var kvp in agreementsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateAgreementsAgreementsValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Agreements = dictBuilder; | |
} | |
return model; | |
} | |
public class GamestateAgreementsAgreementsValue | |
{ | |
/// <summary>Original key: active_status</summary> | |
public string? ActiveStatus { get; set; } | |
/// <summary>Original key: date_added</summary> | |
public DateTime DateAdded { get; set; } | |
/// <summary>Original key: date_changed</summary> | |
public DateTime DateChanged { get; set; } | |
/// <summary>Original key: owner</summary> | |
public int Owner { get; set; } | |
/// <summary>Original key: subject_specialization</summary> | |
public GamestateAgreementsAgreementsValueSubjectSpecialization? SubjectSpecialization { get; set; } | |
/// <summary>Original key: target</summary> | |
public int Target { get; set; } | |
/// <summary>Original key: term_data</summary> | |
public GamestateAgreementsAgreementsValueTermData? TermData { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAgreementsAgreementsValue instance.</summary> | |
public static GamestateAgreementsAgreementsValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAgreementsAgreementsValue(); | |
if (saveObject.TryGetString(@"active_status", out string? activeStatus)) | |
{ | |
model.ActiveStatus = activeStatus; | |
} | |
if (saveObject.TryGetDateTime(@"date_added", out DateTime? dateAdded)) | |
{ | |
model.DateAdded = dateAdded!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"date_changed", out DateTime? dateChanged)) | |
{ | |
model.DateChanged = dateChanged!.Value; | |
} | |
if (saveObject.TryGetInt(@"owner", out int? owner)) | |
{ | |
model.Owner = owner!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"subject_specialization", out var subjectSpecializationObj) && subjectSpecializationObj != null) | |
{ | |
model.SubjectSpecialization = GamestateAgreementsAgreementsValueSubjectSpecialization.Load(subjectSpecializationObj); | |
} | |
if (saveObject.TryGetInt(@"target", out int? target)) | |
{ | |
model.Target = target!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"term_data", out var termDataObj) && termDataObj != null) | |
{ | |
model.TermData = GamestateAgreementsAgreementsValueTermData.Load(termDataObj); | |
} | |
return model; | |
} | |
public class GamestateAgreementsAgreementsValueSubjectSpecialization | |
{ | |
/// <summary>Original key: experience</summary> | |
public int Experience { get; set; } | |
/// <summary>Original key: level</summary> | |
public int Level { get; set; } | |
/// <summary>Original key: subject_conversion_process</summary> | |
public GamestateAgreementsAgreementsValueSubjectSpecializationSubjectConversionProcess? SubjectConversionProcess { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAgreementsAgreementsValueSubjectSpecialization instance.</summary> | |
public static GamestateAgreementsAgreementsValueSubjectSpecialization Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAgreementsAgreementsValueSubjectSpecialization(); | |
if (saveObject.TryGetInt(@"experience", out int? experience)) | |
{ | |
model.Experience = experience!.Value; | |
} | |
if (saveObject.TryGetInt(@"level", out int? level)) | |
{ | |
model.Level = level!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"subject_conversion_process", out var subjectConversionProcessObj) && subjectConversionProcessObj != null) | |
{ | |
model.SubjectConversionProcess = GamestateAgreementsAgreementsValueSubjectSpecializationSubjectConversionProcess.Load(subjectConversionProcessObj); | |
} | |
return model; | |
} | |
public class GamestateAgreementsAgreementsValueSubjectSpecializationSubjectConversionProcess | |
{ | |
/// <summary>Original key: done</summary> | |
public bool Done { get; set; } | |
/// <summary>Original key: ignore</summary> | |
public bool Ignore { get; set; } | |
/// <summary>Original key: in_progress</summary> | |
public bool InProgress { get; set; } | |
/// <summary>Original key: progress</summary> | |
public int Progress { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAgreementsAgreementsValueSubjectSpecializationSubjectConversionProcess instance.</summary> | |
public static GamestateAgreementsAgreementsValueSubjectSpecializationSubjectConversionProcess Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAgreementsAgreementsValueSubjectSpecializationSubjectConversionProcess(); | |
if (saveObject.TryGetBool(@"done", out bool? done)) | |
{ | |
model.Done = done!.Value; | |
} | |
if (saveObject.TryGetBool(@"ignore", out bool? ignore)) | |
{ | |
model.Ignore = ignore!.Value; | |
} | |
if (saveObject.TryGetBool(@"in_progress", out bool? inProgress)) | |
{ | |
model.InProgress = inProgress!.Value; | |
} | |
if (saveObject.TryGetInt(@"progress", out int? progress)) | |
{ | |
model.Progress = progress!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateAgreementsAgreementsValueTermData | |
{ | |
/// <summary>Original key: agreement_preset</summary> | |
public string? AgreementPreset { get; set; } | |
/// <summary>Original key: calls_overlord_to_war</summary> | |
public string? CallsOverlordToWar { get; set; } | |
/// <summary>Original key: can_subject_be_integrated</summary> | |
public bool CanSubjectBeIntegrated { get; set; } | |
/// <summary>Original key: can_subject_do_diplomacy</summary> | |
public bool CanSubjectDoDiplomacy { get; set; } | |
/// <summary>Original key: can_subject_vote</summary> | |
public bool CanSubjectVote { get; set; } | |
/// <summary>Original key: discrete_terms</summary> | |
public List<GamestateAgreementsAgreementsValueTermDataDiscreteTermsItem>? DiscreteTerms { get; set; } = new(); | |
/// <summary>Original key: forced_initial_loyalty</summary> | |
public int ForcedInitialLoyalty { get; set; } | |
/// <summary>Original key: has_access</summary> | |
public bool HasAccess { get; set; } | |
/// <summary>Original key: has_cooldown_on_first_renegotiation</summary> | |
public bool HasCooldownOnFirstRenegotiation { get; set; } | |
/// <summary>Original key: has_sensors</summary> | |
public bool HasSensors { get; set; } | |
/// <summary>Original key: joins_overlord_wars</summary> | |
public string? JoinsOverlordWars { get; set; } | |
/// <summary>Original key: resource_terms</summary> | |
public List<GamestateAgreementsAgreementsValueTermDataResourceTermsItem>? ResourceTerms { get; set; } = new(); | |
/// <summary>Original key: subject_expansion_type</summary> | |
public string? SubjectExpansionType { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAgreementsAgreementsValueTermData instance.</summary> | |
public static GamestateAgreementsAgreementsValueTermData Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAgreementsAgreementsValueTermData(); | |
if (saveObject.TryGetString(@"agreement_preset", out string? agreementPreset)) | |
{ | |
model.AgreementPreset = agreementPreset; | |
} | |
if (saveObject.TryGetString(@"calls_overlord_to_war", out string? callsOverlordToWar)) | |
{ | |
model.CallsOverlordToWar = callsOverlordToWar; | |
} | |
if (saveObject.TryGetBool(@"can_subject_be_integrated", out bool? canSubjectBeIntegrated)) | |
{ | |
model.CanSubjectBeIntegrated = canSubjectBeIntegrated!.Value; | |
} | |
if (saveObject.TryGetBool(@"can_subject_do_diplomacy", out bool? canSubjectDoDiplomacy)) | |
{ | |
model.CanSubjectDoDiplomacy = canSubjectDoDiplomacy!.Value; | |
} | |
if (saveObject.TryGetBool(@"can_subject_vote", out bool? canSubjectVote)) | |
{ | |
model.CanSubjectVote = canSubjectVote!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"discrete_terms", out var discreteTermsArr) && discreteTermsArr != null) | |
{ | |
model.DiscreteTerms = discreteTermsArr.Items.OfType<SaveObject>().Select(GamestateAgreementsAgreementsValueTermDataDiscreteTermsItem.Load).ToList(); | |
} | |
if (saveObject.TryGetInt(@"forced_initial_loyalty", out int? forcedInitialLoyalty)) | |
{ | |
model.ForcedInitialLoyalty = forcedInitialLoyalty!.Value; | |
} | |
if (saveObject.TryGetBool(@"has_access", out bool? hasAccess)) | |
{ | |
model.HasAccess = hasAccess!.Value; | |
} | |
if (saveObject.TryGetBool(@"has_cooldown_on_first_renegotiation", out bool? hasCooldownOnFirstRenegotiation)) | |
{ | |
model.HasCooldownOnFirstRenegotiation = hasCooldownOnFirstRenegotiation!.Value; | |
} | |
if (saveObject.TryGetBool(@"has_sensors", out bool? hasSensors)) | |
{ | |
model.HasSensors = hasSensors!.Value; | |
} | |
if (saveObject.TryGetString(@"joins_overlord_wars", out string? joinsOverlordWars)) | |
{ | |
model.JoinsOverlordWars = joinsOverlordWars; | |
} | |
if (saveObject.TryGet<SaveArray>(@"resource_terms", out var resourceTermsArr) && resourceTermsArr != null) | |
{ | |
model.ResourceTerms = resourceTermsArr.Items.OfType<SaveObject>().Select(GamestateAgreementsAgreementsValueTermDataResourceTermsItem.Load).ToList(); | |
} | |
if (saveObject.TryGetString(@"subject_expansion_type", out string? subjectExpansionType)) | |
{ | |
model.SubjectExpansionType = subjectExpansionType; | |
} | |
return model; | |
} | |
public class GamestateAgreementsAgreementsValueTermDataDiscreteTermsItem | |
{ | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Original key: value</summary> | |
public string? Value { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAgreementsAgreementsValueTermDataDiscreteTermsItem instance.</summary> | |
public static GamestateAgreementsAgreementsValueTermDataDiscreteTermsItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAgreementsAgreementsValueTermDataDiscreteTermsItem(); | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
if (saveObject.TryGetString(@"value", out string? value)) | |
{ | |
model.Value = value; | |
} | |
return model; | |
} | |
} | |
public class GamestateAgreementsAgreementsValueTermDataResourceTermsItem | |
{ | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Original key: value</summary> | |
public int Value { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAgreementsAgreementsValueTermDataResourceTermsItem instance.</summary> | |
public static GamestateAgreementsAgreementsValueTermDataResourceTermsItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAgreementsAgreementsValueTermDataResourceTermsItem(); | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
if (saveObject.TryGetInt(@"value", out int? value)) | |
{ | |
model.Value = value!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
public class GamestateAmbientObjectValue | |
{ | |
/// <summary>Original key: coordinate</summary> | |
public GamestateAmbientObjectValueCoordinate? Coordinate { get; set; } | |
/// <summary>Original key: data</summary> | |
public string? Data { get; set; } | |
/// <summary>Original key: flags</summary> | |
public GamestateAmbientObjectValueFlags? Flags { get; set; } | |
/// <summary>Original key: properties</summary> | |
public GamestateAmbientObjectValueProperties? Properties { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAmbientObjectValue instance.</summary> | |
public static GamestateAmbientObjectValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAmbientObjectValue(); | |
if (saveObject.TryGet<SaveObject>(@"coordinate", out var coordinateObj) && coordinateObj != null) | |
{ | |
model.Coordinate = GamestateAmbientObjectValueCoordinate.Load(coordinateObj); | |
} | |
if (saveObject.TryGetString(@"data", out string? data)) | |
{ | |
model.Data = data; | |
} | |
if (saveObject.TryGet<SaveObject>(@"flags", out var flagsObj) && flagsObj != null) | |
{ | |
model.Flags = GamestateAmbientObjectValueFlags.Load(flagsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"properties", out var propertiesObj) && propertiesObj != null) | |
{ | |
model.Properties = GamestateAmbientObjectValueProperties.Load(propertiesObj); | |
} | |
return model; | |
} | |
public class GamestateAmbientObjectValueCoordinate | |
{ | |
/// <summary>Original key: origin</summary> | |
public int Origin { get; set; } | |
/// <summary>Original key: randomized</summary> | |
public bool Randomized { get; set; } | |
/// <summary>Original key: visual_height</summary> | |
public float VisualHeight { get; set; } | |
/// <summary>Original key: x</summary> | |
public float X { get; set; } | |
/// <summary>Original key: y</summary> | |
public float Y { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAmbientObjectValueCoordinate instance.</summary> | |
public static GamestateAmbientObjectValueCoordinate Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAmbientObjectValueCoordinate(); | |
if (saveObject.TryGetInt(@"origin", out int? origin)) | |
{ | |
model.Origin = origin!.Value; | |
} | |
if (saveObject.TryGetBool(@"randomized", out bool? randomized)) | |
{ | |
model.Randomized = randomized!.Value; | |
} | |
if (saveObject.TryGetFloat(@"visual_height", out float? visualHeight)) | |
{ | |
model.VisualHeight = visualHeight!.Value; | |
} | |
if (saveObject.TryGetFloat(@"x", out float? x)) | |
{ | |
model.X = x!.Value; | |
} | |
if (saveObject.TryGetFloat(@"y", out float? y)) | |
{ | |
model.Y = y!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateAmbientObjectValueFlags | |
{ | |
/// <summary>Original key: salvager_debris_field</summary> | |
public int SalvagerDebrisField { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAmbientObjectValueFlags instance.</summary> | |
public static GamestateAmbientObjectValueFlags Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAmbientObjectValueFlags(); | |
if (saveObject.TryGetInt(@"salvager_debris_field", out int? salvagerDebrisField)) | |
{ | |
model.SalvagerDebrisField = salvagerDebrisField!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateAmbientObjectValueProperties | |
{ | |
/// <summary>Original key: appear_state</summary> | |
public string? AppearState { get; set; } | |
/// <summary>Original key: attach</summary> | |
public GamestateAmbientObjectValuePropertiesAttach? Attach { get; set; } | |
/// <summary>Original key: coordinate</summary> | |
public GamestateAmbientObjectValuePropertiesCoordinate? Coordinate { get; set; } | |
/// <summary>Original key: entity_face_object</summary> | |
public GamestateAmbientObjectValuePropertiesEntityFaceObject? EntityFaceObject { get; set; } | |
/// <summary>Original key: offset</summary> | |
public List<float>? Offset { get; set; } = new(); | |
/// <summary>Original key: scale</summary> | |
public int Scale { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAmbientObjectValueProperties instance.</summary> | |
public static GamestateAmbientObjectValueProperties Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAmbientObjectValueProperties(); | |
if (saveObject.TryGetString(@"appear_state", out string? appearState)) | |
{ | |
model.AppearState = appearState; | |
} | |
if (saveObject.TryGet<SaveObject>(@"attach", out var attachObj) && attachObj != null) | |
{ | |
model.Attach = GamestateAmbientObjectValuePropertiesAttach.Load(attachObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"coordinate", out var coordinateObj) && coordinateObj != null) | |
{ | |
model.Coordinate = GamestateAmbientObjectValuePropertiesCoordinate.Load(coordinateObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"entity_face_object", out var entityFaceObjectObj) && entityFaceObjectObj != null) | |
{ | |
model.EntityFaceObject = GamestateAmbientObjectValuePropertiesEntityFaceObject.Load(entityFaceObjectObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"offset", out var offsetArr) && offsetArr != null) | |
{ | |
model.Offset = offsetArr.Items.OfType<Scalar<float>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetInt(@"scale", out int? scale)) | |
{ | |
model.Scale = scale!.Value; | |
} | |
return model; | |
} | |
public class GamestateAmbientObjectValuePropertiesAttach | |
{ | |
/// <summary>Original key: id</summary> | |
public long Id { get; set; } | |
/// <summary>Original key: type</summary> | |
public int Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAmbientObjectValuePropertiesAttach instance.</summary> | |
public static GamestateAmbientObjectValuePropertiesAttach Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAmbientObjectValuePropertiesAttach(); | |
if (saveObject.TryGetLong(@"id", out long? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetInt(@"type", out int? @type)) | |
{ | |
model.Type = @type!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateAmbientObjectValuePropertiesCoordinate | |
{ | |
/// <summary>Original key: origin</summary> | |
public int Origin { get; set; } | |
/// <summary>Original key: randomized</summary> | |
public bool Randomized { get; set; } | |
/// <summary>Original key: visual_height</summary> | |
public float VisualHeight { get; set; } | |
/// <summary>Original key: x</summary> | |
public float X { get; set; } | |
/// <summary>Original key: y</summary> | |
public float Y { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAmbientObjectValuePropertiesCoordinate instance.</summary> | |
public static GamestateAmbientObjectValuePropertiesCoordinate Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAmbientObjectValuePropertiesCoordinate(); | |
if (saveObject.TryGetInt(@"origin", out int? origin)) | |
{ | |
model.Origin = origin!.Value; | |
} | |
if (saveObject.TryGetBool(@"randomized", out bool? randomized)) | |
{ | |
model.Randomized = randomized!.Value; | |
} | |
if (saveObject.TryGetFloat(@"visual_height", out float? visualHeight)) | |
{ | |
model.VisualHeight = visualHeight!.Value; | |
} | |
if (saveObject.TryGetFloat(@"x", out float? x)) | |
{ | |
model.X = x!.Value; | |
} | |
if (saveObject.TryGetFloat(@"y", out float? y)) | |
{ | |
model.Y = y!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateAmbientObjectValuePropertiesEntityFaceObject | |
{ | |
/// <summary>Original key: id</summary> | |
public long Id { get; set; } | |
/// <summary>Original key: type</summary> | |
public int Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAmbientObjectValuePropertiesEntityFaceObject instance.</summary> | |
public static GamestateAmbientObjectValuePropertiesEntityFaceObject Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAmbientObjectValuePropertiesEntityFaceObject(); | |
if (saveObject.TryGetLong(@"id", out long? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetInt(@"type", out int? @type)) | |
{ | |
model.Type = @type!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
public class GamestateArchaeologicalSites | |
{ | |
/// <summary>Original key: sites</summary> | |
public Dictionary<int, GamestateArchaeologicalSitesSitesValue>? Sites { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateArchaeologicalSites instance.</summary> | |
public static GamestateArchaeologicalSites Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArchaeologicalSites(); | |
if (saveObject.TryGet<SaveObject>(@"sites", out var sitesDictObj) && sitesDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateArchaeologicalSitesSitesValue>(); | |
foreach (var kvp in sitesDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateArchaeologicalSitesSitesValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Sites = dictBuilder; | |
} | |
return model; | |
} | |
public class GamestateArchaeologicalSitesSitesValue | |
{ | |
/// <summary>Original key: clues</summary> | |
public int Clues { get; set; } | |
/// <summary>Original key: completed</summary> | |
public List<GamestateArchaeologicalSitesSitesValueCompletedItem>? Completed { get; set; } = new(); | |
/// <summary>Original key: days_left</summary> | |
public int DaysLeft { get; set; } | |
/// <summary>Original key: difficulty</summary> | |
public int Difficulty { get; set; } | |
/// <summary>Original key: events</summary> | |
public List<GamestateArchaeologicalSitesSitesValueEventsItem>? Events { get; set; } = new(); | |
/// <summary>Original key: excavator_fleet</summary> | |
public long ExcavatorFleet { get; set; } | |
/// <summary>Original key: index</summary> | |
public int Index { get; set; } | |
/// <summary>Original key: last_excavator_country</summary> | |
public long LastExcavatorCountry { get; set; } | |
/// <summary>Original key: last_roll</summary> | |
public int LastRoll { get; set; } | |
/// <summary>Original key: location</summary> | |
public GamestateArchaeologicalSitesSitesValueLocation? Location { get; set; } | |
/// <summary>Original key: locked</summary> | |
public bool Locked { get; set; } | |
/// <summary>Original key: log</summary> | |
public List<GamestateArchaeologicalSitesSitesValueLogItem>? Log { get; set; } = new(); | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Original key: visible_to</summary> | |
public List<int>? VisibleTo { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateArchaeologicalSitesSitesValue instance.</summary> | |
public static GamestateArchaeologicalSitesSitesValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArchaeologicalSitesSitesValue(); | |
if (saveObject.TryGetInt(@"clues", out int? clues)) | |
{ | |
model.Clues = clues!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"completed", out var completedArr) && completedArr != null) | |
{ | |
model.Completed = completedArr.Items.OfType<SaveObject>().Select(GamestateArchaeologicalSitesSitesValueCompletedItem.Load).ToList(); | |
} | |
if (saveObject.TryGetInt(@"days_left", out int? daysLeft)) | |
{ | |
model.DaysLeft = daysLeft!.Value; | |
} | |
if (saveObject.TryGetInt(@"difficulty", out int? difficulty)) | |
{ | |
model.Difficulty = difficulty!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"events", out var eventsArr) && eventsArr != null) | |
{ | |
model.Events = eventsArr.Items.OfType<SaveObject>().Select(GamestateArchaeologicalSitesSitesValueEventsItem.Load).ToList(); | |
} | |
if (saveObject.TryGetLong(@"excavator_fleet", out long? excavatorFleet)) | |
{ | |
model.ExcavatorFleet = excavatorFleet!.Value; | |
} | |
if (saveObject.TryGetInt(@"index", out int? index)) | |
{ | |
model.Index = index!.Value; | |
} | |
if (saveObject.TryGetLong(@"last_excavator_country", out long? lastExcavatorCountry)) | |
{ | |
model.LastExcavatorCountry = lastExcavatorCountry!.Value; | |
} | |
if (saveObject.TryGetInt(@"last_roll", out int? lastRoll)) | |
{ | |
model.LastRoll = lastRoll!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"location", out var locationObj) && locationObj != null) | |
{ | |
model.Location = GamestateArchaeologicalSitesSitesValueLocation.Load(locationObj); | |
} | |
if (saveObject.TryGetBool(@"locked", out bool? locked)) | |
{ | |
model.Locked = locked!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"log", out var logArr) && logArr != null) | |
{ | |
model.Log = logArr.Items.OfType<SaveObject>().Select(GamestateArchaeologicalSitesSitesValueLogItem.Load).ToList(); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
if (saveObject.TryGet<SaveArray>(@"visible_to", out var visibleToArr) && visibleToArr != null) | |
{ | |
model.VisibleTo = visibleToArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
return model; | |
} | |
public class GamestateArchaeologicalSitesSitesValueCompletedItem | |
{ | |
/// <summary>Original key: country</summary> | |
public int Country { get; set; } | |
/// <summary>Original key: date</summary> | |
public DateTime Date { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateArchaeologicalSitesSitesValueCompletedItem instance.</summary> | |
public static GamestateArchaeologicalSitesSitesValueCompletedItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArchaeologicalSitesSitesValueCompletedItem(); | |
if (saveObject.TryGetInt(@"country", out int? country)) | |
{ | |
model.Country = country!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"date", out DateTime? date)) | |
{ | |
model.Date = date!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateArchaeologicalSitesSitesValueEventsItem | |
{ | |
/// <summary>Original key: effect</summary> | |
public string? Effect { get; set; } | |
/// <summary>Original key: event_id</summary> | |
public string? EventId { get; set; } | |
/// <summary>Original key: expired</summary> | |
public bool Expired { get; set; } | |
/// <summary>Original key: fleet</summary> | |
public int Fleet { get; set; } | |
/// <summary>Original key: index</summary> | |
public int Index { get; set; } | |
/// <summary>Original key: owner</summary> | |
public int Owner { get; set; } | |
/// <summary>Original key: picture</summary> | |
public string? Picture { get; set; } | |
/// <summary>Original key: scope</summary> | |
public GamestateArchaeologicalSitesSitesValueEventsItemScope? Scope { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateArchaeologicalSitesSitesValueEventsItem instance.</summary> | |
public static GamestateArchaeologicalSitesSitesValueEventsItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArchaeologicalSitesSitesValueEventsItem(); | |
if (saveObject.TryGetString(@"effect", out string? effect)) | |
{ | |
model.Effect = effect; | |
} | |
if (saveObject.TryGetString(@"event_id", out string? eventId)) | |
{ | |
model.EventId = eventId; | |
} | |
if (saveObject.TryGetBool(@"expired", out bool? expired)) | |
{ | |
model.Expired = expired!.Value; | |
} | |
if (saveObject.TryGetInt(@"fleet", out int? fleet)) | |
{ | |
model.Fleet = fleet!.Value; | |
} | |
if (saveObject.TryGetInt(@"index", out int? index)) | |
{ | |
model.Index = index!.Value; | |
} | |
if (saveObject.TryGetInt(@"owner", out int? owner)) | |
{ | |
model.Owner = owner!.Value; | |
} | |
if (saveObject.TryGetString(@"picture", out string? picture)) | |
{ | |
model.Picture = picture; | |
} | |
if (saveObject.TryGet<SaveObject>(@"scope", out var scopeObj) && scopeObj != null) | |
{ | |
model.Scope = GamestateArchaeologicalSitesSitesValueEventsItemScope.Load(scopeObj); | |
} | |
return model; | |
} | |
public class GamestateArchaeologicalSitesSitesValueEventsItemScope | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateArchaeologicalSitesSitesValueEventsItemScopeFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<int>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateArchaeologicalSitesSitesValueEventsItemScope instance.</summary> | |
public static GamestateArchaeologicalSitesSitesValueEventsItemScope Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArchaeologicalSitesSitesValueEventsItemScope(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateArchaeologicalSitesSitesValueEventsItemScopeFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateArchaeologicalSitesSitesValueEventsItemScopeFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<int>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateArchaeologicalSitesSitesValueEventsItemScopeFrom instance.</summary> | |
public static GamestateArchaeologicalSitesSitesValueEventsItemScopeFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArchaeologicalSitesSitesValueEventsItemScopeFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
public class GamestateArchaeologicalSitesSitesValueLocation | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: type</summary> | |
public int Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateArchaeologicalSitesSitesValueLocation instance.</summary> | |
public static GamestateArchaeologicalSitesSitesValueLocation Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArchaeologicalSitesSitesValueLocation(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetInt(@"type", out int? @type)) | |
{ | |
model.Type = @type!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateArchaeologicalSitesSitesValueLogItem | |
{ | |
/// <summary>Original key: bonus</summary> | |
public int Bonus { get; set; } | |
/// <summary>Original key: clues</summary> | |
public int Clues { get; set; } | |
/// <summary>Original key: date</summary> | |
public DateTime Date { get; set; } | |
/// <summary>Original key: difficulty</summary> | |
public int Difficulty { get; set; } | |
/// <summary>Original key: roll</summary> | |
public int Roll { get; set; } | |
/// <summary>Original key: title</summary> | |
public string? Title { get; set; } | |
/// <summary>Original key: tooltip</summary> | |
public string? Tooltip { get; set; } | |
/// <summary>Original key: total</summary> | |
public int Total { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateArchaeologicalSitesSitesValueLogItem instance.</summary> | |
public static GamestateArchaeologicalSitesSitesValueLogItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArchaeologicalSitesSitesValueLogItem(); | |
if (saveObject.TryGetInt(@"bonus", out int? bonus)) | |
{ | |
model.Bonus = bonus!.Value; | |
} | |
if (saveObject.TryGetInt(@"clues", out int? clues)) | |
{ | |
model.Clues = clues!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"date", out DateTime? date)) | |
{ | |
model.Date = date!.Value; | |
} | |
if (saveObject.TryGetInt(@"difficulty", out int? difficulty)) | |
{ | |
model.Difficulty = difficulty!.Value; | |
} | |
if (saveObject.TryGetInt(@"roll", out int? roll)) | |
{ | |
model.Roll = roll!.Value; | |
} | |
if (saveObject.TryGetString(@"title", out string? title)) | |
{ | |
model.Title = title; | |
} | |
if (saveObject.TryGetString(@"tooltip", out string? tooltip)) | |
{ | |
model.Tooltip = tooltip; | |
} | |
if (saveObject.TryGetInt(@"total", out int? total)) | |
{ | |
model.Total = total!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
public class GamestateArmyValue | |
{ | |
/// <summary>Original key: experience</summary> | |
public int Experience { get; set; } | |
/// <summary>Original key: health</summary> | |
public int Health { get; set; } | |
/// <summary>Original key: home_planet</summary> | |
public int HomePlanet { get; set; } | |
/// <summary>Original key: is_defense_army_mod_spawned</summary> | |
public bool IsDefenseArmyModSpawned { get; set; } | |
/// <summary>Original key: jump_drive_cooldown</summary> | |
public string? JumpDriveCooldown { get; set; } | |
/// <summary>Original key: leader</summary> | |
public int Leader { get; set; } | |
/// <summary>Original key: max_health</summary> | |
public int MaxHealth { get; set; } | |
/// <summary>Original key: morale</summary> | |
public int Morale { get; set; } | |
/// <summary>Original key: name</summary> | |
public GamestateArmyValueName? Name { get; set; } | |
/// <summary>Original key: owner</summary> | |
public int Owner { get; set; } | |
/// <summary>Original key: planet</summary> | |
public int Planet { get; set; } | |
/// <summary>Original key: pop</summary> | |
public int Pop { get; set; } | |
/// <summary>Original key: ship</summary> | |
public int Ship { get; set; } | |
/// <summary>Original key: species</summary> | |
public int Species { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateArmyValue instance.</summary> | |
public static GamestateArmyValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArmyValue(); | |
if (saveObject.TryGetInt(@"experience", out int? experience)) | |
{ | |
model.Experience = experience!.Value; | |
} | |
if (saveObject.TryGetInt(@"health", out int? health)) | |
{ | |
model.Health = health!.Value; | |
} | |
if (saveObject.TryGetInt(@"home_planet", out int? homePlanet)) | |
{ | |
model.HomePlanet = homePlanet!.Value; | |
} | |
if (saveObject.TryGetBool(@"is_defense_army_mod_spawned", out bool? isDefenseArmyModSpawned)) | |
{ | |
model.IsDefenseArmyModSpawned = isDefenseArmyModSpawned!.Value; | |
} | |
if (saveObject.TryGetString(@"jump_drive_cooldown", out string? jumpDriveCooldown)) | |
{ | |
model.JumpDriveCooldown = jumpDriveCooldown; | |
} | |
if (saveObject.TryGetInt(@"leader", out int? leader)) | |
{ | |
model.Leader = leader!.Value; | |
} | |
if (saveObject.TryGetInt(@"max_health", out int? maxHealth)) | |
{ | |
model.MaxHealth = maxHealth!.Value; | |
} | |
if (saveObject.TryGetInt(@"morale", out int? morale)) | |
{ | |
model.Morale = morale!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"name", out var nameObj) && nameObj != null) | |
{ | |
model.Name = GamestateArmyValueName.Load(nameObj); | |
} | |
if (saveObject.TryGetInt(@"owner", out int? owner)) | |
{ | |
model.Owner = owner!.Value; | |
} | |
if (saveObject.TryGetInt(@"planet", out int? planet)) | |
{ | |
model.Planet = planet!.Value; | |
} | |
if (saveObject.TryGetInt(@"pop", out int? pop)) | |
{ | |
model.Pop = pop!.Value; | |
} | |
if (saveObject.TryGetInt(@"ship", out int? ship)) | |
{ | |
model.Ship = ship!.Value; | |
} | |
if (saveObject.TryGetInt(@"species", out int? species)) | |
{ | |
model.Species = species!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateArmyValueName | |
{ | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Original key: variables</summary> | |
public List<GamestateArmyValueNameVariablesItem>? Variables { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateArmyValueName instance.</summary> | |
public static GamestateArmyValueName Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArmyValueName(); | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
if (saveObject.TryGet<SaveArray>(@"variables", out var variablesArr) && variablesArr != null) | |
{ | |
model.Variables = variablesArr.Items.OfType<SaveObject>().Select(GamestateArmyValueNameVariablesItem.Load).ToList(); | |
} | |
return model; | |
} | |
public class GamestateArmyValueNameVariablesItem | |
{ | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Original key: value</summary> | |
public GamestateArmyValueNameVariablesItemValue? Value { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateArmyValueNameVariablesItem instance.</summary> | |
public static GamestateArmyValueNameVariablesItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArmyValueNameVariablesItem(); | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
if (saveObject.TryGet<SaveObject>(@"value", out var valueObj) && valueObj != null) | |
{ | |
model.Value = GamestateArmyValueNameVariablesItemValue.Load(valueObj); | |
} | |
return model; | |
} | |
public class GamestateArmyValueNameVariablesItemValue | |
{ | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateArmyValueNameVariablesItemValue instance.</summary> | |
public static GamestateArmyValueNameVariablesItemValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateArmyValueNameVariablesItemValue(); | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
public class GamestateAstralRifts | |
{ | |
/// <summary>Original key: astral_rift_event_pool</summary> | |
public Dictionary<int, object?>? AstralRiftEventPool { get; set; } = new(); | |
/// <summary>Original key: rifts</summary> | |
public Dictionary<int, GamestateAstralRiftsRiftsValue>? Rifts { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateAstralRifts instance.</summary> | |
public static GamestateAstralRifts Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAstralRifts(); | |
if (saveObject.TryGet<SaveObject>(@"astral_rift_event_pool", out var astralRiftEventPoolDictObj) && astralRiftEventPoolDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in astralRiftEventPoolDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.AstralRiftEventPool = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"rifts", out var riftsDictObj) && riftsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateAstralRiftsRiftsValue>(); | |
foreach (var kvp in riftsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateAstralRiftsRiftsValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Rifts = dictBuilder; | |
} | |
return model; | |
} | |
public class GamestateAstralRiftsRiftsValue | |
{ | |
/// <summary>Original key: astral_rift_orbitals</summary> | |
public Dictionary<int, object?>? AstralRiftOrbitals { get; set; } = new(); | |
/// <summary>Original key: clues</summary> | |
public int Clues { get; set; } | |
/// <summary>Original key: coordinate</summary> | |
public GamestateAstralRiftsRiftsValueCoordinate? Coordinate { get; set; } | |
/// <summary>Original key: cumulated_fail_probability</summary> | |
public int CumulatedFailProbability { get; set; } | |
/// <summary>Original key: days_left</summary> | |
public int DaysLeft { get; set; } | |
/// <summary>Original key: difficulty</summary> | |
public int Difficulty { get; set; } | |
/// <summary>Original key: event</summary> | |
public GamestateAstralRiftsRiftsValueEvent? Event { get; set; } | |
/// <summary>Original key: event_choice</summary> | |
public string? EventChoice { get; set; } | |
/// <summary>Original key: explorer</summary> | |
public long Explorer { get; set; } | |
/// <summary>Original key: explorer_fleet</summary> | |
public long ExplorerFleet { get; set; } | |
/// <summary>Original key: fail_probability</summary> | |
public int FailProbability { get; set; } | |
/// <summary>Original key: flags</summary> | |
public GamestateAstralRiftsRiftsValueFlags? Flags { get; set; } | |
/// <summary>Original key: interactable_by</summary> | |
public List<int>? InteractableBy { get; set; } = new(); | |
/// <summary>Original key: last_roll</summary> | |
public int LastRoll { get; set; } | |
/// <summary>Original key: leader</summary> | |
public long Leader { get; set; } | |
/// <summary>Original key: name</summary> | |
public GamestateAstralRiftsRiftsValueName? Name { get; set; } | |
/// <summary>Original key: on_roll_failed</summary> | |
public string? OnRollFailed { get; set; } | |
/// <summary>Original key: owner</summary> | |
public int Owner { get; set; } | |
/// <summary>Original key: shipclass_orbital_station</summary> | |
public int ShipclassOrbitalStation { get; set; } | |
/// <summary>Original key: status</summary> | |
public string? Status { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAstralRiftsRiftsValue instance.</summary> | |
public static GamestateAstralRiftsRiftsValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAstralRiftsRiftsValue(); | |
if (saveObject.TryGet<SaveObject>(@"astral_rift_orbitals", out var astralRiftOrbitalsDictObj) && astralRiftOrbitalsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in astralRiftOrbitalsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.AstralRiftOrbitals = dictBuilder; | |
} | |
if (saveObject.TryGetInt(@"clues", out int? clues)) | |
{ | |
model.Clues = clues!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"coordinate", out var coordinateObj) && coordinateObj != null) | |
{ | |
model.Coordinate = GamestateAstralRiftsRiftsValueCoordinate.Load(coordinateObj); | |
} | |
if (saveObject.TryGetInt(@"cumulated_fail_probability", out int? cumulatedFailProbability)) | |
{ | |
model.CumulatedFailProbability = cumulatedFailProbability!.Value; | |
} | |
if (saveObject.TryGetInt(@"days_left", out int? daysLeft)) | |
{ | |
model.DaysLeft = daysLeft!.Value; | |
} | |
if (saveObject.TryGetInt(@"difficulty", out int? difficulty)) | |
{ | |
model.Difficulty = difficulty!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"event", out var @eventObj) && @eventObj != null) | |
{ | |
model.Event = GamestateAstralRiftsRiftsValueEvent.Load(@eventObj); | |
} | |
if (saveObject.TryGetString(@"event_choice", out string? eventChoice)) | |
{ | |
model.EventChoice = eventChoice; | |
} | |
if (saveObject.TryGetLong(@"explorer", out long? explorer)) | |
{ | |
model.Explorer = explorer!.Value; | |
} | |
if (saveObject.TryGetLong(@"explorer_fleet", out long? explorerFleet)) | |
{ | |
model.ExplorerFleet = explorerFleet!.Value; | |
} | |
if (saveObject.TryGetInt(@"fail_probability", out int? failProbability)) | |
{ | |
model.FailProbability = failProbability!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"flags", out var flagsObj) && flagsObj != null) | |
{ | |
model.Flags = GamestateAstralRiftsRiftsValueFlags.Load(flagsObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"interactable_by", out var interactableByArr) && interactableByArr != null) | |
{ | |
model.InteractableBy = interactableByArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetInt(@"last_roll", out int? lastRoll)) | |
{ | |
model.LastRoll = lastRoll!.Value; | |
} | |
if (saveObject.TryGetLong(@"leader", out long? leader)) | |
{ | |
model.Leader = leader!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"name", out var nameObj) && nameObj != null) | |
{ | |
model.Name = GamestateAstralRiftsRiftsValueName.Load(nameObj); | |
} | |
if (saveObject.TryGetString(@"on_roll_failed", out string? onRollFailed)) | |
{ | |
model.OnRollFailed = onRollFailed; | |
} | |
if (saveObject.TryGetInt(@"owner", out int? owner)) | |
{ | |
model.Owner = owner!.Value; | |
} | |
if (saveObject.TryGetInt(@"shipclass_orbital_station", out int? shipclassOrbitalStation)) | |
{ | |
model.ShipclassOrbitalStation = shipclassOrbitalStation!.Value; | |
} | |
if (saveObject.TryGetString(@"status", out string? status)) | |
{ | |
model.Status = status; | |
} | |
return model; | |
} | |
public class GamestateAstralRiftsRiftsValueCoordinate | |
{ | |
/// <summary>Original key: origin</summary> | |
public int Origin { get; set; } | |
/// <summary>Original key: randomized</summary> | |
public bool Randomized { get; set; } | |
/// <summary>Original key: visual_height</summary> | |
public float VisualHeight { get; set; } | |
/// <summary>Original key: x</summary> | |
public float X { get; set; } | |
/// <summary>Original key: y</summary> | |
public float Y { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAstralRiftsRiftsValueCoordinate instance.</summary> | |
public static GamestateAstralRiftsRiftsValueCoordinate Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAstralRiftsRiftsValueCoordinate(); | |
if (saveObject.TryGetInt(@"origin", out int? origin)) | |
{ | |
model.Origin = origin!.Value; | |
} | |
if (saveObject.TryGetBool(@"randomized", out bool? randomized)) | |
{ | |
model.Randomized = randomized!.Value; | |
} | |
if (saveObject.TryGetFloat(@"visual_height", out float? visualHeight)) | |
{ | |
model.VisualHeight = visualHeight!.Value; | |
} | |
if (saveObject.TryGetFloat(@"x", out float? x)) | |
{ | |
model.X = x!.Value; | |
} | |
if (saveObject.TryGetFloat(@"y", out float? y)) | |
{ | |
model.Y = y!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateAstralRiftsRiftsValueEvent | |
{ | |
/// <summary>Original key: effect</summary> | |
public string? Effect { get; set; } | |
/// <summary>Original key: index</summary> | |
public int Index { get; set; } | |
/// <summary>Original key: picture</summary> | |
public string? Picture { get; set; } | |
/// <summary>Original key: scope</summary> | |
public GamestateAstralRiftsRiftsValueEventScope? Scope { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAstralRiftsRiftsValueEvent instance.</summary> | |
public static GamestateAstralRiftsRiftsValueEvent Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAstralRiftsRiftsValueEvent(); | |
if (saveObject.TryGetString(@"effect", out string? effect)) | |
{ | |
model.Effect = effect; | |
} | |
if (saveObject.TryGetInt(@"index", out int? index)) | |
{ | |
model.Index = index!.Value; | |
} | |
if (saveObject.TryGetString(@"picture", out string? picture)) | |
{ | |
model.Picture = picture; | |
} | |
if (saveObject.TryGet<SaveObject>(@"scope", out var scopeObj) && scopeObj != null) | |
{ | |
model.Scope = GamestateAstralRiftsRiftsValueEventScope.Load(scopeObj); | |
} | |
return model; | |
} | |
public class GamestateAstralRiftsRiftsValueEventScope | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAstralRiftsRiftsValueEventScope instance.</summary> | |
public static GamestateAstralRiftsRiftsValueEventScope Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAstralRiftsRiftsValueEventScope(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateAstralRiftsRiftsValueFlags | |
{ | |
/// <summary>Original key: split_opened_rift</summary> | |
public int SplitOpenedRift { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAstralRiftsRiftsValueFlags instance.</summary> | |
public static GamestateAstralRiftsRiftsValueFlags Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAstralRiftsRiftsValueFlags(); | |
if (saveObject.TryGetInt(@"split_opened_rift", out int? splitOpenedRift)) | |
{ | |
model.SplitOpenedRift = splitOpenedRift!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateAstralRiftsRiftsValueName | |
{ | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateAstralRiftsRiftsValueName instance.</summary> | |
public static GamestateAstralRiftsRiftsValueName Load(SaveObject saveObject) | |
{ | |
var model = new GamestateAstralRiftsRiftsValueName(); | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
public class GamestateBuildingsValue | |
{ | |
/// <summary>Original key: position</summary> | |
public int Position { get; set; } | |
/// <summary>Original key: ruined</summary> | |
public bool Ruined { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateBuildingsValue instance.</summary> | |
public static GamestateBuildingsValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateBuildingsValue(); | |
if (saveObject.TryGetInt(@"position", out int? position)) | |
{ | |
model.Position = position!.Value; | |
} | |
if (saveObject.TryGetBool(@"ruined", out bool? ruined)) | |
{ | |
model.Ruined = ruined!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
public class GamestateBypassesValue | |
{ | |
/// <summary>Original key: active</summary> | |
public bool Active { get; set; } | |
/// <summary>Original key: active_connections</summary> | |
public List<int>? ActiveConnections { get; set; } = new(); | |
/// <summary>Original key: connections</summary> | |
public List<int>? Connections { get; set; } = new(); | |
/// <summary>Original key: is_manual_lock</summary> | |
public bool IsManualLock { get; set; } | |
/// <summary>Original key: linked_to</summary> | |
public int LinkedTo { get; set; } | |
/// <summary>Original key: lock_country</summary> | |
public long LockCountry { get; set; } | |
/// <summary>Original key: lock_remaining_days</summary> | |
public int LockRemainingDays { get; set; } | |
/// <summary>Original key: owner</summary> | |
public GamestateBypassesValueOwner? Owner { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateBypassesValue instance.</summary> | |
public static GamestateBypassesValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateBypassesValue(); | |
if (saveObject.TryGetBool(@"active", out bool? active)) | |
{ | |
model.Active = active!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"active_connections", out var activeConnectionsArr) && activeConnectionsArr != null) | |
{ | |
model.ActiveConnections = activeConnectionsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"connections", out var connectionsArr) && connectionsArr != null) | |
{ | |
model.Connections = connectionsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"is_manual_lock", out bool? isManualLock)) | |
{ | |
model.IsManualLock = isManualLock!.Value; | |
} | |
if (saveObject.TryGetInt(@"linked_to", out int? linkedTo)) | |
{ | |
model.LinkedTo = linkedTo!.Value; | |
} | |
if (saveObject.TryGetLong(@"lock_country", out long? lockCountry)) | |
{ | |
model.LockCountry = lockCountry!.Value; | |
} | |
if (saveObject.TryGetInt(@"lock_remaining_days", out int? lockRemainingDays)) | |
{ | |
model.LockRemainingDays = lockRemainingDays!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"owner", out var ownerObj) && ownerObj != null) | |
{ | |
model.Owner = GamestateBypassesValueOwner.Load(ownerObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateBypassesValueOwner | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: type</summary> | |
public int Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateBypassesValueOwner instance.</summary> | |
public static GamestateBypassesValueOwner Load(SaveObject saveObject) | |
{ | |
var model = new GamestateBypassesValueOwner(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetInt(@"type", out int? @type)) | |
{ | |
model.Type = @type!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateClustersItem | |
{ | |
/// <summary>Original key: id</summary> | |
public string? Id { get; set; } | |
/// <summary>Original key: objects</summary> | |
public List<int>? Objects { get; set; } = new(); | |
/// <summary>Original key: position</summary> | |
public GamestateClustersItemPosition? Position { get; set; } | |
/// <summary>Original key: radius</summary> | |
public int Radius { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateClustersItem instance.</summary> | |
public static GamestateClustersItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateClustersItem(); | |
if (saveObject.TryGetString(@"id", out string? id)) | |
{ | |
model.Id = id; | |
} | |
if (saveObject.TryGet<SaveArray>(@"objects", out var objectsArr) && objectsArr != null) | |
{ | |
model.Objects = objectsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"position", out var positionObj) && positionObj != null) | |
{ | |
model.Position = GamestateClustersItemPosition.Load(positionObj); | |
} | |
if (saveObject.TryGetInt(@"radius", out int? radius)) | |
{ | |
model.Radius = radius!.Value; | |
} | |
return model; | |
} | |
public class GamestateClustersItemPosition | |
{ | |
/// <summary>Original key: origin</summary> | |
public long Origin { get; set; } | |
/// <summary>Original key: randomized</summary> | |
public bool Randomized { get; set; } | |
/// <summary>Original key: visual_height</summary> | |
public float VisualHeight { get; set; } | |
/// <summary>Original key: x</summary> | |
public float X { get; set; } | |
/// <summary>Original key: y</summary> | |
public int Y { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateClustersItemPosition instance.</summary> | |
public static GamestateClustersItemPosition Load(SaveObject saveObject) | |
{ | |
var model = new GamestateClustersItemPosition(); | |
if (saveObject.TryGetLong(@"origin", out long? origin)) | |
{ | |
model.Origin = origin!.Value; | |
} | |
if (saveObject.TryGetBool(@"randomized", out bool? randomized)) | |
{ | |
model.Randomized = randomized!.Value; | |
} | |
if (saveObject.TryGetFloat(@"visual_height", out float? visualHeight)) | |
{ | |
model.VisualHeight = visualHeight!.Value; | |
} | |
if (saveObject.TryGetFloat(@"x", out float? x)) | |
{ | |
model.X = x!.Value; | |
} | |
if (saveObject.TryGetInt(@"y", out int? y)) | |
{ | |
model.Y = y!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateConstruction | |
{ | |
/// <summary>Original key: item_mgr</summary> | |
public GamestateConstructionItemMgr? ItemMgr { get; set; } | |
/// <summary>Original key: queue_mgr</summary> | |
public GamestateConstructionQueueMgr? QueueMgr { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstruction instance.</summary> | |
public static GamestateConstruction Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstruction(); | |
if (saveObject.TryGet<SaveObject>(@"item_mgr", out var itemMgrObj) && itemMgrObj != null) | |
{ | |
model.ItemMgr = GamestateConstructionItemMgr.Load(itemMgrObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"queue_mgr", out var queueMgrObj) && queueMgrObj != null) | |
{ | |
model.QueueMgr = GamestateConstructionQueueMgr.Load(queueMgrObj); | |
} | |
return model; | |
} | |
public class GamestateConstructionItemMgr | |
{ | |
/// <summary>Original key: items</summary> | |
public Dictionary<int, GamestateConstructionItemMgrItemsValue?>? Items { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgr instance.</summary> | |
public static GamestateConstructionItemMgr Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgr(); | |
if (saveObject.TryGet<SaveObject>(@"items", out var itemsDictObj) && itemsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateConstructionItemMgrItemsValue?>(); | |
foreach (var kvp in itemsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateConstructionItemMgrItemsValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.Items = dictBuilder; | |
} | |
return model; | |
} | |
public class GamestateConstructionItemMgrItemsValue | |
{ | |
/// <summary>Original key: buildable_army</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableArmy? BuildableArmy { get; set; } | |
/// <summary>Original key: buildable_clear_deposit_blocker</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableClearDepositBlocker? BuildableClearDepositBlocker { get; set; } | |
/// <summary>Original key: buildable_colony_ship</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableColonyShip? BuildableColonyShip { get; set; } | |
/// <summary>Original key: buildable_district</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableDistrict? BuildableDistrict { get; set; } | |
/// <summary>Original key: buildable_planet_building</summary> | |
public GamestateConstructionItemMgrItemsValueBuildablePlanetBuilding? BuildablePlanetBuilding { get; set; } | |
/// <summary>Original key: buildable_planet_upgrade_building</summary> | |
public GamestateConstructionItemMgrItemsValueBuildablePlanetUpgradeBuilding? BuildablePlanetUpgradeBuilding { get; set; } | |
/// <summary>Original key: buildable_replace_district</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableReplaceDistrict? BuildableReplaceDistrict { get; set; } | |
/// <summary>Original key: buildable_ship</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableShip? BuildableShip { get; set; } | |
/// <summary>Original key: buildable_starbase_building</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableStarbaseBuilding? BuildableStarbaseBuilding { get; set; } | |
/// <summary>Original key: buildable_starbase_module</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableStarbaseModule? BuildableStarbaseModule { get; set; } | |
/// <summary>Original key: buildable_starbase_upgrade</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableStarbaseUpgrade? BuildableStarbaseUpgrade { get; set; } | |
/// <summary>Original key: paying_country</summary> | |
public int PayingCountry { get; set; } | |
/// <summary>Original key: progress</summary> | |
public int Progress { get; set; } | |
/// <summary>Original key: progress_needed</summary> | |
public int ProgressNeeded { get; set; } | |
/// <summary>Original key: queue</summary> | |
public int Queue { get; set; } | |
/// <summary>Original key: resources</summary> | |
public GamestateConstructionItemMgrItemsValueResources? Resources { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValue instance.</summary> | |
public static GamestateConstructionItemMgrItemsValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValue(); | |
if (saveObject.TryGet<SaveObject>(@"buildable_army", out var buildableArmyObj) && buildableArmyObj != null) | |
{ | |
model.BuildableArmy = GamestateConstructionItemMgrItemsValueBuildableArmy.Load(buildableArmyObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildable_clear_deposit_blocker", out var buildableClearDepositBlockerObj) && buildableClearDepositBlockerObj != null) | |
{ | |
model.BuildableClearDepositBlocker = GamestateConstructionItemMgrItemsValueBuildableClearDepositBlocker.Load(buildableClearDepositBlockerObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildable_colony_ship", out var buildableColonyShipObj) && buildableColonyShipObj != null) | |
{ | |
model.BuildableColonyShip = GamestateConstructionItemMgrItemsValueBuildableColonyShip.Load(buildableColonyShipObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildable_district", out var buildableDistrictObj) && buildableDistrictObj != null) | |
{ | |
model.BuildableDistrict = GamestateConstructionItemMgrItemsValueBuildableDistrict.Load(buildableDistrictObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildable_planet_building", out var buildablePlanetBuildingObj) && buildablePlanetBuildingObj != null) | |
{ | |
model.BuildablePlanetBuilding = GamestateConstructionItemMgrItemsValueBuildablePlanetBuilding.Load(buildablePlanetBuildingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildable_planet_upgrade_building", out var buildablePlanetUpgradeBuildingObj) && buildablePlanetUpgradeBuildingObj != null) | |
{ | |
model.BuildablePlanetUpgradeBuilding = GamestateConstructionItemMgrItemsValueBuildablePlanetUpgradeBuilding.Load(buildablePlanetUpgradeBuildingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildable_replace_district", out var buildableReplaceDistrictObj) && buildableReplaceDistrictObj != null) | |
{ | |
model.BuildableReplaceDistrict = GamestateConstructionItemMgrItemsValueBuildableReplaceDistrict.Load(buildableReplaceDistrictObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildable_ship", out var buildableShipObj) && buildableShipObj != null) | |
{ | |
model.BuildableShip = GamestateConstructionItemMgrItemsValueBuildableShip.Load(buildableShipObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildable_starbase_building", out var buildableStarbaseBuildingObj) && buildableStarbaseBuildingObj != null) | |
{ | |
model.BuildableStarbaseBuilding = GamestateConstructionItemMgrItemsValueBuildableStarbaseBuilding.Load(buildableStarbaseBuildingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildable_starbase_module", out var buildableStarbaseModuleObj) && buildableStarbaseModuleObj != null) | |
{ | |
model.BuildableStarbaseModule = GamestateConstructionItemMgrItemsValueBuildableStarbaseModule.Load(buildableStarbaseModuleObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"buildable_starbase_upgrade", out var buildableStarbaseUpgradeObj) && buildableStarbaseUpgradeObj != null) | |
{ | |
model.BuildableStarbaseUpgrade = GamestateConstructionItemMgrItemsValueBuildableStarbaseUpgrade.Load(buildableStarbaseUpgradeObj); | |
} | |
if (saveObject.TryGetInt(@"paying_country", out int? payingCountry)) | |
{ | |
model.PayingCountry = payingCountry!.Value; | |
} | |
if (saveObject.TryGetInt(@"progress", out int? progress)) | |
{ | |
model.Progress = progress!.Value; | |
} | |
if (saveObject.TryGetInt(@"progress_needed", out int? progressNeeded)) | |
{ | |
model.ProgressNeeded = progressNeeded!.Value; | |
} | |
if (saveObject.TryGetInt(@"queue", out int? queue)) | |
{ | |
model.Queue = queue!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"resources", out var resourcesObj) && resourcesObj != null) | |
{ | |
model.Resources = GamestateConstructionItemMgrItemsValueResources.Load(resourcesObj); | |
} | |
return model; | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableArmy | |
{ | |
/// <summary>Original key: army_type</summary> | |
public string? ArmyType { get; set; } | |
/// <summary>Original key: planet</summary> | |
public int Planet { get; set; } | |
/// <summary>Original key: species</summary> | |
public int Species { get; set; } | |
/// <summary>Original key: starbase</summary> | |
public long Starbase { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableArmy instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableArmy Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableArmy(); | |
if (saveObject.TryGetString(@"army_type", out string? armyType)) | |
{ | |
model.ArmyType = armyType; | |
} | |
if (saveObject.TryGetInt(@"planet", out int? planet)) | |
{ | |
model.Planet = planet!.Value; | |
} | |
if (saveObject.TryGetInt(@"species", out int? species)) | |
{ | |
model.Species = species!.Value; | |
} | |
if (saveObject.TryGetLong(@"starbase", out long? starbase)) | |
{ | |
model.Starbase = starbase!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableClearDepositBlocker | |
{ | |
/// <summary>Original key: deposit</summary> | |
public int Deposit { get; set; } | |
/// <summary>Original key: planet</summary> | |
public int Planet { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableClearDepositBlocker instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableClearDepositBlocker Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableClearDepositBlocker(); | |
if (saveObject.TryGetInt(@"deposit", out int? deposit)) | |
{ | |
model.Deposit = deposit!.Value; | |
} | |
if (saveObject.TryGetInt(@"planet", out int? planet)) | |
{ | |
model.Planet = planet!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableColonyShip | |
{ | |
/// <summary>Original key: orbitable</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableColonyShipOrbitable? Orbitable { get; set; } | |
/// <summary>Original key: ship_design</summary> | |
public int ShipDesign { get; set; } | |
/// <summary>Original key: species</summary> | |
public int Species { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableColonyShip instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableColonyShip Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableColonyShip(); | |
if (saveObject.TryGet<SaveObject>(@"orbitable", out var orbitableObj) && orbitableObj != null) | |
{ | |
model.Orbitable = GamestateConstructionItemMgrItemsValueBuildableColonyShipOrbitable.Load(orbitableObj); | |
} | |
if (saveObject.TryGetInt(@"ship_design", out int? shipDesign)) | |
{ | |
model.ShipDesign = shipDesign!.Value; | |
} | |
if (saveObject.TryGetInt(@"species", out int? species)) | |
{ | |
model.Species = species!.Value; | |
} | |
return model; | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableColonyShipOrbitable | |
{ | |
/// <summary>Original key: starbase</summary> | |
public int Starbase { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableColonyShipOrbitable instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableColonyShipOrbitable Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableColonyShipOrbitable(); | |
if (saveObject.TryGetInt(@"starbase", out int? starbase)) | |
{ | |
model.Starbase = starbase!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableDistrict | |
{ | |
/// <summary>Original key: district</summary> | |
public string? District { get; set; } | |
/// <summary>Original key: planet</summary> | |
public int Planet { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableDistrict instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableDistrict Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableDistrict(); | |
if (saveObject.TryGetString(@"district", out string? district)) | |
{ | |
model.District = district; | |
} | |
if (saveObject.TryGetInt(@"planet", out int? planet)) | |
{ | |
model.Planet = planet!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildablePlanetBuilding | |
{ | |
/// <summary>Original key: building</summary> | |
public string? Building { get; set; } | |
/// <summary>Original key: planet</summary> | |
public int Planet { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildablePlanetBuilding instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildablePlanetBuilding Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildablePlanetBuilding(); | |
if (saveObject.TryGetString(@"building", out string? building)) | |
{ | |
model.Building = building; | |
} | |
if (saveObject.TryGetInt(@"planet", out int? planet)) | |
{ | |
model.Planet = planet!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildablePlanetUpgradeBuilding | |
{ | |
/// <summary>Original key: building</summary> | |
public string? Building { get; set; } | |
/// <summary>Original key: planet</summary> | |
public int Planet { get; set; } | |
/// <summary>Original key: upgrade_building</summary> | |
public int UpgradeBuilding { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildablePlanetUpgradeBuilding instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildablePlanetUpgradeBuilding Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildablePlanetUpgradeBuilding(); | |
if (saveObject.TryGetString(@"building", out string? building)) | |
{ | |
model.Building = building; | |
} | |
if (saveObject.TryGetInt(@"planet", out int? planet)) | |
{ | |
model.Planet = planet!.Value; | |
} | |
if (saveObject.TryGetInt(@"upgrade_building", out int? upgradeBuilding)) | |
{ | |
model.UpgradeBuilding = upgradeBuilding!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableReplaceDistrict | |
{ | |
/// <summary>Original key: district</summary> | |
public string? District { get; set; } | |
/// <summary>Original key: planet</summary> | |
public int Planet { get; set; } | |
/// <summary>Original key: replace</summary> | |
public string? Replace { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableReplaceDistrict instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableReplaceDistrict Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableReplaceDistrict(); | |
if (saveObject.TryGetString(@"district", out string? district)) | |
{ | |
model.District = district; | |
} | |
if (saveObject.TryGetInt(@"planet", out int? planet)) | |
{ | |
model.Planet = planet!.Value; | |
} | |
if (saveObject.TryGetString(@"replace", out string? replace)) | |
{ | |
model.Replace = replace; | |
} | |
return model; | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableShip | |
{ | |
/// <summary>Original key: orbitable</summary> | |
public GamestateConstructionItemMgrItemsValueBuildableShipOrbitable? Orbitable { get; set; } | |
/// <summary>Original key: ship_design</summary> | |
public int ShipDesign { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableShip instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableShip Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableShip(); | |
if (saveObject.TryGet<SaveObject>(@"orbitable", out var orbitableObj) && orbitableObj != null) | |
{ | |
model.Orbitable = GamestateConstructionItemMgrItemsValueBuildableShipOrbitable.Load(orbitableObj); | |
} | |
if (saveObject.TryGetInt(@"ship_design", out int? shipDesign)) | |
{ | |
model.ShipDesign = shipDesign!.Value; | |
} | |
return model; | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableShipOrbitable | |
{ | |
/// <summary>Original key: starbase</summary> | |
public int Starbase { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableShipOrbitable instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableShipOrbitable Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableShipOrbitable(); | |
if (saveObject.TryGetInt(@"starbase", out int? starbase)) | |
{ | |
model.Starbase = starbase!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableStarbaseBuilding | |
{ | |
/// <summary>Original key: slot</summary> | |
public int Slot { get; set; } | |
/// <summary>Original key: starbase</summary> | |
public int Starbase { get; set; } | |
/// <summary>Original key: starbase_building</summary> | |
public string? StarbaseBuilding { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableStarbaseBuilding instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableStarbaseBuilding Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableStarbaseBuilding(); | |
if (saveObject.TryGetInt(@"slot", out int? slot)) | |
{ | |
model.Slot = slot!.Value; | |
} | |
if (saveObject.TryGetInt(@"starbase", out int? starbase)) | |
{ | |
model.Starbase = starbase!.Value; | |
} | |
if (saveObject.TryGetString(@"starbase_building", out string? starbaseBuilding)) | |
{ | |
model.StarbaseBuilding = starbaseBuilding; | |
} | |
return model; | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableStarbaseModule | |
{ | |
/// <summary>Original key: slot</summary> | |
public int Slot { get; set; } | |
/// <summary>Original key: starbase</summary> | |
public int Starbase { get; set; } | |
/// <summary>Original key: starbase_module</summary> | |
public string? StarbaseModule { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableStarbaseModule instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableStarbaseModule Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableStarbaseModule(); | |
if (saveObject.TryGetInt(@"slot", out int? slot)) | |
{ | |
model.Slot = slot!.Value; | |
} | |
if (saveObject.TryGetInt(@"starbase", out int? starbase)) | |
{ | |
model.Starbase = starbase!.Value; | |
} | |
if (saveObject.TryGetString(@"starbase_module", out string? starbaseModule)) | |
{ | |
model.StarbaseModule = starbaseModule; | |
} | |
return model; | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueBuildableStarbaseUpgrade | |
{ | |
/// <summary>Original key: starbase</summary> | |
public int Starbase { get; set; } | |
/// <summary>Original key: starbase_upgrade</summary> | |
public string? StarbaseUpgrade { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueBuildableStarbaseUpgrade instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueBuildableStarbaseUpgrade Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueBuildableStarbaseUpgrade(); | |
if (saveObject.TryGetInt(@"starbase", out int? starbase)) | |
{ | |
model.Starbase = starbase!.Value; | |
} | |
if (saveObject.TryGetString(@"starbase_upgrade", out string? starbaseUpgrade)) | |
{ | |
model.StarbaseUpgrade = starbaseUpgrade; | |
} | |
return model; | |
} | |
} | |
public class GamestateConstructionItemMgrItemsValueResources | |
{ | |
/// <summary>Original key: alloys</summary> | |
public int Alloys { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionItemMgrItemsValueResources instance.</summary> | |
public static GamestateConstructionItemMgrItemsValueResources Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionItemMgrItemsValueResources(); | |
if (saveObject.TryGetInt(@"alloys", out int? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
public class GamestateConstructionQueueMgr | |
{ | |
/// <summary>Original key: queues</summary> | |
public Dictionary<int, GamestateConstructionQueueMgrQueuesValue>? Queues { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionQueueMgr instance.</summary> | |
public static GamestateConstructionQueueMgr Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionQueueMgr(); | |
if (saveObject.TryGet<SaveObject>(@"queues", out var queuesDictObj) && queuesDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateConstructionQueueMgrQueuesValue>(); | |
foreach (var kvp in queuesDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateConstructionQueueMgrQueuesValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.Queues = dictBuilder; | |
} | |
return model; | |
} | |
public class GamestateConstructionQueueMgrQueuesValue | |
{ | |
/// <summary>Original key: disabled</summary> | |
public bool Disabled { get; set; } | |
/// <summary>Original key: items</summary> | |
public List<int>? Items { get; set; } = new(); | |
/// <summary>Original key: location</summary> | |
public GamestateConstructionQueueMgrQueuesValueLocation? Location { get; set; } | |
/// <summary>Original key: owner</summary> | |
public int Owner { get; set; } | |
/// <summary>Original key: simultaneous</summary> | |
public int Simultaneous { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionQueueMgrQueuesValue instance.</summary> | |
public static GamestateConstructionQueueMgrQueuesValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionQueueMgrQueuesValue(); | |
if (saveObject.TryGetBool(@"disabled", out bool? disabled)) | |
{ | |
model.Disabled = disabled!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"items", out var itemsArr) && itemsArr != null) | |
{ | |
model.Items = itemsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"location", out var locationObj) && locationObj != null) | |
{ | |
model.Location = GamestateConstructionQueueMgrQueuesValueLocation.Load(locationObj); | |
} | |
if (saveObject.TryGetInt(@"owner", out int? owner)) | |
{ | |
model.Owner = owner!.Value; | |
} | |
if (saveObject.TryGetInt(@"simultaneous", out int? simultaneous)) | |
{ | |
model.Simultaneous = simultaneous!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateConstructionQueueMgrQueuesValueLocation | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: type</summary> | |
public int Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateConstructionQueueMgrQueuesValueLocation instance.</summary> | |
public static GamestateConstructionQueueMgrQueuesValueLocation Load(SaveObject saveObject) | |
{ | |
var model = new GamestateConstructionQueueMgrQueuesValueLocation(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetInt(@"type", out int? @type)) | |
{ | |
model.Type = @type!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCouncilPositions | |
{ | |
/// <summary>Original key: council_positions</summary> | |
public Dictionary<int, GamestateCouncilPositionsCouncilPositionsValue>? CouncilPositions { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCouncilPositions instance.</summary> | |
public static GamestateCouncilPositions Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCouncilPositions(); | |
if (saveObject.TryGet<SaveObject>(@"council_positions", out var councilPositionsDictObj) && councilPositionsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, GamestateCouncilPositionsCouncilPositionsValue>(); | |
foreach (var kvp in councilPositionsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
dictBuilder[parsedKey] = GamestateCouncilPositionsCouncilPositionsValue.Load(valueObj); | |
} | |
else if (isNone) | |
{ | |
} | |
} | |
} | |
model.CouncilPositions = dictBuilder; | |
} | |
return model; | |
} | |
public class GamestateCouncilPositionsCouncilPositionsValue | |
{ | |
/// <summary>Original key: country</summary> | |
public int Country { get; set; } | |
/// <summary>Original key: leader</summary> | |
public int Leader { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCouncilPositionsCouncilPositionsValue instance.</summary> | |
public static GamestateCouncilPositionsCouncilPositionsValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCouncilPositionsCouncilPositionsValue(); | |
if (saveObject.TryGetInt(@"country", out int? country)) | |
{ | |
model.Country = country!.Value; | |
} | |
if (saveObject.TryGetInt(@"leader", out int? leader)) | |
{ | |
model.Leader = leader!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValue | |
{ | |
/// <summary>Original key: active_policies</summary> | |
public List<GamestateCountryValueActivePoliciesItem>? ActivePolicies { get; set; } = new(); | |
/// <summary>Original key: adjective</summary> | |
public GamestateCountryValueAdjective? Adjective { get; set; } | |
/// <summary>Original key: ai</summary> | |
public GamestateCountryValueAi? Ai { get; set; } | |
/// <summary>Original key: ascension_perks</summary> | |
public List<string>? AscensionPerks { get; set; } = new(); | |
/// <summary>Original key: astral_actions_usage_states_array</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArray? AstralActionsUsageStatesArray { get; set; } | |
/// <summary>Original key: autopick_leader_traits</summary> | |
public bool AutopickLeaderTraits { get; set; } | |
/// <summary>Original key: awareness</summary> | |
public int Awareness { get; set; } | |
/// <summary>Original key: budget</summary> | |
public GamestateCountryValueBudget? Budget { get; set; } | |
/// <summary>Original key: built_species_ref</summary> | |
public int BuiltSpeciesRef { get; set; } | |
/// <summary>Original key: capital</summary> | |
public int Capital { get; set; } | |
/// <summary>Original key: city_graphical_culture</summary> | |
public string? CityGraphicalCulture { get; set; } | |
/// <summary>Original key: color_index</summary> | |
public int ColorIndex { get; set; } | |
/// <summary>Original key: control_groups</summary> | |
public Dictionary<int, object?>? ControlGroups { get; set; } = new(); | |
/// <summary>Original key: controlled_planets</summary> | |
public List<int>? ControlledPlanets { get; set; } = new(); | |
/// <summary>Original key: cosmic_storm_types_seen</summary> | |
public List<string>? CosmicStormTypesSeen { get; set; } = new(); | |
/// <summary>Original key: customization</summary> | |
public string? Customization { get; set; } | |
/// <summary>Original key: custom_name</summary> | |
public bool CustomName { get; set; } | |
/// <summary>Original key: default_planet_automation_settings</summary> | |
public List<string>? DefaultPlanetAutomationSettings { get; set; } = new(); | |
/// <summary>Original key: detection_intel</summary> | |
public List<GamestateCountryValueDetectionIntelItem>? DetectionIntel { get; set; } = new(); | |
/// <summary>Original key: economy_power</summary> | |
public float EconomyPower { get; set; } | |
/// <summary>Original key: edicts</summary> | |
public List<GamestateCountryValueEdictsItem>? Edicts { get; set; } = new(); | |
/// <summary>Original key: emigration</summary> | |
public int Emigration { get; set; } | |
/// <summary>Original key: empire_size</summary> | |
public int EmpireSize { get; set; } | |
/// <summary>Original key: employable_pops</summary> | |
public int EmployablePops { get; set; } | |
/// <summary>Original key: enslaved_species_refs</summary> | |
public List<int>? EnslavedSpeciesRefs { get; set; } = new(); | |
/// <summary>Original key: espionage_manager</summary> | |
public GamestateCountryValueEspionageManager? EspionageManager { get; set; } | |
/// <summary>Original key: ethos</summary> | |
public GamestateCountryValueEthos? Ethos { get; set; } | |
/// <summary>Original key: events</summary> | |
public GamestateCountryValueEvents? Events { get; set; } | |
/// <summary>Original key: faction</summary> | |
public GamestateCountryValueFaction? Faction { get; set; } | |
/// <summary>Original key: first_contact</summary> | |
public GamestateCountryValueFirstContact? FirstContact { get; set; } | |
/// <summary>Original key: flag</summary> | |
public GamestateCountryValueFlag? Flag { get; set; } | |
/// <summary>Original key: flags</summary> | |
public GamestateCountryValueFlags? Flags { get; set; } | |
/// <summary>Original key: fleet_size</summary> | |
public int FleetSize { get; set; } | |
/// <summary>Original key: fleets_manager</summary> | |
public GamestateCountryValueFleetsManager? FleetsManager { get; set; } | |
/// <summary>Original key: fleet_template_manager</summary> | |
public GamestateCountryValueFleetTemplateManager? FleetTemplateManager { get; set; } | |
/// <summary>Original key: fog_machine</summary> | |
public GamestateCountryValueFogMachine? FogMachine { get; set; } | |
/// <summary>Original key: founder_species_ref</summary> | |
public int FounderSpeciesRef { get; set; } | |
/// <summary>Original key: given_value</summary> | |
public float GivenValue { get; set; } | |
/// <summary>Original key: government</summary> | |
public GamestateCountryValueGovernment? Government { get; set; } | |
/// <summary>Original key: government_date</summary> | |
public DateTime GovernmentDate { get; set; } | |
/// <summary>Original key: graphical_culture</summary> | |
public string? GraphicalCulture { get; set; } | |
/// <summary>Original key: has_advisor</summary> | |
public bool HasAdvisor { get; set; } | |
/// <summary>Original key: highest_intel_level</summary> | |
public List<int>? HighestIntelLevel { get; set; } = new(); | |
/// <summary>Original key: holding_planets</summary> | |
public List<GamestateCountryValueHoldingPlanetsItem>? HoldingPlanets { get; set; } = new(); | |
/// <summary>Original key: homeworld_name</summary> | |
public GamestateCountryValueHomeworldName? HomeworldName { get; set; } | |
/// <summary>Original key: hyperlane_systems</summary> | |
public List<int>? HyperlaneSystems { get; set; } = new(); | |
/// <summary>Original key: immigration</summary> | |
public float Immigration { get; set; } | |
/// <summary>Original key: initialized</summary> | |
public bool Initialized { get; set; } | |
/// <summary>Original key: intel</summary> | |
public List<GamestateCountryValueIntelItem>? Intel { get; set; } = new(); | |
/// <summary>Original key: intel_level</summary> | |
public List<int>? IntelLevel { get; set; } = new(); | |
/// <summary>Original key: intel_manager</summary> | |
public GamestateCountryValueIntelManager? IntelManager { get; set; } | |
/// <summary>Original key: is_in_breach_of_any</summary> | |
public bool IsInBreachOfAny { get; set; } | |
/// <summary>Original key: last_changed_country_type</summary> | |
public DateTime LastChangedCountryType { get; set; } | |
/// <summary>Original key: last_date_at_war</summary> | |
public DateTime LastDateAtWar { get; set; } | |
/// <summary>Original key: last_date_war_lost</summary> | |
public string? LastDateWarLost { get; set; } | |
/// <summary>Original key: last_date_was_human</summary> | |
public DateTime LastDateWasHuman { get; set; } | |
/// <summary>Original key: location</summary> | |
public GamestateCountryValueLocation? Location { get; set; } | |
/// <summary>Original key: loyalty</summary> | |
public int Loyalty { get; set; } | |
/// <summary>Original key: military_power</summary> | |
public float MilitaryPower { get; set; } | |
/// <summary>Original key: modules</summary> | |
public GamestateCountryValueModules? Modules { get; set; } | |
/// <summary>Original key: name</summary> | |
public GamestateCountryValueName? Name { get; set; } | |
/// <summary>Original key: name_list</summary> | |
public string? NameList { get; set; } | |
/// <summary>Original key: neighbor_rivals</summary> | |
public int NeighborRivals { get; set; } | |
/// <summary>Original key: new_colonies</summary> | |
public int NewColonies { get; set; } | |
/// <summary>Original key: next_election</summary> | |
public DateTime NextElection { get; set; } | |
/// <summary>Original key: next_transport_fleet_number</summary> | |
public int NextTransportFleetNumber { get; set; } | |
/// <summary>Original key: num_cosmic_storms_encountered</summary> | |
public int NumCosmicStormsEncountered { get; set; } | |
/// <summary>Original key: num_unique_cosmic_storms_encountered</summary> | |
public List<int>? NumUniqueCosmicStormsEncountered { get; set; } = new(); | |
/// <summary>Original key: num_upgraded_starbase</summary> | |
public int NumUpgradedStarbase { get; set; } | |
/// <summary>Original key: old_awareness</summary> | |
public int OldAwareness { get; set; } | |
/// <summary>Original key: oligarchic_election</summary> | |
public GamestateCountryValueOligarchicElection? OligarchicElection { get; set; } | |
/// <summary>Original key: overlord</summary> | |
public int Overlord { get; set; } | |
/// <summary>Original key: owned_armies</summary> | |
public List<int>? OwnedArmies { get; set; } = new(); | |
/// <summary>Original key: owned_leaders</summary> | |
public List<int>? OwnedLeaders { get; set; } = new(); | |
/// <summary>Original key: owned_megastructures</summary> | |
public List<int>? OwnedMegastructures { get; set; } = new(); | |
/// <summary>Original key: owned_planets</summary> | |
public List<int>? OwnedPlanets { get; set; } = new(); | |
/// <summary>Original key: owned_species_refs</summary> | |
public List<int>? OwnedSpeciesRefs { get; set; } = new(); | |
/// <summary>Original key: personality</summary> | |
public string? Personality { get; set; } | |
/// <summary>Original key: policy_flags</summary> | |
public List<string>? PolicyFlags { get; set; } = new(); | |
/// <summary>Original key: preftl_age</summary> | |
public string? PreftlAge { get; set; } | |
/// <summary>Original key: regnal_numbers</summary> | |
public List<GamestateCountryValueRegnalNumbersItem>? RegnalNumbers { get; set; } = new(); | |
/// <summary>Original key: rejected_actions</summary> | |
public List<GamestateCountryValueRejectedActionsItem>? RejectedActions { get; set; } = new(); | |
/// <summary>Original key: relations_manager</summary> | |
public GamestateCountryValueRelationsManager? RelationsManager { get; set; } | |
/// <summary>Original key: restricted_systems</summary> | |
public List<int>? RestrictedSystems { get; set; } = new(); | |
/// <summary>Original key: room</summary> | |
public string? Room { get; set; } | |
/// <summary>Original key: ruler</summary> | |
public int Ruler { get; set; } | |
/// <summary>Original key: ruler_title</summary> | |
public GamestateCountryValueRulerTitle? RulerTitle { get; set; } | |
/// <summary>Original key: sapient</summary> | |
public int Sapient { get; set; } | |
/// <summary>Original key: sectors</summary> | |
public GamestateCountryValueSectors? Sectors { get; set; } | |
/// <summary>Original key: seen_bypass_types</summary> | |
public List<string>? SeenBypassTypes { get; set; } = new(); | |
/// <summary>Original key: sensor_range_fleets</summary> | |
public List<int>? SensorRangeFleets { get; set; } = new(); | |
/// <summary>Original key: ship_design_collection</summary> | |
public GamestateCountryValueShipDesignCollection? ShipDesignCollection { get; set; } | |
/// <summary>Original key: ship_names</summary> | |
public GamestateCountryValueShipNames? ShipNames { get; set; } | |
/// <summary>Original key: ship_prefix</summary> | |
public GamestateCountryValueShipPrefix? ShipPrefix { get; set; } | |
/// <summary>Original key: shown_message_types</summary> | |
public List<string>? ShownMessageTypes { get; set; } = new(); | |
/// <summary>Original key: space_critter</summary> | |
public List<int>? SpaceCritter { get; set; } = new(); | |
/// <summary>Original key: starbase_capacity</summary> | |
public int StarbaseCapacity { get; set; } | |
/// <summary>Original key: starting_system</summary> | |
public int StartingSystem { get; set; } | |
/// <summary>Original key: subject_date</summary> | |
public DateTime SubjectDate { get; set; } | |
/// <summary>Original key: subjects</summary> | |
public List<int>? Subjects { get; set; } = new(); | |
/// <summary>Original key: surveyed_deposit_holders</summary> | |
public List<GamestateCountryValueSurveyedDepositHoldersItem>? SurveyedDepositHolders { get; set; } = new(); | |
/// <summary>Original key: tech_power</summary> | |
public float TechPower { get; set; } | |
/// <summary>Original key: tech_status</summary> | |
public GamestateCountryValueTechStatus? TechStatus { get; set; } | |
/// <summary>Original key: terra_incognita</summary> | |
public GamestateCountryValueTerraIncognita? TerraIncognita { get; set; } | |
/// <summary>Original key: timed_modifier</summary> | |
public GamestateCountryValueTimedModifier? TimedModifier { get; set; } | |
/// <summary>Original key: track_all_situations</summary> | |
public bool TrackAllSituations { get; set; } | |
/// <summary>Original key: tradition_categories</summary> | |
public List<string>? TraditionCategories { get; set; } = new(); | |
/// <summary>Original key: traditions</summary> | |
public List<string>? Traditions { get; set; } = new(); | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Original key: usable_bypasses</summary> | |
public List<int>? UsableBypasses { get; set; } = new(); | |
/// <summary>Original key: used_naval_capacity</summary> | |
public int UsedNavalCapacity { get; set; } | |
/// <summary>Original key: variables</summary> | |
public GamestateCountryValueVariables? Variables { get; set; } | |
/// <summary>Original key: victory_rank</summary> | |
public int VictoryRank { get; set; } | |
/// <summary>Original key: victory_score</summary> | |
public float VictoryScore { get; set; } | |
/// <summary>Original key: visited_objects</summary> | |
public List<int>? VisitedObjects { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValue instance.</summary> | |
public static GamestateCountryValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValue(); | |
if (saveObject.TryGet<SaveArray>(@"active_policies", out var activePoliciesArr) && activePoliciesArr != null) | |
{ | |
model.ActivePolicies = activePoliciesArr.Items.OfType<SaveObject>().Select(GamestateCountryValueActivePoliciesItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"adjective", out var adjectiveObj) && adjectiveObj != null) | |
{ | |
model.Adjective = GamestateCountryValueAdjective.Load(adjectiveObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ai", out var aiObj) && aiObj != null) | |
{ | |
model.Ai = GamestateCountryValueAi.Load(aiObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"ascension_perks", out var ascensionPerksArr) && ascensionPerksArr != null) | |
{ | |
model.AscensionPerks = ascensionPerksArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"astral_actions_usage_states_array", out var astralActionsUsageStatesArrayObj) && astralActionsUsageStatesArrayObj != null) | |
{ | |
model.AstralActionsUsageStatesArray = GamestateCountryValueAstralActionsUsageStatesArray.Load(astralActionsUsageStatesArrayObj); | |
} | |
if (saveObject.TryGetBool(@"autopick_leader_traits", out bool? autopickLeaderTraits)) | |
{ | |
model.AutopickLeaderTraits = autopickLeaderTraits!.Value; | |
} | |
if (saveObject.TryGetInt(@"awareness", out int? awareness)) | |
{ | |
model.Awareness = awareness!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"budget", out var budgetObj) && budgetObj != null) | |
{ | |
model.Budget = GamestateCountryValueBudget.Load(budgetObj); | |
} | |
if (saveObject.TryGetInt(@"built_species_ref", out int? builtSpeciesRef)) | |
{ | |
model.BuiltSpeciesRef = builtSpeciesRef!.Value; | |
} | |
if (saveObject.TryGetInt(@"capital", out int? capital)) | |
{ | |
model.Capital = capital!.Value; | |
} | |
if (saveObject.TryGetString(@"city_graphical_culture", out string? cityGraphicalCulture)) | |
{ | |
model.CityGraphicalCulture = cityGraphicalCulture; | |
} | |
if (saveObject.TryGetInt(@"color_index", out int? colorIndex)) | |
{ | |
model.ColorIndex = colorIndex!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"control_groups", out var controlGroupsDictObj) && controlGroupsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in controlGroupsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.ControlGroups = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveArray>(@"controlled_planets", out var controlledPlanetsArr) && controlledPlanetsArr != null) | |
{ | |
model.ControlledPlanets = controlledPlanetsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"cosmic_storm_types_seen", out var cosmicStormTypesSeenArr) && cosmicStormTypesSeenArr != null) | |
{ | |
model.CosmicStormTypesSeen = cosmicStormTypesSeenArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetString(@"customization", out string? customization)) | |
{ | |
model.Customization = customization; | |
} | |
if (saveObject.TryGetBool(@"custom_name", out bool? customName)) | |
{ | |
model.CustomName = customName!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"default_planet_automation_settings", out var defaultPlanetAutomationSettingsArr) && defaultPlanetAutomationSettingsArr != null) | |
{ | |
model.DefaultPlanetAutomationSettings = defaultPlanetAutomationSettingsArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"detection_intel", out var detectionIntelArr) && detectionIntelArr != null) | |
{ | |
model.DetectionIntel = detectionIntelArr.Items.OfType<SaveObject>().Select(GamestateCountryValueDetectionIntelItem.Load).ToList(); | |
} | |
if (saveObject.TryGetFloat(@"economy_power", out float? economyPower)) | |
{ | |
model.EconomyPower = economyPower!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"edicts", out var edictsArr) && edictsArr != null) | |
{ | |
model.Edicts = edictsArr.Items.OfType<SaveObject>().Select(GamestateCountryValueEdictsItem.Load).ToList(); | |
} | |
if (saveObject.TryGetInt(@"emigration", out int? emigration)) | |
{ | |
model.Emigration = emigration!.Value; | |
} | |
if (saveObject.TryGetInt(@"empire_size", out int? empireSize)) | |
{ | |
model.EmpireSize = empireSize!.Value; | |
} | |
if (saveObject.TryGetInt(@"employable_pops", out int? employablePops)) | |
{ | |
model.EmployablePops = employablePops!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"enslaved_species_refs", out var enslavedSpeciesRefsArr) && enslavedSpeciesRefsArr != null) | |
{ | |
model.EnslavedSpeciesRefs = enslavedSpeciesRefsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"espionage_manager", out var espionageManagerObj) && espionageManagerObj != null) | |
{ | |
model.EspionageManager = GamestateCountryValueEspionageManager.Load(espionageManagerObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ethos", out var ethosObj) && ethosObj != null) | |
{ | |
model.Ethos = GamestateCountryValueEthos.Load(ethosObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"events", out var eventsObj) && eventsObj != null) | |
{ | |
model.Events = GamestateCountryValueEvents.Load(eventsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"faction", out var factionObj) && factionObj != null) | |
{ | |
model.Faction = GamestateCountryValueFaction.Load(factionObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"first_contact", out var firstContactObj) && firstContactObj != null) | |
{ | |
model.FirstContact = GamestateCountryValueFirstContact.Load(firstContactObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"flag", out var flagObj) && flagObj != null) | |
{ | |
model.Flag = GamestateCountryValueFlag.Load(flagObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"flags", out var flagsObj) && flagsObj != null) | |
{ | |
model.Flags = GamestateCountryValueFlags.Load(flagsObj); | |
} | |
if (saveObject.TryGetInt(@"fleet_size", out int? fleetSize)) | |
{ | |
model.FleetSize = fleetSize!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"fleets_manager", out var fleetsManagerObj) && fleetsManagerObj != null) | |
{ | |
model.FleetsManager = GamestateCountryValueFleetsManager.Load(fleetsManagerObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"fleet_template_manager", out var fleetTemplateManagerObj) && fleetTemplateManagerObj != null) | |
{ | |
model.FleetTemplateManager = GamestateCountryValueFleetTemplateManager.Load(fleetTemplateManagerObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"fog_machine", out var fogMachineObj) && fogMachineObj != null) | |
{ | |
model.FogMachine = GamestateCountryValueFogMachine.Load(fogMachineObj); | |
} | |
if (saveObject.TryGetInt(@"founder_species_ref", out int? founderSpeciesRef)) | |
{ | |
model.FounderSpeciesRef = founderSpeciesRef!.Value; | |
} | |
if (saveObject.TryGetFloat(@"given_value", out float? givenValue)) | |
{ | |
model.GivenValue = givenValue!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"government", out var governmentObj) && governmentObj != null) | |
{ | |
model.Government = GamestateCountryValueGovernment.Load(governmentObj); | |
} | |
if (saveObject.TryGetDateTime(@"government_date", out DateTime? governmentDate)) | |
{ | |
model.GovernmentDate = governmentDate!.Value; | |
} | |
if (saveObject.TryGetString(@"graphical_culture", out string? graphicalCulture)) | |
{ | |
model.GraphicalCulture = graphicalCulture; | |
} | |
if (saveObject.TryGetBool(@"has_advisor", out bool? hasAdvisor)) | |
{ | |
model.HasAdvisor = hasAdvisor!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"highest_intel_level", out var highestIntelLevelArr) && highestIntelLevelArr != null) | |
{ | |
model.HighestIntelLevel = highestIntelLevelArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"holding_planets", out var holdingPlanetsArr) && holdingPlanetsArr != null) | |
{ | |
model.HoldingPlanets = holdingPlanetsArr.Items.OfType<SaveObject>().Select(GamestateCountryValueHoldingPlanetsItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"homeworld_name", out var homeworldNameObj) && homeworldNameObj != null) | |
{ | |
model.HomeworldName = GamestateCountryValueHomeworldName.Load(homeworldNameObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"hyperlane_systems", out var hyperlaneSystemsArr) && hyperlaneSystemsArr != null) | |
{ | |
model.HyperlaneSystems = hyperlaneSystemsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetFloat(@"immigration", out float? immigration)) | |
{ | |
model.Immigration = immigration!.Value; | |
} | |
if (saveObject.TryGetBool(@"initialized", out bool? initialized)) | |
{ | |
model.Initialized = initialized!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"intel", out var intelArr) && intelArr != null) | |
{ | |
model.Intel = intelArr.Items.OfType<SaveObject>().Select(GamestateCountryValueIntelItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"intel_level", out var intelLevelArr) && intelLevelArr != null) | |
{ | |
model.IntelLevel = intelLevelArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"intel_manager", out var intelManagerObj) && intelManagerObj != null) | |
{ | |
model.IntelManager = GamestateCountryValueIntelManager.Load(intelManagerObj); | |
} | |
if (saveObject.TryGetBool(@"is_in_breach_of_any", out bool? isInBreachOfAny)) | |
{ | |
model.IsInBreachOfAny = isInBreachOfAny!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"last_changed_country_type", out DateTime? lastChangedCountryType)) | |
{ | |
model.LastChangedCountryType = lastChangedCountryType!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"last_date_at_war", out DateTime? lastDateAtWar)) | |
{ | |
model.LastDateAtWar = lastDateAtWar!.Value; | |
} | |
if (saveObject.TryGetString(@"last_date_war_lost", out string? lastDateWarLost)) | |
{ | |
model.LastDateWarLost = lastDateWarLost; | |
} | |
if (saveObject.TryGetDateTime(@"last_date_was_human", out DateTime? lastDateWasHuman)) | |
{ | |
model.LastDateWasHuman = lastDateWasHuman!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"location", out var locationObj) && locationObj != null) | |
{ | |
model.Location = GamestateCountryValueLocation.Load(locationObj); | |
} | |
if (saveObject.TryGetInt(@"loyalty", out int? loyalty)) | |
{ | |
model.Loyalty = loyalty!.Value; | |
} | |
if (saveObject.TryGetFloat(@"military_power", out float? militaryPower)) | |
{ | |
model.MilitaryPower = militaryPower!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"modules", out var modulesObj) && modulesObj != null) | |
{ | |
model.Modules = GamestateCountryValueModules.Load(modulesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"name", out var nameObj) && nameObj != null) | |
{ | |
model.Name = GamestateCountryValueName.Load(nameObj); | |
} | |
if (saveObject.TryGetString(@"name_list", out string? nameList)) | |
{ | |
model.NameList = nameList; | |
} | |
if (saveObject.TryGetInt(@"neighbor_rivals", out int? neighborRivals)) | |
{ | |
model.NeighborRivals = neighborRivals!.Value; | |
} | |
if (saveObject.TryGetInt(@"new_colonies", out int? newColonies)) | |
{ | |
model.NewColonies = newColonies!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"next_election", out DateTime? nextElection)) | |
{ | |
model.NextElection = nextElection!.Value; | |
} | |
if (saveObject.TryGetInt(@"next_transport_fleet_number", out int? nextTransportFleetNumber)) | |
{ | |
model.NextTransportFleetNumber = nextTransportFleetNumber!.Value; | |
} | |
if (saveObject.TryGetInt(@"num_cosmic_storms_encountered", out int? numCosmicStormsEncountered)) | |
{ | |
model.NumCosmicStormsEncountered = numCosmicStormsEncountered!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"num_unique_cosmic_storms_encountered", out var numUniqueCosmicStormsEncounteredArr) && numUniqueCosmicStormsEncounteredArr != null) | |
{ | |
model.NumUniqueCosmicStormsEncountered = numUniqueCosmicStormsEncounteredArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetInt(@"num_upgraded_starbase", out int? numUpgradedStarbase)) | |
{ | |
model.NumUpgradedStarbase = numUpgradedStarbase!.Value; | |
} | |
if (saveObject.TryGetInt(@"old_awareness", out int? oldAwareness)) | |
{ | |
model.OldAwareness = oldAwareness!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"oligarchic_election", out var oligarchicElectionObj) && oligarchicElectionObj != null) | |
{ | |
model.OligarchicElection = GamestateCountryValueOligarchicElection.Load(oligarchicElectionObj); | |
} | |
if (saveObject.TryGetInt(@"overlord", out int? overlord)) | |
{ | |
model.Overlord = overlord!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"owned_armies", out var ownedArmiesArr) && ownedArmiesArr != null) | |
{ | |
model.OwnedArmies = ownedArmiesArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"owned_leaders", out var ownedLeadersArr) && ownedLeadersArr != null) | |
{ | |
model.OwnedLeaders = ownedLeadersArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"owned_megastructures", out var ownedMegastructuresArr) && ownedMegastructuresArr != null) | |
{ | |
model.OwnedMegastructures = ownedMegastructuresArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"owned_planets", out var ownedPlanetsArr) && ownedPlanetsArr != null) | |
{ | |
model.OwnedPlanets = ownedPlanetsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"owned_species_refs", out var ownedSpeciesRefsArr) && ownedSpeciesRefsArr != null) | |
{ | |
model.OwnedSpeciesRefs = ownedSpeciesRefsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetString(@"personality", out string? personality)) | |
{ | |
model.Personality = personality; | |
} | |
if (saveObject.TryGet<SaveArray>(@"policy_flags", out var policyFlagsArr) && policyFlagsArr != null) | |
{ | |
model.PolicyFlags = policyFlagsArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetString(@"preftl_age", out string? preftlAge)) | |
{ | |
model.PreftlAge = preftlAge; | |
} | |
if (saveObject.TryGet<SaveArray>(@"regnal_numbers", out var regnalNumbersArr) && regnalNumbersArr != null) | |
{ | |
model.RegnalNumbers = regnalNumbersArr.Items.OfType<SaveObject>().Select(GamestateCountryValueRegnalNumbersItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"rejected_actions", out var rejectedActionsArr) && rejectedActionsArr != null) | |
{ | |
model.RejectedActions = rejectedActionsArr.Items.OfType<SaveObject>().Select(GamestateCountryValueRejectedActionsItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"relations_manager", out var relationsManagerObj) && relationsManagerObj != null) | |
{ | |
model.RelationsManager = GamestateCountryValueRelationsManager.Load(relationsManagerObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"restricted_systems", out var restrictedSystemsArr) && restrictedSystemsArr != null) | |
{ | |
model.RestrictedSystems = restrictedSystemsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetString(@"room", out string? room)) | |
{ | |
model.Room = room; | |
} | |
if (saveObject.TryGetInt(@"ruler", out int? ruler)) | |
{ | |
model.Ruler = ruler!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"ruler_title", out var rulerTitleObj) && rulerTitleObj != null) | |
{ | |
model.RulerTitle = GamestateCountryValueRulerTitle.Load(rulerTitleObj); | |
} | |
if (saveObject.TryGetInt(@"sapient", out int? sapient)) | |
{ | |
model.Sapient = sapient!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"sectors", out var sectorsObj) && sectorsObj != null) | |
{ | |
model.Sectors = GamestateCountryValueSectors.Load(sectorsObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"seen_bypass_types", out var seenBypassTypesArr) && seenBypassTypesArr != null) | |
{ | |
model.SeenBypassTypes = seenBypassTypesArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"sensor_range_fleets", out var sensorRangeFleetsArr) && sensorRangeFleetsArr != null) | |
{ | |
model.SensorRangeFleets = sensorRangeFleetsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ship_design_collection", out var shipDesignCollectionObj) && shipDesignCollectionObj != null) | |
{ | |
model.ShipDesignCollection = GamestateCountryValueShipDesignCollection.Load(shipDesignCollectionObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ship_names", out var shipNamesObj) && shipNamesObj != null) | |
{ | |
model.ShipNames = GamestateCountryValueShipNames.Load(shipNamesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ship_prefix", out var shipPrefixObj) && shipPrefixObj != null) | |
{ | |
model.ShipPrefix = GamestateCountryValueShipPrefix.Load(shipPrefixObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"shown_message_types", out var shownMessageTypesArr) && shownMessageTypesArr != null) | |
{ | |
model.ShownMessageTypes = shownMessageTypesArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"space_critter", out var spaceCritterArr) && spaceCritterArr != null) | |
{ | |
model.SpaceCritter = spaceCritterArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetInt(@"starbase_capacity", out int? starbaseCapacity)) | |
{ | |
model.StarbaseCapacity = starbaseCapacity!.Value; | |
} | |
if (saveObject.TryGetInt(@"starting_system", out int? startingSystem)) | |
{ | |
model.StartingSystem = startingSystem!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"subject_date", out DateTime? subjectDate)) | |
{ | |
model.SubjectDate = subjectDate!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"subjects", out var subjectsArr) && subjectsArr != null) | |
{ | |
model.Subjects = subjectsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"surveyed_deposit_holders", out var surveyedDepositHoldersArr) && surveyedDepositHoldersArr != null) | |
{ | |
model.SurveyedDepositHolders = surveyedDepositHoldersArr.Items.OfType<SaveObject>().Select(GamestateCountryValueSurveyedDepositHoldersItem.Load).ToList(); | |
} | |
if (saveObject.TryGetFloat(@"tech_power", out float? techPower)) | |
{ | |
model.TechPower = techPower!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"tech_status", out var techStatusObj) && techStatusObj != null) | |
{ | |
model.TechStatus = GamestateCountryValueTechStatus.Load(techStatusObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"terra_incognita", out var terraIncognitaObj) && terraIncognitaObj != null) | |
{ | |
model.TerraIncognita = GamestateCountryValueTerraIncognita.Load(terraIncognitaObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"timed_modifier", out var timedModifierObj) && timedModifierObj != null) | |
{ | |
model.TimedModifier = GamestateCountryValueTimedModifier.Load(timedModifierObj); | |
} | |
if (saveObject.TryGetBool(@"track_all_situations", out bool? trackAllSituations)) | |
{ | |
model.TrackAllSituations = trackAllSituations!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"tradition_categories", out var traditionCategoriesArr) && traditionCategoriesArr != null) | |
{ | |
model.TraditionCategories = traditionCategoriesArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"traditions", out var traditionsArr) && traditionsArr != null) | |
{ | |
model.Traditions = traditionsArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
if (saveObject.TryGet<SaveArray>(@"usable_bypasses", out var usableBypassesArr) && usableBypassesArr != null) | |
{ | |
model.UsableBypasses = usableBypassesArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetInt(@"used_naval_capacity", out int? usedNavalCapacity)) | |
{ | |
model.UsedNavalCapacity = usedNavalCapacity!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"variables", out var variablesObj) && variablesObj != null) | |
{ | |
model.Variables = GamestateCountryValueVariables.Load(variablesObj); | |
} | |
if (saveObject.TryGetInt(@"victory_rank", out int? victoryRank)) | |
{ | |
model.VictoryRank = victoryRank!.Value; | |
} | |
if (saveObject.TryGetFloat(@"victory_score", out float? victoryScore)) | |
{ | |
model.VictoryScore = victoryScore!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"visited_objects", out var visitedObjectsArr) && visitedObjectsArr != null) | |
{ | |
model.VisitedObjects = visitedObjectsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
return model; | |
} | |
public class GamestateCountryValueActivePoliciesItem | |
{ | |
/// <summary>Original key: policy</summary> | |
public string? Policy { get; set; } | |
/// <summary>Original key: selected</summary> | |
public string? Selected { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueActivePoliciesItem instance.</summary> | |
public static GamestateCountryValueActivePoliciesItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueActivePoliciesItem(); | |
if (saveObject.TryGetString(@"policy", out string? policy)) | |
{ | |
model.Policy = policy; | |
} | |
if (saveObject.TryGetString(@"selected", out string? selected)) | |
{ | |
model.Selected = selected; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAdjective | |
{ | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAdjective instance.</summary> | |
public static GamestateCountryValueAdjective Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAdjective(); | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAi | |
{ | |
/// <summary>Original key: ai_resource_target_records</summary> | |
public Dictionary<int, object?>? AiResourceTargetRecords { get; set; } = new(); | |
/// <summary>Original key: attitude</summary> | |
public List<GamestateCountryValueAiAttitudeItem>? Attitude { get; set; } = new(); | |
/// <summary>Original key: budget</summary> | |
public List<int>? Budget { get; set; } = new(); | |
/// <summary>Original key: colonize</summary> | |
public bool Colonize { get; set; } | |
/// <summary>Original key: initialized</summary> | |
public bool Initialized { get; set; } | |
/// <summary>Original key: last_diplo_actions</summary> | |
public List<GamestateCountryValueAiLastDiploActionsItem>? LastDiploActions { get; set; } = new(); | |
/// <summary>Original key: nemesis</summary> | |
public long Nemesis { get; set; } | |
/// <summary>Original key: prepare_war_date</summary> | |
public string? PrepareWarDate { get; set; } | |
/// <summary>Original key: prepare_war_date_start</summary> | |
public string? PrepareWarDateStart { get; set; } | |
/// <summary>Original key: random_count</summary> | |
public int RandomCount { get; set; } | |
/// <summary>Original key: random_seed</summary> | |
public int RandomSeed { get; set; } | |
/// <summary>Original key: robot_colonies</summary> | |
public int RobotColonies { get; set; } | |
/// <summary>Original key: robot_colonies_with_free_buildings</summary> | |
public int RobotColoniesWithFreeBuildings { get; set; } | |
/// <summary>Original key: strategy</summary> | |
public GamestateCountryValueAiStrategy? Strategy { get; set; } | |
/// <summary>Original key: synced_random_count</summary> | |
public int SyncedRandomCount { get; set; } | |
/// <summary>Original key: synced_random_seed</summary> | |
public int SyncedRandomSeed { get; set; } | |
/// <summary>Original key: target</summary> | |
public long Target { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAi instance.</summary> | |
public static GamestateCountryValueAi Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAi(); | |
if (saveObject.TryGet<SaveObject>(@"ai_resource_target_records", out var aiResourceTargetRecordsDictObj) && aiResourceTargetRecordsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in aiResourceTargetRecordsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.AiResourceTargetRecords = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveArray>(@"attitude", out var attitudeArr) && attitudeArr != null) | |
{ | |
model.Attitude = attitudeArr.Items.OfType<SaveObject>().Select(GamestateCountryValueAiAttitudeItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"budget", out var budgetArr) && budgetArr != null) | |
{ | |
model.Budget = budgetArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"colonize", out bool? colonize)) | |
{ | |
model.Colonize = colonize!.Value; | |
} | |
if (saveObject.TryGetBool(@"initialized", out bool? initialized)) | |
{ | |
model.Initialized = initialized!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"last_diplo_actions", out var lastDiploActionsArr) && lastDiploActionsArr != null) | |
{ | |
model.LastDiploActions = lastDiploActionsArr.Items.OfType<SaveObject>().Select(GamestateCountryValueAiLastDiploActionsItem.Load).ToList(); | |
} | |
if (saveObject.TryGetLong(@"nemesis", out long? nemesis)) | |
{ | |
model.Nemesis = nemesis!.Value; | |
} | |
if (saveObject.TryGetString(@"prepare_war_date", out string? prepareWarDate)) | |
{ | |
model.PrepareWarDate = prepareWarDate; | |
} | |
if (saveObject.TryGetString(@"prepare_war_date_start", out string? prepareWarDateStart)) | |
{ | |
model.PrepareWarDateStart = prepareWarDateStart; | |
} | |
if (saveObject.TryGetInt(@"random_count", out int? randomCount)) | |
{ | |
model.RandomCount = randomCount!.Value; | |
} | |
if (saveObject.TryGetInt(@"random_seed", out int? randomSeed)) | |
{ | |
model.RandomSeed = randomSeed!.Value; | |
} | |
if (saveObject.TryGetInt(@"robot_colonies", out int? robotColonies)) | |
{ | |
model.RobotColonies = robotColonies!.Value; | |
} | |
if (saveObject.TryGetInt(@"robot_colonies_with_free_buildings", out int? robotColoniesWithFreeBuildings)) | |
{ | |
model.RobotColoniesWithFreeBuildings = robotColoniesWithFreeBuildings!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"strategy", out var strategyObj) && strategyObj != null) | |
{ | |
model.Strategy = GamestateCountryValueAiStrategy.Load(strategyObj); | |
} | |
if (saveObject.TryGetInt(@"synced_random_count", out int? syncedRandomCount)) | |
{ | |
model.SyncedRandomCount = syncedRandomCount!.Value; | |
} | |
if (saveObject.TryGetInt(@"synced_random_seed", out int? syncedRandomSeed)) | |
{ | |
model.SyncedRandomSeed = syncedRandomSeed!.Value; | |
} | |
if (saveObject.TryGetLong(@"target", out long? target)) | |
{ | |
model.Target = target!.Value; | |
} | |
return model; | |
} | |
public class GamestateCountryValueAiAttitudeItem | |
{ | |
/// <summary>Original key: attitude</summary> | |
public string? Attitude { get; set; } | |
/// <summary>Original key: country</summary> | |
public int Country { get; set; } | |
/// <summary>Original key: date</summary> | |
public DateTime Date { get; set; } | |
/// <summary>Original key: priority</summary> | |
public int Priority { get; set; } | |
/// <summary>Original key: weight</summary> | |
public int Weight { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAiAttitudeItem instance.</summary> | |
public static GamestateCountryValueAiAttitudeItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAiAttitudeItem(); | |
if (saveObject.TryGetString(@"attitude", out string? attitude)) | |
{ | |
model.Attitude = attitude; | |
} | |
if (saveObject.TryGetInt(@"country", out int? country)) | |
{ | |
model.Country = country!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"date", out DateTime? date)) | |
{ | |
model.Date = date!.Value; | |
} | |
if (saveObject.TryGetInt(@"priority", out int? priority)) | |
{ | |
model.Priority = priority!.Value; | |
} | |
if (saveObject.TryGetInt(@"weight", out int? weight)) | |
{ | |
model.Weight = weight!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAiLastDiploActionsItem | |
{ | |
/// <summary>Original key: action</summary> | |
public string? Action { get; set; } | |
/// <summary>Original key: country</summary> | |
public int Country { get; set; } | |
/// <summary>Original key: creation_date</summary> | |
public DateTime CreationDate { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAiLastDiploActionsItem instance.</summary> | |
public static GamestateCountryValueAiLastDiploActionsItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAiLastDiploActionsItem(); | |
if (saveObject.TryGetString(@"action", out string? action)) | |
{ | |
model.Action = action; | |
} | |
if (saveObject.TryGetInt(@"country", out int? country)) | |
{ | |
model.Country = country!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"creation_date", out DateTime? creationDate)) | |
{ | |
model.CreationDate = creationDate!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAiStrategy | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: target</summary> | |
public int Target { get; set; } | |
/// <summary>Original key: type</summary> | |
public int Type { get; set; } | |
/// <summary>Original key: value</summary> | |
public int Value { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAiStrategy instance.</summary> | |
public static GamestateCountryValueAiStrategy Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAiStrategy(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetInt(@"target", out int? target)) | |
{ | |
model.Target = target!.Value; | |
} | |
if (saveObject.TryGetInt(@"type", out int? @type)) | |
{ | |
model.Type = @type!.Value; | |
} | |
if (saveObject.TryGetInt(@"value", out int? value)) | |
{ | |
model.Value = value!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArray | |
{ | |
/// <summary>Original key: action_astral_boost</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionAstralBoost? ActionAstralBoost { get; set; } | |
/// <summary>Original key: action_astral_siphon</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSiphon? ActionAstralSiphon { get; set; } | |
/// <summary>Original key: action_astral_splitting</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSplitting? ActionAstralSplitting { get; set; } | |
/// <summary>Original key: action_dimensional_lock</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalLock? ActionDimensionalLock { get; set; } | |
/// <summary>Original key: action_dimensional_shifting</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalShifting? ActionDimensionalShifting { get; set; } | |
/// <summary>Original key: action_flash_forge_hyper_relay</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionFlashForgeHyperRelay? ActionFlashForgeHyperRelay { get; set; } | |
/// <summary>Original key: action_folding_hyperspace</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionFoldingHyperspace? ActionFoldingHyperspace { get; set; } | |
/// <summary>Original key: action_gain_physics_insight</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionGainPhysicsInsight? ActionGainPhysicsInsight { get; set; } | |
/// <summary>Original key: action_hyper_relay_insight</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionHyperRelayInsight? ActionHyperRelayInsight { get; set; } | |
/// <summary>Original key: action_lateral_artifacting</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionLateralArtifacting? ActionLateralArtifacting { get; set; } | |
/// <summary>Original key: action_planar_mastery</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionPlanarMastery? ActionPlanarMastery { get; set; } | |
/// <summary>Original key: action_quantum_catapult_insight</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight? ActionQuantumCatapultInsight { get; set; } | |
/// <summary>Original key: action_quantum_catapult_insight_2</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight2? ActionQuantumCatapultInsight2 { get; set; } | |
/// <summary>Original key: action_summon_dimensional_fleet</summary> | |
public GamestateCountryValueAstralActionsUsageStatesArrayActionSummonDimensionalFleet? ActionSummonDimensionalFleet { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArray instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArray Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArray(); | |
if (saveObject.TryGet<SaveObject>(@"action_astral_boost", out var actionAstralBoostObj) && actionAstralBoostObj != null) | |
{ | |
model.ActionAstralBoost = GamestateCountryValueAstralActionsUsageStatesArrayActionAstralBoost.Load(actionAstralBoostObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_astral_siphon", out var actionAstralSiphonObj) && actionAstralSiphonObj != null) | |
{ | |
model.ActionAstralSiphon = GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSiphon.Load(actionAstralSiphonObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_astral_splitting", out var actionAstralSplittingObj) && actionAstralSplittingObj != null) | |
{ | |
model.ActionAstralSplitting = GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSplitting.Load(actionAstralSplittingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_dimensional_lock", out var actionDimensionalLockObj) && actionDimensionalLockObj != null) | |
{ | |
model.ActionDimensionalLock = GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalLock.Load(actionDimensionalLockObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_dimensional_shifting", out var actionDimensionalShiftingObj) && actionDimensionalShiftingObj != null) | |
{ | |
model.ActionDimensionalShifting = GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalShifting.Load(actionDimensionalShiftingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_flash_forge_hyper_relay", out var actionFlashForgeHyperRelayObj) && actionFlashForgeHyperRelayObj != null) | |
{ | |
model.ActionFlashForgeHyperRelay = GamestateCountryValueAstralActionsUsageStatesArrayActionFlashForgeHyperRelay.Load(actionFlashForgeHyperRelayObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_folding_hyperspace", out var actionFoldingHyperspaceObj) && actionFoldingHyperspaceObj != null) | |
{ | |
model.ActionFoldingHyperspace = GamestateCountryValueAstralActionsUsageStatesArrayActionFoldingHyperspace.Load(actionFoldingHyperspaceObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_gain_physics_insight", out var actionGainPhysicsInsightObj) && actionGainPhysicsInsightObj != null) | |
{ | |
model.ActionGainPhysicsInsight = GamestateCountryValueAstralActionsUsageStatesArrayActionGainPhysicsInsight.Load(actionGainPhysicsInsightObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_hyper_relay_insight", out var actionHyperRelayInsightObj) && actionHyperRelayInsightObj != null) | |
{ | |
model.ActionHyperRelayInsight = GamestateCountryValueAstralActionsUsageStatesArrayActionHyperRelayInsight.Load(actionHyperRelayInsightObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_lateral_artifacting", out var actionLateralArtifactingObj) && actionLateralArtifactingObj != null) | |
{ | |
model.ActionLateralArtifacting = GamestateCountryValueAstralActionsUsageStatesArrayActionLateralArtifacting.Load(actionLateralArtifactingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_planar_mastery", out var actionPlanarMasteryObj) && actionPlanarMasteryObj != null) | |
{ | |
model.ActionPlanarMastery = GamestateCountryValueAstralActionsUsageStatesArrayActionPlanarMastery.Load(actionPlanarMasteryObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_quantum_catapult_insight", out var actionQuantumCatapultInsightObj) && actionQuantumCatapultInsightObj != null) | |
{ | |
model.ActionQuantumCatapultInsight = GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight.Load(actionQuantumCatapultInsightObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_quantum_catapult_insight_2", out var actionQuantumCatapultInsight2Obj) && actionQuantumCatapultInsight2Obj != null) | |
{ | |
model.ActionQuantumCatapultInsight2 = GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight2.Load(actionQuantumCatapultInsight2Obj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"action_summon_dimensional_fleet", out var actionSummonDimensionalFleetObj) && actionSummonDimensionalFleetObj != null) | |
{ | |
model.ActionSummonDimensionalFleet = GamestateCountryValueAstralActionsUsageStatesArrayActionSummonDimensionalFleet.Load(actionSummonDimensionalFleetObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionAstralBoost | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionAstralBoost instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionAstralBoost Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionAstralBoost(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSiphon | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSiphon instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSiphon Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSiphon(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSplitting | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSplitting instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSplitting Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionAstralSplitting(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalLock | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalLock instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalLock Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalLock(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalShifting | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalShifting instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalShifting Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionDimensionalShifting(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionFlashForgeHyperRelay | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionFlashForgeHyperRelay instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionFlashForgeHyperRelay Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionFlashForgeHyperRelay(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionFoldingHyperspace | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionFoldingHyperspace instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionFoldingHyperspace Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionFoldingHyperspace(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionGainPhysicsInsight | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionGainPhysicsInsight instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionGainPhysicsInsight Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionGainPhysicsInsight(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionHyperRelayInsight | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionHyperRelayInsight instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionHyperRelayInsight Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionHyperRelayInsight(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionLateralArtifacting | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionLateralArtifacting instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionLateralArtifacting Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionLateralArtifacting(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionPlanarMastery | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionPlanarMastery instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionPlanarMastery Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionPlanarMastery(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight2 | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight2 instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight2 Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionQuantumCatapultInsight2(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueAstralActionsUsageStatesArrayActionSummonDimensionalFleet | |
{ | |
/// <summary>Original key: is_waiting_for_cooldown_to_start</summary> | |
public bool IsWaitingForCooldownToStart { get; set; } | |
/// <summary>Original key: next_usable_date</summary> | |
public string? NextUsableDate { get; set; } | |
/// <summary>Original key: unlockable</summary> | |
public bool Unlockable { get; set; } | |
/// <summary>Original key: unlocked</summary> | |
public bool Unlocked { get; set; } | |
/// <summary>Original key: usages</summary> | |
public int Usages { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueAstralActionsUsageStatesArrayActionSummonDimensionalFleet instance.</summary> | |
public static GamestateCountryValueAstralActionsUsageStatesArrayActionSummonDimensionalFleet Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueAstralActionsUsageStatesArrayActionSummonDimensionalFleet(); | |
if (saveObject.TryGetBool(@"is_waiting_for_cooldown_to_start", out bool? isWaitingForCooldownToStart)) | |
{ | |
model.IsWaitingForCooldownToStart = isWaitingForCooldownToStart!.Value; | |
} | |
if (saveObject.TryGetString(@"next_usable_date", out string? nextUsableDate)) | |
{ | |
model.NextUsableDate = nextUsableDate; | |
} | |
if (saveObject.TryGetBool(@"unlockable", out bool? unlockable)) | |
{ | |
model.Unlockable = unlockable!.Value; | |
} | |
if (saveObject.TryGetBool(@"unlocked", out bool? unlocked)) | |
{ | |
model.Unlocked = unlocked!.Value; | |
} | |
if (saveObject.TryGetInt(@"usages", out int? usages)) | |
{ | |
model.Usages = usages!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueBudget | |
{ | |
/// <summary>Original key: current_month</summary> | |
public GamestateCountryValueBudgetCurrentMonth? CurrentMonth { get; set; } | |
/// <summary>Original key: income_high_water_mark</summary> | |
public GamestateCountryValueBudgetIncomeHighWaterMark? IncomeHighWaterMark { get; set; } | |
/// <summary>Original key: last_month</summary> | |
public GamestateCountryValueBudgetLastMonth? LastMonth { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudget instance.</summary> | |
public static GamestateCountryValueBudget Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudget(); | |
if (saveObject.TryGet<SaveObject>(@"current_month", out var currentMonthObj) && currentMonthObj != null) | |
{ | |
model.CurrentMonth = GamestateCountryValueBudgetCurrentMonth.Load(currentMonthObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"income_high_water_mark", out var incomeHighWaterMarkObj) && incomeHighWaterMarkObj != null) | |
{ | |
model.IncomeHighWaterMark = GamestateCountryValueBudgetIncomeHighWaterMark.Load(incomeHighWaterMarkObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"last_month", out var lastMonthObj) && lastMonthObj != null) | |
{ | |
model.LastMonth = GamestateCountryValueBudgetLastMonth.Load(lastMonthObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetCurrentMonth | |
{ | |
/// <summary>Original key: balance</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalance? Balance { get; set; } | |
/// <summary>Original key: expenses</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpenses? Expenses { get; set; } | |
/// <summary>Original key: extra_balance</summary> | |
public GamestateCountryValueBudgetCurrentMonthExtraBalance? ExtraBalance { get; set; } | |
/// <summary>Original key: extra_expenses</summary> | |
public GamestateCountryValueBudgetCurrentMonthExtraExpenses? ExtraExpenses { get; set; } | |
/// <summary>Original key: extra_income</summary> | |
public GamestateCountryValueBudgetCurrentMonthExtraIncome? ExtraIncome { get; set; } | |
/// <summary>Original key: income</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncome? Income { get; set; } | |
/// <summary>Original key: trade_balance</summary> | |
public GamestateCountryValueBudgetCurrentMonthTradeBalance? TradeBalance { get; set; } | |
/// <summary>Original key: trade_expenses</summary> | |
public GamestateCountryValueBudgetCurrentMonthTradeExpenses? TradeExpenses { get; set; } | |
/// <summary>Original key: trade_income</summary> | |
public GamestateCountryValueBudgetCurrentMonthTradeIncome? TradeIncome { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonth instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonth Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonth(); | |
if (saveObject.TryGet<SaveObject>(@"balance", out var balanceObj) && balanceObj != null) | |
{ | |
model.Balance = GamestateCountryValueBudgetCurrentMonthBalance.Load(balanceObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"expenses", out var expensesObj) && expensesObj != null) | |
{ | |
model.Expenses = GamestateCountryValueBudgetCurrentMonthExpenses.Load(expensesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"extra_balance", out var extraBalanceObj) && extraBalanceObj != null) | |
{ | |
model.ExtraBalance = GamestateCountryValueBudgetCurrentMonthExtraBalance.Load(extraBalanceObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"extra_expenses", out var extraExpensesObj) && extraExpensesObj != null) | |
{ | |
model.ExtraExpenses = GamestateCountryValueBudgetCurrentMonthExtraExpenses.Load(extraExpensesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"extra_income", out var extraIncomeObj) && extraIncomeObj != null) | |
{ | |
model.ExtraIncome = GamestateCountryValueBudgetCurrentMonthExtraIncome.Load(extraIncomeObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"income", out var incomeObj) && incomeObj != null) | |
{ | |
model.Income = GamestateCountryValueBudgetCurrentMonthIncome.Load(incomeObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_balance", out var tradeBalanceObj) && tradeBalanceObj != null) | |
{ | |
model.TradeBalance = GamestateCountryValueBudgetCurrentMonthTradeBalance.Load(tradeBalanceObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_expenses", out var tradeExpensesObj) && tradeExpensesObj != null) | |
{ | |
model.TradeExpenses = GamestateCountryValueBudgetCurrentMonthTradeExpenses.Load(tradeExpensesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_income", out var tradeIncomeObj) && tradeIncomeObj != null) | |
{ | |
model.TradeIncome = GamestateCountryValueBudgetCurrentMonthTradeIncome.Load(tradeIncomeObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalance | |
{ | |
/// <summary>Original key: country_base</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceCountryBase? CountryBase { get; set; } | |
/// <summary>Original key: country_power_projection</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceCountryPowerProjection? CountryPowerProjection { get; set; } | |
/// <summary>Original key: diplomatic_networking</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceDiplomaticNetworking? DiplomaticNetworking { get; set; } | |
/// <summary>Original key: leader_commanders</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceLeaderCommanders? LeaderCommanders { get; set; } | |
/// <summary>Original key: leader_officials</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceLeaderOfficials? LeaderOfficials { get; set; } | |
/// <summary>Original key: leader_scientists</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceLeaderScientists? LeaderScientists { get; set; } | |
/// <summary>Original key: non_aggression_pacts</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceNonAggressionPacts? NonAggressionPacts { get; set; } | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Original key: orbital_mining_deposits</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceOrbitalMiningDeposits? OrbitalMiningDeposits { get; set; } | |
/// <summary>Original key: orbital_research_deposits</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceOrbitalResearchDeposits? OrbitalResearchDeposits { get; set; } | |
/// <summary>Original key: planet_administrators</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetAdministrators? PlanetAdministrators { get; set; } | |
/// <summary>Original key: planet_artisans</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetArtisans? PlanetArtisans { get; set; } | |
/// <summary>Original key: planet_buildings</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetBuildings? PlanetBuildings { get; set; } | |
/// <summary>Original key: planet_districts_cities</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsCities? PlanetDistrictsCities { get; set; } | |
/// <summary>Original key: planet_districts_farming</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsFarming? PlanetDistrictsFarming { get; set; } | |
/// <summary>Original key: planet_districts_generator</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsGenerator? PlanetDistrictsGenerator { get; set; } | |
/// <summary>Original key: planet_districts_industrial</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsIndustrial? PlanetDistrictsIndustrial { get; set; } | |
/// <summary>Original key: planet_districts_mining</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsMining? PlanetDistrictsMining { get; set; } | |
/// <summary>Original key: planet_doctors</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetDoctors? PlanetDoctors { get; set; } | |
/// <summary>Original key: planet_farmers</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetFarmers? PlanetFarmers { get; set; } | |
/// <summary>Original key: planet_jobs</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetJobs? PlanetJobs { get; set; } | |
/// <summary>Original key: planet_metallurgists</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetMetallurgists? PlanetMetallurgists { get; set; } | |
/// <summary>Original key: planet_miners</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetMiners? PlanetMiners { get; set; } | |
/// <summary>Original key: planet_politicians</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetPoliticians? PlanetPoliticians { get; set; } | |
/// <summary>Original key: planet_refiners</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetRefiners? PlanetRefiners { get; set; } | |
/// <summary>Original key: planet_researchers</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetResearchers? PlanetResearchers { get; set; } | |
/// <summary>Original key: planet_technician</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetTechnician? PlanetTechnician { get; set; } | |
/// <summary>Original key: planet_traders</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePlanetTraders? PlanetTraders { get; set; } | |
/// <summary>Original key: pop_category_rulers</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePopCategoryRulers? PopCategoryRulers { get; set; } | |
/// <summary>Original key: pop_category_specialists</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePopCategorySpecialists? PopCategorySpecialists { get; set; } | |
/// <summary>Original key: pop_category_workers</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePopCategoryWorkers? PopCategoryWorkers { get; set; } | |
/// <summary>Original key: pop_factions</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalancePopFactions? PopFactions { get; set; } | |
/// <summary>Original key: ship_components</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceShipComponents? ShipComponents { get; set; } | |
/// <summary>Original key: ships</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceShips? Ships { get; set; } | |
/// <summary>Original key: starbase_buildings</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceStarbaseBuildings? StarbaseBuildings { get; set; } | |
/// <summary>Original key: starbase_modules</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceStarbaseModules? StarbaseModules { get; set; } | |
/// <summary>Original key: starbase_stations</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceStarbaseStations? StarbaseStations { get; set; } | |
/// <summary>Original key: station_gatherers</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceStationGatherers? StationGatherers { get; set; } | |
/// <summary>Original key: station_researchers</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceStationResearchers? StationResearchers { get; set; } | |
/// <summary>Original key: trade_routes</summary> | |
public GamestateCountryValueBudgetCurrentMonthBalanceTradeRoutes? TradeRoutes { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalance instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalance Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalance(); | |
if (saveObject.TryGet<SaveObject>(@"country_base", out var countryBaseObj) && countryBaseObj != null) | |
{ | |
model.CountryBase = GamestateCountryValueBudgetCurrentMonthBalanceCountryBase.Load(countryBaseObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"country_power_projection", out var countryPowerProjectionObj) && countryPowerProjectionObj != null) | |
{ | |
model.CountryPowerProjection = GamestateCountryValueBudgetCurrentMonthBalanceCountryPowerProjection.Load(countryPowerProjectionObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"diplomatic_networking", out var diplomaticNetworkingObj) && diplomaticNetworkingObj != null) | |
{ | |
model.DiplomaticNetworking = GamestateCountryValueBudgetCurrentMonthBalanceDiplomaticNetworking.Load(diplomaticNetworkingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_commanders", out var leaderCommandersObj) && leaderCommandersObj != null) | |
{ | |
model.LeaderCommanders = GamestateCountryValueBudgetCurrentMonthBalanceLeaderCommanders.Load(leaderCommandersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_officials", out var leaderOfficialsObj) && leaderOfficialsObj != null) | |
{ | |
model.LeaderOfficials = GamestateCountryValueBudgetCurrentMonthBalanceLeaderOfficials.Load(leaderOfficialsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_scientists", out var leaderScientistsObj) && leaderScientistsObj != null) | |
{ | |
model.LeaderScientists = GamestateCountryValueBudgetCurrentMonthBalanceLeaderScientists.Load(leaderScientistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"non_aggression_pacts", out var nonAggressionPactsObj) && nonAggressionPactsObj != null) | |
{ | |
model.NonAggressionPacts = GamestateCountryValueBudgetCurrentMonthBalanceNonAggressionPacts.Load(nonAggressionPactsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"orbital_mining_deposits", out var orbitalMiningDepositsObj) && orbitalMiningDepositsObj != null) | |
{ | |
model.OrbitalMiningDeposits = GamestateCountryValueBudgetCurrentMonthBalanceOrbitalMiningDeposits.Load(orbitalMiningDepositsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"orbital_research_deposits", out var orbitalResearchDepositsObj) && orbitalResearchDepositsObj != null) | |
{ | |
model.OrbitalResearchDeposits = GamestateCountryValueBudgetCurrentMonthBalanceOrbitalResearchDeposits.Load(orbitalResearchDepositsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_administrators", out var planetAdministratorsObj) && planetAdministratorsObj != null) | |
{ | |
model.PlanetAdministrators = GamestateCountryValueBudgetCurrentMonthBalancePlanetAdministrators.Load(planetAdministratorsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_artisans", out var planetArtisansObj) && planetArtisansObj != null) | |
{ | |
model.PlanetArtisans = GamestateCountryValueBudgetCurrentMonthBalancePlanetArtisans.Load(planetArtisansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_buildings", out var planetBuildingsObj) && planetBuildingsObj != null) | |
{ | |
model.PlanetBuildings = GamestateCountryValueBudgetCurrentMonthBalancePlanetBuildings.Load(planetBuildingsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_cities", out var planetDistrictsCitiesObj) && planetDistrictsCitiesObj != null) | |
{ | |
model.PlanetDistrictsCities = GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsCities.Load(planetDistrictsCitiesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_farming", out var planetDistrictsFarmingObj) && planetDistrictsFarmingObj != null) | |
{ | |
model.PlanetDistrictsFarming = GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsFarming.Load(planetDistrictsFarmingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_generator", out var planetDistrictsGeneratorObj) && planetDistrictsGeneratorObj != null) | |
{ | |
model.PlanetDistrictsGenerator = GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsGenerator.Load(planetDistrictsGeneratorObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_industrial", out var planetDistrictsIndustrialObj) && planetDistrictsIndustrialObj != null) | |
{ | |
model.PlanetDistrictsIndustrial = GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsIndustrial.Load(planetDistrictsIndustrialObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_mining", out var planetDistrictsMiningObj) && planetDistrictsMiningObj != null) | |
{ | |
model.PlanetDistrictsMining = GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsMining.Load(planetDistrictsMiningObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_doctors", out var planetDoctorsObj) && planetDoctorsObj != null) | |
{ | |
model.PlanetDoctors = GamestateCountryValueBudgetCurrentMonthBalancePlanetDoctors.Load(planetDoctorsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_farmers", out var planetFarmersObj) && planetFarmersObj != null) | |
{ | |
model.PlanetFarmers = GamestateCountryValueBudgetCurrentMonthBalancePlanetFarmers.Load(planetFarmersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_jobs", out var planetJobsObj) && planetJobsObj != null) | |
{ | |
model.PlanetJobs = GamestateCountryValueBudgetCurrentMonthBalancePlanetJobs.Load(planetJobsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_metallurgists", out var planetMetallurgistsObj) && planetMetallurgistsObj != null) | |
{ | |
model.PlanetMetallurgists = GamestateCountryValueBudgetCurrentMonthBalancePlanetMetallurgists.Load(planetMetallurgistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_miners", out var planetMinersObj) && planetMinersObj != null) | |
{ | |
model.PlanetMiners = GamestateCountryValueBudgetCurrentMonthBalancePlanetMiners.Load(planetMinersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_politicians", out var planetPoliticiansObj) && planetPoliticiansObj != null) | |
{ | |
model.PlanetPoliticians = GamestateCountryValueBudgetCurrentMonthBalancePlanetPoliticians.Load(planetPoliticiansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_refiners", out var planetRefinersObj) && planetRefinersObj != null) | |
{ | |
model.PlanetRefiners = GamestateCountryValueBudgetCurrentMonthBalancePlanetRefiners.Load(planetRefinersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_researchers", out var planetResearchersObj) && planetResearchersObj != null) | |
{ | |
model.PlanetResearchers = GamestateCountryValueBudgetCurrentMonthBalancePlanetResearchers.Load(planetResearchersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_technician", out var planetTechnicianObj) && planetTechnicianObj != null) | |
{ | |
model.PlanetTechnician = GamestateCountryValueBudgetCurrentMonthBalancePlanetTechnician.Load(planetTechnicianObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_traders", out var planetTradersObj) && planetTradersObj != null) | |
{ | |
model.PlanetTraders = GamestateCountryValueBudgetCurrentMonthBalancePlanetTraders.Load(planetTradersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_rulers", out var popCategoryRulersObj) && popCategoryRulersObj != null) | |
{ | |
model.PopCategoryRulers = GamestateCountryValueBudgetCurrentMonthBalancePopCategoryRulers.Load(popCategoryRulersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_specialists", out var popCategorySpecialistsObj) && popCategorySpecialistsObj != null) | |
{ | |
model.PopCategorySpecialists = GamestateCountryValueBudgetCurrentMonthBalancePopCategorySpecialists.Load(popCategorySpecialistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_workers", out var popCategoryWorkersObj) && popCategoryWorkersObj != null) | |
{ | |
model.PopCategoryWorkers = GamestateCountryValueBudgetCurrentMonthBalancePopCategoryWorkers.Load(popCategoryWorkersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_factions", out var popFactionsObj) && popFactionsObj != null) | |
{ | |
model.PopFactions = GamestateCountryValueBudgetCurrentMonthBalancePopFactions.Load(popFactionsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ship_components", out var shipComponentsObj) && shipComponentsObj != null) | |
{ | |
model.ShipComponents = GamestateCountryValueBudgetCurrentMonthBalanceShipComponents.Load(shipComponentsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ships", out var shipsObj) && shipsObj != null) | |
{ | |
model.Ships = GamestateCountryValueBudgetCurrentMonthBalanceShips.Load(shipsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_buildings", out var starbaseBuildingsObj) && starbaseBuildingsObj != null) | |
{ | |
model.StarbaseBuildings = GamestateCountryValueBudgetCurrentMonthBalanceStarbaseBuildings.Load(starbaseBuildingsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_modules", out var starbaseModulesObj) && starbaseModulesObj != null) | |
{ | |
model.StarbaseModules = GamestateCountryValueBudgetCurrentMonthBalanceStarbaseModules.Load(starbaseModulesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_stations", out var starbaseStationsObj) && starbaseStationsObj != null) | |
{ | |
model.StarbaseStations = GamestateCountryValueBudgetCurrentMonthBalanceStarbaseStations.Load(starbaseStationsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"station_gatherers", out var stationGatherersObj) && stationGatherersObj != null) | |
{ | |
model.StationGatherers = GamestateCountryValueBudgetCurrentMonthBalanceStationGatherers.Load(stationGatherersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"station_researchers", out var stationResearchersObj) && stationResearchersObj != null) | |
{ | |
model.StationResearchers = GamestateCountryValueBudgetCurrentMonthBalanceStationResearchers.Load(stationResearchersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_routes", out var tradeRoutesObj) && tradeRoutesObj != null) | |
{ | |
model.TradeRoutes = GamestateCountryValueBudgetCurrentMonthBalanceTradeRoutes.Load(tradeRoutesObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceCountryBase | |
{ | |
/// <summary>Original key: alloys</summary> | |
public int Alloys { get; set; } | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: food</summary> | |
public int Food { get; set; } | |
/// <summary>Original key: influence</summary> | |
public int Influence { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public int PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public int SocietyResearch { get; set; } | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceCountryBase instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceCountryBase Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceCountryBase(); | |
if (saveObject.TryGetInt(@"alloys", out int? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"food", out int? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
if (saveObject.TryGetInt(@"influence", out int? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
if (saveObject.TryGetInt(@"physics_research", out int? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"society_research", out int? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceCountryPowerProjection | |
{ | |
/// <summary>Original key: influence</summary> | |
public float Influence { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceCountryPowerProjection instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceCountryPowerProjection Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceCountryPowerProjection(); | |
if (saveObject.TryGetFloat(@"influence", out float? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceDiplomaticNetworking | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceDiplomaticNetworking instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceDiplomaticNetworking Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceDiplomaticNetworking(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceLeaderCommanders | |
{ | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceLeaderCommanders instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceLeaderCommanders Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceLeaderCommanders(); | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceLeaderOfficials | |
{ | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceLeaderOfficials instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceLeaderOfficials Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceLeaderOfficials(); | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceLeaderScientists | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceLeaderScientists instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceLeaderScientists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceLeaderScientists(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceNonAggressionPacts | |
{ | |
/// <summary>Original key: influence</summary> | |
public float Influence { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceNonAggressionPacts instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceNonAggressionPacts Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceNonAggressionPacts(); | |
if (saveObject.TryGetFloat(@"influence", out float? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceOrbitalMiningDeposits | |
{ | |
/// <summary>Original key: alloys</summary> | |
public int Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceOrbitalMiningDeposits instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceOrbitalMiningDeposits Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceOrbitalMiningDeposits(); | |
if (saveObject.TryGetInt(@"alloys", out int? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceOrbitalResearchDeposits | |
{ | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public float PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public float SocietyResearch { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceOrbitalResearchDeposits instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceOrbitalResearchDeposits Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceOrbitalResearchDeposits(); | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"physics_research", out float? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"society_research", out float? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetAdministrators | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetAdministrators instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetAdministrators Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetAdministrators(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetArtisans | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetArtisans instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetArtisans Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetArtisans(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetBuildings | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetBuildings instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetBuildings Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetBuildings(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsCities | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsCities instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsCities Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsCities(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsFarming | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsFarming instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsFarming Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsFarming(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsGenerator | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsGenerator instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsGenerator Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsGenerator(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsIndustrial | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsIndustrial instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsIndustrial Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsIndustrial(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsMining | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsMining instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsMining Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetDistrictsMining(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetDoctors | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetDoctors instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetDoctors Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetDoctors(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetFarmers | |
{ | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetFarmers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetFarmers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetFarmers(); | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetJobs | |
{ | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetJobs instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetJobs Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetJobs(); | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetMetallurgists | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetMetallurgists instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetMetallurgists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetMetallurgists(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetMiners | |
{ | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetMiners instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetMiners Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetMiners(); | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetPoliticians | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetPoliticians instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetPoliticians Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetPoliticians(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetRefiners | |
{ | |
/// <summary>Original key: exotic_gases</summary> | |
public float ExoticGases { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetRefiners instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetRefiners Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetRefiners(); | |
if (saveObject.TryGetFloat(@"exotic_gases", out float? exoticGases)) | |
{ | |
model.ExoticGases = exoticGases!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetResearchers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public int PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public int SocietyResearch { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetResearchers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetResearchers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetResearchers(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"physics_research", out int? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"society_research", out int? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetTechnician | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetTechnician instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetTechnician Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetTechnician(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePlanetTraders | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePlanetTraders instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePlanetTraders Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePlanetTraders(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePopCategoryRulers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePopCategoryRulers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePopCategoryRulers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePopCategoryRulers(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePopCategorySpecialists | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePopCategorySpecialists instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePopCategorySpecialists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePopCategorySpecialists(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePopCategoryWorkers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePopCategoryWorkers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePopCategoryWorkers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePopCategoryWorkers(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalancePopFactions | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalancePopFactions instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalancePopFactions Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalancePopFactions(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceShipComponents | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceShipComponents instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceShipComponents Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceShipComponents(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceShips | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceShips instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceShips Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceShips(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceStarbaseBuildings | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceStarbaseBuildings instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceStarbaseBuildings Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceStarbaseBuildings(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceStarbaseModules | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceStarbaseModules instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceStarbaseModules Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceStarbaseModules(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceStarbaseStations | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceStarbaseStations instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceStarbaseStations Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceStarbaseStations(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceStationGatherers | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceStationGatherers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceStationGatherers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceStationGatherers(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceStationResearchers | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceStationResearchers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceStationResearchers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceStationResearchers(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthBalanceTradeRoutes | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthBalanceTradeRoutes instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthBalanceTradeRoutes Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthBalanceTradeRoutes(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpenses | |
{ | |
/// <summary>Original key: leader_commanders</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesLeaderCommanders? LeaderCommanders { get; set; } | |
/// <summary>Original key: leader_officials</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesLeaderOfficials? LeaderOfficials { get; set; } | |
/// <summary>Original key: leader_scientists</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesLeaderScientists? LeaderScientists { get; set; } | |
/// <summary>Original key: non_aggression_pacts</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesNonAggressionPacts? NonAggressionPacts { get; set; } | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Original key: planet_administrators</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetAdministrators? PlanetAdministrators { get; set; } | |
/// <summary>Original key: planet_artisans</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetArtisans? PlanetArtisans { get; set; } | |
/// <summary>Original key: planet_buildings</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetBuildings? PlanetBuildings { get; set; } | |
/// <summary>Original key: planet_districts_cities</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsCities? PlanetDistrictsCities { get; set; } | |
/// <summary>Original key: planet_districts_farming</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsFarming? PlanetDistrictsFarming { get; set; } | |
/// <summary>Original key: planet_districts_generator</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsGenerator? PlanetDistrictsGenerator { get; set; } | |
/// <summary>Original key: planet_districts_industrial</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsIndustrial? PlanetDistrictsIndustrial { get; set; } | |
/// <summary>Original key: planet_districts_mining</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsMining? PlanetDistrictsMining { get; set; } | |
/// <summary>Original key: planet_doctors</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetDoctors? PlanetDoctors { get; set; } | |
/// <summary>Original key: planet_metallurgists</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetMetallurgists? PlanetMetallurgists { get; set; } | |
/// <summary>Original key: planet_politicians</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetPoliticians? PlanetPoliticians { get; set; } | |
/// <summary>Original key: planet_refiners</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetRefiners? PlanetRefiners { get; set; } | |
/// <summary>Original key: planet_researchers</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetResearchers? PlanetResearchers { get; set; } | |
/// <summary>Original key: planet_traders</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPlanetTraders? PlanetTraders { get; set; } | |
/// <summary>Original key: pop_category_rulers</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryRulers? PopCategoryRulers { get; set; } | |
/// <summary>Original key: pop_category_specialists</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPopCategorySpecialists? PopCategorySpecialists { get; set; } | |
/// <summary>Original key: pop_category_workers</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryWorkers? PopCategoryWorkers { get; set; } | |
/// <summary>Original key: ship_components</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesShipComponents? ShipComponents { get; set; } | |
/// <summary>Original key: ships</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesShips? Ships { get; set; } | |
/// <summary>Original key: starbase_buildings</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesStarbaseBuildings? StarbaseBuildings { get; set; } | |
/// <summary>Original key: starbase_modules</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesStarbaseModules? StarbaseModules { get; set; } | |
/// <summary>Original key: starbase_stations</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesStarbaseStations? StarbaseStations { get; set; } | |
/// <summary>Original key: station_gatherers</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesStationGatherers? StationGatherers { get; set; } | |
/// <summary>Original key: station_researchers</summary> | |
public GamestateCountryValueBudgetCurrentMonthExpensesStationResearchers? StationResearchers { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpenses instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpenses Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpenses(); | |
if (saveObject.TryGet<SaveObject>(@"leader_commanders", out var leaderCommandersObj) && leaderCommandersObj != null) | |
{ | |
model.LeaderCommanders = GamestateCountryValueBudgetCurrentMonthExpensesLeaderCommanders.Load(leaderCommandersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_officials", out var leaderOfficialsObj) && leaderOfficialsObj != null) | |
{ | |
model.LeaderOfficials = GamestateCountryValueBudgetCurrentMonthExpensesLeaderOfficials.Load(leaderOfficialsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_scientists", out var leaderScientistsObj) && leaderScientistsObj != null) | |
{ | |
model.LeaderScientists = GamestateCountryValueBudgetCurrentMonthExpensesLeaderScientists.Load(leaderScientistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"non_aggression_pacts", out var nonAggressionPactsObj) && nonAggressionPactsObj != null) | |
{ | |
model.NonAggressionPacts = GamestateCountryValueBudgetCurrentMonthExpensesNonAggressionPacts.Load(nonAggressionPactsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_administrators", out var planetAdministratorsObj) && planetAdministratorsObj != null) | |
{ | |
model.PlanetAdministrators = GamestateCountryValueBudgetCurrentMonthExpensesPlanetAdministrators.Load(planetAdministratorsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_artisans", out var planetArtisansObj) && planetArtisansObj != null) | |
{ | |
model.PlanetArtisans = GamestateCountryValueBudgetCurrentMonthExpensesPlanetArtisans.Load(planetArtisansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_buildings", out var planetBuildingsObj) && planetBuildingsObj != null) | |
{ | |
model.PlanetBuildings = GamestateCountryValueBudgetCurrentMonthExpensesPlanetBuildings.Load(planetBuildingsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_cities", out var planetDistrictsCitiesObj) && planetDistrictsCitiesObj != null) | |
{ | |
model.PlanetDistrictsCities = GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsCities.Load(planetDistrictsCitiesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_farming", out var planetDistrictsFarmingObj) && planetDistrictsFarmingObj != null) | |
{ | |
model.PlanetDistrictsFarming = GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsFarming.Load(planetDistrictsFarmingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_generator", out var planetDistrictsGeneratorObj) && planetDistrictsGeneratorObj != null) | |
{ | |
model.PlanetDistrictsGenerator = GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsGenerator.Load(planetDistrictsGeneratorObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_industrial", out var planetDistrictsIndustrialObj) && planetDistrictsIndustrialObj != null) | |
{ | |
model.PlanetDistrictsIndustrial = GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsIndustrial.Load(planetDistrictsIndustrialObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_mining", out var planetDistrictsMiningObj) && planetDistrictsMiningObj != null) | |
{ | |
model.PlanetDistrictsMining = GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsMining.Load(planetDistrictsMiningObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_doctors", out var planetDoctorsObj) && planetDoctorsObj != null) | |
{ | |
model.PlanetDoctors = GamestateCountryValueBudgetCurrentMonthExpensesPlanetDoctors.Load(planetDoctorsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_metallurgists", out var planetMetallurgistsObj) && planetMetallurgistsObj != null) | |
{ | |
model.PlanetMetallurgists = GamestateCountryValueBudgetCurrentMonthExpensesPlanetMetallurgists.Load(planetMetallurgistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_politicians", out var planetPoliticiansObj) && planetPoliticiansObj != null) | |
{ | |
model.PlanetPoliticians = GamestateCountryValueBudgetCurrentMonthExpensesPlanetPoliticians.Load(planetPoliticiansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_refiners", out var planetRefinersObj) && planetRefinersObj != null) | |
{ | |
model.PlanetRefiners = GamestateCountryValueBudgetCurrentMonthExpensesPlanetRefiners.Load(planetRefinersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_researchers", out var planetResearchersObj) && planetResearchersObj != null) | |
{ | |
model.PlanetResearchers = GamestateCountryValueBudgetCurrentMonthExpensesPlanetResearchers.Load(planetResearchersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_traders", out var planetTradersObj) && planetTradersObj != null) | |
{ | |
model.PlanetTraders = GamestateCountryValueBudgetCurrentMonthExpensesPlanetTraders.Load(planetTradersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_rulers", out var popCategoryRulersObj) && popCategoryRulersObj != null) | |
{ | |
model.PopCategoryRulers = GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryRulers.Load(popCategoryRulersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_specialists", out var popCategorySpecialistsObj) && popCategorySpecialistsObj != null) | |
{ | |
model.PopCategorySpecialists = GamestateCountryValueBudgetCurrentMonthExpensesPopCategorySpecialists.Load(popCategorySpecialistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_workers", out var popCategoryWorkersObj) && popCategoryWorkersObj != null) | |
{ | |
model.PopCategoryWorkers = GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryWorkers.Load(popCategoryWorkersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ship_components", out var shipComponentsObj) && shipComponentsObj != null) | |
{ | |
model.ShipComponents = GamestateCountryValueBudgetCurrentMonthExpensesShipComponents.Load(shipComponentsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ships", out var shipsObj) && shipsObj != null) | |
{ | |
model.Ships = GamestateCountryValueBudgetCurrentMonthExpensesShips.Load(shipsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_buildings", out var starbaseBuildingsObj) && starbaseBuildingsObj != null) | |
{ | |
model.StarbaseBuildings = GamestateCountryValueBudgetCurrentMonthExpensesStarbaseBuildings.Load(starbaseBuildingsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_modules", out var starbaseModulesObj) && starbaseModulesObj != null) | |
{ | |
model.StarbaseModules = GamestateCountryValueBudgetCurrentMonthExpensesStarbaseModules.Load(starbaseModulesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_stations", out var starbaseStationsObj) && starbaseStationsObj != null) | |
{ | |
model.StarbaseStations = GamestateCountryValueBudgetCurrentMonthExpensesStarbaseStations.Load(starbaseStationsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"station_gatherers", out var stationGatherersObj) && stationGatherersObj != null) | |
{ | |
model.StationGatherers = GamestateCountryValueBudgetCurrentMonthExpensesStationGatherers.Load(stationGatherersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"station_researchers", out var stationResearchersObj) && stationResearchersObj != null) | |
{ | |
model.StationResearchers = GamestateCountryValueBudgetCurrentMonthExpensesStationResearchers.Load(stationResearchersObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesLeaderCommanders | |
{ | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesLeaderCommanders instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesLeaderCommanders Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesLeaderCommanders(); | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesLeaderOfficials | |
{ | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesLeaderOfficials instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesLeaderOfficials Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesLeaderOfficials(); | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesLeaderScientists | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesLeaderScientists instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesLeaderScientists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesLeaderScientists(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesNonAggressionPacts | |
{ | |
/// <summary>Original key: influence</summary> | |
public float Influence { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesNonAggressionPacts instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesNonAggressionPacts Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesNonAggressionPacts(); | |
if (saveObject.TryGetFloat(@"influence", out float? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetAdministrators | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetAdministrators instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetAdministrators Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetAdministrators(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetArtisans | |
{ | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetArtisans instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetArtisans Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetArtisans(); | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetBuildings | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetBuildings instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetBuildings Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetBuildings(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsCities | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsCities instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsCities Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsCities(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsFarming | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsFarming instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsFarming Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsFarming(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsGenerator | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsGenerator instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsGenerator Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsGenerator(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsIndustrial | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsIndustrial instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsIndustrial Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsIndustrial(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsMining | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsMining instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsMining Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDistrictsMining(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetDoctors | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDoctors instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetDoctors Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetDoctors(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetMetallurgists | |
{ | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetMetallurgists instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetMetallurgists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetMetallurgists(); | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetPoliticians | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetPoliticians instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetPoliticians Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetPoliticians(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetRefiners | |
{ | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetRefiners instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetRefiners Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetRefiners(); | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetResearchers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetResearchers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetResearchers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetResearchers(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPlanetTraders | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPlanetTraders instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPlanetTraders Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPlanetTraders(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryRulers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryRulers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryRulers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryRulers(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPopCategorySpecialists | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPopCategorySpecialists instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPopCategorySpecialists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPopCategorySpecialists(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryWorkers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryWorkers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryWorkers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesPopCategoryWorkers(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesShipComponents | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesShipComponents instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesShipComponents Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesShipComponents(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesShips | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesShips instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesShips Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesShips(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesStarbaseBuildings | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesStarbaseBuildings instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesStarbaseBuildings Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesStarbaseBuildings(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesStarbaseModules | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesStarbaseModules instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesStarbaseModules Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesStarbaseModules(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesStarbaseStations | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesStarbaseStations instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesStarbaseStations Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesStarbaseStations(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesStationGatherers | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesStationGatherers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesStationGatherers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesStationGatherers(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExpensesStationResearchers | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExpensesStationResearchers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExpensesStationResearchers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExpensesStationResearchers(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExtraBalance | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExtraBalance instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExtraBalance Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExtraBalance(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExtraExpenses | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExtraExpenses instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExtraExpenses Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExtraExpenses(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthExtraIncome | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthExtraIncome instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthExtraIncome Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthExtraIncome(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncome | |
{ | |
/// <summary>Original key: country_base</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomeCountryBase? CountryBase { get; set; } | |
/// <summary>Original key: country_power_projection</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomeCountryPowerProjection? CountryPowerProjection { get; set; } | |
/// <summary>Original key: diplomatic_networking</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomeDiplomaticNetworking? DiplomaticNetworking { get; set; } | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Original key: orbital_mining_deposits</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomeOrbitalMiningDeposits? OrbitalMiningDeposits { get; set; } | |
/// <summary>Original key: orbital_research_deposits</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomeOrbitalResearchDeposits? OrbitalResearchDeposits { get; set; } | |
/// <summary>Original key: planet_administrators</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePlanetAdministrators? PlanetAdministrators { get; set; } | |
/// <summary>Original key: planet_artisans</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePlanetArtisans? PlanetArtisans { get; set; } | |
/// <summary>Original key: planet_farmers</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePlanetFarmers? PlanetFarmers { get; set; } | |
/// <summary>Original key: planet_jobs</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePlanetJobs? PlanetJobs { get; set; } | |
/// <summary>Original key: planet_metallurgists</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePlanetMetallurgists? PlanetMetallurgists { get; set; } | |
/// <summary>Original key: planet_miners</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePlanetMiners? PlanetMiners { get; set; } | |
/// <summary>Original key: planet_politicians</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePlanetPoliticians? PlanetPoliticians { get; set; } | |
/// <summary>Original key: planet_refiners</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePlanetRefiners? PlanetRefiners { get; set; } | |
/// <summary>Original key: planet_researchers</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePlanetResearchers? PlanetResearchers { get; set; } | |
/// <summary>Original key: planet_technician</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePlanetTechnician? PlanetTechnician { get; set; } | |
/// <summary>Original key: pop_factions</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomePopFactions? PopFactions { get; set; } | |
/// <summary>Original key: trade_routes</summary> | |
public GamestateCountryValueBudgetCurrentMonthIncomeTradeRoutes? TradeRoutes { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncome instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncome Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncome(); | |
if (saveObject.TryGet<SaveObject>(@"country_base", out var countryBaseObj) && countryBaseObj != null) | |
{ | |
model.CountryBase = GamestateCountryValueBudgetCurrentMonthIncomeCountryBase.Load(countryBaseObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"country_power_projection", out var countryPowerProjectionObj) && countryPowerProjectionObj != null) | |
{ | |
model.CountryPowerProjection = GamestateCountryValueBudgetCurrentMonthIncomeCountryPowerProjection.Load(countryPowerProjectionObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"diplomatic_networking", out var diplomaticNetworkingObj) && diplomaticNetworkingObj != null) | |
{ | |
model.DiplomaticNetworking = GamestateCountryValueBudgetCurrentMonthIncomeDiplomaticNetworking.Load(diplomaticNetworkingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"orbital_mining_deposits", out var orbitalMiningDepositsObj) && orbitalMiningDepositsObj != null) | |
{ | |
model.OrbitalMiningDeposits = GamestateCountryValueBudgetCurrentMonthIncomeOrbitalMiningDeposits.Load(orbitalMiningDepositsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"orbital_research_deposits", out var orbitalResearchDepositsObj) && orbitalResearchDepositsObj != null) | |
{ | |
model.OrbitalResearchDeposits = GamestateCountryValueBudgetCurrentMonthIncomeOrbitalResearchDeposits.Load(orbitalResearchDepositsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_administrators", out var planetAdministratorsObj) && planetAdministratorsObj != null) | |
{ | |
model.PlanetAdministrators = GamestateCountryValueBudgetCurrentMonthIncomePlanetAdministrators.Load(planetAdministratorsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_artisans", out var planetArtisansObj) && planetArtisansObj != null) | |
{ | |
model.PlanetArtisans = GamestateCountryValueBudgetCurrentMonthIncomePlanetArtisans.Load(planetArtisansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_farmers", out var planetFarmersObj) && planetFarmersObj != null) | |
{ | |
model.PlanetFarmers = GamestateCountryValueBudgetCurrentMonthIncomePlanetFarmers.Load(planetFarmersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_jobs", out var planetJobsObj) && planetJobsObj != null) | |
{ | |
model.PlanetJobs = GamestateCountryValueBudgetCurrentMonthIncomePlanetJobs.Load(planetJobsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_metallurgists", out var planetMetallurgistsObj) && planetMetallurgistsObj != null) | |
{ | |
model.PlanetMetallurgists = GamestateCountryValueBudgetCurrentMonthIncomePlanetMetallurgists.Load(planetMetallurgistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_miners", out var planetMinersObj) && planetMinersObj != null) | |
{ | |
model.PlanetMiners = GamestateCountryValueBudgetCurrentMonthIncomePlanetMiners.Load(planetMinersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_politicians", out var planetPoliticiansObj) && planetPoliticiansObj != null) | |
{ | |
model.PlanetPoliticians = GamestateCountryValueBudgetCurrentMonthIncomePlanetPoliticians.Load(planetPoliticiansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_refiners", out var planetRefinersObj) && planetRefinersObj != null) | |
{ | |
model.PlanetRefiners = GamestateCountryValueBudgetCurrentMonthIncomePlanetRefiners.Load(planetRefinersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_researchers", out var planetResearchersObj) && planetResearchersObj != null) | |
{ | |
model.PlanetResearchers = GamestateCountryValueBudgetCurrentMonthIncomePlanetResearchers.Load(planetResearchersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_technician", out var planetTechnicianObj) && planetTechnicianObj != null) | |
{ | |
model.PlanetTechnician = GamestateCountryValueBudgetCurrentMonthIncomePlanetTechnician.Load(planetTechnicianObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_factions", out var popFactionsObj) && popFactionsObj != null) | |
{ | |
model.PopFactions = GamestateCountryValueBudgetCurrentMonthIncomePopFactions.Load(popFactionsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_routes", out var tradeRoutesObj) && tradeRoutesObj != null) | |
{ | |
model.TradeRoutes = GamestateCountryValueBudgetCurrentMonthIncomeTradeRoutes.Load(tradeRoutesObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomeCountryBase | |
{ | |
/// <summary>Original key: alloys</summary> | |
public int Alloys { get; set; } | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: food</summary> | |
public int Food { get; set; } | |
/// <summary>Original key: influence</summary> | |
public int Influence { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public int PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public int SocietyResearch { get; set; } | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomeCountryBase instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomeCountryBase Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomeCountryBase(); | |
if (saveObject.TryGetInt(@"alloys", out int? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"food", out int? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
if (saveObject.TryGetInt(@"influence", out int? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
if (saveObject.TryGetInt(@"physics_research", out int? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"society_research", out int? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomeCountryPowerProjection | |
{ | |
/// <summary>Original key: influence</summary> | |
public float Influence { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomeCountryPowerProjection instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomeCountryPowerProjection Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomeCountryPowerProjection(); | |
if (saveObject.TryGetFloat(@"influence", out float? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomeDiplomaticNetworking | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomeDiplomaticNetworking instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomeDiplomaticNetworking Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomeDiplomaticNetworking(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomeOrbitalMiningDeposits | |
{ | |
/// <summary>Original key: alloys</summary> | |
public int Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomeOrbitalMiningDeposits instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomeOrbitalMiningDeposits Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomeOrbitalMiningDeposits(); | |
if (saveObject.TryGetInt(@"alloys", out int? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomeOrbitalResearchDeposits | |
{ | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public float PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public float SocietyResearch { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomeOrbitalResearchDeposits instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomeOrbitalResearchDeposits Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomeOrbitalResearchDeposits(); | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"physics_research", out float? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"society_research", out float? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePlanetAdministrators | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePlanetAdministrators instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePlanetAdministrators Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePlanetAdministrators(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePlanetArtisans | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePlanetArtisans instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePlanetArtisans Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePlanetArtisans(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePlanetFarmers | |
{ | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePlanetFarmers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePlanetFarmers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePlanetFarmers(); | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePlanetJobs | |
{ | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePlanetJobs instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePlanetJobs Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePlanetJobs(); | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePlanetMetallurgists | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePlanetMetallurgists instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePlanetMetallurgists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePlanetMetallurgists(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePlanetMiners | |
{ | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePlanetMiners instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePlanetMiners Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePlanetMiners(); | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePlanetPoliticians | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePlanetPoliticians instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePlanetPoliticians Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePlanetPoliticians(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePlanetRefiners | |
{ | |
/// <summary>Original key: exotic_gases</summary> | |
public float ExoticGases { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePlanetRefiners instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePlanetRefiners Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePlanetRefiners(); | |
if (saveObject.TryGetFloat(@"exotic_gases", out float? exoticGases)) | |
{ | |
model.ExoticGases = exoticGases!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePlanetResearchers | |
{ | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public int PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public int SocietyResearch { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePlanetResearchers instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePlanetResearchers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePlanetResearchers(); | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"physics_research", out int? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"society_research", out int? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePlanetTechnician | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePlanetTechnician instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePlanetTechnician Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePlanetTechnician(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomePopFactions | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomePopFactions instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomePopFactions Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomePopFactions(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthIncomeTradeRoutes | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthIncomeTradeRoutes instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthIncomeTradeRoutes Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthIncomeTradeRoutes(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthTradeBalance | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthTradeBalance instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthTradeBalance Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthTradeBalance(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthTradeExpenses | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthTradeExpenses instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthTradeExpenses Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthTradeExpenses(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetCurrentMonthTradeIncome | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetCurrentMonthTradeIncome instance.</summary> | |
public static GamestateCountryValueBudgetCurrentMonthTradeIncome Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetCurrentMonthTradeIncome(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueBudgetIncomeHighWaterMark | |
{ | |
/// <summary>Original key: current</summary> | |
public Dictionary<int, object?>? Current { get; set; } = new(); | |
/// <summary>Original key: history</summary> | |
public GamestateCountryValueBudgetIncomeHighWaterMarkHistory? History { get; set; } | |
/// <summary>Original key: length</summary> | |
public int Length { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetIncomeHighWaterMark instance.</summary> | |
public static GamestateCountryValueBudgetIncomeHighWaterMark Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetIncomeHighWaterMark(); | |
if (saveObject.TryGet<SaveObject>(@"current", out var currentDictObj) && currentDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in currentDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.Current = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"history", out var historyObj) && historyObj != null) | |
{ | |
model.History = GamestateCountryValueBudgetIncomeHighWaterMarkHistory.Load(historyObj); | |
} | |
if (saveObject.TryGetInt(@"length", out int? length)) | |
{ | |
model.Length = length!.Value; | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetIncomeHighWaterMarkHistory | |
{ | |
/// <summary>Original key: resources</summary> | |
public GamestateCountryValueBudgetIncomeHighWaterMarkHistoryResources? Resources { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetIncomeHighWaterMarkHistory instance.</summary> | |
public static GamestateCountryValueBudgetIncomeHighWaterMarkHistory Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetIncomeHighWaterMarkHistory(); | |
if (saveObject.TryGet<SaveObject>(@"resources", out var resourcesObj) && resourcesObj != null) | |
{ | |
model.Resources = GamestateCountryValueBudgetIncomeHighWaterMarkHistoryResources.Load(resourcesObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetIncomeHighWaterMarkHistoryResources | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: exotic_gases</summary> | |
public float ExoticGases { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Original key: influence</summary> | |
public float Influence { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public float PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public float SocietyResearch { get; set; } | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetIncomeHighWaterMarkHistoryResources instance.</summary> | |
public static GamestateCountryValueBudgetIncomeHighWaterMarkHistoryResources Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetIncomeHighWaterMarkHistoryResources(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"exotic_gases", out float? exoticGases)) | |
{ | |
model.ExoticGases = exoticGases!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
if (saveObject.TryGetFloat(@"influence", out float? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
if (saveObject.TryGetFloat(@"physics_research", out float? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"society_research", out float? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonth | |
{ | |
/// <summary>Original key: balance</summary> | |
public GamestateCountryValueBudgetLastMonthBalance? Balance { get; set; } | |
/// <summary>Original key: expenses</summary> | |
public GamestateCountryValueBudgetLastMonthExpenses? Expenses { get; set; } | |
/// <summary>Original key: extra_balance</summary> | |
public GamestateCountryValueBudgetLastMonthExtraBalance? ExtraBalance { get; set; } | |
/// <summary>Original key: extra_expenses</summary> | |
public GamestateCountryValueBudgetLastMonthExtraExpenses? ExtraExpenses { get; set; } | |
/// <summary>Original key: extra_income</summary> | |
public GamestateCountryValueBudgetLastMonthExtraIncome? ExtraIncome { get; set; } | |
/// <summary>Original key: income</summary> | |
public GamestateCountryValueBudgetLastMonthIncome? Income { get; set; } | |
/// <summary>Original key: trade_balance</summary> | |
public GamestateCountryValueBudgetLastMonthTradeBalance? TradeBalance { get; set; } | |
/// <summary>Original key: trade_expenses</summary> | |
public GamestateCountryValueBudgetLastMonthTradeExpenses? TradeExpenses { get; set; } | |
/// <summary>Original key: trade_income</summary> | |
public GamestateCountryValueBudgetLastMonthTradeIncome? TradeIncome { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonth instance.</summary> | |
public static GamestateCountryValueBudgetLastMonth Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonth(); | |
if (saveObject.TryGet<SaveObject>(@"balance", out var balanceObj) && balanceObj != null) | |
{ | |
model.Balance = GamestateCountryValueBudgetLastMonthBalance.Load(balanceObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"expenses", out var expensesObj) && expensesObj != null) | |
{ | |
model.Expenses = GamestateCountryValueBudgetLastMonthExpenses.Load(expensesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"extra_balance", out var extraBalanceObj) && extraBalanceObj != null) | |
{ | |
model.ExtraBalance = GamestateCountryValueBudgetLastMonthExtraBalance.Load(extraBalanceObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"extra_expenses", out var extraExpensesObj) && extraExpensesObj != null) | |
{ | |
model.ExtraExpenses = GamestateCountryValueBudgetLastMonthExtraExpenses.Load(extraExpensesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"extra_income", out var extraIncomeObj) && extraIncomeObj != null) | |
{ | |
model.ExtraIncome = GamestateCountryValueBudgetLastMonthExtraIncome.Load(extraIncomeObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"income", out var incomeObj) && incomeObj != null) | |
{ | |
model.Income = GamestateCountryValueBudgetLastMonthIncome.Load(incomeObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_balance", out var tradeBalanceObj) && tradeBalanceObj != null) | |
{ | |
model.TradeBalance = GamestateCountryValueBudgetLastMonthTradeBalance.Load(tradeBalanceObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_expenses", out var tradeExpensesObj) && tradeExpensesObj != null) | |
{ | |
model.TradeExpenses = GamestateCountryValueBudgetLastMonthTradeExpenses.Load(tradeExpensesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_income", out var tradeIncomeObj) && tradeIncomeObj != null) | |
{ | |
model.TradeIncome = GamestateCountryValueBudgetLastMonthTradeIncome.Load(tradeIncomeObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetLastMonthBalance | |
{ | |
/// <summary>Original key: country_base</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceCountryBase? CountryBase { get; set; } | |
/// <summary>Original key: country_power_projection</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceCountryPowerProjection? CountryPowerProjection { get; set; } | |
/// <summary>Original key: diplomatic_networking</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceDiplomaticNetworking? DiplomaticNetworking { get; set; } | |
/// <summary>Original key: leader_commanders</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceLeaderCommanders? LeaderCommanders { get; set; } | |
/// <summary>Original key: leader_officials</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceLeaderOfficials? LeaderOfficials { get; set; } | |
/// <summary>Original key: leader_scientists</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceLeaderScientists? LeaderScientists { get; set; } | |
/// <summary>Original key: non_aggression_pacts</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceNonAggressionPacts? NonAggressionPacts { get; set; } | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Original key: orbital_mining_deposits</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceOrbitalMiningDeposits? OrbitalMiningDeposits { get; set; } | |
/// <summary>Original key: orbital_research_deposits</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceOrbitalResearchDeposits? OrbitalResearchDeposits { get; set; } | |
/// <summary>Original key: planet_administrators</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetAdministrators? PlanetAdministrators { get; set; } | |
/// <summary>Original key: planet_artisans</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetArtisans? PlanetArtisans { get; set; } | |
/// <summary>Original key: planet_buildings</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetBuildings? PlanetBuildings { get; set; } | |
/// <summary>Original key: planet_districts_cities</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsCities? PlanetDistrictsCities { get; set; } | |
/// <summary>Original key: planet_districts_farming</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsFarming? PlanetDistrictsFarming { get; set; } | |
/// <summary>Original key: planet_districts_generator</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsGenerator? PlanetDistrictsGenerator { get; set; } | |
/// <summary>Original key: planet_districts_industrial</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsIndustrial? PlanetDistrictsIndustrial { get; set; } | |
/// <summary>Original key: planet_districts_mining</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsMining? PlanetDistrictsMining { get; set; } | |
/// <summary>Original key: planet_doctors</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetDoctors? PlanetDoctors { get; set; } | |
/// <summary>Original key: planet_farmers</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetFarmers? PlanetFarmers { get; set; } | |
/// <summary>Original key: planet_jobs</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetJobs? PlanetJobs { get; set; } | |
/// <summary>Original key: planet_metallurgists</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetMetallurgists? PlanetMetallurgists { get; set; } | |
/// <summary>Original key: planet_miners</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetMiners? PlanetMiners { get; set; } | |
/// <summary>Original key: planet_politicians</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetPoliticians? PlanetPoliticians { get; set; } | |
/// <summary>Original key: planet_refiners</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetRefiners? PlanetRefiners { get; set; } | |
/// <summary>Original key: planet_researchers</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetResearchers? PlanetResearchers { get; set; } | |
/// <summary>Original key: planet_technician</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetTechnician? PlanetTechnician { get; set; } | |
/// <summary>Original key: planet_traders</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePlanetTraders? PlanetTraders { get; set; } | |
/// <summary>Original key: pop_category_rulers</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePopCategoryRulers? PopCategoryRulers { get; set; } | |
/// <summary>Original key: pop_category_specialists</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePopCategorySpecialists? PopCategorySpecialists { get; set; } | |
/// <summary>Original key: pop_category_workers</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePopCategoryWorkers? PopCategoryWorkers { get; set; } | |
/// <summary>Original key: pop_factions</summary> | |
public GamestateCountryValueBudgetLastMonthBalancePopFactions? PopFactions { get; set; } | |
/// <summary>Original key: ship_components</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceShipComponents? ShipComponents { get; set; } | |
/// <summary>Original key: ships</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceShips? Ships { get; set; } | |
/// <summary>Original key: starbase_buildings</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceStarbaseBuildings? StarbaseBuildings { get; set; } | |
/// <summary>Original key: starbase_modules</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceStarbaseModules? StarbaseModules { get; set; } | |
/// <summary>Original key: starbase_stations</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceStarbaseStations? StarbaseStations { get; set; } | |
/// <summary>Original key: station_gatherers</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceStationGatherers? StationGatherers { get; set; } | |
/// <summary>Original key: station_researchers</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceStationResearchers? StationResearchers { get; set; } | |
/// <summary>Original key: trade_routes</summary> | |
public GamestateCountryValueBudgetLastMonthBalanceTradeRoutes? TradeRoutes { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalance instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalance Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalance(); | |
if (saveObject.TryGet<SaveObject>(@"country_base", out var countryBaseObj) && countryBaseObj != null) | |
{ | |
model.CountryBase = GamestateCountryValueBudgetLastMonthBalanceCountryBase.Load(countryBaseObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"country_power_projection", out var countryPowerProjectionObj) && countryPowerProjectionObj != null) | |
{ | |
model.CountryPowerProjection = GamestateCountryValueBudgetLastMonthBalanceCountryPowerProjection.Load(countryPowerProjectionObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"diplomatic_networking", out var diplomaticNetworkingObj) && diplomaticNetworkingObj != null) | |
{ | |
model.DiplomaticNetworking = GamestateCountryValueBudgetLastMonthBalanceDiplomaticNetworking.Load(diplomaticNetworkingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_commanders", out var leaderCommandersObj) && leaderCommandersObj != null) | |
{ | |
model.LeaderCommanders = GamestateCountryValueBudgetLastMonthBalanceLeaderCommanders.Load(leaderCommandersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_officials", out var leaderOfficialsObj) && leaderOfficialsObj != null) | |
{ | |
model.LeaderOfficials = GamestateCountryValueBudgetLastMonthBalanceLeaderOfficials.Load(leaderOfficialsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_scientists", out var leaderScientistsObj) && leaderScientistsObj != null) | |
{ | |
model.LeaderScientists = GamestateCountryValueBudgetLastMonthBalanceLeaderScientists.Load(leaderScientistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"non_aggression_pacts", out var nonAggressionPactsObj) && nonAggressionPactsObj != null) | |
{ | |
model.NonAggressionPacts = GamestateCountryValueBudgetLastMonthBalanceNonAggressionPacts.Load(nonAggressionPactsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"orbital_mining_deposits", out var orbitalMiningDepositsObj) && orbitalMiningDepositsObj != null) | |
{ | |
model.OrbitalMiningDeposits = GamestateCountryValueBudgetLastMonthBalanceOrbitalMiningDeposits.Load(orbitalMiningDepositsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"orbital_research_deposits", out var orbitalResearchDepositsObj) && orbitalResearchDepositsObj != null) | |
{ | |
model.OrbitalResearchDeposits = GamestateCountryValueBudgetLastMonthBalanceOrbitalResearchDeposits.Load(orbitalResearchDepositsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_administrators", out var planetAdministratorsObj) && planetAdministratorsObj != null) | |
{ | |
model.PlanetAdministrators = GamestateCountryValueBudgetLastMonthBalancePlanetAdministrators.Load(planetAdministratorsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_artisans", out var planetArtisansObj) && planetArtisansObj != null) | |
{ | |
model.PlanetArtisans = GamestateCountryValueBudgetLastMonthBalancePlanetArtisans.Load(planetArtisansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_buildings", out var planetBuildingsObj) && planetBuildingsObj != null) | |
{ | |
model.PlanetBuildings = GamestateCountryValueBudgetLastMonthBalancePlanetBuildings.Load(planetBuildingsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_cities", out var planetDistrictsCitiesObj) && planetDistrictsCitiesObj != null) | |
{ | |
model.PlanetDistrictsCities = GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsCities.Load(planetDistrictsCitiesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_farming", out var planetDistrictsFarmingObj) && planetDistrictsFarmingObj != null) | |
{ | |
model.PlanetDistrictsFarming = GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsFarming.Load(planetDistrictsFarmingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_generator", out var planetDistrictsGeneratorObj) && planetDistrictsGeneratorObj != null) | |
{ | |
model.PlanetDistrictsGenerator = GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsGenerator.Load(planetDistrictsGeneratorObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_industrial", out var planetDistrictsIndustrialObj) && planetDistrictsIndustrialObj != null) | |
{ | |
model.PlanetDistrictsIndustrial = GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsIndustrial.Load(planetDistrictsIndustrialObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_mining", out var planetDistrictsMiningObj) && planetDistrictsMiningObj != null) | |
{ | |
model.PlanetDistrictsMining = GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsMining.Load(planetDistrictsMiningObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_doctors", out var planetDoctorsObj) && planetDoctorsObj != null) | |
{ | |
model.PlanetDoctors = GamestateCountryValueBudgetLastMonthBalancePlanetDoctors.Load(planetDoctorsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_farmers", out var planetFarmersObj) && planetFarmersObj != null) | |
{ | |
model.PlanetFarmers = GamestateCountryValueBudgetLastMonthBalancePlanetFarmers.Load(planetFarmersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_jobs", out var planetJobsObj) && planetJobsObj != null) | |
{ | |
model.PlanetJobs = GamestateCountryValueBudgetLastMonthBalancePlanetJobs.Load(planetJobsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_metallurgists", out var planetMetallurgistsObj) && planetMetallurgistsObj != null) | |
{ | |
model.PlanetMetallurgists = GamestateCountryValueBudgetLastMonthBalancePlanetMetallurgists.Load(planetMetallurgistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_miners", out var planetMinersObj) && planetMinersObj != null) | |
{ | |
model.PlanetMiners = GamestateCountryValueBudgetLastMonthBalancePlanetMiners.Load(planetMinersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_politicians", out var planetPoliticiansObj) && planetPoliticiansObj != null) | |
{ | |
model.PlanetPoliticians = GamestateCountryValueBudgetLastMonthBalancePlanetPoliticians.Load(planetPoliticiansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_refiners", out var planetRefinersObj) && planetRefinersObj != null) | |
{ | |
model.PlanetRefiners = GamestateCountryValueBudgetLastMonthBalancePlanetRefiners.Load(planetRefinersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_researchers", out var planetResearchersObj) && planetResearchersObj != null) | |
{ | |
model.PlanetResearchers = GamestateCountryValueBudgetLastMonthBalancePlanetResearchers.Load(planetResearchersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_technician", out var planetTechnicianObj) && planetTechnicianObj != null) | |
{ | |
model.PlanetTechnician = GamestateCountryValueBudgetLastMonthBalancePlanetTechnician.Load(planetTechnicianObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_traders", out var planetTradersObj) && planetTradersObj != null) | |
{ | |
model.PlanetTraders = GamestateCountryValueBudgetLastMonthBalancePlanetTraders.Load(planetTradersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_rulers", out var popCategoryRulersObj) && popCategoryRulersObj != null) | |
{ | |
model.PopCategoryRulers = GamestateCountryValueBudgetLastMonthBalancePopCategoryRulers.Load(popCategoryRulersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_specialists", out var popCategorySpecialistsObj) && popCategorySpecialistsObj != null) | |
{ | |
model.PopCategorySpecialists = GamestateCountryValueBudgetLastMonthBalancePopCategorySpecialists.Load(popCategorySpecialistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_workers", out var popCategoryWorkersObj) && popCategoryWorkersObj != null) | |
{ | |
model.PopCategoryWorkers = GamestateCountryValueBudgetLastMonthBalancePopCategoryWorkers.Load(popCategoryWorkersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_factions", out var popFactionsObj) && popFactionsObj != null) | |
{ | |
model.PopFactions = GamestateCountryValueBudgetLastMonthBalancePopFactions.Load(popFactionsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ship_components", out var shipComponentsObj) && shipComponentsObj != null) | |
{ | |
model.ShipComponents = GamestateCountryValueBudgetLastMonthBalanceShipComponents.Load(shipComponentsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ships", out var shipsObj) && shipsObj != null) | |
{ | |
model.Ships = GamestateCountryValueBudgetLastMonthBalanceShips.Load(shipsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_buildings", out var starbaseBuildingsObj) && starbaseBuildingsObj != null) | |
{ | |
model.StarbaseBuildings = GamestateCountryValueBudgetLastMonthBalanceStarbaseBuildings.Load(starbaseBuildingsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_modules", out var starbaseModulesObj) && starbaseModulesObj != null) | |
{ | |
model.StarbaseModules = GamestateCountryValueBudgetLastMonthBalanceStarbaseModules.Load(starbaseModulesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_stations", out var starbaseStationsObj) && starbaseStationsObj != null) | |
{ | |
model.StarbaseStations = GamestateCountryValueBudgetLastMonthBalanceStarbaseStations.Load(starbaseStationsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"station_gatherers", out var stationGatherersObj) && stationGatherersObj != null) | |
{ | |
model.StationGatherers = GamestateCountryValueBudgetLastMonthBalanceStationGatherers.Load(stationGatherersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"station_researchers", out var stationResearchersObj) && stationResearchersObj != null) | |
{ | |
model.StationResearchers = GamestateCountryValueBudgetLastMonthBalanceStationResearchers.Load(stationResearchersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_routes", out var tradeRoutesObj) && tradeRoutesObj != null) | |
{ | |
model.TradeRoutes = GamestateCountryValueBudgetLastMonthBalanceTradeRoutes.Load(tradeRoutesObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceCountryBase | |
{ | |
/// <summary>Original key: alloys</summary> | |
public int Alloys { get; set; } | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: food</summary> | |
public int Food { get; set; } | |
/// <summary>Original key: influence</summary> | |
public int Influence { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public int PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public int SocietyResearch { get; set; } | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceCountryBase instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceCountryBase Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceCountryBase(); | |
if (saveObject.TryGetInt(@"alloys", out int? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"food", out int? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
if (saveObject.TryGetInt(@"influence", out int? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
if (saveObject.TryGetInt(@"physics_research", out int? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"society_research", out int? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceCountryPowerProjection | |
{ | |
/// <summary>Original key: influence</summary> | |
public float Influence { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceCountryPowerProjection instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceCountryPowerProjection Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceCountryPowerProjection(); | |
if (saveObject.TryGetFloat(@"influence", out float? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceDiplomaticNetworking | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceDiplomaticNetworking instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceDiplomaticNetworking Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceDiplomaticNetworking(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceLeaderCommanders | |
{ | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceLeaderCommanders instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceLeaderCommanders Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceLeaderCommanders(); | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceLeaderOfficials | |
{ | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceLeaderOfficials instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceLeaderOfficials Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceLeaderOfficials(); | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceLeaderScientists | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceLeaderScientists instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceLeaderScientists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceLeaderScientists(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceNonAggressionPacts | |
{ | |
/// <summary>Original key: influence</summary> | |
public float Influence { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceNonAggressionPacts instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceNonAggressionPacts Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceNonAggressionPacts(); | |
if (saveObject.TryGetFloat(@"influence", out float? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceOrbitalMiningDeposits | |
{ | |
/// <summary>Original key: alloys</summary> | |
public int Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceOrbitalMiningDeposits instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceOrbitalMiningDeposits Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceOrbitalMiningDeposits(); | |
if (saveObject.TryGetInt(@"alloys", out int? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceOrbitalResearchDeposits | |
{ | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public float PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public float SocietyResearch { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceOrbitalResearchDeposits instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceOrbitalResearchDeposits Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceOrbitalResearchDeposits(); | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"physics_research", out float? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"society_research", out float? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetAdministrators | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetAdministrators instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetAdministrators Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetAdministrators(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetArtisans | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetArtisans instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetArtisans Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetArtisans(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetBuildings | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetBuildings instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetBuildings Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetBuildings(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsCities | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsCities instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsCities Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsCities(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsFarming | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsFarming instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsFarming Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsFarming(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsGenerator | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsGenerator instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsGenerator Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsGenerator(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsIndustrial | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsIndustrial instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsIndustrial Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsIndustrial(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsMining | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsMining instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsMining Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetDistrictsMining(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetDoctors | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetDoctors instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetDoctors Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetDoctors(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetFarmers | |
{ | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetFarmers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetFarmers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetFarmers(); | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetJobs | |
{ | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetJobs instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetJobs Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetJobs(); | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetMetallurgists | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetMetallurgists instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetMetallurgists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetMetallurgists(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetMiners | |
{ | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetMiners instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetMiners Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetMiners(); | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetPoliticians | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetPoliticians instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetPoliticians Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetPoliticians(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetRefiners | |
{ | |
/// <summary>Original key: exotic_gases</summary> | |
public float ExoticGases { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetRefiners instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetRefiners Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetRefiners(); | |
if (saveObject.TryGetFloat(@"exotic_gases", out float? exoticGases)) | |
{ | |
model.ExoticGases = exoticGases!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetResearchers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public int PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public int SocietyResearch { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetResearchers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetResearchers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetResearchers(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"physics_research", out int? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"society_research", out int? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetTechnician | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetTechnician instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetTechnician Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetTechnician(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePlanetTraders | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePlanetTraders instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePlanetTraders Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePlanetTraders(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePopCategoryRulers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePopCategoryRulers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePopCategoryRulers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePopCategoryRulers(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePopCategorySpecialists | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePopCategorySpecialists instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePopCategorySpecialists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePopCategorySpecialists(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePopCategoryWorkers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePopCategoryWorkers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePopCategoryWorkers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePopCategoryWorkers(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalancePopFactions | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalancePopFactions instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalancePopFactions Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalancePopFactions(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceShipComponents | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceShipComponents instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceShipComponents Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceShipComponents(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceShips | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceShips instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceShips Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceShips(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceStarbaseBuildings | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceStarbaseBuildings instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceStarbaseBuildings Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceStarbaseBuildings(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceStarbaseModules | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceStarbaseModules instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceStarbaseModules Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceStarbaseModules(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceStarbaseStations | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceStarbaseStations instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceStarbaseStations Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceStarbaseStations(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceStationGatherers | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceStationGatherers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceStationGatherers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceStationGatherers(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceStationResearchers | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceStationResearchers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceStationResearchers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceStationResearchers(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthBalanceTradeRoutes | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthBalanceTradeRoutes instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthBalanceTradeRoutes Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthBalanceTradeRoutes(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpenses | |
{ | |
/// <summary>Original key: leader_commanders</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesLeaderCommanders? LeaderCommanders { get; set; } | |
/// <summary>Original key: leader_officials</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesLeaderOfficials? LeaderOfficials { get; set; } | |
/// <summary>Original key: leader_scientists</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesLeaderScientists? LeaderScientists { get; set; } | |
/// <summary>Original key: non_aggression_pacts</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesNonAggressionPacts? NonAggressionPacts { get; set; } | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Original key: planet_administrators</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetAdministrators? PlanetAdministrators { get; set; } | |
/// <summary>Original key: planet_artisans</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetArtisans? PlanetArtisans { get; set; } | |
/// <summary>Original key: planet_buildings</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetBuildings? PlanetBuildings { get; set; } | |
/// <summary>Original key: planet_districts_cities</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsCities? PlanetDistrictsCities { get; set; } | |
/// <summary>Original key: planet_districts_farming</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsFarming? PlanetDistrictsFarming { get; set; } | |
/// <summary>Original key: planet_districts_generator</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsGenerator? PlanetDistrictsGenerator { get; set; } | |
/// <summary>Original key: planet_districts_industrial</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsIndustrial? PlanetDistrictsIndustrial { get; set; } | |
/// <summary>Original key: planet_districts_mining</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsMining? PlanetDistrictsMining { get; set; } | |
/// <summary>Original key: planet_doctors</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetDoctors? PlanetDoctors { get; set; } | |
/// <summary>Original key: planet_metallurgists</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetMetallurgists? PlanetMetallurgists { get; set; } | |
/// <summary>Original key: planet_politicians</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetPoliticians? PlanetPoliticians { get; set; } | |
/// <summary>Original key: planet_refiners</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetRefiners? PlanetRefiners { get; set; } | |
/// <summary>Original key: planet_researchers</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetResearchers? PlanetResearchers { get; set; } | |
/// <summary>Original key: planet_traders</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPlanetTraders? PlanetTraders { get; set; } | |
/// <summary>Original key: pop_category_rulers</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPopCategoryRulers? PopCategoryRulers { get; set; } | |
/// <summary>Original key: pop_category_specialists</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPopCategorySpecialists? PopCategorySpecialists { get; set; } | |
/// <summary>Original key: pop_category_workers</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesPopCategoryWorkers? PopCategoryWorkers { get; set; } | |
/// <summary>Original key: ship_components</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesShipComponents? ShipComponents { get; set; } | |
/// <summary>Original key: ships</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesShips? Ships { get; set; } | |
/// <summary>Original key: starbase_buildings</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesStarbaseBuildings? StarbaseBuildings { get; set; } | |
/// <summary>Original key: starbase_modules</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesStarbaseModules? StarbaseModules { get; set; } | |
/// <summary>Original key: starbase_stations</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesStarbaseStations? StarbaseStations { get; set; } | |
/// <summary>Original key: station_gatherers</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesStationGatherers? StationGatherers { get; set; } | |
/// <summary>Original key: station_researchers</summary> | |
public GamestateCountryValueBudgetLastMonthExpensesStationResearchers? StationResearchers { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpenses instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpenses Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpenses(); | |
if (saveObject.TryGet<SaveObject>(@"leader_commanders", out var leaderCommandersObj) && leaderCommandersObj != null) | |
{ | |
model.LeaderCommanders = GamestateCountryValueBudgetLastMonthExpensesLeaderCommanders.Load(leaderCommandersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_officials", out var leaderOfficialsObj) && leaderOfficialsObj != null) | |
{ | |
model.LeaderOfficials = GamestateCountryValueBudgetLastMonthExpensesLeaderOfficials.Load(leaderOfficialsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_scientists", out var leaderScientistsObj) && leaderScientistsObj != null) | |
{ | |
model.LeaderScientists = GamestateCountryValueBudgetLastMonthExpensesLeaderScientists.Load(leaderScientistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"non_aggression_pacts", out var nonAggressionPactsObj) && nonAggressionPactsObj != null) | |
{ | |
model.NonAggressionPacts = GamestateCountryValueBudgetLastMonthExpensesNonAggressionPacts.Load(nonAggressionPactsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_administrators", out var planetAdministratorsObj) && planetAdministratorsObj != null) | |
{ | |
model.PlanetAdministrators = GamestateCountryValueBudgetLastMonthExpensesPlanetAdministrators.Load(planetAdministratorsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_artisans", out var planetArtisansObj) && planetArtisansObj != null) | |
{ | |
model.PlanetArtisans = GamestateCountryValueBudgetLastMonthExpensesPlanetArtisans.Load(planetArtisansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_buildings", out var planetBuildingsObj) && planetBuildingsObj != null) | |
{ | |
model.PlanetBuildings = GamestateCountryValueBudgetLastMonthExpensesPlanetBuildings.Load(planetBuildingsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_cities", out var planetDistrictsCitiesObj) && planetDistrictsCitiesObj != null) | |
{ | |
model.PlanetDistrictsCities = GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsCities.Load(planetDistrictsCitiesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_farming", out var planetDistrictsFarmingObj) && planetDistrictsFarmingObj != null) | |
{ | |
model.PlanetDistrictsFarming = GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsFarming.Load(planetDistrictsFarmingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_generator", out var planetDistrictsGeneratorObj) && planetDistrictsGeneratorObj != null) | |
{ | |
model.PlanetDistrictsGenerator = GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsGenerator.Load(planetDistrictsGeneratorObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_industrial", out var planetDistrictsIndustrialObj) && planetDistrictsIndustrialObj != null) | |
{ | |
model.PlanetDistrictsIndustrial = GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsIndustrial.Load(planetDistrictsIndustrialObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_districts_mining", out var planetDistrictsMiningObj) && planetDistrictsMiningObj != null) | |
{ | |
model.PlanetDistrictsMining = GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsMining.Load(planetDistrictsMiningObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_doctors", out var planetDoctorsObj) && planetDoctorsObj != null) | |
{ | |
model.PlanetDoctors = GamestateCountryValueBudgetLastMonthExpensesPlanetDoctors.Load(planetDoctorsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_metallurgists", out var planetMetallurgistsObj) && planetMetallurgistsObj != null) | |
{ | |
model.PlanetMetallurgists = GamestateCountryValueBudgetLastMonthExpensesPlanetMetallurgists.Load(planetMetallurgistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_politicians", out var planetPoliticiansObj) && planetPoliticiansObj != null) | |
{ | |
model.PlanetPoliticians = GamestateCountryValueBudgetLastMonthExpensesPlanetPoliticians.Load(planetPoliticiansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_refiners", out var planetRefinersObj) && planetRefinersObj != null) | |
{ | |
model.PlanetRefiners = GamestateCountryValueBudgetLastMonthExpensesPlanetRefiners.Load(planetRefinersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_researchers", out var planetResearchersObj) && planetResearchersObj != null) | |
{ | |
model.PlanetResearchers = GamestateCountryValueBudgetLastMonthExpensesPlanetResearchers.Load(planetResearchersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_traders", out var planetTradersObj) && planetTradersObj != null) | |
{ | |
model.PlanetTraders = GamestateCountryValueBudgetLastMonthExpensesPlanetTraders.Load(planetTradersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_rulers", out var popCategoryRulersObj) && popCategoryRulersObj != null) | |
{ | |
model.PopCategoryRulers = GamestateCountryValueBudgetLastMonthExpensesPopCategoryRulers.Load(popCategoryRulersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_specialists", out var popCategorySpecialistsObj) && popCategorySpecialistsObj != null) | |
{ | |
model.PopCategorySpecialists = GamestateCountryValueBudgetLastMonthExpensesPopCategorySpecialists.Load(popCategorySpecialistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_category_workers", out var popCategoryWorkersObj) && popCategoryWorkersObj != null) | |
{ | |
model.PopCategoryWorkers = GamestateCountryValueBudgetLastMonthExpensesPopCategoryWorkers.Load(popCategoryWorkersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ship_components", out var shipComponentsObj) && shipComponentsObj != null) | |
{ | |
model.ShipComponents = GamestateCountryValueBudgetLastMonthExpensesShipComponents.Load(shipComponentsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"ships", out var shipsObj) && shipsObj != null) | |
{ | |
model.Ships = GamestateCountryValueBudgetLastMonthExpensesShips.Load(shipsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_buildings", out var starbaseBuildingsObj) && starbaseBuildingsObj != null) | |
{ | |
model.StarbaseBuildings = GamestateCountryValueBudgetLastMonthExpensesStarbaseBuildings.Load(starbaseBuildingsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_modules", out var starbaseModulesObj) && starbaseModulesObj != null) | |
{ | |
model.StarbaseModules = GamestateCountryValueBudgetLastMonthExpensesStarbaseModules.Load(starbaseModulesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"starbase_stations", out var starbaseStationsObj) && starbaseStationsObj != null) | |
{ | |
model.StarbaseStations = GamestateCountryValueBudgetLastMonthExpensesStarbaseStations.Load(starbaseStationsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"station_gatherers", out var stationGatherersObj) && stationGatherersObj != null) | |
{ | |
model.StationGatherers = GamestateCountryValueBudgetLastMonthExpensesStationGatherers.Load(stationGatherersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"station_researchers", out var stationResearchersObj) && stationResearchersObj != null) | |
{ | |
model.StationResearchers = GamestateCountryValueBudgetLastMonthExpensesStationResearchers.Load(stationResearchersObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesLeaderCommanders | |
{ | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesLeaderCommanders instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesLeaderCommanders Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesLeaderCommanders(); | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesLeaderOfficials | |
{ | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesLeaderOfficials instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesLeaderOfficials Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesLeaderOfficials(); | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesLeaderScientists | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: unity</summary> | |
public int Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesLeaderScientists instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesLeaderScientists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesLeaderScientists(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"unity", out int? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesNonAggressionPacts | |
{ | |
/// <summary>Original key: influence</summary> | |
public float Influence { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesNonAggressionPacts instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesNonAggressionPacts Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesNonAggressionPacts(); | |
if (saveObject.TryGetFloat(@"influence", out float? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetAdministrators | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetAdministrators instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetAdministrators Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetAdministrators(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetArtisans | |
{ | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetArtisans instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetArtisans Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetArtisans(); | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetBuildings | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetBuildings instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetBuildings Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetBuildings(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsCities | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsCities instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsCities Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsCities(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsFarming | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsFarming instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsFarming Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsFarming(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsGenerator | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsGenerator instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsGenerator Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsGenerator(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsIndustrial | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsIndustrial instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsIndustrial Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsIndustrial(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsMining | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsMining instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsMining Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetDistrictsMining(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetDoctors | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetDoctors instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetDoctors Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetDoctors(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetMetallurgists | |
{ | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetMetallurgists instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetMetallurgists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetMetallurgists(); | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetPoliticians | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetPoliticians instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetPoliticians Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetPoliticians(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetRefiners | |
{ | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetRefiners instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetRefiners Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetRefiners(); | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetResearchers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetResearchers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetResearchers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetResearchers(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPlanetTraders | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPlanetTraders instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPlanetTraders Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPlanetTraders(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPopCategoryRulers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPopCategoryRulers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPopCategoryRulers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPopCategoryRulers(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPopCategorySpecialists | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPopCategorySpecialists instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPopCategorySpecialists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPopCategorySpecialists(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesPopCategoryWorkers | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesPopCategoryWorkers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesPopCategoryWorkers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesPopCategoryWorkers(); | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesShipComponents | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesShipComponents instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesShipComponents Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesShipComponents(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesShips | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesShips instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesShips Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesShips(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesStarbaseBuildings | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesStarbaseBuildings instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesStarbaseBuildings Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesStarbaseBuildings(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesStarbaseModules | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesStarbaseModules instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesStarbaseModules Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesStarbaseModules(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesStarbaseStations | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesStarbaseStations instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesStarbaseStations Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesStarbaseStations(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesStationGatherers | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesStationGatherers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesStationGatherers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesStationGatherers(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExpensesStationResearchers | |
{ | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExpensesStationResearchers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExpensesStationResearchers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExpensesStationResearchers(); | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExtraBalance | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExtraBalance instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExtraBalance Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExtraBalance(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExtraExpenses | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExtraExpenses instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExtraExpenses Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExtraExpenses(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthExtraIncome | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthExtraIncome instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthExtraIncome Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthExtraIncome(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncome | |
{ | |
/// <summary>Original key: country_base</summary> | |
public GamestateCountryValueBudgetLastMonthIncomeCountryBase? CountryBase { get; set; } | |
/// <summary>Original key: country_power_projection</summary> | |
public GamestateCountryValueBudgetLastMonthIncomeCountryPowerProjection? CountryPowerProjection { get; set; } | |
/// <summary>Original key: diplomatic_networking</summary> | |
public GamestateCountryValueBudgetLastMonthIncomeDiplomaticNetworking? DiplomaticNetworking { get; set; } | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Original key: orbital_mining_deposits</summary> | |
public GamestateCountryValueBudgetLastMonthIncomeOrbitalMiningDeposits? OrbitalMiningDeposits { get; set; } | |
/// <summary>Original key: orbital_research_deposits</summary> | |
public GamestateCountryValueBudgetLastMonthIncomeOrbitalResearchDeposits? OrbitalResearchDeposits { get; set; } | |
/// <summary>Original key: planet_administrators</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePlanetAdministrators? PlanetAdministrators { get; set; } | |
/// <summary>Original key: planet_artisans</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePlanetArtisans? PlanetArtisans { get; set; } | |
/// <summary>Original key: planet_farmers</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePlanetFarmers? PlanetFarmers { get; set; } | |
/// <summary>Original key: planet_jobs</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePlanetJobs? PlanetJobs { get; set; } | |
/// <summary>Original key: planet_metallurgists</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePlanetMetallurgists? PlanetMetallurgists { get; set; } | |
/// <summary>Original key: planet_miners</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePlanetMiners? PlanetMiners { get; set; } | |
/// <summary>Original key: planet_politicians</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePlanetPoliticians? PlanetPoliticians { get; set; } | |
/// <summary>Original key: planet_refiners</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePlanetRefiners? PlanetRefiners { get; set; } | |
/// <summary>Original key: planet_researchers</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePlanetResearchers? PlanetResearchers { get; set; } | |
/// <summary>Original key: planet_technician</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePlanetTechnician? PlanetTechnician { get; set; } | |
/// <summary>Original key: pop_factions</summary> | |
public GamestateCountryValueBudgetLastMonthIncomePopFactions? PopFactions { get; set; } | |
/// <summary>Original key: trade_routes</summary> | |
public GamestateCountryValueBudgetLastMonthIncomeTradeRoutes? TradeRoutes { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncome instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncome Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncome(); | |
if (saveObject.TryGet<SaveObject>(@"country_base", out var countryBaseObj) && countryBaseObj != null) | |
{ | |
model.CountryBase = GamestateCountryValueBudgetLastMonthIncomeCountryBase.Load(countryBaseObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"country_power_projection", out var countryPowerProjectionObj) && countryPowerProjectionObj != null) | |
{ | |
model.CountryPowerProjection = GamestateCountryValueBudgetLastMonthIncomeCountryPowerProjection.Load(countryPowerProjectionObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"diplomatic_networking", out var diplomaticNetworkingObj) && diplomaticNetworkingObj != null) | |
{ | |
model.DiplomaticNetworking = GamestateCountryValueBudgetLastMonthIncomeDiplomaticNetworking.Load(diplomaticNetworkingObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"orbital_mining_deposits", out var orbitalMiningDepositsObj) && orbitalMiningDepositsObj != null) | |
{ | |
model.OrbitalMiningDeposits = GamestateCountryValueBudgetLastMonthIncomeOrbitalMiningDeposits.Load(orbitalMiningDepositsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"orbital_research_deposits", out var orbitalResearchDepositsObj) && orbitalResearchDepositsObj != null) | |
{ | |
model.OrbitalResearchDeposits = GamestateCountryValueBudgetLastMonthIncomeOrbitalResearchDeposits.Load(orbitalResearchDepositsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_administrators", out var planetAdministratorsObj) && planetAdministratorsObj != null) | |
{ | |
model.PlanetAdministrators = GamestateCountryValueBudgetLastMonthIncomePlanetAdministrators.Load(planetAdministratorsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_artisans", out var planetArtisansObj) && planetArtisansObj != null) | |
{ | |
model.PlanetArtisans = GamestateCountryValueBudgetLastMonthIncomePlanetArtisans.Load(planetArtisansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_farmers", out var planetFarmersObj) && planetFarmersObj != null) | |
{ | |
model.PlanetFarmers = GamestateCountryValueBudgetLastMonthIncomePlanetFarmers.Load(planetFarmersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_jobs", out var planetJobsObj) && planetJobsObj != null) | |
{ | |
model.PlanetJobs = GamestateCountryValueBudgetLastMonthIncomePlanetJobs.Load(planetJobsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_metallurgists", out var planetMetallurgistsObj) && planetMetallurgistsObj != null) | |
{ | |
model.PlanetMetallurgists = GamestateCountryValueBudgetLastMonthIncomePlanetMetallurgists.Load(planetMetallurgistsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_miners", out var planetMinersObj) && planetMinersObj != null) | |
{ | |
model.PlanetMiners = GamestateCountryValueBudgetLastMonthIncomePlanetMiners.Load(planetMinersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_politicians", out var planetPoliticiansObj) && planetPoliticiansObj != null) | |
{ | |
model.PlanetPoliticians = GamestateCountryValueBudgetLastMonthIncomePlanetPoliticians.Load(planetPoliticiansObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_refiners", out var planetRefinersObj) && planetRefinersObj != null) | |
{ | |
model.PlanetRefiners = GamestateCountryValueBudgetLastMonthIncomePlanetRefiners.Load(planetRefinersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_researchers", out var planetResearchersObj) && planetResearchersObj != null) | |
{ | |
model.PlanetResearchers = GamestateCountryValueBudgetLastMonthIncomePlanetResearchers.Load(planetResearchersObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"planet_technician", out var planetTechnicianObj) && planetTechnicianObj != null) | |
{ | |
model.PlanetTechnician = GamestateCountryValueBudgetLastMonthIncomePlanetTechnician.Load(planetTechnicianObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"pop_factions", out var popFactionsObj) && popFactionsObj != null) | |
{ | |
model.PopFactions = GamestateCountryValueBudgetLastMonthIncomePopFactions.Load(popFactionsObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"trade_routes", out var tradeRoutesObj) && tradeRoutesObj != null) | |
{ | |
model.TradeRoutes = GamestateCountryValueBudgetLastMonthIncomeTradeRoutes.Load(tradeRoutesObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomeCountryBase | |
{ | |
/// <summary>Original key: alloys</summary> | |
public int Alloys { get; set; } | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: food</summary> | |
public int Food { get; set; } | |
/// <summary>Original key: influence</summary> | |
public int Influence { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public int PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public int SocietyResearch { get; set; } | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomeCountryBase instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomeCountryBase Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomeCountryBase(); | |
if (saveObject.TryGetInt(@"alloys", out int? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"food", out int? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
if (saveObject.TryGetInt(@"influence", out int? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
if (saveObject.TryGetInt(@"physics_research", out int? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"society_research", out int? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomeCountryPowerProjection | |
{ | |
/// <summary>Original key: influence</summary> | |
public float Influence { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomeCountryPowerProjection instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomeCountryPowerProjection Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomeCountryPowerProjection(); | |
if (saveObject.TryGetFloat(@"influence", out float? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomeDiplomaticNetworking | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomeDiplomaticNetworking instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomeDiplomaticNetworking Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomeDiplomaticNetworking(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomeOrbitalMiningDeposits | |
{ | |
/// <summary>Original key: alloys</summary> | |
public int Alloys { get; set; } | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomeOrbitalMiningDeposits instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomeOrbitalMiningDeposits Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomeOrbitalMiningDeposits(); | |
if (saveObject.TryGetInt(@"alloys", out int? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomeOrbitalResearchDeposits | |
{ | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public float PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public float SocietyResearch { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomeOrbitalResearchDeposits instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomeOrbitalResearchDeposits Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomeOrbitalResearchDeposits(); | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"physics_research", out float? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"society_research", out float? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePlanetAdministrators | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePlanetAdministrators instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePlanetAdministrators Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePlanetAdministrators(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePlanetArtisans | |
{ | |
/// <summary>Original key: consumer_goods</summary> | |
public int ConsumerGoods { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePlanetArtisans instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePlanetArtisans Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePlanetArtisans(); | |
if (saveObject.TryGetInt(@"consumer_goods", out int? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePlanetFarmers | |
{ | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePlanetFarmers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePlanetFarmers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePlanetFarmers(); | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePlanetJobs | |
{ | |
/// <summary>Original key: food</summary> | |
public float Food { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePlanetJobs instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePlanetJobs Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePlanetJobs(); | |
if (saveObject.TryGetFloat(@"food", out float? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePlanetMetallurgists | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePlanetMetallurgists instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePlanetMetallurgists Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePlanetMetallurgists(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePlanetMiners | |
{ | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePlanetMiners instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePlanetMiners Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePlanetMiners(); | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePlanetPoliticians | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePlanetPoliticians instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePlanetPoliticians Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePlanetPoliticians(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePlanetRefiners | |
{ | |
/// <summary>Original key: exotic_gases</summary> | |
public float ExoticGases { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePlanetRefiners instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePlanetRefiners Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePlanetRefiners(); | |
if (saveObject.TryGetFloat(@"exotic_gases", out float? exoticGases)) | |
{ | |
model.ExoticGases = exoticGases!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePlanetResearchers | |
{ | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public int PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public int SocietyResearch { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePlanetResearchers instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePlanetResearchers Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePlanetResearchers(); | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"physics_research", out int? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetInt(@"society_research", out int? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePlanetTechnician | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePlanetTechnician instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePlanetTechnician Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePlanetTechnician(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomePopFactions | |
{ | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomePopFactions instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomePopFactions Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomePopFactions(); | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthIncomeTradeRoutes | |
{ | |
/// <summary>Original key: energy</summary> | |
public float Energy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthIncomeTradeRoutes instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthIncomeTradeRoutes Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthIncomeTradeRoutes(); | |
if (saveObject.TryGetFloat(@"energy", out float? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthTradeBalance | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthTradeBalance instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthTradeBalance Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthTradeBalance(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthTradeExpenses | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthTradeExpenses instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthTradeExpenses Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthTradeExpenses(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueBudgetLastMonthTradeIncome | |
{ | |
/// <summary>Original key: none</summary> | |
public Dictionary<int, object?>? None { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueBudgetLastMonthTradeIncome instance.</summary> | |
public static GamestateCountryValueBudgetLastMonthTradeIncome Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueBudgetLastMonthTradeIncome(); | |
if (saveObject.TryGet<SaveObject>(@"none", out var noneDictObj) && noneDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in noneDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.None = dictBuilder; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueDetectionIntelItem | |
{ | |
/// <summary>Original key: intel</summary> | |
public List<GamestateCountryValueDetectionIntelItemIntelItem>? Intel { get; set; } = new(); | |
/// <summary>Original key: star</summary> | |
public int Star { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueDetectionIntelItem instance.</summary> | |
public static GamestateCountryValueDetectionIntelItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueDetectionIntelItem(); | |
if (saveObject.TryGet<SaveArray>(@"intel", out var intelArr) && intelArr != null) | |
{ | |
model.Intel = intelArr.Items.OfType<SaveObject>().Select(GamestateCountryValueDetectionIntelItemIntelItem.Load).ToList(); | |
} | |
if (saveObject.TryGetInt(@"star", out int? star)) | |
{ | |
model.Star = star!.Value; | |
} | |
return model; | |
} | |
public class GamestateCountryValueDetectionIntelItemIntelItem | |
{ | |
/// <summary>Original key: country</summary> | |
public int Country { get; set; } | |
/// <summary>Original key: strength</summary> | |
public int Strength { get; set; } | |
/// <summary>Original key: timestamp</summary> | |
public DateTime Timestamp { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueDetectionIntelItemIntelItem instance.</summary> | |
public static GamestateCountryValueDetectionIntelItemIntelItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueDetectionIntelItemIntelItem(); | |
if (saveObject.TryGetInt(@"country", out int? country)) | |
{ | |
model.Country = country!.Value; | |
} | |
if (saveObject.TryGetInt(@"strength", out int? strength)) | |
{ | |
model.Strength = strength!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"timestamp", out DateTime? timestamp)) | |
{ | |
model.Timestamp = timestamp!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueEdictsItem | |
{ | |
/// <summary>Original key: date</summary> | |
public string? Date { get; set; } | |
/// <summary>Original key: edict</summary> | |
public string? Edict { get; set; } | |
/// <summary>Original key: perpetual</summary> | |
public bool Perpetual { get; set; } | |
/// <summary>Original key: start_date</summary> | |
public DateTime StartDate { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEdictsItem instance.</summary> | |
public static GamestateCountryValueEdictsItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEdictsItem(); | |
if (saveObject.TryGetString(@"date", out string? date)) | |
{ | |
model.Date = date; | |
} | |
if (saveObject.TryGetString(@"edict", out string? edict)) | |
{ | |
model.Edict = edict; | |
} | |
if (saveObject.TryGetBool(@"perpetual", out bool? perpetual)) | |
{ | |
model.Perpetual = perpetual!.Value; | |
} | |
if (saveObject.TryGetDateTime(@"start_date", out DateTime? startDate)) | |
{ | |
model.StartDate = startDate!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueEspionageManager | |
{ | |
/// <summary>Original key: spy_networks</summary> | |
public List<int>? SpyNetworks { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEspionageManager instance.</summary> | |
public static GamestateCountryValueEspionageManager Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEspionageManager(); | |
if (saveObject.TryGet<SaveArray>(@"spy_networks", out var spyNetworksArr) && spyNetworksArr != null) | |
{ | |
model.SpyNetworks = spyNetworksArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueEthos | |
{ | |
/// <summary>Original key: ethic</summary> | |
public string? Ethic { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEthos instance.</summary> | |
public static GamestateCountryValueEthos Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEthos(); | |
if (saveObject.TryGetString(@"ethic", out string? ethic)) | |
{ | |
model.Ethic = ethic; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueEvents | |
{ | |
/// <summary>Original key: anomalies</summary> | |
public List<int>? Anomalies { get; set; } = new(); | |
/// <summary>Original key: completed_event_chain</summary> | |
public string? CompletedEventChain { get; set; } | |
/// <summary>Original key: event_chain</summary> | |
public GamestateCountryValueEventsEventChain? EventChain { get; set; } | |
/// <summary>Original key: next_special_project_id</summary> | |
public int NextSpecialProjectId { get; set; } | |
/// <summary>Original key: poi</summary> | |
public List<GamestateCountryValueEventsPoiItem>? Poi { get; set; } = new(); | |
/// <summary>Original key: special_project</summary> | |
public GamestateCountryValueEventsSpecialProject? SpecialProject { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEvents instance.</summary> | |
public static GamestateCountryValueEvents Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEvents(); | |
if (saveObject.TryGet<SaveArray>(@"anomalies", out var anomaliesArr) && anomaliesArr != null) | |
{ | |
model.Anomalies = anomaliesArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetString(@"completed_event_chain", out string? completedEventChain)) | |
{ | |
model.CompletedEventChain = completedEventChain; | |
} | |
if (saveObject.TryGet<SaveObject>(@"event_chain", out var eventChainObj) && eventChainObj != null) | |
{ | |
model.EventChain = GamestateCountryValueEventsEventChain.Load(eventChainObj); | |
} | |
if (saveObject.TryGetInt(@"next_special_project_id", out int? nextSpecialProjectId)) | |
{ | |
model.NextSpecialProjectId = nextSpecialProjectId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"poi", out var poiArr) && poiArr != null) | |
{ | |
model.Poi = poiArr.Items.OfType<SaveObject>().Select(GamestateCountryValueEventsPoiItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"special_project", out var specialProjectObj) && specialProjectObj != null) | |
{ | |
model.SpecialProject = GamestateCountryValueEventsSpecialProject.Load(specialProjectObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsEventChain | |
{ | |
/// <summary>Original key: counter</summary> | |
public GamestateCountryValueEventsEventChainCounter? Counter { get; set; } | |
/// <summary>Original key: event_chain</summary> | |
public string? EventChain { get; set; } | |
/// <summary>Original key: scope</summary> | |
public GamestateCountryValueEventsEventChainScope? Scope { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsEventChain instance.</summary> | |
public static GamestateCountryValueEventsEventChain Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsEventChain(); | |
if (saveObject.TryGet<SaveObject>(@"counter", out var counterObj) && counterObj != null) | |
{ | |
model.Counter = GamestateCountryValueEventsEventChainCounter.Load(counterObj); | |
} | |
if (saveObject.TryGetString(@"event_chain", out string? eventChain)) | |
{ | |
model.EventChain = eventChain; | |
} | |
if (saveObject.TryGet<SaveObject>(@"scope", out var scopeObj) && scopeObj != null) | |
{ | |
model.Scope = GamestateCountryValueEventsEventChainScope.Load(scopeObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsEventChainCounter | |
{ | |
/// <summary>Original key: massex_analyzed</summary> | |
public int MassexAnalyzed { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsEventChainCounter instance.</summary> | |
public static GamestateCountryValueEventsEventChainCounter Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsEventChainCounter(); | |
if (saveObject.TryGetInt(@"massex_analyzed", out int? massexAnalyzed)) | |
{ | |
model.MassexAnalyzed = massexAnalyzed!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueEventsEventChainScope | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsEventChainScopeFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsEventChainScope instance.</summary> | |
public static GamestateCountryValueEventsEventChainScope Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsEventChainScope(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsEventChainScopeFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsEventChainScopeFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsEventChainScopeFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsEventChainScopeFrom instance.</summary> | |
public static GamestateCountryValueEventsEventChainScopeFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsEventChainScopeFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsEventChainScopeFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsEventChainScopeFromFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsEventChainScopeFromFrom instance.</summary> | |
public static GamestateCountryValueEventsEventChainScopeFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsEventChainScopeFromFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueEventsPoiItem | |
{ | |
/// <summary>Original key: desc</summary> | |
public string? Desc { get; set; } | |
/// <summary>Original key: event_chain</summary> | |
public string? EventChain { get; set; } | |
/// <summary>Original key: has_location</summary> | |
public bool HasLocation { get; set; } | |
/// <summary>Original key: id</summary> | |
public string? Id { get; set; } | |
/// <summary>Original key: location</summary> | |
public string? Location { get; set; } | |
/// <summary>Original key: name</summary> | |
public string? Name { get; set; } | |
/// <summary>Original key: picture</summary> | |
public string? Picture { get; set; } | |
/// <summary>Original key: scope</summary> | |
public GamestateCountryValueEventsPoiItemScope? Scope { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItem instance.</summary> | |
public static GamestateCountryValueEventsPoiItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItem(); | |
if (saveObject.TryGetString(@"desc", out string? desc)) | |
{ | |
model.Desc = desc; | |
} | |
if (saveObject.TryGetString(@"event_chain", out string? eventChain)) | |
{ | |
model.EventChain = eventChain; | |
} | |
if (saveObject.TryGetBool(@"has_location", out bool? hasLocation)) | |
{ | |
model.HasLocation = hasLocation!.Value; | |
} | |
if (saveObject.TryGetString(@"id", out string? id)) | |
{ | |
model.Id = id; | |
} | |
if (saveObject.TryGetString(@"location", out string? location)) | |
{ | |
model.Location = location; | |
} | |
if (saveObject.TryGetString(@"name", out string? name)) | |
{ | |
model.Name = name; | |
} | |
if (saveObject.TryGetString(@"picture", out string? picture)) | |
{ | |
model.Picture = picture; | |
} | |
if (saveObject.TryGet<SaveObject>(@"scope", out var scopeObj) && scopeObj != null) | |
{ | |
model.Scope = GamestateCountryValueEventsPoiItemScope.Load(scopeObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScope | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopeFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: prev</summary> | |
public GamestateCountryValueEventsPoiItemScopePrev? Prev { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: root</summary> | |
public GamestateCountryValueEventsPoiItemScopeRoot? Root { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScope instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScope Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScope(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopeFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"prev", out var prevObj) && prevObj != null) | |
{ | |
model.Prev = GamestateCountryValueEventsPoiItemScopePrev.Load(prevObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"root", out var rootObj) && rootObj != null) | |
{ | |
model.Root = GamestateCountryValueEventsPoiItemScopeRoot.Load(rootObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopeFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopeFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopeFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopeFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopeFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopeFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopeFromFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopeFromFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopeFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopeFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopeFromFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopeFromFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopeFromFromFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: saved_event_target</summary> | |
public GamestateCountryValueEventsPoiItemScopeFromFromFromSavedEventTarget? SavedEventTarget { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopeFromFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopeFromFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopeFromFromFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"saved_event_target", out var savedEventTargetObj) && savedEventTargetObj != null) | |
{ | |
model.SavedEventTarget = GamestateCountryValueEventsPoiItemScopeFromFromFromSavedEventTarget.Load(savedEventTargetObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopeFromFromFromSavedEventTarget | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: name</summary> | |
public string? Name { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopeFromFromFromSavedEventTarget instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopeFromFromFromSavedEventTarget Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopeFromFromFromSavedEventTarget(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetString(@"name", out string? name)) | |
{ | |
model.Name = name; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrev | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: prev</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrev? Prev { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: root</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevRoot? Root { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrev instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrev Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrev(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"prev", out var prevObj) && prevObj != null) | |
{ | |
model.Prev = GamestateCountryValueEventsPoiItemScopePrevPrev.Load(prevObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"root", out var rootObj) && rootObj != null) | |
{ | |
model.Root = GamestateCountryValueEventsPoiItemScopePrevRoot.Load(rootObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevFromFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevFromFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevFromFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevFromFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevFromFromFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: saved_event_target</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevFromFromFromSavedEventTarget? SavedEventTarget { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevFromFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevFromFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevFromFromFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"saved_event_target", out var savedEventTargetObj) && savedEventTargetObj != null) | |
{ | |
model.SavedEventTarget = GamestateCountryValueEventsPoiItemScopePrevFromFromFromSavedEventTarget.Load(savedEventTargetObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevFromFromFromSavedEventTarget | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: name</summary> | |
public string? Name { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevFromFromFromSavedEventTarget instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevFromFromFromSavedEventTarget Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevFromFromFromSavedEventTarget(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetString(@"name", out string? name)) | |
{ | |
model.Name = name; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrev | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: prev</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevPrev? Prev { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: root</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevRoot? Root { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrev instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrev Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrev(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevPrevFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"prev", out var prevObj) && prevObj != null) | |
{ | |
model.Prev = GamestateCountryValueEventsPoiItemScopePrevPrevPrev.Load(prevObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"root", out var rootObj) && rootObj != null) | |
{ | |
model.Root = GamestateCountryValueEventsPoiItemScopePrevPrevRoot.Load(rootObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevPrevFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevFromFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevFromFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: saved_event_target</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFromSavedEventTarget? SavedEventTarget { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"saved_event_target", out var savedEventTargetObj) && savedEventTargetObj != null) | |
{ | |
model.SavedEventTarget = GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFromSavedEventTarget.Load(savedEventTargetObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFromSavedEventTarget | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: name</summary> | |
public string? Name { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFromSavedEventTarget instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFromSavedEventTarget Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevFromFromFromSavedEventTarget(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetString(@"name", out string? name)) | |
{ | |
model.Name = name; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevPrev | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevPrevFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevPrev instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevPrev Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevPrev(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevPrevPrevFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevPrevFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevPrevFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevPrevFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevPrevFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: saved_event_target</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFromSavedEventTarget? SavedEventTarget { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"saved_event_target", out var savedEventTargetObj) && savedEventTargetObj != null) | |
{ | |
model.SavedEventTarget = GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFromSavedEventTarget.Load(savedEventTargetObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFromSavedEventTarget | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: name</summary> | |
public string? Name { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFromSavedEventTarget instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFromSavedEventTarget Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevPrevFromFromFromSavedEventTarget(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetString(@"name", out string? name)) | |
{ | |
model.Name = name; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevRoot | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevRootFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevRoot instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevRoot Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevRoot(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevPrevRootFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevRootFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevRootFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevRootFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevRootFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: saved_event_target</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFromSavedEventTarget? SavedEventTarget { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"saved_event_target", out var savedEventTargetObj) && savedEventTargetObj != null) | |
{ | |
model.SavedEventTarget = GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFromSavedEventTarget.Load(savedEventTargetObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFromSavedEventTarget | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: name</summary> | |
public string? Name { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFromSavedEventTarget instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFromSavedEventTarget Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevPrevRootFromFromFromSavedEventTarget(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetString(@"name", out string? name)) | |
{ | |
model.Name = name; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevRoot | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevRootFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevRoot instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevRoot Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevRoot(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevRootFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevRootFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevRootFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevRootFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevRootFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevRootFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevRootFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevRootFromFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevRootFromFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevRootFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevRootFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevRootFromFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopePrevRootFromFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevRootFromFromFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: saved_event_target</summary> | |
public GamestateCountryValueEventsPoiItemScopePrevRootFromFromFromSavedEventTarget? SavedEventTarget { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevRootFromFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevRootFromFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevRootFromFromFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"saved_event_target", out var savedEventTargetObj) && savedEventTargetObj != null) | |
{ | |
model.SavedEventTarget = GamestateCountryValueEventsPoiItemScopePrevRootFromFromFromSavedEventTarget.Load(savedEventTargetObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopePrevRootFromFromFromSavedEventTarget | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: name</summary> | |
public string? Name { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopePrevRootFromFromFromSavedEventTarget instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopePrevRootFromFromFromSavedEventTarget Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopePrevRootFromFromFromSavedEventTarget(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetString(@"name", out string? name)) | |
{ | |
model.Name = name; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueEventsPoiItemScopeRoot | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopeRootFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopeRoot instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopeRoot Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopeRoot(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopeRootFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopeRootFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopeRootFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopeRootFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopeRootFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopeRootFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopeRootFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopeRootFromFrom | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsPoiItemScopeRootFromFromFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopeRootFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopeRootFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopeRootFromFrom(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsPoiItemScopeRootFromFromFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopeRootFromFromFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: saved_event_target</summary> | |
public GamestateCountryValueEventsPoiItemScopeRootFromFromFromSavedEventTarget? SavedEventTarget { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopeRootFromFromFrom instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopeRootFromFromFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopeRootFromFromFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"saved_event_target", out var savedEventTargetObj) && savedEventTargetObj != null) | |
{ | |
model.SavedEventTarget = GamestateCountryValueEventsPoiItemScopeRootFromFromFromSavedEventTarget.Load(savedEventTargetObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsPoiItemScopeRootFromFromFromSavedEventTarget | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: name</summary> | |
public string? Name { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsPoiItemScopeRootFromFromFromSavedEventTarget instance.</summary> | |
public static GamestateCountryValueEventsPoiItemScopeRootFromFromFromSavedEventTarget Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsPoiItemScopeRootFromFromFromSavedEventTarget(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetString(@"name", out string? name)) | |
{ | |
model.Name = name; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueEventsSpecialProject | |
{ | |
/// <summary>Original key: ai_research_date</summary> | |
public DateTime AiResearchDate { get; set; } | |
/// <summary>Original key: coordinate</summary> | |
public GamestateCountryValueEventsSpecialProjectCoordinate? Coordinate { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: planet</summary> | |
public int Planet { get; set; } | |
/// <summary>Original key: scope</summary> | |
public GamestateCountryValueEventsSpecialProjectScope? Scope { get; set; } | |
/// <summary>Original key: special_project</summary> | |
public string? SpecialProject { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsSpecialProject instance.</summary> | |
public static GamestateCountryValueEventsSpecialProject Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsSpecialProject(); | |
if (saveObject.TryGetDateTime(@"ai_research_date", out DateTime? aiResearchDate)) | |
{ | |
model.AiResearchDate = aiResearchDate!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"coordinate", out var coordinateObj) && coordinateObj != null) | |
{ | |
model.Coordinate = GamestateCountryValueEventsSpecialProjectCoordinate.Load(coordinateObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetInt(@"planet", out int? planet)) | |
{ | |
model.Planet = planet!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"scope", out var scopeObj) && scopeObj != null) | |
{ | |
model.Scope = GamestateCountryValueEventsSpecialProjectScope.Load(scopeObj); | |
} | |
if (saveObject.TryGetString(@"special_project", out string? specialProject)) | |
{ | |
model.SpecialProject = specialProject; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsSpecialProjectCoordinate | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: type</summary> | |
public int Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsSpecialProjectCoordinate instance.</summary> | |
public static GamestateCountryValueEventsSpecialProjectCoordinate Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsSpecialProjectCoordinate(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetInt(@"type", out int? @type)) | |
{ | |
model.Type = @type!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueEventsSpecialProjectScope | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueEventsSpecialProjectScopeFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsSpecialProjectScope instance.</summary> | |
public static GamestateCountryValueEventsSpecialProjectScope Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsSpecialProjectScope(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueEventsSpecialProjectScopeFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsSpecialProjectScopeFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<int>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: saved_event_target</summary> | |
public GamestateCountryValueEventsSpecialProjectScopeFromSavedEventTarget? SavedEventTarget { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsSpecialProjectScopeFrom instance.</summary> | |
public static GamestateCountryValueEventsSpecialProjectScopeFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsSpecialProjectScopeFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"saved_event_target", out var savedEventTargetObj) && savedEventTargetObj != null) | |
{ | |
model.SavedEventTarget = GamestateCountryValueEventsSpecialProjectScopeFromSavedEventTarget.Load(savedEventTargetObj); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueEventsSpecialProjectScopeFromSavedEventTarget | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: name</summary> | |
public string? Name { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueEventsSpecialProjectScopeFromSavedEventTarget instance.</summary> | |
public static GamestateCountryValueEventsSpecialProjectScopeFromSavedEventTarget Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueEventsSpecialProjectScopeFromSavedEventTarget(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetString(@"name", out string? name)) | |
{ | |
model.Name = name; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueFaction | |
{ | |
/// <summary>Original key: aggro_range</summary> | |
public int AggroRange { get; set; } | |
/// <summary>Original key: aggro_range_measure_from</summary> | |
public string? AggroRangeMeasureFrom { get; set; } | |
/// <summary>Original key: intel_effects_surveyed</summary> | |
public bool IntelEffectsSurveyed { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFaction instance.</summary> | |
public static GamestateCountryValueFaction Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFaction(); | |
if (saveObject.TryGetInt(@"aggro_range", out int? aggroRange)) | |
{ | |
model.AggroRange = aggroRange!.Value; | |
} | |
if (saveObject.TryGetString(@"aggro_range_measure_from", out string? aggroRangeMeasureFrom)) | |
{ | |
model.AggroRangeMeasureFrom = aggroRangeMeasureFrom; | |
} | |
if (saveObject.TryGetBool(@"intel_effects_surveyed", out bool? intelEffectsSurveyed)) | |
{ | |
model.IntelEffectsSurveyed = intelEffectsSurveyed!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueFirstContact | |
{ | |
/// <summary>Original key: contacts</summary> | |
public List<int>? Contacts { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFirstContact instance.</summary> | |
public static GamestateCountryValueFirstContact Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFirstContact(); | |
if (saveObject.TryGet<SaveArray>(@"contacts", out var contactsArr) && contactsArr != null) | |
{ | |
model.Contacts = contactsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueFlag | |
{ | |
/// <summary>Original key: background</summary> | |
public GamestateCountryValueFlagBackground? Background { get; set; } | |
/// <summary>Original key: colors</summary> | |
public List<string>? Colors { get; set; } = new(); | |
/// <summary>Original key: icon</summary> | |
public GamestateCountryValueFlagIcon? Icon { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFlag instance.</summary> | |
public static GamestateCountryValueFlag Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFlag(); | |
if (saveObject.TryGet<SaveObject>(@"background", out var backgroundObj) && backgroundObj != null) | |
{ | |
model.Background = GamestateCountryValueFlagBackground.Load(backgroundObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"colors", out var colorsArr) && colorsArr != null) | |
{ | |
model.Colors = colorsArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"icon", out var iconObj) && iconObj != null) | |
{ | |
model.Icon = GamestateCountryValueFlagIcon.Load(iconObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueFlagBackground | |
{ | |
/// <summary>Original key: category</summary> | |
public string? Category { get; set; } | |
/// <summary>Original key: file</summary> | |
public string? File { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFlagBackground instance.</summary> | |
public static GamestateCountryValueFlagBackground Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFlagBackground(); | |
if (saveObject.TryGetString(@"category", out string? category)) | |
{ | |
model.Category = category; | |
} | |
if (saveObject.TryGetString(@"file", out string? @file)) | |
{ | |
model.File = @file; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueFlagIcon | |
{ | |
/// <summary>Original key: category</summary> | |
public string? Category { get; set; } | |
/// <summary>Original key: file</summary> | |
public string? File { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFlagIcon instance.</summary> | |
public static GamestateCountryValueFlagIcon Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFlagIcon(); | |
if (saveObject.TryGetString(@"category", out string? category)) | |
{ | |
model.Category = category; | |
} | |
if (saveObject.TryGetString(@"file", out string? @file)) | |
{ | |
model.File = @file; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueFlags | |
{ | |
/// <summary>Original key: amoeba_encountered</summary> | |
public int AmoebaEncountered { get; set; } | |
/// <summary>Original key: anomaly_ANCREL_RUBRICATOR_CAT</summary> | |
public int AnomalyANCRELRUBRICATORCAT { get; set; } | |
/// <summary>Original key: anomaly_collision_asteroid_category</summary> | |
public int AnomalyCollisionAsteroidCategory { get; set; } | |
/// <summary>Original key: anomaly_DISTAR_SIGNAL_CAT</summary> | |
public int AnomalyDISTARSIGNALCAT { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_anomaly.15</summary> | |
public int AnomalyOutcomeHappenedAnomaly15 { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_anomaly.185</summary> | |
public int AnomalyOutcomeHappenedAnomaly185 { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_anomaly.25</summary> | |
public int AnomalyOutcomeHappenedAnomaly25 { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_anomaly.5</summary> | |
public int AnomalyOutcomeHappenedAnomaly5 { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_anomaly.6745</summary> | |
public int AnomalyOutcomeHappenedAnomaly6745 { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_anomaly.6805</summary> | |
public int AnomalyOutcomeHappenedAnomaly6805 { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_anomaly.7000</summary> | |
public int AnomalyOutcomeHappenedAnomaly7000 { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_distar.1070</summary> | |
public int AnomalyOutcomeHappenedDistar1070 { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_distar.265</summary> | |
public int AnomalyOutcomeHappenedDistar265 { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_distar.3040</summary> | |
public int AnomalyOutcomeHappenedDistar3040 { get; set; } | |
/// <summary>Original key: anomaly_outcome_happened_precursor.2035</summary> | |
public int AnomalyOutcomeHappenedPrecursor2035 { get; set; } | |
/// <summary>Original key: anomaly_VENDING_MACHINE_CAT</summary> | |
public int AnomalyVENDINGMACHINECAT { get; set; } | |
/// <summary>Original key: bombarded_by_voidworms_event</summary> | |
public int BombardedByVoidwormsEvent { get; set; } | |
/// <summary>Original key: built_artificial_ship</summary> | |
public int BuiltArtificialShip { get; set; } | |
/// <summary>Original key: colony_odd_factory</summary> | |
public int ColonyOddFactory { get; set; } | |
/// <summary>Original key: confronted_by_cutholoid</summary> | |
public int ConfrontedByCutholoid { get; set; } | |
/// <summary>Original key: crystal_nonhostile_approach</summary> | |
public int CrystalNonhostileApproach { get; set; } | |
/// <summary>Original key: crystals_encountered</summary> | |
public int CrystalsEncountered { get; set; } | |
/// <summary>Original key: curator_intro</summary> | |
public int CuratorIntro { get; set; } | |
/// <summary>Original key: custom_start_screen</summary> | |
public int CustomStartScreen { get; set; } | |
/// <summary>Original key: cutholoids_encountered</summary> | |
public int CutholoidsEncountered { get; set; } | |
/// <summary>Original key: cybrex_6</summary> | |
public int Cybrex6 { get; set; } | |
/// <summary>Original key: cybrex_7</summary> | |
public int Cybrex7 { get; set; } | |
/// <summary>Original key: cybrex_intro</summary> | |
public int CybrexIntro { get; set; } | |
/// <summary>Original key: dismissed_egalitarian_leader_1</summary> | |
public int DismissedEgalitarianLeader1 { get; set; } | |
/// <summary>Original key: encountered_first_wormhole</summary> | |
public int EncounteredFirstWormhole { get; set; } | |
/// <summary>Original key: espionage_operation_targeted_by1</summary> | |
public GamestateCountryValueFlagsEspionageOperationTargetedBy1? EspionageOperationTargetedBy1 { get; set; } | |
/// <summary>Original key: factions_political_frontier</summary> | |
public int FactionsPoliticalFrontier { get; set; } | |
/// <summary>Original key: first_alien_life</summary> | |
public int FirstAlienLife { get; set; } | |
/// <summary>Original key: first_colony</summary> | |
public int FirstColony { get; set; } | |
/// <summary>Original key: first_contact_completed20</summary> | |
public int FirstContactCompleted20 { get; set; } | |
/// <summary>Original key: first_contact_completed22</summary> | |
public int FirstContactCompleted22 { get; set; } | |
/// <summary>Original key: first_contact_completed32</summary> | |
public int FirstContactCompleted32 { get; set; } | |
/// <summary>Original key: first_contact_completed54</summary> | |
public int FirstContactCompleted54 { get; set; } | |
/// <summary>Original key: first_contact_completed58</summary> | |
public int FirstContactCompleted58 { get; set; } | |
/// <summary>Original key: first_contact_completed82</summary> | |
public int FirstContactCompleted82 { get; set; } | |
/// <summary>Original key: first_contact_event</summary> | |
public int FirstContactEvent { get; set; } | |
/// <summary>Original key: first_contact_protocol_event_happened</summary> | |
public int FirstContactProtocolEventHappened { get; set; } | |
/// <summary>Original key: first_faction</summary> | |
public int FirstFaction { get; set; } | |
/// <summary>Original key: first_specimen_acquired_event_occured</summary> | |
public int FirstSpecimenAcquiredEventOccured { get; set; } | |
/// <summary>Original key: first_spynetwork</summary> | |
public int FirstSpynetwork { get; set; } | |
/// <summary>Original key: found_toxic_terraform_candidate</summary> | |
public int FoundToxicTerraformCandidate { get; set; } | |
/// <summary>Original key: grand_archive_kickstart_proposed</summary> | |
public int GrandArchiveKickstartProposed { get; set; } | |
/// <summary>Original key: habitable_worlds_survey</summary> | |
public int HabitableWorldsSurvey { get; set; } | |
/// <summary>Original key: had_comet</summary> | |
public int HadComet { get; set; } | |
/// <summary>Original key: has_encountered_other_empire</summary> | |
public int HasEncounteredOtherEmpire { get; set; } | |
/// <summary>Original key: has_negotiated_trade_deal</summary> | |
public int HasNegotiatedTradeDeal { get; set; } | |
/// <summary>Original key: human_1</summary> | |
public int Human1 { get; set; } | |
/// <summary>Original key: lcluster_clue_sonic</summary> | |
public int LclusterClueSonic { get; set; } | |
/// <summary>Original key: leader_recruited_recently</summary> | |
public GamestateCountryValueFlagsLeaderRecruitedRecently? LeaderRecruitedRecently { get; set; } | |
/// <summary>Original key: limbo_downloaded</summary> | |
public int LimboDownloaded { get; set; } | |
/// <summary>Original key: living_metal_found</summary> | |
public int LivingMetalFound { get; set; } | |
/// <summary>Original key: machine_age_virtuality_studied</summary> | |
public int MachineAgeVirtualityStudied { get; set; } | |
/// <summary>Original key: massex_5_found</summary> | |
public int Massex5Found { get; set; } | |
/// <summary>Original key: outer_system_mining_stations_constructed</summary> | |
public int OuterSystemMiningStationsConstructed { get; set; } | |
/// <summary>Original key: recent_first_contact_process_started</summary> | |
public GamestateCountryValueFlagsRecentFirstContactProcessStarted? RecentFirstContactProcessStarted { get; set; } | |
/// <summary>Original key: recently_had_leader_funeral</summary> | |
public GamestateCountryValueFlagsRecentlyHadLeaderFuneral? RecentlyHadLeaderFuneral { get; set; } | |
/// <summary>Original key: star_crazy</summary> | |
public int StarCrazy { get; set; } | |
/// <summary>Original key: starting_event</summary> | |
public int StartingEvent { get; set; } | |
/// <summary>Original key: Story5</summary> | |
public int Story5 { get; set; } | |
/// <summary>Original key: Story7</summary> | |
public int Story7 { get; set; } | |
/// <summary>Original key: StoryFirst</summary> | |
public int StoryFirst { get; set; } | |
/// <summary>Original key: tutorial_level_picked</summary> | |
public int TutorialLevelPicked { get; set; } | |
/// <summary>Original key: void_clouds_encountered</summary> | |
public int VoidCloudsEncountered { get; set; } | |
/// <summary>Original key: voidworms_encountered</summary> | |
public int VoidwormsEncountered { get; set; } | |
/// <summary>Original key: was_recently_targeted_by_voidworms</summary> | |
public GamestateCountryValueFlagsWasRecentlyTargetedByVoidworms? WasRecentlyTargetedByVoidworms { get; set; } | |
/// <summary>Original key: zro_found</summary> | |
public int ZroFound { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFlags instance.</summary> | |
public static GamestateCountryValueFlags Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFlags(); | |
if (saveObject.TryGetInt(@"amoeba_encountered", out int? amoebaEncountered)) | |
{ | |
model.AmoebaEncountered = amoebaEncountered!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_ANCREL_RUBRICATOR_CAT", out int? anomalyANCRELRUBRICATORCAT)) | |
{ | |
model.AnomalyANCRELRUBRICATORCAT = anomalyANCRELRUBRICATORCAT!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_collision_asteroid_category", out int? anomalyCollisionAsteroidCategory)) | |
{ | |
model.AnomalyCollisionAsteroidCategory = anomalyCollisionAsteroidCategory!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_DISTAR_SIGNAL_CAT", out int? anomalyDISTARSIGNALCAT)) | |
{ | |
model.AnomalyDISTARSIGNALCAT = anomalyDISTARSIGNALCAT!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_anomaly.15", out int? anomalyOutcomeHappenedAnomaly15)) | |
{ | |
model.AnomalyOutcomeHappenedAnomaly15 = anomalyOutcomeHappenedAnomaly15!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_anomaly.185", out int? anomalyOutcomeHappenedAnomaly185)) | |
{ | |
model.AnomalyOutcomeHappenedAnomaly185 = anomalyOutcomeHappenedAnomaly185!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_anomaly.25", out int? anomalyOutcomeHappenedAnomaly25)) | |
{ | |
model.AnomalyOutcomeHappenedAnomaly25 = anomalyOutcomeHappenedAnomaly25!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_anomaly.5", out int? anomalyOutcomeHappenedAnomaly5)) | |
{ | |
model.AnomalyOutcomeHappenedAnomaly5 = anomalyOutcomeHappenedAnomaly5!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_anomaly.6745", out int? anomalyOutcomeHappenedAnomaly6745)) | |
{ | |
model.AnomalyOutcomeHappenedAnomaly6745 = anomalyOutcomeHappenedAnomaly6745!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_anomaly.6805", out int? anomalyOutcomeHappenedAnomaly6805)) | |
{ | |
model.AnomalyOutcomeHappenedAnomaly6805 = anomalyOutcomeHappenedAnomaly6805!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_anomaly.7000", out int? anomalyOutcomeHappenedAnomaly7000)) | |
{ | |
model.AnomalyOutcomeHappenedAnomaly7000 = anomalyOutcomeHappenedAnomaly7000!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_distar.1070", out int? anomalyOutcomeHappenedDistar1070)) | |
{ | |
model.AnomalyOutcomeHappenedDistar1070 = anomalyOutcomeHappenedDistar1070!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_distar.265", out int? anomalyOutcomeHappenedDistar265)) | |
{ | |
model.AnomalyOutcomeHappenedDistar265 = anomalyOutcomeHappenedDistar265!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_distar.3040", out int? anomalyOutcomeHappenedDistar3040)) | |
{ | |
model.AnomalyOutcomeHappenedDistar3040 = anomalyOutcomeHappenedDistar3040!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_outcome_happened_precursor.2035", out int? anomalyOutcomeHappenedPrecursor2035)) | |
{ | |
model.AnomalyOutcomeHappenedPrecursor2035 = anomalyOutcomeHappenedPrecursor2035!.Value; | |
} | |
if (saveObject.TryGetInt(@"anomaly_VENDING_MACHINE_CAT", out int? anomalyVENDINGMACHINECAT)) | |
{ | |
model.AnomalyVENDINGMACHINECAT = anomalyVENDINGMACHINECAT!.Value; | |
} | |
if (saveObject.TryGetInt(@"bombarded_by_voidworms_event", out int? bombardedByVoidwormsEvent)) | |
{ | |
model.BombardedByVoidwormsEvent = bombardedByVoidwormsEvent!.Value; | |
} | |
if (saveObject.TryGetInt(@"built_artificial_ship", out int? builtArtificialShip)) | |
{ | |
model.BuiltArtificialShip = builtArtificialShip!.Value; | |
} | |
if (saveObject.TryGetInt(@"colony_odd_factory", out int? colonyOddFactory)) | |
{ | |
model.ColonyOddFactory = colonyOddFactory!.Value; | |
} | |
if (saveObject.TryGetInt(@"confronted_by_cutholoid", out int? confrontedByCutholoid)) | |
{ | |
model.ConfrontedByCutholoid = confrontedByCutholoid!.Value; | |
} | |
if (saveObject.TryGetInt(@"crystal_nonhostile_approach", out int? crystalNonhostileApproach)) | |
{ | |
model.CrystalNonhostileApproach = crystalNonhostileApproach!.Value; | |
} | |
if (saveObject.TryGetInt(@"crystals_encountered", out int? crystalsEncountered)) | |
{ | |
model.CrystalsEncountered = crystalsEncountered!.Value; | |
} | |
if (saveObject.TryGetInt(@"curator_intro", out int? curatorIntro)) | |
{ | |
model.CuratorIntro = curatorIntro!.Value; | |
} | |
if (saveObject.TryGetInt(@"custom_start_screen", out int? customStartScreen)) | |
{ | |
model.CustomStartScreen = customStartScreen!.Value; | |
} | |
if (saveObject.TryGetInt(@"cutholoids_encountered", out int? cutholoidsEncountered)) | |
{ | |
model.CutholoidsEncountered = cutholoidsEncountered!.Value; | |
} | |
if (saveObject.TryGetInt(@"cybrex_6", out int? cybrex6)) | |
{ | |
model.Cybrex6 = cybrex6!.Value; | |
} | |
if (saveObject.TryGetInt(@"cybrex_7", out int? cybrex7)) | |
{ | |
model.Cybrex7 = cybrex7!.Value; | |
} | |
if (saveObject.TryGetInt(@"cybrex_intro", out int? cybrexIntro)) | |
{ | |
model.CybrexIntro = cybrexIntro!.Value; | |
} | |
if (saveObject.TryGetInt(@"dismissed_egalitarian_leader_1", out int? dismissedEgalitarianLeader1)) | |
{ | |
model.DismissedEgalitarianLeader1 = dismissedEgalitarianLeader1!.Value; | |
} | |
if (saveObject.TryGetInt(@"encountered_first_wormhole", out int? encounteredFirstWormhole)) | |
{ | |
model.EncounteredFirstWormhole = encounteredFirstWormhole!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"espionage_operation_targeted_by1", out var espionageOperationTargetedBy1Obj) && espionageOperationTargetedBy1Obj != null) | |
{ | |
model.EspionageOperationTargetedBy1 = GamestateCountryValueFlagsEspionageOperationTargetedBy1.Load(espionageOperationTargetedBy1Obj); | |
} | |
if (saveObject.TryGetInt(@"factions_political_frontier", out int? factionsPoliticalFrontier)) | |
{ | |
model.FactionsPoliticalFrontier = factionsPoliticalFrontier!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_alien_life", out int? firstAlienLife)) | |
{ | |
model.FirstAlienLife = firstAlienLife!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_colony", out int? firstColony)) | |
{ | |
model.FirstColony = firstColony!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_contact_completed20", out int? firstContactCompleted20)) | |
{ | |
model.FirstContactCompleted20 = firstContactCompleted20!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_contact_completed22", out int? firstContactCompleted22)) | |
{ | |
model.FirstContactCompleted22 = firstContactCompleted22!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_contact_completed32", out int? firstContactCompleted32)) | |
{ | |
model.FirstContactCompleted32 = firstContactCompleted32!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_contact_completed54", out int? firstContactCompleted54)) | |
{ | |
model.FirstContactCompleted54 = firstContactCompleted54!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_contact_completed58", out int? firstContactCompleted58)) | |
{ | |
model.FirstContactCompleted58 = firstContactCompleted58!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_contact_completed82", out int? firstContactCompleted82)) | |
{ | |
model.FirstContactCompleted82 = firstContactCompleted82!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_contact_event", out int? firstContactEvent)) | |
{ | |
model.FirstContactEvent = firstContactEvent!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_contact_protocol_event_happened", out int? firstContactProtocolEventHappened)) | |
{ | |
model.FirstContactProtocolEventHappened = firstContactProtocolEventHappened!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_faction", out int? firstFaction)) | |
{ | |
model.FirstFaction = firstFaction!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_specimen_acquired_event_occured", out int? firstSpecimenAcquiredEventOccured)) | |
{ | |
model.FirstSpecimenAcquiredEventOccured = firstSpecimenAcquiredEventOccured!.Value; | |
} | |
if (saveObject.TryGetInt(@"first_spynetwork", out int? firstSpynetwork)) | |
{ | |
model.FirstSpynetwork = firstSpynetwork!.Value; | |
} | |
if (saveObject.TryGetInt(@"found_toxic_terraform_candidate", out int? foundToxicTerraformCandidate)) | |
{ | |
model.FoundToxicTerraformCandidate = foundToxicTerraformCandidate!.Value; | |
} | |
if (saveObject.TryGetInt(@"grand_archive_kickstart_proposed", out int? grandArchiveKickstartProposed)) | |
{ | |
model.GrandArchiveKickstartProposed = grandArchiveKickstartProposed!.Value; | |
} | |
if (saveObject.TryGetInt(@"habitable_worlds_survey", out int? habitableWorldsSurvey)) | |
{ | |
model.HabitableWorldsSurvey = habitableWorldsSurvey!.Value; | |
} | |
if (saveObject.TryGetInt(@"had_comet", out int? hadComet)) | |
{ | |
model.HadComet = hadComet!.Value; | |
} | |
if (saveObject.TryGetInt(@"has_encountered_other_empire", out int? hasEncounteredOtherEmpire)) | |
{ | |
model.HasEncounteredOtherEmpire = hasEncounteredOtherEmpire!.Value; | |
} | |
if (saveObject.TryGetInt(@"has_negotiated_trade_deal", out int? hasNegotiatedTradeDeal)) | |
{ | |
model.HasNegotiatedTradeDeal = hasNegotiatedTradeDeal!.Value; | |
} | |
if (saveObject.TryGetInt(@"human_1", out int? human1)) | |
{ | |
model.Human1 = human1!.Value; | |
} | |
if (saveObject.TryGetInt(@"lcluster_clue_sonic", out int? lclusterClueSonic)) | |
{ | |
model.LclusterClueSonic = lclusterClueSonic!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"leader_recruited_recently", out var leaderRecruitedRecentlyObj) && leaderRecruitedRecentlyObj != null) | |
{ | |
model.LeaderRecruitedRecently = GamestateCountryValueFlagsLeaderRecruitedRecently.Load(leaderRecruitedRecentlyObj); | |
} | |
if (saveObject.TryGetInt(@"limbo_downloaded", out int? limboDownloaded)) | |
{ | |
model.LimboDownloaded = limboDownloaded!.Value; | |
} | |
if (saveObject.TryGetInt(@"living_metal_found", out int? livingMetalFound)) | |
{ | |
model.LivingMetalFound = livingMetalFound!.Value; | |
} | |
if (saveObject.TryGetInt(@"machine_age_virtuality_studied", out int? machineAgeVirtualityStudied)) | |
{ | |
model.MachineAgeVirtualityStudied = machineAgeVirtualityStudied!.Value; | |
} | |
if (saveObject.TryGetInt(@"massex_5_found", out int? massex5Found)) | |
{ | |
model.Massex5Found = massex5Found!.Value; | |
} | |
if (saveObject.TryGetInt(@"outer_system_mining_stations_constructed", out int? outerSystemMiningStationsConstructed)) | |
{ | |
model.OuterSystemMiningStationsConstructed = outerSystemMiningStationsConstructed!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"recent_first_contact_process_started", out var recentFirstContactProcessStartedObj) && recentFirstContactProcessStartedObj != null) | |
{ | |
model.RecentFirstContactProcessStarted = GamestateCountryValueFlagsRecentFirstContactProcessStarted.Load(recentFirstContactProcessStartedObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"recently_had_leader_funeral", out var recentlyHadLeaderFuneralObj) && recentlyHadLeaderFuneralObj != null) | |
{ | |
model.RecentlyHadLeaderFuneral = GamestateCountryValueFlagsRecentlyHadLeaderFuneral.Load(recentlyHadLeaderFuneralObj); | |
} | |
if (saveObject.TryGetInt(@"star_crazy", out int? starCrazy)) | |
{ | |
model.StarCrazy = starCrazy!.Value; | |
} | |
if (saveObject.TryGetInt(@"starting_event", out int? startingEvent)) | |
{ | |
model.StartingEvent = startingEvent!.Value; | |
} | |
if (saveObject.TryGetInt(@"Story5", out int? story5)) | |
{ | |
model.Story5 = story5!.Value; | |
} | |
if (saveObject.TryGetInt(@"Story7", out int? story7)) | |
{ | |
model.Story7 = story7!.Value; | |
} | |
if (saveObject.TryGetInt(@"StoryFirst", out int? storyFirst)) | |
{ | |
model.StoryFirst = storyFirst!.Value; | |
} | |
if (saveObject.TryGetInt(@"tutorial_level_picked", out int? tutorialLevelPicked)) | |
{ | |
model.TutorialLevelPicked = tutorialLevelPicked!.Value; | |
} | |
if (saveObject.TryGetInt(@"void_clouds_encountered", out int? voidCloudsEncountered)) | |
{ | |
model.VoidCloudsEncountered = voidCloudsEncountered!.Value; | |
} | |
if (saveObject.TryGetInt(@"voidworms_encountered", out int? voidwormsEncountered)) | |
{ | |
model.VoidwormsEncountered = voidwormsEncountered!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"was_recently_targeted_by_voidworms", out var wasRecentlyTargetedByVoidwormsObj) && wasRecentlyTargetedByVoidwormsObj != null) | |
{ | |
model.WasRecentlyTargetedByVoidworms = GamestateCountryValueFlagsWasRecentlyTargetedByVoidworms.Load(wasRecentlyTargetedByVoidwormsObj); | |
} | |
if (saveObject.TryGetInt(@"zro_found", out int? zroFound)) | |
{ | |
model.ZroFound = zroFound!.Value; | |
} | |
return model; | |
} | |
public class GamestateCountryValueFlagsEspionageOperationTargetedBy1 | |
{ | |
/// <summary>Original key: flag_date</summary> | |
public int FlagDate { get; set; } | |
/// <summary>Original key: flag_days</summary> | |
public int FlagDays { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFlagsEspionageOperationTargetedBy1 instance.</summary> | |
public static GamestateCountryValueFlagsEspionageOperationTargetedBy1 Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFlagsEspionageOperationTargetedBy1(); | |
if (saveObject.TryGetInt(@"flag_date", out int? flagDate)) | |
{ | |
model.FlagDate = flagDate!.Value; | |
} | |
if (saveObject.TryGetInt(@"flag_days", out int? flagDays)) | |
{ | |
model.FlagDays = flagDays!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueFlagsLeaderRecruitedRecently | |
{ | |
/// <summary>Original key: flag_date</summary> | |
public int FlagDate { get; set; } | |
/// <summary>Original key: flag_days</summary> | |
public int FlagDays { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFlagsLeaderRecruitedRecently instance.</summary> | |
public static GamestateCountryValueFlagsLeaderRecruitedRecently Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFlagsLeaderRecruitedRecently(); | |
if (saveObject.TryGetInt(@"flag_date", out int? flagDate)) | |
{ | |
model.FlagDate = flagDate!.Value; | |
} | |
if (saveObject.TryGetInt(@"flag_days", out int? flagDays)) | |
{ | |
model.FlagDays = flagDays!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueFlagsRecentFirstContactProcessStarted | |
{ | |
/// <summary>Original key: flag_date</summary> | |
public int FlagDate { get; set; } | |
/// <summary>Original key: flag_days</summary> | |
public int FlagDays { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFlagsRecentFirstContactProcessStarted instance.</summary> | |
public static GamestateCountryValueFlagsRecentFirstContactProcessStarted Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFlagsRecentFirstContactProcessStarted(); | |
if (saveObject.TryGetInt(@"flag_date", out int? flagDate)) | |
{ | |
model.FlagDate = flagDate!.Value; | |
} | |
if (saveObject.TryGetInt(@"flag_days", out int? flagDays)) | |
{ | |
model.FlagDays = flagDays!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueFlagsRecentlyHadLeaderFuneral | |
{ | |
/// <summary>Original key: flag_date</summary> | |
public int FlagDate { get; set; } | |
/// <summary>Original key: flag_days</summary> | |
public int FlagDays { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFlagsRecentlyHadLeaderFuneral instance.</summary> | |
public static GamestateCountryValueFlagsRecentlyHadLeaderFuneral Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFlagsRecentlyHadLeaderFuneral(); | |
if (saveObject.TryGetInt(@"flag_date", out int? flagDate)) | |
{ | |
model.FlagDate = flagDate!.Value; | |
} | |
if (saveObject.TryGetInt(@"flag_days", out int? flagDays)) | |
{ | |
model.FlagDays = flagDays!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueFlagsWasRecentlyTargetedByVoidworms | |
{ | |
/// <summary>Original key: flag_date</summary> | |
public int FlagDate { get; set; } | |
/// <summary>Original key: flag_days</summary> | |
public int FlagDays { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFlagsWasRecentlyTargetedByVoidworms instance.</summary> | |
public static GamestateCountryValueFlagsWasRecentlyTargetedByVoidworms Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFlagsWasRecentlyTargetedByVoidworms(); | |
if (saveObject.TryGetInt(@"flag_date", out int? flagDate)) | |
{ | |
model.FlagDate = flagDate!.Value; | |
} | |
if (saveObject.TryGetInt(@"flag_days", out int? flagDays)) | |
{ | |
model.FlagDays = flagDays!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueFleetsManager | |
{ | |
/// <summary>Original key: owned_fleets</summary> | |
public List<GamestateCountryValueFleetsManagerOwnedFleetsItem>? OwnedFleets { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFleetsManager instance.</summary> | |
public static GamestateCountryValueFleetsManager Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFleetsManager(); | |
if (saveObject.TryGet<SaveArray>(@"owned_fleets", out var ownedFleetsArr) && ownedFleetsArr != null) | |
{ | |
model.OwnedFleets = ownedFleetsArr.Items.OfType<SaveObject>().Select(GamestateCountryValueFleetsManagerOwnedFleetsItem.Load).ToList(); | |
} | |
return model; | |
} | |
public class GamestateCountryValueFleetsManagerOwnedFleetsItem | |
{ | |
/// <summary>Original key: debtor</summary> | |
public long Debtor { get; set; } | |
/// <summary>Original key: fleet</summary> | |
public int Fleet { get; set; } | |
/// <summary>Original key: lease_period</summary> | |
public int LeasePeriod { get; set; } | |
/// <summary>Original key: ownership_status</summary> | |
public string? OwnershipStatus { get; set; } | |
/// <summary>Original key: previous_owner</summary> | |
public long PreviousOwner { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFleetsManagerOwnedFleetsItem instance.</summary> | |
public static GamestateCountryValueFleetsManagerOwnedFleetsItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFleetsManagerOwnedFleetsItem(); | |
if (saveObject.TryGetLong(@"debtor", out long? debtor)) | |
{ | |
model.Debtor = debtor!.Value; | |
} | |
if (saveObject.TryGetInt(@"fleet", out int? fleet)) | |
{ | |
model.Fleet = fleet!.Value; | |
} | |
if (saveObject.TryGetInt(@"lease_period", out int? leasePeriod)) | |
{ | |
model.LeasePeriod = leasePeriod!.Value; | |
} | |
if (saveObject.TryGetString(@"ownership_status", out string? ownershipStatus)) | |
{ | |
model.OwnershipStatus = ownershipStatus; | |
} | |
if (saveObject.TryGetLong(@"previous_owner", out long? previousOwner)) | |
{ | |
model.PreviousOwner = previousOwner!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueFleetTemplateManager | |
{ | |
/// <summary>Original key: fleet_template</summary> | |
public List<int>? FleetTemplate { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFleetTemplateManager instance.</summary> | |
public static GamestateCountryValueFleetTemplateManager Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFleetTemplateManager(); | |
if (saveObject.TryGet<SaveArray>(@"fleet_template", out var fleetTemplateArr) && fleetTemplateArr != null) | |
{ | |
model.FleetTemplate = fleetTemplateArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueFogMachine | |
{ | |
/// <summary>Original key: auto_tracking</summary> | |
public bool AutoTracking { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueFogMachine instance.</summary> | |
public static GamestateCountryValueFogMachine Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueFogMachine(); | |
if (saveObject.TryGetBool(@"auto_tracking", out bool? autoTracking)) | |
{ | |
model.AutoTracking = autoTracking!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueGovernment | |
{ | |
/// <summary>Original key: authority</summary> | |
public string? Authority { get; set; } | |
/// <summary>Original key: civics</summary> | |
public List<string>? Civics { get; set; } = new(); | |
/// <summary>Original key: council_agenda_cooldowns</summary> | |
public GamestateCountryValueGovernmentCouncilAgendaCooldowns? CouncilAgendaCooldowns { get; set; } | |
/// <summary>Original key: council_positions</summary> | |
public List<int>? CouncilPositions { get; set; } = new(); | |
/// <summary>Original key: origin</summary> | |
public string? Origin { get; set; } | |
/// <summary>Original key: picked_council_types</summary> | |
public List<string>? PickedCouncilTypes { get; set; } = new(); | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Original key: unlocked_civic_council_slots</summary> | |
public int UnlockedCivicCouncilSlots { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueGovernment instance.</summary> | |
public static GamestateCountryValueGovernment Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueGovernment(); | |
if (saveObject.TryGetString(@"authority", out string? authority)) | |
{ | |
model.Authority = authority; | |
} | |
if (saveObject.TryGet<SaveArray>(@"civics", out var civicsArr) && civicsArr != null) | |
{ | |
model.Civics = civicsArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"council_agenda_cooldowns", out var councilAgendaCooldownsObj) && councilAgendaCooldownsObj != null) | |
{ | |
model.CouncilAgendaCooldowns = GamestateCountryValueGovernmentCouncilAgendaCooldowns.Load(councilAgendaCooldownsObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"council_positions", out var councilPositionsArr) && councilPositionsArr != null) | |
{ | |
model.CouncilPositions = councilPositionsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetString(@"origin", out string? origin)) | |
{ | |
model.Origin = origin; | |
} | |
if (saveObject.TryGet<SaveArray>(@"picked_council_types", out var pickedCouncilTypesArr) && pickedCouncilTypesArr != null) | |
{ | |
model.PickedCouncilTypes = pickedCouncilTypesArr.Items.OfType<Scalar<string>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
if (saveObject.TryGetInt(@"unlocked_civic_council_slots", out int? unlockedCivicCouncilSlots)) | |
{ | |
model.UnlockedCivicCouncilSlots = unlockedCivicCouncilSlots!.Value; | |
} | |
return model; | |
} | |
public class GamestateCountryValueGovernmentCouncilAgendaCooldowns | |
{ | |
/// <summary>Original key: council_agenda</summary> | |
public string? CouncilAgenda { get; set; } | |
/// <summary>Original key: start_date</summary> | |
public DateTime StartDate { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueGovernmentCouncilAgendaCooldowns instance.</summary> | |
public static GamestateCountryValueGovernmentCouncilAgendaCooldowns Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueGovernmentCouncilAgendaCooldowns(); | |
if (saveObject.TryGetString(@"council_agenda", out string? councilAgenda)) | |
{ | |
model.CouncilAgenda = councilAgenda; | |
} | |
if (saveObject.TryGetDateTime(@"start_date", out DateTime? startDate)) | |
{ | |
model.StartDate = startDate!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueHoldingPlanetsItem | |
{ | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Original key: value</summary> | |
public int Value { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueHoldingPlanetsItem instance.</summary> | |
public static GamestateCountryValueHoldingPlanetsItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueHoldingPlanetsItem(); | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
if (saveObject.TryGetInt(@"value", out int? value)) | |
{ | |
model.Value = value!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueHomeworldName | |
{ | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueHomeworldName instance.</summary> | |
public static GamestateCountryValueHomeworldName Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueHomeworldName(); | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueIntelItem | |
{ | |
/// <summary>Original key: hostile</summary> | |
public List<GamestateCountryValueIntelItemHostileItem>? Hostile { get; set; } = new(); | |
/// <summary>Original key: object</summary> | |
public int Object { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueIntelItem instance.</summary> | |
public static GamestateCountryValueIntelItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueIntelItem(); | |
if (saveObject.TryGet<SaveArray>(@"hostile", out var hostileArr) && hostileArr != null) | |
{ | |
model.Hostile = hostileArr.Items.OfType<SaveObject>().Select(GamestateCountryValueIntelItemHostileItem.Load).ToList(); | |
} | |
if (saveObject.TryGetInt(@"object", out int? @object)) | |
{ | |
model.Object = @object!.Value; | |
} | |
return model; | |
} | |
public class GamestateCountryValueIntelItemHostileItem | |
{ | |
/// <summary>Original key: coordinate</summary> | |
public GamestateCountryValueIntelItemHostileItemCoordinate? Coordinate { get; set; } | |
/// <summary>Original key: military_power</summary> | |
public float MilitaryPower { get; set; } | |
/// <summary>Original key: name</summary> | |
public GamestateCountryValueIntelItemHostileItemName? Name { get; set; } | |
/// <summary>Original key: owner</summary> | |
public int Owner { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueIntelItemHostileItem instance.</summary> | |
public static GamestateCountryValueIntelItemHostileItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueIntelItemHostileItem(); | |
if (saveObject.TryGet<SaveObject>(@"coordinate", out var coordinateObj) && coordinateObj != null) | |
{ | |
model.Coordinate = GamestateCountryValueIntelItemHostileItemCoordinate.Load(coordinateObj); | |
} | |
if (saveObject.TryGetFloat(@"military_power", out float? militaryPower)) | |
{ | |
model.MilitaryPower = militaryPower!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"name", out var nameObj) && nameObj != null) | |
{ | |
model.Name = GamestateCountryValueIntelItemHostileItemName.Load(nameObj); | |
} | |
if (saveObject.TryGetInt(@"owner", out int? owner)) | |
{ | |
model.Owner = owner!.Value; | |
} | |
return model; | |
} | |
public class GamestateCountryValueIntelItemHostileItemCoordinate | |
{ | |
/// <summary>Original key: origin</summary> | |
public int Origin { get; set; } | |
/// <summary>Original key: randomized</summary> | |
public bool Randomized { get; set; } | |
/// <summary>Original key: visual_height</summary> | |
public float VisualHeight { get; set; } | |
/// <summary>Original key: x</summary> | |
public float X { get; set; } | |
/// <summary>Original key: y</summary> | |
public float Y { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueIntelItemHostileItemCoordinate instance.</summary> | |
public static GamestateCountryValueIntelItemHostileItemCoordinate Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueIntelItemHostileItemCoordinate(); | |
if (saveObject.TryGetInt(@"origin", out int? origin)) | |
{ | |
model.Origin = origin!.Value; | |
} | |
if (saveObject.TryGetBool(@"randomized", out bool? randomized)) | |
{ | |
model.Randomized = randomized!.Value; | |
} | |
if (saveObject.TryGetFloat(@"visual_height", out float? visualHeight)) | |
{ | |
model.VisualHeight = visualHeight!.Value; | |
} | |
if (saveObject.TryGetFloat(@"x", out float? x)) | |
{ | |
model.X = x!.Value; | |
} | |
if (saveObject.TryGetFloat(@"y", out float? y)) | |
{ | |
model.Y = y!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueIntelItemHostileItemName | |
{ | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueIntelItemHostileItemName instance.</summary> | |
public static GamestateCountryValueIntelItemHostileItemName Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueIntelItemHostileItemName(); | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueIntelManager | |
{ | |
/// <summary>Original key: intel</summary> | |
public Dictionary<int, GamestateCountryValueIntelManagerIntelValue>? Intel { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueIntelManager instance.</summary> | |
public static GamestateCountryValueIntelManager Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueIntelManager(); | |
if (saveObject.TryGet<SaveArray>(@"intel", out var intelIdArr) && intelIdArr != null) | |
{ | |
try { | |
model.Intel = intelIdArr.Items.OfType<SaveArray>() | |
.Where(innerArr => innerArr.Items.Count == 2 && innerArr.Items[0] is Scalar<int> && innerArr.Items[1] is SaveObject) | |
.ToDictionary( | |
keySelector: sa => ((Scalar<int>)sa.Items[0]).Value, | |
elementSelector: sa => GamestateCountryValueIntelManagerIntelValue.Load((SaveObject)sa.Items[1])); | |
} catch (Exception ex) { | |
Console.WriteLine($"Error parsing dictionary 'intel': {ex.Message}"); | |
model.Intel ??= new(); | |
} | |
} | |
return model; | |
} | |
public class GamestateCountryValueIntelManagerIntelValue | |
{ | |
/// <summary>Original key: intel</summary> | |
public int Intel { get; set; } | |
/// <summary>Original key: stale_intel</summary> | |
public Dictionary<int, object?>? StaleIntel { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueIntelManagerIntelValue instance.</summary> | |
public static GamestateCountryValueIntelManagerIntelValue Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueIntelManagerIntelValue(); | |
if (saveObject.TryGetInt(@"intel", out int? intel)) | |
{ | |
model.Intel = intel!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"stale_intel", out var staleIntelDictObj) && staleIntelDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in staleIntelDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.StaleIntel = dictBuilder; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueLocation | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: type</summary> | |
public int Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueLocation instance.</summary> | |
public static GamestateCountryValueLocation Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueLocation(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetInt(@"type", out int? @type)) | |
{ | |
model.Type = @type!.Value; | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueModules | |
{ | |
/// <summary>Original key: standard_diplomacy_module</summary> | |
public GamestateCountryValueModulesStandardDiplomacyModule? StandardDiplomacyModule { get; set; } | |
/// <summary>Original key: standard_economy_module</summary> | |
public GamestateCountryValueModulesStandardEconomyModule? StandardEconomyModule { get; set; } | |
/// <summary>Original key: standard_event_module</summary> | |
public GamestateCountryValueModulesStandardEventModule? StandardEventModule { get; set; } | |
/// <summary>Original key: standard_expansion_module</summary> | |
public Dictionary<int, object?>? StandardExpansionModule { get; set; } = new(); | |
/// <summary>Original key: standard_grand_archive_module</summary> | |
public GamestateCountryValueModulesStandardGrandArchiveModule? StandardGrandArchiveModule { get; set; } | |
/// <summary>Original key: standard_leader_module</summary> | |
public GamestateCountryValueModulesStandardLeaderModule? StandardLeaderModule { get; set; } | |
/// <summary>Original key: standard_pop_factions_module</summary> | |
public GamestateCountryValueModulesStandardPopFactionsModule? StandardPopFactionsModule { get; set; } | |
/// <summary>Original key: standard_species_rights_module</summary> | |
public GamestateCountryValueModulesStandardSpeciesRightsModule? StandardSpeciesRightsModule { get; set; } | |
/// <summary>Original key: standard_technology_module</summary> | |
public Dictionary<int, object?>? StandardTechnologyModule { get; set; } = new(); | |
/// <summary>Original key: standard_trade_routes_module</summary> | |
public GamestateCountryValueModulesStandardTradeRoutesModule? StandardTradeRoutesModule { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModules instance.</summary> | |
public static GamestateCountryValueModules Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModules(); | |
if (saveObject.TryGet<SaveObject>(@"standard_diplomacy_module", out var standardDiplomacyModuleObj) && standardDiplomacyModuleObj != null) | |
{ | |
model.StandardDiplomacyModule = GamestateCountryValueModulesStandardDiplomacyModule.Load(standardDiplomacyModuleObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"standard_economy_module", out var standardEconomyModuleObj) && standardEconomyModuleObj != null) | |
{ | |
model.StandardEconomyModule = GamestateCountryValueModulesStandardEconomyModule.Load(standardEconomyModuleObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"standard_event_module", out var standardEventModuleObj) && standardEventModuleObj != null) | |
{ | |
model.StandardEventModule = GamestateCountryValueModulesStandardEventModule.Load(standardEventModuleObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"standard_expansion_module", out var standardExpansionModuleDictObj) && standardExpansionModuleDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in standardExpansionModuleDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.StandardExpansionModule = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"standard_grand_archive_module", out var standardGrandArchiveModuleObj) && standardGrandArchiveModuleObj != null) | |
{ | |
model.StandardGrandArchiveModule = GamestateCountryValueModulesStandardGrandArchiveModule.Load(standardGrandArchiveModuleObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"standard_leader_module", out var standardLeaderModuleObj) && standardLeaderModuleObj != null) | |
{ | |
model.StandardLeaderModule = GamestateCountryValueModulesStandardLeaderModule.Load(standardLeaderModuleObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"standard_pop_factions_module", out var standardPopFactionsModuleObj) && standardPopFactionsModuleObj != null) | |
{ | |
model.StandardPopFactionsModule = GamestateCountryValueModulesStandardPopFactionsModule.Load(standardPopFactionsModuleObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"standard_species_rights_module", out var standardSpeciesRightsModuleObj) && standardSpeciesRightsModuleObj != null) | |
{ | |
model.StandardSpeciesRightsModule = GamestateCountryValueModulesStandardSpeciesRightsModule.Load(standardSpeciesRightsModuleObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"standard_technology_module", out var standardTechnologyModuleDictObj) && standardTechnologyModuleDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in standardTechnologyModuleDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.StandardTechnologyModule = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveObject>(@"standard_trade_routes_module", out var standardTradeRoutesModuleObj) && standardTradeRoutesModuleObj != null) | |
{ | |
model.StandardTradeRoutesModule = GamestateCountryValueModulesStandardTradeRoutesModule.Load(standardTradeRoutesModuleObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardDiplomacyModule | |
{ | |
/// <summary>Original key: borders</summary> | |
public int Borders { get; set; } | |
/// <summary>Original key: casus_belli</summary> | |
public List<GamestateCountryValueModulesStandardDiplomacyModuleCasusBelliItem>? CasusBelli { get; set; } = new(); | |
/// <summary>Original key: closed_borders</summary> | |
public int ClosedBorders { get; set; } | |
/// <summary>Original key: contact_rule</summary> | |
public string? ContactRule { get; set; } | |
/// <summary>Original key: non_aggression_pledge</summary> | |
public int NonAggressionPledge { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardDiplomacyModule instance.</summary> | |
public static GamestateCountryValueModulesStandardDiplomacyModule Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardDiplomacyModule(); | |
if (saveObject.TryGetInt(@"borders", out int? borders)) | |
{ | |
model.Borders = borders!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"casus_belli", out var casusBelliArr) && casusBelliArr != null) | |
{ | |
model.CasusBelli = casusBelliArr.Items.OfType<SaveObject>().Select(GamestateCountryValueModulesStandardDiplomacyModuleCasusBelliItem.Load).ToList(); | |
} | |
if (saveObject.TryGetInt(@"closed_borders", out int? closedBorders)) | |
{ | |
model.ClosedBorders = closedBorders!.Value; | |
} | |
if (saveObject.TryGetString(@"contact_rule", out string? contactRule)) | |
{ | |
model.ContactRule = contactRule; | |
} | |
if (saveObject.TryGetInt(@"non_aggression_pledge", out int? nonAggressionPledge)) | |
{ | |
model.NonAggressionPledge = nonAggressionPledge!.Value; | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardDiplomacyModuleCasusBelliItem | |
{ | |
/// <summary>Original key: country</summary> | |
public int Country { get; set; } | |
/// <summary>Original key: days_left</summary> | |
public int DaysLeft { get; set; } | |
/// <summary>Original key: owner</summary> | |
public int Owner { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardDiplomacyModuleCasusBelliItem instance.</summary> | |
public static GamestateCountryValueModulesStandardDiplomacyModuleCasusBelliItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardDiplomacyModuleCasusBelliItem(); | |
if (saveObject.TryGetInt(@"country", out int? country)) | |
{ | |
model.Country = country!.Value; | |
} | |
if (saveObject.TryGetInt(@"days_left", out int? daysLeft)) | |
{ | |
model.DaysLeft = daysLeft!.Value; | |
} | |
if (saveObject.TryGetInt(@"owner", out int? owner)) | |
{ | |
model.Owner = owner!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueModulesStandardEconomyModule | |
{ | |
/// <summary>Original key: resources</summary> | |
public GamestateCountryValueModulesStandardEconomyModuleResources? Resources { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardEconomyModule instance.</summary> | |
public static GamestateCountryValueModulesStandardEconomyModule Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardEconomyModule(); | |
if (saveObject.TryGet<SaveObject>(@"resources", out var resourcesObj) && resourcesObj != null) | |
{ | |
model.Resources = GamestateCountryValueModulesStandardEconomyModuleResources.Load(resourcesObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardEconomyModuleResources | |
{ | |
/// <summary>Original key: alloys</summary> | |
public float Alloys { get; set; } | |
/// <summary>Original key: consumer_goods</summary> | |
public float ConsumerGoods { get; set; } | |
/// <summary>Original key: energy</summary> | |
public int Energy { get; set; } | |
/// <summary>Original key: engineering_research</summary> | |
public int EngineeringResearch { get; set; } | |
/// <summary>Original key: exotic_gases</summary> | |
public float ExoticGases { get; set; } | |
/// <summary>Original key: food</summary> | |
public int Food { get; set; } | |
/// <summary>Original key: influence</summary> | |
public int Influence { get; set; } | |
/// <summary>Original key: minerals</summary> | |
public int Minerals { get; set; } | |
/// <summary>Original key: minor_artifacts</summary> | |
public int MinorArtifacts { get; set; } | |
/// <summary>Original key: physics_research</summary> | |
public float PhysicsResearch { get; set; } | |
/// <summary>Original key: society_research</summary> | |
public float SocietyResearch { get; set; } | |
/// <summary>Original key: unity</summary> | |
public float Unity { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardEconomyModuleResources instance.</summary> | |
public static GamestateCountryValueModulesStandardEconomyModuleResources Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardEconomyModuleResources(); | |
if (saveObject.TryGetFloat(@"alloys", out float? alloys)) | |
{ | |
model.Alloys = alloys!.Value; | |
} | |
if (saveObject.TryGetFloat(@"consumer_goods", out float? consumerGoods)) | |
{ | |
model.ConsumerGoods = consumerGoods!.Value; | |
} | |
if (saveObject.TryGetInt(@"energy", out int? energy)) | |
{ | |
model.Energy = energy!.Value; | |
} | |
if (saveObject.TryGetInt(@"engineering_research", out int? engineeringResearch)) | |
{ | |
model.EngineeringResearch = engineeringResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"exotic_gases", out float? exoticGases)) | |
{ | |
model.ExoticGases = exoticGases!.Value; | |
} | |
if (saveObject.TryGetInt(@"food", out int? food)) | |
{ | |
model.Food = food!.Value; | |
} | |
if (saveObject.TryGetInt(@"influence", out int? influence)) | |
{ | |
model.Influence = influence!.Value; | |
} | |
if (saveObject.TryGetInt(@"minerals", out int? minerals)) | |
{ | |
model.Minerals = minerals!.Value; | |
} | |
if (saveObject.TryGetInt(@"minor_artifacts", out int? minorArtifacts)) | |
{ | |
model.MinorArtifacts = minorArtifacts!.Value; | |
} | |
if (saveObject.TryGetFloat(@"physics_research", out float? physicsResearch)) | |
{ | |
model.PhysicsResearch = physicsResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"society_research", out float? societyResearch)) | |
{ | |
model.SocietyResearch = societyResearch!.Value; | |
} | |
if (saveObject.TryGetFloat(@"unity", out float? unity)) | |
{ | |
model.Unity = unity!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueModulesStandardEventModule | |
{ | |
/// <summary>Original key: accumulated_anomaly_spawn_chance</summary> | |
public float AccumulatedAnomalySpawnChance { get; set; } | |
/// <summary>Original key: delayed_event</summary> | |
public GamestateCountryValueModulesStandardEventModuleDelayedEvent? DelayedEvent { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardEventModule instance.</summary> | |
public static GamestateCountryValueModulesStandardEventModule Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardEventModule(); | |
if (saveObject.TryGetFloat(@"accumulated_anomaly_spawn_chance", out float? accumulatedAnomalySpawnChance)) | |
{ | |
model.AccumulatedAnomalySpawnChance = accumulatedAnomalySpawnChance!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"delayed_event", out var delayedEventObj) && delayedEventObj != null) | |
{ | |
model.DelayedEvent = GamestateCountryValueModulesStandardEventModuleDelayedEvent.Load(delayedEventObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardEventModuleDelayedEvent | |
{ | |
/// <summary>Original key: days</summary> | |
public int Days { get; set; } | |
/// <summary>Original key: event</summary> | |
public string? Event { get; set; } | |
/// <summary>Original key: scope</summary> | |
public GamestateCountryValueModulesStandardEventModuleDelayedEventScope? Scope { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardEventModuleDelayedEvent instance.</summary> | |
public static GamestateCountryValueModulesStandardEventModuleDelayedEvent Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardEventModuleDelayedEvent(); | |
if (saveObject.TryGetInt(@"days", out int? days)) | |
{ | |
model.Days = days!.Value; | |
} | |
if (saveObject.TryGetString(@"event", out string? @event)) | |
{ | |
model.Event = @event; | |
} | |
if (saveObject.TryGet<SaveObject>(@"scope", out var scopeObj) && scopeObj != null) | |
{ | |
model.Scope = GamestateCountryValueModulesStandardEventModuleDelayedEventScope.Load(scopeObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardEventModuleDelayedEventScope | |
{ | |
/// <summary>Original key: from</summary> | |
public GamestateCountryValueModulesStandardEventModuleDelayedEventScopeFrom? From { get; set; } | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<long>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardEventModuleDelayedEventScope instance.</summary> | |
public static GamestateCountryValueModulesStandardEventModuleDelayedEventScope Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardEventModuleDelayedEventScope(); | |
if (saveObject.TryGet<SaveObject>(@"from", out var @fromObj) && @fromObj != null) | |
{ | |
model.From = GamestateCountryValueModulesStandardEventModuleDelayedEventScopeFrom.Load(@fromObj); | |
} | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<long>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardEventModuleDelayedEventScopeFrom | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: random</summary> | |
public List<int>? Random { get; set; } = new(); | |
/// <summary>Original key: random_allowed</summary> | |
public bool RandomAllowed { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardEventModuleDelayedEventScopeFrom instance.</summary> | |
public static GamestateCountryValueModulesStandardEventModuleDelayedEventScopeFrom Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardEventModuleDelayedEventScopeFrom(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"random", out var randomArr) && randomArr != null) | |
{ | |
model.Random = randomArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetBool(@"random_allowed", out bool? randomAllowed)) | |
{ | |
model.RandomAllowed = randomAllowed!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueModulesStandardGrandArchiveModule | |
{ | |
/// <summary>Original key: auto_culling_settings</summary> | |
public Dictionary<int, object?>? AutoCullingSettings { get; set; } = new(); | |
/// <summary>Original key: culling_value</summary> | |
public List<GamestateCountryValueModulesStandardGrandArchiveModuleCullingValueItem>? CullingValue { get; set; } = new(); | |
/// <summary>Original key: exhibits</summary> | |
public GamestateCountryValueModulesStandardGrandArchiveModuleExhibits? Exhibits { get; set; } | |
/// <summary>Original key: last_received_specimen</summary> | |
public string? LastReceivedSpecimen { get; set; } | |
/// <summary>Original key: specimen_management_settings</summary> | |
public GamestateCountryValueModulesStandardGrandArchiveModuleSpecimenManagementSettings? SpecimenManagementSettings { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardGrandArchiveModule instance.</summary> | |
public static GamestateCountryValueModulesStandardGrandArchiveModule Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardGrandArchiveModule(); | |
if (saveObject.TryGet<SaveObject>(@"auto_culling_settings", out var autoCullingSettingsDictObj) && autoCullingSettingsDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in autoCullingSettingsDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.AutoCullingSettings = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveArray>(@"culling_value", out var cullingValueArr) && cullingValueArr != null) | |
{ | |
model.CullingValue = cullingValueArr.Items.OfType<SaveObject>().Select(GamestateCountryValueModulesStandardGrandArchiveModuleCullingValueItem.Load).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"exhibits", out var exhibitsObj) && exhibitsObj != null) | |
{ | |
model.Exhibits = GamestateCountryValueModulesStandardGrandArchiveModuleExhibits.Load(exhibitsObj); | |
} | |
if (saveObject.TryGetString(@"last_received_specimen", out string? lastReceivedSpecimen)) | |
{ | |
model.LastReceivedSpecimen = lastReceivedSpecimen; | |
} | |
if (saveObject.TryGet<SaveObject>(@"specimen_management_settings", out var specimenManagementSettingsObj) && specimenManagementSettingsObj != null) | |
{ | |
model.SpecimenManagementSettings = GamestateCountryValueModulesStandardGrandArchiveModuleSpecimenManagementSettings.Load(specimenManagementSettingsObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardGrandArchiveModuleCullingValueItem | |
{ | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardGrandArchiveModuleCullingValueItem instance.</summary> | |
public static GamestateCountryValueModulesStandardGrandArchiveModuleCullingValueItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardGrandArchiveModuleCullingValueItem(); | |
return model; | |
} | |
} | |
public class GamestateCountryValueModulesStandardGrandArchiveModuleExhibits | |
{ | |
/// <summary>Original key: aesthetic_wonder</summary> | |
public Dictionary<int, object?>? AestheticWonder { get; set; } = new(); | |
/// <summary>Original key: historical_item</summary> | |
public List<int>? HistoricalItem { get; set; } = new(); | |
/// <summary>Original key: xeno_geology</summary> | |
public List<int>? XenoGeology { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardGrandArchiveModuleExhibits instance.</summary> | |
public static GamestateCountryValueModulesStandardGrandArchiveModuleExhibits Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardGrandArchiveModuleExhibits(); | |
if (saveObject.TryGet<SaveObject>(@"aesthetic_wonder", out var aestheticWonderDictObj) && aestheticWonderDictObj != null) | |
{ | |
var dictBuilder = new Dictionary<int, object?>(); | |
foreach (var kvp in aestheticWonderDictObj.Properties) | |
{ | |
if (int.TryParse(kvp.Key, out var parsedKey)) | |
{ | |
bool isNone = kvp.Value is Scalar<string> scalarValueForNoneCheck && scalarValueForNoneCheck.Value.Equals("none", StringComparison.OrdinalIgnoreCase); | |
if (kvp.Value is SaveObject valueObj) | |
{ | |
// Warning: No schema for value object for key '{kvp.Key}', cannot load into specific type 'object'. | |
} | |
else if (isNone) | |
{ | |
dictBuilder[parsedKey] = null; | |
} | |
} | |
} | |
model.AestheticWonder = dictBuilder; | |
} | |
if (saveObject.TryGet<SaveArray>(@"historical_item", out var historicalItemArr) && historicalItemArr != null) | |
{ | |
model.HistoricalItem = historicalItemArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveArray>(@"xeno_geology", out var xenoGeologyArr) && xenoGeologyArr != null) | |
{ | |
model.XenoGeology = xenoGeologyArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueModulesStandardGrandArchiveModuleSpecimenManagementSettings | |
{ | |
/// <summary>Original key: auto_buy</summary> | |
public bool AutoBuy { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardGrandArchiveModuleSpecimenManagementSettings instance.</summary> | |
public static GamestateCountryValueModulesStandardGrandArchiveModuleSpecimenManagementSettings Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardGrandArchiveModuleSpecimenManagementSettings(); | |
if (saveObject.TryGetBool(@"auto_buy", out bool? autoBuy)) | |
{ | |
model.AutoBuy = autoBuy!.Value; | |
} | |
return model; | |
} | |
} | |
} | |
public class GamestateCountryValueModulesStandardLeaderModule | |
{ | |
/// <summary>Original key: enabled</summary> | |
public bool Enabled { get; set; } | |
/// <summary>Original key: leaders</summary> | |
public List<int>? Leaders { get; set; } = new(); | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardLeaderModule instance.</summary> | |
public static GamestateCountryValueModulesStandardLeaderModule Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardLeaderModule(); | |
if (saveObject.TryGetBool(@"enabled", out bool? enabled)) | |
{ | |
model.Enabled = enabled!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"leaders", out var leadersArr) && leadersArr != null) | |
{ | |
model.Leaders = leadersArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
return model; | |
} | |
} | |
public class GamestateCountryValueModulesStandardPopFactionsModule | |
{ | |
/// <summary>Original key: actual_count</summary> | |
public List<int>? ActualCount { get; set; } = new(); | |
/// <summary>Original key: last_created</summary> | |
public DateTime LastCreated { get; set; } | |
/// <summary>Original key: pop_factions</summary> | |
public List<int>? PopFactions { get; set; } = new(); | |
/// <summary>Original key: potential</summary> | |
public GamestateCountryValueModulesStandardPopFactionsModulePotential? Potential { get; set; } | |
/// <summary>Original key: potential_count</summary> | |
public List<int>? PotentialCount { get; set; } = new(); | |
/// <summary>Original key: total_faction_members</summary> | |
public int TotalFactionMembers { get; set; } | |
/// <summary>Original key: total_faction_members_power</summary> | |
public float TotalFactionMembersPower { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardPopFactionsModule instance.</summary> | |
public static GamestateCountryValueModulesStandardPopFactionsModule Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardPopFactionsModule(); | |
if (saveObject.TryGet<SaveArray>(@"actual_count", out var actualCountArr) && actualCountArr != null) | |
{ | |
model.ActualCount = actualCountArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetDateTime(@"last_created", out DateTime? lastCreated)) | |
{ | |
model.LastCreated = lastCreated!.Value; | |
} | |
if (saveObject.TryGet<SaveArray>(@"pop_factions", out var popFactionsArr) && popFactionsArr != null) | |
{ | |
model.PopFactions = popFactionsArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGet<SaveObject>(@"potential", out var potentialObj) && potentialObj != null) | |
{ | |
model.Potential = GamestateCountryValueModulesStandardPopFactionsModulePotential.Load(potentialObj); | |
} | |
if (saveObject.TryGet<SaveArray>(@"potential_count", out var potentialCountArr) && potentialCountArr != null) | |
{ | |
model.PotentialCount = potentialCountArr.Items.OfType<Scalar<int>>().Select(s => s.Value).ToList(); | |
} | |
if (saveObject.TryGetInt(@"total_faction_members", out int? totalFactionMembers)) | |
{ | |
model.TotalFactionMembers = totalFactionMembers!.Value; | |
} | |
if (saveObject.TryGetFloat(@"total_faction_members_power", out float? totalFactionMembersPower)) | |
{ | |
model.TotalFactionMembersPower = totalFactionMembersPower!.Value; | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardPopFactionsModulePotential | |
{ | |
/// <summary>Original key: parameters</summary> | |
public List<GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItem>? Parameters { get; set; } = new(); | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardPopFactionsModulePotential instance.</summary> | |
public static GamestateCountryValueModulesStandardPopFactionsModulePotential Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardPopFactionsModulePotential(); | |
if (saveObject.TryGet<SaveArray>(@"parameters", out var parametersArr) && parametersArr != null) | |
{ | |
model.Parameters = parametersArr.Items.OfType<SaveObject>().Select(GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItem.Load).ToList(); | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItem | |
{ | |
/// <summary>Original key: data</summary> | |
public GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItemData? Data { get; set; } | |
/// <summary>Original key: key</summary> | |
public string? Key { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItem instance.</summary> | |
public static GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItem Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItem(); | |
if (saveObject.TryGet<SaveObject>(@"data", out var dataObj) && dataObj != null) | |
{ | |
model.Data = GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItemData.Load(dataObj); | |
} | |
if (saveObject.TryGetString(@"key", out string? key)) | |
{ | |
model.Key = key; | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItemData | |
{ | |
/// <summary>Original key: id</summary> | |
public int Id { get; set; } | |
/// <summary>Original key: opener_id</summary> | |
public long OpenerId { get; set; } | |
/// <summary>Original key: type</summary> | |
public string? Type { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItemData instance.</summary> | |
public static GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItemData Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardPopFactionsModulePotentialParametersItemData(); | |
if (saveObject.TryGetInt(@"id", out int? id)) | |
{ | |
model.Id = id!.Value; | |
} | |
if (saveObject.TryGetLong(@"opener_id", out long? openerId)) | |
{ | |
model.OpenerId = openerId!.Value; | |
} | |
if (saveObject.TryGetString(@"type", out string? @type)) | |
{ | |
model.Type = @type; | |
} | |
return model; | |
} | |
} | |
} | |
} | |
} | |
public class GamestateCountryValueModulesStandardSpeciesRightsModule | |
{ | |
/// <summary>Original key: built_species</summary> | |
public GamestateCountryValueModulesStandardSpeciesRightsModuleBuiltSpecies? BuiltSpecies { get; set; } | |
/// <summary>Original key: default</summary> | |
public GamestateCountryValueModulesStandardSpeciesRightsModuleDefault? Default { get; set; } | |
/// <summary>Original key: enabled</summary> | |
public bool Enabled { get; set; } | |
/// <summary>Original key: primary</summary> | |
public GamestateCountryValueModulesStandardSpeciesRightsModulePrimary? Primary { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardSpeciesRightsModule instance.</summary> | |
public static GamestateCountryValueModulesStandardSpeciesRightsModule Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardSpeciesRightsModule(); | |
if (saveObject.TryGet<SaveObject>(@"built_species", out var builtSpeciesObj) && builtSpeciesObj != null) | |
{ | |
model.BuiltSpecies = GamestateCountryValueModulesStandardSpeciesRightsModuleBuiltSpecies.Load(builtSpeciesObj); | |
} | |
if (saveObject.TryGet<SaveObject>(@"default", out var @defaultObj) && @defaultObj != null) | |
{ | |
model.Default = GamestateCountryValueModulesStandardSpeciesRightsModuleDefault.Load(@defaultObj); | |
} | |
if (saveObject.TryGetBool(@"enabled", out bool? enabled)) | |
{ | |
model.Enabled = enabled!.Value; | |
} | |
if (saveObject.TryGet<SaveObject>(@"primary", out var primaryObj) && primaryObj != null) | |
{ | |
model.Primary = GamestateCountryValueModulesStandardSpeciesRightsModulePrimary.Load(primaryObj); | |
} | |
return model; | |
} | |
public class GamestateCountryValueModulesStandardSpeciesRightsModuleBuiltSpecies | |
{ | |
/// <summary>Original key: citizenship</summary> | |
public string? Citizenship { get; set; } | |
/// <summary>Original key: colonization_control</summary> | |
public string? ColonizationControl { get; set; } | |
/// <summary>Original key: last_changed_citizenship_type</summary> | |
public string? LastChangedCitizenshipType { get; set; } | |
/// <summary>Original key: last_changed_colonization_control</summary> | |
public string? LastChangedColonizationControl { get; set; } | |
/// <summary>Original key: last_changed_living_standard</summary> | |
public string? LastChangedLivingStandard { get; set; } | |
/// <summary>Original key: last_changed_migration_control</summary> | |
public string? LastChangedMigrationControl { get; set; } | |
/// <summary>Original key: last_changed_military_service_type</summary> | |
public string? LastChangedMilitaryServiceType { get; set; } | |
/// <summary>Original key: last_changed_population_control</summary> | |
public string? LastChangedPopulationControl { get; set; } | |
/// <summary>Original key: last_changed_purge_type</summary> | |
public string? LastChangedPurgeType { get; set; } | |
/// <summary>Original key: last_changed_slavery_type</summary> | |
public string? LastChangedSlaveryType { get; set; } | |
/// <summary>Original key: living_standard</summary> | |
public string? LivingStandard { get; set; } | |
/// <summary>Original key: migration_control</summary> | |
public string? MigrationControl { get; set; } | |
/// <summary>Original key: military_service</summary> | |
public string? MilitaryService { get; set; } | |
/// <summary>Original key: population_control</summary> | |
public string? PopulationControl { get; set; } | |
/// <summary>Original key: purge</summary> | |
public string? Purge { get; set; } | |
/// <summary>Original key: slavery</summary> | |
public string? Slavery { get; set; } | |
/// <summary>Original key: species_index</summary> | |
public long SpeciesIndex { get; set; } | |
/// <summary>Loads data from a SaveObject into a new GamestateCountryValueModulesStandardSpeciesRightsModuleBuiltSpecies instance.</summary> | |
public static GamestateCountryValueModulesStandardSpeciesRightsModuleBuiltSpecies Load(SaveObject saveObject) | |
{ | |
var model = new GamestateCountryValueModulesStandardSpeciesRightsModuleBuiltSpecies(); | |
if (saveObject.TryGetString(@"citizenship", out string? citizenship)) | |
{ | |
model.Citizenship = citizenship; | |
} | |
if (saveObject.TryGetString(@"colonization_control", out string? colonizationControl)) | |
{ | |
model.ColonizationControl = colonizationControl; | |
} | |
if (saveObject.TryGetString(@"last_changed_citizenship_type", out string? lastChangedCitizenshipType)) | |
{ | |
model.LastChangedCitizenshipType = lastChangedCitizenshipType; | |
} | |
if (saveObject.TryGetString(@"last_changed_colonization_control", out string? lastChangedColonizationControl)) | |
{ | |
model.LastChangedColonizationControl = lastChangedColonizationControl; | |
} | |
if (saveObject.TryGetString(@"last_changed_living_standard", out string? lastChangedLivingStandard)) | |
{ | |
model.LastChangedLivingStandard = lastChangedLivingStandard; | |
} | |
if (saveObject.TryGetString(@"last_changed_migration_control", out string? lastChangedMigrationControl)) | |
{ | |
model.LastChangedMigrationControl = lastChangedMigrationControl; | |
} | |
if (saveObject.TryGetString(@"last_changed_military_service_type", out string? lastChangedMilitaryServiceType)) | |
{ | |
model.LastChangedMilitaryServiceType = lastChangedMilitaryServiceType; | |
} | |
if (saveObject.TryGetString(@"last_changed_population_control", out string? lastChangedPopulationControl)) | |
{ | |
model.LastChangedPopulationControl = lastChangedPopulationControl; | |
} | |
if (saveObject.TryGetString(@"last_changed_purge_type", out string? lastChangedPurgeType)) | |
{ | |
model.LastChangedPurgeType = lastChangedPurgeType; | |
} | |
if (saveObject.TryGetString(@"last_changed_slavery_type", out string? lastChangedSlaveryType)) | |
{ | |
model.LastChangedSlaveryType = lastChangedSlaveryType; | |
} | |
if (saveObject.TryGetString(@"living_standard", out string? livingStandard)) | |
{ | |
model.LivingStandard = livingStandard; | |
} | |
if (saveObject.TryGetString(@"migration_control", out string? migrationControl)) | |
{ | |
model.MigrationControl = migrationControl; | |
} | |
if (saveObject.TryGetString(@"military_service", out string? militaryService)) | |
{ | |
model.MilitaryService = militaryService; | |
} | |
if (saveObject.TryGetString(@"population_control", out string? populationControl)) | |
{ | |
model.PopulationControl = populationControl; | |
} | |
if (saveObject.TryGetString(@"purge", out string? purge)) | |
{ | |
model.Purge = purge; | |
} | |
if (saveObject.TryGetString( |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment