dorfylegends/backend/model/model.go
Robert Janetzko 0282977343 site history
2022-04-29 13:33:21 +00:00

38570 lines
1.1 MiB

// Code generated by legendsbrowser; DO NOT EDIT.
package model
import (
"encoding/json"
"fmt"
"github.com/robertjanetzko/LegendsBrowser2/backend/util"
)
func InitSameFields() {
sameFields = map[string]map[string]map[string]bool{
"Artifact": {
"ItemDescription": {},
"ItemSubtype": {},
"ItemType": {},
"Mat": {},
"PageCount": {
"AbsTileX": true,
"AbsTileY": true,
"AbsTileZ": true,
"HolderHfid": true,
"SiteId": true,
"StructureLocalId": true,
"SubregionId": true,
},
"Writing": {
"AbsTileX": true,
"AbsTileY": true,
"AbsTileZ": true,
"HolderHfid": true,
"SiteId": true,
"StructureLocalId": true,
"SubregionId": true,
},
},
"Creature": {},
"DanceForm": {},
"DfWorld": {},
"Entity": {},
"EntityEntityLink": {},
"EntityFormerPositionLink": {},
"EntityFormerSquadLink": {},
"EntityPopulation": {},
"EntityPosition": {},
"EntityPositionAssignment": {},
"EntityPositionLink": {},
"EntityReputation": {},
"EntitySquadLink": {},
"Feature": {},
"HfLink": {},
"HfSkill": {},
"HistoricalEra": {},
"HistoricalEvent": {},
"HistoricalEventAddHfEntityHonor": {},
"HistoricalEventAddHfEntityLink": {
"Civ": {
"CivId": true,
"Hfid": true,
"PositionId": true,
},
"Histfig": {
"CivId": true,
"Hfid": true,
"PositionId": true,
},
"LinkType": {
"Link": true,
},
"Position": {},
},
"HistoricalEventAddHfHfLink": {
"Hf": {
"Hfid": true,
"HfidTarget": true,
},
"HfTarget": {
"Hfid": true,
"HfidTarget": true,
},
"LinkType": {},
},
"HistoricalEventAddHfSiteLink": {
"Civ": {
"SiteId": true,
},
"Histfig": {
"SiteId": true,
},
"LinkType": {},
"Site": {
"SiteId": true,
},
"Structure": {
"SiteId": true,
},
},
"HistoricalEventAgreementConcluded": {},
"HistoricalEventAgreementFormed": {},
"HistoricalEventAgreementMade": {
"Destination": {
"SiteId": true,
},
"Site": {
"SiteId": true,
},
"Source": {
"SiteId": true,
},
"Topic": {},
},
"HistoricalEventAgreementRejected": {
"Destination": {
"SiteId": true,
},
"Site": {
"SiteId": true,
},
"Source": {
"SiteId": true,
},
"Topic": {},
},
"HistoricalEventArtifactClaimFormed": {},
"HistoricalEventArtifactCopied": {},
"HistoricalEventArtifactCreated": {
"CreatorHfid": {
"HistFigureId": true,
"SiteId": true,
"UnitId": true,
},
"CreatorUnitId": {
"HistFigureId": true,
"SiteId": true,
"UnitId": true,
},
"Reason": {},
"SanctifyHf": {
"HistFigureId": true,
"SiteId": true,
"UnitId": true,
},
"Site": {
"HistFigureId": true,
"SiteId": true,
"UnitId": true,
},
},
"HistoricalEventArtifactCreatedCircumstance": {},
"HistoricalEventArtifactDestroyed": {},
"HistoricalEventArtifactFound": {},
"HistoricalEventArtifactGiven": {},
"HistoricalEventArtifactLost": {},
"HistoricalEventArtifactPossessed": {},
"HistoricalEventArtifactRecovered": {},
"HistoricalEventArtifactStored": {},
"HistoricalEventArtifactTransformed": {},
"HistoricalEventAssumeIdentity": {
"IdentityCaste": {},
"IdentityHistfigId": {
"IdentityId": true,
"TargetEnid": true,
"TricksterHfid": true,
},
"IdentityName": {},
"IdentityNemesisId": {
"IdentityId": true,
"TargetEnid": true,
"TricksterHfid": true,
},
"IdentityRace": {},
"Target": {
"IdentityId": true,
"TargetEnid": true,
"TricksterHfid": true,
},
"Trickster": {
"IdentityId": true,
"TargetEnid": true,
"TricksterHfid": true,
},
},
"HistoricalEventAttackedSite": {},
"HistoricalEventBodyAbused": {
"AbuseType": {},
"Civ": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
"Histfig": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
"Interaction": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
"ItemMat": {
"Coords": true,
},
"ItemSubtype": {},
"ItemType": {},
"PileType": {},
"Site": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
"Structure": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
"Tree": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
"VictimEntity": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
},
"HistoricalEventBuildingProfileAcquired": {},
"HistoricalEventCeremony": {},
"HistoricalEventChangeHfBodyState": {},
"HistoricalEventChangeHfJob": {
"NewJob": {},
"OldJob": {},
"Site": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
},
"HistoricalEventChangeHfState": {
"Site": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
},
"HistoricalEventChangedCreatureType": {
"Changee": {
"ChangeeHfid": true,
"ChangerHfid": true,
},
"Changer": {
"ChangeeHfid": true,
"ChangerHfid": true,
},
},
"HistoricalEventCollection": {},
"HistoricalEventCollectionAbduction": {},
"HistoricalEventCollectionBattle": {},
"HistoricalEventCollectionBeastAttack": {},
"HistoricalEventCollectionCeremony": {},
"HistoricalEventCollectionCompetition": {},
"HistoricalEventCollectionDuel": {},
"HistoricalEventCollectionEntityOverthrown": {},
"HistoricalEventCollectionInsurrection": {},
"HistoricalEventCollectionJourney": {},
"HistoricalEventCollectionOccasion": {},
"HistoricalEventCollectionPerformance": {},
"HistoricalEventCollectionPersecution": {},
"HistoricalEventCollectionProcession": {},
"HistoricalEventCollectionPurge": {},
"HistoricalEventCollectionRaid": {},
"HistoricalEventCollectionSiteConquered": {},
"HistoricalEventCollectionTheft": {},
"HistoricalEventCollectionWar": {},
"HistoricalEventCompetition": {},
"HistoricalEventCreateEntityPosition": {},
"HistoricalEventCreatedSite": {},
"HistoricalEventCreatedStructure": {
"BuilderHf": {
"BuilderHfid": true,
"CivId": true,
"SiteCivId": true,
"SiteId": true,
"StructureId": true,
},
"Civ": {
"BuilderHfid": true,
"CivId": true,
"SiteCivId": true,
"SiteId": true,
"StructureId": true,
},
"Rebuild": {},
"Site": {
"BuilderHfid": true,
"CivId": true,
"SiteCivId": true,
"SiteId": true,
"StructureId": true,
},
"SiteCiv": {
"BuilderHfid": true,
"CivId": true,
"SiteCivId": true,
"SiteId": true,
"StructureId": true,
},
"Structure": {
"BuilderHfid": true,
"CivId": true,
"SiteCivId": true,
"SiteId": true,
"StructureId": true,
},
},
"HistoricalEventCreatedWorldConstruction": {},
"HistoricalEventCreatureDevoured": {
"Caste": {},
"Eater": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
"Entity": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
"Race": {},
"Site": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
"Victim": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
},
},
"HistoricalEventDanceFormCreated": {},
"HistoricalEventDestroyedSite": {},
"HistoricalEventDiplomatLost": {
"Entity": {
"SiteId": true,
},
"Involved": {
"SiteId": true,
},
"Site": {
"SiteId": true,
},
},
"HistoricalEventEntityAllianceFormed": {},
"HistoricalEventEntityBreachFeatureLayer": {},
"HistoricalEventEntityCreated": {},
"HistoricalEventEntityDissolved": {},
"HistoricalEventEntityEquipmentPurchase": {},
"HistoricalEventEntityExpelsHf": {},
"HistoricalEventEntityFledSite": {},
"HistoricalEventEntityIncorporated": {},
"HistoricalEventEntityLaw": {},
"HistoricalEventEntityOverthrown": {},
"HistoricalEventEntityPersecuted": {},
"HistoricalEventEntityPrimaryCriminals": {
"Action": {},
"Entity": {
"EntityId": true,
"SiteId": true,
"StructureId": true,
},
"Site": {
"EntityId": true,
"SiteId": true,
"StructureId": true,
},
"Structure": {
"EntityId": true,
"SiteId": true,
"StructureId": true,
},
},
"HistoricalEventEntityRampagedInSite": {},
"HistoricalEventEntityRelocate": {
"Action": {},
"Entity": {
"EntityId": true,
"SiteId": true,
"StructureId": true,
},
"Site": {
"EntityId": true,
"SiteId": true,
"StructureId": true,
},
"Structure": {
"EntityId": true,
"SiteId": true,
"StructureId": true,
},
},
"HistoricalEventEntitySearchedSite": {},
"HistoricalEventFailedFrameAttempt": {},
"HistoricalEventFailedIntrigueCorruption": {},
"HistoricalEventFieldBattle": {},
"HistoricalEventFirstContact": {},
"HistoricalEventGamble": {},
"HistoricalEventHfAbducted": {},
"HistoricalEventHfAttackedSite": {},
"HistoricalEventHfConfronted": {},
"HistoricalEventHfConvicted": {},
"HistoricalEventHfDestroyedSite": {},
"HistoricalEventHfDied": {
"ArtifactId": {
"FeatureLayerId": true,
"Hfid": true,
"SiteId": true,
"SlayerHfid": true,
"SlayerItemId": true,
"SlayerShooterItemId": true,
"SubregionId": true,
},
"DeathCause": {
"Cause": true,
},
"Item": {
"FeatureLayerId": true,
"Hfid": true,
"SiteId": true,
"SlayerHfid": true,
"SlayerItemId": true,
"SlayerShooterItemId": true,
"SubregionId": true,
},
"ItemSubtype": {},
"ItemType": {},
"Mat": {},
"ShooterArtifactId": {
"FeatureLayerId": true,
"Hfid": true,
"SiteId": true,
"SlayerHfid": true,
"SlayerItemId": true,
"SlayerShooterItemId": true,
"SubregionId": true,
},
"ShooterItem": {
"FeatureLayerId": true,
"Hfid": true,
"SiteId": true,
"SlayerHfid": true,
"SlayerItemId": true,
"SlayerShooterItemId": true,
"SubregionId": true,
},
"ShooterItemSubtype": {
"Cause": true,
},
"ShooterItemType": {
"Cause": true,
},
"ShooterMat": {},
"Site": {
"FeatureLayerId": true,
"Hfid": true,
"SiteId": true,
"SlayerHfid": true,
"SlayerItemId": true,
"SlayerShooterItemId": true,
"SubregionId": true,
},
"SlayerHf": {
"FeatureLayerId": true,
"Hfid": true,
"SiteId": true,
"SlayerHfid": true,
"SlayerItemId": true,
"SlayerShooterItemId": true,
"SubregionId": true,
},
"VictimHf": {
"FeatureLayerId": true,
"Hfid": true,
"SiteId": true,
"SlayerHfid": true,
"SlayerItemId": true,
"SlayerShooterItemId": true,
"SubregionId": true,
},
},
"HistoricalEventHfDisturbedStructure": {
"Action": {},
"Histfig": {
"HistFigId": true,
"SiteId": true,
"StructureId": true,
},
"Site": {
"HistFigId": true,
"SiteId": true,
"StructureId": true,
},
"Structure": {
"HistFigId": true,
"SiteId": true,
"StructureId": true,
},
},
"HistoricalEventHfDoesInteraction": {
"Doer": {
"DoerHfid": true,
"TargetHfid": true,
},
"InteractionAction": {
"Interaction": true,
},
"Region": {
"DoerHfid": true,
"TargetHfid": true,
},
"Site": {
"DoerHfid": true,
"TargetHfid": true,
},
"Source": {
"DoerHfid": true,
"TargetHfid": true,
},
"Target": {
"DoerHfid": true,
"TargetHfid": true,
},
},
"HistoricalEventHfEnslaved": {},
"HistoricalEventHfEquipmentPurchase": {},
"HistoricalEventHfFreed": {},
"HistoricalEventHfGainsSecretGoal": {},
"HistoricalEventHfInterrogated": {},
"HistoricalEventHfLearnsSecret": {
"Artifact": {
"ArtifactId": true,
"StudentHfid": true,
"TeacherHfid": true,
},
"SecretText": {},
"Student": {
"ArtifactId": true,
"StudentHfid": true,
"TeacherHfid": true,
},
"Teacher": {
"ArtifactId": true,
"StudentHfid": true,
"TeacherHfid": true,
},
},
"HistoricalEventHfNewPet": {
"Group": {
"FeatureLayerId": true,
"GroupHfid": true,
"SiteId": true,
"SubregionId": true,
},
"Pets": {
"Coords": true,
},
"Site": {
"FeatureLayerId": true,
"GroupHfid": true,
"SiteId": true,
"SubregionId": true,
},
},
"HistoricalEventHfPerformedHorribleExperiments": {},
"HistoricalEventHfPrayedInsideStructure": {
"Action": {},
"Histfig": {
"HistFigId": true,
"SiteId": true,
"StructureId": true,
},
"Site": {
"HistFigId": true,
"SiteId": true,
"StructureId": true,
},
"Structure": {
"HistFigId": true,
"SiteId": true,
"StructureId": true,
},
},
"HistoricalEventHfPreach": {},
"HistoricalEventHfProfanedStructure": {
"Action": {},
"Histfig": {
"HistFigId": true,
"SiteId": true,
"StructureId": true,
},
"Site": {
"HistFigId": true,
"SiteId": true,
"StructureId": true,
},
"Structure": {
"HistFigId": true,
"SiteId": true,
"StructureId": true,
},
},
"HistoricalEventHfRansomed": {},
"HistoricalEventHfReachSummit": {},
"HistoricalEventHfRecruitedUnitTypeForEntity": {},
"HistoricalEventHfRelationshipDenied": {},
"HistoricalEventHfReunion": {},
"HistoricalEventHfRevived": {},
"HistoricalEventHfSimpleBattleEvent": {},
"HistoricalEventHfTravel": {},
"HistoricalEventHfViewedArtifact": {},
"HistoricalEventHfWounded": {
"BodyPart": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
"WoundeeHfid": true,
"WounderHfid": true,
},
"InjuryType": {},
"PartLost": {},
"Site": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
"WoundeeHfid": true,
"WounderHfid": true,
},
"Woundee": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
"WoundeeHfid": true,
"WounderHfid": true,
},
"WoundeeCaste": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
"WoundeeHfid": true,
"WounderHfid": true,
},
"WoundeeRace": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
"WoundeeHfid": true,
"WounderHfid": true,
},
"Wounder": {
"FeatureLayerId": true,
"SiteId": true,
"SubregionId": true,
"WoundeeHfid": true,
"WounderHfid": true,
},
},
"HistoricalEventHfsFormedIntrigueRelationship": {},
"HistoricalEventHfsFormedReputationRelationship": {},
"HistoricalEventHolyCityDeclaration": {},
"HistoricalEventInsurrectionStarted": {},
"HistoricalEventItemStolen": {
"Entity": {
"CircumstanceId": true,
},
"Histfig": {
"CircumstanceId": true,
},
"Item": {
"CircumstanceId": true,
},
"ItemSubtype": {},
"ItemType": {},
"Mat": {},
"Matindex": {
"CircumstanceId": true,
},
"Mattype": {
"CircumstanceId": true,
},
"Site": {
"CircumstanceId": true,
},
"StashSite": {
"CircumstanceId": true,
},
"Structure": {
"CircumstanceId": true,
},
"TheftMethod": {},
},
"HistoricalEventItemStolenCircumstance": {},
"HistoricalEventKnowledgeDiscovered": {},
"HistoricalEventMasterpieceArchConstructed": {
"BuildingCustom": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"BuildingSubtype": {},
"BuildingType": {},
"Maker": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"MakerEntity": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Site": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Unk2": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
},
"HistoricalEventMasterpieceDye": {
"DyeMat": {},
"DyeMatIndex": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"ItemType": {},
"Maker": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"MakerEntity": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Mat": {},
"MatIndex": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Site": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Unk2": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
},
"HistoricalEventMasterpieceEngraving": {
"ArtId": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"ArtSubid": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Maker": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"MakerEntity": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Site": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
},
"HistoricalEventMasterpieceFood": {
"ItemId": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"ItemSubtype": {},
"ItemType": {},
"Maker": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"MakerEntity": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Site": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
},
"HistoricalEventMasterpieceItem": {
"ItemId": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"ItemSubtype": {},
"ItemType": {},
"Maker": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"MakerEntity": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Mat": {},
"MatIndex": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"MatType": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Site": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
},
"HistoricalEventMasterpieceItemImprovement": {
"ArtId": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"ArtSubid": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"ImpMat": {},
"ImprovementSubtype": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"ImprovementType": {},
"ItemSubtype": {},
"ItemType": {},
"Maker": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"MakerEntity": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Mat": {},
"Site": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
"Unk2": {
"EntityId": true,
"Hfid": true,
"SiteId": true,
},
},
"HistoricalEventMasterpieceLost": {},
"HistoricalEventMerchant": {
"Destination": {
"DepotEntityId": true,
"SiteId": true,
"TraderEntityId": true,
},
"Site": {
"DepotEntityId": true,
"SiteId": true,
"TraderEntityId": true,
},
"Source": {
"DepotEntityId": true,
"SiteId": true,
"TraderEntityId": true,
},
},
"HistoricalEventModifiedBuilding": {},
"HistoricalEventMusicalFormCreated": {},
"HistoricalEventNewSiteLeader": {},
"HistoricalEventPeaceAccepted": {
"Destination": {
"SiteId": true,
},
"Site": {
"SiteId": true,
},
"Source": {
"SiteId": true,
},
"Topic": {},
},
"HistoricalEventPeaceRejected": {
"Destination": {
"SiteId": true,
},
"Site": {
"SiteId": true,
},
"Source": {
"SiteId": true,
},
"Topic": {},
},
"HistoricalEventPerformance": {},
"HistoricalEventPlunderedSite": {},
"HistoricalEventPoeticFormCreated": {},
"HistoricalEventProcession": {},
"HistoricalEventRazedStructure": {},
"HistoricalEventReclaimSite": {},
"HistoricalEventRegionpopIncorporatedIntoEntity": {},
"HistoricalEventRelationship": {},
"HistoricalEventRelationshipSupplement": {},
"HistoricalEventRemoveHfEntityLink": {
"Civ": {
"CivId": true,
"Hfid": true,
"PositionId": true,
},
"Histfig": {
"CivId": true,
"Hfid": true,
"PositionId": true,
},
"LinkType": {
"Link": true,
},
"Position": {},
},
"HistoricalEventRemoveHfHfLink": {},
"HistoricalEventRemoveHfSiteLink": {
"Civ": {
"SiteId": true,
},
"Histfig": {
"SiteId": true,
},
"LinkType": {},
"Site": {
"SiteId": true,
},
"Structure": {
"SiteId": true,
},
},
"HistoricalEventReplacedStructure": {
"Civ": {
"CivId": true,
"NewAbId": true,
"OldAbId": true,
"SiteCivId": true,
"SiteId": true,
},
"NewStructure": {
"CivId": true,
"NewAbId": true,
"OldAbId": true,
"SiteCivId": true,
"SiteId": true,
},
"OldStructure": {
"CivId": true,
"NewAbId": true,
"OldAbId": true,
"SiteCivId": true,
"SiteId": true,
},
"Site": {
"CivId": true,
"NewAbId": true,
"OldAbId": true,
"SiteCivId": true,
"SiteId": true,
},
"SiteCiv": {
"CivId": true,
"NewAbId": true,
"OldAbId": true,
"SiteCivId": true,
"SiteId": true,
},
},
"HistoricalEventSiteDied": {},
"HistoricalEventSiteDispute": {},
"HistoricalEventSiteRetired": {},
"HistoricalEventSiteSurrendered": {},
"HistoricalEventSiteTakenOver": {},
"HistoricalEventSiteTributeForced": {},
"HistoricalEventSneakIntoSite": {},
"HistoricalEventSpottedLeavingSite": {},
"HistoricalEventSquadVsSquad": {},
"HistoricalEventTacticalSituation": {},
"HistoricalEventTrade": {},
"HistoricalEventWrittenContentComposed": {},
"HistoricalFigure": {
"Sex": {
"Appeared": true,
"BirthSeconds72": true,
"BirthYear": true,
"BreedId": true,
"CurrentIdentityId": true,
"DeathSeconds72": true,
"DeathYear": true,
"EntPopId": true,
},
},
"HistoricalFigureEntityLink": {},
"HistoricalFigureSiteProperty": {},
"Honor": {},
"HonorEntity": {},
"Identity": {},
"IntrigueActor": {},
"IntriguePlot": {},
"Item": {},
"Landmass": {},
"MountainPeak": {},
"MusicalForm": {},
"Occasion": {},
"PlotActor": {},
"PoeticForm": {},
"Reference": {},
"Region": {},
"RelationshipProfileHfHistorical": {},
"RelationshipProfileHfIdentity": {},
"RelationshipProfileHfVisual": {},
"River": {},
"Schedule": {},
"Site": {
"CivId": {},
"CurOwnerId": {},
},
"SiteLink": {},
"SiteSiteProperty": {},
"Structure": {
"Deity": {
"EntityId": true,
"LocalId": true,
"WorshipHfid": true,
},
"DeityType": {
"EntityId": true,
"LocalId": true,
"WorshipHfid": true,
},
"DungeonType": {
"EntityId": true,
"LocalId": true,
"WorshipHfid": true,
},
"Name2": {},
"Religion": {
"EntityId": true,
"LocalId": true,
"WorshipHfid": true,
},
},
"UndergroundRegion": {
"Coords": {},
},
"VagueRelationship": {},
"WorldConstruction": {},
"WrittenContent": {
"Author": {
"AuthorHfid": true,
"AuthorRoll": true,
"FormId": true,
},
"PageEnd": {
"AuthorHfid": true,
"AuthorRoll": true,
"FormId": true,
},
"PageStart": {
"AuthorHfid": true,
"AuthorRoll": true,
"FormId": true,
},
},
}
}
type Artifact struct {
AbsTileX int `json:"absTileX" legend:"base"` // abs_tile_x
AbsTileY int `json:"absTileY" legend:"base"` // abs_tile_y
AbsTileZ int `json:"absTileZ" legend:"base"` // abs_tile_z
HolderHfid int `json:"holderHfid" legend:"base"` // holder_hfid
Id_ int `json:"id" legend:"both"` // id
Item *Item `json:"item" legend:"base"` // item
ItemDescription string `json:"itemDescription" legend:"plus"` // item_description
ItemSubtype string `json:"itemSubtype" legend:"plus"` // item_subtype
ItemType string `json:"itemType" legend:"plus"` // item_type
Mat string `json:"mat" legend:"plus"` // mat
Name_ string `json:"name" legend:"base"` // name
PageCount int `json:"pageCount" legend:"plus"` // page_count
SiteId int `json:"siteId" legend:"base"` // site_id
StructureLocalId int `json:"structureLocalId" legend:"base"` // structure_local_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
Writing int `json:"writing" legend:"plus"` // writing
}
func NewArtifact() *Artifact {
return &Artifact{
AbsTileX: -1,
AbsTileY: -1,
AbsTileZ: -1,
HolderHfid: -1,
Id_: -1,
PageCount: -1,
SiteId: -1,
StructureLocalId: -1,
SubregionId: -1,
Writing: -1,
}
}
func (x *Artifact) Id() int { return x.Id_ }
func (x *Artifact) setId(id int) { x.Id_ = id }
func (x *Artifact) Name() string { return x.Name_ }
func (x *Artifact) RelatedToEntity(id int) bool { return false }
func (x *Artifact) RelatedToHf(id int) bool { return x.HolderHfid == id }
func (x *Artifact) RelatedToArtifact(id int) bool { return false }
func (x *Artifact) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *Artifact) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *Artifact) CheckFields() {
if x.PageCount != x.AbsTileX {
sameFields["Artifact"]["PageCount"]["AbsTileX"] = false
}
if x.PageCount != x.AbsTileY {
sameFields["Artifact"]["PageCount"]["AbsTileY"] = false
}
if x.PageCount != x.AbsTileZ {
sameFields["Artifact"]["PageCount"]["AbsTileZ"] = false
}
if x.PageCount != x.HolderHfid {
sameFields["Artifact"]["PageCount"]["HolderHfid"] = false
}
if x.PageCount != x.SiteId {
sameFields["Artifact"]["PageCount"]["SiteId"] = false
}
if x.PageCount != x.StructureLocalId {
sameFields["Artifact"]["PageCount"]["StructureLocalId"] = false
}
if x.PageCount != x.SubregionId {
sameFields["Artifact"]["PageCount"]["SubregionId"] = false
}
if x.Writing != x.AbsTileX {
sameFields["Artifact"]["Writing"]["AbsTileX"] = false
}
if x.Writing != x.AbsTileY {
sameFields["Artifact"]["Writing"]["AbsTileY"] = false
}
if x.Writing != x.AbsTileZ {
sameFields["Artifact"]["Writing"]["AbsTileZ"] = false
}
if x.Writing != x.HolderHfid {
sameFields["Artifact"]["Writing"]["HolderHfid"] = false
}
if x.Writing != x.SiteId {
sameFields["Artifact"]["Writing"]["SiteId"] = false
}
if x.Writing != x.StructureLocalId {
sameFields["Artifact"]["Writing"]["StructureLocalId"] = false
}
if x.Writing != x.SubregionId {
sameFields["Artifact"]["Writing"]["SubregionId"] = false
}
}
func (x *Artifact) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AbsTileX != -1 {
d["absTileX"] = x.AbsTileX
}
if x.AbsTileY != -1 {
d["absTileY"] = x.AbsTileY
}
if x.AbsTileZ != -1 {
d["absTileZ"] = x.AbsTileZ
}
if x.HolderHfid != -1 {
d["holderHfid"] = x.HolderHfid
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["item"] = x.Item
d["itemDescription"] = x.ItemDescription
d["itemSubtype"] = x.ItemSubtype
d["itemType"] = x.ItemType
d["mat"] = x.Mat
d["name"] = x.Name_
if x.PageCount != -1 {
d["pageCount"] = x.PageCount
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureLocalId != -1 {
d["structureLocalId"] = x.StructureLocalId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.Writing != -1 {
d["writing"] = x.Writing
}
return json.Marshal(d)
}
type Creature struct {
AllCastesAlive bool `json:"allCastesAlive" legend:"plus"` // all_castes_alive
ArtificialHiveable bool `json:"artificialHiveable" legend:"plus"` // artificial_hiveable
BiomeDesertBadland bool `json:"biomeDesertBadland" legend:"plus"` // biome_desert_badland
BiomeDesertRock bool `json:"biomeDesertRock" legend:"plus"` // biome_desert_rock
BiomeDesertSand bool `json:"biomeDesertSand" legend:"plus"` // biome_desert_sand
BiomeForestTaiga bool `json:"biomeForestTaiga" legend:"plus"` // biome_forest_taiga
BiomeForestTemperateBroadleaf bool `json:"biomeForestTemperateBroadleaf" legend:"plus"` // biome_forest_temperate_broadleaf
BiomeForestTemperateConifer bool `json:"biomeForestTemperateConifer" legend:"plus"` // biome_forest_temperate_conifer
BiomeForestTropicalConifer bool `json:"biomeForestTropicalConifer" legend:"plus"` // biome_forest_tropical_conifer
BiomeForestTropicalDryBroadleaf bool `json:"biomeForestTropicalDryBroadleaf" legend:"plus"` // biome_forest_tropical_dry_broadleaf
BiomeForestTropicalMoistBroadleaf bool `json:"biomeForestTropicalMoistBroadleaf" legend:"plus"` // biome_forest_tropical_moist_broadleaf
BiomeGlacier bool `json:"biomeGlacier" legend:"plus"` // biome_glacier
BiomeGrasslandTemperate bool `json:"biomeGrasslandTemperate" legend:"plus"` // biome_grassland_temperate
BiomeGrasslandTropical bool `json:"biomeGrasslandTropical" legend:"plus"` // biome_grassland_tropical
BiomeLakeTemperateBrackishwater bool `json:"biomeLakeTemperateBrackishwater" legend:"plus"` // biome_lake_temperate_brackishwater
BiomeLakeTemperateFreshwater bool `json:"biomeLakeTemperateFreshwater" legend:"plus"` // biome_lake_temperate_freshwater
BiomeLakeTemperateSaltwater bool `json:"biomeLakeTemperateSaltwater" legend:"plus"` // biome_lake_temperate_saltwater
BiomeLakeTropicalBrackishwater bool `json:"biomeLakeTropicalBrackishwater" legend:"plus"` // biome_lake_tropical_brackishwater
BiomeLakeTropicalFreshwater bool `json:"biomeLakeTropicalFreshwater" legend:"plus"` // biome_lake_tropical_freshwater
BiomeLakeTropicalSaltwater bool `json:"biomeLakeTropicalSaltwater" legend:"plus"` // biome_lake_tropical_saltwater
BiomeMarshTemperateFreshwater bool `json:"biomeMarshTemperateFreshwater" legend:"plus"` // biome_marsh_temperate_freshwater
BiomeMarshTemperateSaltwater bool `json:"biomeMarshTemperateSaltwater" legend:"plus"` // biome_marsh_temperate_saltwater
BiomeMarshTropicalFreshwater bool `json:"biomeMarshTropicalFreshwater" legend:"plus"` // biome_marsh_tropical_freshwater
BiomeMarshTropicalSaltwater bool `json:"biomeMarshTropicalSaltwater" legend:"plus"` // biome_marsh_tropical_saltwater
BiomeMountain bool `json:"biomeMountain" legend:"plus"` // biome_mountain
BiomeOceanArctic bool `json:"biomeOceanArctic" legend:"plus"` // biome_ocean_arctic
BiomeOceanTemperate bool `json:"biomeOceanTemperate" legend:"plus"` // biome_ocean_temperate
BiomeOceanTropical bool `json:"biomeOceanTropical" legend:"plus"` // biome_ocean_tropical
BiomePoolTemperateBrackishwater bool `json:"biomePoolTemperateBrackishwater" legend:"plus"` // biome_pool_temperate_brackishwater
BiomePoolTemperateFreshwater bool `json:"biomePoolTemperateFreshwater" legend:"plus"` // biome_pool_temperate_freshwater
BiomePoolTemperateSaltwater bool `json:"biomePoolTemperateSaltwater" legend:"plus"` // biome_pool_temperate_saltwater
BiomePoolTropicalBrackishwater bool `json:"biomePoolTropicalBrackishwater" legend:"plus"` // biome_pool_tropical_brackishwater
BiomePoolTropicalFreshwater bool `json:"biomePoolTropicalFreshwater" legend:"plus"` // biome_pool_tropical_freshwater
BiomePoolTropicalSaltwater bool `json:"biomePoolTropicalSaltwater" legend:"plus"` // biome_pool_tropical_saltwater
BiomeRiverTemperateBrackishwater bool `json:"biomeRiverTemperateBrackishwater" legend:"plus"` // biome_river_temperate_brackishwater
BiomeRiverTemperateFreshwater bool `json:"biomeRiverTemperateFreshwater" legend:"plus"` // biome_river_temperate_freshwater
BiomeRiverTemperateSaltwater bool `json:"biomeRiverTemperateSaltwater" legend:"plus"` // biome_river_temperate_saltwater
BiomeRiverTropicalBrackishwater bool `json:"biomeRiverTropicalBrackishwater" legend:"plus"` // biome_river_tropical_brackishwater
BiomeRiverTropicalFreshwater bool `json:"biomeRiverTropicalFreshwater" legend:"plus"` // biome_river_tropical_freshwater
BiomeRiverTropicalSaltwater bool `json:"biomeRiverTropicalSaltwater" legend:"plus"` // biome_river_tropical_saltwater
BiomeSavannaTemperate bool `json:"biomeSavannaTemperate" legend:"plus"` // biome_savanna_temperate
BiomeSavannaTropical bool `json:"biomeSavannaTropical" legend:"plus"` // biome_savanna_tropical
BiomeShrublandTemperate bool `json:"biomeShrublandTemperate" legend:"plus"` // biome_shrubland_temperate
BiomeShrublandTropical bool `json:"biomeShrublandTropical" legend:"plus"` // biome_shrubland_tropical
BiomeSubterraneanChasm bool `json:"biomeSubterraneanChasm" legend:"plus"` // biome_subterranean_chasm
BiomeSubterraneanLava bool `json:"biomeSubterraneanLava" legend:"plus"` // biome_subterranean_lava
BiomeSubterraneanWater bool `json:"biomeSubterraneanWater" legend:"plus"` // biome_subterranean_water
BiomeSwampMangrove bool `json:"biomeSwampMangrove" legend:"plus"` // biome_swamp_mangrove
BiomeSwampTemperateFreshwater bool `json:"biomeSwampTemperateFreshwater" legend:"plus"` // biome_swamp_temperate_freshwater
BiomeSwampTemperateSaltwater bool `json:"biomeSwampTemperateSaltwater" legend:"plus"` // biome_swamp_temperate_saltwater
BiomeSwampTropicalFreshwater bool `json:"biomeSwampTropicalFreshwater" legend:"plus"` // biome_swamp_tropical_freshwater
BiomeSwampTropicalSaltwater bool `json:"biomeSwampTropicalSaltwater" legend:"plus"` // biome_swamp_tropical_saltwater
BiomeTundra bool `json:"biomeTundra" legend:"plus"` // biome_tundra
CreatureId string `json:"creatureId" legend:"plus"` // creature_id
DoesNotExist bool `json:"doesNotExist" legend:"plus"` // does_not_exist
Equipment bool `json:"equipment" legend:"plus"` // equipment
EquipmentWagon bool `json:"equipmentWagon" legend:"plus"` // equipment_wagon
Evil bool `json:"evil" legend:"plus"` // evil
Fanciful bool `json:"fanciful" legend:"plus"` // fanciful
Generated bool `json:"generated" legend:"plus"` // generated
Good bool `json:"good" legend:"plus"` // good
HasAnyBenign bool `json:"hasAnyBenign" legend:"plus"` // has_any_benign
HasAnyCanSwim bool `json:"hasAnyCanSwim" legend:"plus"` // has_any_can_swim
HasAnyCannotBreatheAir bool `json:"hasAnyCannotBreatheAir" legend:"plus"` // has_any_cannot_breathe_air
HasAnyCannotBreatheWater bool `json:"hasAnyCannotBreatheWater" legend:"plus"` // has_any_cannot_breathe_water
HasAnyCarnivore bool `json:"hasAnyCarnivore" legend:"plus"` // has_any_carnivore
HasAnyCommonDomestic bool `json:"hasAnyCommonDomestic" legend:"plus"` // has_any_common_domestic
HasAnyCuriousBeast bool `json:"hasAnyCuriousBeast" legend:"plus"` // has_any_curious_beast
HasAnyDemon bool `json:"hasAnyDemon" legend:"plus"` // has_any_demon
HasAnyFeatureBeast bool `json:"hasAnyFeatureBeast" legend:"plus"` // has_any_feature_beast
HasAnyFlier bool `json:"hasAnyFlier" legend:"plus"` // has_any_flier
HasAnyFlyRaceGait bool `json:"hasAnyFlyRaceGait" legend:"plus"` // has_any_fly_race_gait
HasAnyGrasp bool `json:"hasAnyGrasp" legend:"plus"` // has_any_grasp
HasAnyGrazer bool `json:"hasAnyGrazer" legend:"plus"` // has_any_grazer
HasAnyHasBlood bool `json:"hasAnyHasBlood" legend:"plus"` // has_any_has_blood
HasAnyImmobile bool `json:"hasAnyImmobile" legend:"plus"` // has_any_immobile
HasAnyIntelligentLearns bool `json:"hasAnyIntelligentLearns" legend:"plus"` // has_any_intelligent_learns
HasAnyIntelligentSpeaks bool `json:"hasAnyIntelligentSpeaks" legend:"plus"` // has_any_intelligent_speaks
HasAnyLargePredator bool `json:"hasAnyLargePredator" legend:"plus"` // has_any_large_predator
HasAnyLocalPopsControllable bool `json:"hasAnyLocalPopsControllable" legend:"plus"` // has_any_local_pops_controllable
HasAnyLocalPopsProduceHeroes bool `json:"hasAnyLocalPopsProduceHeroes" legend:"plus"` // has_any_local_pops_produce_heroes
HasAnyMegabeast bool `json:"hasAnyMegabeast" legend:"plus"` // has_any_megabeast
HasAnyMischievous bool `json:"hasAnyMischievous" legend:"plus"` // has_any_mischievous
HasAnyNaturalAnimal bool `json:"hasAnyNaturalAnimal" legend:"plus"` // has_any_natural_animal
HasAnyNightCreature bool `json:"hasAnyNightCreature" legend:"plus"` // has_any_night_creature
HasAnyNightCreatureBogeyman bool `json:"hasAnyNightCreatureBogeyman" legend:"plus"` // has_any_night_creature_bogeyman
HasAnyNightCreatureHunter bool `json:"hasAnyNightCreatureHunter" legend:"plus"` // has_any_night_creature_hunter
HasAnyNightCreatureNightmare bool `json:"hasAnyNightCreatureNightmare" legend:"plus"` // has_any_night_creature_nightmare
HasAnyNotFireimmune bool `json:"hasAnyNotFireimmune" legend:"plus"` // has_any_not_fireimmune
HasAnyNotLiving bool `json:"hasAnyNotLiving" legend:"plus"` // has_any_not_living
HasAnyOutsiderControllable bool `json:"hasAnyOutsiderControllable" legend:"plus"` // has_any_outsider_controllable
HasAnyRaceGait bool `json:"hasAnyRaceGait" legend:"plus"` // has_any_race_gait
HasAnySemimegabeast bool `json:"hasAnySemimegabeast" legend:"plus"` // has_any_semimegabeast
HasAnySlowLearner bool `json:"hasAnySlowLearner" legend:"plus"` // has_any_slow_learner
HasAnySupernatural bool `json:"hasAnySupernatural" legend:"plus"` // has_any_supernatural
HasAnyTitan bool `json:"hasAnyTitan" legend:"plus"` // has_any_titan
HasAnyUniqueDemon bool `json:"hasAnyUniqueDemon" legend:"plus"` // has_any_unique_demon
HasAnyUtterances bool `json:"hasAnyUtterances" legend:"plus"` // has_any_utterances
HasAnyVerminHateable bool `json:"hasAnyVerminHateable" legend:"plus"` // has_any_vermin_hateable
HasAnyVerminMicro bool `json:"hasAnyVerminMicro" legend:"plus"` // has_any_vermin_micro
HasFemale bool `json:"hasFemale" legend:"plus"` // has_female
HasMale bool `json:"hasMale" legend:"plus"` // has_male
LargeRoaming bool `json:"largeRoaming" legend:"plus"` // large_roaming
LooseClusters bool `json:"looseClusters" legend:"plus"` // loose_clusters
MatesToBreed bool `json:"matesToBreed" legend:"plus"` // mates_to_breed
Mundane bool `json:"mundane" legend:"plus"` // mundane
NamePlural string `json:"namePlural" legend:"plus"` // name_plural
NameSingular string `json:"nameSingular" legend:"plus"` // name_singular
OccursAsEntityRace bool `json:"occursAsEntityRace" legend:"plus"` // occurs_as_entity_race
Savage bool `json:"savage" legend:"plus"` // savage
SmallRace bool `json:"smallRace" legend:"plus"` // small_race
TwoGenders bool `json:"twoGenders" legend:"plus"` // two_genders
Ubiquitous bool `json:"ubiquitous" legend:"plus"` // ubiquitous
VerminEater bool `json:"verminEater" legend:"plus"` // vermin_eater
VerminFish bool `json:"verminFish" legend:"plus"` // vermin_fish
VerminGrounder bool `json:"verminGrounder" legend:"plus"` // vermin_grounder
VerminRotter bool `json:"verminRotter" legend:"plus"` // vermin_rotter
VerminSoil bool `json:"verminSoil" legend:"plus"` // vermin_soil
VerminSoilColony bool `json:"verminSoilColony" legend:"plus"` // vermin_soil_colony
}
func NewCreature() *Creature {
return &Creature{}
}
func (x *Creature) RelatedToEntity(id int) bool { return false }
func (x *Creature) RelatedToHf(id int) bool { return false }
func (x *Creature) RelatedToArtifact(id int) bool { return false }
func (x *Creature) RelatedToSite(id int) bool { return false }
func (x *Creature) RelatedToRegion(id int) bool { return false }
func (x *Creature) CheckFields() {
}
func (x *Creature) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["allCastesAlive"] = x.AllCastesAlive
d["artificialHiveable"] = x.ArtificialHiveable
d["biomeDesertBadland"] = x.BiomeDesertBadland
d["biomeDesertRock"] = x.BiomeDesertRock
d["biomeDesertSand"] = x.BiomeDesertSand
d["biomeForestTaiga"] = x.BiomeForestTaiga
d["biomeForestTemperateBroadleaf"] = x.BiomeForestTemperateBroadleaf
d["biomeForestTemperateConifer"] = x.BiomeForestTemperateConifer
d["biomeForestTropicalConifer"] = x.BiomeForestTropicalConifer
d["biomeForestTropicalDryBroadleaf"] = x.BiomeForestTropicalDryBroadleaf
d["biomeForestTropicalMoistBroadleaf"] = x.BiomeForestTropicalMoistBroadleaf
d["biomeGlacier"] = x.BiomeGlacier
d["biomeGrasslandTemperate"] = x.BiomeGrasslandTemperate
d["biomeGrasslandTropical"] = x.BiomeGrasslandTropical
d["biomeLakeTemperateBrackishwater"] = x.BiomeLakeTemperateBrackishwater
d["biomeLakeTemperateFreshwater"] = x.BiomeLakeTemperateFreshwater
d["biomeLakeTemperateSaltwater"] = x.BiomeLakeTemperateSaltwater
d["biomeLakeTropicalBrackishwater"] = x.BiomeLakeTropicalBrackishwater
d["biomeLakeTropicalFreshwater"] = x.BiomeLakeTropicalFreshwater
d["biomeLakeTropicalSaltwater"] = x.BiomeLakeTropicalSaltwater
d["biomeMarshTemperateFreshwater"] = x.BiomeMarshTemperateFreshwater
d["biomeMarshTemperateSaltwater"] = x.BiomeMarshTemperateSaltwater
d["biomeMarshTropicalFreshwater"] = x.BiomeMarshTropicalFreshwater
d["biomeMarshTropicalSaltwater"] = x.BiomeMarshTropicalSaltwater
d["biomeMountain"] = x.BiomeMountain
d["biomeOceanArctic"] = x.BiomeOceanArctic
d["biomeOceanTemperate"] = x.BiomeOceanTemperate
d["biomeOceanTropical"] = x.BiomeOceanTropical
d["biomePoolTemperateBrackishwater"] = x.BiomePoolTemperateBrackishwater
d["biomePoolTemperateFreshwater"] = x.BiomePoolTemperateFreshwater
d["biomePoolTemperateSaltwater"] = x.BiomePoolTemperateSaltwater
d["biomePoolTropicalBrackishwater"] = x.BiomePoolTropicalBrackishwater
d["biomePoolTropicalFreshwater"] = x.BiomePoolTropicalFreshwater
d["biomePoolTropicalSaltwater"] = x.BiomePoolTropicalSaltwater
d["biomeRiverTemperateBrackishwater"] = x.BiomeRiverTemperateBrackishwater
d["biomeRiverTemperateFreshwater"] = x.BiomeRiverTemperateFreshwater
d["biomeRiverTemperateSaltwater"] = x.BiomeRiverTemperateSaltwater
d["biomeRiverTropicalBrackishwater"] = x.BiomeRiverTropicalBrackishwater
d["biomeRiverTropicalFreshwater"] = x.BiomeRiverTropicalFreshwater
d["biomeRiverTropicalSaltwater"] = x.BiomeRiverTropicalSaltwater
d["biomeSavannaTemperate"] = x.BiomeSavannaTemperate
d["biomeSavannaTropical"] = x.BiomeSavannaTropical
d["biomeShrublandTemperate"] = x.BiomeShrublandTemperate
d["biomeShrublandTropical"] = x.BiomeShrublandTropical
d["biomeSubterraneanChasm"] = x.BiomeSubterraneanChasm
d["biomeSubterraneanLava"] = x.BiomeSubterraneanLava
d["biomeSubterraneanWater"] = x.BiomeSubterraneanWater
d["biomeSwampMangrove"] = x.BiomeSwampMangrove
d["biomeSwampTemperateFreshwater"] = x.BiomeSwampTemperateFreshwater
d["biomeSwampTemperateSaltwater"] = x.BiomeSwampTemperateSaltwater
d["biomeSwampTropicalFreshwater"] = x.BiomeSwampTropicalFreshwater
d["biomeSwampTropicalSaltwater"] = x.BiomeSwampTropicalSaltwater
d["biomeTundra"] = x.BiomeTundra
d["creatureId"] = x.CreatureId
d["doesNotExist"] = x.DoesNotExist
d["equipment"] = x.Equipment
d["equipmentWagon"] = x.EquipmentWagon
d["evil"] = x.Evil
d["fanciful"] = x.Fanciful
d["generated"] = x.Generated
d["good"] = x.Good
d["hasAnyBenign"] = x.HasAnyBenign
d["hasAnyCanSwim"] = x.HasAnyCanSwim
d["hasAnyCannotBreatheAir"] = x.HasAnyCannotBreatheAir
d["hasAnyCannotBreatheWater"] = x.HasAnyCannotBreatheWater
d["hasAnyCarnivore"] = x.HasAnyCarnivore
d["hasAnyCommonDomestic"] = x.HasAnyCommonDomestic
d["hasAnyCuriousBeast"] = x.HasAnyCuriousBeast
d["hasAnyDemon"] = x.HasAnyDemon
d["hasAnyFeatureBeast"] = x.HasAnyFeatureBeast
d["hasAnyFlier"] = x.HasAnyFlier
d["hasAnyFlyRaceGait"] = x.HasAnyFlyRaceGait
d["hasAnyGrasp"] = x.HasAnyGrasp
d["hasAnyGrazer"] = x.HasAnyGrazer
d["hasAnyHasBlood"] = x.HasAnyHasBlood
d["hasAnyImmobile"] = x.HasAnyImmobile
d["hasAnyIntelligentLearns"] = x.HasAnyIntelligentLearns
d["hasAnyIntelligentSpeaks"] = x.HasAnyIntelligentSpeaks
d["hasAnyLargePredator"] = x.HasAnyLargePredator
d["hasAnyLocalPopsControllable"] = x.HasAnyLocalPopsControllable
d["hasAnyLocalPopsProduceHeroes"] = x.HasAnyLocalPopsProduceHeroes
d["hasAnyMegabeast"] = x.HasAnyMegabeast
d["hasAnyMischievous"] = x.HasAnyMischievous
d["hasAnyNaturalAnimal"] = x.HasAnyNaturalAnimal
d["hasAnyNightCreature"] = x.HasAnyNightCreature
d["hasAnyNightCreatureBogeyman"] = x.HasAnyNightCreatureBogeyman
d["hasAnyNightCreatureHunter"] = x.HasAnyNightCreatureHunter
d["hasAnyNightCreatureNightmare"] = x.HasAnyNightCreatureNightmare
d["hasAnyNotFireimmune"] = x.HasAnyNotFireimmune
d["hasAnyNotLiving"] = x.HasAnyNotLiving
d["hasAnyOutsiderControllable"] = x.HasAnyOutsiderControllable
d["hasAnyRaceGait"] = x.HasAnyRaceGait
d["hasAnySemimegabeast"] = x.HasAnySemimegabeast
d["hasAnySlowLearner"] = x.HasAnySlowLearner
d["hasAnySupernatural"] = x.HasAnySupernatural
d["hasAnyTitan"] = x.HasAnyTitan
d["hasAnyUniqueDemon"] = x.HasAnyUniqueDemon
d["hasAnyUtterances"] = x.HasAnyUtterances
d["hasAnyVerminHateable"] = x.HasAnyVerminHateable
d["hasAnyVerminMicro"] = x.HasAnyVerminMicro
d["hasFemale"] = x.HasFemale
d["hasMale"] = x.HasMale
d["largeRoaming"] = x.LargeRoaming
d["looseClusters"] = x.LooseClusters
d["matesToBreed"] = x.MatesToBreed
d["mundane"] = x.Mundane
d["namePlural"] = x.NamePlural
d["nameSingular"] = x.NameSingular
d["occursAsEntityRace"] = x.OccursAsEntityRace
d["savage"] = x.Savage
d["smallRace"] = x.SmallRace
d["twoGenders"] = x.TwoGenders
d["ubiquitous"] = x.Ubiquitous
d["verminEater"] = x.VerminEater
d["verminFish"] = x.VerminFish
d["verminGrounder"] = x.VerminGrounder
d["verminRotter"] = x.VerminRotter
d["verminSoil"] = x.VerminSoil
d["verminSoilColony"] = x.VerminSoilColony
return json.Marshal(d)
}
type DanceForm struct {
Description string `json:"description" legend:"base"` // description
Id_ int `json:"id" legend:"both"` // id
Name_ string `json:"name" legend:"plus"` // name
}
func NewDanceForm() *DanceForm {
return &DanceForm{
Id_: -1,
}
}
func (x *DanceForm) Id() int { return x.Id_ }
func (x *DanceForm) setId(id int) { x.Id_ = id }
func (x *DanceForm) Name() string { return x.Name_ }
func (x *DanceForm) RelatedToEntity(id int) bool { return false }
func (x *DanceForm) RelatedToHf(id int) bool { return false }
func (x *DanceForm) RelatedToArtifact(id int) bool { return false }
func (x *DanceForm) RelatedToSite(id int) bool { return false }
func (x *DanceForm) RelatedToRegion(id int) bool { return false }
func (x *DanceForm) CheckFields() {
}
func (x *DanceForm) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["description"] = x.Description
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
return json.Marshal(d)
}
type DfWorld struct {
Altname string `json:"altname" legend:"plus"` // altname
Artifacts map[int]*Artifact `json:"artifacts" legend:"both"` // artifacts
CreatureRaw []*Creature `json:"creatureRaw" legend:"plus"` // creature_raw
DanceForms map[int]*DanceForm `json:"danceForms" legend:"both"` // dance_forms
Entities map[int]*Entity `json:"entities" legend:"both"` // entities
EntityPopulations map[int]*EntityPopulation `json:"entityPopulations" legend:"both"` // entity_populations
HistoricalEras []*HistoricalEra `json:"historicalEras" legend:"both"` // historical_eras
HistoricalEventCollections map[int]*HistoricalEventCollection `json:"historicalEventCollections" legend:"both"` // historical_event_collections
HistoricalEventRelationshipSupplements []*HistoricalEventRelationshipSupplement `json:"historicalEventRelationshipSupplements" legend:"plus"` // historical_event_relationship_supplements
HistoricalEventRelationships []*HistoricalEventRelationship `json:"historicalEventRelationships" legend:"plus"` // historical_event_relationships
HistoricalEvents map[int]*HistoricalEvent `json:"historicalEvents" legend:"both"` // historical_events
HistoricalFigures map[int]*HistoricalFigure `json:"historicalFigures" legend:"both"` // historical_figures
Identities map[int]*Identity `json:"identities" legend:"plus"` // identities
Landmasses map[int]*Landmass `json:"landmasses" legend:"plus"` // landmasses
MountainPeaks map[int]*MountainPeak `json:"mountainPeaks" legend:"plus"` // mountain_peaks
MusicalForms map[int]*MusicalForm `json:"musicalForms" legend:"both"` // musical_forms
Name_ string `json:"name" legend:"plus"` // name
PoeticForms map[int]*PoeticForm `json:"poeticForms" legend:"both"` // poetic_forms
Regions map[int]*Region `json:"regions" legend:"both"` // regions
Rivers []*River `json:"rivers" legend:"plus"` // rivers
Sites map[int]*Site `json:"sites" legend:"both"` // sites
UndergroundRegions map[int]*UndergroundRegion `json:"undergroundRegions" legend:"both"` // underground_regions
WorldConstructions map[int]*WorldConstruction `json:"worldConstructions" legend:"both"` // world_constructions
WrittenContents map[int]*WrittenContent `json:"writtenContents" legend:"both"` // written_contents
}
func NewDfWorld() *DfWorld {
return &DfWorld{
Artifacts: make(map[int]*Artifact),
DanceForms: make(map[int]*DanceForm),
Entities: make(map[int]*Entity),
EntityPopulations: make(map[int]*EntityPopulation),
HistoricalEventCollections: make(map[int]*HistoricalEventCollection),
HistoricalEvents: make(map[int]*HistoricalEvent),
HistoricalFigures: make(map[int]*HistoricalFigure),
Identities: make(map[int]*Identity),
Landmasses: make(map[int]*Landmass),
MountainPeaks: make(map[int]*MountainPeak),
MusicalForms: make(map[int]*MusicalForm),
PoeticForms: make(map[int]*PoeticForm),
Regions: make(map[int]*Region),
Sites: make(map[int]*Site),
UndergroundRegions: make(map[int]*UndergroundRegion),
WorldConstructions: make(map[int]*WorldConstruction),
WrittenContents: make(map[int]*WrittenContent),
}
}
func (x *DfWorld) Name() string { return x.Name_ }
func (x *DfWorld) RelatedToEntity(id int) bool { return false }
func (x *DfWorld) RelatedToHf(id int) bool { return false }
func (x *DfWorld) RelatedToArtifact(id int) bool { return false }
func (x *DfWorld) RelatedToSite(id int) bool { return false }
func (x *DfWorld) RelatedToRegion(id int) bool { return false }
func (x *DfWorld) CheckFields() {
}
func (x *DfWorld) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["altname"] = x.Altname
d["artifacts"] = x.Artifacts
d["creatureRaw"] = x.CreatureRaw
d["danceForms"] = x.DanceForms
d["entities"] = x.Entities
d["entityPopulations"] = x.EntityPopulations
d["historicalEras"] = x.HistoricalEras
d["historicalEventCollections"] = x.HistoricalEventCollections
d["historicalEventRelationshipSupplements"] = x.HistoricalEventRelationshipSupplements
d["historicalEventRelationships"] = x.HistoricalEventRelationships
d["historicalEvents"] = x.HistoricalEvents
d["historicalFigures"] = x.HistoricalFigures
d["identities"] = x.Identities
d["landmasses"] = x.Landmasses
d["mountainPeaks"] = x.MountainPeaks
d["musicalForms"] = x.MusicalForms
d["name"] = x.Name_
d["poeticForms"] = x.PoeticForms
d["regions"] = x.Regions
d["rivers"] = x.Rivers
d["sites"] = x.Sites
d["undergroundRegions"] = x.UndergroundRegions
d["worldConstructions"] = x.WorldConstructions
d["writtenContents"] = x.WrittenContents
return json.Marshal(d)
}
type EntityProfession int
const (
EntityProfession_Unknown EntityProfession = iota
EntityProfession_Armorer
EntityProfession_Blacksmith
EntityProfession_BoneCarver
EntityProfession_Bowyer
EntityProfession_Carpenter
EntityProfession_Clothier
EntityProfession_Craftsman
EntityProfession_Doctor
EntityProfession_Engineer
EntityProfession_Engraver
EntityProfession_Farmer
EntityProfession_FurnaceOperator
EntityProfession_GemCutter
EntityProfession_Glassmaker
EntityProfession_Leatherworker
EntityProfession_Mason
EntityProfession_Metalcrafter
EntityProfession_Metalsmith
EntityProfession_Miner
EntityProfession_Planter
EntityProfession_PumpOperator
EntityProfession_Ranger
EntityProfession_Stoneworker
EntityProfession_Tanner
EntityProfession_Weaponsmith
EntityProfession_Weaver
EntityProfession_Woodworker
)
func parseEntityProfession(s string) EntityProfession {
switch s {
case "armorer":
return EntityProfession_Armorer
case "blacksmith":
return EntityProfession_Blacksmith
case "bone_carver":
return EntityProfession_BoneCarver
case "bowyer":
return EntityProfession_Bowyer
case "carpenter":
return EntityProfession_Carpenter
case "clothier":
return EntityProfession_Clothier
case "craftsman":
return EntityProfession_Craftsman
case "doctor":
return EntityProfession_Doctor
case "engineer":
return EntityProfession_Engineer
case "engraver":
return EntityProfession_Engraver
case "farmer":
return EntityProfession_Farmer
case "furnace_operator":
return EntityProfession_FurnaceOperator
case "gem_cutter":
return EntityProfession_GemCutter
case "glassmaker":
return EntityProfession_Glassmaker
case "leatherworker":
return EntityProfession_Leatherworker
case "mason":
return EntityProfession_Mason
case "metalcrafter":
return EntityProfession_Metalcrafter
case "metalsmith":
return EntityProfession_Metalsmith
case "miner":
return EntityProfession_Miner
case "planter":
return EntityProfession_Planter
case "pump_operator":
return EntityProfession_PumpOperator
case "ranger":
return EntityProfession_Ranger
case "stoneworker":
return EntityProfession_Stoneworker
case "tanner":
return EntityProfession_Tanner
case "weaponsmith":
return EntityProfession_Weaponsmith
case "weaver":
return EntityProfession_Weaver
case "woodworker":
return EntityProfession_Woodworker
}
return EntityProfession_Unknown
}
func (s EntityProfession) String() string {
switch s {
case EntityProfession_Armorer:
return "armorer"
case EntityProfession_Blacksmith:
return "blacksmith"
case EntityProfession_BoneCarver:
return "bone carver"
case EntityProfession_Bowyer:
return "bowyer"
case EntityProfession_Carpenter:
return "carpenter"
case EntityProfession_Clothier:
return "clothier"
case EntityProfession_Craftsman:
return "craftsman"
case EntityProfession_Doctor:
return "doctor"
case EntityProfession_Engineer:
return "engineer"
case EntityProfession_Engraver:
return "engraver"
case EntityProfession_Farmer:
return "farmer"
case EntityProfession_FurnaceOperator:
return "furnace operator"
case EntityProfession_GemCutter:
return "gem cutter"
case EntityProfession_Glassmaker:
return "glassmaker"
case EntityProfession_Leatherworker:
return "leatherworker"
case EntityProfession_Mason:
return "mason"
case EntityProfession_Metalcrafter:
return "metalcrafter"
case EntityProfession_Metalsmith:
return "metalsmith"
case EntityProfession_Miner:
return "miner"
case EntityProfession_Planter:
return "planter"
case EntityProfession_PumpOperator:
return "pump operator"
case EntityProfession_Ranger:
return "ranger"
case EntityProfession_Stoneworker:
return "stoneworker"
case EntityProfession_Tanner:
return "tanner"
case EntityProfession_Weaponsmith:
return "weaponsmith"
case EntityProfession_Weaver:
return "weaver"
case EntityProfession_Woodworker:
return "woodworker"
}
return "unknown"
}
func (s EntityProfession) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type EntityType int
const (
EntityType_Unknown EntityType = iota
EntityType_Civilization
EntityType_Guild
EntityType_Merchantcompany
EntityType_Migratinggroup
EntityType_Militaryunit
EntityType_Nomadicgroup
EntityType_Outcast
EntityType_Performancetroupe
EntityType_Religion
EntityType_Sitegovernment
)
func parseEntityType(s string) EntityType {
switch s {
case "civilization":
return EntityType_Civilization
case "guild":
return EntityType_Guild
case "merchantcompany":
return EntityType_Merchantcompany
case "migratinggroup":
return EntityType_Migratinggroup
case "militaryunit":
return EntityType_Militaryunit
case "nomadicgroup":
return EntityType_Nomadicgroup
case "outcast":
return EntityType_Outcast
case "performancetroupe":
return EntityType_Performancetroupe
case "religion":
return EntityType_Religion
case "sitegovernment":
return EntityType_Sitegovernment
}
return EntityType_Unknown
}
func (s EntityType) String() string {
switch s {
case EntityType_Civilization:
return "civilization"
case EntityType_Guild:
return "guild"
case EntityType_Merchantcompany:
return "merchantcompany"
case EntityType_Migratinggroup:
return "migratinggroup"
case EntityType_Militaryunit:
return "militaryunit"
case EntityType_Nomadicgroup:
return "nomadicgroup"
case EntityType_Outcast:
return "outcast"
case EntityType_Performancetroupe:
return "performancetroupe"
case EntityType_Religion:
return "religion"
case EntityType_Sitegovernment:
return "sitegovernment"
}
return "unknown"
}
func (s EntityType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type EntityWeapon int
const (
EntityWeapon_Unknown EntityWeapon = iota
EntityWeapon_BattleAxe
EntityWeapon_Blowgun
EntityWeapon_Bow
EntityWeapon_Crossbow
EntityWeapon_Dagger
EntityWeapon_Flail
EntityWeapon_GreatAxe
EntityWeapon_Halberd
EntityWeapon_LongSword
EntityWeapon_Mace
EntityWeapon_Maul
EntityWeapon_Morningstar
EntityWeapon_Pike
EntityWeapon_Scimitar
EntityWeapon_Scourge
EntityWeapon_ShortSword
EntityWeapon_Spear
EntityWeapon_TwoHandedSword
EntityWeapon_WarHammer
EntityWeapon_Whip
)
func parseEntityWeapon(s string) EntityWeapon {
switch s {
case "battle axe":
return EntityWeapon_BattleAxe
case "blowgun":
return EntityWeapon_Blowgun
case "bow":
return EntityWeapon_Bow
case "crossbow":
return EntityWeapon_Crossbow
case "dagger":
return EntityWeapon_Dagger
case "flail":
return EntityWeapon_Flail
case "great axe":
return EntityWeapon_GreatAxe
case "halberd":
return EntityWeapon_Halberd
case "long sword":
return EntityWeapon_LongSword
case "mace":
return EntityWeapon_Mace
case "maul":
return EntityWeapon_Maul
case "morningstar":
return EntityWeapon_Morningstar
case "pike":
return EntityWeapon_Pike
case "scimitar":
return EntityWeapon_Scimitar
case "scourge":
return EntityWeapon_Scourge
case "short sword":
return EntityWeapon_ShortSword
case "spear":
return EntityWeapon_Spear
case "two-handed sword":
return EntityWeapon_TwoHandedSword
case "war hammer":
return EntityWeapon_WarHammer
case "whip":
return EntityWeapon_Whip
}
return EntityWeapon_Unknown
}
func (s EntityWeapon) String() string {
switch s {
case EntityWeapon_BattleAxe:
return "battle axe"
case EntityWeapon_Blowgun:
return "blowgun"
case EntityWeapon_Bow:
return "bow"
case EntityWeapon_Crossbow:
return "crossbow"
case EntityWeapon_Dagger:
return "dagger"
case EntityWeapon_Flail:
return "flail"
case EntityWeapon_GreatAxe:
return "great axe"
case EntityWeapon_Halberd:
return "halberd"
case EntityWeapon_LongSword:
return "long sword"
case EntityWeapon_Mace:
return "mace"
case EntityWeapon_Maul:
return "maul"
case EntityWeapon_Morningstar:
return "morningstar"
case EntityWeapon_Pike:
return "pike"
case EntityWeapon_Scimitar:
return "scimitar"
case EntityWeapon_Scourge:
return "scourge"
case EntityWeapon_ShortSword:
return "short sword"
case EntityWeapon_Spear:
return "spear"
case EntityWeapon_TwoHandedSword:
return "two handed sword"
case EntityWeapon_WarHammer:
return "war hammer"
case EntityWeapon_Whip:
return "whip"
}
return "unknown"
}
func (s EntityWeapon) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type Entity struct {
Child []int `json:"child" legend:"plus"` // child
Claims string `json:"claims" legend:"plus"` // claims
EntityLink []*EntityEntityLink `json:"entityLink" legend:"plus"` // entity_link
EntityPosition []*EntityPosition `json:"entityPosition" legend:"plus"` // entity_position
EntityPositionAssignment []*EntityPositionAssignment `json:"entityPositionAssignment" legend:"plus"` // entity_position_assignment
HistfigId []int `json:"histfigId" legend:"plus"` // histfig_id
Honor []*Honor `json:"honor" legend:"base"` // honor
Id_ int `json:"id" legend:"both"` // id
Name_ string `json:"name" legend:"base"` // name
Occasion []*Occasion `json:"occasion" legend:"plus"` // occasion
Profession EntityProfession `json:"profession" legend:"plus"` // profession
Race string `json:"race" legend:"plus"` // race
Type_ EntityType `json:"type" legend:"plus"` // type
Weapon []EntityWeapon `json:"weapon" legend:"plus"` // weapon
WorshipId []int `json:"worshipId" legend:"plus"` // worship_id
Sites []int `json:"sites" legend:"add"` // Sites
}
func NewEntity() *Entity {
return &Entity{
Id_: -1,
}
}
func (x *Entity) Id() int { return x.Id_ }
func (x *Entity) setId(id int) { x.Id_ = id }
func (x *Entity) Name() string { return x.Name_ }
func (x *Entity) RelatedToEntity(id int) bool { return false }
func (x *Entity) RelatedToHf(id int) bool { return containsInt(x.HistfigId, id) }
func (x *Entity) RelatedToArtifact(id int) bool { return false }
func (x *Entity) RelatedToSite(id int) bool { return false }
func (x *Entity) RelatedToRegion(id int) bool { return false }
func (x *Entity) CheckFields() {
}
func (x *Entity) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["child"] = x.Child
d["claims"] = x.Claims
d["entityLink"] = x.EntityLink
d["entityPosition"] = x.EntityPosition
d["entityPositionAssignment"] = x.EntityPositionAssignment
d["histfigId"] = x.HistfigId
d["honor"] = x.Honor
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
d["occasion"] = x.Occasion
if x.Profession != 0 {
d["profession"] = x.Profession
}
d["race"] = x.Race
if x.Type_ != 0 {
d["type"] = x.Type_
}
d["weapon"] = x.Weapon
d["worshipId"] = x.WorshipId
return json.Marshal(d)
}
type EntityEntityLinkType int
const (
EntityEntityLinkType_Unknown EntityEntityLinkType = iota
EntityEntityLinkType_CHILD
EntityEntityLinkType_PARENT
EntityEntityLinkType_RELIGIOUS
)
func parseEntityEntityLinkType(s string) EntityEntityLinkType {
switch s {
case "CHILD":
return EntityEntityLinkType_CHILD
case "PARENT":
return EntityEntityLinkType_PARENT
case "RELIGIOUS":
return EntityEntityLinkType_RELIGIOUS
}
return EntityEntityLinkType_Unknown
}
func (s EntityEntityLinkType) String() string {
switch s {
case EntityEntityLinkType_CHILD:
return "child"
case EntityEntityLinkType_PARENT:
return "parent"
case EntityEntityLinkType_RELIGIOUS:
return "religious"
}
return "unknown"
}
func (s EntityEntityLinkType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type EntityEntityLink struct {
Strength int `json:"strength" legend:"plus"` // strength
Target int `json:"target" legend:"plus"` // target
Type_ EntityEntityLinkType `json:"type" legend:"plus"` // type
}
func NewEntityEntityLink() *EntityEntityLink {
return &EntityEntityLink{
Strength: -1,
Target: -1,
}
}
func (x *EntityEntityLink) RelatedToEntity(id int) bool { return false }
func (x *EntityEntityLink) RelatedToHf(id int) bool { return false }
func (x *EntityEntityLink) RelatedToArtifact(id int) bool { return false }
func (x *EntityEntityLink) RelatedToSite(id int) bool { return false }
func (x *EntityEntityLink) RelatedToRegion(id int) bool { return false }
func (x *EntityEntityLink) CheckFields() {
}
func (x *EntityEntityLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Strength != -1 {
d["strength"] = x.Strength
}
if x.Target != -1 {
d["target"] = x.Target
}
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type EntityFormerPositionLink struct {
EndYear int `json:"endYear" legend:"base"` // end_year
EntityId int `json:"entityId" legend:"base"` // entity_id
PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id
StartYear int `json:"startYear" legend:"base"` // start_year
}
func NewEntityFormerPositionLink() *EntityFormerPositionLink {
return &EntityFormerPositionLink{
EndYear: -1,
EntityId: -1,
PositionProfileId: -1,
StartYear: -1,
}
}
func (x *EntityFormerPositionLink) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *EntityFormerPositionLink) RelatedToHf(id int) bool { return false }
func (x *EntityFormerPositionLink) RelatedToArtifact(id int) bool { return false }
func (x *EntityFormerPositionLink) RelatedToSite(id int) bool { return false }
func (x *EntityFormerPositionLink) RelatedToRegion(id int) bool { return false }
func (x *EntityFormerPositionLink) CheckFields() {
}
func (x *EntityFormerPositionLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EndYear != -1 {
d["endYear"] = x.EndYear
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.PositionProfileId != -1 {
d["positionProfileId"] = x.PositionProfileId
}
if x.StartYear != -1 {
d["startYear"] = x.StartYear
}
return json.Marshal(d)
}
type EntityFormerSquadLink struct {
EndYear int `json:"endYear" legend:"base"` // end_year
EntityId int `json:"entityId" legend:"base"` // entity_id
SquadId int `json:"squadId" legend:"base"` // squad_id
StartYear int `json:"startYear" legend:"base"` // start_year
}
func NewEntityFormerSquadLink() *EntityFormerSquadLink {
return &EntityFormerSquadLink{
EndYear: -1,
EntityId: -1,
SquadId: -1,
StartYear: -1,
}
}
func (x *EntityFormerSquadLink) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *EntityFormerSquadLink) RelatedToHf(id int) bool { return false }
func (x *EntityFormerSquadLink) RelatedToArtifact(id int) bool { return false }
func (x *EntityFormerSquadLink) RelatedToSite(id int) bool { return false }
func (x *EntityFormerSquadLink) RelatedToRegion(id int) bool { return false }
func (x *EntityFormerSquadLink) CheckFields() {
}
func (x *EntityFormerSquadLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EndYear != -1 {
d["endYear"] = x.EndYear
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.SquadId != -1 {
d["squadId"] = x.SquadId
}
if x.StartYear != -1 {
d["startYear"] = x.StartYear
}
return json.Marshal(d)
}
type EntityPopulation struct {
CivId int `json:"civId" legend:"plus"` // civ_id
Id_ int `json:"id" legend:"both"` // id
Race string `json:"race" legend:"plus"` // race
}
func NewEntityPopulation() *EntityPopulation {
return &EntityPopulation{
CivId: -1,
Id_: -1,
}
}
func (x *EntityPopulation) Id() int { return x.Id_ }
func (x *EntityPopulation) setId(id int) { x.Id_ = id }
func (x *EntityPopulation) RelatedToEntity(id int) bool { return x.CivId == id }
func (x *EntityPopulation) RelatedToHf(id int) bool { return false }
func (x *EntityPopulation) RelatedToArtifact(id int) bool { return false }
func (x *EntityPopulation) RelatedToSite(id int) bool { return false }
func (x *EntityPopulation) RelatedToRegion(id int) bool { return false }
func (x *EntityPopulation) CheckFields() {
}
func (x *EntityPopulation) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["race"] = x.Race
return json.Marshal(d)
}
type EntityPosition struct {
Id_ int `json:"id" legend:"plus"` // id
Name_ string `json:"name" legend:"plus"` // name
NameFemale string `json:"nameFemale" legend:"plus"` // name_female
NameMale string `json:"nameMale" legend:"plus"` // name_male
Spouse string `json:"spouse" legend:"plus"` // spouse
SpouseFemale string `json:"spouseFemale" legend:"plus"` // spouse_female
SpouseMale string `json:"spouseMale" legend:"plus"` // spouse_male
}
func NewEntityPosition() *EntityPosition {
return &EntityPosition{
Id_: -1,
}
}
func (x *EntityPosition) Id() int { return x.Id_ }
func (x *EntityPosition) setId(id int) { x.Id_ = id }
func (x *EntityPosition) Name() string { return x.Name_ }
func (x *EntityPosition) RelatedToEntity(id int) bool { return false }
func (x *EntityPosition) RelatedToHf(id int) bool { return false }
func (x *EntityPosition) RelatedToArtifact(id int) bool { return false }
func (x *EntityPosition) RelatedToSite(id int) bool { return false }
func (x *EntityPosition) RelatedToRegion(id int) bool { return false }
func (x *EntityPosition) CheckFields() {
}
func (x *EntityPosition) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
d["nameFemale"] = x.NameFemale
d["nameMale"] = x.NameMale
d["spouse"] = x.Spouse
d["spouseFemale"] = x.SpouseFemale
d["spouseMale"] = x.SpouseMale
return json.Marshal(d)
}
type EntityPositionAssignment struct {
Histfig int `json:"histfig" legend:"plus"` // histfig
Id_ int `json:"id" legend:"plus"` // id
PositionId int `json:"positionId" legend:"plus"` // position_id
SquadId int `json:"squadId" legend:"plus"` // squad_id
}
func NewEntityPositionAssignment() *EntityPositionAssignment {
return &EntityPositionAssignment{
Histfig: -1,
Id_: -1,
PositionId: -1,
SquadId: -1,
}
}
func (x *EntityPositionAssignment) Id() int { return x.Id_ }
func (x *EntityPositionAssignment) setId(id int) { x.Id_ = id }
func (x *EntityPositionAssignment) RelatedToEntity(id int) bool { return false }
func (x *EntityPositionAssignment) RelatedToHf(id int) bool { return x.Histfig == id }
func (x *EntityPositionAssignment) RelatedToArtifact(id int) bool { return false }
func (x *EntityPositionAssignment) RelatedToSite(id int) bool { return false }
func (x *EntityPositionAssignment) RelatedToRegion(id int) bool { return false }
func (x *EntityPositionAssignment) CheckFields() {
}
func (x *EntityPositionAssignment) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Histfig != -1 {
d["histfig"] = x.Histfig
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
if x.PositionId != -1 {
d["positionId"] = x.PositionId
}
if x.SquadId != -1 {
d["squadId"] = x.SquadId
}
return json.Marshal(d)
}
type EntityPositionLink struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id
StartYear int `json:"startYear" legend:"base"` // start_year
}
func NewEntityPositionLink() *EntityPositionLink {
return &EntityPositionLink{
EntityId: -1,
PositionProfileId: -1,
StartYear: -1,
}
}
func (x *EntityPositionLink) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *EntityPositionLink) RelatedToHf(id int) bool { return false }
func (x *EntityPositionLink) RelatedToArtifact(id int) bool { return false }
func (x *EntityPositionLink) RelatedToSite(id int) bool { return false }
func (x *EntityPositionLink) RelatedToRegion(id int) bool { return false }
func (x *EntityPositionLink) CheckFields() {
}
func (x *EntityPositionLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.PositionProfileId != -1 {
d["positionProfileId"] = x.PositionProfileId
}
if x.StartYear != -1 {
d["startYear"] = x.StartYear
}
return json.Marshal(d)
}
type EntityReputation struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
FirstAgelessSeasonCount int `json:"firstAgelessSeasonCount" legend:"base"` // first_ageless_season_count
FirstAgelessYear int `json:"firstAgelessYear" legend:"base"` // first_ageless_year
RepBard int `json:"repBard" legend:"base"` // rep_bard
RepEnemyFighter int `json:"repEnemyFighter" legend:"base"` // rep_enemy_fighter
RepHero int `json:"repHero" legend:"base"` // rep_hero
RepHunter int `json:"repHunter" legend:"base"` // rep_hunter
RepKiller int `json:"repKiller" legend:"base"` // rep_killer
RepKnowledgePreserver int `json:"repKnowledgePreserver" legend:"base"` // rep_knowledge_preserver
RepPoet int `json:"repPoet" legend:"base"` // rep_poet
RepProtectorOfWeak int `json:"repProtectorOfWeak" legend:"base"` // rep_protector_of_weak
RepStoryteller int `json:"repStoryteller" legend:"base"` // rep_storyteller
RepThief int `json:"repThief" legend:"base"` // rep_thief
RepTreasureHunter int `json:"repTreasureHunter" legend:"base"` // rep_treasure_hunter
UnsolvedMurders int `json:"unsolvedMurders" legend:"base"` // unsolved_murders
}
func NewEntityReputation() *EntityReputation {
return &EntityReputation{
EntityId: -1,
FirstAgelessSeasonCount: -1,
FirstAgelessYear: -1,
RepBard: -1,
RepEnemyFighter: -1,
RepHero: -1,
RepHunter: -1,
RepKiller: -1,
RepKnowledgePreserver: -1,
RepPoet: -1,
RepProtectorOfWeak: -1,
RepStoryteller: -1,
RepThief: -1,
RepTreasureHunter: -1,
UnsolvedMurders: -1,
}
}
func (x *EntityReputation) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *EntityReputation) RelatedToHf(id int) bool { return false }
func (x *EntityReputation) RelatedToArtifact(id int) bool { return false }
func (x *EntityReputation) RelatedToSite(id int) bool { return false }
func (x *EntityReputation) RelatedToRegion(id int) bool { return false }
func (x *EntityReputation) CheckFields() {
}
func (x *EntityReputation) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.FirstAgelessSeasonCount != -1 {
d["firstAgelessSeasonCount"] = x.FirstAgelessSeasonCount
}
if x.FirstAgelessYear != -1 {
d["firstAgelessYear"] = x.FirstAgelessYear
}
if x.RepBard != -1 {
d["repBard"] = x.RepBard
}
if x.RepEnemyFighter != -1 {
d["repEnemyFighter"] = x.RepEnemyFighter
}
if x.RepHero != -1 {
d["repHero"] = x.RepHero
}
if x.RepHunter != -1 {
d["repHunter"] = x.RepHunter
}
if x.RepKiller != -1 {
d["repKiller"] = x.RepKiller
}
if x.RepKnowledgePreserver != -1 {
d["repKnowledgePreserver"] = x.RepKnowledgePreserver
}
if x.RepPoet != -1 {
d["repPoet"] = x.RepPoet
}
if x.RepProtectorOfWeak != -1 {
d["repProtectorOfWeak"] = x.RepProtectorOfWeak
}
if x.RepStoryteller != -1 {
d["repStoryteller"] = x.RepStoryteller
}
if x.RepThief != -1 {
d["repThief"] = x.RepThief
}
if x.RepTreasureHunter != -1 {
d["repTreasureHunter"] = x.RepTreasureHunter
}
if x.UnsolvedMurders != -1 {
d["unsolvedMurders"] = x.UnsolvedMurders
}
return json.Marshal(d)
}
type EntitySquadLink struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
SquadId int `json:"squadId" legend:"base"` // squad_id
SquadPosition int `json:"squadPosition" legend:"base"` // squad_position
StartYear int `json:"startYear" legend:"base"` // start_year
}
func NewEntitySquadLink() *EntitySquadLink {
return &EntitySquadLink{
EntityId: -1,
SquadId: -1,
SquadPosition: -1,
StartYear: -1,
}
}
func (x *EntitySquadLink) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *EntitySquadLink) RelatedToHf(id int) bool { return false }
func (x *EntitySquadLink) RelatedToArtifact(id int) bool { return false }
func (x *EntitySquadLink) RelatedToSite(id int) bool { return false }
func (x *EntitySquadLink) RelatedToRegion(id int) bool { return false }
func (x *EntitySquadLink) CheckFields() {
}
func (x *EntitySquadLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.SquadId != -1 {
d["squadId"] = x.SquadId
}
if x.SquadPosition != -1 {
d["squadPosition"] = x.SquadPosition
}
if x.StartYear != -1 {
d["startYear"] = x.StartYear
}
return json.Marshal(d)
}
type FeatureType int
const (
FeatureType_Unknown FeatureType = iota
FeatureType_Acrobats
FeatureType_Banners
FeatureType_Candles
FeatureType_Costumes
FeatureType_CriersInFront
FeatureType_DancePerformance
FeatureType_Images
FeatureType_IncenseBurning
FeatureType_MusicalPerformance
FeatureType_OrderOfPrecedence
FeatureType_PoetryRecital
FeatureType_Storytelling
FeatureType_TheGivingOfItems
FeatureType_TheSacrificeOfItems
)
func parseFeatureType(s string) FeatureType {
switch s {
case "acrobats":
return FeatureType_Acrobats
case "banners":
return FeatureType_Banners
case "candles":
return FeatureType_Candles
case "costumes":
return FeatureType_Costumes
case "criers_in_front":
return FeatureType_CriersInFront
case "dance_performance":
return FeatureType_DancePerformance
case "images":
return FeatureType_Images
case "incense_burning":
return FeatureType_IncenseBurning
case "musical_performance":
return FeatureType_MusicalPerformance
case "order_of_precedence":
return FeatureType_OrderOfPrecedence
case "poetry_recital":
return FeatureType_PoetryRecital
case "storytelling":
return FeatureType_Storytelling
case "the_giving_of_items":
return FeatureType_TheGivingOfItems
case "the_sacrifice_of_items":
return FeatureType_TheSacrificeOfItems
}
return FeatureType_Unknown
}
func (s FeatureType) String() string {
switch s {
case FeatureType_Acrobats:
return "acrobats"
case FeatureType_Banners:
return "banners"
case FeatureType_Candles:
return "candles"
case FeatureType_Costumes:
return "costumes"
case FeatureType_CriersInFront:
return "criers in front"
case FeatureType_DancePerformance:
return "dance performance"
case FeatureType_Images:
return "images"
case FeatureType_IncenseBurning:
return "incense burning"
case FeatureType_MusicalPerformance:
return "musical performance"
case FeatureType_OrderOfPrecedence:
return "order of precedence"
case FeatureType_PoetryRecital:
return "poetry recital"
case FeatureType_Storytelling:
return "storytelling"
case FeatureType_TheGivingOfItems:
return "the giving of items"
case FeatureType_TheSacrificeOfItems:
return "the sacrifice of items"
}
return "unknown"
}
func (s FeatureType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type Feature struct {
Reference int `json:"reference" legend:"plus"` // reference
Type_ FeatureType `json:"type" legend:"plus"` // type
}
func NewFeature() *Feature {
return &Feature{
Reference: -1,
}
}
func (x *Feature) RelatedToEntity(id int) bool { return false }
func (x *Feature) RelatedToHf(id int) bool { return false }
func (x *Feature) RelatedToArtifact(id int) bool { return false }
func (x *Feature) RelatedToSite(id int) bool { return false }
func (x *Feature) RelatedToRegion(id int) bool { return false }
func (x *Feature) CheckFields() {
}
func (x *Feature) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Reference != -1 {
d["reference"] = x.Reference
}
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type HfLinkLinkType int
const (
HfLinkLinkType_Unknown HfLinkLinkType = iota
HfLinkLinkType_Apprentice
HfLinkLinkType_Child
HfLinkLinkType_Companion
HfLinkLinkType_DeceasedSpouse
HfLinkLinkType_Deity
HfLinkLinkType_Father
HfLinkLinkType_FormerApprentice
HfLinkLinkType_FormerMaster
HfLinkLinkType_FormerSpouse
HfLinkLinkType_Lover
HfLinkLinkType_Master
HfLinkLinkType_Mother
HfLinkLinkType_PetOwner
HfLinkLinkType_Prisoner
HfLinkLinkType_Spouse
)
func parseHfLinkLinkType(s string) HfLinkLinkType {
switch s {
case "apprentice":
return HfLinkLinkType_Apprentice
case "child":
return HfLinkLinkType_Child
case "companion":
return HfLinkLinkType_Companion
case "deceased spouse":
return HfLinkLinkType_DeceasedSpouse
case "deity":
return HfLinkLinkType_Deity
case "father":
return HfLinkLinkType_Father
case "former apprentice":
return HfLinkLinkType_FormerApprentice
case "former master":
return HfLinkLinkType_FormerMaster
case "former spouse":
return HfLinkLinkType_FormerSpouse
case "lover":
return HfLinkLinkType_Lover
case "master":
return HfLinkLinkType_Master
case "mother":
return HfLinkLinkType_Mother
case "pet owner":
return HfLinkLinkType_PetOwner
case "prisoner":
return HfLinkLinkType_Prisoner
case "spouse":
return HfLinkLinkType_Spouse
}
return HfLinkLinkType_Unknown
}
func (s HfLinkLinkType) String() string {
switch s {
case HfLinkLinkType_Apprentice:
return "apprentice"
case HfLinkLinkType_Child:
return "child"
case HfLinkLinkType_Companion:
return "companion"
case HfLinkLinkType_DeceasedSpouse:
return "deceased spouse"
case HfLinkLinkType_Deity:
return "deity"
case HfLinkLinkType_Father:
return "father"
case HfLinkLinkType_FormerApprentice:
return "former apprentice"
case HfLinkLinkType_FormerMaster:
return "former master"
case HfLinkLinkType_FormerSpouse:
return "former spouse"
case HfLinkLinkType_Lover:
return "lover"
case HfLinkLinkType_Master:
return "master"
case HfLinkLinkType_Mother:
return "mother"
case HfLinkLinkType_PetOwner:
return "pet owner"
case HfLinkLinkType_Prisoner:
return "prisoner"
case HfLinkLinkType_Spouse:
return "spouse"
}
return "unknown"
}
func (s HfLinkLinkType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HfLink struct {
Hfid int `json:"hfid" legend:"base"` // hfid
LinkStrength int `json:"linkStrength" legend:"base"` // link_strength
LinkType HfLinkLinkType `json:"linkType" legend:"base"` // link_type
}
func NewHfLink() *HfLink {
return &HfLink{
Hfid: -1,
LinkStrength: -1,
}
}
func (x *HfLink) RelatedToEntity(id int) bool { return false }
func (x *HfLink) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HfLink) RelatedToArtifact(id int) bool { return false }
func (x *HfLink) RelatedToSite(id int) bool { return false }
func (x *HfLink) RelatedToRegion(id int) bool { return false }
func (x *HfLink) CheckFields() {
}
func (x *HfLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.LinkStrength != -1 {
d["linkStrength"] = x.LinkStrength
}
if x.LinkType != 0 {
d["linkType"] = x.LinkType
}
return json.Marshal(d)
}
type HfSkill struct {
Skill string `json:"skill" legend:"base"` // skill
TotalIp int `json:"totalIp" legend:"base"` // total_ip
}
func NewHfSkill() *HfSkill {
return &HfSkill{
TotalIp: -1,
}
}
func (x *HfSkill) RelatedToEntity(id int) bool { return false }
func (x *HfSkill) RelatedToHf(id int) bool { return false }
func (x *HfSkill) RelatedToArtifact(id int) bool { return false }
func (x *HfSkill) RelatedToSite(id int) bool { return false }
func (x *HfSkill) RelatedToRegion(id int) bool { return false }
func (x *HfSkill) CheckFields() {
}
func (x *HfSkill) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["skill"] = x.Skill
if x.TotalIp != -1 {
d["totalIp"] = x.TotalIp
}
return json.Marshal(d)
}
type HistoricalEra struct {
Name_ string `json:"name" legend:"base"` // name
StartYear int `json:"startYear" legend:"base"` // start_year
}
func NewHistoricalEra() *HistoricalEra {
return &HistoricalEra{
StartYear: -1,
}
}
func (x *HistoricalEra) Name() string { return x.Name_ }
func (x *HistoricalEra) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEra) RelatedToHf(id int) bool { return false }
func (x *HistoricalEra) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEra) RelatedToSite(id int) bool { return false }
func (x *HistoricalEra) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEra) CheckFields() {
}
func (x *HistoricalEra) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["name"] = x.Name_
if x.StartYear != -1 {
d["startYear"] = x.StartYear
}
return json.Marshal(d)
}
type HistoricalEvent struct {
Id_ int `json:"id" legend:"both"` // id
Seconds72 int `json:"seconds72" legend:"base"` // seconds72
Year int `json:"year" legend:"base"` // year
Details HistoricalEventDetails
}
func NewHistoricalEvent() *HistoricalEvent {
return &HistoricalEvent{
Id_: -1,
Seconds72: -1,
Year: -1,
}
}
func (x *HistoricalEvent) Id() int { return x.Id_ }
func (x *HistoricalEvent) setId(id int) { x.Id_ = id }
func (x *HistoricalEvent) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEvent) RelatedToHf(id int) bool { return false }
func (x *HistoricalEvent) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEvent) RelatedToSite(id int) bool { return false }
func (x *HistoricalEvent) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEvent) CheckFields() {
}
func (x *HistoricalEvent) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Id_ != -1 {
d["id"] = x.Id_
}
if x.Seconds72 != -1 {
d["seconds72"] = x.Seconds72
}
if x.Year != -1 {
d["year"] = x.Year
}
return json.Marshal(d)
}
type HistoricalEventAddHfEntityHonor struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
Hfid int `json:"hfid" legend:"base"` // hfid
HonorId int `json:"honorId" legend:"base"` // honor_id
}
func NewHistoricalEventAddHfEntityHonor() *HistoricalEventAddHfEntityHonor {
return &HistoricalEventAddHfEntityHonor{
EntityId: -1,
Hfid: -1,
HonorId: -1,
}
}
func (x *HistoricalEventAddHfEntityHonor) Type() string { return "add hf entity honor" }
func (x *HistoricalEventAddHfEntityHonor) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventAddHfEntityHonor) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventAddHfEntityHonor) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventAddHfEntityHonor) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventAddHfEntityHonor) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventAddHfEntityHonor) CheckFields() {
}
func (x *HistoricalEventAddHfEntityHonor) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.HonorId != -1 {
d["honorId"] = x.HonorId
}
return json.Marshal(d)
}
type HistoricalEventAddHfEntityLinkLink int
const (
HistoricalEventAddHfEntityLinkLink_Unknown HistoricalEventAddHfEntityLinkLink = iota
HistoricalEventAddHfEntityLinkLink_Enemy
HistoricalEventAddHfEntityLinkLink_Member
HistoricalEventAddHfEntityLinkLink_Position
HistoricalEventAddHfEntityLinkLink_Prisoner
HistoricalEventAddHfEntityLinkLink_Slave
HistoricalEventAddHfEntityLinkLink_Squad
)
func parseHistoricalEventAddHfEntityLinkLink(s string) HistoricalEventAddHfEntityLinkLink {
switch s {
case "enemy":
return HistoricalEventAddHfEntityLinkLink_Enemy
case "member":
return HistoricalEventAddHfEntityLinkLink_Member
case "position":
return HistoricalEventAddHfEntityLinkLink_Position
case "prisoner":
return HistoricalEventAddHfEntityLinkLink_Prisoner
case "slave":
return HistoricalEventAddHfEntityLinkLink_Slave
case "squad":
return HistoricalEventAddHfEntityLinkLink_Squad
}
return HistoricalEventAddHfEntityLinkLink_Unknown
}
func (s HistoricalEventAddHfEntityLinkLink) String() string {
switch s {
case HistoricalEventAddHfEntityLinkLink_Enemy:
return "enemy"
case HistoricalEventAddHfEntityLinkLink_Member:
return "member"
case HistoricalEventAddHfEntityLinkLink_Position:
return "position"
case HistoricalEventAddHfEntityLinkLink_Prisoner:
return "prisoner"
case HistoricalEventAddHfEntityLinkLink_Slave:
return "slave"
case HistoricalEventAddHfEntityLinkLink_Squad:
return "squad"
}
return "unknown"
}
func (s HistoricalEventAddHfEntityLinkLink) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAddHfEntityLinkLinkType int
const (
HistoricalEventAddHfEntityLinkLinkType_Unknown HistoricalEventAddHfEntityLinkLinkType = iota
HistoricalEventAddHfEntityLinkLinkType_Enemy
HistoricalEventAddHfEntityLinkLinkType_Member
HistoricalEventAddHfEntityLinkLinkType_Position
HistoricalEventAddHfEntityLinkLinkType_Prisoner
HistoricalEventAddHfEntityLinkLinkType_Slave
HistoricalEventAddHfEntityLinkLinkType_Squad
)
func parseHistoricalEventAddHfEntityLinkLinkType(s string) HistoricalEventAddHfEntityLinkLinkType {
switch s {
case "enemy":
return HistoricalEventAddHfEntityLinkLinkType_Enemy
case "member":
return HistoricalEventAddHfEntityLinkLinkType_Member
case "position":
return HistoricalEventAddHfEntityLinkLinkType_Position
case "prisoner":
return HistoricalEventAddHfEntityLinkLinkType_Prisoner
case "slave":
return HistoricalEventAddHfEntityLinkLinkType_Slave
case "squad":
return HistoricalEventAddHfEntityLinkLinkType_Squad
}
return HistoricalEventAddHfEntityLinkLinkType_Unknown
}
func (s HistoricalEventAddHfEntityLinkLinkType) String() string {
switch s {
case HistoricalEventAddHfEntityLinkLinkType_Enemy:
return "enemy"
case HistoricalEventAddHfEntityLinkLinkType_Member:
return "member"
case HistoricalEventAddHfEntityLinkLinkType_Position:
return "position"
case HistoricalEventAddHfEntityLinkLinkType_Prisoner:
return "prisoner"
case HistoricalEventAddHfEntityLinkLinkType_Slave:
return "slave"
case HistoricalEventAddHfEntityLinkLinkType_Squad:
return "squad"
}
return "unknown"
}
func (s HistoricalEventAddHfEntityLinkLinkType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAddHfEntityLink struct {
AppointerHfid int `json:"appointerHfid" legend:"both"` // appointer_hfid
CivId int `json:"civId" legend:"base"` // civ_id
Hfid int `json:"hfid" legend:"base"` // hfid
Link HistoricalEventAddHfEntityLinkLink `json:"link" legend:"base"` // link
Position string `json:"position" legend:"plus"` // position
PositionId int `json:"positionId" legend:"base"` // position_id
PromiseToHfid int `json:"promiseToHfid" legend:"both"` // promise_to_hfid
}
func NewHistoricalEventAddHfEntityLink() *HistoricalEventAddHfEntityLink {
return &HistoricalEventAddHfEntityLink{
AppointerHfid: -1,
CivId: -1,
Hfid: -1,
PositionId: -1,
PromiseToHfid: -1,
}
}
func (x *HistoricalEventAddHfEntityLink) Type() string { return "add hf entity link" }
func (x *HistoricalEventAddHfEntityLink) RelatedToEntity(id int) bool { return x.CivId == id }
func (x *HistoricalEventAddHfEntityLink) RelatedToHf(id int) bool {
return x.AppointerHfid == id || x.Hfid == id || x.PromiseToHfid == id
}
func (x *HistoricalEventAddHfEntityLink) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventAddHfEntityLink) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventAddHfEntityLink) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventAddHfEntityLink) CheckFields() {
}
func (x *HistoricalEventAddHfEntityLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AppointerHfid != -1 {
d["appointerHfid"] = x.AppointerHfid
}
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.Link != 0 {
d["link"] = x.Link
}
d["position"] = x.Position
if x.PositionId != -1 {
d["positionId"] = x.PositionId
}
if x.PromiseToHfid != -1 {
d["promiseToHfid"] = x.PromiseToHfid
}
return json.Marshal(d)
}
type HistoricalEventAddHfHfLinkLinkType int
const (
HistoricalEventAddHfHfLinkLinkType_Unknown HistoricalEventAddHfHfLinkLinkType = iota
HistoricalEventAddHfHfLinkLinkType_Apprentice
HistoricalEventAddHfHfLinkLinkType_Deity
HistoricalEventAddHfHfLinkLinkType_FormerMaster
HistoricalEventAddHfHfLinkLinkType_Lover
HistoricalEventAddHfHfLinkLinkType_Master
HistoricalEventAddHfHfLinkLinkType_PetOwner
HistoricalEventAddHfHfLinkLinkType_Prisoner
HistoricalEventAddHfHfLinkLinkType_Spouse
)
func parseHistoricalEventAddHfHfLinkLinkType(s string) HistoricalEventAddHfHfLinkLinkType {
switch s {
case "apprentice":
return HistoricalEventAddHfHfLinkLinkType_Apprentice
case "deity":
return HistoricalEventAddHfHfLinkLinkType_Deity
case "former_master":
return HistoricalEventAddHfHfLinkLinkType_FormerMaster
case "lover":
return HistoricalEventAddHfHfLinkLinkType_Lover
case "master":
return HistoricalEventAddHfHfLinkLinkType_Master
case "pet_owner":
return HistoricalEventAddHfHfLinkLinkType_PetOwner
case "prisoner":
return HistoricalEventAddHfHfLinkLinkType_Prisoner
case "spouse":
return HistoricalEventAddHfHfLinkLinkType_Spouse
}
return HistoricalEventAddHfHfLinkLinkType_Unknown
}
func (s HistoricalEventAddHfHfLinkLinkType) String() string {
switch s {
case HistoricalEventAddHfHfLinkLinkType_Apprentice:
return "apprentice"
case HistoricalEventAddHfHfLinkLinkType_Deity:
return "deity"
case HistoricalEventAddHfHfLinkLinkType_FormerMaster:
return "former master"
case HistoricalEventAddHfHfLinkLinkType_Lover:
return "lover"
case HistoricalEventAddHfHfLinkLinkType_Master:
return "master"
case HistoricalEventAddHfHfLinkLinkType_PetOwner:
return "pet owner"
case HistoricalEventAddHfHfLinkLinkType_Prisoner:
return "prisoner"
case HistoricalEventAddHfHfLinkLinkType_Spouse:
return "spouse"
}
return "unknown"
}
func (s HistoricalEventAddHfHfLinkLinkType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAddHfHfLink struct {
Hfid int `json:"hfid" legend:"base"` // hfid
HfidTarget int `json:"hfidTarget" legend:"base"` // hfid_target
LinkType HistoricalEventAddHfHfLinkLinkType `json:"linkType" legend:"plus"` // link_type
}
func NewHistoricalEventAddHfHfLink() *HistoricalEventAddHfHfLink {
return &HistoricalEventAddHfHfLink{
Hfid: -1,
HfidTarget: -1,
}
}
func (x *HistoricalEventAddHfHfLink) Type() string { return "add hf hf link" }
func (x *HistoricalEventAddHfHfLink) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventAddHfHfLink) RelatedToHf(id int) bool {
return x.Hfid == id || x.HfidTarget == id
}
func (x *HistoricalEventAddHfHfLink) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventAddHfHfLink) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventAddHfHfLink) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventAddHfHfLink) CheckFields() {
}
func (x *HistoricalEventAddHfHfLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.HfidTarget != -1 {
d["hfidTarget"] = x.HfidTarget
}
if x.LinkType != 0 {
d["linkType"] = x.LinkType
}
return json.Marshal(d)
}
type HistoricalEventAddHfSiteLinkLinkType int
const (
HistoricalEventAddHfSiteLinkLinkType_Unknown HistoricalEventAddHfSiteLinkLinkType = iota
HistoricalEventAddHfSiteLinkLinkType_HomeSiteAbstractBuilding
HistoricalEventAddHfSiteLinkLinkType_Occupation
HistoricalEventAddHfSiteLinkLinkType_PrisonAbstractBuilding
HistoricalEventAddHfSiteLinkLinkType_PrisonSiteBuildingProfile
HistoricalEventAddHfSiteLinkLinkType_SeatOfPower
)
func parseHistoricalEventAddHfSiteLinkLinkType(s string) HistoricalEventAddHfSiteLinkLinkType {
switch s {
case "home_site_abstract_building":
return HistoricalEventAddHfSiteLinkLinkType_HomeSiteAbstractBuilding
case "occupation":
return HistoricalEventAddHfSiteLinkLinkType_Occupation
case "prison_abstract_building":
return HistoricalEventAddHfSiteLinkLinkType_PrisonAbstractBuilding
case "prison_site_building_profile":
return HistoricalEventAddHfSiteLinkLinkType_PrisonSiteBuildingProfile
case "seat_of_power":
return HistoricalEventAddHfSiteLinkLinkType_SeatOfPower
}
return HistoricalEventAddHfSiteLinkLinkType_Unknown
}
func (s HistoricalEventAddHfSiteLinkLinkType) String() string {
switch s {
case HistoricalEventAddHfSiteLinkLinkType_HomeSiteAbstractBuilding:
return "home site abstract building"
case HistoricalEventAddHfSiteLinkLinkType_Occupation:
return "occupation"
case HistoricalEventAddHfSiteLinkLinkType_PrisonAbstractBuilding:
return "prison abstract building"
case HistoricalEventAddHfSiteLinkLinkType_PrisonSiteBuildingProfile:
return "prison site building profile"
case HistoricalEventAddHfSiteLinkLinkType_SeatOfPower:
return "seat of power"
}
return "unknown"
}
func (s HistoricalEventAddHfSiteLinkLinkType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAddHfSiteLink struct {
Civ int `json:"civ" legend:"plus"` // civ
Histfig int `json:"histfig" legend:"plus"` // histfig
LinkType HistoricalEventAddHfSiteLinkLinkType `json:"linkType" legend:"plus"` // link_type
SiteId int `json:"siteId" legend:"base"` // site_id
Structure int `json:"structure" legend:"plus"` // structure
}
func NewHistoricalEventAddHfSiteLink() *HistoricalEventAddHfSiteLink {
return &HistoricalEventAddHfSiteLink{
Civ: -1,
Histfig: -1,
SiteId: -1,
Structure: -1,
}
}
func (x *HistoricalEventAddHfSiteLink) Type() string { return "add hf site link" }
func (x *HistoricalEventAddHfSiteLink) RelatedToEntity(id int) bool { return x.Civ == id }
func (x *HistoricalEventAddHfSiteLink) RelatedToHf(id int) bool { return x.Histfig == id }
func (x *HistoricalEventAddHfSiteLink) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventAddHfSiteLink) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventAddHfSiteLink) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventAddHfSiteLink) CheckFields() {
if x.Civ != x.SiteId {
sameFields["HistoricalEventAddHfSiteLink"]["Civ"]["SiteId"] = false
}
if x.Histfig != x.SiteId {
sameFields["HistoricalEventAddHfSiteLink"]["Histfig"]["SiteId"] = false
}
if x.Structure != x.SiteId {
sameFields["HistoricalEventAddHfSiteLink"]["Structure"]["SiteId"] = false
}
}
func (x *HistoricalEventAddHfSiteLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Civ != -1 {
d["civ"] = x.Civ
}
if x.Histfig != -1 {
d["histfig"] = x.Histfig
}
if x.LinkType != 0 {
d["linkType"] = x.LinkType
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.Structure != -1 {
d["structure"] = x.Structure
}
return json.Marshal(d)
}
type HistoricalEventAgreementConcludedTopic int
const (
HistoricalEventAgreementConcludedTopic_Unknown HistoricalEventAgreementConcludedTopic = iota
HistoricalEventAgreementConcludedTopic_Treequota
)
func parseHistoricalEventAgreementConcludedTopic(s string) HistoricalEventAgreementConcludedTopic {
switch s {
case "treequota":
return HistoricalEventAgreementConcludedTopic_Treequota
}
return HistoricalEventAgreementConcludedTopic_Unknown
}
func (s HistoricalEventAgreementConcludedTopic) String() string {
switch s {
case HistoricalEventAgreementConcludedTopic_Treequota:
return "treequota"
}
return "unknown"
}
func (s HistoricalEventAgreementConcludedTopic) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAgreementConcluded struct {
Destination int `json:"destination" legend:"plus"` // destination
Result int `json:"result" legend:"plus"` // result
Site int `json:"site" legend:"plus"` // site
Source int `json:"source" legend:"plus"` // source
Topic HistoricalEventAgreementConcludedTopic `json:"topic" legend:"plus"` // topic
}
func NewHistoricalEventAgreementConcluded() *HistoricalEventAgreementConcluded {
return &HistoricalEventAgreementConcluded{
Destination: -1,
Result: -1,
Site: -1,
Source: -1,
}
}
func (x *HistoricalEventAgreementConcluded) Type() string { return "agreement concluded" }
func (x *HistoricalEventAgreementConcluded) RelatedToEntity(id int) bool {
return x.Destination == id || x.Source == id
}
func (x *HistoricalEventAgreementConcluded) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventAgreementConcluded) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventAgreementConcluded) RelatedToSite(id int) bool { return x.Site == id }
func (x *HistoricalEventAgreementConcluded) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventAgreementConcluded) CheckFields() {
}
func (x *HistoricalEventAgreementConcluded) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Destination != -1 {
d["destination"] = x.Destination
}
if x.Result != -1 {
d["result"] = x.Result
}
if x.Site != -1 {
d["site"] = x.Site
}
if x.Source != -1 {
d["source"] = x.Source
}
if x.Topic != 0 {
d["topic"] = x.Topic
}
return json.Marshal(d)
}
type HistoricalEventAgreementFormedAction int
const (
HistoricalEventAgreementFormedAction_Unknown HistoricalEventAgreementFormedAction = iota
HistoricalEventAgreementFormedAction_BribeOfficial
HistoricalEventAgreementFormedAction_InduceToEmbezzle
)
func parseHistoricalEventAgreementFormedAction(s string) HistoricalEventAgreementFormedAction {
switch s {
case "bribe official":
return HistoricalEventAgreementFormedAction_BribeOfficial
case "induce to embezzle":
return HistoricalEventAgreementFormedAction_InduceToEmbezzle
}
return HistoricalEventAgreementFormedAction_Unknown
}
func (s HistoricalEventAgreementFormedAction) String() string {
switch s {
case HistoricalEventAgreementFormedAction_BribeOfficial:
return "bribe official"
case HistoricalEventAgreementFormedAction_InduceToEmbezzle:
return "induce to embezzle"
}
return "unknown"
}
func (s HistoricalEventAgreementFormedAction) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAgreementFormedMethod int
const (
HistoricalEventAgreementFormedMethod_Unknown HistoricalEventAgreementFormedMethod = iota
HistoricalEventAgreementFormedMethod_BlackmailOverEmbezzlement
HistoricalEventAgreementFormedMethod_Bribe
HistoricalEventAgreementFormedMethod_Flatter
HistoricalEventAgreementFormedMethod_Intimidate
HistoricalEventAgreementFormedMethod_OfferImmortality
HistoricalEventAgreementFormedMethod_Precedence
HistoricalEventAgreementFormedMethod_ReligiousSympathy
HistoricalEventAgreementFormedMethod_RevengeOnGrudge
)
func parseHistoricalEventAgreementFormedMethod(s string) HistoricalEventAgreementFormedMethod {
switch s {
case "blackmail over embezzlement":
return HistoricalEventAgreementFormedMethod_BlackmailOverEmbezzlement
case "bribe":
return HistoricalEventAgreementFormedMethod_Bribe
case "flatter":
return HistoricalEventAgreementFormedMethod_Flatter
case "intimidate":
return HistoricalEventAgreementFormedMethod_Intimidate
case "offer immortality":
return HistoricalEventAgreementFormedMethod_OfferImmortality
case "precedence":
return HistoricalEventAgreementFormedMethod_Precedence
case "religious sympathy":
return HistoricalEventAgreementFormedMethod_ReligiousSympathy
case "revenge on grudge":
return HistoricalEventAgreementFormedMethod_RevengeOnGrudge
}
return HistoricalEventAgreementFormedMethod_Unknown
}
func (s HistoricalEventAgreementFormedMethod) String() string {
switch s {
case HistoricalEventAgreementFormedMethod_BlackmailOverEmbezzlement:
return "blackmail over embezzlement"
case HistoricalEventAgreementFormedMethod_Bribe:
return "bribe"
case HistoricalEventAgreementFormedMethod_Flatter:
return "flatter"
case HistoricalEventAgreementFormedMethod_Intimidate:
return "intimidate"
case HistoricalEventAgreementFormedMethod_OfferImmortality:
return "offer immortality"
case HistoricalEventAgreementFormedMethod_Precedence:
return "precedence"
case HistoricalEventAgreementFormedMethod_ReligiousSympathy:
return "religious sympathy"
case HistoricalEventAgreementFormedMethod_RevengeOnGrudge:
return "revenge on grudge"
}
return "unknown"
}
func (s HistoricalEventAgreementFormedMethod) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAgreementFormedReason int
const (
HistoricalEventAgreementFormedReason_Unknown HistoricalEventAgreementFormedReason = iota
HistoricalEventAgreementFormedReason_ReunitedWithLovedOne
HistoricalEventAgreementFormedReason_ViolentDisagreement
HistoricalEventAgreementFormedReason_Whim
)
func parseHistoricalEventAgreementFormedReason(s string) HistoricalEventAgreementFormedReason {
switch s {
case "reunited with loved one":
return HistoricalEventAgreementFormedReason_ReunitedWithLovedOne
case "violent disagreement":
return HistoricalEventAgreementFormedReason_ViolentDisagreement
case "whim":
return HistoricalEventAgreementFormedReason_Whim
}
return HistoricalEventAgreementFormedReason_Unknown
}
func (s HistoricalEventAgreementFormedReason) String() string {
switch s {
case HistoricalEventAgreementFormedReason_ReunitedWithLovedOne:
return "reunited with loved one"
case HistoricalEventAgreementFormedReason_ViolentDisagreement:
return "violent disagreement"
case HistoricalEventAgreementFormedReason_Whim:
return "whim"
}
return "unknown"
}
func (s HistoricalEventAgreementFormedReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAgreementFormedTopFacet int
const (
HistoricalEventAgreementFormedTopFacet_Unknown HistoricalEventAgreementFormedTopFacet = iota
HistoricalEventAgreementFormedTopFacet_Ambition
HistoricalEventAgreementFormedTopFacet_AnxietyPropensity
HistoricalEventAgreementFormedTopFacet_Confidence
HistoricalEventAgreementFormedTopFacet_EnvyPropensity
HistoricalEventAgreementFormedTopFacet_Fearlessness
HistoricalEventAgreementFormedTopFacet_Greed
HistoricalEventAgreementFormedTopFacet_Hope
HistoricalEventAgreementFormedTopFacet_Pride
HistoricalEventAgreementFormedTopFacet_StressVulnerability
HistoricalEventAgreementFormedTopFacet_Swayable
HistoricalEventAgreementFormedTopFacet_Vanity
HistoricalEventAgreementFormedTopFacet_Vengeful
)
func parseHistoricalEventAgreementFormedTopFacet(s string) HistoricalEventAgreementFormedTopFacet {
switch s {
case "ambition":
return HistoricalEventAgreementFormedTopFacet_Ambition
case "anxiety propensity":
return HistoricalEventAgreementFormedTopFacet_AnxietyPropensity
case "confidence":
return HistoricalEventAgreementFormedTopFacet_Confidence
case "envy propensity":
return HistoricalEventAgreementFormedTopFacet_EnvyPropensity
case "fearlessness":
return HistoricalEventAgreementFormedTopFacet_Fearlessness
case "greed":
return HistoricalEventAgreementFormedTopFacet_Greed
case "hope":
return HistoricalEventAgreementFormedTopFacet_Hope
case "pride":
return HistoricalEventAgreementFormedTopFacet_Pride
case "stress vulnerability":
return HistoricalEventAgreementFormedTopFacet_StressVulnerability
case "swayable":
return HistoricalEventAgreementFormedTopFacet_Swayable
case "vanity":
return HistoricalEventAgreementFormedTopFacet_Vanity
case "vengeful":
return HistoricalEventAgreementFormedTopFacet_Vengeful
}
return HistoricalEventAgreementFormedTopFacet_Unknown
}
func (s HistoricalEventAgreementFormedTopFacet) String() string {
switch s {
case HistoricalEventAgreementFormedTopFacet_Ambition:
return "ambition"
case HistoricalEventAgreementFormedTopFacet_AnxietyPropensity:
return "anxiety propensity"
case HistoricalEventAgreementFormedTopFacet_Confidence:
return "confidence"
case HistoricalEventAgreementFormedTopFacet_EnvyPropensity:
return "envy propensity"
case HistoricalEventAgreementFormedTopFacet_Fearlessness:
return "fearlessness"
case HistoricalEventAgreementFormedTopFacet_Greed:
return "greed"
case HistoricalEventAgreementFormedTopFacet_Hope:
return "hope"
case HistoricalEventAgreementFormedTopFacet_Pride:
return "pride"
case HistoricalEventAgreementFormedTopFacet_StressVulnerability:
return "stress vulnerability"
case HistoricalEventAgreementFormedTopFacet_Swayable:
return "swayable"
case HistoricalEventAgreementFormedTopFacet_Vanity:
return "vanity"
case HistoricalEventAgreementFormedTopFacet_Vengeful:
return "vengeful"
}
return "unknown"
}
func (s HistoricalEventAgreementFormedTopFacet) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAgreementFormedTopRelationshipFactor int
const (
HistoricalEventAgreementFormedTopRelationshipFactor_Unknown HistoricalEventAgreementFormedTopRelationshipFactor = iota
HistoricalEventAgreementFormedTopRelationshipFactor_Fear
HistoricalEventAgreementFormedTopRelationshipFactor_Love
HistoricalEventAgreementFormedTopRelationshipFactor_Loyalty
HistoricalEventAgreementFormedTopRelationshipFactor_Respect
HistoricalEventAgreementFormedTopRelationshipFactor_Trust
)
func parseHistoricalEventAgreementFormedTopRelationshipFactor(s string) HistoricalEventAgreementFormedTopRelationshipFactor {
switch s {
case "fear":
return HistoricalEventAgreementFormedTopRelationshipFactor_Fear
case "love":
return HistoricalEventAgreementFormedTopRelationshipFactor_Love
case "loyalty":
return HistoricalEventAgreementFormedTopRelationshipFactor_Loyalty
case "respect":
return HistoricalEventAgreementFormedTopRelationshipFactor_Respect
case "trust":
return HistoricalEventAgreementFormedTopRelationshipFactor_Trust
}
return HistoricalEventAgreementFormedTopRelationshipFactor_Unknown
}
func (s HistoricalEventAgreementFormedTopRelationshipFactor) String() string {
switch s {
case HistoricalEventAgreementFormedTopRelationshipFactor_Fear:
return "fear"
case HistoricalEventAgreementFormedTopRelationshipFactor_Love:
return "love"
case HistoricalEventAgreementFormedTopRelationshipFactor_Loyalty:
return "loyalty"
case HistoricalEventAgreementFormedTopRelationshipFactor_Respect:
return "respect"
case HistoricalEventAgreementFormedTopRelationshipFactor_Trust:
return "trust"
}
return "unknown"
}
func (s HistoricalEventAgreementFormedTopRelationshipFactor) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAgreementFormedTopValue int
const (
HistoricalEventAgreementFormedTopValue_Unknown HistoricalEventAgreementFormedTopValue = iota
HistoricalEventAgreementFormedTopValue_Law
HistoricalEventAgreementFormedTopValue_Power
)
func parseHistoricalEventAgreementFormedTopValue(s string) HistoricalEventAgreementFormedTopValue {
switch s {
case "law":
return HistoricalEventAgreementFormedTopValue_Law
case "power":
return HistoricalEventAgreementFormedTopValue_Power
}
return HistoricalEventAgreementFormedTopValue_Unknown
}
func (s HistoricalEventAgreementFormedTopValue) String() string {
switch s {
case HistoricalEventAgreementFormedTopValue_Law:
return "law"
case HistoricalEventAgreementFormedTopValue_Power:
return "power"
}
return "unknown"
}
func (s HistoricalEventAgreementFormedTopValue) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAgreementFormed struct {
Action HistoricalEventAgreementFormedAction `json:"action" legend:"base"` // action
AgreementId int `json:"agreementId" legend:"base"` // agreement_id
AgreementSubjectId int `json:"agreementSubjectId" legend:"base"` // agreement_subject_id
AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` // ally_defense_bonus
CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` // coconspirator_bonus
ConcluderHfid int `json:"concluderHfid" legend:"base"` // concluder_hfid
Delegated bool `json:"delegated" legend:"base"` // delegated
FailedJudgmentTest bool `json:"failedJudgmentTest" legend:"base"` // failed_judgment_test
Method HistoricalEventAgreementFormedMethod `json:"method" legend:"base"` // method
Reason HistoricalEventAgreementFormedReason `json:"reason" legend:"base"` // reason
RelevantEntityId int `json:"relevantEntityId" legend:"base"` // relevant_entity_id
RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` // relevant_id_for_method
RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` // relevant_position_profile_id
Successful bool `json:"successful" legend:"base"` // successful
TopFacet HistoricalEventAgreementFormedTopFacet `json:"topFacet" legend:"base"` // top_facet
TopFacetModifier int `json:"topFacetModifier" legend:"base"` // top_facet_modifier
TopFacetRating int `json:"topFacetRating" legend:"base"` // top_facet_rating
TopRelationshipFactor HistoricalEventAgreementFormedTopRelationshipFactor `json:"topRelationshipFactor" legend:"base"` // top_relationship_factor
TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` // top_relationship_modifier
TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` // top_relationship_rating
TopValue HistoricalEventAgreementFormedTopValue `json:"topValue" legend:"base"` // top_value
TopValueModifier int `json:"topValueModifier" legend:"base"` // top_value_modifier
TopValueRating int `json:"topValueRating" legend:"base"` // top_value_rating
}
func NewHistoricalEventAgreementFormed() *HistoricalEventAgreementFormed {
return &HistoricalEventAgreementFormed{
AgreementId: -1,
AgreementSubjectId: -1,
AllyDefenseBonus: -1,
CoconspiratorBonus: -1,
ConcluderHfid: -1,
RelevantEntityId: -1,
RelevantIdForMethod: -1,
RelevantPositionProfileId: -1,
TopFacetModifier: -1,
TopFacetRating: -1,
TopRelationshipModifier: -1,
TopRelationshipRating: -1,
TopValueModifier: -1,
TopValueRating: -1,
}
}
func (x *HistoricalEventAgreementFormed) Type() string { return "agreement formed" }
func (x *HistoricalEventAgreementFormed) RelatedToEntity(id int) bool {
return x.RelevantEntityId == id
}
func (x *HistoricalEventAgreementFormed) RelatedToHf(id int) bool { return x.ConcluderHfid == id }
func (x *HistoricalEventAgreementFormed) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventAgreementFormed) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventAgreementFormed) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventAgreementFormed) CheckFields() {
}
func (x *HistoricalEventAgreementFormed) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Action != 0 {
d["action"] = x.Action
}
if x.AgreementId != -1 {
d["agreementId"] = x.AgreementId
}
if x.AgreementSubjectId != -1 {
d["agreementSubjectId"] = x.AgreementSubjectId
}
if x.AllyDefenseBonus != -1 {
d["allyDefenseBonus"] = x.AllyDefenseBonus
}
if x.CoconspiratorBonus != -1 {
d["coconspiratorBonus"] = x.CoconspiratorBonus
}
if x.ConcluderHfid != -1 {
d["concluderHfid"] = x.ConcluderHfid
}
d["delegated"] = x.Delegated
d["failedJudgmentTest"] = x.FailedJudgmentTest
if x.Method != 0 {
d["method"] = x.Method
}
if x.Reason != 0 {
d["reason"] = x.Reason
}
if x.RelevantEntityId != -1 {
d["relevantEntityId"] = x.RelevantEntityId
}
if x.RelevantIdForMethod != -1 {
d["relevantIdForMethod"] = x.RelevantIdForMethod
}
if x.RelevantPositionProfileId != -1 {
d["relevantPositionProfileId"] = x.RelevantPositionProfileId
}
d["successful"] = x.Successful
if x.TopFacet != 0 {
d["topFacet"] = x.TopFacet
}
if x.TopFacetModifier != -1 {
d["topFacetModifier"] = x.TopFacetModifier
}
if x.TopFacetRating != -1 {
d["topFacetRating"] = x.TopFacetRating
}
if x.TopRelationshipFactor != 0 {
d["topRelationshipFactor"] = x.TopRelationshipFactor
}
if x.TopRelationshipModifier != -1 {
d["topRelationshipModifier"] = x.TopRelationshipModifier
}
if x.TopRelationshipRating != -1 {
d["topRelationshipRating"] = x.TopRelationshipRating
}
if x.TopValue != 0 {
d["topValue"] = x.TopValue
}
if x.TopValueModifier != -1 {
d["topValueModifier"] = x.TopValueModifier
}
if x.TopValueRating != -1 {
d["topValueRating"] = x.TopValueRating
}
return json.Marshal(d)
}
type HistoricalEventAgreementMadeTopic int
const (
HistoricalEventAgreementMadeTopic_Unknown HistoricalEventAgreementMadeTopic = iota
HistoricalEventAgreementMadeTopic_Becomelandholder
HistoricalEventAgreementMadeTopic_Promotelandholder
HistoricalEventAgreementMadeTopic_Treequota
)
func parseHistoricalEventAgreementMadeTopic(s string) HistoricalEventAgreementMadeTopic {
switch s {
case "becomelandholder":
return HistoricalEventAgreementMadeTopic_Becomelandholder
case "promotelandholder":
return HistoricalEventAgreementMadeTopic_Promotelandholder
case "treequota":
return HistoricalEventAgreementMadeTopic_Treequota
}
return HistoricalEventAgreementMadeTopic_Unknown
}
func (s HistoricalEventAgreementMadeTopic) String() string {
switch s {
case HistoricalEventAgreementMadeTopic_Becomelandholder:
return "becomelandholder"
case HistoricalEventAgreementMadeTopic_Promotelandholder:
return "promotelandholder"
case HistoricalEventAgreementMadeTopic_Treequota:
return "treequota"
}
return "unknown"
}
func (s HistoricalEventAgreementMadeTopic) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAgreementMade struct {
Destination int `json:"destination" legend:"plus"` // destination
SiteId int `json:"siteId" legend:"base"` // site_id
Source int `json:"source" legend:"plus"` // source
Topic HistoricalEventAgreementMadeTopic `json:"topic" legend:"plus"` // topic
}
func NewHistoricalEventAgreementMade() *HistoricalEventAgreementMade {
return &HistoricalEventAgreementMade{
Destination: -1,
SiteId: -1,
Source: -1,
}
}
func (x *HistoricalEventAgreementMade) Type() string { return "agreement made" }
func (x *HistoricalEventAgreementMade) RelatedToEntity(id int) bool {
return x.Destination == id || x.Source == id
}
func (x *HistoricalEventAgreementMade) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventAgreementMade) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventAgreementMade) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventAgreementMade) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventAgreementMade) CheckFields() {
if x.Destination != x.SiteId {
sameFields["HistoricalEventAgreementMade"]["Destination"]["SiteId"] = false
}
if x.Source != x.SiteId {
sameFields["HistoricalEventAgreementMade"]["Source"]["SiteId"] = false
}
}
func (x *HistoricalEventAgreementMade) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Destination != -1 {
d["destination"] = x.Destination
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.Source != -1 {
d["source"] = x.Source
}
if x.Topic != 0 {
d["topic"] = x.Topic
}
return json.Marshal(d)
}
type HistoricalEventAgreementRejectedTopic int
const (
HistoricalEventAgreementRejectedTopic_Unknown HistoricalEventAgreementRejectedTopic = iota
HistoricalEventAgreementRejectedTopic_Becomelandholder
HistoricalEventAgreementRejectedTopic_Treequota
HistoricalEventAgreementRejectedTopic_Tributeagreement
HistoricalEventAgreementRejectedTopic_Unknown10
)
func parseHistoricalEventAgreementRejectedTopic(s string) HistoricalEventAgreementRejectedTopic {
switch s {
case "becomelandholder":
return HistoricalEventAgreementRejectedTopic_Becomelandholder
case "treequota":
return HistoricalEventAgreementRejectedTopic_Treequota
case "tributeagreement":
return HistoricalEventAgreementRejectedTopic_Tributeagreement
case "unknown 10":
return HistoricalEventAgreementRejectedTopic_Unknown10
}
return HistoricalEventAgreementRejectedTopic_Unknown
}
func (s HistoricalEventAgreementRejectedTopic) String() string {
switch s {
case HistoricalEventAgreementRejectedTopic_Becomelandholder:
return "becomelandholder"
case HistoricalEventAgreementRejectedTopic_Treequota:
return "treequota"
case HistoricalEventAgreementRejectedTopic_Tributeagreement:
return "tributeagreement"
case HistoricalEventAgreementRejectedTopic_Unknown10:
return "unknown 10"
}
return "unknown"
}
func (s HistoricalEventAgreementRejectedTopic) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventAgreementRejected struct {
Destination int `json:"destination" legend:"plus"` // destination
SiteId int `json:"siteId" legend:"base"` // site_id
Source int `json:"source" legend:"plus"` // source
Topic HistoricalEventAgreementRejectedTopic `json:"topic" legend:"plus"` // topic
}
func NewHistoricalEventAgreementRejected() *HistoricalEventAgreementRejected {
return &HistoricalEventAgreementRejected{
Destination: -1,
SiteId: -1,
Source: -1,
}
}
func (x *HistoricalEventAgreementRejected) Type() string { return "agreement rejected" }
func (x *HistoricalEventAgreementRejected) RelatedToEntity(id int) bool {
return x.Destination == id || x.Source == id
}
func (x *HistoricalEventAgreementRejected) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventAgreementRejected) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventAgreementRejected) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventAgreementRejected) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventAgreementRejected) CheckFields() {
if x.Destination != x.SiteId {
sameFields["HistoricalEventAgreementRejected"]["Destination"]["SiteId"] = false
}
if x.Source != x.SiteId {
sameFields["HistoricalEventAgreementRejected"]["Source"]["SiteId"] = false
}
}
func (x *HistoricalEventAgreementRejected) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Destination != -1 {
d["destination"] = x.Destination
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.Source != -1 {
d["source"] = x.Source
}
if x.Topic != 0 {
d["topic"] = x.Topic
}
return json.Marshal(d)
}
type HistoricalEventArtifactClaimFormedCircumstance int
const (
HistoricalEventArtifactClaimFormedCircumstance_Unknown HistoricalEventArtifactClaimFormedCircumstance = iota
HistoricalEventArtifactClaimFormedCircumstance_DuringAnInfiltrationMission
HistoricalEventArtifactClaimFormedCircumstance_FromAfar
)
func parseHistoricalEventArtifactClaimFormedCircumstance(s string) HistoricalEventArtifactClaimFormedCircumstance {
switch s {
case "during an infiltration mission":
return HistoricalEventArtifactClaimFormedCircumstance_DuringAnInfiltrationMission
case "from afar":
return HistoricalEventArtifactClaimFormedCircumstance_FromAfar
}
return HistoricalEventArtifactClaimFormedCircumstance_Unknown
}
func (s HistoricalEventArtifactClaimFormedCircumstance) String() string {
switch s {
case HistoricalEventArtifactClaimFormedCircumstance_DuringAnInfiltrationMission:
return "during an infiltration mission"
case HistoricalEventArtifactClaimFormedCircumstance_FromAfar:
return "from afar"
}
return "unknown"
}
func (s HistoricalEventArtifactClaimFormedCircumstance) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventArtifactClaimFormedClaim int
const (
HistoricalEventArtifactClaimFormedClaim_Unknown HistoricalEventArtifactClaimFormedClaim = iota
HistoricalEventArtifactClaimFormedClaim_Heirloom
HistoricalEventArtifactClaimFormedClaim_Symbol
HistoricalEventArtifactClaimFormedClaim_Treasure
)
func parseHistoricalEventArtifactClaimFormedClaim(s string) HistoricalEventArtifactClaimFormedClaim {
switch s {
case "heirloom":
return HistoricalEventArtifactClaimFormedClaim_Heirloom
case "symbol":
return HistoricalEventArtifactClaimFormedClaim_Symbol
case "treasure":
return HistoricalEventArtifactClaimFormedClaim_Treasure
}
return HistoricalEventArtifactClaimFormedClaim_Unknown
}
func (s HistoricalEventArtifactClaimFormedClaim) String() string {
switch s {
case HistoricalEventArtifactClaimFormedClaim_Heirloom:
return "heirloom"
case HistoricalEventArtifactClaimFormedClaim_Symbol:
return "symbol"
case HistoricalEventArtifactClaimFormedClaim_Treasure:
return "treasure"
}
return "unknown"
}
func (s HistoricalEventArtifactClaimFormedClaim) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventArtifactClaimFormed struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
Circumstance HistoricalEventArtifactClaimFormedCircumstance `json:"circumstance" legend:"base"` // circumstance
Claim HistoricalEventArtifactClaimFormedClaim `json:"claim" legend:"base"` // claim
EntityId int `json:"entityId" legend:"base"` // entity_id
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id
}
func NewHistoricalEventArtifactClaimFormed() *HistoricalEventArtifactClaimFormed {
return &HistoricalEventArtifactClaimFormed{
ArtifactId: -1,
EntityId: -1,
HistFigureId: -1,
PositionProfileId: -1,
}
}
func (x *HistoricalEventArtifactClaimFormed) Type() string { return "artifact claim formed" }
func (x *HistoricalEventArtifactClaimFormed) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventArtifactClaimFormed) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventArtifactClaimFormed) RelatedToArtifact(id int) bool {
return x.ArtifactId == id
}
func (x *HistoricalEventArtifactClaimFormed) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventArtifactClaimFormed) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventArtifactClaimFormed) CheckFields() {
}
func (x *HistoricalEventArtifactClaimFormed) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.Circumstance != 0 {
d["circumstance"] = x.Circumstance
}
if x.Claim != 0 {
d["claim"] = x.Claim
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.PositionProfileId != -1 {
d["positionProfileId"] = x.PositionProfileId
}
return json.Marshal(d)
}
type HistoricalEventArtifactCopied struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
DestEntityId int `json:"destEntityId" legend:"base"` // dest_entity_id
DestSiteId int `json:"destSiteId" legend:"base"` // dest_site_id
DestStructureId int `json:"destStructureId" legend:"base"` // dest_structure_id
FromOriginal bool `json:"fromOriginal" legend:"base"` // from_original
SourceEntityId int `json:"sourceEntityId" legend:"base"` // source_entity_id
SourceSiteId int `json:"sourceSiteId" legend:"base"` // source_site_id
SourceStructureId int `json:"sourceStructureId" legend:"base"` // source_structure_id
}
func NewHistoricalEventArtifactCopied() *HistoricalEventArtifactCopied {
return &HistoricalEventArtifactCopied{
ArtifactId: -1,
DestEntityId: -1,
DestSiteId: -1,
DestStructureId: -1,
SourceEntityId: -1,
SourceSiteId: -1,
SourceStructureId: -1,
}
}
func (x *HistoricalEventArtifactCopied) Type() string { return "artifact copied" }
func (x *HistoricalEventArtifactCopied) RelatedToEntity(id int) bool {
return x.DestEntityId == id || x.SourceEntityId == id
}
func (x *HistoricalEventArtifactCopied) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventArtifactCopied) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventArtifactCopied) RelatedToSite(id int) bool {
return x.DestSiteId == id || x.SourceSiteId == id
}
func (x *HistoricalEventArtifactCopied) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventArtifactCopied) CheckFields() {
}
func (x *HistoricalEventArtifactCopied) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.DestEntityId != -1 {
d["destEntityId"] = x.DestEntityId
}
if x.DestSiteId != -1 {
d["destSiteId"] = x.DestSiteId
}
if x.DestStructureId != -1 {
d["destStructureId"] = x.DestStructureId
}
d["fromOriginal"] = x.FromOriginal
if x.SourceEntityId != -1 {
d["sourceEntityId"] = x.SourceEntityId
}
if x.SourceSiteId != -1 {
d["sourceSiteId"] = x.SourceSiteId
}
if x.SourceStructureId != -1 {
d["sourceStructureId"] = x.SourceStructureId
}
return json.Marshal(d)
}
type HistoricalEventArtifactCreatedReason int
const (
HistoricalEventArtifactCreatedReason_Unknown HistoricalEventArtifactCreatedReason = iota
HistoricalEventArtifactCreatedReason_SanctifyHf
)
func parseHistoricalEventArtifactCreatedReason(s string) HistoricalEventArtifactCreatedReason {
switch s {
case "sanctify_hf":
return HistoricalEventArtifactCreatedReason_SanctifyHf
}
return HistoricalEventArtifactCreatedReason_Unknown
}
func (s HistoricalEventArtifactCreatedReason) String() string {
switch s {
case HistoricalEventArtifactCreatedReason_SanctifyHf:
return "sanctify hf"
}
return "unknown"
}
func (s HistoricalEventArtifactCreatedReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventArtifactCreated struct {
ArtifactId int `json:"artifactId" legend:"both"` // artifact_id
Circumstance *HistoricalEventArtifactCreatedCircumstance `json:"circumstance" legend:"plus"` // circumstance
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
NameOnly bool `json:"nameOnly" legend:"base"` // name_only
Reason HistoricalEventArtifactCreatedReason `json:"reason" legend:"plus"` // reason
SanctifyHf int `json:"sanctifyHf" legend:"plus"` // sanctify_hf
SiteId int `json:"siteId" legend:"base"` // site_id
UnitId int `json:"unitId" legend:"base"` // unit_id
}
func NewHistoricalEventArtifactCreated() *HistoricalEventArtifactCreated {
return &HistoricalEventArtifactCreated{
ArtifactId: -1,
HistFigureId: -1,
SanctifyHf: -1,
SiteId: -1,
UnitId: -1,
}
}
func (x *HistoricalEventArtifactCreated) Type() string { return "artifact created" }
func (x *HistoricalEventArtifactCreated) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventArtifactCreated) RelatedToHf(id int) bool {
return x.HistFigureId == id || x.SanctifyHf == id
}
func (x *HistoricalEventArtifactCreated) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventArtifactCreated) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventArtifactCreated) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventArtifactCreated) CheckFields() {
if x.SanctifyHf != x.HistFigureId {
sameFields["HistoricalEventArtifactCreated"]["SanctifyHf"]["HistFigureId"] = false
}
if x.SanctifyHf != x.SiteId {
sameFields["HistoricalEventArtifactCreated"]["SanctifyHf"]["SiteId"] = false
}
if x.SanctifyHf != x.UnitId {
sameFields["HistoricalEventArtifactCreated"]["SanctifyHf"]["UnitId"] = false
}
}
func (x *HistoricalEventArtifactCreated) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
d["circumstance"] = x.Circumstance
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
d["nameOnly"] = x.NameOnly
if x.Reason != 0 {
d["reason"] = x.Reason
}
if x.SanctifyHf != -1 {
d["sanctifyHf"] = x.SanctifyHf
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.UnitId != -1 {
d["unitId"] = x.UnitId
}
return json.Marshal(d)
}
type HistoricalEventArtifactCreatedCircumstanceType int
const (
HistoricalEventArtifactCreatedCircumstanceType_Unknown HistoricalEventArtifactCreatedCircumstanceType = iota
HistoricalEventArtifactCreatedCircumstanceType_Defeated
HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession
HistoricalEventArtifactCreatedCircumstanceType_Preservebody
)
func parseHistoricalEventArtifactCreatedCircumstanceType(s string) HistoricalEventArtifactCreatedCircumstanceType {
switch s {
case "defeated":
return HistoricalEventArtifactCreatedCircumstanceType_Defeated
case "favoritepossession":
return HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession
case "preservebody":
return HistoricalEventArtifactCreatedCircumstanceType_Preservebody
}
return HistoricalEventArtifactCreatedCircumstanceType_Unknown
}
func (s HistoricalEventArtifactCreatedCircumstanceType) String() string {
switch s {
case HistoricalEventArtifactCreatedCircumstanceType_Defeated:
return "defeated"
case HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession:
return "favoritepossession"
case HistoricalEventArtifactCreatedCircumstanceType_Preservebody:
return "preservebody"
}
return "unknown"
}
func (s HistoricalEventArtifactCreatedCircumstanceType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventArtifactCreatedCircumstance struct {
Defeated int `json:"defeated" legend:"plus"` // defeated
Type_ HistoricalEventArtifactCreatedCircumstanceType `json:"type" legend:"plus"` // type
}
func NewHistoricalEventArtifactCreatedCircumstance() *HistoricalEventArtifactCreatedCircumstance {
return &HistoricalEventArtifactCreatedCircumstance{
Defeated: -1,
}
}
func (x *HistoricalEventArtifactCreatedCircumstance) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventArtifactCreatedCircumstance) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventArtifactCreatedCircumstance) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventArtifactCreatedCircumstance) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventArtifactCreatedCircumstance) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventArtifactCreatedCircumstance) CheckFields() {
}
func (x *HistoricalEventArtifactCreatedCircumstance) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Defeated != -1 {
d["defeated"] = x.Defeated
}
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type HistoricalEventArtifactDestroyed struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
DestroyerEnid int `json:"destroyerEnid" legend:"base"` // destroyer_enid
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventArtifactDestroyed() *HistoricalEventArtifactDestroyed {
return &HistoricalEventArtifactDestroyed{
ArtifactId: -1,
DestroyerEnid: -1,
SiteId: -1,
}
}
func (x *HistoricalEventArtifactDestroyed) Type() string { return "artifact destroyed" }
func (x *HistoricalEventArtifactDestroyed) RelatedToEntity(id int) bool { return x.DestroyerEnid == id }
func (x *HistoricalEventArtifactDestroyed) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventArtifactDestroyed) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventArtifactDestroyed) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventArtifactDestroyed) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventArtifactDestroyed) CheckFields() {
}
func (x *HistoricalEventArtifactDestroyed) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.DestroyerEnid != -1 {
d["destroyerEnid"] = x.DestroyerEnid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventArtifactFound struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
SiteId int `json:"siteId" legend:"base"` // site_id
SitePropertyId int `json:"sitePropertyId" legend:"base"` // site_property_id
UnitId int `json:"unitId" legend:"base"` // unit_id
}
func NewHistoricalEventArtifactFound() *HistoricalEventArtifactFound {
return &HistoricalEventArtifactFound{
ArtifactId: -1,
HistFigureId: -1,
SiteId: -1,
SitePropertyId: -1,
UnitId: -1,
}
}
func (x *HistoricalEventArtifactFound) Type() string { return "artifact found" }
func (x *HistoricalEventArtifactFound) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventArtifactFound) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventArtifactFound) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventArtifactFound) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventArtifactFound) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventArtifactFound) CheckFields() {
}
func (x *HistoricalEventArtifactFound) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SitePropertyId != -1 {
d["sitePropertyId"] = x.SitePropertyId
}
if x.UnitId != -1 {
d["unitId"] = x.UnitId
}
return json.Marshal(d)
}
type HistoricalEventArtifactGivenReason int
const (
HistoricalEventArtifactGivenReason_Unknown HistoricalEventArtifactGivenReason = iota
HistoricalEventArtifactGivenReason_PartOfTradeNegotiation
)
func parseHistoricalEventArtifactGivenReason(s string) HistoricalEventArtifactGivenReason {
switch s {
case "part of trade negotiation":
return HistoricalEventArtifactGivenReason_PartOfTradeNegotiation
}
return HistoricalEventArtifactGivenReason_Unknown
}
func (s HistoricalEventArtifactGivenReason) String() string {
switch s {
case HistoricalEventArtifactGivenReason_PartOfTradeNegotiation:
return "part of trade negotiation"
}
return "unknown"
}
func (s HistoricalEventArtifactGivenReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventArtifactGiven struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
GiverEntityId int `json:"giverEntityId" legend:"base"` // giver_entity_id
GiverHistFigureId int `json:"giverHistFigureId" legend:"base"` // giver_hist_figure_id
Reason HistoricalEventArtifactGivenReason `json:"reason" legend:"base"` // reason
ReceiverEntityId int `json:"receiverEntityId" legend:"base"` // receiver_entity_id
ReceiverHistFigureId int `json:"receiverHistFigureId" legend:"base"` // receiver_hist_figure_id
}
func NewHistoricalEventArtifactGiven() *HistoricalEventArtifactGiven {
return &HistoricalEventArtifactGiven{
ArtifactId: -1,
GiverEntityId: -1,
GiverHistFigureId: -1,
ReceiverEntityId: -1,
ReceiverHistFigureId: -1,
}
}
func (x *HistoricalEventArtifactGiven) Type() string { return "artifact given" }
func (x *HistoricalEventArtifactGiven) RelatedToEntity(id int) bool {
return x.GiverEntityId == id || x.ReceiverEntityId == id
}
func (x *HistoricalEventArtifactGiven) RelatedToHf(id int) bool {
return x.GiverHistFigureId == id || x.ReceiverHistFigureId == id
}
func (x *HistoricalEventArtifactGiven) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventArtifactGiven) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventArtifactGiven) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventArtifactGiven) CheckFields() {
}
func (x *HistoricalEventArtifactGiven) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.GiverEntityId != -1 {
d["giverEntityId"] = x.GiverEntityId
}
if x.GiverHistFigureId != -1 {
d["giverHistFigureId"] = x.GiverHistFigureId
}
if x.Reason != 0 {
d["reason"] = x.Reason
}
if x.ReceiverEntityId != -1 {
d["receiverEntityId"] = x.ReceiverEntityId
}
if x.ReceiverHistFigureId != -1 {
d["receiverHistFigureId"] = x.ReceiverHistFigureId
}
return json.Marshal(d)
}
type HistoricalEventArtifactLost struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
SiteId int `json:"siteId" legend:"base"` // site_id
SitePropertyId int `json:"sitePropertyId" legend:"base"` // site_property_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventArtifactLost() *HistoricalEventArtifactLost {
return &HistoricalEventArtifactLost{
ArtifactId: -1,
FeatureLayerId: -1,
SiteId: -1,
SitePropertyId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventArtifactLost) Type() string { return "artifact lost" }
func (x *HistoricalEventArtifactLost) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventArtifactLost) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventArtifactLost) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventArtifactLost) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventArtifactLost) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventArtifactLost) CheckFields() {
}
func (x *HistoricalEventArtifactLost) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SitePropertyId != -1 {
d["sitePropertyId"] = x.SitePropertyId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventArtifactPossessedCircumstance int
const (
HistoricalEventArtifactPossessedCircumstance_Unknown HistoricalEventArtifactPossessedCircumstance = iota
HistoricalEventArtifactPossessedCircumstance_HfIsDead
)
func parseHistoricalEventArtifactPossessedCircumstance(s string) HistoricalEventArtifactPossessedCircumstance {
switch s {
case "hf is dead":
return HistoricalEventArtifactPossessedCircumstance_HfIsDead
}
return HistoricalEventArtifactPossessedCircumstance_Unknown
}
func (s HistoricalEventArtifactPossessedCircumstance) String() string {
switch s {
case HistoricalEventArtifactPossessedCircumstance_HfIsDead:
return "hf is dead"
}
return "unknown"
}
func (s HistoricalEventArtifactPossessedCircumstance) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventArtifactPossessedReason int
const (
HistoricalEventArtifactPossessedReason_Unknown HistoricalEventArtifactPossessedReason = iota
HistoricalEventArtifactPossessedReason_ArtifactIsHeirloomOfFamilyHfid
HistoricalEventArtifactPossessedReason_ArtifactIsSymbolOfEntityPosition
)
func parseHistoricalEventArtifactPossessedReason(s string) HistoricalEventArtifactPossessedReason {
switch s {
case "artifact is heirloom of family hfid":
return HistoricalEventArtifactPossessedReason_ArtifactIsHeirloomOfFamilyHfid
case "artifact is symbol of entity position":
return HistoricalEventArtifactPossessedReason_ArtifactIsSymbolOfEntityPosition
}
return HistoricalEventArtifactPossessedReason_Unknown
}
func (s HistoricalEventArtifactPossessedReason) String() string {
switch s {
case HistoricalEventArtifactPossessedReason_ArtifactIsHeirloomOfFamilyHfid:
return "artifact is heirloom of family hfid"
case HistoricalEventArtifactPossessedReason_ArtifactIsSymbolOfEntityPosition:
return "artifact is symbol of entity position"
}
return "unknown"
}
func (s HistoricalEventArtifactPossessedReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventArtifactPossessed struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
Circumstance HistoricalEventArtifactPossessedCircumstance `json:"circumstance" legend:"base"` // circumstance
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
Reason HistoricalEventArtifactPossessedReason `json:"reason" legend:"base"` // reason
ReasonId int `json:"reasonId" legend:"base"` // reason_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
UnitId int `json:"unitId" legend:"base"` // unit_id
}
func NewHistoricalEventArtifactPossessed() *HistoricalEventArtifactPossessed {
return &HistoricalEventArtifactPossessed{
ArtifactId: -1,
CircumstanceId: -1,
FeatureLayerId: -1,
HistFigureId: -1,
ReasonId: -1,
SiteId: -1,
SubregionId: -1,
UnitId: -1,
}
}
func (x *HistoricalEventArtifactPossessed) Type() string { return "artifact possessed" }
func (x *HistoricalEventArtifactPossessed) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventArtifactPossessed) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventArtifactPossessed) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventArtifactPossessed) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventArtifactPossessed) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventArtifactPossessed) CheckFields() {
}
func (x *HistoricalEventArtifactPossessed) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.Circumstance != 0 {
d["circumstance"] = x.Circumstance
}
if x.CircumstanceId != -1 {
d["circumstanceId"] = x.CircumstanceId
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.Reason != 0 {
d["reason"] = x.Reason
}
if x.ReasonId != -1 {
d["reasonId"] = x.ReasonId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.UnitId != -1 {
d["unitId"] = x.UnitId
}
return json.Marshal(d)
}
type HistoricalEventArtifactRecovered struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
UnitId int `json:"unitId" legend:"base"` // unit_id
}
func NewHistoricalEventArtifactRecovered() *HistoricalEventArtifactRecovered {
return &HistoricalEventArtifactRecovered{
ArtifactId: -1,
FeatureLayerId: -1,
HistFigureId: -1,
SiteId: -1,
StructureId: -1,
SubregionId: -1,
UnitId: -1,
}
}
func (x *HistoricalEventArtifactRecovered) Type() string { return "artifact recovered" }
func (x *HistoricalEventArtifactRecovered) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventArtifactRecovered) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventArtifactRecovered) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventArtifactRecovered) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventArtifactRecovered) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventArtifactRecovered) CheckFields() {
}
func (x *HistoricalEventArtifactRecovered) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.UnitId != -1 {
d["unitId"] = x.UnitId
}
return json.Marshal(d)
}
type HistoricalEventArtifactStored struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
SiteId int `json:"siteId" legend:"base"` // site_id
UnitId int `json:"unitId" legend:"base"` // unit_id
}
func NewHistoricalEventArtifactStored() *HistoricalEventArtifactStored {
return &HistoricalEventArtifactStored{
ArtifactId: -1,
HistFigureId: -1,
SiteId: -1,
UnitId: -1,
}
}
func (x *HistoricalEventArtifactStored) Type() string { return "artifact stored" }
func (x *HistoricalEventArtifactStored) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventArtifactStored) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventArtifactStored) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventArtifactStored) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventArtifactStored) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventArtifactStored) CheckFields() {
}
func (x *HistoricalEventArtifactStored) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.UnitId != -1 {
d["unitId"] = x.UnitId
}
return json.Marshal(d)
}
type HistoricalEventArtifactTransformed struct {
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
NewArtifactId int `json:"newArtifactId" legend:"base"` // new_artifact_id
OldArtifactId int `json:"oldArtifactId" legend:"base"` // old_artifact_id
SiteId int `json:"siteId" legend:"base"` // site_id
UnitId int `json:"unitId" legend:"base"` // unit_id
}
func NewHistoricalEventArtifactTransformed() *HistoricalEventArtifactTransformed {
return &HistoricalEventArtifactTransformed{
HistFigureId: -1,
NewArtifactId: -1,
OldArtifactId: -1,
SiteId: -1,
UnitId: -1,
}
}
func (x *HistoricalEventArtifactTransformed) Type() string { return "artifact transformed" }
func (x *HistoricalEventArtifactTransformed) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventArtifactTransformed) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventArtifactTransformed) RelatedToArtifact(id int) bool {
return x.NewArtifactId == id || x.OldArtifactId == id
}
func (x *HistoricalEventArtifactTransformed) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventArtifactTransformed) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventArtifactTransformed) CheckFields() {
}
func (x *HistoricalEventArtifactTransformed) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.NewArtifactId != -1 {
d["newArtifactId"] = x.NewArtifactId
}
if x.OldArtifactId != -1 {
d["oldArtifactId"] = x.OldArtifactId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.UnitId != -1 {
d["unitId"] = x.UnitId
}
return json.Marshal(d)
}
type HistoricalEventAssumeIdentity struct {
IdentityCaste string `json:"identityCaste" legend:"plus"` // identity_caste
IdentityId int `json:"identityId" legend:"base"` // identity_id
IdentityName string `json:"identityName" legend:"plus"` // identity_name
IdentityRace string `json:"identityRace" legend:"plus"` // identity_race
TargetEnid int `json:"targetEnid" legend:"base"` // target_enid
TricksterHfid int `json:"tricksterHfid" legend:"base"` // trickster_hfid
}
func NewHistoricalEventAssumeIdentity() *HistoricalEventAssumeIdentity {
return &HistoricalEventAssumeIdentity{
IdentityId: -1,
TargetEnid: -1,
TricksterHfid: -1,
}
}
func (x *HistoricalEventAssumeIdentity) Type() string { return "assume identity" }
func (x *HistoricalEventAssumeIdentity) RelatedToEntity(id int) bool {
return x.IdentityId == id || x.TargetEnid == id
}
func (x *HistoricalEventAssumeIdentity) RelatedToHf(id int) bool { return x.TricksterHfid == id }
func (x *HistoricalEventAssumeIdentity) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventAssumeIdentity) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventAssumeIdentity) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventAssumeIdentity) CheckFields() {
}
func (x *HistoricalEventAssumeIdentity) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["identityCaste"] = x.IdentityCaste
if x.IdentityId != -1 {
d["identityId"] = x.IdentityId
}
d["identityName"] = x.IdentityName
d["identityRace"] = x.IdentityRace
if x.TargetEnid != -1 {
d["targetEnid"] = x.TargetEnid
}
if x.TricksterHfid != -1 {
d["tricksterHfid"] = x.TricksterHfid
}
return json.Marshal(d)
}
type HistoricalEventAttackedSite struct {
ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` // a_support_merc_enid
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` // attacker_general_hfid
AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` // attacker_merc_enid
DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` // d_support_merc_enid
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` // defender_general_hfid
DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` // defender_merc_enid
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventAttackedSite() *HistoricalEventAttackedSite {
return &HistoricalEventAttackedSite{
ASupportMercEnid: -1,
AttackerCivId: -1,
AttackerGeneralHfid: -1,
AttackerMercEnid: -1,
DSupportMercEnid: -1,
DefenderCivId: -1,
DefenderGeneralHfid: -1,
DefenderMercEnid: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventAttackedSite) Type() string { return "attacked site" }
func (x *HistoricalEventAttackedSite) RelatedToEntity(id int) bool {
return x.ASupportMercEnid == id || x.AttackerCivId == id || x.AttackerMercEnid == id || x.DSupportMercEnid == id || x.DefenderCivId == id || x.DefenderMercEnid == id || x.SiteCivId == id
}
func (x *HistoricalEventAttackedSite) RelatedToHf(id int) bool {
return x.AttackerGeneralHfid == id || x.DefenderGeneralHfid == id
}
func (x *HistoricalEventAttackedSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventAttackedSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventAttackedSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventAttackedSite) CheckFields() {
}
func (x *HistoricalEventAttackedSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ASupportMercEnid != -1 {
d["aSupportMercEnid"] = x.ASupportMercEnid
}
if x.AttackerCivId != -1 {
d["attackerCivId"] = x.AttackerCivId
}
if x.AttackerGeneralHfid != -1 {
d["attackerGeneralHfid"] = x.AttackerGeneralHfid
}
if x.AttackerMercEnid != -1 {
d["attackerMercEnid"] = x.AttackerMercEnid
}
if x.DSupportMercEnid != -1 {
d["dSupportMercEnid"] = x.DSupportMercEnid
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
if x.DefenderGeneralHfid != -1 {
d["defenderGeneralHfid"] = x.DefenderGeneralHfid
}
if x.DefenderMercEnid != -1 {
d["defenderMercEnid"] = x.DefenderMercEnid
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventBodyAbusedAbuseType int
const (
HistoricalEventBodyAbusedAbuseType_Unknown HistoricalEventBodyAbusedAbuseType = iota
HistoricalEventBodyAbusedAbuseType_Animated
HistoricalEventBodyAbusedAbuseType_Flayed
HistoricalEventBodyAbusedAbuseType_Hung
HistoricalEventBodyAbusedAbuseType_Impaled
HistoricalEventBodyAbusedAbuseType_Mutilated
HistoricalEventBodyAbusedAbuseType_Piled
)
func parseHistoricalEventBodyAbusedAbuseType(s string) HistoricalEventBodyAbusedAbuseType {
switch s {
case "animated":
return HistoricalEventBodyAbusedAbuseType_Animated
case "flayed":
return HistoricalEventBodyAbusedAbuseType_Flayed
case "hung":
return HistoricalEventBodyAbusedAbuseType_Hung
case "impaled":
return HistoricalEventBodyAbusedAbuseType_Impaled
case "mutilated":
return HistoricalEventBodyAbusedAbuseType_Mutilated
case "piled":
return HistoricalEventBodyAbusedAbuseType_Piled
}
return HistoricalEventBodyAbusedAbuseType_Unknown
}
func (s HistoricalEventBodyAbusedAbuseType) String() string {
switch s {
case HistoricalEventBodyAbusedAbuseType_Animated:
return "animated"
case HistoricalEventBodyAbusedAbuseType_Flayed:
return "flayed"
case HistoricalEventBodyAbusedAbuseType_Hung:
return "hung"
case HistoricalEventBodyAbusedAbuseType_Impaled:
return "impaled"
case HistoricalEventBodyAbusedAbuseType_Mutilated:
return "mutilated"
case HistoricalEventBodyAbusedAbuseType_Piled:
return "piled"
}
return "unknown"
}
func (s HistoricalEventBodyAbusedAbuseType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventBodyAbusedItemSubtype int
const (
HistoricalEventBodyAbusedItemSubtype_Unknown HistoricalEventBodyAbusedItemSubtype = iota
HistoricalEventBodyAbusedItemSubtype_Pike
HistoricalEventBodyAbusedItemSubtype_Spear
)
func parseHistoricalEventBodyAbusedItemSubtype(s string) HistoricalEventBodyAbusedItemSubtype {
switch s {
case "pike":
return HistoricalEventBodyAbusedItemSubtype_Pike
case "spear":
return HistoricalEventBodyAbusedItemSubtype_Spear
}
return HistoricalEventBodyAbusedItemSubtype_Unknown
}
func (s HistoricalEventBodyAbusedItemSubtype) String() string {
switch s {
case HistoricalEventBodyAbusedItemSubtype_Pike:
return "pike"
case HistoricalEventBodyAbusedItemSubtype_Spear:
return "spear"
}
return "unknown"
}
func (s HistoricalEventBodyAbusedItemSubtype) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventBodyAbusedItemType int
const (
HistoricalEventBodyAbusedItemType_Unknown HistoricalEventBodyAbusedItemType = iota
HistoricalEventBodyAbusedItemType_Weapon
)
func parseHistoricalEventBodyAbusedItemType(s string) HistoricalEventBodyAbusedItemType {
switch s {
case "weapon":
return HistoricalEventBodyAbusedItemType_Weapon
}
return HistoricalEventBodyAbusedItemType_Unknown
}
func (s HistoricalEventBodyAbusedItemType) String() string {
switch s {
case HistoricalEventBodyAbusedItemType_Weapon:
return "weapon"
}
return "unknown"
}
func (s HistoricalEventBodyAbusedItemType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventBodyAbusedPileType int
const (
HistoricalEventBodyAbusedPileType_Unknown HistoricalEventBodyAbusedPileType = iota
HistoricalEventBodyAbusedPileType_Grislymound
HistoricalEventBodyAbusedPileType_Grotesquepillar
HistoricalEventBodyAbusedPileType_Gruesomesculpture
)
func parseHistoricalEventBodyAbusedPileType(s string) HistoricalEventBodyAbusedPileType {
switch s {
case "grislymound":
return HistoricalEventBodyAbusedPileType_Grislymound
case "grotesquepillar":
return HistoricalEventBodyAbusedPileType_Grotesquepillar
case "gruesomesculpture":
return HistoricalEventBodyAbusedPileType_Gruesomesculpture
}
return HistoricalEventBodyAbusedPileType_Unknown
}
func (s HistoricalEventBodyAbusedPileType) String() string {
switch s {
case HistoricalEventBodyAbusedPileType_Grislymound:
return "grislymound"
case HistoricalEventBodyAbusedPileType_Grotesquepillar:
return "grotesquepillar"
case HistoricalEventBodyAbusedPileType_Gruesomesculpture:
return "gruesomesculpture"
}
return "unknown"
}
func (s HistoricalEventBodyAbusedPileType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventBodyAbused struct {
AbuseType HistoricalEventBodyAbusedAbuseType `json:"abuseType" legend:"plus"` // abuse_type
Bodies []int `json:"bodies" legend:"plus"` // bodies
Civ int `json:"civ" legend:"plus"` // civ
Coords string `json:"coords" legend:"base"` // coords
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Histfig int `json:"histfig" legend:"plus"` // histfig
Interaction int `json:"interaction" legend:"plus"` // interaction
ItemMat string `json:"itemMat" legend:"plus"` // item_mat
ItemSubtype HistoricalEventBodyAbusedItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype
ItemType HistoricalEventBodyAbusedItemType `json:"itemType" legend:"plus"` // item_type
PileType HistoricalEventBodyAbusedPileType `json:"pileType" legend:"plus"` // pile_type
SiteId int `json:"siteId" legend:"base"` // site_id
Structure int `json:"structure" legend:"plus"` // structure
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
Tree int `json:"tree" legend:"plus"` // tree
VictimEntity int `json:"victimEntity" legend:"plus"` // victim_entity
}
func NewHistoricalEventBodyAbused() *HistoricalEventBodyAbused {
return &HistoricalEventBodyAbused{
Civ: -1,
FeatureLayerId: -1,
Histfig: -1,
Interaction: -1,
SiteId: -1,
Structure: -1,
SubregionId: -1,
Tree: -1,
VictimEntity: -1,
}
}
func (x *HistoricalEventBodyAbused) Type() string { return "body abused" }
func (x *HistoricalEventBodyAbused) RelatedToEntity(id int) bool {
return x.Civ == id || x.VictimEntity == id
}
func (x *HistoricalEventBodyAbused) RelatedToHf(id int) bool {
return containsInt(x.Bodies, id) || x.Histfig == id
}
func (x *HistoricalEventBodyAbused) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventBodyAbused) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventBodyAbused) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventBodyAbused) CheckFields() {
if x.Civ != x.FeatureLayerId {
sameFields["HistoricalEventBodyAbused"]["Civ"]["FeatureLayerId"] = false
}
if x.Civ != x.SiteId {
sameFields["HistoricalEventBodyAbused"]["Civ"]["SiteId"] = false
}
if x.Civ != x.SubregionId {
sameFields["HistoricalEventBodyAbused"]["Civ"]["SubregionId"] = false
}
if x.Histfig != x.FeatureLayerId {
sameFields["HistoricalEventBodyAbused"]["Histfig"]["FeatureLayerId"] = false
}
if x.Histfig != x.SiteId {
sameFields["HistoricalEventBodyAbused"]["Histfig"]["SiteId"] = false
}
if x.Histfig != x.SubregionId {
sameFields["HistoricalEventBodyAbused"]["Histfig"]["SubregionId"] = false
}
if x.Interaction != x.FeatureLayerId {
sameFields["HistoricalEventBodyAbused"]["Interaction"]["FeatureLayerId"] = false
}
if x.Interaction != x.SiteId {
sameFields["HistoricalEventBodyAbused"]["Interaction"]["SiteId"] = false
}
if x.Interaction != x.SubregionId {
sameFields["HistoricalEventBodyAbused"]["Interaction"]["SubregionId"] = false
}
if x.ItemMat != x.Coords && x.ItemMat != "" && x.Coords != "" {
sameFields["HistoricalEventBodyAbused"]["ItemMat"]["Coords"] = false
}
if x.Structure != x.FeatureLayerId {
sameFields["HistoricalEventBodyAbused"]["Structure"]["FeatureLayerId"] = false
}
if x.Structure != x.SiteId {
sameFields["HistoricalEventBodyAbused"]["Structure"]["SiteId"] = false
}
if x.Structure != x.SubregionId {
sameFields["HistoricalEventBodyAbused"]["Structure"]["SubregionId"] = false
}
if x.Tree != x.FeatureLayerId {
sameFields["HistoricalEventBodyAbused"]["Tree"]["FeatureLayerId"] = false
}
if x.Tree != x.SiteId {
sameFields["HistoricalEventBodyAbused"]["Tree"]["SiteId"] = false
}
if x.Tree != x.SubregionId {
sameFields["HistoricalEventBodyAbused"]["Tree"]["SubregionId"] = false
}
if x.VictimEntity != x.FeatureLayerId {
sameFields["HistoricalEventBodyAbused"]["VictimEntity"]["FeatureLayerId"] = false
}
if x.VictimEntity != x.SiteId {
sameFields["HistoricalEventBodyAbused"]["VictimEntity"]["SiteId"] = false
}
if x.VictimEntity != x.SubregionId {
sameFields["HistoricalEventBodyAbused"]["VictimEntity"]["SubregionId"] = false
}
}
func (x *HistoricalEventBodyAbused) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AbuseType != 0 {
d["abuseType"] = x.AbuseType
}
d["bodies"] = x.Bodies
if x.Civ != -1 {
d["civ"] = x.Civ
}
d["coords"] = x.Coords
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Histfig != -1 {
d["histfig"] = x.Histfig
}
if x.Interaction != -1 {
d["interaction"] = x.Interaction
}
d["itemMat"] = x.ItemMat
if x.ItemSubtype != 0 {
d["itemSubtype"] = x.ItemSubtype
}
if x.ItemType != 0 {
d["itemType"] = x.ItemType
}
if x.PileType != 0 {
d["pileType"] = x.PileType
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.Structure != -1 {
d["structure"] = x.Structure
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.Tree != -1 {
d["tree"] = x.Tree
}
if x.VictimEntity != -1 {
d["victimEntity"] = x.VictimEntity
}
return json.Marshal(d)
}
type HistoricalEventBuildingProfileAcquired struct {
AcquirerEnid int `json:"acquirerEnid" legend:"base"` // acquirer_enid
AcquirerHfid int `json:"acquirerHfid" legend:"base"` // acquirer_hfid
BuildingProfileId int `json:"buildingProfileId" legend:"base"` // building_profile_id
Inherited bool `json:"inherited" legend:"base"` // inherited
LastOwnerHfid int `json:"lastOwnerHfid" legend:"base"` // last_owner_hfid
PurchasedUnowned bool `json:"purchasedUnowned" legend:"base"` // purchased_unowned
RebuiltRuined bool `json:"rebuiltRuined" legend:"base"` // rebuilt_ruined
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventBuildingProfileAcquired() *HistoricalEventBuildingProfileAcquired {
return &HistoricalEventBuildingProfileAcquired{
AcquirerEnid: -1,
AcquirerHfid: -1,
BuildingProfileId: -1,
LastOwnerHfid: -1,
SiteId: -1,
}
}
func (x *HistoricalEventBuildingProfileAcquired) Type() string { return "building profile acquired" }
func (x *HistoricalEventBuildingProfileAcquired) RelatedToEntity(id int) bool {
return x.AcquirerEnid == id
}
func (x *HistoricalEventBuildingProfileAcquired) RelatedToHf(id int) bool {
return x.AcquirerHfid == id || x.LastOwnerHfid == id
}
func (x *HistoricalEventBuildingProfileAcquired) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventBuildingProfileAcquired) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventBuildingProfileAcquired) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventBuildingProfileAcquired) CheckFields() {
}
func (x *HistoricalEventBuildingProfileAcquired) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AcquirerEnid != -1 {
d["acquirerEnid"] = x.AcquirerEnid
}
if x.AcquirerHfid != -1 {
d["acquirerHfid"] = x.AcquirerHfid
}
if x.BuildingProfileId != -1 {
d["buildingProfileId"] = x.BuildingProfileId
}
d["inherited"] = x.Inherited
if x.LastOwnerHfid != -1 {
d["lastOwnerHfid"] = x.LastOwnerHfid
}
d["purchasedUnowned"] = x.PurchasedUnowned
d["rebuiltRuined"] = x.RebuiltRuined
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventCeremony struct {
CivId int `json:"civId" legend:"base"` // civ_id
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
OccasionId int `json:"occasionId" legend:"base"` // occasion_id
ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventCeremony() *HistoricalEventCeremony {
return &HistoricalEventCeremony{
CivId: -1,
FeatureLayerId: -1,
OccasionId: -1,
ScheduleId: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventCeremony) Type() string { return "ceremony" }
func (x *HistoricalEventCeremony) RelatedToEntity(id int) bool { return x.CivId == id }
func (x *HistoricalEventCeremony) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCeremony) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCeremony) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCeremony) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventCeremony) CheckFields() {
}
func (x *HistoricalEventCeremony) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.OccasionId != -1 {
d["occasionId"] = x.OccasionId
}
if x.ScheduleId != -1 {
d["scheduleId"] = x.ScheduleId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventChangeHfBodyStateBodyState int
const (
HistoricalEventChangeHfBodyStateBodyState_Unknown HistoricalEventChangeHfBodyStateBodyState = iota
HistoricalEventChangeHfBodyStateBodyState_EntombedAtSite
)
func parseHistoricalEventChangeHfBodyStateBodyState(s string) HistoricalEventChangeHfBodyStateBodyState {
switch s {
case "entombed at site":
return HistoricalEventChangeHfBodyStateBodyState_EntombedAtSite
}
return HistoricalEventChangeHfBodyStateBodyState_Unknown
}
func (s HistoricalEventChangeHfBodyStateBodyState) String() string {
switch s {
case HistoricalEventChangeHfBodyStateBodyState_EntombedAtSite:
return "entombed at site"
}
return "unknown"
}
func (s HistoricalEventChangeHfBodyStateBodyState) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventChangeHfBodyState struct {
BodyState HistoricalEventChangeHfBodyStateBodyState `json:"bodyState" legend:"base"` // body_state
Coords string `json:"coords" legend:"base"` // coords
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Hfid int `json:"hfid" legend:"base"` // hfid
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventChangeHfBodyState() *HistoricalEventChangeHfBodyState {
return &HistoricalEventChangeHfBodyState{
FeatureLayerId: -1,
Hfid: -1,
SiteId: -1,
StructureId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventChangeHfBodyState) Type() string { return "change hf body state" }
func (x *HistoricalEventChangeHfBodyState) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventChangeHfBodyState) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventChangeHfBodyState) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventChangeHfBodyState) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventChangeHfBodyState) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventChangeHfBodyState) CheckFields() {
}
func (x *HistoricalEventChangeHfBodyState) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.BodyState != 0 {
d["bodyState"] = x.BodyState
}
d["coords"] = x.Coords
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventChangeHfJob struct {
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Hfid int `json:"hfid" legend:"both"` // hfid
NewJob string `json:"newJob" legend:"plus"` // new_job
OldJob string `json:"oldJob" legend:"plus"` // old_job
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventChangeHfJob() *HistoricalEventChangeHfJob {
return &HistoricalEventChangeHfJob{
FeatureLayerId: -1,
Hfid: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventChangeHfJob) Type() string { return "change hf job" }
func (x *HistoricalEventChangeHfJob) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventChangeHfJob) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventChangeHfJob) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventChangeHfJob) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventChangeHfJob) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventChangeHfJob) CheckFields() {
}
func (x *HistoricalEventChangeHfJob) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
d["newJob"] = x.NewJob
d["oldJob"] = x.OldJob
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventChangeHfStateMood int
const (
HistoricalEventChangeHfStateMood_Unknown HistoricalEventChangeHfStateMood = iota
HistoricalEventChangeHfStateMood_Berserk
HistoricalEventChangeHfStateMood_Catatonic
HistoricalEventChangeHfStateMood_Fell
HistoricalEventChangeHfStateMood_Fey
HistoricalEventChangeHfStateMood_Insane
HistoricalEventChangeHfStateMood_Macabre
HistoricalEventChangeHfStateMood_Melancholy
HistoricalEventChangeHfStateMood_Possessed
HistoricalEventChangeHfStateMood_Secretive
)
func parseHistoricalEventChangeHfStateMood(s string) HistoricalEventChangeHfStateMood {
switch s {
case "berserk":
return HistoricalEventChangeHfStateMood_Berserk
case "catatonic":
return HistoricalEventChangeHfStateMood_Catatonic
case "fell":
return HistoricalEventChangeHfStateMood_Fell
case "fey":
return HistoricalEventChangeHfStateMood_Fey
case "insane":
return HistoricalEventChangeHfStateMood_Insane
case "macabre":
return HistoricalEventChangeHfStateMood_Macabre
case "melancholy":
return HistoricalEventChangeHfStateMood_Melancholy
case "possessed":
return HistoricalEventChangeHfStateMood_Possessed
case "secretive":
return HistoricalEventChangeHfStateMood_Secretive
}
return HistoricalEventChangeHfStateMood_Unknown
}
func (s HistoricalEventChangeHfStateMood) String() string {
switch s {
case HistoricalEventChangeHfStateMood_Berserk:
return "berserk"
case HistoricalEventChangeHfStateMood_Catatonic:
return "catatonic"
case HistoricalEventChangeHfStateMood_Fell:
return "fell"
case HistoricalEventChangeHfStateMood_Fey:
return "fey"
case HistoricalEventChangeHfStateMood_Insane:
return "insane"
case HistoricalEventChangeHfStateMood_Macabre:
return "macabre"
case HistoricalEventChangeHfStateMood_Melancholy:
return "melancholy"
case HistoricalEventChangeHfStateMood_Possessed:
return "possessed"
case HistoricalEventChangeHfStateMood_Secretive:
return "secretive"
}
return "unknown"
}
func (s HistoricalEventChangeHfStateMood) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventChangeHfStateReason int
const (
HistoricalEventChangeHfStateReason_Unknown HistoricalEventChangeHfStateReason = iota
HistoricalEventChangeHfStateReason_BeWithMaster
HistoricalEventChangeHfStateReason_ConvictionExile
HistoricalEventChangeHfStateReason_ExiledAfterConviction
HistoricalEventChangeHfStateReason_FailedMood
HistoricalEventChangeHfStateReason_Flight
HistoricalEventChangeHfStateReason_GatherInformation
HistoricalEventChangeHfStateReason_GreatDealOfStress
HistoricalEventChangeHfStateReason_LackOfSleep
HistoricalEventChangeHfStateReason_None
HistoricalEventChangeHfStateReason_OnAPilgrimage
HistoricalEventChangeHfStateReason_Scholarship
HistoricalEventChangeHfStateReason_UnableToLeaveLocation
)
func parseHistoricalEventChangeHfStateReason(s string) HistoricalEventChangeHfStateReason {
switch s {
case "be with master":
return HistoricalEventChangeHfStateReason_BeWithMaster
case "be_with_master":
return HistoricalEventChangeHfStateReason_BeWithMaster
case "conviction_exile":
return HistoricalEventChangeHfStateReason_ConvictionExile
case "exiled after conviction":
return HistoricalEventChangeHfStateReason_ExiledAfterConviction
case "failed mood":
return HistoricalEventChangeHfStateReason_FailedMood
case "flight":
return HistoricalEventChangeHfStateReason_Flight
case "gather information":
return HistoricalEventChangeHfStateReason_GatherInformation
case "gather_information":
return HistoricalEventChangeHfStateReason_GatherInformation
case "great deal of stress":
return HistoricalEventChangeHfStateReason_GreatDealOfStress
case "lack of sleep":
return HistoricalEventChangeHfStateReason_LackOfSleep
case "none":
return HistoricalEventChangeHfStateReason_None
case "on a pilgrimage":
return HistoricalEventChangeHfStateReason_OnAPilgrimage
case "on_a_pilgrimage":
return HistoricalEventChangeHfStateReason_OnAPilgrimage
case "scholarship":
return HistoricalEventChangeHfStateReason_Scholarship
case "unable to leave location":
return HistoricalEventChangeHfStateReason_UnableToLeaveLocation
}
return HistoricalEventChangeHfStateReason_Unknown
}
func (s HistoricalEventChangeHfStateReason) String() string {
switch s {
case HistoricalEventChangeHfStateReason_BeWithMaster:
return "be with master"
case HistoricalEventChangeHfStateReason_ConvictionExile:
return "conviction exile"
case HistoricalEventChangeHfStateReason_ExiledAfterConviction:
return "exiled after conviction"
case HistoricalEventChangeHfStateReason_FailedMood:
return "failed mood"
case HistoricalEventChangeHfStateReason_Flight:
return "flight"
case HistoricalEventChangeHfStateReason_GatherInformation:
return "gather information"
case HistoricalEventChangeHfStateReason_GreatDealOfStress:
return "great deal of stress"
case HistoricalEventChangeHfStateReason_LackOfSleep:
return "lack of sleep"
case HistoricalEventChangeHfStateReason_None:
return "none"
case HistoricalEventChangeHfStateReason_OnAPilgrimage:
return "on a pilgrimage"
case HistoricalEventChangeHfStateReason_Scholarship:
return "scholarship"
case HistoricalEventChangeHfStateReason_UnableToLeaveLocation:
return "unable to leave location"
}
return "unknown"
}
func (s HistoricalEventChangeHfStateReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventChangeHfStateState int
const (
HistoricalEventChangeHfStateState_Unknown HistoricalEventChangeHfStateState = iota
HistoricalEventChangeHfStateState_Refugee
HistoricalEventChangeHfStateState_Settled
HistoricalEventChangeHfStateState_Visiting
HistoricalEventChangeHfStateState_Wandering
)
func parseHistoricalEventChangeHfStateState(s string) HistoricalEventChangeHfStateState {
switch s {
case "refugee":
return HistoricalEventChangeHfStateState_Refugee
case "settled":
return HistoricalEventChangeHfStateState_Settled
case "visiting":
return HistoricalEventChangeHfStateState_Visiting
case "wandering":
return HistoricalEventChangeHfStateState_Wandering
}
return HistoricalEventChangeHfStateState_Unknown
}
func (s HistoricalEventChangeHfStateState) String() string {
switch s {
case HistoricalEventChangeHfStateState_Refugee:
return "refugee"
case HistoricalEventChangeHfStateState_Settled:
return "settled"
case HistoricalEventChangeHfStateState_Visiting:
return "visiting"
case HistoricalEventChangeHfStateState_Wandering:
return "wandering"
}
return "unknown"
}
func (s HistoricalEventChangeHfStateState) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventChangeHfState struct {
Coords string `json:"coords" legend:"base"` // coords
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Hfid int `json:"hfid" legend:"both"` // hfid
Mood HistoricalEventChangeHfStateMood `json:"mood" legend:"base"` // mood
Reason HistoricalEventChangeHfStateReason `json:"reason" legend:"both"` // reason
SiteId int `json:"siteId" legend:"base"` // site_id
State HistoricalEventChangeHfStateState `json:"state" legend:"both"` // state
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventChangeHfState() *HistoricalEventChangeHfState {
return &HistoricalEventChangeHfState{
FeatureLayerId: -1,
Hfid: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventChangeHfState) Type() string { return "change hf state" }
func (x *HistoricalEventChangeHfState) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventChangeHfState) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventChangeHfState) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventChangeHfState) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventChangeHfState) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventChangeHfState) CheckFields() {
}
func (x *HistoricalEventChangeHfState) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coords"] = x.Coords
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.Mood != 0 {
d["mood"] = x.Mood
}
if x.Reason != 0 {
d["reason"] = x.Reason
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.State != 0 {
d["state"] = x.State
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventChangedCreatureType struct {
ChangeeHfid int `json:"changeeHfid" legend:"base"` // changee_hfid
ChangerHfid int `json:"changerHfid" legend:"base"` // changer_hfid
NewCaste string `json:"newCaste" legend:"both"` // new_caste
NewRace string `json:"newRace" legend:"both"` // new_race
OldCaste string `json:"oldCaste" legend:"both"` // old_caste
OldRace string `json:"oldRace" legend:"both"` // old_race
}
func NewHistoricalEventChangedCreatureType() *HistoricalEventChangedCreatureType {
return &HistoricalEventChangedCreatureType{
ChangeeHfid: -1,
ChangerHfid: -1,
}
}
func (x *HistoricalEventChangedCreatureType) Type() string { return "changed creature type" }
func (x *HistoricalEventChangedCreatureType) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventChangedCreatureType) RelatedToHf(id int) bool {
return x.ChangeeHfid == id || x.ChangerHfid == id
}
func (x *HistoricalEventChangedCreatureType) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventChangedCreatureType) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventChangedCreatureType) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventChangedCreatureType) CheckFields() {
}
func (x *HistoricalEventChangedCreatureType) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ChangeeHfid != -1 {
d["changeeHfid"] = x.ChangeeHfid
}
if x.ChangerHfid != -1 {
d["changerHfid"] = x.ChangerHfid
}
d["newCaste"] = x.NewCaste
d["newRace"] = x.NewRace
d["oldCaste"] = x.OldCaste
d["oldRace"] = x.OldRace
return json.Marshal(d)
}
type HistoricalEventCollectionType int
const (
HistoricalEventCollectionType_Unknown HistoricalEventCollectionType = iota
HistoricalEventCollectionType_Abduction
HistoricalEventCollectionType_Battle
HistoricalEventCollectionType_BeastAttack
HistoricalEventCollectionType_Ceremony
HistoricalEventCollectionType_Competition
HistoricalEventCollectionType_Duel
HistoricalEventCollectionType_EntityOverthrown
HistoricalEventCollectionType_Insurrection
HistoricalEventCollectionType_Journey
HistoricalEventCollectionType_Occasion
HistoricalEventCollectionType_Performance
HistoricalEventCollectionType_Persecution
HistoricalEventCollectionType_Procession
HistoricalEventCollectionType_Purge
HistoricalEventCollectionType_Raid
HistoricalEventCollectionType_SiteConquered
HistoricalEventCollectionType_Theft
HistoricalEventCollectionType_War
)
func parseHistoricalEventCollectionType(s string) HistoricalEventCollectionType {
switch s {
case "abduction":
return HistoricalEventCollectionType_Abduction
case "battle":
return HistoricalEventCollectionType_Battle
case "beast attack":
return HistoricalEventCollectionType_BeastAttack
case "ceremony":
return HistoricalEventCollectionType_Ceremony
case "competition":
return HistoricalEventCollectionType_Competition
case "duel":
return HistoricalEventCollectionType_Duel
case "entity overthrown":
return HistoricalEventCollectionType_EntityOverthrown
case "insurrection":
return HistoricalEventCollectionType_Insurrection
case "journey":
return HistoricalEventCollectionType_Journey
case "occasion":
return HistoricalEventCollectionType_Occasion
case "performance":
return HistoricalEventCollectionType_Performance
case "persecution":
return HistoricalEventCollectionType_Persecution
case "procession":
return HistoricalEventCollectionType_Procession
case "purge":
return HistoricalEventCollectionType_Purge
case "raid":
return HistoricalEventCollectionType_Raid
case "site conquered":
return HistoricalEventCollectionType_SiteConquered
case "theft":
return HistoricalEventCollectionType_Theft
case "war":
return HistoricalEventCollectionType_War
}
return HistoricalEventCollectionType_Unknown
}
func (s HistoricalEventCollectionType) String() string {
switch s {
case HistoricalEventCollectionType_Abduction:
return "abduction"
case HistoricalEventCollectionType_Battle:
return "battle"
case HistoricalEventCollectionType_BeastAttack:
return "beast attack"
case HistoricalEventCollectionType_Ceremony:
return "ceremony"
case HistoricalEventCollectionType_Competition:
return "competition"
case HistoricalEventCollectionType_Duel:
return "duel"
case HistoricalEventCollectionType_EntityOverthrown:
return "entity overthrown"
case HistoricalEventCollectionType_Insurrection:
return "insurrection"
case HistoricalEventCollectionType_Journey:
return "journey"
case HistoricalEventCollectionType_Occasion:
return "occasion"
case HistoricalEventCollectionType_Performance:
return "performance"
case HistoricalEventCollectionType_Persecution:
return "persecution"
case HistoricalEventCollectionType_Procession:
return "procession"
case HistoricalEventCollectionType_Purge:
return "purge"
case HistoricalEventCollectionType_Raid:
return "raid"
case HistoricalEventCollectionType_SiteConquered:
return "site conquered"
case HistoricalEventCollectionType_Theft:
return "theft"
case HistoricalEventCollectionType_War:
return "war"
}
return "unknown"
}
func (s HistoricalEventCollectionType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventCollection struct {
EndSeconds72 int `json:"endSeconds72" legend:"base"` // end_seconds72
EndYear int `json:"endYear" legend:"base"` // end_year
Event []int `json:"event" legend:"base"` // event
Eventcol []int `json:"eventcol" legend:"base"` // eventcol
Id_ int `json:"id" legend:"base"` // id
StartSeconds72 int `json:"startSeconds72" legend:"base"` // start_seconds72
StartYear int `json:"startYear" legend:"base"` // start_year
Details HistoricalEventCollectionDetails
}
func NewHistoricalEventCollection() *HistoricalEventCollection {
return &HistoricalEventCollection{
EndSeconds72: -1,
EndYear: -1,
Id_: -1,
StartSeconds72: -1,
StartYear: -1,
}
}
func (x *HistoricalEventCollection) Id() int { return x.Id_ }
func (x *HistoricalEventCollection) setId(id int) { x.Id_ = id }
func (x *HistoricalEventCollection) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventCollection) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollection) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollection) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventCollection) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollection) CheckFields() {
}
func (x *HistoricalEventCollection) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EndSeconds72 != -1 {
d["endSeconds72"] = x.EndSeconds72
}
if x.EndYear != -1 {
d["endYear"] = x.EndYear
}
d["event"] = x.Event
d["eventcol"] = x.Eventcol
if x.Id_ != -1 {
d["id"] = x.Id_
}
if x.StartSeconds72 != -1 {
d["startSeconds72"] = x.StartSeconds72
}
if x.StartYear != -1 {
d["startYear"] = x.StartYear
}
return json.Marshal(d)
}
type HistoricalEventCollectionAbduction struct {
AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid
Coords string `json:"coords" legend:"base"` // coords
DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Ordinal int `json:"ordinal" legend:"base"` // ordinal
ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventCollectionAbduction() *HistoricalEventCollectionAbduction {
return &HistoricalEventCollectionAbduction{
AttackingEnid: -1,
DefendingEnid: -1,
FeatureLayerId: -1,
Ordinal: -1,
ParentEventcol: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventCollectionAbduction) Type() string { return "abduction" }
func (x *HistoricalEventCollectionAbduction) RelatedToEntity(id int) bool {
return x.AttackingEnid == id || x.DefendingEnid == id
}
func (x *HistoricalEventCollectionAbduction) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionAbduction) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionAbduction) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCollectionAbduction) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventCollectionAbduction) CheckFields() {
}
func (x *HistoricalEventCollectionAbduction) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackingEnid != -1 {
d["attackingEnid"] = x.AttackingEnid
}
d["coords"] = x.Coords
if x.DefendingEnid != -1 {
d["defendingEnid"] = x.DefendingEnid
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
if x.ParentEventcol != -1 {
d["parentEventcol"] = x.ParentEventcol
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventCollectionBattleOutcome int
const (
HistoricalEventCollectionBattleOutcome_Unknown HistoricalEventCollectionBattleOutcome = iota
HistoricalEventCollectionBattleOutcome_AttackerWon
HistoricalEventCollectionBattleOutcome_DefenderWon
)
func parseHistoricalEventCollectionBattleOutcome(s string) HistoricalEventCollectionBattleOutcome {
switch s {
case "attacker won":
return HistoricalEventCollectionBattleOutcome_AttackerWon
case "defender won":
return HistoricalEventCollectionBattleOutcome_DefenderWon
}
return HistoricalEventCollectionBattleOutcome_Unknown
}
func (s HistoricalEventCollectionBattleOutcome) String() string {
switch s {
case HistoricalEventCollectionBattleOutcome_AttackerWon:
return "attacker won"
case HistoricalEventCollectionBattleOutcome_DefenderWon:
return "defender won"
}
return "unknown"
}
func (s HistoricalEventCollectionBattleOutcome) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventCollectionBattle struct {
ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` // a_support_merc_enid
ASupportMercHfid []int `json:"aSupportMercHfid" legend:"base"` // a_support_merc_hfid
AttackingHfid []int `json:"attackingHfid" legend:"base"` // attacking_hfid
AttackingMercEnid int `json:"attackingMercEnid" legend:"base"` // attacking_merc_enid
AttackingSquadAnimated []bool `json:"attackingSquadAnimated" legend:"base"` // attacking_squad_animated
AttackingSquadDeaths []int `json:"attackingSquadDeaths" legend:"base"` // attacking_squad_deaths
AttackingSquadEntityPop []int `json:"attackingSquadEntityPop" legend:"base"` // attacking_squad_entity_pop
AttackingSquadNumber []int `json:"attackingSquadNumber" legend:"base"` // attacking_squad_number
AttackingSquadRace []string `json:"attackingSquadRace" legend:"base"` // attacking_squad_race
AttackingSquadSite []int `json:"attackingSquadSite" legend:"base"` // attacking_squad_site
CompanyMerc []bool `json:"companyMerc" legend:"base"` // company_merc
Coords string `json:"coords" legend:"base"` // coords
DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` // d_support_merc_enid
DSupportMercHfid []int `json:"dSupportMercHfid" legend:"base"` // d_support_merc_hfid
DefendingHfid []int `json:"defendingHfid" legend:"base"` // defending_hfid
DefendingMercEnid int `json:"defendingMercEnid" legend:"base"` // defending_merc_enid
DefendingSquadAnimated []bool `json:"defendingSquadAnimated" legend:"base"` // defending_squad_animated
DefendingSquadDeaths []int `json:"defendingSquadDeaths" legend:"base"` // defending_squad_deaths
DefendingSquadEntityPop []int `json:"defendingSquadEntityPop" legend:"base"` // defending_squad_entity_pop
DefendingSquadNumber []int `json:"defendingSquadNumber" legend:"base"` // defending_squad_number
DefendingSquadRace []string `json:"defendingSquadRace" legend:"base"` // defending_squad_race
DefendingSquadSite []int `json:"defendingSquadSite" legend:"base"` // defending_squad_site
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
IndividualMerc []bool `json:"individualMerc" legend:"base"` // individual_merc
Name_ string `json:"name" legend:"base"` // name
NoncomHfid []int `json:"noncomHfid" legend:"base"` // noncom_hfid
Outcome HistoricalEventCollectionBattleOutcome `json:"outcome" legend:"base"` // outcome
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
WarEventcol int `json:"warEventcol" legend:"base"` // war_eventcol
}
func NewHistoricalEventCollectionBattle() *HistoricalEventCollectionBattle {
return &HistoricalEventCollectionBattle{
ASupportMercEnid: -1,
AttackingMercEnid: -1,
DSupportMercEnid: -1,
DefendingMercEnid: -1,
FeatureLayerId: -1,
SiteId: -1,
SubregionId: -1,
WarEventcol: -1,
}
}
func (x *HistoricalEventCollectionBattle) Name() string { return x.Name_ }
func (x *HistoricalEventCollectionBattle) Type() string { return "battle" }
func (x *HistoricalEventCollectionBattle) RelatedToEntity(id int) bool {
return x.ASupportMercEnid == id || x.AttackingMercEnid == id || x.DSupportMercEnid == id || x.DefendingMercEnid == id
}
func (x *HistoricalEventCollectionBattle) RelatedToHf(id int) bool {
return containsInt(x.ASupportMercHfid, id) || containsInt(x.AttackingHfid, id) || containsInt(x.DSupportMercHfid, id) || containsInt(x.DefendingHfid, id) || containsInt(x.NoncomHfid, id)
}
func (x *HistoricalEventCollectionBattle) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionBattle) RelatedToSite(id int) bool {
return containsInt(x.AttackingSquadSite, id) || containsInt(x.DefendingSquadSite, id) || x.SiteId == id
}
func (x *HistoricalEventCollectionBattle) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventCollectionBattle) CheckFields() {
}
func (x *HistoricalEventCollectionBattle) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ASupportMercEnid != -1 {
d["aSupportMercEnid"] = x.ASupportMercEnid
}
d["aSupportMercHfid"] = x.ASupportMercHfid
d["attackingHfid"] = x.AttackingHfid
if x.AttackingMercEnid != -1 {
d["attackingMercEnid"] = x.AttackingMercEnid
}
d["attackingSquadAnimated"] = x.AttackingSquadAnimated
d["attackingSquadDeaths"] = x.AttackingSquadDeaths
d["attackingSquadEntityPop"] = x.AttackingSquadEntityPop
d["attackingSquadNumber"] = x.AttackingSquadNumber
d["attackingSquadRace"] = x.AttackingSquadRace
d["attackingSquadSite"] = x.AttackingSquadSite
d["companyMerc"] = x.CompanyMerc
d["coords"] = x.Coords
if x.DSupportMercEnid != -1 {
d["dSupportMercEnid"] = x.DSupportMercEnid
}
d["dSupportMercHfid"] = x.DSupportMercHfid
d["defendingHfid"] = x.DefendingHfid
if x.DefendingMercEnid != -1 {
d["defendingMercEnid"] = x.DefendingMercEnid
}
d["defendingSquadAnimated"] = x.DefendingSquadAnimated
d["defendingSquadDeaths"] = x.DefendingSquadDeaths
d["defendingSquadEntityPop"] = x.DefendingSquadEntityPop
d["defendingSquadNumber"] = x.DefendingSquadNumber
d["defendingSquadRace"] = x.DefendingSquadRace
d["defendingSquadSite"] = x.DefendingSquadSite
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
d["individualMerc"] = x.IndividualMerc
d["name"] = x.Name_
d["noncomHfid"] = x.NoncomHfid
if x.Outcome != 0 {
d["outcome"] = x.Outcome
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.WarEventcol != -1 {
d["warEventcol"] = x.WarEventcol
}
return json.Marshal(d)
}
type HistoricalEventCollectionBeastAttack struct {
Coords string `json:"coords" legend:"base"` // coords
DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Ordinal int `json:"ordinal" legend:"base"` // ordinal
ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventCollectionBeastAttack() *HistoricalEventCollectionBeastAttack {
return &HistoricalEventCollectionBeastAttack{
DefendingEnid: -1,
FeatureLayerId: -1,
Ordinal: -1,
ParentEventcol: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventCollectionBeastAttack) Type() string { return "beast attack" }
func (x *HistoricalEventCollectionBeastAttack) RelatedToEntity(id int) bool {
return x.DefendingEnid == id
}
func (x *HistoricalEventCollectionBeastAttack) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionBeastAttack) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionBeastAttack) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCollectionBeastAttack) RelatedToRegion(id int) bool {
return x.SubregionId == id
}
func (x *HistoricalEventCollectionBeastAttack) CheckFields() {
}
func (x *HistoricalEventCollectionBeastAttack) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coords"] = x.Coords
if x.DefendingEnid != -1 {
d["defendingEnid"] = x.DefendingEnid
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
if x.ParentEventcol != -1 {
d["parentEventcol"] = x.ParentEventcol
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventCollectionCeremony struct {
Ordinal int `json:"ordinal" legend:"base"` // ordinal
}
func NewHistoricalEventCollectionCeremony() *HistoricalEventCollectionCeremony {
return &HistoricalEventCollectionCeremony{
Ordinal: -1,
}
}
func (x *HistoricalEventCollectionCeremony) Type() string { return "ceremony" }
func (x *HistoricalEventCollectionCeremony) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventCollectionCeremony) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionCeremony) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionCeremony) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventCollectionCeremony) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionCeremony) CheckFields() {
}
func (x *HistoricalEventCollectionCeremony) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
return json.Marshal(d)
}
type HistoricalEventCollectionCompetition struct {
Ordinal int `json:"ordinal" legend:"base"` // ordinal
}
func NewHistoricalEventCollectionCompetition() *HistoricalEventCollectionCompetition {
return &HistoricalEventCollectionCompetition{
Ordinal: -1,
}
}
func (x *HistoricalEventCollectionCompetition) Type() string { return "competition" }
func (x *HistoricalEventCollectionCompetition) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventCollectionCompetition) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionCompetition) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionCompetition) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventCollectionCompetition) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionCompetition) CheckFields() {
}
func (x *HistoricalEventCollectionCompetition) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
return json.Marshal(d)
}
type HistoricalEventCollectionDuel struct {
AttackingHfid int `json:"attackingHfid" legend:"base"` // attacking_hfid
Coords string `json:"coords" legend:"base"` // coords
DefendingHfid int `json:"defendingHfid" legend:"base"` // defending_hfid
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Ordinal int `json:"ordinal" legend:"base"` // ordinal
ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventCollectionDuel() *HistoricalEventCollectionDuel {
return &HistoricalEventCollectionDuel{
AttackingHfid: -1,
DefendingHfid: -1,
FeatureLayerId: -1,
Ordinal: -1,
ParentEventcol: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventCollectionDuel) Type() string { return "duel" }
func (x *HistoricalEventCollectionDuel) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventCollectionDuel) RelatedToHf(id int) bool {
return x.AttackingHfid == id || x.DefendingHfid == id
}
func (x *HistoricalEventCollectionDuel) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionDuel) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCollectionDuel) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventCollectionDuel) CheckFields() {
}
func (x *HistoricalEventCollectionDuel) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackingHfid != -1 {
d["attackingHfid"] = x.AttackingHfid
}
d["coords"] = x.Coords
if x.DefendingHfid != -1 {
d["defendingHfid"] = x.DefendingHfid
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
if x.ParentEventcol != -1 {
d["parentEventcol"] = x.ParentEventcol
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventCollectionEntityOverthrown struct {
Ordinal int `json:"ordinal" legend:"base"` // ordinal
SiteId int `json:"siteId" legend:"base"` // site_id
TargetEntityId int `json:"targetEntityId" legend:"base"` // target_entity_id
}
func NewHistoricalEventCollectionEntityOverthrown() *HistoricalEventCollectionEntityOverthrown {
return &HistoricalEventCollectionEntityOverthrown{
Ordinal: -1,
SiteId: -1,
TargetEntityId: -1,
}
}
func (x *HistoricalEventCollectionEntityOverthrown) Type() string { return "entity overthrown" }
func (x *HistoricalEventCollectionEntityOverthrown) RelatedToEntity(id int) bool {
return x.TargetEntityId == id
}
func (x *HistoricalEventCollectionEntityOverthrown) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionEntityOverthrown) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionEntityOverthrown) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCollectionEntityOverthrown) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionEntityOverthrown) CheckFields() {
}
func (x *HistoricalEventCollectionEntityOverthrown) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.TargetEntityId != -1 {
d["targetEntityId"] = x.TargetEntityId
}
return json.Marshal(d)
}
type HistoricalEventCollectionInsurrection struct {
Ordinal int `json:"ordinal" legend:"base"` // ordinal
SiteId int `json:"siteId" legend:"base"` // site_id
TargetEnid int `json:"targetEnid" legend:"base"` // target_enid
}
func NewHistoricalEventCollectionInsurrection() *HistoricalEventCollectionInsurrection {
return &HistoricalEventCollectionInsurrection{
Ordinal: -1,
SiteId: -1,
TargetEnid: -1,
}
}
func (x *HistoricalEventCollectionInsurrection) Type() string { return "insurrection" }
func (x *HistoricalEventCollectionInsurrection) RelatedToEntity(id int) bool {
return x.TargetEnid == id
}
func (x *HistoricalEventCollectionInsurrection) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionInsurrection) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionInsurrection) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCollectionInsurrection) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionInsurrection) CheckFields() {
}
func (x *HistoricalEventCollectionInsurrection) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.TargetEnid != -1 {
d["targetEnid"] = x.TargetEnid
}
return json.Marshal(d)
}
type HistoricalEventCollectionJourney struct {
Ordinal int `json:"ordinal" legend:"base"` // ordinal
}
func NewHistoricalEventCollectionJourney() *HistoricalEventCollectionJourney {
return &HistoricalEventCollectionJourney{
Ordinal: -1,
}
}
func (x *HistoricalEventCollectionJourney) Type() string { return "journey" }
func (x *HistoricalEventCollectionJourney) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventCollectionJourney) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionJourney) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionJourney) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventCollectionJourney) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionJourney) CheckFields() {
}
func (x *HistoricalEventCollectionJourney) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
return json.Marshal(d)
}
type HistoricalEventCollectionOccasion struct {
CivId int `json:"civId" legend:"base"` // civ_id
OccasionId int `json:"occasionId" legend:"base"` // occasion_id
Ordinal int `json:"ordinal" legend:"base"` // ordinal
}
func NewHistoricalEventCollectionOccasion() *HistoricalEventCollectionOccasion {
return &HistoricalEventCollectionOccasion{
CivId: -1,
OccasionId: -1,
Ordinal: -1,
}
}
func (x *HistoricalEventCollectionOccasion) Type() string { return "occasion" }
func (x *HistoricalEventCollectionOccasion) RelatedToEntity(id int) bool { return x.CivId == id }
func (x *HistoricalEventCollectionOccasion) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionOccasion) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionOccasion) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventCollectionOccasion) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionOccasion) CheckFields() {
}
func (x *HistoricalEventCollectionOccasion) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.OccasionId != -1 {
d["occasionId"] = x.OccasionId
}
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
return json.Marshal(d)
}
type HistoricalEventCollectionPerformance struct {
Ordinal int `json:"ordinal" legend:"base"` // ordinal
}
func NewHistoricalEventCollectionPerformance() *HistoricalEventCollectionPerformance {
return &HistoricalEventCollectionPerformance{
Ordinal: -1,
}
}
func (x *HistoricalEventCollectionPerformance) Type() string { return "performance" }
func (x *HistoricalEventCollectionPerformance) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventCollectionPerformance) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionPerformance) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionPerformance) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventCollectionPerformance) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionPerformance) CheckFields() {
}
func (x *HistoricalEventCollectionPerformance) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
return json.Marshal(d)
}
type HistoricalEventCollectionPersecution struct {
Ordinal int `json:"ordinal" legend:"base"` // ordinal
SiteId int `json:"siteId" legend:"base"` // site_id
TargetEntityId int `json:"targetEntityId" legend:"base"` // target_entity_id
}
func NewHistoricalEventCollectionPersecution() *HistoricalEventCollectionPersecution {
return &HistoricalEventCollectionPersecution{
Ordinal: -1,
SiteId: -1,
TargetEntityId: -1,
}
}
func (x *HistoricalEventCollectionPersecution) Type() string { return "persecution" }
func (x *HistoricalEventCollectionPersecution) RelatedToEntity(id int) bool {
return x.TargetEntityId == id
}
func (x *HistoricalEventCollectionPersecution) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionPersecution) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionPersecution) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCollectionPersecution) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionPersecution) CheckFields() {
}
func (x *HistoricalEventCollectionPersecution) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.TargetEntityId != -1 {
d["targetEntityId"] = x.TargetEntityId
}
return json.Marshal(d)
}
type HistoricalEventCollectionProcession struct {
Ordinal int `json:"ordinal" legend:"base"` // ordinal
}
func NewHistoricalEventCollectionProcession() *HistoricalEventCollectionProcession {
return &HistoricalEventCollectionProcession{
Ordinal: -1,
}
}
func (x *HistoricalEventCollectionProcession) Type() string { return "procession" }
func (x *HistoricalEventCollectionProcession) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventCollectionProcession) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionProcession) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionProcession) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventCollectionProcession) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionProcession) CheckFields() {
}
func (x *HistoricalEventCollectionProcession) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
return json.Marshal(d)
}
type HistoricalEventCollectionPurgeAdjective int
const (
HistoricalEventCollectionPurgeAdjective_Unknown HistoricalEventCollectionPurgeAdjective = iota
HistoricalEventCollectionPurgeAdjective_Vampire
)
func parseHistoricalEventCollectionPurgeAdjective(s string) HistoricalEventCollectionPurgeAdjective {
switch s {
case "Vampire":
return HistoricalEventCollectionPurgeAdjective_Vampire
}
return HistoricalEventCollectionPurgeAdjective_Unknown
}
func (s HistoricalEventCollectionPurgeAdjective) String() string {
switch s {
case HistoricalEventCollectionPurgeAdjective_Vampire:
return "vampire"
}
return "unknown"
}
func (s HistoricalEventCollectionPurgeAdjective) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventCollectionPurge struct {
Adjective HistoricalEventCollectionPurgeAdjective `json:"adjective" legend:"base"` // adjective
Ordinal int `json:"ordinal" legend:"base"` // ordinal
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventCollectionPurge() *HistoricalEventCollectionPurge {
return &HistoricalEventCollectionPurge{
Ordinal: -1,
SiteId: -1,
}
}
func (x *HistoricalEventCollectionPurge) Type() string { return "purge" }
func (x *HistoricalEventCollectionPurge) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventCollectionPurge) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionPurge) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionPurge) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCollectionPurge) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionPurge) CheckFields() {
}
func (x *HistoricalEventCollectionPurge) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Adjective != 0 {
d["adjective"] = x.Adjective
}
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventCollectionRaid struct {
AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid
Coords string `json:"coords" legend:"base"` // coords
DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Ordinal int `json:"ordinal" legend:"base"` // ordinal
ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventCollectionRaid() *HistoricalEventCollectionRaid {
return &HistoricalEventCollectionRaid{
AttackingEnid: -1,
DefendingEnid: -1,
FeatureLayerId: -1,
Ordinal: -1,
ParentEventcol: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventCollectionRaid) Type() string { return "raid" }
func (x *HistoricalEventCollectionRaid) RelatedToEntity(id int) bool {
return x.AttackingEnid == id || x.DefendingEnid == id
}
func (x *HistoricalEventCollectionRaid) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionRaid) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionRaid) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCollectionRaid) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventCollectionRaid) CheckFields() {
}
func (x *HistoricalEventCollectionRaid) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackingEnid != -1 {
d["attackingEnid"] = x.AttackingEnid
}
d["coords"] = x.Coords
if x.DefendingEnid != -1 {
d["defendingEnid"] = x.DefendingEnid
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
if x.ParentEventcol != -1 {
d["parentEventcol"] = x.ParentEventcol
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventCollectionSiteConquered struct {
AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid
DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid
Ordinal int `json:"ordinal" legend:"base"` // ordinal
SiteId int `json:"siteId" legend:"base"` // site_id
WarEventcol int `json:"warEventcol" legend:"base"` // war_eventcol
}
func NewHistoricalEventCollectionSiteConquered() *HistoricalEventCollectionSiteConquered {
return &HistoricalEventCollectionSiteConquered{
AttackingEnid: -1,
DefendingEnid: -1,
Ordinal: -1,
SiteId: -1,
WarEventcol: -1,
}
}
func (x *HistoricalEventCollectionSiteConquered) Type() string { return "site conquered" }
func (x *HistoricalEventCollectionSiteConquered) RelatedToEntity(id int) bool {
return x.AttackingEnid == id || x.DefendingEnid == id
}
func (x *HistoricalEventCollectionSiteConquered) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionSiteConquered) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionSiteConquered) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCollectionSiteConquered) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionSiteConquered) CheckFields() {
}
func (x *HistoricalEventCollectionSiteConquered) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackingEnid != -1 {
d["attackingEnid"] = x.AttackingEnid
}
if x.DefendingEnid != -1 {
d["defendingEnid"] = x.DefendingEnid
}
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.WarEventcol != -1 {
d["warEventcol"] = x.WarEventcol
}
return json.Marshal(d)
}
type HistoricalEventCollectionTheft struct {
AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid
Coords string `json:"coords" legend:"base"` // coords
DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Ordinal int `json:"ordinal" legend:"base"` // ordinal
ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventCollectionTheft() *HistoricalEventCollectionTheft {
return &HistoricalEventCollectionTheft{
AttackingEnid: -1,
DefendingEnid: -1,
FeatureLayerId: -1,
Ordinal: -1,
ParentEventcol: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventCollectionTheft) Type() string { return "theft" }
func (x *HistoricalEventCollectionTheft) RelatedToEntity(id int) bool {
return x.AttackingEnid == id || x.DefendingEnid == id
}
func (x *HistoricalEventCollectionTheft) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionTheft) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionTheft) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCollectionTheft) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventCollectionTheft) CheckFields() {
}
func (x *HistoricalEventCollectionTheft) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackingEnid != -1 {
d["attackingEnid"] = x.AttackingEnid
}
d["coords"] = x.Coords
if x.DefendingEnid != -1 {
d["defendingEnid"] = x.DefendingEnid
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Ordinal != -1 {
d["ordinal"] = x.Ordinal
}
if x.ParentEventcol != -1 {
d["parentEventcol"] = x.ParentEventcol
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventCollectionWar struct {
AggressorEntId int `json:"aggressorEntId" legend:"base"` // aggressor_ent_id
DefenderEntId int `json:"defenderEntId" legend:"base"` // defender_ent_id
Name_ string `json:"name" legend:"base"` // name
}
func NewHistoricalEventCollectionWar() *HistoricalEventCollectionWar {
return &HistoricalEventCollectionWar{
AggressorEntId: -1,
DefenderEntId: -1,
}
}
func (x *HistoricalEventCollectionWar) Name() string { return x.Name_ }
func (x *HistoricalEventCollectionWar) Type() string { return "war" }
func (x *HistoricalEventCollectionWar) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventCollectionWar) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCollectionWar) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCollectionWar) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventCollectionWar) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCollectionWar) CheckFields() {
}
func (x *HistoricalEventCollectionWar) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AggressorEntId != -1 {
d["aggressorEntId"] = x.AggressorEntId
}
if x.DefenderEntId != -1 {
d["defenderEntId"] = x.DefenderEntId
}
d["name"] = x.Name_
return json.Marshal(d)
}
type HistoricalEventCompetition struct {
CivId int `json:"civId" legend:"base"` // civ_id
CompetitorHfid []int `json:"competitorHfid" legend:"base"` // competitor_hfid
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
OccasionId int `json:"occasionId" legend:"base"` // occasion_id
ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
WinnerHfid int `json:"winnerHfid" legend:"base"` // winner_hfid
}
func NewHistoricalEventCompetition() *HistoricalEventCompetition {
return &HistoricalEventCompetition{
CivId: -1,
FeatureLayerId: -1,
OccasionId: -1,
ScheduleId: -1,
SiteId: -1,
SubregionId: -1,
WinnerHfid: -1,
}
}
func (x *HistoricalEventCompetition) Type() string { return "competition" }
func (x *HistoricalEventCompetition) RelatedToEntity(id int) bool { return x.CivId == id }
func (x *HistoricalEventCompetition) RelatedToHf(id int) bool {
return containsInt(x.CompetitorHfid, id) || x.WinnerHfid == id
}
func (x *HistoricalEventCompetition) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCompetition) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCompetition) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventCompetition) CheckFields() {
}
func (x *HistoricalEventCompetition) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
d["competitorHfid"] = x.CompetitorHfid
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.OccasionId != -1 {
d["occasionId"] = x.OccasionId
}
if x.ScheduleId != -1 {
d["scheduleId"] = x.ScheduleId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.WinnerHfid != -1 {
d["winnerHfid"] = x.WinnerHfid
}
return json.Marshal(d)
}
type HistoricalEventCreateEntityPositionReason int
const (
HistoricalEventCreateEntityPositionReason_Unknown HistoricalEventCreateEntityPositionReason = iota
HistoricalEventCreateEntityPositionReason_AsAMatterOfCourse
HistoricalEventCreateEntityPositionReason_Collaboration
HistoricalEventCreateEntityPositionReason_ForceOfArgument
HistoricalEventCreateEntityPositionReason_ThreatOfViolence
HistoricalEventCreateEntityPositionReason_WaveOfPopularSupport
)
func parseHistoricalEventCreateEntityPositionReason(s string) HistoricalEventCreateEntityPositionReason {
switch s {
case "as_a_matter_of_course":
return HistoricalEventCreateEntityPositionReason_AsAMatterOfCourse
case "collaboration":
return HistoricalEventCreateEntityPositionReason_Collaboration
case "force_of_argument":
return HistoricalEventCreateEntityPositionReason_ForceOfArgument
case "threat_of_violence":
return HistoricalEventCreateEntityPositionReason_ThreatOfViolence
case "wave_of_popular_support":
return HistoricalEventCreateEntityPositionReason_WaveOfPopularSupport
}
return HistoricalEventCreateEntityPositionReason_Unknown
}
func (s HistoricalEventCreateEntityPositionReason) String() string {
switch s {
case HistoricalEventCreateEntityPositionReason_AsAMatterOfCourse:
return "as a matter of course"
case HistoricalEventCreateEntityPositionReason_Collaboration:
return "collaboration"
case HistoricalEventCreateEntityPositionReason_ForceOfArgument:
return "force of argument"
case HistoricalEventCreateEntityPositionReason_ThreatOfViolence:
return "threat of violence"
case HistoricalEventCreateEntityPositionReason_WaveOfPopularSupport:
return "wave of popular support"
}
return "unknown"
}
func (s HistoricalEventCreateEntityPositionReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventCreateEntityPosition struct {
Civ int `json:"civ" legend:"plus"` // civ
Histfig int `json:"histfig" legend:"plus"` // histfig
Position string `json:"position" legend:"plus"` // position
Reason HistoricalEventCreateEntityPositionReason `json:"reason" legend:"plus"` // reason
SiteCiv int `json:"siteCiv" legend:"plus"` // site_civ
}
func NewHistoricalEventCreateEntityPosition() *HistoricalEventCreateEntityPosition {
return &HistoricalEventCreateEntityPosition{
Civ: -1,
Histfig: -1,
SiteCiv: -1,
}
}
func (x *HistoricalEventCreateEntityPosition) Type() string { return "create entity position" }
func (x *HistoricalEventCreateEntityPosition) RelatedToEntity(id int) bool {
return x.Civ == id || x.SiteCiv == id
}
func (x *HistoricalEventCreateEntityPosition) RelatedToHf(id int) bool { return x.Histfig == id }
func (x *HistoricalEventCreateEntityPosition) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCreateEntityPosition) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventCreateEntityPosition) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCreateEntityPosition) CheckFields() {
}
func (x *HistoricalEventCreateEntityPosition) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Civ != -1 {
d["civ"] = x.Civ
}
if x.Histfig != -1 {
d["histfig"] = x.Histfig
}
d["position"] = x.Position
if x.Reason != 0 {
d["reason"] = x.Reason
}
if x.SiteCiv != -1 {
d["siteCiv"] = x.SiteCiv
}
return json.Marshal(d)
}
type HistoricalEventCreatedSite struct {
BuilderHfid int `json:"builderHfid" legend:"base"` // builder_hfid
CivId int `json:"civId" legend:"base"` // civ_id
ResidentCivId int `json:"residentCivId" legend:"base"` // resident_civ_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventCreatedSite() *HistoricalEventCreatedSite {
return &HistoricalEventCreatedSite{
BuilderHfid: -1,
CivId: -1,
ResidentCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventCreatedSite) Type() string { return "created site" }
func (x *HistoricalEventCreatedSite) RelatedToEntity(id int) bool {
return x.CivId == id || x.ResidentCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventCreatedSite) RelatedToHf(id int) bool { return x.BuilderHfid == id }
func (x *HistoricalEventCreatedSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCreatedSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCreatedSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCreatedSite) CheckFields() {
}
func (x *HistoricalEventCreatedSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.BuilderHfid != -1 {
d["builderHfid"] = x.BuilderHfid
}
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.ResidentCivId != -1 {
d["residentCivId"] = x.ResidentCivId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventCreatedStructureRebuild int
const (
HistoricalEventCreatedStructureRebuild_Unknown HistoricalEventCreatedStructureRebuild = iota
HistoricalEventCreatedStructureRebuild_False
HistoricalEventCreatedStructureRebuild_True
)
func parseHistoricalEventCreatedStructureRebuild(s string) HistoricalEventCreatedStructureRebuild {
switch s {
case "false":
return HistoricalEventCreatedStructureRebuild_False
case "true":
return HistoricalEventCreatedStructureRebuild_True
}
return HistoricalEventCreatedStructureRebuild_Unknown
}
func (s HistoricalEventCreatedStructureRebuild) String() string {
switch s {
case HistoricalEventCreatedStructureRebuild_False:
return "false"
case HistoricalEventCreatedStructureRebuild_True:
return "true"
}
return "unknown"
}
func (s HistoricalEventCreatedStructureRebuild) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventCreatedStructure struct {
BuilderHfid int `json:"builderHfid" legend:"base"` // builder_hfid
CivId int `json:"civId" legend:"base"` // civ_id
Rebuild HistoricalEventCreatedStructureRebuild `json:"rebuild" legend:"plus"` // rebuild
Rebuilt bool `json:"rebuilt" legend:"base"` // rebuilt
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventCreatedStructure() *HistoricalEventCreatedStructure {
return &HistoricalEventCreatedStructure{
BuilderHfid: -1,
CivId: -1,
SiteCivId: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventCreatedStructure) Type() string { return "created structure" }
func (x *HistoricalEventCreatedStructure) RelatedToEntity(id int) bool {
return x.CivId == id || x.SiteCivId == id
}
func (x *HistoricalEventCreatedStructure) RelatedToHf(id int) bool { return x.BuilderHfid == id }
func (x *HistoricalEventCreatedStructure) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCreatedStructure) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCreatedStructure) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCreatedStructure) CheckFields() {
}
func (x *HistoricalEventCreatedStructure) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.BuilderHfid != -1 {
d["builderHfid"] = x.BuilderHfid
}
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.Rebuild != 0 {
d["rebuild"] = x.Rebuild
}
d["rebuilt"] = x.Rebuilt
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventCreatedWorldConstruction struct {
CivId int `json:"civId" legend:"base"` // civ_id
MasterWcid int `json:"masterWcid" legend:"base"` // master_wcid
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId1 int `json:"siteId1" legend:"base"` // site_id1
SiteId2 int `json:"siteId2" legend:"base"` // site_id2
Wcid int `json:"wcid" legend:"base"` // wcid
}
func NewHistoricalEventCreatedWorldConstruction() *HistoricalEventCreatedWorldConstruction {
return &HistoricalEventCreatedWorldConstruction{
CivId: -1,
MasterWcid: -1,
SiteCivId: -1,
SiteId1: -1,
SiteId2: -1,
Wcid: -1,
}
}
func (x *HistoricalEventCreatedWorldConstruction) Type() string { return "created world construction" }
func (x *HistoricalEventCreatedWorldConstruction) RelatedToEntity(id int) bool {
return x.CivId == id || x.SiteCivId == id
}
func (x *HistoricalEventCreatedWorldConstruction) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCreatedWorldConstruction) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCreatedWorldConstruction) RelatedToSite(id int) bool {
return x.SiteId1 == id || x.SiteId2 == id
}
func (x *HistoricalEventCreatedWorldConstruction) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventCreatedWorldConstruction) CheckFields() {
}
func (x *HistoricalEventCreatedWorldConstruction) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.MasterWcid != -1 {
d["masterWcid"] = x.MasterWcid
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId1 != -1 {
d["siteId1"] = x.SiteId1
}
if x.SiteId2 != -1 {
d["siteId2"] = x.SiteId2
}
if x.Wcid != -1 {
d["wcid"] = x.Wcid
}
return json.Marshal(d)
}
type HistoricalEventCreatureDevoured struct {
Caste string `json:"caste" legend:"plus"` // caste
Eater int `json:"eater" legend:"plus"` // eater
Entity int `json:"entity" legend:"plus"` // entity
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Race string `json:"race" legend:"plus"` // race
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
Victim int `json:"victim" legend:"plus"` // victim
}
func NewHistoricalEventCreatureDevoured() *HistoricalEventCreatureDevoured {
return &HistoricalEventCreatureDevoured{
Eater: -1,
Entity: -1,
FeatureLayerId: -1,
SiteId: -1,
SubregionId: -1,
Victim: -1,
}
}
func (x *HistoricalEventCreatureDevoured) Type() string { return "creature devoured" }
func (x *HistoricalEventCreatureDevoured) RelatedToEntity(id int) bool { return x.Entity == id }
func (x *HistoricalEventCreatureDevoured) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventCreatureDevoured) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventCreatureDevoured) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventCreatureDevoured) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventCreatureDevoured) CheckFields() {
if x.Eater != x.FeatureLayerId {
sameFields["HistoricalEventCreatureDevoured"]["Eater"]["FeatureLayerId"] = false
}
if x.Eater != x.SiteId {
sameFields["HistoricalEventCreatureDevoured"]["Eater"]["SiteId"] = false
}
if x.Eater != x.SubregionId {
sameFields["HistoricalEventCreatureDevoured"]["Eater"]["SubregionId"] = false
}
if x.Entity != x.FeatureLayerId {
sameFields["HistoricalEventCreatureDevoured"]["Entity"]["FeatureLayerId"] = false
}
if x.Entity != x.SiteId {
sameFields["HistoricalEventCreatureDevoured"]["Entity"]["SiteId"] = false
}
if x.Entity != x.SubregionId {
sameFields["HistoricalEventCreatureDevoured"]["Entity"]["SubregionId"] = false
}
if x.Victim != x.FeatureLayerId {
sameFields["HistoricalEventCreatureDevoured"]["Victim"]["FeatureLayerId"] = false
}
if x.Victim != x.SiteId {
sameFields["HistoricalEventCreatureDevoured"]["Victim"]["SiteId"] = false
}
if x.Victim != x.SubregionId {
sameFields["HistoricalEventCreatureDevoured"]["Victim"]["SubregionId"] = false
}
}
func (x *HistoricalEventCreatureDevoured) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["caste"] = x.Caste
if x.Eater != -1 {
d["eater"] = x.Eater
}
if x.Entity != -1 {
d["entity"] = x.Entity
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
d["race"] = x.Race
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.Victim != -1 {
d["victim"] = x.Victim
}
return json.Marshal(d)
}
type HistoricalEventDanceFormCreatedCircumstance int
const (
HistoricalEventDanceFormCreatedCircumstance_Unknown HistoricalEventDanceFormCreatedCircumstance = iota
HistoricalEventDanceFormCreatedCircumstance_Dream
HistoricalEventDanceFormCreatedCircumstance_DreamAboutHf
HistoricalEventDanceFormCreatedCircumstance_Nightmare
HistoricalEventDanceFormCreatedCircumstance_PrayToHf
)
func parseHistoricalEventDanceFormCreatedCircumstance(s string) HistoricalEventDanceFormCreatedCircumstance {
switch s {
case "dream":
return HistoricalEventDanceFormCreatedCircumstance_Dream
case "dream about hf":
return HistoricalEventDanceFormCreatedCircumstance_DreamAboutHf
case "nightmare":
return HistoricalEventDanceFormCreatedCircumstance_Nightmare
case "pray to hf":
return HistoricalEventDanceFormCreatedCircumstance_PrayToHf
}
return HistoricalEventDanceFormCreatedCircumstance_Unknown
}
func (s HistoricalEventDanceFormCreatedCircumstance) String() string {
switch s {
case HistoricalEventDanceFormCreatedCircumstance_Dream:
return "dream"
case HistoricalEventDanceFormCreatedCircumstance_DreamAboutHf:
return "dream about hf"
case HistoricalEventDanceFormCreatedCircumstance_Nightmare:
return "nightmare"
case HistoricalEventDanceFormCreatedCircumstance_PrayToHf:
return "pray to hf"
}
return "unknown"
}
func (s HistoricalEventDanceFormCreatedCircumstance) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventDanceFormCreatedReason int
const (
HistoricalEventDanceFormCreatedReason_Unknown HistoricalEventDanceFormCreatedReason = iota
HistoricalEventDanceFormCreatedReason_GlorifyHf
)
func parseHistoricalEventDanceFormCreatedReason(s string) HistoricalEventDanceFormCreatedReason {
switch s {
case "glorify hf":
return HistoricalEventDanceFormCreatedReason_GlorifyHf
}
return HistoricalEventDanceFormCreatedReason_Unknown
}
func (s HistoricalEventDanceFormCreatedReason) String() string {
switch s {
case HistoricalEventDanceFormCreatedReason_GlorifyHf:
return "glorify hf"
}
return "unknown"
}
func (s HistoricalEventDanceFormCreatedReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventDanceFormCreated struct {
Circumstance HistoricalEventDanceFormCreatedCircumstance `json:"circumstance" legend:"base"` // circumstance
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
FormId int `json:"formId" legend:"base"` // form_id
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
Reason HistoricalEventDanceFormCreatedReason `json:"reason" legend:"base"` // reason
ReasonId int `json:"reasonId" legend:"base"` // reason_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventDanceFormCreated() *HistoricalEventDanceFormCreated {
return &HistoricalEventDanceFormCreated{
CircumstanceId: -1,
FormId: -1,
HistFigureId: -1,
ReasonId: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventDanceFormCreated) Type() string { return "dance form created" }
func (x *HistoricalEventDanceFormCreated) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventDanceFormCreated) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventDanceFormCreated) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventDanceFormCreated) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventDanceFormCreated) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventDanceFormCreated) CheckFields() {
}
func (x *HistoricalEventDanceFormCreated) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Circumstance != 0 {
d["circumstance"] = x.Circumstance
}
if x.CircumstanceId != -1 {
d["circumstanceId"] = x.CircumstanceId
}
if x.FormId != -1 {
d["formId"] = x.FormId
}
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.Reason != 0 {
d["reason"] = x.Reason
}
if x.ReasonId != -1 {
d["reasonId"] = x.ReasonId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventDestroyedSite struct {
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
NoDefeatMention bool `json:"noDefeatMention" legend:"base"` // no_defeat_mention
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventDestroyedSite() *HistoricalEventDestroyedSite {
return &HistoricalEventDestroyedSite{
AttackerCivId: -1,
DefenderCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventDestroyedSite) Type() string { return "destroyed site" }
func (x *HistoricalEventDestroyedSite) RelatedToEntity(id int) bool {
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventDestroyedSite) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventDestroyedSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventDestroyedSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventDestroyedSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventDestroyedSite) CheckFields() {
}
func (x *HistoricalEventDestroyedSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackerCivId != -1 {
d["attackerCivId"] = x.AttackerCivId
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
d["noDefeatMention"] = x.NoDefeatMention
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventDiplomatLost struct {
Entity int `json:"entity" legend:"plus"` // entity
Involved int `json:"involved" legend:"plus"` // involved
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventDiplomatLost() *HistoricalEventDiplomatLost {
return &HistoricalEventDiplomatLost{
Entity: -1,
Involved: -1,
SiteId: -1,
}
}
func (x *HistoricalEventDiplomatLost) Type() string { return "diplomat lost" }
func (x *HistoricalEventDiplomatLost) RelatedToEntity(id int) bool {
return x.Entity == id || x.Involved == id
}
func (x *HistoricalEventDiplomatLost) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventDiplomatLost) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventDiplomatLost) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventDiplomatLost) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventDiplomatLost) CheckFields() {
if x.Entity != x.SiteId {
sameFields["HistoricalEventDiplomatLost"]["Entity"]["SiteId"] = false
}
if x.Involved != x.SiteId {
sameFields["HistoricalEventDiplomatLost"]["Involved"]["SiteId"] = false
}
}
func (x *HistoricalEventDiplomatLost) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Entity != -1 {
d["entity"] = x.Entity
}
if x.Involved != -1 {
d["involved"] = x.Involved
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventEntityAllianceFormed struct {
InitiatingEnid int `json:"initiatingEnid" legend:"base"` // initiating_enid
JoiningEnid []int `json:"joiningEnid" legend:"base"` // joining_enid
}
func NewHistoricalEventEntityAllianceFormed() *HistoricalEventEntityAllianceFormed {
return &HistoricalEventEntityAllianceFormed{
InitiatingEnid: -1,
}
}
func (x *HistoricalEventEntityAllianceFormed) Type() string { return "entity alliance formed" }
func (x *HistoricalEventEntityAllianceFormed) RelatedToEntity(id int) bool {
return containsInt(x.JoiningEnid, id) || x.InitiatingEnid == id
}
func (x *HistoricalEventEntityAllianceFormed) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventEntityAllianceFormed) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityAllianceFormed) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventEntityAllianceFormed) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityAllianceFormed) CheckFields() {
}
func (x *HistoricalEventEntityAllianceFormed) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.InitiatingEnid != -1 {
d["initiatingEnid"] = x.InitiatingEnid
}
d["joiningEnid"] = x.JoiningEnid
return json.Marshal(d)
}
type HistoricalEventEntityBreachFeatureLayer struct {
CivEntityId int `json:"civEntityId" legend:"base"` // civ_entity_id
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
SiteEntityId int `json:"siteEntityId" legend:"base"` // site_entity_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventEntityBreachFeatureLayer() *HistoricalEventEntityBreachFeatureLayer {
return &HistoricalEventEntityBreachFeatureLayer{
CivEntityId: -1,
FeatureLayerId: -1,
SiteEntityId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventEntityBreachFeatureLayer) Type() string { return "entity breach feature layer" }
func (x *HistoricalEventEntityBreachFeatureLayer) RelatedToEntity(id int) bool {
return x.CivEntityId == id || x.SiteEntityId == id
}
func (x *HistoricalEventEntityBreachFeatureLayer) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventEntityBreachFeatureLayer) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityBreachFeatureLayer) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntityBreachFeatureLayer) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityBreachFeatureLayer) CheckFields() {
}
func (x *HistoricalEventEntityBreachFeatureLayer) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivEntityId != -1 {
d["civEntityId"] = x.CivEntityId
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.SiteEntityId != -1 {
d["siteEntityId"] = x.SiteEntityId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventEntityCreated struct {
CreatorHfid int `json:"creatorHfid" legend:"base"` // creator_hfid
EntityId int `json:"entityId" legend:"base"` // entity_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventEntityCreated() *HistoricalEventEntityCreated {
return &HistoricalEventEntityCreated{
CreatorHfid: -1,
EntityId: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventEntityCreated) Type() string { return "entity created" }
func (x *HistoricalEventEntityCreated) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventEntityCreated) RelatedToHf(id int) bool { return x.CreatorHfid == id }
func (x *HistoricalEventEntityCreated) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityCreated) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntityCreated) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityCreated) CheckFields() {
}
func (x *HistoricalEventEntityCreated) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CreatorHfid != -1 {
d["creatorHfid"] = x.CreatorHfid
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventEntityDissolvedReason int
const (
HistoricalEventEntityDissolvedReason_Unknown HistoricalEventEntityDissolvedReason = iota
HistoricalEventEntityDissolvedReason_HeavyLossesInBattle
HistoricalEventEntityDissolvedReason_LackOfFunds
)
func parseHistoricalEventEntityDissolvedReason(s string) HistoricalEventEntityDissolvedReason {
switch s {
case "heavy losses in battle":
return HistoricalEventEntityDissolvedReason_HeavyLossesInBattle
case "lack of funds":
return HistoricalEventEntityDissolvedReason_LackOfFunds
}
return HistoricalEventEntityDissolvedReason_Unknown
}
func (s HistoricalEventEntityDissolvedReason) String() string {
switch s {
case HistoricalEventEntityDissolvedReason_HeavyLossesInBattle:
return "heavy losses in battle"
case HistoricalEventEntityDissolvedReason_LackOfFunds:
return "lack of funds"
}
return "unknown"
}
func (s HistoricalEventEntityDissolvedReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventEntityDissolved struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
Reason HistoricalEventEntityDissolvedReason `json:"reason" legend:"base"` // reason
}
func NewHistoricalEventEntityDissolved() *HistoricalEventEntityDissolved {
return &HistoricalEventEntityDissolved{
EntityId: -1,
}
}
func (x *HistoricalEventEntityDissolved) Type() string { return "entity dissolved" }
func (x *HistoricalEventEntityDissolved) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventEntityDissolved) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventEntityDissolved) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityDissolved) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventEntityDissolved) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityDissolved) CheckFields() {
}
func (x *HistoricalEventEntityDissolved) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.Reason != 0 {
d["reason"] = x.Reason
}
return json.Marshal(d)
}
type HistoricalEventEntityEquipmentPurchase struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
Hfid []int `json:"hfid" legend:"base"` // hfid
NewEquipmentLevel int `json:"newEquipmentLevel" legend:"base"` // new_equipment_level
}
func NewHistoricalEventEntityEquipmentPurchase() *HistoricalEventEntityEquipmentPurchase {
return &HistoricalEventEntityEquipmentPurchase{
EntityId: -1,
NewEquipmentLevel: -1,
}
}
func (x *HistoricalEventEntityEquipmentPurchase) Type() string { return "entity equipment purchase" }
func (x *HistoricalEventEntityEquipmentPurchase) RelatedToEntity(id int) bool {
return x.EntityId == id
}
func (x *HistoricalEventEntityEquipmentPurchase) RelatedToHf(id int) bool {
return containsInt(x.Hfid, id)
}
func (x *HistoricalEventEntityEquipmentPurchase) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityEquipmentPurchase) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventEntityEquipmentPurchase) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityEquipmentPurchase) CheckFields() {
}
func (x *HistoricalEventEntityEquipmentPurchase) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
d["hfid"] = x.Hfid
if x.NewEquipmentLevel != -1 {
d["newEquipmentLevel"] = x.NewEquipmentLevel
}
return json.Marshal(d)
}
type HistoricalEventEntityExpelsHf struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
Hfid int `json:"hfid" legend:"base"` // hfid
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventEntityExpelsHf() *HistoricalEventEntityExpelsHf {
return &HistoricalEventEntityExpelsHf{
EntityId: -1,
Hfid: -1,
SiteId: -1,
}
}
func (x *HistoricalEventEntityExpelsHf) Type() string { return "entity expels hf" }
func (x *HistoricalEventEntityExpelsHf) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventEntityExpelsHf) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventEntityExpelsHf) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityExpelsHf) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntityExpelsHf) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityExpelsHf) CheckFields() {
}
func (x *HistoricalEventEntityExpelsHf) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventEntityFledSite struct {
FledCivId int `json:"fledCivId" legend:"base"` // fled_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventEntityFledSite() *HistoricalEventEntityFledSite {
return &HistoricalEventEntityFledSite{
FledCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventEntityFledSite) Type() string { return "entity fled site" }
func (x *HistoricalEventEntityFledSite) RelatedToEntity(id int) bool { return x.FledCivId == id }
func (x *HistoricalEventEntityFledSite) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventEntityFledSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityFledSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntityFledSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityFledSite) CheckFields() {
}
func (x *HistoricalEventEntityFledSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.FledCivId != -1 {
d["fledCivId"] = x.FledCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventEntityIncorporated struct {
JoinedEntityId int `json:"joinedEntityId" legend:"base"` // joined_entity_id
JoinerEntityId int `json:"joinerEntityId" legend:"base"` // joiner_entity_id
LeaderHfid int `json:"leaderHfid" legend:"base"` // leader_hfid
PartialIncorporation bool `json:"partialIncorporation" legend:"base"` // partial_incorporation
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventEntityIncorporated() *HistoricalEventEntityIncorporated {
return &HistoricalEventEntityIncorporated{
JoinedEntityId: -1,
JoinerEntityId: -1,
LeaderHfid: -1,
SiteId: -1,
}
}
func (x *HistoricalEventEntityIncorporated) Type() string { return "entity incorporated" }
func (x *HistoricalEventEntityIncorporated) RelatedToEntity(id int) bool {
return x.JoinedEntityId == id || x.JoinerEntityId == id
}
func (x *HistoricalEventEntityIncorporated) RelatedToHf(id int) bool { return x.LeaderHfid == id }
func (x *HistoricalEventEntityIncorporated) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityIncorporated) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntityIncorporated) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityIncorporated) CheckFields() {
}
func (x *HistoricalEventEntityIncorporated) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.JoinedEntityId != -1 {
d["joinedEntityId"] = x.JoinedEntityId
}
if x.JoinerEntityId != -1 {
d["joinerEntityId"] = x.JoinerEntityId
}
if x.LeaderHfid != -1 {
d["leaderHfid"] = x.LeaderHfid
}
d["partialIncorporation"] = x.PartialIncorporation
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventEntityLawLawAdd int
const (
HistoricalEventEntityLawLawAdd_Unknown HistoricalEventEntityLawLawAdd = iota
HistoricalEventEntityLawLawAdd_Harsh
)
func parseHistoricalEventEntityLawLawAdd(s string) HistoricalEventEntityLawLawAdd {
switch s {
case "harsh":
return HistoricalEventEntityLawLawAdd_Harsh
}
return HistoricalEventEntityLawLawAdd_Unknown
}
func (s HistoricalEventEntityLawLawAdd) String() string {
switch s {
case HistoricalEventEntityLawLawAdd_Harsh:
return "harsh"
}
return "unknown"
}
func (s HistoricalEventEntityLawLawAdd) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventEntityLawLawRemove int
const (
HistoricalEventEntityLawLawRemove_Unknown HistoricalEventEntityLawLawRemove = iota
HistoricalEventEntityLawLawRemove_Harsh
)
func parseHistoricalEventEntityLawLawRemove(s string) HistoricalEventEntityLawLawRemove {
switch s {
case "harsh":
return HistoricalEventEntityLawLawRemove_Harsh
}
return HistoricalEventEntityLawLawRemove_Unknown
}
func (s HistoricalEventEntityLawLawRemove) String() string {
switch s {
case HistoricalEventEntityLawLawRemove_Harsh:
return "harsh"
}
return "unknown"
}
func (s HistoricalEventEntityLawLawRemove) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventEntityLaw struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
LawAdd HistoricalEventEntityLawLawAdd `json:"lawAdd" legend:"base"` // law_add
LawRemove HistoricalEventEntityLawLawRemove `json:"lawRemove" legend:"base"` // law_remove
}
func NewHistoricalEventEntityLaw() *HistoricalEventEntityLaw {
return &HistoricalEventEntityLaw{
EntityId: -1,
HistFigureId: -1,
}
}
func (x *HistoricalEventEntityLaw) Type() string { return "entity law" }
func (x *HistoricalEventEntityLaw) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventEntityLaw) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventEntityLaw) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityLaw) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventEntityLaw) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityLaw) CheckFields() {
}
func (x *HistoricalEventEntityLaw) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.LawAdd != 0 {
d["lawAdd"] = x.LawAdd
}
if x.LawRemove != 0 {
d["lawRemove"] = x.LawRemove
}
return json.Marshal(d)
}
type HistoricalEventEntityOverthrown struct {
ConspiratorHfid []int `json:"conspiratorHfid" legend:"base"` // conspirator_hfid
EntityId int `json:"entityId" legend:"base"` // entity_id
InstigatorHfid int `json:"instigatorHfid" legend:"base"` // instigator_hfid
OverthrownHfid int `json:"overthrownHfid" legend:"base"` // overthrown_hfid
PosTakerHfid int `json:"posTakerHfid" legend:"base"` // pos_taker_hfid
PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventEntityOverthrown() *HistoricalEventEntityOverthrown {
return &HistoricalEventEntityOverthrown{
EntityId: -1,
InstigatorHfid: -1,
OverthrownHfid: -1,
PosTakerHfid: -1,
PositionProfileId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventEntityOverthrown) Type() string { return "entity overthrown" }
func (x *HistoricalEventEntityOverthrown) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventEntityOverthrown) RelatedToHf(id int) bool {
return containsInt(x.ConspiratorHfid, id) || x.InstigatorHfid == id || x.OverthrownHfid == id || x.PosTakerHfid == id
}
func (x *HistoricalEventEntityOverthrown) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityOverthrown) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntityOverthrown) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityOverthrown) CheckFields() {
}
func (x *HistoricalEventEntityOverthrown) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["conspiratorHfid"] = x.ConspiratorHfid
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.InstigatorHfid != -1 {
d["instigatorHfid"] = x.InstigatorHfid
}
if x.OverthrownHfid != -1 {
d["overthrownHfid"] = x.OverthrownHfid
}
if x.PosTakerHfid != -1 {
d["posTakerHfid"] = x.PosTakerHfid
}
if x.PositionProfileId != -1 {
d["positionProfileId"] = x.PositionProfileId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventEntityPersecuted struct {
DestroyedStructureId int `json:"destroyedStructureId" legend:"base"` // destroyed_structure_id
ExpelledCreature []int `json:"expelledCreature" legend:"base"` // expelled_creature
ExpelledHfid []int `json:"expelledHfid" legend:"base"` // expelled_hfid
ExpelledNumber []int `json:"expelledNumber" legend:"base"` // expelled_number
ExpelledPopId []int `json:"expelledPopId" legend:"base"` // expelled_pop_id
PersecutorEnid int `json:"persecutorEnid" legend:"base"` // persecutor_enid
PersecutorHfid int `json:"persecutorHfid" legend:"base"` // persecutor_hfid
PropertyConfiscatedFromHfid []int `json:"propertyConfiscatedFromHfid" legend:"base"` // property_confiscated_from_hfid
ShrineAmountDestroyed int `json:"shrineAmountDestroyed" legend:"base"` // shrine_amount_destroyed
SiteId int `json:"siteId" legend:"base"` // site_id
TargetEnid int `json:"targetEnid" legend:"base"` // target_enid
}
func NewHistoricalEventEntityPersecuted() *HistoricalEventEntityPersecuted {
return &HistoricalEventEntityPersecuted{
DestroyedStructureId: -1,
PersecutorEnid: -1,
PersecutorHfid: -1,
ShrineAmountDestroyed: -1,
SiteId: -1,
TargetEnid: -1,
}
}
func (x *HistoricalEventEntityPersecuted) Type() string { return "entity persecuted" }
func (x *HistoricalEventEntityPersecuted) RelatedToEntity(id int) bool {
return x.PersecutorEnid == id || x.TargetEnid == id
}
func (x *HistoricalEventEntityPersecuted) RelatedToHf(id int) bool {
return containsInt(x.ExpelledHfid, id) || containsInt(x.PropertyConfiscatedFromHfid, id) || x.PersecutorHfid == id
}
func (x *HistoricalEventEntityPersecuted) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityPersecuted) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntityPersecuted) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityPersecuted) CheckFields() {
}
func (x *HistoricalEventEntityPersecuted) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.DestroyedStructureId != -1 {
d["destroyedStructureId"] = x.DestroyedStructureId
}
d["expelledCreature"] = x.ExpelledCreature
d["expelledHfid"] = x.ExpelledHfid
d["expelledNumber"] = x.ExpelledNumber
d["expelledPopId"] = x.ExpelledPopId
if x.PersecutorEnid != -1 {
d["persecutorEnid"] = x.PersecutorEnid
}
if x.PersecutorHfid != -1 {
d["persecutorHfid"] = x.PersecutorHfid
}
d["propertyConfiscatedFromHfid"] = x.PropertyConfiscatedFromHfid
if x.ShrineAmountDestroyed != -1 {
d["shrineAmountDestroyed"] = x.ShrineAmountDestroyed
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.TargetEnid != -1 {
d["targetEnid"] = x.TargetEnid
}
return json.Marshal(d)
}
type HistoricalEventEntityPrimaryCriminalsAction int
const (
HistoricalEventEntityPrimaryCriminalsAction_Unknown HistoricalEventEntityPrimaryCriminalsAction = iota
HistoricalEventEntityPrimaryCriminalsAction_EntityPrimaryCriminals
)
func parseHistoricalEventEntityPrimaryCriminalsAction(s string) HistoricalEventEntityPrimaryCriminalsAction {
switch s {
case "entity_primary_criminals":
return HistoricalEventEntityPrimaryCriminalsAction_EntityPrimaryCriminals
}
return HistoricalEventEntityPrimaryCriminalsAction_Unknown
}
func (s HistoricalEventEntityPrimaryCriminalsAction) String() string {
switch s {
case HistoricalEventEntityPrimaryCriminalsAction_EntityPrimaryCriminals:
return "entity primary criminals"
}
return "unknown"
}
func (s HistoricalEventEntityPrimaryCriminalsAction) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventEntityPrimaryCriminals struct {
Action HistoricalEventEntityPrimaryCriminalsAction `json:"action" legend:"plus"` // action
EntityId int `json:"entityId" legend:"base"` // entity_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventEntityPrimaryCriminals() *HistoricalEventEntityPrimaryCriminals {
return &HistoricalEventEntityPrimaryCriminals{
EntityId: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventEntityPrimaryCriminals) Type() string { return "entity primary criminals" }
func (x *HistoricalEventEntityPrimaryCriminals) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventEntityPrimaryCriminals) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventEntityPrimaryCriminals) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityPrimaryCriminals) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntityPrimaryCriminals) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityPrimaryCriminals) CheckFields() {
}
func (x *HistoricalEventEntityPrimaryCriminals) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Action != 0 {
d["action"] = x.Action
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventEntityRampagedInSite struct {
RampageCivId int `json:"rampageCivId" legend:"base"` // rampage_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventEntityRampagedInSite() *HistoricalEventEntityRampagedInSite {
return &HistoricalEventEntityRampagedInSite{
RampageCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventEntityRampagedInSite) Type() string { return "entity rampaged in site" }
func (x *HistoricalEventEntityRampagedInSite) RelatedToEntity(id int) bool {
return x.RampageCivId == id
}
func (x *HistoricalEventEntityRampagedInSite) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventEntityRampagedInSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityRampagedInSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntityRampagedInSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityRampagedInSite) CheckFields() {
}
func (x *HistoricalEventEntityRampagedInSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.RampageCivId != -1 {
d["rampageCivId"] = x.RampageCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventEntityRelocateAction int
const (
HistoricalEventEntityRelocateAction_Unknown HistoricalEventEntityRelocateAction = iota
HistoricalEventEntityRelocateAction_EntityRelocate
)
func parseHistoricalEventEntityRelocateAction(s string) HistoricalEventEntityRelocateAction {
switch s {
case "entity_relocate":
return HistoricalEventEntityRelocateAction_EntityRelocate
}
return HistoricalEventEntityRelocateAction_Unknown
}
func (s HistoricalEventEntityRelocateAction) String() string {
switch s {
case HistoricalEventEntityRelocateAction_EntityRelocate:
return "entity relocate"
}
return "unknown"
}
func (s HistoricalEventEntityRelocateAction) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventEntityRelocate struct {
Action HistoricalEventEntityRelocateAction `json:"action" legend:"plus"` // action
EntityId int `json:"entityId" legend:"base"` // entity_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventEntityRelocate() *HistoricalEventEntityRelocate {
return &HistoricalEventEntityRelocate{
EntityId: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventEntityRelocate) Type() string { return "entity relocate" }
func (x *HistoricalEventEntityRelocate) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventEntityRelocate) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventEntityRelocate) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntityRelocate) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntityRelocate) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntityRelocate) CheckFields() {
}
func (x *HistoricalEventEntityRelocate) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Action != 0 {
d["action"] = x.Action
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventEntitySearchedSiteResult int
const (
HistoricalEventEntitySearchedSiteResult_Unknown HistoricalEventEntitySearchedSiteResult = iota
HistoricalEventEntitySearchedSiteResult_FoundNothing
)
func parseHistoricalEventEntitySearchedSiteResult(s string) HistoricalEventEntitySearchedSiteResult {
switch s {
case "found nothing":
return HistoricalEventEntitySearchedSiteResult_FoundNothing
}
return HistoricalEventEntitySearchedSiteResult_Unknown
}
func (s HistoricalEventEntitySearchedSiteResult) String() string {
switch s {
case HistoricalEventEntitySearchedSiteResult_FoundNothing:
return "found nothing"
}
return "unknown"
}
func (s HistoricalEventEntitySearchedSiteResult) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventEntitySearchedSite struct {
Result HistoricalEventEntitySearchedSiteResult `json:"result" legend:"base"` // result
SearcherCivId int `json:"searcherCivId" legend:"base"` // searcher_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventEntitySearchedSite() *HistoricalEventEntitySearchedSite {
return &HistoricalEventEntitySearchedSite{
SearcherCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventEntitySearchedSite) Type() string { return "entity searched site" }
func (x *HistoricalEventEntitySearchedSite) RelatedToEntity(id int) bool {
return x.SearcherCivId == id
}
func (x *HistoricalEventEntitySearchedSite) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventEntitySearchedSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventEntitySearchedSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventEntitySearchedSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventEntitySearchedSite) CheckFields() {
}
func (x *HistoricalEventEntitySearchedSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Result != 0 {
d["result"] = x.Result
}
if x.SearcherCivId != -1 {
d["searcherCivId"] = x.SearcherCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventFailedFrameAttemptCrime int
const (
HistoricalEventFailedFrameAttemptCrime_Unknown HistoricalEventFailedFrameAttemptCrime = iota
HistoricalEventFailedFrameAttemptCrime_Treason
)
func parseHistoricalEventFailedFrameAttemptCrime(s string) HistoricalEventFailedFrameAttemptCrime {
switch s {
case "treason":
return HistoricalEventFailedFrameAttemptCrime_Treason
}
return HistoricalEventFailedFrameAttemptCrime_Unknown
}
func (s HistoricalEventFailedFrameAttemptCrime) String() string {
switch s {
case HistoricalEventFailedFrameAttemptCrime_Treason:
return "treason"
}
return "unknown"
}
func (s HistoricalEventFailedFrameAttemptCrime) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventFailedFrameAttempt struct {
ConvicterEnid int `json:"convicterEnid" legend:"base"` // convicter_enid
Crime HistoricalEventFailedFrameAttemptCrime `json:"crime" legend:"base"` // crime
FooledHfid int `json:"fooledHfid" legend:"base"` // fooled_hfid
FramerHfid int `json:"framerHfid" legend:"base"` // framer_hfid
PlotterHfid int `json:"plotterHfid" legend:"base"` // plotter_hfid
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
}
func NewHistoricalEventFailedFrameAttempt() *HistoricalEventFailedFrameAttempt {
return &HistoricalEventFailedFrameAttempt{
ConvicterEnid: -1,
FooledHfid: -1,
FramerHfid: -1,
PlotterHfid: -1,
TargetHfid: -1,
}
}
func (x *HistoricalEventFailedFrameAttempt) Type() string { return "failed frame attempt" }
func (x *HistoricalEventFailedFrameAttempt) RelatedToEntity(id int) bool {
return x.ConvicterEnid == id
}
func (x *HistoricalEventFailedFrameAttempt) RelatedToHf(id int) bool {
return x.FooledHfid == id || x.FramerHfid == id || x.PlotterHfid == id || x.TargetHfid == id
}
func (x *HistoricalEventFailedFrameAttempt) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventFailedFrameAttempt) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventFailedFrameAttempt) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventFailedFrameAttempt) CheckFields() {
}
func (x *HistoricalEventFailedFrameAttempt) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ConvicterEnid != -1 {
d["convicterEnid"] = x.ConvicterEnid
}
if x.Crime != 0 {
d["crime"] = x.Crime
}
if x.FooledHfid != -1 {
d["fooledHfid"] = x.FooledHfid
}
if x.FramerHfid != -1 {
d["framerHfid"] = x.FramerHfid
}
if x.PlotterHfid != -1 {
d["plotterHfid"] = x.PlotterHfid
}
if x.TargetHfid != -1 {
d["targetHfid"] = x.TargetHfid
}
return json.Marshal(d)
}
type HistoricalEventFailedIntrigueCorruptionAction int
const (
HistoricalEventFailedIntrigueCorruptionAction_Unknown HistoricalEventFailedIntrigueCorruptionAction = iota
HistoricalEventFailedIntrigueCorruptionAction_BribeOfficial
HistoricalEventFailedIntrigueCorruptionAction_BringIntoNetwork
HistoricalEventFailedIntrigueCorruptionAction_CorruptInPlace
HistoricalEventFailedIntrigueCorruptionAction_InduceToEmbezzle
)
func parseHistoricalEventFailedIntrigueCorruptionAction(s string) HistoricalEventFailedIntrigueCorruptionAction {
switch s {
case "bribe official":
return HistoricalEventFailedIntrigueCorruptionAction_BribeOfficial
case "bring into network":
return HistoricalEventFailedIntrigueCorruptionAction_BringIntoNetwork
case "corrupt in place":
return HistoricalEventFailedIntrigueCorruptionAction_CorruptInPlace
case "induce to embezzle":
return HistoricalEventFailedIntrigueCorruptionAction_InduceToEmbezzle
}
return HistoricalEventFailedIntrigueCorruptionAction_Unknown
}
func (s HistoricalEventFailedIntrigueCorruptionAction) String() string {
switch s {
case HistoricalEventFailedIntrigueCorruptionAction_BribeOfficial:
return "bribe official"
case HistoricalEventFailedIntrigueCorruptionAction_BringIntoNetwork:
return "bring into network"
case HistoricalEventFailedIntrigueCorruptionAction_CorruptInPlace:
return "corrupt in place"
case HistoricalEventFailedIntrigueCorruptionAction_InduceToEmbezzle:
return "induce to embezzle"
}
return "unknown"
}
func (s HistoricalEventFailedIntrigueCorruptionAction) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventFailedIntrigueCorruptionMethod int
const (
HistoricalEventFailedIntrigueCorruptionMethod_Unknown HistoricalEventFailedIntrigueCorruptionMethod = iota
HistoricalEventFailedIntrigueCorruptionMethod_BlackmailOverEmbezzlement
HistoricalEventFailedIntrigueCorruptionMethod_Bribe
HistoricalEventFailedIntrigueCorruptionMethod_Flatter
HistoricalEventFailedIntrigueCorruptionMethod_Intimidate
HistoricalEventFailedIntrigueCorruptionMethod_OfferImmortality
HistoricalEventFailedIntrigueCorruptionMethod_Precedence
HistoricalEventFailedIntrigueCorruptionMethod_ReligiousSympathy
HistoricalEventFailedIntrigueCorruptionMethod_RevengeOnGrudge
)
func parseHistoricalEventFailedIntrigueCorruptionMethod(s string) HistoricalEventFailedIntrigueCorruptionMethod {
switch s {
case "blackmail over embezzlement":
return HistoricalEventFailedIntrigueCorruptionMethod_BlackmailOverEmbezzlement
case "bribe":
return HistoricalEventFailedIntrigueCorruptionMethod_Bribe
case "flatter":
return HistoricalEventFailedIntrigueCorruptionMethod_Flatter
case "intimidate":
return HistoricalEventFailedIntrigueCorruptionMethod_Intimidate
case "offer immortality":
return HistoricalEventFailedIntrigueCorruptionMethod_OfferImmortality
case "precedence":
return HistoricalEventFailedIntrigueCorruptionMethod_Precedence
case "religious sympathy":
return HistoricalEventFailedIntrigueCorruptionMethod_ReligiousSympathy
case "revenge on grudge":
return HistoricalEventFailedIntrigueCorruptionMethod_RevengeOnGrudge
}
return HistoricalEventFailedIntrigueCorruptionMethod_Unknown
}
func (s HistoricalEventFailedIntrigueCorruptionMethod) String() string {
switch s {
case HistoricalEventFailedIntrigueCorruptionMethod_BlackmailOverEmbezzlement:
return "blackmail over embezzlement"
case HistoricalEventFailedIntrigueCorruptionMethod_Bribe:
return "bribe"
case HistoricalEventFailedIntrigueCorruptionMethod_Flatter:
return "flatter"
case HistoricalEventFailedIntrigueCorruptionMethod_Intimidate:
return "intimidate"
case HistoricalEventFailedIntrigueCorruptionMethod_OfferImmortality:
return "offer immortality"
case HistoricalEventFailedIntrigueCorruptionMethod_Precedence:
return "precedence"
case HistoricalEventFailedIntrigueCorruptionMethod_ReligiousSympathy:
return "religious sympathy"
case HistoricalEventFailedIntrigueCorruptionMethod_RevengeOnGrudge:
return "revenge on grudge"
}
return "unknown"
}
func (s HistoricalEventFailedIntrigueCorruptionMethod) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventFailedIntrigueCorruptionTopFacet int
const (
HistoricalEventFailedIntrigueCorruptionTopFacet_Unknown HistoricalEventFailedIntrigueCorruptionTopFacet = iota
HistoricalEventFailedIntrigueCorruptionTopFacet_Ambition
HistoricalEventFailedIntrigueCorruptionTopFacet_AnxietyPropensity
HistoricalEventFailedIntrigueCorruptionTopFacet_Confidence
HistoricalEventFailedIntrigueCorruptionTopFacet_EnvyPropensity
HistoricalEventFailedIntrigueCorruptionTopFacet_Fearlessness
HistoricalEventFailedIntrigueCorruptionTopFacet_Greed
HistoricalEventFailedIntrigueCorruptionTopFacet_Hope
HistoricalEventFailedIntrigueCorruptionTopFacet_Pride
HistoricalEventFailedIntrigueCorruptionTopFacet_StressVulnerability
HistoricalEventFailedIntrigueCorruptionTopFacet_Swayable
HistoricalEventFailedIntrigueCorruptionTopFacet_Vanity
HistoricalEventFailedIntrigueCorruptionTopFacet_Vengeful
)
func parseHistoricalEventFailedIntrigueCorruptionTopFacet(s string) HistoricalEventFailedIntrigueCorruptionTopFacet {
switch s {
case "ambition":
return HistoricalEventFailedIntrigueCorruptionTopFacet_Ambition
case "anxiety propensity":
return HistoricalEventFailedIntrigueCorruptionTopFacet_AnxietyPropensity
case "confidence":
return HistoricalEventFailedIntrigueCorruptionTopFacet_Confidence
case "envy propensity":
return HistoricalEventFailedIntrigueCorruptionTopFacet_EnvyPropensity
case "fearlessness":
return HistoricalEventFailedIntrigueCorruptionTopFacet_Fearlessness
case "greed":
return HistoricalEventFailedIntrigueCorruptionTopFacet_Greed
case "hope":
return HistoricalEventFailedIntrigueCorruptionTopFacet_Hope
case "pride":
return HistoricalEventFailedIntrigueCorruptionTopFacet_Pride
case "stress vulnerability":
return HistoricalEventFailedIntrigueCorruptionTopFacet_StressVulnerability
case "swayable":
return HistoricalEventFailedIntrigueCorruptionTopFacet_Swayable
case "vanity":
return HistoricalEventFailedIntrigueCorruptionTopFacet_Vanity
case "vengeful":
return HistoricalEventFailedIntrigueCorruptionTopFacet_Vengeful
}
return HistoricalEventFailedIntrigueCorruptionTopFacet_Unknown
}
func (s HistoricalEventFailedIntrigueCorruptionTopFacet) String() string {
switch s {
case HistoricalEventFailedIntrigueCorruptionTopFacet_Ambition:
return "ambition"
case HistoricalEventFailedIntrigueCorruptionTopFacet_AnxietyPropensity:
return "anxiety propensity"
case HistoricalEventFailedIntrigueCorruptionTopFacet_Confidence:
return "confidence"
case HistoricalEventFailedIntrigueCorruptionTopFacet_EnvyPropensity:
return "envy propensity"
case HistoricalEventFailedIntrigueCorruptionTopFacet_Fearlessness:
return "fearlessness"
case HistoricalEventFailedIntrigueCorruptionTopFacet_Greed:
return "greed"
case HistoricalEventFailedIntrigueCorruptionTopFacet_Hope:
return "hope"
case HistoricalEventFailedIntrigueCorruptionTopFacet_Pride:
return "pride"
case HistoricalEventFailedIntrigueCorruptionTopFacet_StressVulnerability:
return "stress vulnerability"
case HistoricalEventFailedIntrigueCorruptionTopFacet_Swayable:
return "swayable"
case HistoricalEventFailedIntrigueCorruptionTopFacet_Vanity:
return "vanity"
case HistoricalEventFailedIntrigueCorruptionTopFacet_Vengeful:
return "vengeful"
}
return "unknown"
}
func (s HistoricalEventFailedIntrigueCorruptionTopFacet) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor int
const (
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Unknown HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor = iota
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Fear
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Love
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Loyalty
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Respect
HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Trust
)
func parseHistoricalEventFailedIntrigueCorruptionTopRelationshipFactor(s string) HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor {
switch s {
case "fear":
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Fear
case "love":
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Love
case "loyalty":
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Loyalty
case "respect":
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Respect
case "trust":
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Trust
}
return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Unknown
}
func (s HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor) String() string {
switch s {
case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Fear:
return "fear"
case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Love:
return "love"
case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Loyalty:
return "loyalty"
case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Respect:
return "respect"
case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Trust:
return "trust"
}
return "unknown"
}
func (s HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventFailedIntrigueCorruptionTopValue int
const (
HistoricalEventFailedIntrigueCorruptionTopValue_Unknown HistoricalEventFailedIntrigueCorruptionTopValue = iota
HistoricalEventFailedIntrigueCorruptionTopValue_Law
HistoricalEventFailedIntrigueCorruptionTopValue_Power
)
func parseHistoricalEventFailedIntrigueCorruptionTopValue(s string) HistoricalEventFailedIntrigueCorruptionTopValue {
switch s {
case "law":
return HistoricalEventFailedIntrigueCorruptionTopValue_Law
case "power":
return HistoricalEventFailedIntrigueCorruptionTopValue_Power
}
return HistoricalEventFailedIntrigueCorruptionTopValue_Unknown
}
func (s HistoricalEventFailedIntrigueCorruptionTopValue) String() string {
switch s {
case HistoricalEventFailedIntrigueCorruptionTopValue_Law:
return "law"
case HistoricalEventFailedIntrigueCorruptionTopValue_Power:
return "power"
}
return "unknown"
}
func (s HistoricalEventFailedIntrigueCorruptionTopValue) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventFailedIntrigueCorruption struct {
Action HistoricalEventFailedIntrigueCorruptionAction `json:"action" legend:"base"` // action
AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` // ally_defense_bonus
CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` // coconspirator_bonus
CorruptorHfid int `json:"corruptorHfid" legend:"base"` // corruptor_hfid
CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` // corruptor_identity
FailedJudgmentTest bool `json:"failedJudgmentTest" legend:"base"` // failed_judgment_test
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
LureHfid int `json:"lureHfid" legend:"base"` // lure_hfid
Method HistoricalEventFailedIntrigueCorruptionMethod `json:"method" legend:"base"` // method
RelevantEntityId int `json:"relevantEntityId" legend:"base"` // relevant_entity_id
RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` // relevant_id_for_method
RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` // relevant_position_profile_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
TargetIdentity int `json:"targetIdentity" legend:"base"` // target_identity
TopFacet HistoricalEventFailedIntrigueCorruptionTopFacet `json:"topFacet" legend:"base"` // top_facet
TopFacetModifier int `json:"topFacetModifier" legend:"base"` // top_facet_modifier
TopFacetRating int `json:"topFacetRating" legend:"base"` // top_facet_rating
TopRelationshipFactor HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor `json:"topRelationshipFactor" legend:"base"` // top_relationship_factor
TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` // top_relationship_modifier
TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` // top_relationship_rating
TopValue HistoricalEventFailedIntrigueCorruptionTopValue `json:"topValue" legend:"base"` // top_value
TopValueModifier int `json:"topValueModifier" legend:"base"` // top_value_modifier
TopValueRating int `json:"topValueRating" legend:"base"` // top_value_rating
}
func NewHistoricalEventFailedIntrigueCorruption() *HistoricalEventFailedIntrigueCorruption {
return &HistoricalEventFailedIntrigueCorruption{
AllyDefenseBonus: -1,
CoconspiratorBonus: -1,
CorruptorHfid: -1,
CorruptorIdentity: -1,
FeatureLayerId: -1,
LureHfid: -1,
RelevantEntityId: -1,
RelevantIdForMethod: -1,
RelevantPositionProfileId: -1,
SiteId: -1,
SubregionId: -1,
TargetHfid: -1,
TargetIdentity: -1,
TopFacetModifier: -1,
TopFacetRating: -1,
TopRelationshipModifier: -1,
TopRelationshipRating: -1,
TopValueModifier: -1,
TopValueRating: -1,
}
}
func (x *HistoricalEventFailedIntrigueCorruption) Type() string { return "failed intrigue corruption" }
func (x *HistoricalEventFailedIntrigueCorruption) RelatedToEntity(id int) bool {
return x.CorruptorIdentity == id || x.RelevantEntityId == id || x.TargetIdentity == id
}
func (x *HistoricalEventFailedIntrigueCorruption) RelatedToHf(id int) bool {
return x.CorruptorHfid == id || x.LureHfid == id || x.TargetHfid == id
}
func (x *HistoricalEventFailedIntrigueCorruption) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventFailedIntrigueCorruption) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventFailedIntrigueCorruption) RelatedToRegion(id int) bool {
return x.SubregionId == id
}
func (x *HistoricalEventFailedIntrigueCorruption) CheckFields() {
}
func (x *HistoricalEventFailedIntrigueCorruption) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Action != 0 {
d["action"] = x.Action
}
if x.AllyDefenseBonus != -1 {
d["allyDefenseBonus"] = x.AllyDefenseBonus
}
if x.CoconspiratorBonus != -1 {
d["coconspiratorBonus"] = x.CoconspiratorBonus
}
if x.CorruptorHfid != -1 {
d["corruptorHfid"] = x.CorruptorHfid
}
if x.CorruptorIdentity != -1 {
d["corruptorIdentity"] = x.CorruptorIdentity
}
d["failedJudgmentTest"] = x.FailedJudgmentTest
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.LureHfid != -1 {
d["lureHfid"] = x.LureHfid
}
if x.Method != 0 {
d["method"] = x.Method
}
if x.RelevantEntityId != -1 {
d["relevantEntityId"] = x.RelevantEntityId
}
if x.RelevantIdForMethod != -1 {
d["relevantIdForMethod"] = x.RelevantIdForMethod
}
if x.RelevantPositionProfileId != -1 {
d["relevantPositionProfileId"] = x.RelevantPositionProfileId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.TargetHfid != -1 {
d["targetHfid"] = x.TargetHfid
}
if x.TargetIdentity != -1 {
d["targetIdentity"] = x.TargetIdentity
}
if x.TopFacet != 0 {
d["topFacet"] = x.TopFacet
}
if x.TopFacetModifier != -1 {
d["topFacetModifier"] = x.TopFacetModifier
}
if x.TopFacetRating != -1 {
d["topFacetRating"] = x.TopFacetRating
}
if x.TopRelationshipFactor != 0 {
d["topRelationshipFactor"] = x.TopRelationshipFactor
}
if x.TopRelationshipModifier != -1 {
d["topRelationshipModifier"] = x.TopRelationshipModifier
}
if x.TopRelationshipRating != -1 {
d["topRelationshipRating"] = x.TopRelationshipRating
}
if x.TopValue != 0 {
d["topValue"] = x.TopValue
}
if x.TopValueModifier != -1 {
d["topValueModifier"] = x.TopValueModifier
}
if x.TopValueRating != -1 {
d["topValueRating"] = x.TopValueRating
}
return json.Marshal(d)
}
type HistoricalEventFieldBattle struct {
ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` // a_support_merc_enid
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` // attacker_general_hfid
AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` // attacker_merc_enid
Coords string `json:"coords" legend:"base"` // coords
DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` // d_support_merc_enid
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` // defender_general_hfid
DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` // defender_merc_enid
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventFieldBattle() *HistoricalEventFieldBattle {
return &HistoricalEventFieldBattle{
ASupportMercEnid: -1,
AttackerCivId: -1,
AttackerGeneralHfid: -1,
AttackerMercEnid: -1,
DSupportMercEnid: -1,
DefenderCivId: -1,
DefenderGeneralHfid: -1,
DefenderMercEnid: -1,
FeatureLayerId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventFieldBattle) Type() string { return "field battle" }
func (x *HistoricalEventFieldBattle) RelatedToEntity(id int) bool {
return x.ASupportMercEnid == id || x.AttackerCivId == id || x.AttackerMercEnid == id || x.DSupportMercEnid == id || x.DefenderCivId == id || x.DefenderMercEnid == id
}
func (x *HistoricalEventFieldBattle) RelatedToHf(id int) bool {
return x.AttackerGeneralHfid == id || x.DefenderGeneralHfid == id
}
func (x *HistoricalEventFieldBattle) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventFieldBattle) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventFieldBattle) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventFieldBattle) CheckFields() {
}
func (x *HistoricalEventFieldBattle) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ASupportMercEnid != -1 {
d["aSupportMercEnid"] = x.ASupportMercEnid
}
if x.AttackerCivId != -1 {
d["attackerCivId"] = x.AttackerCivId
}
if x.AttackerGeneralHfid != -1 {
d["attackerGeneralHfid"] = x.AttackerGeneralHfid
}
if x.AttackerMercEnid != -1 {
d["attackerMercEnid"] = x.AttackerMercEnid
}
d["coords"] = x.Coords
if x.DSupportMercEnid != -1 {
d["dSupportMercEnid"] = x.DSupportMercEnid
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
if x.DefenderGeneralHfid != -1 {
d["defenderGeneralHfid"] = x.DefenderGeneralHfid
}
if x.DefenderMercEnid != -1 {
d["defenderMercEnid"] = x.DefenderMercEnid
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventFirstContact struct {
ContactedEnid int `json:"contactedEnid" legend:"base"` // contacted_enid
ContactorEnid int `json:"contactorEnid" legend:"base"` // contactor_enid
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventFirstContact() *HistoricalEventFirstContact {
return &HistoricalEventFirstContact{
ContactedEnid: -1,
ContactorEnid: -1,
SiteId: -1,
}
}
func (x *HistoricalEventFirstContact) Type() string { return "first contact" }
func (x *HistoricalEventFirstContact) RelatedToEntity(id int) bool {
return x.ContactedEnid == id || x.ContactorEnid == id
}
func (x *HistoricalEventFirstContact) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventFirstContact) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventFirstContact) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventFirstContact) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventFirstContact) CheckFields() {
}
func (x *HistoricalEventFirstContact) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ContactedEnid != -1 {
d["contactedEnid"] = x.ContactedEnid
}
if x.ContactorEnid != -1 {
d["contactorEnid"] = x.ContactorEnid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventGamble struct {
GamblerHfid int `json:"gamblerHfid" legend:"base"` // gambler_hfid
NewAccount int `json:"newAccount" legend:"base"` // new_account
OldAccount int `json:"oldAccount" legend:"base"` // old_account
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventGamble() *HistoricalEventGamble {
return &HistoricalEventGamble{
GamblerHfid: -1,
NewAccount: -1,
OldAccount: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventGamble) Type() string { return "gamble" }
func (x *HistoricalEventGamble) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventGamble) RelatedToHf(id int) bool { return x.GamblerHfid == id }
func (x *HistoricalEventGamble) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventGamble) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventGamble) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventGamble) CheckFields() {
}
func (x *HistoricalEventGamble) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.GamblerHfid != -1 {
d["gamblerHfid"] = x.GamblerHfid
}
if x.NewAccount != -1 {
d["newAccount"] = x.NewAccount
}
if x.OldAccount != -1 {
d["oldAccount"] = x.OldAccount
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventHfAbducted struct {
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
SiteId int `json:"siteId" legend:"base"` // site_id
SnatcherHfid int `json:"snatcherHfid" legend:"base"` // snatcher_hfid
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
}
func NewHistoricalEventHfAbducted() *HistoricalEventHfAbducted {
return &HistoricalEventHfAbducted{
FeatureLayerId: -1,
SiteId: -1,
SnatcherHfid: -1,
SubregionId: -1,
TargetHfid: -1,
}
}
func (x *HistoricalEventHfAbducted) Type() string { return "hf abducted" }
func (x *HistoricalEventHfAbducted) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfAbducted) RelatedToHf(id int) bool {
return x.SnatcherHfid == id || x.TargetHfid == id
}
func (x *HistoricalEventHfAbducted) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfAbducted) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfAbducted) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfAbducted) CheckFields() {
}
func (x *HistoricalEventHfAbducted) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SnatcherHfid != -1 {
d["snatcherHfid"] = x.SnatcherHfid
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.TargetHfid != -1 {
d["targetHfid"] = x.TargetHfid
}
return json.Marshal(d)
}
type HistoricalEventHfAttackedSite struct {
AttackerHfid int `json:"attackerHfid" legend:"base"` // attacker_hfid
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventHfAttackedSite() *HistoricalEventHfAttackedSite {
return &HistoricalEventHfAttackedSite{
AttackerHfid: -1,
DefenderCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventHfAttackedSite) Type() string { return "hf attacked site" }
func (x *HistoricalEventHfAttackedSite) RelatedToEntity(id int) bool {
return x.DefenderCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventHfAttackedSite) RelatedToHf(id int) bool { return x.AttackerHfid == id }
func (x *HistoricalEventHfAttackedSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfAttackedSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfAttackedSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfAttackedSite) CheckFields() {
}
func (x *HistoricalEventHfAttackedSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackerHfid != -1 {
d["attackerHfid"] = x.AttackerHfid
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventHfConfrontedReason int
const (
HistoricalEventHfConfrontedReason_Unknown HistoricalEventHfConfrontedReason = iota
HistoricalEventHfConfrontedReason_Ageless
HistoricalEventHfConfrontedReason_Murder
)
func parseHistoricalEventHfConfrontedReason(s string) HistoricalEventHfConfrontedReason {
switch s {
case "ageless":
return HistoricalEventHfConfrontedReason_Ageless
case "murder":
return HistoricalEventHfConfrontedReason_Murder
}
return HistoricalEventHfConfrontedReason_Unknown
}
func (s HistoricalEventHfConfrontedReason) String() string {
switch s {
case HistoricalEventHfConfrontedReason_Ageless:
return "ageless"
case HistoricalEventHfConfrontedReason_Murder:
return "murder"
}
return "unknown"
}
func (s HistoricalEventHfConfrontedReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfConfrontedSituation int
const (
HistoricalEventHfConfrontedSituation_Unknown HistoricalEventHfConfrontedSituation = iota
HistoricalEventHfConfrontedSituation_GeneralSuspicion
)
func parseHistoricalEventHfConfrontedSituation(s string) HistoricalEventHfConfrontedSituation {
switch s {
case "general suspicion":
return HistoricalEventHfConfrontedSituation_GeneralSuspicion
}
return HistoricalEventHfConfrontedSituation_Unknown
}
func (s HistoricalEventHfConfrontedSituation) String() string {
switch s {
case HistoricalEventHfConfrontedSituation_GeneralSuspicion:
return "general suspicion"
}
return "unknown"
}
func (s HistoricalEventHfConfrontedSituation) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfConfronted struct {
Coords string `json:"coords" legend:"base"` // coords
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Hfid int `json:"hfid" legend:"base"` // hfid
Reason []HistoricalEventHfConfrontedReason `json:"reason" legend:"base"` // reason
SiteId int `json:"siteId" legend:"base"` // site_id
Situation HistoricalEventHfConfrontedSituation `json:"situation" legend:"base"` // situation
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventHfConfronted() *HistoricalEventHfConfronted {
return &HistoricalEventHfConfronted{
FeatureLayerId: -1,
Hfid: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfConfronted) Type() string { return "hf confronted" }
func (x *HistoricalEventHfConfronted) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfConfronted) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventHfConfronted) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfConfronted) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfConfronted) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfConfronted) CheckFields() {
}
func (x *HistoricalEventHfConfronted) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coords"] = x.Coords
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
d["reason"] = x.Reason
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.Situation != 0 {
d["situation"] = x.Situation
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventHfConvictedCrime int
const (
HistoricalEventHfConvictedCrime_Unknown HistoricalEventHfConvictedCrime = iota
HistoricalEventHfConvictedCrime_AttemptedKidnapping
HistoricalEventHfConvictedCrime_AttemptedMurder
HistoricalEventHfConvictedCrime_AttemptedTheft
HistoricalEventHfConvictedCrime_Bribery
HistoricalEventHfConvictedCrime_BuildingDestruction
HistoricalEventHfConvictedCrime_DisorderlyConduct
HistoricalEventHfConvictedCrime_Embezzlement
HistoricalEventHfConvictedCrime_Espionage
HistoricalEventHfConvictedCrime_Murder
HistoricalEventHfConvictedCrime_Theft
HistoricalEventHfConvictedCrime_Treason
HistoricalEventHfConvictedCrime_Vandalism
)
func parseHistoricalEventHfConvictedCrime(s string) HistoricalEventHfConvictedCrime {
switch s {
case "attempted kidnapping":
return HistoricalEventHfConvictedCrime_AttemptedKidnapping
case "attempted murder":
return HistoricalEventHfConvictedCrime_AttemptedMurder
case "attempted theft":
return HistoricalEventHfConvictedCrime_AttemptedTheft
case "bribery":
return HistoricalEventHfConvictedCrime_Bribery
case "building destruction":
return HistoricalEventHfConvictedCrime_BuildingDestruction
case "disorderly conduct":
return HistoricalEventHfConvictedCrime_DisorderlyConduct
case "embezzlement":
return HistoricalEventHfConvictedCrime_Embezzlement
case "espionage":
return HistoricalEventHfConvictedCrime_Espionage
case "murder":
return HistoricalEventHfConvictedCrime_Murder
case "theft":
return HistoricalEventHfConvictedCrime_Theft
case "treason":
return HistoricalEventHfConvictedCrime_Treason
case "vandalism":
return HistoricalEventHfConvictedCrime_Vandalism
}
return HistoricalEventHfConvictedCrime_Unknown
}
func (s HistoricalEventHfConvictedCrime) String() string {
switch s {
case HistoricalEventHfConvictedCrime_AttemptedKidnapping:
return "attempted kidnapping"
case HistoricalEventHfConvictedCrime_AttemptedMurder:
return "attempted murder"
case HistoricalEventHfConvictedCrime_AttemptedTheft:
return "attempted theft"
case HistoricalEventHfConvictedCrime_Bribery:
return "bribery"
case HistoricalEventHfConvictedCrime_BuildingDestruction:
return "building destruction"
case HistoricalEventHfConvictedCrime_DisorderlyConduct:
return "disorderly conduct"
case HistoricalEventHfConvictedCrime_Embezzlement:
return "embezzlement"
case HistoricalEventHfConvictedCrime_Espionage:
return "espionage"
case HistoricalEventHfConvictedCrime_Murder:
return "murder"
case HistoricalEventHfConvictedCrime_Theft:
return "theft"
case HistoricalEventHfConvictedCrime_Treason:
return "treason"
case HistoricalEventHfConvictedCrime_Vandalism:
return "vandalism"
}
return "unknown"
}
func (s HistoricalEventHfConvictedCrime) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfConvicted struct {
Beating bool `json:"beating" legend:"base"` // beating
CoconspiratorHfid int `json:"coconspiratorHfid" legend:"base"` // coconspirator_hfid
ConfessedAfterApbArrestEnid int `json:"confessedAfterApbArrestEnid" legend:"base"` // confessed_after_apb_arrest_enid
ContactHfid int `json:"contactHfid" legend:"base"` // contact_hfid
ConvictIsContact bool `json:"convictIsContact" legend:"base"` // convict_is_contact
ConvictedHfid int `json:"convictedHfid" legend:"base"` // convicted_hfid
ConvicterEnid int `json:"convicterEnid" legend:"base"` // convicter_enid
CorruptConvicterHfid int `json:"corruptConvicterHfid" legend:"base"` // corrupt_convicter_hfid
Crime HistoricalEventHfConvictedCrime `json:"crime" legend:"base"` // crime
DeathPenalty bool `json:"deathPenalty" legend:"base"` // death_penalty
DidNotRevealAllInInterrogation bool `json:"didNotRevealAllInInterrogation" legend:"base"` // did_not_reveal_all_in_interrogation
Exiled bool `json:"exiled" legend:"base"` // exiled
FooledHfid int `json:"fooledHfid" legend:"base"` // fooled_hfid
FramerHfid int `json:"framerHfid" legend:"base"` // framer_hfid
Hammerstrokes int `json:"hammerstrokes" legend:"base"` // hammerstrokes
HeldFirmInInterrogation bool `json:"heldFirmInInterrogation" legend:"base"` // held_firm_in_interrogation
ImplicatedHfid []int `json:"implicatedHfid" legend:"base"` // implicated_hfid
InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` // interrogator_hfid
NoPrisonAvailable bool `json:"noPrisonAvailable" legend:"base"` // no_prison_available
PlotterHfid int `json:"plotterHfid" legend:"base"` // plotter_hfid
PrisonMonths int `json:"prisonMonths" legend:"base"` // prison_months
SurveiledCoconspirator bool `json:"surveiledCoconspirator" legend:"base"` // surveiled_coconspirator
SurveiledContact bool `json:"surveiledContact" legend:"base"` // surveiled_contact
SurveiledConvicted bool `json:"surveiledConvicted" legend:"base"` // surveiled_convicted
SurveiledTarget bool `json:"surveiledTarget" legend:"base"` // surveiled_target
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
WrongfulConviction bool `json:"wrongfulConviction" legend:"base"` // wrongful_conviction
}
func NewHistoricalEventHfConvicted() *HistoricalEventHfConvicted {
return &HistoricalEventHfConvicted{
CoconspiratorHfid: -1,
ConfessedAfterApbArrestEnid: -1,
ContactHfid: -1,
ConvictedHfid: -1,
ConvicterEnid: -1,
CorruptConvicterHfid: -1,
FooledHfid: -1,
FramerHfid: -1,
Hammerstrokes: -1,
InterrogatorHfid: -1,
PlotterHfid: -1,
PrisonMonths: -1,
TargetHfid: -1,
}
}
func (x *HistoricalEventHfConvicted) Type() string { return "hf convicted" }
func (x *HistoricalEventHfConvicted) RelatedToEntity(id int) bool {
return x.ConfessedAfterApbArrestEnid == id || x.ConvicterEnid == id
}
func (x *HistoricalEventHfConvicted) RelatedToHf(id int) bool {
return containsInt(x.ImplicatedHfid, id) || x.CoconspiratorHfid == id || x.ContactHfid == id || x.ConvictedHfid == id || x.CorruptConvicterHfid == id || x.FooledHfid == id || x.FramerHfid == id || x.InterrogatorHfid == id || x.PlotterHfid == id || x.TargetHfid == id
}
func (x *HistoricalEventHfConvicted) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfConvicted) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventHfConvicted) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfConvicted) CheckFields() {
}
func (x *HistoricalEventHfConvicted) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["beating"] = x.Beating
if x.CoconspiratorHfid != -1 {
d["coconspiratorHfid"] = x.CoconspiratorHfid
}
if x.ConfessedAfterApbArrestEnid != -1 {
d["confessedAfterApbArrestEnid"] = x.ConfessedAfterApbArrestEnid
}
if x.ContactHfid != -1 {
d["contactHfid"] = x.ContactHfid
}
d["convictIsContact"] = x.ConvictIsContact
if x.ConvictedHfid != -1 {
d["convictedHfid"] = x.ConvictedHfid
}
if x.ConvicterEnid != -1 {
d["convicterEnid"] = x.ConvicterEnid
}
if x.CorruptConvicterHfid != -1 {
d["corruptConvicterHfid"] = x.CorruptConvicterHfid
}
if x.Crime != 0 {
d["crime"] = x.Crime
}
d["deathPenalty"] = x.DeathPenalty
d["didNotRevealAllInInterrogation"] = x.DidNotRevealAllInInterrogation
d["exiled"] = x.Exiled
if x.FooledHfid != -1 {
d["fooledHfid"] = x.FooledHfid
}
if x.FramerHfid != -1 {
d["framerHfid"] = x.FramerHfid
}
if x.Hammerstrokes != -1 {
d["hammerstrokes"] = x.Hammerstrokes
}
d["heldFirmInInterrogation"] = x.HeldFirmInInterrogation
d["implicatedHfid"] = x.ImplicatedHfid
if x.InterrogatorHfid != -1 {
d["interrogatorHfid"] = x.InterrogatorHfid
}
d["noPrisonAvailable"] = x.NoPrisonAvailable
if x.PlotterHfid != -1 {
d["plotterHfid"] = x.PlotterHfid
}
if x.PrisonMonths != -1 {
d["prisonMonths"] = x.PrisonMonths
}
d["surveiledCoconspirator"] = x.SurveiledCoconspirator
d["surveiledContact"] = x.SurveiledContact
d["surveiledConvicted"] = x.SurveiledConvicted
d["surveiledTarget"] = x.SurveiledTarget
if x.TargetHfid != -1 {
d["targetHfid"] = x.TargetHfid
}
d["wrongfulConviction"] = x.WrongfulConviction
return json.Marshal(d)
}
type HistoricalEventHfDestroyedSite struct {
AttackerHfid int `json:"attackerHfid" legend:"base"` // attacker_hfid
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventHfDestroyedSite() *HistoricalEventHfDestroyedSite {
return &HistoricalEventHfDestroyedSite{
AttackerHfid: -1,
DefenderCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventHfDestroyedSite) Type() string { return "hf destroyed site" }
func (x *HistoricalEventHfDestroyedSite) RelatedToEntity(id int) bool {
return x.DefenderCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventHfDestroyedSite) RelatedToHf(id int) bool { return x.AttackerHfid == id }
func (x *HistoricalEventHfDestroyedSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfDestroyedSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfDestroyedSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfDestroyedSite) CheckFields() {
}
func (x *HistoricalEventHfDestroyedSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackerHfid != -1 {
d["attackerHfid"] = x.AttackerHfid
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventHfDiedCause int
const (
HistoricalEventHfDiedCause_Unknown HistoricalEventHfDiedCause = iota
HistoricalEventHfDiedCause_Air
HistoricalEventHfDiedCause_Behead
HistoricalEventHfDiedCause_Bleed
HistoricalEventHfDiedCause_Blood
HistoricalEventHfDiedCause_BloodDrained
HistoricalEventHfDiedCause_BurnAlive
HistoricalEventHfDiedCause_BuryAlive
HistoricalEventHfDiedCause_Cavein
HistoricalEventHfDiedCause_Chasm
HistoricalEventHfDiedCause_Collision
HistoricalEventHfDiedCause_Crucify
HistoricalEventHfDiedCause_Crushed
HistoricalEventHfDiedCause_CrushedBridge
HistoricalEventHfDiedCause_DrainBlood
HistoricalEventHfDiedCause_Drawbridge
HistoricalEventHfDiedCause_Drown
HistoricalEventHfDiedCause_DrownAlt
HistoricalEventHfDiedCause_DrownAltTwo
HistoricalEventHfDiedCause_EncaseIce
HistoricalEventHfDiedCause_ExecBeheaded
HistoricalEventHfDiedCause_ExecBuriedAlive
HistoricalEventHfDiedCause_ExecBurnedAlive
HistoricalEventHfDiedCause_ExecCrucified
HistoricalEventHfDiedCause_ExecDrowned
HistoricalEventHfDiedCause_ExecFedToBeasts
HistoricalEventHfDiedCause_ExecGeneric
HistoricalEventHfDiedCause_ExecHackedToPieces
HistoricalEventHfDiedCause_ExecutionGeneric
HistoricalEventHfDiedCause_FallingObject
HistoricalEventHfDiedCause_FeedToBeasts
HistoricalEventHfDiedCause_FlyingObject
HistoricalEventHfDiedCause_FreezingWater
HistoricalEventHfDiedCause_HackToPieces
HistoricalEventHfDiedCause_Heat
HistoricalEventHfDiedCause_Hunger
HistoricalEventHfDiedCause_Infection
HistoricalEventHfDiedCause_LeaptFromHeight
HistoricalEventHfDiedCause_Melt
HistoricalEventHfDiedCause_Memorialize
HistoricalEventHfDiedCause_Murder
HistoricalEventHfDiedCause_Murdered
HistoricalEventHfDiedCause_Obstacle
HistoricalEventHfDiedCause_OldAge
HistoricalEventHfDiedCause_PutToRest
HistoricalEventHfDiedCause_Quit
HistoricalEventHfDiedCause_Quitdead
HistoricalEventHfDiedCause_Scare
HistoricalEventHfDiedCause_ScaredToDeath
HistoricalEventHfDiedCause_Shot
HistoricalEventHfDiedCause_Slaughter
HistoricalEventHfDiedCause_Slaughtered
HistoricalEventHfDiedCause_Spike
HistoricalEventHfDiedCause_Spikes
HistoricalEventHfDiedCause_Struck
HistoricalEventHfDiedCause_StruckDown
HistoricalEventHfDiedCause_Suffocate
HistoricalEventHfDiedCause_SuicideDrowned
HistoricalEventHfDiedCause_SuicideLeaping
HistoricalEventHfDiedCause_Thirst
HistoricalEventHfDiedCause_Trap
HistoricalEventHfDiedCause_Vanish
)
func parseHistoricalEventHfDiedCause(s string) HistoricalEventHfDiedCause {
switch s {
case "air":
return HistoricalEventHfDiedCause_Air
case "behead":
return HistoricalEventHfDiedCause_Behead
case "bleed":
return HistoricalEventHfDiedCause_Bleed
case "blood":
return HistoricalEventHfDiedCause_Blood
case "blood drained":
return HistoricalEventHfDiedCause_BloodDrained
case "burn_alive":
return HistoricalEventHfDiedCause_BurnAlive
case "bury_alive":
return HistoricalEventHfDiedCause_BuryAlive
case "cavein":
return HistoricalEventHfDiedCause_Cavein
case "chasm":
return HistoricalEventHfDiedCause_Chasm
case "collision":
return HistoricalEventHfDiedCause_Collision
case "crucify":
return HistoricalEventHfDiedCause_Crucify
case "crushed":
return HistoricalEventHfDiedCause_Crushed
case "crushed bridge":
return HistoricalEventHfDiedCause_CrushedBridge
case "drain_blood":
return HistoricalEventHfDiedCause_DrainBlood
case "drawbridge":
return HistoricalEventHfDiedCause_Drawbridge
case "drown":
return HistoricalEventHfDiedCause_Drown
case "drown_alt":
return HistoricalEventHfDiedCause_DrownAlt
case "drown_alt2":
return HistoricalEventHfDiedCause_DrownAltTwo
case "encase_ice":
return HistoricalEventHfDiedCause_EncaseIce
case "exec beheaded":
return HistoricalEventHfDiedCause_ExecBeheaded
case "exec buried alive":
return HistoricalEventHfDiedCause_ExecBuriedAlive
case "exec burned alive":
return HistoricalEventHfDiedCause_ExecBurnedAlive
case "exec crucified":
return HistoricalEventHfDiedCause_ExecCrucified
case "exec drowned":
return HistoricalEventHfDiedCause_ExecDrowned
case "exec fed to beasts":
return HistoricalEventHfDiedCause_ExecFedToBeasts
case "exec generic":
return HistoricalEventHfDiedCause_ExecGeneric
case "exec hacked to pieces":
return HistoricalEventHfDiedCause_ExecHackedToPieces
case "execution_generic":
return HistoricalEventHfDiedCause_ExecutionGeneric
case "falling_object":
return HistoricalEventHfDiedCause_FallingObject
case "feed_to_beasts":
return HistoricalEventHfDiedCause_FeedToBeasts
case "flying object":
return HistoricalEventHfDiedCause_FlyingObject
case "freezing water":
return HistoricalEventHfDiedCause_FreezingWater
case "hack_to_pieces":
return HistoricalEventHfDiedCause_HackToPieces
case "heat":
return HistoricalEventHfDiedCause_Heat
case "hunger":
return HistoricalEventHfDiedCause_Hunger
case "infection":
return HistoricalEventHfDiedCause_Infection
case "leapt_from_height":
return HistoricalEventHfDiedCause_LeaptFromHeight
case "melt":
return HistoricalEventHfDiedCause_Melt
case "memorialize":
return HistoricalEventHfDiedCause_Memorialize
case "murder":
return HistoricalEventHfDiedCause_Murder
case "murdered":
return HistoricalEventHfDiedCause_Murdered
case "obstacle":
return HistoricalEventHfDiedCause_Obstacle
case "old age":
return HistoricalEventHfDiedCause_OldAge
case "old_age":
return HistoricalEventHfDiedCause_OldAge
case "put to rest":
return HistoricalEventHfDiedCause_PutToRest
case "quit":
return HistoricalEventHfDiedCause_Quit
case "quitdead":
return HistoricalEventHfDiedCause_Quitdead
case "scare":
return HistoricalEventHfDiedCause_Scare
case "scared to death":
return HistoricalEventHfDiedCause_ScaredToDeath
case "shot":
return HistoricalEventHfDiedCause_Shot
case "slaughter":
return HistoricalEventHfDiedCause_Slaughter
case "slaughtered":
return HistoricalEventHfDiedCause_Slaughtered
case "spike":
return HistoricalEventHfDiedCause_Spike
case "spikes":
return HistoricalEventHfDiedCause_Spikes
case "struck":
return HistoricalEventHfDiedCause_Struck
case "struck_down":
return HistoricalEventHfDiedCause_StruckDown
case "suffocate":
return HistoricalEventHfDiedCause_Suffocate
case "suicide drowned":
return HistoricalEventHfDiedCause_SuicideDrowned
case "suicide leaping":
return HistoricalEventHfDiedCause_SuicideLeaping
case "thirst":
return HistoricalEventHfDiedCause_Thirst
case "trap":
return HistoricalEventHfDiedCause_Trap
case "vanish":
return HistoricalEventHfDiedCause_Vanish
}
return HistoricalEventHfDiedCause_Unknown
}
func (s HistoricalEventHfDiedCause) String() string {
switch s {
case HistoricalEventHfDiedCause_Air:
return "air"
case HistoricalEventHfDiedCause_Behead:
return "behead"
case HistoricalEventHfDiedCause_Bleed:
return "bleed"
case HistoricalEventHfDiedCause_Blood:
return "blood"
case HistoricalEventHfDiedCause_BloodDrained:
return "blood drained"
case HistoricalEventHfDiedCause_BurnAlive:
return "burn alive"
case HistoricalEventHfDiedCause_BuryAlive:
return "bury alive"
case HistoricalEventHfDiedCause_Cavein:
return "cavein"
case HistoricalEventHfDiedCause_Chasm:
return "chasm"
case HistoricalEventHfDiedCause_Collision:
return "collision"
case HistoricalEventHfDiedCause_Crucify:
return "crucify"
case HistoricalEventHfDiedCause_Crushed:
return "crushed"
case HistoricalEventHfDiedCause_CrushedBridge:
return "crushed bridge"
case HistoricalEventHfDiedCause_DrainBlood:
return "drain blood"
case HistoricalEventHfDiedCause_Drawbridge:
return "drawbridge"
case HistoricalEventHfDiedCause_Drown:
return "drown"
case HistoricalEventHfDiedCause_DrownAlt:
return "drown alt"
case HistoricalEventHfDiedCause_DrownAltTwo:
return "drown alt two"
case HistoricalEventHfDiedCause_EncaseIce:
return "encase ice"
case HistoricalEventHfDiedCause_ExecBeheaded:
return "exec beheaded"
case HistoricalEventHfDiedCause_ExecBuriedAlive:
return "exec buried alive"
case HistoricalEventHfDiedCause_ExecBurnedAlive:
return "exec burned alive"
case HistoricalEventHfDiedCause_ExecCrucified:
return "exec crucified"
case HistoricalEventHfDiedCause_ExecDrowned:
return "exec drowned"
case HistoricalEventHfDiedCause_ExecFedToBeasts:
return "exec fed to beasts"
case HistoricalEventHfDiedCause_ExecGeneric:
return "exec generic"
case HistoricalEventHfDiedCause_ExecHackedToPieces:
return "exec hacked to pieces"
case HistoricalEventHfDiedCause_ExecutionGeneric:
return "execution generic"
case HistoricalEventHfDiedCause_FallingObject:
return "falling object"
case HistoricalEventHfDiedCause_FeedToBeasts:
return "feed to beasts"
case HistoricalEventHfDiedCause_FlyingObject:
return "flying object"
case HistoricalEventHfDiedCause_FreezingWater:
return "freezing water"
case HistoricalEventHfDiedCause_HackToPieces:
return "hack to pieces"
case HistoricalEventHfDiedCause_Heat:
return "heat"
case HistoricalEventHfDiedCause_Hunger:
return "hunger"
case HistoricalEventHfDiedCause_Infection:
return "infection"
case HistoricalEventHfDiedCause_LeaptFromHeight:
return "leapt from height"
case HistoricalEventHfDiedCause_Melt:
return "melt"
case HistoricalEventHfDiedCause_Memorialize:
return "memorialize"
case HistoricalEventHfDiedCause_Murder:
return "murder"
case HistoricalEventHfDiedCause_Murdered:
return "murdered"
case HistoricalEventHfDiedCause_Obstacle:
return "obstacle"
case HistoricalEventHfDiedCause_OldAge:
return "old age"
case HistoricalEventHfDiedCause_PutToRest:
return "put to rest"
case HistoricalEventHfDiedCause_Quit:
return "quit"
case HistoricalEventHfDiedCause_Quitdead:
return "quitdead"
case HistoricalEventHfDiedCause_Scare:
return "scare"
case HistoricalEventHfDiedCause_ScaredToDeath:
return "scared to death"
case HistoricalEventHfDiedCause_Shot:
return "shot"
case HistoricalEventHfDiedCause_Slaughter:
return "slaughter"
case HistoricalEventHfDiedCause_Slaughtered:
return "slaughtered"
case HistoricalEventHfDiedCause_Spike:
return "spike"
case HistoricalEventHfDiedCause_Spikes:
return "spikes"
case HistoricalEventHfDiedCause_Struck:
return "struck"
case HistoricalEventHfDiedCause_StruckDown:
return "struck down"
case HistoricalEventHfDiedCause_Suffocate:
return "suffocate"
case HistoricalEventHfDiedCause_SuicideDrowned:
return "suicide drowned"
case HistoricalEventHfDiedCause_SuicideLeaping:
return "suicide leaping"
case HistoricalEventHfDiedCause_Thirst:
return "thirst"
case HistoricalEventHfDiedCause_Trap:
return "trap"
case HistoricalEventHfDiedCause_Vanish:
return "vanish"
}
return "unknown"
}
func (s HistoricalEventHfDiedCause) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfDiedDeathCause int
const (
HistoricalEventHfDiedDeathCause_Unknown HistoricalEventHfDiedDeathCause = iota
HistoricalEventHfDiedDeathCause_Behead
HistoricalEventHfDiedDeathCause_Bleed
HistoricalEventHfDiedDeathCause_BurnAlive
HistoricalEventHfDiedDeathCause_BuryAlive
HistoricalEventHfDiedDeathCause_Cavein
HistoricalEventHfDiedDeathCause_Chasm
HistoricalEventHfDiedDeathCause_Collision
HistoricalEventHfDiedDeathCause_Crucify
HistoricalEventHfDiedDeathCause_DrainBlood
HistoricalEventHfDiedDeathCause_Drawbridge
HistoricalEventHfDiedDeathCause_Drown
HistoricalEventHfDiedDeathCause_DrownAlt
HistoricalEventHfDiedDeathCause_DrownAltTwo
HistoricalEventHfDiedDeathCause_EncaseIce
HistoricalEventHfDiedDeathCause_ExecutionGeneric
HistoricalEventHfDiedDeathCause_FallingObject
HistoricalEventHfDiedDeathCause_FeedToBeasts
HistoricalEventHfDiedDeathCause_HackToPieces
HistoricalEventHfDiedDeathCause_Heat
HistoricalEventHfDiedDeathCause_Hunger
HistoricalEventHfDiedDeathCause_Infection
HistoricalEventHfDiedDeathCause_LeaptFromHeight
HistoricalEventHfDiedDeathCause_Melt
HistoricalEventHfDiedDeathCause_Memorialize
HistoricalEventHfDiedDeathCause_Murder
HistoricalEventHfDiedDeathCause_OldAge
HistoricalEventHfDiedDeathCause_Quit
HistoricalEventHfDiedDeathCause_Scare
HistoricalEventHfDiedDeathCause_Shot
HistoricalEventHfDiedDeathCause_Slaughter
HistoricalEventHfDiedDeathCause_Spike
HistoricalEventHfDiedDeathCause_StruckDown
HistoricalEventHfDiedDeathCause_Suffocate
HistoricalEventHfDiedDeathCause_Thirst
HistoricalEventHfDiedDeathCause_Trap
HistoricalEventHfDiedDeathCause_Vanish
)
func parseHistoricalEventHfDiedDeathCause(s string) HistoricalEventHfDiedDeathCause {
switch s {
case "behead":
return HistoricalEventHfDiedDeathCause_Behead
case "bleed":
return HistoricalEventHfDiedDeathCause_Bleed
case "burn_alive":
return HistoricalEventHfDiedDeathCause_BurnAlive
case "bury_alive":
return HistoricalEventHfDiedDeathCause_BuryAlive
case "cavein":
return HistoricalEventHfDiedDeathCause_Cavein
case "chasm":
return HistoricalEventHfDiedDeathCause_Chasm
case "collision":
return HistoricalEventHfDiedDeathCause_Collision
case "crucify":
return HistoricalEventHfDiedDeathCause_Crucify
case "drain_blood":
return HistoricalEventHfDiedDeathCause_DrainBlood
case "drawbridge":
return HistoricalEventHfDiedDeathCause_Drawbridge
case "drown":
return HistoricalEventHfDiedDeathCause_Drown
case "drown_alt":
return HistoricalEventHfDiedDeathCause_DrownAlt
case "drown_alt2":
return HistoricalEventHfDiedDeathCause_DrownAltTwo
case "encase_ice":
return HistoricalEventHfDiedDeathCause_EncaseIce
case "execution_generic":
return HistoricalEventHfDiedDeathCause_ExecutionGeneric
case "falling_object":
return HistoricalEventHfDiedDeathCause_FallingObject
case "feed_to_beasts":
return HistoricalEventHfDiedDeathCause_FeedToBeasts
case "hack_to_pieces":
return HistoricalEventHfDiedDeathCause_HackToPieces
case "heat":
return HistoricalEventHfDiedDeathCause_Heat
case "hunger":
return HistoricalEventHfDiedDeathCause_Hunger
case "infection":
return HistoricalEventHfDiedDeathCause_Infection
case "leapt_from_height":
return HistoricalEventHfDiedDeathCause_LeaptFromHeight
case "melt":
return HistoricalEventHfDiedDeathCause_Melt
case "memorialize":
return HistoricalEventHfDiedDeathCause_Memorialize
case "murder":
return HistoricalEventHfDiedDeathCause_Murder
case "old_age":
return HistoricalEventHfDiedDeathCause_OldAge
case "quit":
return HistoricalEventHfDiedDeathCause_Quit
case "scare":
return HistoricalEventHfDiedDeathCause_Scare
case "shot":
return HistoricalEventHfDiedDeathCause_Shot
case "slaughter":
return HistoricalEventHfDiedDeathCause_Slaughter
case "spike":
return HistoricalEventHfDiedDeathCause_Spike
case "struck_down":
return HistoricalEventHfDiedDeathCause_StruckDown
case "suffocate":
return HistoricalEventHfDiedDeathCause_Suffocate
case "thirst":
return HistoricalEventHfDiedDeathCause_Thirst
case "trap":
return HistoricalEventHfDiedDeathCause_Trap
case "vanish":
return HistoricalEventHfDiedDeathCause_Vanish
}
return HistoricalEventHfDiedDeathCause_Unknown
}
func (s HistoricalEventHfDiedDeathCause) String() string {
switch s {
case HistoricalEventHfDiedDeathCause_Behead:
return "behead"
case HistoricalEventHfDiedDeathCause_Bleed:
return "bleed"
case HistoricalEventHfDiedDeathCause_BurnAlive:
return "burn alive"
case HistoricalEventHfDiedDeathCause_BuryAlive:
return "bury alive"
case HistoricalEventHfDiedDeathCause_Cavein:
return "cavein"
case HistoricalEventHfDiedDeathCause_Chasm:
return "chasm"
case HistoricalEventHfDiedDeathCause_Collision:
return "collision"
case HistoricalEventHfDiedDeathCause_Crucify:
return "crucify"
case HistoricalEventHfDiedDeathCause_DrainBlood:
return "drain blood"
case HistoricalEventHfDiedDeathCause_Drawbridge:
return "drawbridge"
case HistoricalEventHfDiedDeathCause_Drown:
return "drown"
case HistoricalEventHfDiedDeathCause_DrownAlt:
return "drown alt"
case HistoricalEventHfDiedDeathCause_DrownAltTwo:
return "drown alt two"
case HistoricalEventHfDiedDeathCause_EncaseIce:
return "encase ice"
case HistoricalEventHfDiedDeathCause_ExecutionGeneric:
return "execution generic"
case HistoricalEventHfDiedDeathCause_FallingObject:
return "falling object"
case HistoricalEventHfDiedDeathCause_FeedToBeasts:
return "feed to beasts"
case HistoricalEventHfDiedDeathCause_HackToPieces:
return "hack to pieces"
case HistoricalEventHfDiedDeathCause_Heat:
return "heat"
case HistoricalEventHfDiedDeathCause_Hunger:
return "hunger"
case HistoricalEventHfDiedDeathCause_Infection:
return "infection"
case HistoricalEventHfDiedDeathCause_LeaptFromHeight:
return "leapt from height"
case HistoricalEventHfDiedDeathCause_Melt:
return "melt"
case HistoricalEventHfDiedDeathCause_Memorialize:
return "memorialize"
case HistoricalEventHfDiedDeathCause_Murder:
return "murder"
case HistoricalEventHfDiedDeathCause_OldAge:
return "old age"
case HistoricalEventHfDiedDeathCause_Quit:
return "quit"
case HistoricalEventHfDiedDeathCause_Scare:
return "scare"
case HistoricalEventHfDiedDeathCause_Shot:
return "shot"
case HistoricalEventHfDiedDeathCause_Slaughter:
return "slaughter"
case HistoricalEventHfDiedDeathCause_Spike:
return "spike"
case HistoricalEventHfDiedDeathCause_StruckDown:
return "struck down"
case HistoricalEventHfDiedDeathCause_Suffocate:
return "suffocate"
case HistoricalEventHfDiedDeathCause_Thirst:
return "thirst"
case HistoricalEventHfDiedDeathCause_Trap:
return "trap"
case HistoricalEventHfDiedDeathCause_Vanish:
return "vanish"
}
return "unknown"
}
func (s HistoricalEventHfDiedDeathCause) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfDiedShooterItemSubtype int
const (
HistoricalEventHfDiedShooterItemSubtype_Unknown HistoricalEventHfDiedShooterItemSubtype = iota
HistoricalEventHfDiedShooterItemSubtype_Bow
HistoricalEventHfDiedShooterItemSubtype_Crossbow
)
func parseHistoricalEventHfDiedShooterItemSubtype(s string) HistoricalEventHfDiedShooterItemSubtype {
switch s {
case "bow":
return HistoricalEventHfDiedShooterItemSubtype_Bow
case "crossbow":
return HistoricalEventHfDiedShooterItemSubtype_Crossbow
}
return HistoricalEventHfDiedShooterItemSubtype_Unknown
}
func (s HistoricalEventHfDiedShooterItemSubtype) String() string {
switch s {
case HistoricalEventHfDiedShooterItemSubtype_Bow:
return "bow"
case HistoricalEventHfDiedShooterItemSubtype_Crossbow:
return "crossbow"
}
return "unknown"
}
func (s HistoricalEventHfDiedShooterItemSubtype) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfDiedShooterItemType int
const (
HistoricalEventHfDiedShooterItemType_Unknown HistoricalEventHfDiedShooterItemType = iota
HistoricalEventHfDiedShooterItemType_Weapon
)
func parseHistoricalEventHfDiedShooterItemType(s string) HistoricalEventHfDiedShooterItemType {
switch s {
case "weapon":
return HistoricalEventHfDiedShooterItemType_Weapon
}
return HistoricalEventHfDiedShooterItemType_Unknown
}
func (s HistoricalEventHfDiedShooterItemType) String() string {
switch s {
case HistoricalEventHfDiedShooterItemType_Weapon:
return "weapon"
}
return "unknown"
}
func (s HistoricalEventHfDiedShooterItemType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfDied struct {
Cause HistoricalEventHfDiedCause `json:"cause" legend:"base"` // cause
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Hfid int `json:"hfid" legend:"base"` // hfid
ItemSubtype string `json:"itemSubtype" legend:"plus"` // item_subtype
ItemType string `json:"itemType" legend:"plus"` // item_type
Mat string `json:"mat" legend:"plus"` // mat
ShooterArtifactId int `json:"shooterArtifactId" legend:"plus"` // shooter_artifact_id
ShooterItem int `json:"shooterItem" legend:"plus"` // shooter_item
ShooterItemSubtype HistoricalEventHfDiedShooterItemSubtype `json:"shooterItemSubtype" legend:"plus"` // shooter_item_subtype
ShooterItemType HistoricalEventHfDiedShooterItemType `json:"shooterItemType" legend:"plus"` // shooter_item_type
ShooterMat string `json:"shooterMat" legend:"plus"` // shooter_mat
SiteId int `json:"siteId" legend:"base"` // site_id
SlayerCaste string `json:"slayerCaste" legend:"both"` // slayer_caste
SlayerHfid int `json:"slayerHfid" legend:"base"` // slayer_hfid
SlayerItemId int `json:"slayerItemId" legend:"base"` // slayer_item_id
SlayerRace string `json:"slayerRace" legend:"both"` // slayer_race
SlayerShooterItemId int `json:"slayerShooterItemId" legend:"base"` // slayer_shooter_item_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventHfDied() *HistoricalEventHfDied {
return &HistoricalEventHfDied{
FeatureLayerId: -1,
Hfid: -1,
ShooterArtifactId: -1,
ShooterItem: -1,
SiteId: -1,
SlayerHfid: -1,
SlayerItemId: -1,
SlayerShooterItemId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfDied) Type() string { return "hf died" }
func (x *HistoricalEventHfDied) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfDied) RelatedToHf(id int) bool { return x.Hfid == id || x.SlayerHfid == id }
func (x *HistoricalEventHfDied) RelatedToArtifact(id int) bool {
return x.ShooterArtifactId == id || x.ShooterItem == id || x.SlayerItemId == id || x.SlayerShooterItemId == id
}
func (x *HistoricalEventHfDied) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfDied) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfDied) CheckFields() {
if x.ShooterArtifactId != x.FeatureLayerId {
sameFields["HistoricalEventHfDied"]["ShooterArtifactId"]["FeatureLayerId"] = false
}
if x.ShooterArtifactId != x.Hfid {
sameFields["HistoricalEventHfDied"]["ShooterArtifactId"]["Hfid"] = false
}
if x.ShooterArtifactId != x.SiteId {
sameFields["HistoricalEventHfDied"]["ShooterArtifactId"]["SiteId"] = false
}
if x.ShooterArtifactId != x.SlayerHfid {
sameFields["HistoricalEventHfDied"]["ShooterArtifactId"]["SlayerHfid"] = false
}
if x.ShooterArtifactId != x.SlayerItemId {
sameFields["HistoricalEventHfDied"]["ShooterArtifactId"]["SlayerItemId"] = false
}
if x.ShooterArtifactId != x.SlayerShooterItemId {
sameFields["HistoricalEventHfDied"]["ShooterArtifactId"]["SlayerShooterItemId"] = false
}
if x.ShooterArtifactId != x.SubregionId {
sameFields["HistoricalEventHfDied"]["ShooterArtifactId"]["SubregionId"] = false
}
if x.ShooterItem != x.FeatureLayerId {
sameFields["HistoricalEventHfDied"]["ShooterItem"]["FeatureLayerId"] = false
}
if x.ShooterItem != x.Hfid {
sameFields["HistoricalEventHfDied"]["ShooterItem"]["Hfid"] = false
}
if x.ShooterItem != x.SiteId {
sameFields["HistoricalEventHfDied"]["ShooterItem"]["SiteId"] = false
}
if x.ShooterItem != x.SlayerHfid {
sameFields["HistoricalEventHfDied"]["ShooterItem"]["SlayerHfid"] = false
}
if x.ShooterItem != x.SlayerItemId {
sameFields["HistoricalEventHfDied"]["ShooterItem"]["SlayerItemId"] = false
}
if x.ShooterItem != x.SlayerShooterItemId {
sameFields["HistoricalEventHfDied"]["ShooterItem"]["SlayerShooterItemId"] = false
}
if x.ShooterItem != x.SubregionId {
sameFields["HistoricalEventHfDied"]["ShooterItem"]["SubregionId"] = false
}
}
func (x *HistoricalEventHfDied) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Cause != 0 {
d["cause"] = x.Cause
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
d["itemSubtype"] = x.ItemSubtype
d["itemType"] = x.ItemType
d["mat"] = x.Mat
if x.ShooterArtifactId != -1 {
d["shooterArtifactId"] = x.ShooterArtifactId
}
if x.ShooterItem != -1 {
d["shooterItem"] = x.ShooterItem
}
if x.ShooterItemSubtype != 0 {
d["shooterItemSubtype"] = x.ShooterItemSubtype
}
if x.ShooterItemType != 0 {
d["shooterItemType"] = x.ShooterItemType
}
d["shooterMat"] = x.ShooterMat
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
d["slayerCaste"] = x.SlayerCaste
if x.SlayerHfid != -1 {
d["slayerHfid"] = x.SlayerHfid
}
if x.SlayerItemId != -1 {
d["slayerItemId"] = x.SlayerItemId
}
d["slayerRace"] = x.SlayerRace
if x.SlayerShooterItemId != -1 {
d["slayerShooterItemId"] = x.SlayerShooterItemId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventHfDisturbedStructureAction int
const (
HistoricalEventHfDisturbedStructureAction_Unknown HistoricalEventHfDisturbedStructureAction = iota
HistoricalEventHfDisturbedStructureAction_Disturb
)
func parseHistoricalEventHfDisturbedStructureAction(s string) HistoricalEventHfDisturbedStructureAction {
switch s {
case "disturb":
return HistoricalEventHfDisturbedStructureAction_Disturb
}
return HistoricalEventHfDisturbedStructureAction_Unknown
}
func (s HistoricalEventHfDisturbedStructureAction) String() string {
switch s {
case HistoricalEventHfDisturbedStructureAction_Disturb:
return "disturb"
}
return "unknown"
}
func (s HistoricalEventHfDisturbedStructureAction) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfDisturbedStructure struct {
Action HistoricalEventHfDisturbedStructureAction `json:"action" legend:"plus"` // action
HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventHfDisturbedStructure() *HistoricalEventHfDisturbedStructure {
return &HistoricalEventHfDisturbedStructure{
HistFigId: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventHfDisturbedStructure) Type() string { return "hf disturbed structure" }
func (x *HistoricalEventHfDisturbedStructure) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfDisturbedStructure) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventHfDisturbedStructure) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfDisturbedStructure) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfDisturbedStructure) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfDisturbedStructure) CheckFields() {
}
func (x *HistoricalEventHfDisturbedStructure) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Action != 0 {
d["action"] = x.Action
}
if x.HistFigId != -1 {
d["histFigId"] = x.HistFigId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventHfDoesInteraction struct {
DoerHfid int `json:"doerHfid" legend:"base"` // doer_hfid
Interaction string `json:"interaction" legend:"base"` // interaction
InteractionAction string `json:"interactionAction" legend:"plus"` // interaction_action
Region int `json:"region" legend:"plus"` // region
Site int `json:"site" legend:"plus"` // site
Source int `json:"source" legend:"plus"` // source
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
}
func NewHistoricalEventHfDoesInteraction() *HistoricalEventHfDoesInteraction {
return &HistoricalEventHfDoesInteraction{
DoerHfid: -1,
Region: -1,
Site: -1,
Source: -1,
TargetHfid: -1,
}
}
func (x *HistoricalEventHfDoesInteraction) Type() string { return "hf does interaction" }
func (x *HistoricalEventHfDoesInteraction) RelatedToEntity(id int) bool { return x.Source == id }
func (x *HistoricalEventHfDoesInteraction) RelatedToHf(id int) bool {
return x.DoerHfid == id || x.TargetHfid == id
}
func (x *HistoricalEventHfDoesInteraction) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfDoesInteraction) RelatedToSite(id int) bool { return x.Site == id }
func (x *HistoricalEventHfDoesInteraction) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfDoesInteraction) CheckFields() {
if x.InteractionAction != x.Interaction && x.InteractionAction != "" && x.Interaction != "" {
sameFields["HistoricalEventHfDoesInteraction"]["InteractionAction"]["Interaction"] = false
}
if x.Region != x.DoerHfid {
sameFields["HistoricalEventHfDoesInteraction"]["Region"]["DoerHfid"] = false
}
if x.Region != x.TargetHfid {
sameFields["HistoricalEventHfDoesInteraction"]["Region"]["TargetHfid"] = false
}
if x.Site != x.DoerHfid {
sameFields["HistoricalEventHfDoesInteraction"]["Site"]["DoerHfid"] = false
}
if x.Site != x.TargetHfid {
sameFields["HistoricalEventHfDoesInteraction"]["Site"]["TargetHfid"] = false
}
if x.Source != x.DoerHfid {
sameFields["HistoricalEventHfDoesInteraction"]["Source"]["DoerHfid"] = false
}
if x.Source != x.TargetHfid {
sameFields["HistoricalEventHfDoesInteraction"]["Source"]["TargetHfid"] = false
}
}
func (x *HistoricalEventHfDoesInteraction) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.DoerHfid != -1 {
d["doerHfid"] = x.DoerHfid
}
d["interaction"] = x.Interaction
d["interactionAction"] = x.InteractionAction
if x.Region != -1 {
d["region"] = x.Region
}
if x.Site != -1 {
d["site"] = x.Site
}
if x.Source != -1 {
d["source"] = x.Source
}
if x.TargetHfid != -1 {
d["targetHfid"] = x.TargetHfid
}
return json.Marshal(d)
}
type HistoricalEventHfEnslaved struct {
EnslavedHfid int `json:"enslavedHfid" legend:"base"` // enslaved_hfid
MovedToSiteId int `json:"movedToSiteId" legend:"base"` // moved_to_site_id
PayerEntityId int `json:"payerEntityId" legend:"base"` // payer_entity_id
SellerHfid int `json:"sellerHfid" legend:"base"` // seller_hfid
}
func NewHistoricalEventHfEnslaved() *HistoricalEventHfEnslaved {
return &HistoricalEventHfEnslaved{
EnslavedHfid: -1,
MovedToSiteId: -1,
PayerEntityId: -1,
SellerHfid: -1,
}
}
func (x *HistoricalEventHfEnslaved) Type() string { return "hf enslaved" }
func (x *HistoricalEventHfEnslaved) RelatedToEntity(id int) bool { return x.PayerEntityId == id }
func (x *HistoricalEventHfEnslaved) RelatedToHf(id int) bool {
return x.EnslavedHfid == id || x.SellerHfid == id
}
func (x *HistoricalEventHfEnslaved) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfEnslaved) RelatedToSite(id int) bool { return x.MovedToSiteId == id }
func (x *HistoricalEventHfEnslaved) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfEnslaved) CheckFields() {
}
func (x *HistoricalEventHfEnslaved) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EnslavedHfid != -1 {
d["enslavedHfid"] = x.EnslavedHfid
}
if x.MovedToSiteId != -1 {
d["movedToSiteId"] = x.MovedToSiteId
}
if x.PayerEntityId != -1 {
d["payerEntityId"] = x.PayerEntityId
}
if x.SellerHfid != -1 {
d["sellerHfid"] = x.SellerHfid
}
return json.Marshal(d)
}
type HistoricalEventHfEquipmentPurchase struct {
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
GroupHfid int `json:"groupHfid" legend:"base"` // group_hfid
Quality int `json:"quality" legend:"base"` // quality
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventHfEquipmentPurchase() *HistoricalEventHfEquipmentPurchase {
return &HistoricalEventHfEquipmentPurchase{
FeatureLayerId: -1,
GroupHfid: -1,
Quality: -1,
SiteId: -1,
StructureId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfEquipmentPurchase) Type() string { return "hf equipment purchase" }
func (x *HistoricalEventHfEquipmentPurchase) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfEquipmentPurchase) RelatedToHf(id int) bool { return x.GroupHfid == id }
func (x *HistoricalEventHfEquipmentPurchase) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfEquipmentPurchase) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfEquipmentPurchase) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfEquipmentPurchase) CheckFields() {
}
func (x *HistoricalEventHfEquipmentPurchase) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.GroupHfid != -1 {
d["groupHfid"] = x.GroupHfid
}
if x.Quality != -1 {
d["quality"] = x.Quality
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventHfFreed struct {
FreeingCivId int `json:"freeingCivId" legend:"base"` // freeing_civ_id
FreeingHfid int `json:"freeingHfid" legend:"base"` // freeing_hfid
HoldingCivId int `json:"holdingCivId" legend:"base"` // holding_civ_id
RescuedHfid []int `json:"rescuedHfid" legend:"base"` // rescued_hfid
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventHfFreed() *HistoricalEventHfFreed {
return &HistoricalEventHfFreed{
FreeingCivId: -1,
FreeingHfid: -1,
HoldingCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventHfFreed) Type() string { return "hf freed" }
func (x *HistoricalEventHfFreed) RelatedToEntity(id int) bool {
return x.FreeingCivId == id || x.HoldingCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventHfFreed) RelatedToHf(id int) bool {
return containsInt(x.RescuedHfid, id) || x.FreeingHfid == id
}
func (x *HistoricalEventHfFreed) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfFreed) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfFreed) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfFreed) CheckFields() {
}
func (x *HistoricalEventHfFreed) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.FreeingCivId != -1 {
d["freeingCivId"] = x.FreeingCivId
}
if x.FreeingHfid != -1 {
d["freeingHfid"] = x.FreeingHfid
}
if x.HoldingCivId != -1 {
d["holdingCivId"] = x.HoldingCivId
}
d["rescuedHfid"] = x.RescuedHfid
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventHfGainsSecretGoalSecretGoal int
const (
HistoricalEventHfGainsSecretGoalSecretGoal_Unknown HistoricalEventHfGainsSecretGoalSecretGoal = iota
HistoricalEventHfGainsSecretGoalSecretGoal_Immortality
)
func parseHistoricalEventHfGainsSecretGoalSecretGoal(s string) HistoricalEventHfGainsSecretGoalSecretGoal {
switch s {
case "immortality":
return HistoricalEventHfGainsSecretGoalSecretGoal_Immortality
}
return HistoricalEventHfGainsSecretGoalSecretGoal_Unknown
}
func (s HistoricalEventHfGainsSecretGoalSecretGoal) String() string {
switch s {
case HistoricalEventHfGainsSecretGoalSecretGoal_Immortality:
return "immortality"
}
return "unknown"
}
func (s HistoricalEventHfGainsSecretGoalSecretGoal) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfGainsSecretGoal struct {
Hfid int `json:"hfid" legend:"base"` // hfid
SecretGoal HistoricalEventHfGainsSecretGoalSecretGoal `json:"secretGoal" legend:"base"` // secret_goal
}
func NewHistoricalEventHfGainsSecretGoal() *HistoricalEventHfGainsSecretGoal {
return &HistoricalEventHfGainsSecretGoal{
Hfid: -1,
}
}
func (x *HistoricalEventHfGainsSecretGoal) Type() string { return "hf gains secret goal" }
func (x *HistoricalEventHfGainsSecretGoal) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfGainsSecretGoal) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventHfGainsSecretGoal) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfGainsSecretGoal) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventHfGainsSecretGoal) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfGainsSecretGoal) CheckFields() {
}
func (x *HistoricalEventHfGainsSecretGoal) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.SecretGoal != 0 {
d["secretGoal"] = x.SecretGoal
}
return json.Marshal(d)
}
type HistoricalEventHfInterrogated struct {
ArrestingEnid int `json:"arrestingEnid" legend:"base"` // arresting_enid
HeldFirmInInterrogation bool `json:"heldFirmInInterrogation" legend:"base"` // held_firm_in_interrogation
ImplicatedHfid int `json:"implicatedHfid" legend:"base"` // implicated_hfid
InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` // interrogator_hfid
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
WantedAndRecognized bool `json:"wantedAndRecognized" legend:"base"` // wanted_and_recognized
}
func NewHistoricalEventHfInterrogated() *HistoricalEventHfInterrogated {
return &HistoricalEventHfInterrogated{
ArrestingEnid: -1,
ImplicatedHfid: -1,
InterrogatorHfid: -1,
TargetHfid: -1,
}
}
func (x *HistoricalEventHfInterrogated) Type() string { return "hf interrogated" }
func (x *HistoricalEventHfInterrogated) RelatedToEntity(id int) bool { return x.ArrestingEnid == id }
func (x *HistoricalEventHfInterrogated) RelatedToHf(id int) bool {
return x.ImplicatedHfid == id || x.InterrogatorHfid == id || x.TargetHfid == id
}
func (x *HistoricalEventHfInterrogated) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfInterrogated) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventHfInterrogated) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfInterrogated) CheckFields() {
}
func (x *HistoricalEventHfInterrogated) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArrestingEnid != -1 {
d["arrestingEnid"] = x.ArrestingEnid
}
d["heldFirmInInterrogation"] = x.HeldFirmInInterrogation
if x.ImplicatedHfid != -1 {
d["implicatedHfid"] = x.ImplicatedHfid
}
if x.InterrogatorHfid != -1 {
d["interrogatorHfid"] = x.InterrogatorHfid
}
if x.TargetHfid != -1 {
d["targetHfid"] = x.TargetHfid
}
d["wantedAndRecognized"] = x.WantedAndRecognized
return json.Marshal(d)
}
type HistoricalEventHfLearnsSecretSecretText int
const (
HistoricalEventHfLearnsSecretSecretText_Unknown HistoricalEventHfLearnsSecretSecretText = iota
HistoricalEventHfLearnsSecretSecretText_TheSecretsOfLifeAndDeath
)
func parseHistoricalEventHfLearnsSecretSecretText(s string) HistoricalEventHfLearnsSecretSecretText {
switch s {
case "the secrets of life and death":
return HistoricalEventHfLearnsSecretSecretText_TheSecretsOfLifeAndDeath
}
return HistoricalEventHfLearnsSecretSecretText_Unknown
}
func (s HistoricalEventHfLearnsSecretSecretText) String() string {
switch s {
case HistoricalEventHfLearnsSecretSecretText_TheSecretsOfLifeAndDeath:
return "the secrets of life and death"
}
return "unknown"
}
func (s HistoricalEventHfLearnsSecretSecretText) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfLearnsSecret struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
Interaction string `json:"interaction" legend:"base"` // interaction
SecretText HistoricalEventHfLearnsSecretSecretText `json:"secretText" legend:"plus"` // secret_text
StudentHfid int `json:"studentHfid" legend:"base"` // student_hfid
TeacherHfid int `json:"teacherHfid" legend:"base"` // teacher_hfid
}
func NewHistoricalEventHfLearnsSecret() *HistoricalEventHfLearnsSecret {
return &HistoricalEventHfLearnsSecret{
ArtifactId: -1,
StudentHfid: -1,
TeacherHfid: -1,
}
}
func (x *HistoricalEventHfLearnsSecret) Type() string { return "hf learns secret" }
func (x *HistoricalEventHfLearnsSecret) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfLearnsSecret) RelatedToHf(id int) bool {
return x.StudentHfid == id || x.TeacherHfid == id
}
func (x *HistoricalEventHfLearnsSecret) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventHfLearnsSecret) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventHfLearnsSecret) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfLearnsSecret) CheckFields() {
}
func (x *HistoricalEventHfLearnsSecret) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
d["interaction"] = x.Interaction
if x.SecretText != 0 {
d["secretText"] = x.SecretText
}
if x.StudentHfid != -1 {
d["studentHfid"] = x.StudentHfid
}
if x.TeacherHfid != -1 {
d["teacherHfid"] = x.TeacherHfid
}
return json.Marshal(d)
}
type HistoricalEventHfNewPet struct {
Coords string `json:"coords" legend:"base"` // coords
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
GroupHfid int `json:"groupHfid" legend:"base"` // group_hfid
Pets string `json:"pets" legend:"plus"` // pets
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventHfNewPet() *HistoricalEventHfNewPet {
return &HistoricalEventHfNewPet{
FeatureLayerId: -1,
GroupHfid: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfNewPet) Type() string { return "hf new pet" }
func (x *HistoricalEventHfNewPet) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfNewPet) RelatedToHf(id int) bool { return x.GroupHfid == id }
func (x *HistoricalEventHfNewPet) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfNewPet) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfNewPet) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfNewPet) CheckFields() {
if x.Pets != x.Coords && x.Pets != "" && x.Coords != "" {
sameFields["HistoricalEventHfNewPet"]["Pets"]["Coords"] = false
}
}
func (x *HistoricalEventHfNewPet) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coords"] = x.Coords
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.GroupHfid != -1 {
d["groupHfid"] = x.GroupHfid
}
d["pets"] = x.Pets
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventHfPerformedHorribleExperiments struct {
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
GroupHfid int `json:"groupHfid" legend:"base"` // group_hfid
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventHfPerformedHorribleExperiments() *HistoricalEventHfPerformedHorribleExperiments {
return &HistoricalEventHfPerformedHorribleExperiments{
FeatureLayerId: -1,
GroupHfid: -1,
SiteId: -1,
StructureId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfPerformedHorribleExperiments) Type() string {
return "hf performed horrible experiments"
}
func (x *HistoricalEventHfPerformedHorribleExperiments) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfPerformedHorribleExperiments) RelatedToHf(id int) bool {
return x.GroupHfid == id
}
func (x *HistoricalEventHfPerformedHorribleExperiments) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfPerformedHorribleExperiments) RelatedToSite(id int) bool {
return x.SiteId == id
}
func (x *HistoricalEventHfPerformedHorribleExperiments) RelatedToRegion(id int) bool {
return x.SubregionId == id
}
func (x *HistoricalEventHfPerformedHorribleExperiments) CheckFields() {
}
func (x *HistoricalEventHfPerformedHorribleExperiments) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.GroupHfid != -1 {
d["groupHfid"] = x.GroupHfid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventHfPrayedInsideStructureAction int
const (
HistoricalEventHfPrayedInsideStructureAction_Unknown HistoricalEventHfPrayedInsideStructureAction = iota
HistoricalEventHfPrayedInsideStructureAction_Prayedinside
)
func parseHistoricalEventHfPrayedInsideStructureAction(s string) HistoricalEventHfPrayedInsideStructureAction {
switch s {
case "prayedinside":
return HistoricalEventHfPrayedInsideStructureAction_Prayedinside
}
return HistoricalEventHfPrayedInsideStructureAction_Unknown
}
func (s HistoricalEventHfPrayedInsideStructureAction) String() string {
switch s {
case HistoricalEventHfPrayedInsideStructureAction_Prayedinside:
return "prayedinside"
}
return "unknown"
}
func (s HistoricalEventHfPrayedInsideStructureAction) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfPrayedInsideStructure struct {
Action HistoricalEventHfPrayedInsideStructureAction `json:"action" legend:"plus"` // action
HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventHfPrayedInsideStructure() *HistoricalEventHfPrayedInsideStructure {
return &HistoricalEventHfPrayedInsideStructure{
HistFigId: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventHfPrayedInsideStructure) Type() string { return "hf prayed inside structure" }
func (x *HistoricalEventHfPrayedInsideStructure) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfPrayedInsideStructure) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventHfPrayedInsideStructure) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfPrayedInsideStructure) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfPrayedInsideStructure) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfPrayedInsideStructure) CheckFields() {
}
func (x *HistoricalEventHfPrayedInsideStructure) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Action != 0 {
d["action"] = x.Action
}
if x.HistFigId != -1 {
d["histFigId"] = x.HistFigId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventHfPreachTopic int
const (
HistoricalEventHfPreachTopic_Unknown HistoricalEventHfPreachTopic = iota
HistoricalEventHfPreachTopic_Entity1ShouldLoveEntityTwo
HistoricalEventHfPreachTopic_SetEntity1AgainstEntityTwo
)
func parseHistoricalEventHfPreachTopic(s string) HistoricalEventHfPreachTopic {
switch s {
case "entity 1 should love entity 2":
return HistoricalEventHfPreachTopic_Entity1ShouldLoveEntityTwo
case "set entity 1 against entity 2":
return HistoricalEventHfPreachTopic_SetEntity1AgainstEntityTwo
}
return HistoricalEventHfPreachTopic_Unknown
}
func (s HistoricalEventHfPreachTopic) String() string {
switch s {
case HistoricalEventHfPreachTopic_Entity1ShouldLoveEntityTwo:
return "entity 1 should love entity two"
case HistoricalEventHfPreachTopic_SetEntity1AgainstEntityTwo:
return "set entity 1 against entity two"
}
return "unknown"
}
func (s HistoricalEventHfPreachTopic) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfPreach struct {
Entity1 int `json:"entity1" legend:"base"` // entity_1
Entity2 int `json:"entity2" legend:"base"` // entity_2
SiteHfid int `json:"siteHfid" legend:"base"` // site_hfid
SpeakerHfid int `json:"speakerHfid" legend:"base"` // speaker_hfid
Topic HistoricalEventHfPreachTopic `json:"topic" legend:"base"` // topic
}
func NewHistoricalEventHfPreach() *HistoricalEventHfPreach {
return &HistoricalEventHfPreach{
Entity1: -1,
Entity2: -1,
SiteHfid: -1,
SpeakerHfid: -1,
}
}
func (x *HistoricalEventHfPreach) Type() string { return "hf preach" }
func (x *HistoricalEventHfPreach) RelatedToEntity(id int) bool {
return x.Entity1 == id || x.Entity2 == id
}
func (x *HistoricalEventHfPreach) RelatedToHf(id int) bool {
return x.SiteHfid == id || x.SpeakerHfid == id
}
func (x *HistoricalEventHfPreach) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfPreach) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventHfPreach) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfPreach) CheckFields() {
}
func (x *HistoricalEventHfPreach) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Entity1 != -1 {
d["entity1"] = x.Entity1
}
if x.Entity2 != -1 {
d["entity2"] = x.Entity2
}
if x.SiteHfid != -1 {
d["siteHfid"] = x.SiteHfid
}
if x.SpeakerHfid != -1 {
d["speakerHfid"] = x.SpeakerHfid
}
if x.Topic != 0 {
d["topic"] = x.Topic
}
return json.Marshal(d)
}
type HistoricalEventHfProfanedStructureAction int
const (
HistoricalEventHfProfanedStructureAction_Unknown HistoricalEventHfProfanedStructureAction = iota
HistoricalEventHfProfanedStructureAction_Profane
)
func parseHistoricalEventHfProfanedStructureAction(s string) HistoricalEventHfProfanedStructureAction {
switch s {
case "profane":
return HistoricalEventHfProfanedStructureAction_Profane
}
return HistoricalEventHfProfanedStructureAction_Unknown
}
func (s HistoricalEventHfProfanedStructureAction) String() string {
switch s {
case HistoricalEventHfProfanedStructureAction_Profane:
return "profane"
}
return "unknown"
}
func (s HistoricalEventHfProfanedStructureAction) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfProfanedStructure struct {
Action HistoricalEventHfProfanedStructureAction `json:"action" legend:"plus"` // action
HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventHfProfanedStructure() *HistoricalEventHfProfanedStructure {
return &HistoricalEventHfProfanedStructure{
HistFigId: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventHfProfanedStructure) Type() string { return "hf profaned structure" }
func (x *HistoricalEventHfProfanedStructure) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfProfanedStructure) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventHfProfanedStructure) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfProfanedStructure) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfProfanedStructure) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfProfanedStructure) CheckFields() {
}
func (x *HistoricalEventHfProfanedStructure) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Action != 0 {
d["action"] = x.Action
}
if x.HistFigId != -1 {
d["histFigId"] = x.HistFigId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventHfRansomed struct {
MovedToSiteId int `json:"movedToSiteId" legend:"base"` // moved_to_site_id
PayerEntityId int `json:"payerEntityId" legend:"base"` // payer_entity_id
PayerHfid int `json:"payerHfid" legend:"base"` // payer_hfid
RansomedHfid int `json:"ransomedHfid" legend:"base"` // ransomed_hfid
RansomerHfid int `json:"ransomerHfid" legend:"base"` // ransomer_hfid
}
func NewHistoricalEventHfRansomed() *HistoricalEventHfRansomed {
return &HistoricalEventHfRansomed{
MovedToSiteId: -1,
PayerEntityId: -1,
PayerHfid: -1,
RansomedHfid: -1,
RansomerHfid: -1,
}
}
func (x *HistoricalEventHfRansomed) Type() string { return "hf ransomed" }
func (x *HistoricalEventHfRansomed) RelatedToEntity(id int) bool { return x.PayerEntityId == id }
func (x *HistoricalEventHfRansomed) RelatedToHf(id int) bool {
return x.PayerHfid == id || x.RansomedHfid == id || x.RansomerHfid == id
}
func (x *HistoricalEventHfRansomed) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfRansomed) RelatedToSite(id int) bool { return x.MovedToSiteId == id }
func (x *HistoricalEventHfRansomed) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfRansomed) CheckFields() {
}
func (x *HistoricalEventHfRansomed) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.MovedToSiteId != -1 {
d["movedToSiteId"] = x.MovedToSiteId
}
if x.PayerEntityId != -1 {
d["payerEntityId"] = x.PayerEntityId
}
if x.PayerHfid != -1 {
d["payerHfid"] = x.PayerHfid
}
if x.RansomedHfid != -1 {
d["ransomedHfid"] = x.RansomedHfid
}
if x.RansomerHfid != -1 {
d["ransomerHfid"] = x.RansomerHfid
}
return json.Marshal(d)
}
type HistoricalEventHfReachSummit struct {
Coords string `json:"coords" legend:"base"` // coords
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Group []int `json:"group" legend:"plus"` // group
GroupHfid []int `json:"groupHfid" legend:"base"` // group_hfid
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventHfReachSummit() *HistoricalEventHfReachSummit {
return &HistoricalEventHfReachSummit{
FeatureLayerId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfReachSummit) Type() string { return "hf reach summit" }
func (x *HistoricalEventHfReachSummit) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfReachSummit) RelatedToHf(id int) bool { return containsInt(x.GroupHfid, id) }
func (x *HistoricalEventHfReachSummit) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfReachSummit) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventHfReachSummit) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfReachSummit) CheckFields() {
}
func (x *HistoricalEventHfReachSummit) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coords"] = x.Coords
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
d["group"] = x.Group
d["groupHfid"] = x.GroupHfid
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventHfRecruitedUnitTypeForEntityUnitType int
const (
HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Unknown HistoricalEventHfRecruitedUnitTypeForEntityUnitType = iota
HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Monk
)
func parseHistoricalEventHfRecruitedUnitTypeForEntityUnitType(s string) HistoricalEventHfRecruitedUnitTypeForEntityUnitType {
switch s {
case "monk":
return HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Monk
}
return HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Unknown
}
func (s HistoricalEventHfRecruitedUnitTypeForEntityUnitType) String() string {
switch s {
case HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Monk:
return "monk"
}
return "unknown"
}
func (s HistoricalEventHfRecruitedUnitTypeForEntityUnitType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfRecruitedUnitTypeForEntity struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Hfid int `json:"hfid" legend:"base"` // hfid
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
UnitType HistoricalEventHfRecruitedUnitTypeForEntityUnitType `json:"unitType" legend:"base"` // unit_type
}
func NewHistoricalEventHfRecruitedUnitTypeForEntity() *HistoricalEventHfRecruitedUnitTypeForEntity {
return &HistoricalEventHfRecruitedUnitTypeForEntity{
EntityId: -1,
FeatureLayerId: -1,
Hfid: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) Type() string {
return "hf recruited unit type for entity"
}
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) RelatedToEntity(id int) bool {
return x.EntityId == id
}
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) RelatedToSite(id int) bool {
return x.SiteId == id
}
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) RelatedToRegion(id int) bool {
return x.SubregionId == id
}
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) CheckFields() {
}
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.UnitType != 0 {
d["unitType"] = x.UnitType
}
return json.Marshal(d)
}
type HistoricalEventHfRelationshipDeniedReason int
const (
HistoricalEventHfRelationshipDeniedReason_Unknown HistoricalEventHfRelationshipDeniedReason = iota
HistoricalEventHfRelationshipDeniedReason_Jealousy
HistoricalEventHfRelationshipDeniedReason_PrefersWorkingAlone
)
func parseHistoricalEventHfRelationshipDeniedReason(s string) HistoricalEventHfRelationshipDeniedReason {
switch s {
case "jealousy":
return HistoricalEventHfRelationshipDeniedReason_Jealousy
case "prefers working alone":
return HistoricalEventHfRelationshipDeniedReason_PrefersWorkingAlone
}
return HistoricalEventHfRelationshipDeniedReason_Unknown
}
func (s HistoricalEventHfRelationshipDeniedReason) String() string {
switch s {
case HistoricalEventHfRelationshipDeniedReason_Jealousy:
return "jealousy"
case HistoricalEventHfRelationshipDeniedReason_PrefersWorkingAlone:
return "prefers working alone"
}
return "unknown"
}
func (s HistoricalEventHfRelationshipDeniedReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfRelationshipDeniedRelationship int
const (
HistoricalEventHfRelationshipDeniedRelationship_Unknown HistoricalEventHfRelationshipDeniedRelationship = iota
HistoricalEventHfRelationshipDeniedRelationship_Apprentice
)
func parseHistoricalEventHfRelationshipDeniedRelationship(s string) HistoricalEventHfRelationshipDeniedRelationship {
switch s {
case "apprentice":
return HistoricalEventHfRelationshipDeniedRelationship_Apprentice
}
return HistoricalEventHfRelationshipDeniedRelationship_Unknown
}
func (s HistoricalEventHfRelationshipDeniedRelationship) String() string {
switch s {
case HistoricalEventHfRelationshipDeniedRelationship_Apprentice:
return "apprentice"
}
return "unknown"
}
func (s HistoricalEventHfRelationshipDeniedRelationship) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfRelationshipDenied struct {
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Reason HistoricalEventHfRelationshipDeniedReason `json:"reason" legend:"base"` // reason
ReasonId int `json:"reasonId" legend:"base"` // reason_id
Relationship HistoricalEventHfRelationshipDeniedRelationship `json:"relationship" legend:"base"` // relationship
SeekerHfid int `json:"seekerHfid" legend:"base"` // seeker_hfid
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
}
func NewHistoricalEventHfRelationshipDenied() *HistoricalEventHfRelationshipDenied {
return &HistoricalEventHfRelationshipDenied{
FeatureLayerId: -1,
ReasonId: -1,
SeekerHfid: -1,
SiteId: -1,
SubregionId: -1,
TargetHfid: -1,
}
}
func (x *HistoricalEventHfRelationshipDenied) Type() string { return "hf relationship denied" }
func (x *HistoricalEventHfRelationshipDenied) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfRelationshipDenied) RelatedToHf(id int) bool {
return x.SeekerHfid == id || x.TargetHfid == id
}
func (x *HistoricalEventHfRelationshipDenied) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfRelationshipDenied) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfRelationshipDenied) RelatedToRegion(id int) bool {
return x.SubregionId == id
}
func (x *HistoricalEventHfRelationshipDenied) CheckFields() {
}
func (x *HistoricalEventHfRelationshipDenied) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Reason != 0 {
d["reason"] = x.Reason
}
if x.ReasonId != -1 {
d["reasonId"] = x.ReasonId
}
if x.Relationship != 0 {
d["relationship"] = x.Relationship
}
if x.SeekerHfid != -1 {
d["seekerHfid"] = x.SeekerHfid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.TargetHfid != -1 {
d["targetHfid"] = x.TargetHfid
}
return json.Marshal(d)
}
type HistoricalEventHfReunion struct {
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Group1Hfid int `json:"group1Hfid" legend:"base"` // group_1_hfid
Group2Hfid []int `json:"group2Hfid" legend:"base"` // group_2_hfid
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventHfReunion() *HistoricalEventHfReunion {
return &HistoricalEventHfReunion{
FeatureLayerId: -1,
Group1Hfid: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfReunion) Type() string { return "hf reunion" }
func (x *HistoricalEventHfReunion) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfReunion) RelatedToHf(id int) bool {
return containsInt(x.Group2Hfid, id) || x.Group1Hfid == id
}
func (x *HistoricalEventHfReunion) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfReunion) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfReunion) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfReunion) CheckFields() {
}
func (x *HistoricalEventHfReunion) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Group1Hfid != -1 {
d["group1Hfid"] = x.Group1Hfid
}
d["group2Hfid"] = x.Group2Hfid
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventHfRevivedGhost int
const (
HistoricalEventHfRevivedGhost_Unknown HistoricalEventHfRevivedGhost = iota
HistoricalEventHfRevivedGhost_AngryGhost
HistoricalEventHfRevivedGhost_EnergeticPoltergeist
HistoricalEventHfRevivedGhost_ForlornHaunt
HistoricalEventHfRevivedGhost_HowlingSpirit
HistoricalEventHfRevivedGhost_MoaningSpirit
HistoricalEventHfRevivedGhost_MurderousGhost
HistoricalEventHfRevivedGhost_RestlessHaunt
HistoricalEventHfRevivedGhost_SadisticGhost
HistoricalEventHfRevivedGhost_SecretivePoltergeist
HistoricalEventHfRevivedGhost_TroublesomePoltergeist
HistoricalEventHfRevivedGhost_ViolentGhost
)
func parseHistoricalEventHfRevivedGhost(s string) HistoricalEventHfRevivedGhost {
switch s {
case "angry ghost":
return HistoricalEventHfRevivedGhost_AngryGhost
case "energetic poltergeist":
return HistoricalEventHfRevivedGhost_EnergeticPoltergeist
case "forlorn haunt":
return HistoricalEventHfRevivedGhost_ForlornHaunt
case "howling spirit":
return HistoricalEventHfRevivedGhost_HowlingSpirit
case "moaning spirit":
return HistoricalEventHfRevivedGhost_MoaningSpirit
case "murderous ghost":
return HistoricalEventHfRevivedGhost_MurderousGhost
case "restless haunt":
return HistoricalEventHfRevivedGhost_RestlessHaunt
case "sadistic ghost":
return HistoricalEventHfRevivedGhost_SadisticGhost
case "secretive poltergeist":
return HistoricalEventHfRevivedGhost_SecretivePoltergeist
case "troublesome poltergeist":
return HistoricalEventHfRevivedGhost_TroublesomePoltergeist
case "violent ghost":
return HistoricalEventHfRevivedGhost_ViolentGhost
}
return HistoricalEventHfRevivedGhost_Unknown
}
func (s HistoricalEventHfRevivedGhost) String() string {
switch s {
case HistoricalEventHfRevivedGhost_AngryGhost:
return "angry ghost"
case HistoricalEventHfRevivedGhost_EnergeticPoltergeist:
return "energetic poltergeist"
case HistoricalEventHfRevivedGhost_ForlornHaunt:
return "forlorn haunt"
case HistoricalEventHfRevivedGhost_HowlingSpirit:
return "howling spirit"
case HistoricalEventHfRevivedGhost_MoaningSpirit:
return "moaning spirit"
case HistoricalEventHfRevivedGhost_MurderousGhost:
return "murderous ghost"
case HistoricalEventHfRevivedGhost_RestlessHaunt:
return "restless haunt"
case HistoricalEventHfRevivedGhost_SadisticGhost:
return "sadistic ghost"
case HistoricalEventHfRevivedGhost_SecretivePoltergeist:
return "secretive poltergeist"
case HistoricalEventHfRevivedGhost_TroublesomePoltergeist:
return "troublesome poltergeist"
case HistoricalEventHfRevivedGhost_ViolentGhost:
return "violent ghost"
}
return "unknown"
}
func (s HistoricalEventHfRevivedGhost) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfRevived struct {
ActorHfid int `json:"actorHfid" legend:"base"` // actor_hfid
Disturbance bool `json:"disturbance" legend:"base"` // disturbance
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Ghost HistoricalEventHfRevivedGhost `json:"ghost" legend:"base"` // ghost
Hfid int `json:"hfid" legend:"base"` // hfid
RaisedBefore bool `json:"raisedBefore" legend:"base"` // raised_before
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventHfRevived() *HistoricalEventHfRevived {
return &HistoricalEventHfRevived{
ActorHfid: -1,
FeatureLayerId: -1,
Hfid: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfRevived) Type() string { return "hf revived" }
func (x *HistoricalEventHfRevived) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfRevived) RelatedToHf(id int) bool { return x.ActorHfid == id || x.Hfid == id }
func (x *HistoricalEventHfRevived) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfRevived) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfRevived) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfRevived) CheckFields() {
}
func (x *HistoricalEventHfRevived) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ActorHfid != -1 {
d["actorHfid"] = x.ActorHfid
}
d["disturbance"] = x.Disturbance
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Ghost != 0 {
d["ghost"] = x.Ghost
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
d["raisedBefore"] = x.RaisedBefore
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventHfSimpleBattleEventSubtype int
const (
HistoricalEventHfSimpleBattleEventSubtype_Unknown HistoricalEventHfSimpleBattleEventSubtype = iota
HistoricalEventHfSimpleBattleEventSubtype_Ambushed
HistoricalEventHfSimpleBattleEventSubtype_Attacked
HistoricalEventHfSimpleBattleEventSubtype_Confront
HistoricalEventHfSimpleBattleEventSubtype_Corner
HistoricalEventHfSimpleBattleEventSubtype_GotIntoABrawl
HistoricalEventHfSimpleBattleEventSubtype_HappenUpon
HistoricalEventHfSimpleBattleEventSubtype_Scuffle
HistoricalEventHfSimpleBattleEventSubtype_Subdued
HistoricalEventHfSimpleBattleEventSubtype_Surprised
HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterGivingWounds
HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterMutualWounds
HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterReceivingWounds
)
func parseHistoricalEventHfSimpleBattleEventSubtype(s string) HistoricalEventHfSimpleBattleEventSubtype {
switch s {
case "2 lost after giving wounds":
return HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterGivingWounds
case "2 lost after mutual wounds":
return HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterMutualWounds
case "2 lost after receiving wounds":
return HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterReceivingWounds
case "ambushed":
return HistoricalEventHfSimpleBattleEventSubtype_Ambushed
case "attacked":
return HistoricalEventHfSimpleBattleEventSubtype_Attacked
case "confront":
return HistoricalEventHfSimpleBattleEventSubtype_Confront
case "corner":
return HistoricalEventHfSimpleBattleEventSubtype_Corner
case "got into a brawl":
return HistoricalEventHfSimpleBattleEventSubtype_GotIntoABrawl
case "happen upon":
return HistoricalEventHfSimpleBattleEventSubtype_HappenUpon
case "scuffle":
return HistoricalEventHfSimpleBattleEventSubtype_Scuffle
case "subdued":
return HistoricalEventHfSimpleBattleEventSubtype_Subdued
case "surprised":
return HistoricalEventHfSimpleBattleEventSubtype_Surprised
}
return HistoricalEventHfSimpleBattleEventSubtype_Unknown
}
func (s HistoricalEventHfSimpleBattleEventSubtype) String() string {
switch s {
case HistoricalEventHfSimpleBattleEventSubtype_Ambushed:
return "ambushed"
case HistoricalEventHfSimpleBattleEventSubtype_Attacked:
return "attacked"
case HistoricalEventHfSimpleBattleEventSubtype_Confront:
return "confront"
case HistoricalEventHfSimpleBattleEventSubtype_Corner:
return "corner"
case HistoricalEventHfSimpleBattleEventSubtype_GotIntoABrawl:
return "got into a brawl"
case HistoricalEventHfSimpleBattleEventSubtype_HappenUpon:
return "happen upon"
case HistoricalEventHfSimpleBattleEventSubtype_Scuffle:
return "scuffle"
case HistoricalEventHfSimpleBattleEventSubtype_Subdued:
return "subdued"
case HistoricalEventHfSimpleBattleEventSubtype_Surprised:
return "surprised"
case HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterGivingWounds:
return "two lost after giving wounds"
case HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterMutualWounds:
return "two lost after mutual wounds"
case HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterReceivingWounds:
return "two lost after receiving wounds"
}
return "unknown"
}
func (s HistoricalEventHfSimpleBattleEventSubtype) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfSimpleBattleEvent struct {
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
Group1Hfid int `json:"group1Hfid" legend:"base"` // group_1_hfid
Group2Hfid int `json:"group2Hfid" legend:"base"` // group_2_hfid
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
Subtype HistoricalEventHfSimpleBattleEventSubtype `json:"subtype" legend:"base"` // subtype
}
func NewHistoricalEventHfSimpleBattleEvent() *HistoricalEventHfSimpleBattleEvent {
return &HistoricalEventHfSimpleBattleEvent{
FeatureLayerId: -1,
Group1Hfid: -1,
Group2Hfid: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfSimpleBattleEvent) Type() string { return "hf simple battle event" }
func (x *HistoricalEventHfSimpleBattleEvent) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfSimpleBattleEvent) RelatedToHf(id int) bool {
return x.Group1Hfid == id || x.Group2Hfid == id
}
func (x *HistoricalEventHfSimpleBattleEvent) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfSimpleBattleEvent) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfSimpleBattleEvent) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfSimpleBattleEvent) CheckFields() {
}
func (x *HistoricalEventHfSimpleBattleEvent) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.Group1Hfid != -1 {
d["group1Hfid"] = x.Group1Hfid
}
if x.Group2Hfid != -1 {
d["group2Hfid"] = x.Group2Hfid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.Subtype != 0 {
d["subtype"] = x.Subtype
}
return json.Marshal(d)
}
type HistoricalEventHfTravel struct {
Coords string `json:"coords" legend:"base"` // coords
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
GroupHfid []int `json:"groupHfid" legend:"base"` // group_hfid
Return bool `json:"return" legend:"base"` // return
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventHfTravel() *HistoricalEventHfTravel {
return &HistoricalEventHfTravel{
FeatureLayerId: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfTravel) Type() string { return "hf travel" }
func (x *HistoricalEventHfTravel) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfTravel) RelatedToHf(id int) bool { return containsInt(x.GroupHfid, id) }
func (x *HistoricalEventHfTravel) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfTravel) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfTravel) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfTravel) CheckFields() {
}
func (x *HistoricalEventHfTravel) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coords"] = x.Coords
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
d["groupHfid"] = x.GroupHfid
d["return"] = x.Return
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventHfViewedArtifact struct {
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventHfViewedArtifact() *HistoricalEventHfViewedArtifact {
return &HistoricalEventHfViewedArtifact{
ArtifactId: -1,
HistFigId: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventHfViewedArtifact) Type() string { return "hf viewed artifact" }
func (x *HistoricalEventHfViewedArtifact) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfViewedArtifact) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventHfViewedArtifact) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *HistoricalEventHfViewedArtifact) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfViewedArtifact) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHfViewedArtifact) CheckFields() {
}
func (x *HistoricalEventHfViewedArtifact) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.HistFigId != -1 {
d["histFigId"] = x.HistFigId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventHfWoundedInjuryType int
const (
HistoricalEventHfWoundedInjuryType_Unknown HistoricalEventHfWoundedInjuryType = iota
HistoricalEventHfWoundedInjuryType_Rip
HistoricalEventHfWoundedInjuryType_Slash
HistoricalEventHfWoundedInjuryType_Smash
HistoricalEventHfWoundedInjuryType_Stab
)
func parseHistoricalEventHfWoundedInjuryType(s string) HistoricalEventHfWoundedInjuryType {
switch s {
case "rip":
return HistoricalEventHfWoundedInjuryType_Rip
case "slash":
return HistoricalEventHfWoundedInjuryType_Slash
case "smash":
return HistoricalEventHfWoundedInjuryType_Smash
case "stab":
return HistoricalEventHfWoundedInjuryType_Stab
}
return HistoricalEventHfWoundedInjuryType_Unknown
}
func (s HistoricalEventHfWoundedInjuryType) String() string {
switch s {
case HistoricalEventHfWoundedInjuryType_Rip:
return "rip"
case HistoricalEventHfWoundedInjuryType_Slash:
return "slash"
case HistoricalEventHfWoundedInjuryType_Smash:
return "smash"
case HistoricalEventHfWoundedInjuryType_Stab:
return "stab"
}
return "unknown"
}
func (s HistoricalEventHfWoundedInjuryType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfWoundedPartLost int
const (
HistoricalEventHfWoundedPartLost_Unknown HistoricalEventHfWoundedPartLost = iota
HistoricalEventHfWoundedPartLost_False
HistoricalEventHfWoundedPartLost_True
)
func parseHistoricalEventHfWoundedPartLost(s string) HistoricalEventHfWoundedPartLost {
switch s {
case "false":
return HistoricalEventHfWoundedPartLost_False
case "true":
return HistoricalEventHfWoundedPartLost_True
}
return HistoricalEventHfWoundedPartLost_Unknown
}
func (s HistoricalEventHfWoundedPartLost) String() string {
switch s {
case HistoricalEventHfWoundedPartLost_False:
return "false"
case HistoricalEventHfWoundedPartLost_True:
return "true"
}
return "unknown"
}
func (s HistoricalEventHfWoundedPartLost) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfWounded struct {
BodyPart int `json:"bodyPart" legend:"plus"` // body_part
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
InjuryType HistoricalEventHfWoundedInjuryType `json:"injuryType" legend:"plus"` // injury_type
PartLost HistoricalEventHfWoundedPartLost `json:"partLost" legend:"plus"` // part_lost
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
WasTorture bool `json:"wasTorture" legend:"base"` // was_torture
WoundeeCaste int `json:"woundeeCaste" legend:"plus"` // woundee_caste
WoundeeHfid int `json:"woundeeHfid" legend:"base"` // woundee_hfid
WoundeeRace int `json:"woundeeRace" legend:"plus"` // woundee_race
WounderHfid int `json:"wounderHfid" legend:"base"` // wounder_hfid
}
func NewHistoricalEventHfWounded() *HistoricalEventHfWounded {
return &HistoricalEventHfWounded{
BodyPart: -1,
FeatureLayerId: -1,
SiteId: -1,
SubregionId: -1,
WoundeeCaste: -1,
WoundeeHfid: -1,
WoundeeRace: -1,
WounderHfid: -1,
}
}
func (x *HistoricalEventHfWounded) Type() string { return "hf wounded" }
func (x *HistoricalEventHfWounded) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHfWounded) RelatedToHf(id int) bool {
return x.WoundeeHfid == id || x.WounderHfid == id
}
func (x *HistoricalEventHfWounded) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfWounded) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHfWounded) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventHfWounded) CheckFields() {
if x.BodyPart != x.FeatureLayerId {
sameFields["HistoricalEventHfWounded"]["BodyPart"]["FeatureLayerId"] = false
}
if x.BodyPart != x.SiteId {
sameFields["HistoricalEventHfWounded"]["BodyPart"]["SiteId"] = false
}
if x.BodyPart != x.SubregionId {
sameFields["HistoricalEventHfWounded"]["BodyPart"]["SubregionId"] = false
}
if x.BodyPart != x.WoundeeHfid {
sameFields["HistoricalEventHfWounded"]["BodyPart"]["WoundeeHfid"] = false
}
if x.BodyPart != x.WounderHfid {
sameFields["HistoricalEventHfWounded"]["BodyPart"]["WounderHfid"] = false
}
if x.WoundeeCaste != x.FeatureLayerId {
sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["FeatureLayerId"] = false
}
if x.WoundeeCaste != x.SiteId {
sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["SiteId"] = false
}
if x.WoundeeCaste != x.SubregionId {
sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["SubregionId"] = false
}
if x.WoundeeCaste != x.WoundeeHfid {
sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["WoundeeHfid"] = false
}
if x.WoundeeCaste != x.WounderHfid {
sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["WounderHfid"] = false
}
if x.WoundeeRace != x.FeatureLayerId {
sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["FeatureLayerId"] = false
}
if x.WoundeeRace != x.SiteId {
sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["SiteId"] = false
}
if x.WoundeeRace != x.SubregionId {
sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["SubregionId"] = false
}
if x.WoundeeRace != x.WoundeeHfid {
sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["WoundeeHfid"] = false
}
if x.WoundeeRace != x.WounderHfid {
sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["WounderHfid"] = false
}
}
func (x *HistoricalEventHfWounded) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.BodyPart != -1 {
d["bodyPart"] = x.BodyPart
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.InjuryType != 0 {
d["injuryType"] = x.InjuryType
}
if x.PartLost != 0 {
d["partLost"] = x.PartLost
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
d["wasTorture"] = x.WasTorture
if x.WoundeeCaste != -1 {
d["woundeeCaste"] = x.WoundeeCaste
}
if x.WoundeeHfid != -1 {
d["woundeeHfid"] = x.WoundeeHfid
}
if x.WoundeeRace != -1 {
d["woundeeRace"] = x.WoundeeRace
}
if x.WounderHfid != -1 {
d["wounderHfid"] = x.WounderHfid
}
return json.Marshal(d)
}
type HistoricalEventHfsFormedIntrigueRelationshipAction int
const (
HistoricalEventHfsFormedIntrigueRelationshipAction_Unknown HistoricalEventHfsFormedIntrigueRelationshipAction = iota
HistoricalEventHfsFormedIntrigueRelationshipAction_BringIntoNetwork
HistoricalEventHfsFormedIntrigueRelationshipAction_CorruptInPlace
)
func parseHistoricalEventHfsFormedIntrigueRelationshipAction(s string) HistoricalEventHfsFormedIntrigueRelationshipAction {
switch s {
case "bring into network":
return HistoricalEventHfsFormedIntrigueRelationshipAction_BringIntoNetwork
case "corrupt in place":
return HistoricalEventHfsFormedIntrigueRelationshipAction_CorruptInPlace
}
return HistoricalEventHfsFormedIntrigueRelationshipAction_Unknown
}
func (s HistoricalEventHfsFormedIntrigueRelationshipAction) String() string {
switch s {
case HistoricalEventHfsFormedIntrigueRelationshipAction_BringIntoNetwork:
return "bring into network"
case HistoricalEventHfsFormedIntrigueRelationshipAction_CorruptInPlace:
return "corrupt in place"
}
return "unknown"
}
func (s HistoricalEventHfsFormedIntrigueRelationshipAction) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfsFormedIntrigueRelationshipCircumstance int
const (
HistoricalEventHfsFormedIntrigueRelationshipCircumstance_Unknown HistoricalEventHfsFormedIntrigueRelationshipCircumstance = iota
HistoricalEventHfsFormedIntrigueRelationshipCircumstance_IsEntitySubordinate
)
func parseHistoricalEventHfsFormedIntrigueRelationshipCircumstance(s string) HistoricalEventHfsFormedIntrigueRelationshipCircumstance {
switch s {
case "is entity subordinate":
return HistoricalEventHfsFormedIntrigueRelationshipCircumstance_IsEntitySubordinate
}
return HistoricalEventHfsFormedIntrigueRelationshipCircumstance_Unknown
}
func (s HistoricalEventHfsFormedIntrigueRelationshipCircumstance) String() string {
switch s {
case HistoricalEventHfsFormedIntrigueRelationshipCircumstance_IsEntitySubordinate:
return "is entity subordinate"
}
return "unknown"
}
func (s HistoricalEventHfsFormedIntrigueRelationshipCircumstance) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs int
const (
HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Unknown HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs = iota
HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Master
HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_PossiblyUnknownDirector
)
func parseHistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs(s string) HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs {
switch s {
case "master":
return HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Master
case "possibly unknown director":
return HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_PossiblyUnknownDirector
}
return HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Unknown
}
func (s HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs) String() string {
switch s {
case HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Master:
return "master"
case HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_PossiblyUnknownDirector:
return "possibly unknown director"
}
return "unknown"
}
func (s HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfsFormedIntrigueRelationshipMethod int
const (
HistoricalEventHfsFormedIntrigueRelationshipMethod_Unknown HistoricalEventHfsFormedIntrigueRelationshipMethod = iota
HistoricalEventHfsFormedIntrigueRelationshipMethod_BlackmailOverEmbezzlement
HistoricalEventHfsFormedIntrigueRelationshipMethod_Bribe
HistoricalEventHfsFormedIntrigueRelationshipMethod_Flatter
HistoricalEventHfsFormedIntrigueRelationshipMethod_Intimidate
HistoricalEventHfsFormedIntrigueRelationshipMethod_OfferImmortality
HistoricalEventHfsFormedIntrigueRelationshipMethod_Precedence
HistoricalEventHfsFormedIntrigueRelationshipMethod_ReligiousSympathy
HistoricalEventHfsFormedIntrigueRelationshipMethod_RevengeOnGrudge
)
func parseHistoricalEventHfsFormedIntrigueRelationshipMethod(s string) HistoricalEventHfsFormedIntrigueRelationshipMethod {
switch s {
case "blackmail over embezzlement":
return HistoricalEventHfsFormedIntrigueRelationshipMethod_BlackmailOverEmbezzlement
case "bribe":
return HistoricalEventHfsFormedIntrigueRelationshipMethod_Bribe
case "flatter":
return HistoricalEventHfsFormedIntrigueRelationshipMethod_Flatter
case "intimidate":
return HistoricalEventHfsFormedIntrigueRelationshipMethod_Intimidate
case "offer immortality":
return HistoricalEventHfsFormedIntrigueRelationshipMethod_OfferImmortality
case "precedence":
return HistoricalEventHfsFormedIntrigueRelationshipMethod_Precedence
case "religious sympathy":
return HistoricalEventHfsFormedIntrigueRelationshipMethod_ReligiousSympathy
case "revenge on grudge":
return HistoricalEventHfsFormedIntrigueRelationshipMethod_RevengeOnGrudge
}
return HistoricalEventHfsFormedIntrigueRelationshipMethod_Unknown
}
func (s HistoricalEventHfsFormedIntrigueRelationshipMethod) String() string {
switch s {
case HistoricalEventHfsFormedIntrigueRelationshipMethod_BlackmailOverEmbezzlement:
return "blackmail over embezzlement"
case HistoricalEventHfsFormedIntrigueRelationshipMethod_Bribe:
return "bribe"
case HistoricalEventHfsFormedIntrigueRelationshipMethod_Flatter:
return "flatter"
case HistoricalEventHfsFormedIntrigueRelationshipMethod_Intimidate:
return "intimidate"
case HistoricalEventHfsFormedIntrigueRelationshipMethod_OfferImmortality:
return "offer immortality"
case HistoricalEventHfsFormedIntrigueRelationshipMethod_Precedence:
return "precedence"
case HistoricalEventHfsFormedIntrigueRelationshipMethod_ReligiousSympathy:
return "religious sympathy"
case HistoricalEventHfsFormedIntrigueRelationshipMethod_RevengeOnGrudge:
return "revenge on grudge"
}
return "unknown"
}
func (s HistoricalEventHfsFormedIntrigueRelationshipMethod) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs int
const (
HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_Unknown HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs = iota
HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_CompromisedPositionHolder
HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_GeneralPurposeAsset
)
func parseHistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs(s string) HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs {
switch s {
case "compromised position holder":
return HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_CompromisedPositionHolder
case "general purpose asset":
return HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_GeneralPurposeAsset
}
return HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_Unknown
}
func (s HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs) String() string {
switch s {
case HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_CompromisedPositionHolder:
return "compromised position holder"
case HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_GeneralPurposeAsset:
return "general purpose asset"
}
return "unknown"
}
func (s HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfsFormedIntrigueRelationshipTopFacet int
const (
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Unknown HistoricalEventHfsFormedIntrigueRelationshipTopFacet = iota
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Ambition
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_AnxietyPropensity
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Confidence
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_EnvyPropensity
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Fearlessness
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Greed
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Hope
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Pride
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_StressVulnerability
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Swayable
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vanity
HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vengeful
)
func parseHistoricalEventHfsFormedIntrigueRelationshipTopFacet(s string) HistoricalEventHfsFormedIntrigueRelationshipTopFacet {
switch s {
case "ambition":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Ambition
case "anxiety propensity":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_AnxietyPropensity
case "confidence":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Confidence
case "envy propensity":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_EnvyPropensity
case "fearlessness":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Fearlessness
case "greed":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Greed
case "hope":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Hope
case "pride":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Pride
case "stress vulnerability":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_StressVulnerability
case "swayable":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Swayable
case "vanity":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vanity
case "vengeful":
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vengeful
}
return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Unknown
}
func (s HistoricalEventHfsFormedIntrigueRelationshipTopFacet) String() string {
switch s {
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Ambition:
return "ambition"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_AnxietyPropensity:
return "anxiety propensity"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Confidence:
return "confidence"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_EnvyPropensity:
return "envy propensity"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Fearlessness:
return "fearlessness"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Greed:
return "greed"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Hope:
return "hope"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Pride:
return "pride"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_StressVulnerability:
return "stress vulnerability"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Swayable:
return "swayable"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vanity:
return "vanity"
case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vengeful:
return "vengeful"
}
return "unknown"
}
func (s HistoricalEventHfsFormedIntrigueRelationshipTopFacet) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor int
const (
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Unknown HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor = iota
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Fear
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Love
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Loyalty
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Respect
HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Trust
)
func parseHistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor(s string) HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor {
switch s {
case "fear":
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Fear
case "love":
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Love
case "loyalty":
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Loyalty
case "respect":
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Respect
case "trust":
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Trust
}
return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Unknown
}
func (s HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor) String() string {
switch s {
case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Fear:
return "fear"
case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Love:
return "love"
case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Loyalty:
return "loyalty"
case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Respect:
return "respect"
case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Trust:
return "trust"
}
return "unknown"
}
func (s HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfsFormedIntrigueRelationshipTopValue int
const (
HistoricalEventHfsFormedIntrigueRelationshipTopValue_Unknown HistoricalEventHfsFormedIntrigueRelationshipTopValue = iota
HistoricalEventHfsFormedIntrigueRelationshipTopValue_Law
HistoricalEventHfsFormedIntrigueRelationshipTopValue_Power
)
func parseHistoricalEventHfsFormedIntrigueRelationshipTopValue(s string) HistoricalEventHfsFormedIntrigueRelationshipTopValue {
switch s {
case "law":
return HistoricalEventHfsFormedIntrigueRelationshipTopValue_Law
case "power":
return HistoricalEventHfsFormedIntrigueRelationshipTopValue_Power
}
return HistoricalEventHfsFormedIntrigueRelationshipTopValue_Unknown
}
func (s HistoricalEventHfsFormedIntrigueRelationshipTopValue) String() string {
switch s {
case HistoricalEventHfsFormedIntrigueRelationshipTopValue_Law:
return "law"
case HistoricalEventHfsFormedIntrigueRelationshipTopValue_Power:
return "power"
}
return "unknown"
}
func (s HistoricalEventHfsFormedIntrigueRelationshipTopValue) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfsFormedIntrigueRelationship struct {
Action HistoricalEventHfsFormedIntrigueRelationshipAction `json:"action" legend:"base"` // action
AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` // ally_defense_bonus
Circumstance HistoricalEventHfsFormedIntrigueRelationshipCircumstance `json:"circumstance" legend:"base"` // circumstance
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` // coconspirator_bonus
CorruptorHfid int `json:"corruptorHfid" legend:"base"` // corruptor_hfid
CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` // corruptor_identity
CorruptorSeenAs HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs `json:"corruptorSeenAs" legend:"base"` // corruptor_seen_as
FailedJudgmentTest bool `json:"failedJudgmentTest" legend:"base"` // failed_judgment_test
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
LureHfid int `json:"lureHfid" legend:"base"` // lure_hfid
Method HistoricalEventHfsFormedIntrigueRelationshipMethod `json:"method" legend:"base"` // method
RelevantEntityId int `json:"relevantEntityId" legend:"base"` // relevant_entity_id
RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` // relevant_id_for_method
RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` // relevant_position_profile_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
Successful bool `json:"successful" legend:"base"` // successful
TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid
TargetIdentity int `json:"targetIdentity" legend:"base"` // target_identity
TargetSeenAs HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs `json:"targetSeenAs" legend:"base"` // target_seen_as
TopFacet HistoricalEventHfsFormedIntrigueRelationshipTopFacet `json:"topFacet" legend:"base"` // top_facet
TopFacetModifier int `json:"topFacetModifier" legend:"base"` // top_facet_modifier
TopFacetRating int `json:"topFacetRating" legend:"base"` // top_facet_rating
TopRelationshipFactor HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor `json:"topRelationshipFactor" legend:"base"` // top_relationship_factor
TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` // top_relationship_modifier
TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` // top_relationship_rating
TopValue HistoricalEventHfsFormedIntrigueRelationshipTopValue `json:"topValue" legend:"base"` // top_value
TopValueModifier int `json:"topValueModifier" legend:"base"` // top_value_modifier
TopValueRating int `json:"topValueRating" legend:"base"` // top_value_rating
}
func NewHistoricalEventHfsFormedIntrigueRelationship() *HistoricalEventHfsFormedIntrigueRelationship {
return &HistoricalEventHfsFormedIntrigueRelationship{
AllyDefenseBonus: -1,
CircumstanceId: -1,
CoconspiratorBonus: -1,
CorruptorHfid: -1,
CorruptorIdentity: -1,
FeatureLayerId: -1,
LureHfid: -1,
RelevantEntityId: -1,
RelevantIdForMethod: -1,
RelevantPositionProfileId: -1,
SiteId: -1,
SubregionId: -1,
TargetHfid: -1,
TargetIdentity: -1,
TopFacetModifier: -1,
TopFacetRating: -1,
TopRelationshipModifier: -1,
TopRelationshipRating: -1,
TopValueModifier: -1,
TopValueRating: -1,
}
}
func (x *HistoricalEventHfsFormedIntrigueRelationship) Type() string {
return "hfs formed intrigue relationship"
}
func (x *HistoricalEventHfsFormedIntrigueRelationship) RelatedToEntity(id int) bool {
return x.CorruptorIdentity == id || x.RelevantEntityId == id || x.TargetIdentity == id
}
func (x *HistoricalEventHfsFormedIntrigueRelationship) RelatedToHf(id int) bool {
return x.CorruptorHfid == id || x.LureHfid == id || x.TargetHfid == id
}
func (x *HistoricalEventHfsFormedIntrigueRelationship) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfsFormedIntrigueRelationship) RelatedToSite(id int) bool {
return x.SiteId == id
}
func (x *HistoricalEventHfsFormedIntrigueRelationship) RelatedToRegion(id int) bool {
return x.SubregionId == id
}
func (x *HistoricalEventHfsFormedIntrigueRelationship) CheckFields() {
}
func (x *HistoricalEventHfsFormedIntrigueRelationship) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Action != 0 {
d["action"] = x.Action
}
if x.AllyDefenseBonus != -1 {
d["allyDefenseBonus"] = x.AllyDefenseBonus
}
if x.Circumstance != 0 {
d["circumstance"] = x.Circumstance
}
if x.CircumstanceId != -1 {
d["circumstanceId"] = x.CircumstanceId
}
if x.CoconspiratorBonus != -1 {
d["coconspiratorBonus"] = x.CoconspiratorBonus
}
if x.CorruptorHfid != -1 {
d["corruptorHfid"] = x.CorruptorHfid
}
if x.CorruptorIdentity != -1 {
d["corruptorIdentity"] = x.CorruptorIdentity
}
if x.CorruptorSeenAs != 0 {
d["corruptorSeenAs"] = x.CorruptorSeenAs
}
d["failedJudgmentTest"] = x.FailedJudgmentTest
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.LureHfid != -1 {
d["lureHfid"] = x.LureHfid
}
if x.Method != 0 {
d["method"] = x.Method
}
if x.RelevantEntityId != -1 {
d["relevantEntityId"] = x.RelevantEntityId
}
if x.RelevantIdForMethod != -1 {
d["relevantIdForMethod"] = x.RelevantIdForMethod
}
if x.RelevantPositionProfileId != -1 {
d["relevantPositionProfileId"] = x.RelevantPositionProfileId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
d["successful"] = x.Successful
if x.TargetHfid != -1 {
d["targetHfid"] = x.TargetHfid
}
if x.TargetIdentity != -1 {
d["targetIdentity"] = x.TargetIdentity
}
if x.TargetSeenAs != 0 {
d["targetSeenAs"] = x.TargetSeenAs
}
if x.TopFacet != 0 {
d["topFacet"] = x.TopFacet
}
if x.TopFacetModifier != -1 {
d["topFacetModifier"] = x.TopFacetModifier
}
if x.TopFacetRating != -1 {
d["topFacetRating"] = x.TopFacetRating
}
if x.TopRelationshipFactor != 0 {
d["topRelationshipFactor"] = x.TopRelationshipFactor
}
if x.TopRelationshipModifier != -1 {
d["topRelationshipModifier"] = x.TopRelationshipModifier
}
if x.TopRelationshipRating != -1 {
d["topRelationshipRating"] = x.TopRelationshipRating
}
if x.TopValue != 0 {
d["topValue"] = x.TopValue
}
if x.TopValueModifier != -1 {
d["topValueModifier"] = x.TopValueModifier
}
if x.TopValueRating != -1 {
d["topValueRating"] = x.TopValueRating
}
return json.Marshal(d)
}
type HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 int
const (
HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_Unknown HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 = iota
HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_InformationSource
)
func parseHistoricalEventHfsFormedReputationRelationshipHfRep1Of2(s string) HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 {
switch s {
case "information source":
return HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_InformationSource
}
return HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_Unknown
}
func (s HistoricalEventHfsFormedReputationRelationshipHfRep1Of2) String() string {
switch s {
case HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_InformationSource:
return "information source"
}
return "unknown"
}
func (s HistoricalEventHfsFormedReputationRelationshipHfRep1Of2) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 int
const (
HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Unknown HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 = iota
HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Friendly
HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_InformationSource
)
func parseHistoricalEventHfsFormedReputationRelationshipHfRep2Of1(s string) HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 {
switch s {
case "friendly":
return HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Friendly
case "information source":
return HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_InformationSource
}
return HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Unknown
}
func (s HistoricalEventHfsFormedReputationRelationshipHfRep2Of1) String() string {
switch s {
case HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Friendly:
return "friendly"
case HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_InformationSource:
return "information source"
}
return "unknown"
}
func (s HistoricalEventHfsFormedReputationRelationshipHfRep2Of1) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventHfsFormedReputationRelationship struct {
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
HfRep1Of2 HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 `json:"hfRep1Of2" legend:"base"` // hf_rep_1_of_2
HfRep2Of1 HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 `json:"hfRep2Of1" legend:"base"` // hf_rep_2_of_1
Hfid1 int `json:"hfid1" legend:"base"` // hfid1
Hfid2 int `json:"hfid2" legend:"base"` // hfid2
IdentityId1 int `json:"identityId1" legend:"base"` // identity_id1
IdentityId2 int `json:"identityId2" legend:"base"` // identity_id2
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventHfsFormedReputationRelationship() *HistoricalEventHfsFormedReputationRelationship {
return &HistoricalEventHfsFormedReputationRelationship{
FeatureLayerId: -1,
Hfid1: -1,
Hfid2: -1,
IdentityId1: -1,
IdentityId2: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventHfsFormedReputationRelationship) Type() string {
return "hfs formed reputation relationship"
}
func (x *HistoricalEventHfsFormedReputationRelationship) RelatedToEntity(id int) bool {
return x.IdentityId1 == id || x.IdentityId2 == id
}
func (x *HistoricalEventHfsFormedReputationRelationship) RelatedToHf(id int) bool {
return x.Hfid1 == id || x.Hfid2 == id
}
func (x *HistoricalEventHfsFormedReputationRelationship) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHfsFormedReputationRelationship) RelatedToSite(id int) bool {
return x.SiteId == id
}
func (x *HistoricalEventHfsFormedReputationRelationship) RelatedToRegion(id int) bool {
return x.SubregionId == id
}
func (x *HistoricalEventHfsFormedReputationRelationship) CheckFields() {
}
func (x *HistoricalEventHfsFormedReputationRelationship) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.HfRep1Of2 != 0 {
d["hfRep1Of2"] = x.HfRep1Of2
}
if x.HfRep2Of1 != 0 {
d["hfRep2Of1"] = x.HfRep2Of1
}
if x.Hfid1 != -1 {
d["hfid1"] = x.Hfid1
}
if x.Hfid2 != -1 {
d["hfid2"] = x.Hfid2
}
if x.IdentityId1 != -1 {
d["identityId1"] = x.IdentityId1
}
if x.IdentityId2 != -1 {
d["identityId2"] = x.IdentityId2
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventHolyCityDeclaration struct {
ReligionId int `json:"religionId" legend:"base"` // religion_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventHolyCityDeclaration() *HistoricalEventHolyCityDeclaration {
return &HistoricalEventHolyCityDeclaration{
ReligionId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventHolyCityDeclaration) Type() string { return "holy city declaration" }
func (x *HistoricalEventHolyCityDeclaration) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventHolyCityDeclaration) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventHolyCityDeclaration) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventHolyCityDeclaration) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventHolyCityDeclaration) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventHolyCityDeclaration) CheckFields() {
}
func (x *HistoricalEventHolyCityDeclaration) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ReligionId != -1 {
d["religionId"] = x.ReligionId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventInsurrectionStartedOutcome int
const (
HistoricalEventInsurrectionStartedOutcome_Unknown HistoricalEventInsurrectionStartedOutcome = iota
HistoricalEventInsurrectionStartedOutcome_LeadershipOverthrown
HistoricalEventInsurrectionStartedOutcome_PopulationGone
)
func parseHistoricalEventInsurrectionStartedOutcome(s string) HistoricalEventInsurrectionStartedOutcome {
switch s {
case "leadership overthrown":
return HistoricalEventInsurrectionStartedOutcome_LeadershipOverthrown
case "population gone":
return HistoricalEventInsurrectionStartedOutcome_PopulationGone
}
return HistoricalEventInsurrectionStartedOutcome_Unknown
}
func (s HistoricalEventInsurrectionStartedOutcome) String() string {
switch s {
case HistoricalEventInsurrectionStartedOutcome_LeadershipOverthrown:
return "leadership overthrown"
case HistoricalEventInsurrectionStartedOutcome_PopulationGone:
return "population gone"
}
return "unknown"
}
func (s HistoricalEventInsurrectionStartedOutcome) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventInsurrectionStarted struct {
Outcome HistoricalEventInsurrectionStartedOutcome `json:"outcome" legend:"base"` // outcome
SiteId int `json:"siteId" legend:"base"` // site_id
TargetCivId int `json:"targetCivId" legend:"base"` // target_civ_id
}
func NewHistoricalEventInsurrectionStarted() *HistoricalEventInsurrectionStarted {
return &HistoricalEventInsurrectionStarted{
SiteId: -1,
TargetCivId: -1,
}
}
func (x *HistoricalEventInsurrectionStarted) Type() string { return "insurrection started" }
func (x *HistoricalEventInsurrectionStarted) RelatedToEntity(id int) bool { return x.TargetCivId == id }
func (x *HistoricalEventInsurrectionStarted) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventInsurrectionStarted) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventInsurrectionStarted) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventInsurrectionStarted) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventInsurrectionStarted) CheckFields() {
}
func (x *HistoricalEventInsurrectionStarted) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Outcome != 0 {
d["outcome"] = x.Outcome
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.TargetCivId != -1 {
d["targetCivId"] = x.TargetCivId
}
return json.Marshal(d)
}
type HistoricalEventItemStolenTheftMethod int
const (
HistoricalEventItemStolenTheftMethod_Unknown HistoricalEventItemStolenTheftMethod = iota
HistoricalEventItemStolenTheftMethod_Confiscated
HistoricalEventItemStolenTheftMethod_Looted
HistoricalEventItemStolenTheftMethod_Recovered
HistoricalEventItemStolenTheftMethod_Theft
)
func parseHistoricalEventItemStolenTheftMethod(s string) HistoricalEventItemStolenTheftMethod {
switch s {
case "confiscated":
return HistoricalEventItemStolenTheftMethod_Confiscated
case "looted":
return HistoricalEventItemStolenTheftMethod_Looted
case "recovered":
return HistoricalEventItemStolenTheftMethod_Recovered
case "theft":
return HistoricalEventItemStolenTheftMethod_Theft
}
return HistoricalEventItemStolenTheftMethod_Unknown
}
func (s HistoricalEventItemStolenTheftMethod) String() string {
switch s {
case HistoricalEventItemStolenTheftMethod_Confiscated:
return "confiscated"
case HistoricalEventItemStolenTheftMethod_Looted:
return "looted"
case HistoricalEventItemStolenTheftMethod_Recovered:
return "recovered"
case HistoricalEventItemStolenTheftMethod_Theft:
return "theft"
}
return "unknown"
}
func (s HistoricalEventItemStolenTheftMethod) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventItemStolen struct {
Circumstance *HistoricalEventItemStolenCircumstance `json:"circumstance" legend:"both"` // circumstance
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
Entity int `json:"entity" legend:"plus"` // entity
Histfig int `json:"histfig" legend:"plus"` // histfig
Item int `json:"item" legend:"plus"` // item
ItemSubtype string `json:"itemSubtype" legend:"plus"` // item_subtype
ItemType string `json:"itemType" legend:"plus"` // item_type
Mat string `json:"mat" legend:"plus"` // mat
Matindex int `json:"matindex" legend:"plus"` // matindex
Mattype int `json:"mattype" legend:"plus"` // mattype
Site int `json:"site" legend:"plus"` // site
StashSite int `json:"stashSite" legend:"plus"` // stash_site
Structure int `json:"structure" legend:"plus"` // structure
TheftMethod HistoricalEventItemStolenTheftMethod `json:"theftMethod" legend:"plus"` // theft_method
}
func NewHistoricalEventItemStolen() *HistoricalEventItemStolen {
return &HistoricalEventItemStolen{
CircumstanceId: -1,
Entity: -1,
Histfig: -1,
Item: -1,
Matindex: -1,
Mattype: -1,
Site: -1,
StashSite: -1,
Structure: -1,
}
}
func (x *HistoricalEventItemStolen) Type() string { return "item stolen" }
func (x *HistoricalEventItemStolen) RelatedToEntity(id int) bool { return x.Entity == id }
func (x *HistoricalEventItemStolen) RelatedToHf(id int) bool { return x.Histfig == id }
func (x *HistoricalEventItemStolen) RelatedToArtifact(id int) bool { return x.Item == id }
func (x *HistoricalEventItemStolen) RelatedToSite(id int) bool {
return x.Site == id || x.StashSite == id
}
func (x *HistoricalEventItemStolen) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventItemStolen) CheckFields() {
if x.Entity != x.CircumstanceId {
sameFields["HistoricalEventItemStolen"]["Entity"]["CircumstanceId"] = false
}
if x.Histfig != x.CircumstanceId {
sameFields["HistoricalEventItemStolen"]["Histfig"]["CircumstanceId"] = false
}
if x.Item != x.CircumstanceId {
sameFields["HistoricalEventItemStolen"]["Item"]["CircumstanceId"] = false
}
if x.Matindex != x.CircumstanceId {
sameFields["HistoricalEventItemStolen"]["Matindex"]["CircumstanceId"] = false
}
if x.Mattype != x.CircumstanceId {
sameFields["HistoricalEventItemStolen"]["Mattype"]["CircumstanceId"] = false
}
if x.Site != x.CircumstanceId {
sameFields["HistoricalEventItemStolen"]["Site"]["CircumstanceId"] = false
}
if x.StashSite != x.CircumstanceId {
sameFields["HistoricalEventItemStolen"]["StashSite"]["CircumstanceId"] = false
}
if x.Structure != x.CircumstanceId {
sameFields["HistoricalEventItemStolen"]["Structure"]["CircumstanceId"] = false
}
}
func (x *HistoricalEventItemStolen) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["circumstance"] = x.Circumstance
if x.CircumstanceId != -1 {
d["circumstanceId"] = x.CircumstanceId
}
if x.Entity != -1 {
d["entity"] = x.Entity
}
if x.Histfig != -1 {
d["histfig"] = x.Histfig
}
if x.Item != -1 {
d["item"] = x.Item
}
d["itemSubtype"] = x.ItemSubtype
d["itemType"] = x.ItemType
d["mat"] = x.Mat
if x.Matindex != -1 {
d["matindex"] = x.Matindex
}
if x.Mattype != -1 {
d["mattype"] = x.Mattype
}
if x.Site != -1 {
d["site"] = x.Site
}
if x.StashSite != -1 {
d["stashSite"] = x.StashSite
}
if x.Structure != -1 {
d["structure"] = x.Structure
}
if x.TheftMethod != 0 {
d["theftMethod"] = x.TheftMethod
}
return json.Marshal(d)
}
type HistoricalEventItemStolenCircumstanceType int
const (
HistoricalEventItemStolenCircumstanceType_Unknown HistoricalEventItemStolenCircumstanceType = iota
HistoricalEventItemStolenCircumstanceType_Defeated
HistoricalEventItemStolenCircumstanceType_Histeventcollection
HistoricalEventItemStolenCircumstanceType_Murdered
)
func parseHistoricalEventItemStolenCircumstanceType(s string) HistoricalEventItemStolenCircumstanceType {
switch s {
case "defeated":
return HistoricalEventItemStolenCircumstanceType_Defeated
case "histeventcollection":
return HistoricalEventItemStolenCircumstanceType_Histeventcollection
case "murdered":
return HistoricalEventItemStolenCircumstanceType_Murdered
}
return HistoricalEventItemStolenCircumstanceType_Unknown
}
func (s HistoricalEventItemStolenCircumstanceType) String() string {
switch s {
case HistoricalEventItemStolenCircumstanceType_Defeated:
return "defeated"
case HistoricalEventItemStolenCircumstanceType_Histeventcollection:
return "histeventcollection"
case HistoricalEventItemStolenCircumstanceType_Murdered:
return "murdered"
}
return "unknown"
}
func (s HistoricalEventItemStolenCircumstanceType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventItemStolenCircumstance struct {
Defeated int `json:"defeated" legend:"plus"` // defeated
HistEventCollection int `json:"histEventCollection" legend:"plus"` // hist_event_collection
Murdered int `json:"murdered" legend:"plus"` // murdered
Type_ HistoricalEventItemStolenCircumstanceType `json:"type" legend:"plus"` // type
}
func NewHistoricalEventItemStolenCircumstance() *HistoricalEventItemStolenCircumstance {
return &HistoricalEventItemStolenCircumstance{
Defeated: -1,
HistEventCollection: -1,
Murdered: -1,
}
}
func (x *HistoricalEventItemStolenCircumstance) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventItemStolenCircumstance) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventItemStolenCircumstance) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventItemStolenCircumstance) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventItemStolenCircumstance) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventItemStolenCircumstance) CheckFields() {
}
func (x *HistoricalEventItemStolenCircumstance) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Defeated != -1 {
d["defeated"] = x.Defeated
}
if x.HistEventCollection != -1 {
d["histEventCollection"] = x.HistEventCollection
}
if x.Murdered != -1 {
d["murdered"] = x.Murdered
}
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type HistoricalEventKnowledgeDiscovered struct {
First bool `json:"first" legend:"base"` // first
Hfid int `json:"hfid" legend:"base"` // hfid
Knowledge string `json:"knowledge" legend:"base"` // knowledge
}
func NewHistoricalEventKnowledgeDiscovered() *HistoricalEventKnowledgeDiscovered {
return &HistoricalEventKnowledgeDiscovered{
Hfid: -1,
}
}
func (x *HistoricalEventKnowledgeDiscovered) Type() string { return "knowledge discovered" }
func (x *HistoricalEventKnowledgeDiscovered) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventKnowledgeDiscovered) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventKnowledgeDiscovered) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventKnowledgeDiscovered) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventKnowledgeDiscovered) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventKnowledgeDiscovered) CheckFields() {
}
func (x *HistoricalEventKnowledgeDiscovered) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["first"] = x.First
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
d["knowledge"] = x.Knowledge
return json.Marshal(d)
}
type HistoricalEventMasterpieceArchConstructedBuildingSubtype int
const (
HistoricalEventMasterpieceArchConstructedBuildingSubtype_Unknown HistoricalEventMasterpieceArchConstructedBuildingSubtype = iota
HistoricalEventMasterpieceArchConstructedBuildingSubtype_Magmasmelter
HistoricalEventMasterpieceArchConstructedBuildingSubtype_Smelter
HistoricalEventMasterpieceArchConstructedBuildingSubtype_Woodfurnace
)
func parseHistoricalEventMasterpieceArchConstructedBuildingSubtype(s string) HistoricalEventMasterpieceArchConstructedBuildingSubtype {
switch s {
case "magmasmelter":
return HistoricalEventMasterpieceArchConstructedBuildingSubtype_Magmasmelter
case "smelter":
return HistoricalEventMasterpieceArchConstructedBuildingSubtype_Smelter
case "woodfurnace":
return HistoricalEventMasterpieceArchConstructedBuildingSubtype_Woodfurnace
}
return HistoricalEventMasterpieceArchConstructedBuildingSubtype_Unknown
}
func (s HistoricalEventMasterpieceArchConstructedBuildingSubtype) String() string {
switch s {
case HistoricalEventMasterpieceArchConstructedBuildingSubtype_Magmasmelter:
return "magmasmelter"
case HistoricalEventMasterpieceArchConstructedBuildingSubtype_Smelter:
return "smelter"
case HistoricalEventMasterpieceArchConstructedBuildingSubtype_Woodfurnace:
return "woodfurnace"
}
return "unknown"
}
func (s HistoricalEventMasterpieceArchConstructedBuildingSubtype) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceArchConstructedBuildingType int
const (
HistoricalEventMasterpieceArchConstructedBuildingType_Unknown HistoricalEventMasterpieceArchConstructedBuildingType = iota
HistoricalEventMasterpieceArchConstructedBuildingType_Bridge
HistoricalEventMasterpieceArchConstructedBuildingType_Furnace
HistoricalEventMasterpieceArchConstructedBuildingType_Screwpump
HistoricalEventMasterpieceArchConstructedBuildingType_Tradedepot
HistoricalEventMasterpieceArchConstructedBuildingType_Waterwheel
HistoricalEventMasterpieceArchConstructedBuildingType_Well
)
func parseHistoricalEventMasterpieceArchConstructedBuildingType(s string) HistoricalEventMasterpieceArchConstructedBuildingType {
switch s {
case "bridge":
return HistoricalEventMasterpieceArchConstructedBuildingType_Bridge
case "furnace":
return HistoricalEventMasterpieceArchConstructedBuildingType_Furnace
case "screwpump":
return HistoricalEventMasterpieceArchConstructedBuildingType_Screwpump
case "tradedepot":
return HistoricalEventMasterpieceArchConstructedBuildingType_Tradedepot
case "waterwheel":
return HistoricalEventMasterpieceArchConstructedBuildingType_Waterwheel
case "well":
return HistoricalEventMasterpieceArchConstructedBuildingType_Well
}
return HistoricalEventMasterpieceArchConstructedBuildingType_Unknown
}
func (s HistoricalEventMasterpieceArchConstructedBuildingType) String() string {
switch s {
case HistoricalEventMasterpieceArchConstructedBuildingType_Bridge:
return "bridge"
case HistoricalEventMasterpieceArchConstructedBuildingType_Furnace:
return "furnace"
case HistoricalEventMasterpieceArchConstructedBuildingType_Screwpump:
return "screwpump"
case HistoricalEventMasterpieceArchConstructedBuildingType_Tradedepot:
return "tradedepot"
case HistoricalEventMasterpieceArchConstructedBuildingType_Waterwheel:
return "waterwheel"
case HistoricalEventMasterpieceArchConstructedBuildingType_Well:
return "well"
}
return "unknown"
}
func (s HistoricalEventMasterpieceArchConstructedBuildingType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceArchConstructedSkillAtTime int
const (
HistoricalEventMasterpieceArchConstructedSkillAtTime_Unknown HistoricalEventMasterpieceArchConstructedSkillAtTime = iota
HistoricalEventMasterpieceArchConstructedSkillAtTime_Accomplished
HistoricalEventMasterpieceArchConstructedSkillAtTime_Expert
HistoricalEventMasterpieceArchConstructedSkillAtTime_Highmaster
HistoricalEventMasterpieceArchConstructedSkillAtTime_Legendary3
HistoricalEventMasterpieceArchConstructedSkillAtTime_Legendary5
HistoricalEventMasterpieceArchConstructedSkillAtTime_Master
HistoricalEventMasterpieceArchConstructedSkillAtTime_Professional
HistoricalEventMasterpieceArchConstructedSkillAtTime_Proficient
HistoricalEventMasterpieceArchConstructedSkillAtTime_Unknown33
HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo1
HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo3
HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo4
HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo5
HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwoTwo
)
func parseHistoricalEventMasterpieceArchConstructedSkillAtTime(s string) HistoricalEventMasterpieceArchConstructedSkillAtTime {
switch s {
case "accomplished":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Accomplished
case "expert":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Expert
case "highmaster":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Highmaster
case "legendary3":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Legendary3
case "legendary5":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Legendary5
case "master":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Master
case "professional":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Professional
case "proficient":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Proficient
case "unknown 21":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo1
case "unknown 22":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwoTwo
case "unknown 23":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo3
case "unknown 24":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo4
case "unknown 25":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo5
case "unknown 33":
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Unknown33
}
return HistoricalEventMasterpieceArchConstructedSkillAtTime_Unknown
}
func (s HistoricalEventMasterpieceArchConstructedSkillAtTime) String() string {
switch s {
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Accomplished:
return "accomplished"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Expert:
return "expert"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Highmaster:
return "highmaster"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Legendary3:
return "legendary 3"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Legendary5:
return "legendary 5"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Master:
return "master"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Professional:
return "professional"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Proficient:
return "proficient"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_Unknown33:
return "unknown 33"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo1:
return "unknown two 1"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo3:
return "unknown two 3"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo4:
return "unknown two 4"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo5:
return "unknown two 5"
case HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwoTwo:
return "unknown two two"
}
return "unknown"
}
func (s HistoricalEventMasterpieceArchConstructedSkillAtTime) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceArchConstructed struct {
BuildingCustom int `json:"buildingCustom" legend:"plus"` // building_custom
BuildingSubtype HistoricalEventMasterpieceArchConstructedBuildingSubtype `json:"buildingSubtype" legend:"plus"` // building_subtype
BuildingType HistoricalEventMasterpieceArchConstructedBuildingType `json:"buildingType" legend:"plus"` // building_type
EntityId int `json:"entityId" legend:"base"` // entity_id
Hfid int `json:"hfid" legend:"base"` // hfid
SiteId int `json:"siteId" legend:"base"` // site_id
SkillAtTime HistoricalEventMasterpieceArchConstructedSkillAtTime `json:"skillAtTime" legend:"both"` // skill_at_time
Unk2 int `json:"unk2" legend:"plus"` // unk_2
}
func NewHistoricalEventMasterpieceArchConstructed() *HistoricalEventMasterpieceArchConstructed {
return &HistoricalEventMasterpieceArchConstructed{
BuildingCustom: -1,
EntityId: -1,
Hfid: -1,
SiteId: -1,
Unk2: -1,
}
}
func (x *HistoricalEventMasterpieceArchConstructed) Type() string {
return "masterpiece arch constructed"
}
func (x *HistoricalEventMasterpieceArchConstructed) RelatedToEntity(id int) bool {
return x.EntityId == id
}
func (x *HistoricalEventMasterpieceArchConstructed) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventMasterpieceArchConstructed) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventMasterpieceArchConstructed) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventMasterpieceArchConstructed) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventMasterpieceArchConstructed) CheckFields() {
if x.BuildingCustom != x.EntityId {
sameFields["HistoricalEventMasterpieceArchConstructed"]["BuildingCustom"]["EntityId"] = false
}
if x.BuildingCustom != x.Hfid {
sameFields["HistoricalEventMasterpieceArchConstructed"]["BuildingCustom"]["Hfid"] = false
}
if x.BuildingCustom != x.SiteId {
sameFields["HistoricalEventMasterpieceArchConstructed"]["BuildingCustom"]["SiteId"] = false
}
if x.Unk2 != x.EntityId {
sameFields["HistoricalEventMasterpieceArchConstructed"]["Unk2"]["EntityId"] = false
}
if x.Unk2 != x.Hfid {
sameFields["HistoricalEventMasterpieceArchConstructed"]["Unk2"]["Hfid"] = false
}
if x.Unk2 != x.SiteId {
sameFields["HistoricalEventMasterpieceArchConstructed"]["Unk2"]["SiteId"] = false
}
}
func (x *HistoricalEventMasterpieceArchConstructed) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.BuildingCustom != -1 {
d["buildingCustom"] = x.BuildingCustom
}
if x.BuildingSubtype != 0 {
d["buildingSubtype"] = x.BuildingSubtype
}
if x.BuildingType != 0 {
d["buildingType"] = x.BuildingType
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SkillAtTime != 0 {
d["skillAtTime"] = x.SkillAtTime
}
if x.Unk2 != -1 {
d["unk2"] = x.Unk2
}
return json.Marshal(d)
}
type HistoricalEventMasterpieceDyeItemType int
const (
HistoricalEventMasterpieceDyeItemType_Unknown HistoricalEventMasterpieceDyeItemType = iota
HistoricalEventMasterpieceDyeItemType_Cloth
)
func parseHistoricalEventMasterpieceDyeItemType(s string) HistoricalEventMasterpieceDyeItemType {
switch s {
case "cloth":
return HistoricalEventMasterpieceDyeItemType_Cloth
}
return HistoricalEventMasterpieceDyeItemType_Unknown
}
func (s HistoricalEventMasterpieceDyeItemType) String() string {
switch s {
case HistoricalEventMasterpieceDyeItemType_Cloth:
return "cloth"
}
return "unknown"
}
func (s HistoricalEventMasterpieceDyeItemType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceDyeMat int
const (
HistoricalEventMasterpieceDyeMat_Unknown HistoricalEventMasterpieceDyeMat = iota
HistoricalEventMasterpieceDyeMat_PigTail
)
func parseHistoricalEventMasterpieceDyeMat(s string) HistoricalEventMasterpieceDyeMat {
switch s {
case "pig tail":
return HistoricalEventMasterpieceDyeMat_PigTail
}
return HistoricalEventMasterpieceDyeMat_Unknown
}
func (s HistoricalEventMasterpieceDyeMat) String() string {
switch s {
case HistoricalEventMasterpieceDyeMat_PigTail:
return "pig tail"
}
return "unknown"
}
func (s HistoricalEventMasterpieceDyeMat) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceDyeSkillAtTime int
const (
HistoricalEventMasterpieceDyeSkillAtTime_Unknown HistoricalEventMasterpieceDyeSkillAtTime = iota
HistoricalEventMasterpieceDyeSkillAtTime_Skilled
)
func parseHistoricalEventMasterpieceDyeSkillAtTime(s string) HistoricalEventMasterpieceDyeSkillAtTime {
switch s {
case "skilled":
return HistoricalEventMasterpieceDyeSkillAtTime_Skilled
}
return HistoricalEventMasterpieceDyeSkillAtTime_Unknown
}
func (s HistoricalEventMasterpieceDyeSkillAtTime) String() string {
switch s {
case HistoricalEventMasterpieceDyeSkillAtTime_Skilled:
return "skilled"
}
return "unknown"
}
func (s HistoricalEventMasterpieceDyeSkillAtTime) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceDye struct {
DyeMat string `json:"dyeMat" legend:"plus"` // dye_mat
DyeMatIndex int `json:"dyeMatIndex" legend:"plus"` // dye_mat_index
EntityId int `json:"entityId" legend:"base"` // entity_id
Hfid int `json:"hfid" legend:"base"` // hfid
ItemType HistoricalEventMasterpieceDyeItemType `json:"itemType" legend:"plus"` // item_type
Maker int `json:"maker" legend:"plus"` // maker
MakerEntity int `json:"makerEntity" legend:"plus"` // maker_entity
Mat HistoricalEventMasterpieceDyeMat `json:"mat" legend:"plus"` // mat
MatIndex int `json:"matIndex" legend:"plus"` // mat_index
Site int `json:"site" legend:"plus"` // site
SiteId int `json:"siteId" legend:"base"` // site_id
SkillAtTime HistoricalEventMasterpieceDyeSkillAtTime `json:"skillAtTime" legend:"both"` // skill_at_time
Unk2 int `json:"unk2" legend:"plus"` // unk_2
}
func NewHistoricalEventMasterpieceDye() *HistoricalEventMasterpieceDye {
return &HistoricalEventMasterpieceDye{
DyeMatIndex: -1,
EntityId: -1,
Hfid: -1,
Maker: -1,
MakerEntity: -1,
MatIndex: -1,
Site: -1,
SiteId: -1,
Unk2: -1,
}
}
func (x *HistoricalEventMasterpieceDye) Type() string { return "masterpiece dye" }
func (x *HistoricalEventMasterpieceDye) RelatedToEntity(id int) bool {
return x.EntityId == id || x.MakerEntity == id
}
func (x *HistoricalEventMasterpieceDye) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventMasterpieceDye) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventMasterpieceDye) RelatedToSite(id int) bool {
return x.Site == id || x.SiteId == id
}
func (x *HistoricalEventMasterpieceDye) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventMasterpieceDye) CheckFields() {
if x.DyeMatIndex != x.EntityId {
sameFields["HistoricalEventMasterpieceDye"]["DyeMatIndex"]["EntityId"] = false
}
if x.DyeMatIndex != x.Hfid {
sameFields["HistoricalEventMasterpieceDye"]["DyeMatIndex"]["Hfid"] = false
}
if x.DyeMatIndex != x.SiteId {
sameFields["HistoricalEventMasterpieceDye"]["DyeMatIndex"]["SiteId"] = false
}
if x.Maker != x.EntityId {
sameFields["HistoricalEventMasterpieceDye"]["Maker"]["EntityId"] = false
}
if x.Maker != x.Hfid {
sameFields["HistoricalEventMasterpieceDye"]["Maker"]["Hfid"] = false
}
if x.Maker != x.SiteId {
sameFields["HistoricalEventMasterpieceDye"]["Maker"]["SiteId"] = false
}
if x.MakerEntity != x.EntityId {
sameFields["HistoricalEventMasterpieceDye"]["MakerEntity"]["EntityId"] = false
}
if x.MakerEntity != x.Hfid {
sameFields["HistoricalEventMasterpieceDye"]["MakerEntity"]["Hfid"] = false
}
if x.MakerEntity != x.SiteId {
sameFields["HistoricalEventMasterpieceDye"]["MakerEntity"]["SiteId"] = false
}
if x.MatIndex != x.EntityId {
sameFields["HistoricalEventMasterpieceDye"]["MatIndex"]["EntityId"] = false
}
if x.MatIndex != x.Hfid {
sameFields["HistoricalEventMasterpieceDye"]["MatIndex"]["Hfid"] = false
}
if x.MatIndex != x.SiteId {
sameFields["HistoricalEventMasterpieceDye"]["MatIndex"]["SiteId"] = false
}
if x.Site != x.EntityId {
sameFields["HistoricalEventMasterpieceDye"]["Site"]["EntityId"] = false
}
if x.Site != x.Hfid {
sameFields["HistoricalEventMasterpieceDye"]["Site"]["Hfid"] = false
}
if x.Site != x.SiteId {
sameFields["HistoricalEventMasterpieceDye"]["Site"]["SiteId"] = false
}
if x.Unk2 != x.EntityId {
sameFields["HistoricalEventMasterpieceDye"]["Unk2"]["EntityId"] = false
}
if x.Unk2 != x.Hfid {
sameFields["HistoricalEventMasterpieceDye"]["Unk2"]["Hfid"] = false
}
if x.Unk2 != x.SiteId {
sameFields["HistoricalEventMasterpieceDye"]["Unk2"]["SiteId"] = false
}
}
func (x *HistoricalEventMasterpieceDye) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["dyeMat"] = x.DyeMat
if x.DyeMatIndex != -1 {
d["dyeMatIndex"] = x.DyeMatIndex
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.ItemType != 0 {
d["itemType"] = x.ItemType
}
if x.Maker != -1 {
d["maker"] = x.Maker
}
if x.MakerEntity != -1 {
d["makerEntity"] = x.MakerEntity
}
if x.Mat != 0 {
d["mat"] = x.Mat
}
if x.MatIndex != -1 {
d["matIndex"] = x.MatIndex
}
if x.Site != -1 {
d["site"] = x.Site
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SkillAtTime != 0 {
d["skillAtTime"] = x.SkillAtTime
}
if x.Unk2 != -1 {
d["unk2"] = x.Unk2
}
return json.Marshal(d)
}
type HistoricalEventMasterpieceEngraving struct {
ArtId int `json:"artId" legend:"plus"` // art_id
ArtSubid int `json:"artSubid" legend:"plus"` // art_subid
EntityId int `json:"entityId" legend:"base"` // entity_id
Hfid int `json:"hfid" legend:"base"` // hfid
SiteId int `json:"siteId" legend:"base"` // site_id
SkillAtTime string `json:"skillAtTime" legend:"both"` // skill_at_time
}
func NewHistoricalEventMasterpieceEngraving() *HistoricalEventMasterpieceEngraving {
return &HistoricalEventMasterpieceEngraving{
ArtId: -1,
ArtSubid: -1,
EntityId: -1,
Hfid: -1,
SiteId: -1,
}
}
func (x *HistoricalEventMasterpieceEngraving) Type() string { return "masterpiece engraving" }
func (x *HistoricalEventMasterpieceEngraving) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventMasterpieceEngraving) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventMasterpieceEngraving) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventMasterpieceEngraving) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventMasterpieceEngraving) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventMasterpieceEngraving) CheckFields() {
if x.ArtId != x.EntityId {
sameFields["HistoricalEventMasterpieceEngraving"]["ArtId"]["EntityId"] = false
}
if x.ArtId != x.Hfid {
sameFields["HistoricalEventMasterpieceEngraving"]["ArtId"]["Hfid"] = false
}
if x.ArtId != x.SiteId {
sameFields["HistoricalEventMasterpieceEngraving"]["ArtId"]["SiteId"] = false
}
if x.ArtSubid != x.EntityId {
sameFields["HistoricalEventMasterpieceEngraving"]["ArtSubid"]["EntityId"] = false
}
if x.ArtSubid != x.Hfid {
sameFields["HistoricalEventMasterpieceEngraving"]["ArtSubid"]["Hfid"] = false
}
if x.ArtSubid != x.SiteId {
sameFields["HistoricalEventMasterpieceEngraving"]["ArtSubid"]["SiteId"] = false
}
}
func (x *HistoricalEventMasterpieceEngraving) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtId != -1 {
d["artId"] = x.ArtId
}
if x.ArtSubid != -1 {
d["artSubid"] = x.ArtSubid
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
d["skillAtTime"] = x.SkillAtTime
return json.Marshal(d)
}
type HistoricalEventMasterpieceFoodItemSubtype int
const (
HistoricalEventMasterpieceFoodItemSubtype_Unknown HistoricalEventMasterpieceFoodItemSubtype = iota
HistoricalEventMasterpieceFoodItemSubtype_Biscuits
HistoricalEventMasterpieceFoodItemSubtype_Roast
HistoricalEventMasterpieceFoodItemSubtype_Stew
)
func parseHistoricalEventMasterpieceFoodItemSubtype(s string) HistoricalEventMasterpieceFoodItemSubtype {
switch s {
case "biscuits":
return HistoricalEventMasterpieceFoodItemSubtype_Biscuits
case "roast":
return HistoricalEventMasterpieceFoodItemSubtype_Roast
case "stew":
return HistoricalEventMasterpieceFoodItemSubtype_Stew
}
return HistoricalEventMasterpieceFoodItemSubtype_Unknown
}
func (s HistoricalEventMasterpieceFoodItemSubtype) String() string {
switch s {
case HistoricalEventMasterpieceFoodItemSubtype_Biscuits:
return "biscuits"
case HistoricalEventMasterpieceFoodItemSubtype_Roast:
return "roast"
case HistoricalEventMasterpieceFoodItemSubtype_Stew:
return "stew"
}
return "unknown"
}
func (s HistoricalEventMasterpieceFoodItemSubtype) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceFoodItemType int
const (
HistoricalEventMasterpieceFoodItemType_Unknown HistoricalEventMasterpieceFoodItemType = iota
HistoricalEventMasterpieceFoodItemType_Food
)
func parseHistoricalEventMasterpieceFoodItemType(s string) HistoricalEventMasterpieceFoodItemType {
switch s {
case "food":
return HistoricalEventMasterpieceFoodItemType_Food
}
return HistoricalEventMasterpieceFoodItemType_Unknown
}
func (s HistoricalEventMasterpieceFoodItemType) String() string {
switch s {
case HistoricalEventMasterpieceFoodItemType_Food:
return "food"
}
return "unknown"
}
func (s HistoricalEventMasterpieceFoodItemType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceFoodSkillAtTime int
const (
HistoricalEventMasterpieceFoodSkillAtTime_Unknown HistoricalEventMasterpieceFoodSkillAtTime = iota
HistoricalEventMasterpieceFoodSkillAtTime_Accomplished
HistoricalEventMasterpieceFoodSkillAtTime_Adept
HistoricalEventMasterpieceFoodSkillAtTime_Competent
HistoricalEventMasterpieceFoodSkillAtTime_Expert
HistoricalEventMasterpieceFoodSkillAtTime_Grandmaster
HistoricalEventMasterpieceFoodSkillAtTime_Great
HistoricalEventMasterpieceFoodSkillAtTime_Highmaster
HistoricalEventMasterpieceFoodSkillAtTime_Legendary
HistoricalEventMasterpieceFoodSkillAtTime_Legendary1
HistoricalEventMasterpieceFoodSkillAtTime_Legendary3
HistoricalEventMasterpieceFoodSkillAtTime_Legendary4
HistoricalEventMasterpieceFoodSkillAtTime_Legendary5
HistoricalEventMasterpieceFoodSkillAtTime_LegendaryTwo
HistoricalEventMasterpieceFoodSkillAtTime_Master
HistoricalEventMasterpieceFoodSkillAtTime_Professional
HistoricalEventMasterpieceFoodSkillAtTime_Proficient
HistoricalEventMasterpieceFoodSkillAtTime_Skilled
HistoricalEventMasterpieceFoodSkillAtTime_Talented
HistoricalEventMasterpieceFoodSkillAtTime_Unknown30
HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo1
HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo3
HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo4
HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo5
HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo6
HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo7
HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo8
HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo9
HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwoTwo
)
func parseHistoricalEventMasterpieceFoodSkillAtTime(s string) HistoricalEventMasterpieceFoodSkillAtTime {
switch s {
case "accomplished":
return HistoricalEventMasterpieceFoodSkillAtTime_Accomplished
case "adept":
return HistoricalEventMasterpieceFoodSkillAtTime_Adept
case "competent":
return HistoricalEventMasterpieceFoodSkillAtTime_Competent
case "expert":
return HistoricalEventMasterpieceFoodSkillAtTime_Expert
case "grandmaster":
return HistoricalEventMasterpieceFoodSkillAtTime_Grandmaster
case "great":
return HistoricalEventMasterpieceFoodSkillAtTime_Great
case "highmaster":
return HistoricalEventMasterpieceFoodSkillAtTime_Highmaster
case "legendary":
return HistoricalEventMasterpieceFoodSkillAtTime_Legendary
case "legendary1":
return HistoricalEventMasterpieceFoodSkillAtTime_Legendary1
case "legendary2":
return HistoricalEventMasterpieceFoodSkillAtTime_LegendaryTwo
case "legendary3":
return HistoricalEventMasterpieceFoodSkillAtTime_Legendary3
case "legendary4":
return HistoricalEventMasterpieceFoodSkillAtTime_Legendary4
case "legendary5":
return HistoricalEventMasterpieceFoodSkillAtTime_Legendary5
case "master":
return HistoricalEventMasterpieceFoodSkillAtTime_Master
case "professional":
return HistoricalEventMasterpieceFoodSkillAtTime_Professional
case "proficient":
return HistoricalEventMasterpieceFoodSkillAtTime_Proficient
case "skilled":
return HistoricalEventMasterpieceFoodSkillAtTime_Skilled
case "talented":
return HistoricalEventMasterpieceFoodSkillAtTime_Talented
case "unknown 21":
return HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo1
case "unknown 22":
return HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwoTwo
case "unknown 23":
return HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo3
case "unknown 24":
return HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo4
case "unknown 25":
return HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo5
case "unknown 26":
return HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo6
case "unknown 27":
return HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo7
case "unknown 28":
return HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo8
case "unknown 29":
return HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo9
case "unknown 30":
return HistoricalEventMasterpieceFoodSkillAtTime_Unknown30
}
return HistoricalEventMasterpieceFoodSkillAtTime_Unknown
}
func (s HistoricalEventMasterpieceFoodSkillAtTime) String() string {
switch s {
case HistoricalEventMasterpieceFoodSkillAtTime_Accomplished:
return "accomplished"
case HistoricalEventMasterpieceFoodSkillAtTime_Adept:
return "adept"
case HistoricalEventMasterpieceFoodSkillAtTime_Competent:
return "competent"
case HistoricalEventMasterpieceFoodSkillAtTime_Expert:
return "expert"
case HistoricalEventMasterpieceFoodSkillAtTime_Grandmaster:
return "grandmaster"
case HistoricalEventMasterpieceFoodSkillAtTime_Great:
return "great"
case HistoricalEventMasterpieceFoodSkillAtTime_Highmaster:
return "highmaster"
case HistoricalEventMasterpieceFoodSkillAtTime_Legendary:
return "legendary"
case HistoricalEventMasterpieceFoodSkillAtTime_Legendary1:
return "legendary 1"
case HistoricalEventMasterpieceFoodSkillAtTime_Legendary3:
return "legendary 3"
case HistoricalEventMasterpieceFoodSkillAtTime_Legendary4:
return "legendary 4"
case HistoricalEventMasterpieceFoodSkillAtTime_Legendary5:
return "legendary 5"
case HistoricalEventMasterpieceFoodSkillAtTime_LegendaryTwo:
return "legendary two"
case HistoricalEventMasterpieceFoodSkillAtTime_Master:
return "master"
case HistoricalEventMasterpieceFoodSkillAtTime_Professional:
return "professional"
case HistoricalEventMasterpieceFoodSkillAtTime_Proficient:
return "proficient"
case HistoricalEventMasterpieceFoodSkillAtTime_Skilled:
return "skilled"
case HistoricalEventMasterpieceFoodSkillAtTime_Talented:
return "talented"
case HistoricalEventMasterpieceFoodSkillAtTime_Unknown30:
return "unknown 30"
case HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo1:
return "unknown two 1"
case HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo3:
return "unknown two 3"
case HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo4:
return "unknown two 4"
case HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo5:
return "unknown two 5"
case HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo6:
return "unknown two 6"
case HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo7:
return "unknown two 7"
case HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo8:
return "unknown two 8"
case HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwo9:
return "unknown two 9"
case HistoricalEventMasterpieceFoodSkillAtTime_UnknownTwoTwo:
return "unknown two two"
}
return "unknown"
}
func (s HistoricalEventMasterpieceFoodSkillAtTime) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceFood struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
Hfid int `json:"hfid" legend:"base"` // hfid
ItemId int `json:"itemId" legend:"plus"` // item_id
ItemSubtype HistoricalEventMasterpieceFoodItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype
ItemType HistoricalEventMasterpieceFoodItemType `json:"itemType" legend:"plus"` // item_type
Maker int `json:"maker" legend:"plus"` // maker
MakerEntity int `json:"makerEntity" legend:"plus"` // maker_entity
Site int `json:"site" legend:"plus"` // site
SiteId int `json:"siteId" legend:"base"` // site_id
SkillAtTime HistoricalEventMasterpieceFoodSkillAtTime `json:"skillAtTime" legend:"both"` // skill_at_time
}
func NewHistoricalEventMasterpieceFood() *HistoricalEventMasterpieceFood {
return &HistoricalEventMasterpieceFood{
EntityId: -1,
Hfid: -1,
ItemId: -1,
Maker: -1,
MakerEntity: -1,
Site: -1,
SiteId: -1,
}
}
func (x *HistoricalEventMasterpieceFood) Type() string { return "masterpiece food" }
func (x *HistoricalEventMasterpieceFood) RelatedToEntity(id int) bool {
return x.EntityId == id || x.MakerEntity == id
}
func (x *HistoricalEventMasterpieceFood) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventMasterpieceFood) RelatedToArtifact(id int) bool { return x.ItemId == id }
func (x *HistoricalEventMasterpieceFood) RelatedToSite(id int) bool {
return x.Site == id || x.SiteId == id
}
func (x *HistoricalEventMasterpieceFood) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventMasterpieceFood) CheckFields() {
if x.ItemId != x.EntityId {
sameFields["HistoricalEventMasterpieceFood"]["ItemId"]["EntityId"] = false
}
if x.ItemId != x.Hfid {
sameFields["HistoricalEventMasterpieceFood"]["ItemId"]["Hfid"] = false
}
if x.ItemId != x.SiteId {
sameFields["HistoricalEventMasterpieceFood"]["ItemId"]["SiteId"] = false
}
if x.Maker != x.EntityId {
sameFields["HistoricalEventMasterpieceFood"]["Maker"]["EntityId"] = false
}
if x.Maker != x.Hfid {
sameFields["HistoricalEventMasterpieceFood"]["Maker"]["Hfid"] = false
}
if x.Maker != x.SiteId {
sameFields["HistoricalEventMasterpieceFood"]["Maker"]["SiteId"] = false
}
if x.MakerEntity != x.EntityId {
sameFields["HistoricalEventMasterpieceFood"]["MakerEntity"]["EntityId"] = false
}
if x.MakerEntity != x.Hfid {
sameFields["HistoricalEventMasterpieceFood"]["MakerEntity"]["Hfid"] = false
}
if x.MakerEntity != x.SiteId {
sameFields["HistoricalEventMasterpieceFood"]["MakerEntity"]["SiteId"] = false
}
if x.Site != x.EntityId {
sameFields["HistoricalEventMasterpieceFood"]["Site"]["EntityId"] = false
}
if x.Site != x.Hfid {
sameFields["HistoricalEventMasterpieceFood"]["Site"]["Hfid"] = false
}
if x.Site != x.SiteId {
sameFields["HistoricalEventMasterpieceFood"]["Site"]["SiteId"] = false
}
}
func (x *HistoricalEventMasterpieceFood) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.ItemId != -1 {
d["itemId"] = x.ItemId
}
if x.ItemSubtype != 0 {
d["itemSubtype"] = x.ItemSubtype
}
if x.ItemType != 0 {
d["itemType"] = x.ItemType
}
if x.Maker != -1 {
d["maker"] = x.Maker
}
if x.MakerEntity != -1 {
d["makerEntity"] = x.MakerEntity
}
if x.Site != -1 {
d["site"] = x.Site
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SkillAtTime != 0 {
d["skillAtTime"] = x.SkillAtTime
}
return json.Marshal(d)
}
type HistoricalEventMasterpieceItem struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
Hfid int `json:"hfid" legend:"base"` // hfid
ItemId int `json:"itemId" legend:"plus"` // item_id
ItemSubtype string `json:"itemSubtype" legend:"plus"` // item_subtype
ItemType string `json:"itemType" legend:"plus"` // item_type
Mat string `json:"mat" legend:"plus"` // mat
MatIndex int `json:"matIndex" legend:"plus"` // mat_index
MatType int `json:"matType" legend:"plus"` // mat_type
SiteId int `json:"siteId" legend:"base"` // site_id
SkillAtTime string `json:"skillAtTime" legend:"both"` // skill_at_time
}
func NewHistoricalEventMasterpieceItem() *HistoricalEventMasterpieceItem {
return &HistoricalEventMasterpieceItem{
EntityId: -1,
Hfid: -1,
ItemId: -1,
MatIndex: -1,
MatType: -1,
SiteId: -1,
}
}
func (x *HistoricalEventMasterpieceItem) Type() string { return "masterpiece item" }
func (x *HistoricalEventMasterpieceItem) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalEventMasterpieceItem) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventMasterpieceItem) RelatedToArtifact(id int) bool { return x.ItemId == id }
func (x *HistoricalEventMasterpieceItem) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventMasterpieceItem) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventMasterpieceItem) CheckFields() {
if x.ItemId != x.EntityId {
sameFields["HistoricalEventMasterpieceItem"]["ItemId"]["EntityId"] = false
}
if x.ItemId != x.Hfid {
sameFields["HistoricalEventMasterpieceItem"]["ItemId"]["Hfid"] = false
}
if x.ItemId != x.SiteId {
sameFields["HistoricalEventMasterpieceItem"]["ItemId"]["SiteId"] = false
}
if x.MatIndex != x.EntityId {
sameFields["HistoricalEventMasterpieceItem"]["MatIndex"]["EntityId"] = false
}
if x.MatIndex != x.Hfid {
sameFields["HistoricalEventMasterpieceItem"]["MatIndex"]["Hfid"] = false
}
if x.MatIndex != x.SiteId {
sameFields["HistoricalEventMasterpieceItem"]["MatIndex"]["SiteId"] = false
}
if x.MatType != x.EntityId {
sameFields["HistoricalEventMasterpieceItem"]["MatType"]["EntityId"] = false
}
if x.MatType != x.Hfid {
sameFields["HistoricalEventMasterpieceItem"]["MatType"]["Hfid"] = false
}
if x.MatType != x.SiteId {
sameFields["HistoricalEventMasterpieceItem"]["MatType"]["SiteId"] = false
}
}
func (x *HistoricalEventMasterpieceItem) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.ItemId != -1 {
d["itemId"] = x.ItemId
}
d["itemSubtype"] = x.ItemSubtype
d["itemType"] = x.ItemType
d["mat"] = x.Mat
if x.MatIndex != -1 {
d["matIndex"] = x.MatIndex
}
if x.MatType != -1 {
d["matType"] = x.MatType
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
d["skillAtTime"] = x.SkillAtTime
return json.Marshal(d)
}
type HistoricalEventMasterpieceItemImprovementImprovementType int
const (
HistoricalEventMasterpieceItemImprovementImprovementType_Unknown HistoricalEventMasterpieceItemImprovementImprovementType = iota
HistoricalEventMasterpieceItemImprovementImprovementType_ArtImage
HistoricalEventMasterpieceItemImprovementImprovementType_Bands
HistoricalEventMasterpieceItemImprovementImprovementType_Covered
HistoricalEventMasterpieceItemImprovementImprovementType_Itemspecific
HistoricalEventMasterpieceItemImprovementImprovementType_RingsHanging
HistoricalEventMasterpieceItemImprovementImprovementType_Spikes
)
func parseHistoricalEventMasterpieceItemImprovementImprovementType(s string) HistoricalEventMasterpieceItemImprovementImprovementType {
switch s {
case "art_image":
return HistoricalEventMasterpieceItemImprovementImprovementType_ArtImage
case "bands":
return HistoricalEventMasterpieceItemImprovementImprovementType_Bands
case "covered":
return HistoricalEventMasterpieceItemImprovementImprovementType_Covered
case "itemspecific":
return HistoricalEventMasterpieceItemImprovementImprovementType_Itemspecific
case "rings_hanging":
return HistoricalEventMasterpieceItemImprovementImprovementType_RingsHanging
case "spikes":
return HistoricalEventMasterpieceItemImprovementImprovementType_Spikes
}
return HistoricalEventMasterpieceItemImprovementImprovementType_Unknown
}
func (s HistoricalEventMasterpieceItemImprovementImprovementType) String() string {
switch s {
case HistoricalEventMasterpieceItemImprovementImprovementType_ArtImage:
return "art image"
case HistoricalEventMasterpieceItemImprovementImprovementType_Bands:
return "bands"
case HistoricalEventMasterpieceItemImprovementImprovementType_Covered:
return "covered"
case HistoricalEventMasterpieceItemImprovementImprovementType_Itemspecific:
return "itemspecific"
case HistoricalEventMasterpieceItemImprovementImprovementType_RingsHanging:
return "rings hanging"
case HistoricalEventMasterpieceItemImprovementImprovementType_Spikes:
return "spikes"
}
return "unknown"
}
func (s HistoricalEventMasterpieceItemImprovementImprovementType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceItemImprovementSkillAtTime int
const (
HistoricalEventMasterpieceItemImprovementSkillAtTime_Unknown HistoricalEventMasterpieceItemImprovementSkillAtTime = iota
HistoricalEventMasterpieceItemImprovementSkillAtTime_Accomplished
HistoricalEventMasterpieceItemImprovementSkillAtTime_Adept
HistoricalEventMasterpieceItemImprovementSkillAtTime_Adequate
HistoricalEventMasterpieceItemImprovementSkillAtTime_Competent
HistoricalEventMasterpieceItemImprovementSkillAtTime_Expert
HistoricalEventMasterpieceItemImprovementSkillAtTime_Great
HistoricalEventMasterpieceItemImprovementSkillAtTime_Highmaster
HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary
HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary1
HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary3
HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary4
HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary5
HistoricalEventMasterpieceItemImprovementSkillAtTime_LegendaryTwo
HistoricalEventMasterpieceItemImprovementSkillAtTime_Master
HistoricalEventMasterpieceItemImprovementSkillAtTime_Professional
HistoricalEventMasterpieceItemImprovementSkillAtTime_Proficient
HistoricalEventMasterpieceItemImprovementSkillAtTime_Skilled
HistoricalEventMasterpieceItemImprovementSkillAtTime_Talented
HistoricalEventMasterpieceItemImprovementSkillAtTime_Unknown44
HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo1
HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo3
HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo4
HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo5
HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo6
HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwoTwo
)
func parseHistoricalEventMasterpieceItemImprovementSkillAtTime(s string) HistoricalEventMasterpieceItemImprovementSkillAtTime {
switch s {
case "accomplished":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Accomplished
case "adept":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Adept
case "adequate":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Adequate
case "competent":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Competent
case "expert":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Expert
case "great":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Great
case "highmaster":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Highmaster
case "legendary":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary
case "legendary1":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary1
case "legendary2":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_LegendaryTwo
case "legendary3":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary3
case "legendary4":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary4
case "legendary5":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary5
case "master":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Master
case "professional":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Professional
case "proficient":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Proficient
case "skilled":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Skilled
case "talented":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Talented
case "unknown 21":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo1
case "unknown 22":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwoTwo
case "unknown 23":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo3
case "unknown 24":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo4
case "unknown 25":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo5
case "unknown 26":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo6
case "unknown 44":
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Unknown44
}
return HistoricalEventMasterpieceItemImprovementSkillAtTime_Unknown
}
func (s HistoricalEventMasterpieceItemImprovementSkillAtTime) String() string {
switch s {
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Accomplished:
return "accomplished"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Adept:
return "adept"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Adequate:
return "adequate"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Competent:
return "competent"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Expert:
return "expert"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Great:
return "great"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Highmaster:
return "highmaster"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary:
return "legendary"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary1:
return "legendary 1"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary3:
return "legendary 3"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary4:
return "legendary 4"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Legendary5:
return "legendary 5"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_LegendaryTwo:
return "legendary two"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Master:
return "master"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Professional:
return "professional"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Proficient:
return "proficient"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Skilled:
return "skilled"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Talented:
return "talented"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_Unknown44:
return "unknown 44"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo1:
return "unknown two 1"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo3:
return "unknown two 3"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo4:
return "unknown two 4"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo5:
return "unknown two 5"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwo6:
return "unknown two 6"
case HistoricalEventMasterpieceItemImprovementSkillAtTime_UnknownTwoTwo:
return "unknown two two"
}
return "unknown"
}
func (s HistoricalEventMasterpieceItemImprovementSkillAtTime) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMasterpieceItemImprovement struct {
ArtId int `json:"artId" legend:"plus"` // art_id
ArtSubid int `json:"artSubid" legend:"plus"` // art_subid
EntityId int `json:"entityId" legend:"base"` // entity_id
Hfid int `json:"hfid" legend:"base"` // hfid
ImpMat string `json:"impMat" legend:"plus"` // imp_mat
ImprovementSubtype int `json:"improvementSubtype" legend:"plus"` // improvement_subtype
ImprovementType HistoricalEventMasterpieceItemImprovementImprovementType `json:"improvementType" legend:"plus"` // improvement_type
ItemSubtype string `json:"itemSubtype" legend:"plus"` // item_subtype
ItemType string `json:"itemType" legend:"plus"` // item_type
Maker int `json:"maker" legend:"plus"` // maker
MakerEntity int `json:"makerEntity" legend:"plus"` // maker_entity
Mat string `json:"mat" legend:"plus"` // mat
Site int `json:"site" legend:"plus"` // site
SiteId int `json:"siteId" legend:"base"` // site_id
SkillAtTime HistoricalEventMasterpieceItemImprovementSkillAtTime `json:"skillAtTime" legend:"both"` // skill_at_time
Unk2 int `json:"unk2" legend:"plus"` // unk_2
}
func NewHistoricalEventMasterpieceItemImprovement() *HistoricalEventMasterpieceItemImprovement {
return &HistoricalEventMasterpieceItemImprovement{
ArtId: -1,
ArtSubid: -1,
EntityId: -1,
Hfid: -1,
ImprovementSubtype: -1,
Maker: -1,
MakerEntity: -1,
Site: -1,
SiteId: -1,
Unk2: -1,
}
}
func (x *HistoricalEventMasterpieceItemImprovement) Type() string {
return "masterpiece item improvement"
}
func (x *HistoricalEventMasterpieceItemImprovement) RelatedToEntity(id int) bool {
return x.EntityId == id || x.MakerEntity == id
}
func (x *HistoricalEventMasterpieceItemImprovement) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventMasterpieceItemImprovement) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventMasterpieceItemImprovement) RelatedToSite(id int) bool {
return x.Site == id || x.SiteId == id
}
func (x *HistoricalEventMasterpieceItemImprovement) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventMasterpieceItemImprovement) CheckFields() {
if x.ArtId != x.EntityId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["ArtId"]["EntityId"] = false
}
if x.ArtId != x.Hfid {
sameFields["HistoricalEventMasterpieceItemImprovement"]["ArtId"]["Hfid"] = false
}
if x.ArtId != x.SiteId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["ArtId"]["SiteId"] = false
}
if x.ArtSubid != x.EntityId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["ArtSubid"]["EntityId"] = false
}
if x.ArtSubid != x.Hfid {
sameFields["HistoricalEventMasterpieceItemImprovement"]["ArtSubid"]["Hfid"] = false
}
if x.ArtSubid != x.SiteId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["ArtSubid"]["SiteId"] = false
}
if x.ImprovementSubtype != x.EntityId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["ImprovementSubtype"]["EntityId"] = false
}
if x.ImprovementSubtype != x.Hfid {
sameFields["HistoricalEventMasterpieceItemImprovement"]["ImprovementSubtype"]["Hfid"] = false
}
if x.ImprovementSubtype != x.SiteId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["ImprovementSubtype"]["SiteId"] = false
}
if x.Maker != x.EntityId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["Maker"]["EntityId"] = false
}
if x.Maker != x.Hfid {
sameFields["HistoricalEventMasterpieceItemImprovement"]["Maker"]["Hfid"] = false
}
if x.Maker != x.SiteId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["Maker"]["SiteId"] = false
}
if x.MakerEntity != x.EntityId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["MakerEntity"]["EntityId"] = false
}
if x.MakerEntity != x.Hfid {
sameFields["HistoricalEventMasterpieceItemImprovement"]["MakerEntity"]["Hfid"] = false
}
if x.MakerEntity != x.SiteId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["MakerEntity"]["SiteId"] = false
}
if x.Site != x.EntityId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["Site"]["EntityId"] = false
}
if x.Site != x.Hfid {
sameFields["HistoricalEventMasterpieceItemImprovement"]["Site"]["Hfid"] = false
}
if x.Site != x.SiteId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["Site"]["SiteId"] = false
}
if x.Unk2 != x.EntityId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["Unk2"]["EntityId"] = false
}
if x.Unk2 != x.Hfid {
sameFields["HistoricalEventMasterpieceItemImprovement"]["Unk2"]["Hfid"] = false
}
if x.Unk2 != x.SiteId {
sameFields["HistoricalEventMasterpieceItemImprovement"]["Unk2"]["SiteId"] = false
}
}
func (x *HistoricalEventMasterpieceItemImprovement) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ArtId != -1 {
d["artId"] = x.ArtId
}
if x.ArtSubid != -1 {
d["artSubid"] = x.ArtSubid
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
d["impMat"] = x.ImpMat
if x.ImprovementSubtype != -1 {
d["improvementSubtype"] = x.ImprovementSubtype
}
if x.ImprovementType != 0 {
d["improvementType"] = x.ImprovementType
}
d["itemSubtype"] = x.ItemSubtype
d["itemType"] = x.ItemType
if x.Maker != -1 {
d["maker"] = x.Maker
}
if x.MakerEntity != -1 {
d["makerEntity"] = x.MakerEntity
}
d["mat"] = x.Mat
if x.Site != -1 {
d["site"] = x.Site
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SkillAtTime != 0 {
d["skillAtTime"] = x.SkillAtTime
}
if x.Unk2 != -1 {
d["unk2"] = x.Unk2
}
return json.Marshal(d)
}
type HistoricalEventMasterpieceLost struct {
CreationEvent int `json:"creationEvent" legend:"plus"` // creation_event
Histfig int `json:"histfig" legend:"plus"` // histfig
Method string `json:"method" legend:"plus"` // method
Site int `json:"site" legend:"plus"` // site
}
func NewHistoricalEventMasterpieceLost() *HistoricalEventMasterpieceLost {
return &HistoricalEventMasterpieceLost{
CreationEvent: -1,
Histfig: -1,
Site: -1,
}
}
func (x *HistoricalEventMasterpieceLost) Type() string { return "masterpiece lost" }
func (x *HistoricalEventMasterpieceLost) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventMasterpieceLost) RelatedToHf(id int) bool { return x.Histfig == id }
func (x *HistoricalEventMasterpieceLost) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventMasterpieceLost) RelatedToSite(id int) bool { return x.Site == id }
func (x *HistoricalEventMasterpieceLost) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventMasterpieceLost) CheckFields() {
}
func (x *HistoricalEventMasterpieceLost) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CreationEvent != -1 {
d["creationEvent"] = x.CreationEvent
}
if x.Histfig != -1 {
d["histfig"] = x.Histfig
}
d["method"] = x.Method
if x.Site != -1 {
d["site"] = x.Site
}
return json.Marshal(d)
}
type HistoricalEventMerchant struct {
DepotEntityId int `json:"depotEntityId" legend:"base"` // depot_entity_id
Hardship bool `json:"hardship" legend:"base"` // hardship
LostValue bool `json:"lostValue" legend:"base"` // lost_value
SiteId int `json:"siteId" legend:"base"` // site_id
TraderEntityId int `json:"traderEntityId" legend:"base"` // trader_entity_id
}
func NewHistoricalEventMerchant() *HistoricalEventMerchant {
return &HistoricalEventMerchant{
DepotEntityId: -1,
SiteId: -1,
TraderEntityId: -1,
}
}
func (x *HistoricalEventMerchant) Type() string { return "merchant" }
func (x *HistoricalEventMerchant) RelatedToEntity(id int) bool {
return x.DepotEntityId == id || x.TraderEntityId == id
}
func (x *HistoricalEventMerchant) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventMerchant) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventMerchant) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventMerchant) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventMerchant) CheckFields() {
}
func (x *HistoricalEventMerchant) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.DepotEntityId != -1 {
d["depotEntityId"] = x.DepotEntityId
}
d["hardship"] = x.Hardship
d["lostValue"] = x.LostValue
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.TraderEntityId != -1 {
d["traderEntityId"] = x.TraderEntityId
}
return json.Marshal(d)
}
type HistoricalEventModifiedBuildingModification int
const (
HistoricalEventModifiedBuildingModification_Unknown HistoricalEventModifiedBuildingModification = iota
HistoricalEventModifiedBuildingModification_Dungeon
HistoricalEventModifiedBuildingModification_FeastHall
HistoricalEventModifiedBuildingModification_GatedCourtyard
HistoricalEventModifiedBuildingModification_ImprovedFortifications
)
func parseHistoricalEventModifiedBuildingModification(s string) HistoricalEventModifiedBuildingModification {
switch s {
case "dungeon":
return HistoricalEventModifiedBuildingModification_Dungeon
case "feast hall":
return HistoricalEventModifiedBuildingModification_FeastHall
case "gated courtyard":
return HistoricalEventModifiedBuildingModification_GatedCourtyard
case "improved fortifications":
return HistoricalEventModifiedBuildingModification_ImprovedFortifications
}
return HistoricalEventModifiedBuildingModification_Unknown
}
func (s HistoricalEventModifiedBuildingModification) String() string {
switch s {
case HistoricalEventModifiedBuildingModification_Dungeon:
return "dungeon"
case HistoricalEventModifiedBuildingModification_FeastHall:
return "feast hall"
case HistoricalEventModifiedBuildingModification_GatedCourtyard:
return "gated courtyard"
case HistoricalEventModifiedBuildingModification_ImprovedFortifications:
return "improved fortifications"
}
return "unknown"
}
func (s HistoricalEventModifiedBuildingModification) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventModifiedBuilding struct {
Modification HistoricalEventModifiedBuildingModification `json:"modification" legend:"base"` // modification
ModifierHfid int `json:"modifierHfid" legend:"base"` // modifier_hfid
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventModifiedBuilding() *HistoricalEventModifiedBuilding {
return &HistoricalEventModifiedBuilding{
ModifierHfid: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventModifiedBuilding) Type() string { return "modified building" }
func (x *HistoricalEventModifiedBuilding) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventModifiedBuilding) RelatedToHf(id int) bool { return x.ModifierHfid == id }
func (x *HistoricalEventModifiedBuilding) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventModifiedBuilding) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventModifiedBuilding) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventModifiedBuilding) CheckFields() {
}
func (x *HistoricalEventModifiedBuilding) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Modification != 0 {
d["modification"] = x.Modification
}
if x.ModifierHfid != -1 {
d["modifierHfid"] = x.ModifierHfid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventMusicalFormCreatedCircumstance int
const (
HistoricalEventMusicalFormCreatedCircumstance_Unknown HistoricalEventMusicalFormCreatedCircumstance = iota
HistoricalEventMusicalFormCreatedCircumstance_Dream
HistoricalEventMusicalFormCreatedCircumstance_DreamAboutHf
HistoricalEventMusicalFormCreatedCircumstance_Nightmare
HistoricalEventMusicalFormCreatedCircumstance_PrayToHf
)
func parseHistoricalEventMusicalFormCreatedCircumstance(s string) HistoricalEventMusicalFormCreatedCircumstance {
switch s {
case "dream":
return HistoricalEventMusicalFormCreatedCircumstance_Dream
case "dream about hf":
return HistoricalEventMusicalFormCreatedCircumstance_DreamAboutHf
case "nightmare":
return HistoricalEventMusicalFormCreatedCircumstance_Nightmare
case "pray to hf":
return HistoricalEventMusicalFormCreatedCircumstance_PrayToHf
}
return HistoricalEventMusicalFormCreatedCircumstance_Unknown
}
func (s HistoricalEventMusicalFormCreatedCircumstance) String() string {
switch s {
case HistoricalEventMusicalFormCreatedCircumstance_Dream:
return "dream"
case HistoricalEventMusicalFormCreatedCircumstance_DreamAboutHf:
return "dream about hf"
case HistoricalEventMusicalFormCreatedCircumstance_Nightmare:
return "nightmare"
case HistoricalEventMusicalFormCreatedCircumstance_PrayToHf:
return "pray to hf"
}
return "unknown"
}
func (s HistoricalEventMusicalFormCreatedCircumstance) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMusicalFormCreatedReason int
const (
HistoricalEventMusicalFormCreatedReason_Unknown HistoricalEventMusicalFormCreatedReason = iota
HistoricalEventMusicalFormCreatedReason_GlorifyHf
)
func parseHistoricalEventMusicalFormCreatedReason(s string) HistoricalEventMusicalFormCreatedReason {
switch s {
case "glorify hf":
return HistoricalEventMusicalFormCreatedReason_GlorifyHf
}
return HistoricalEventMusicalFormCreatedReason_Unknown
}
func (s HistoricalEventMusicalFormCreatedReason) String() string {
switch s {
case HistoricalEventMusicalFormCreatedReason_GlorifyHf:
return "glorify hf"
}
return "unknown"
}
func (s HistoricalEventMusicalFormCreatedReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventMusicalFormCreated struct {
Circumstance HistoricalEventMusicalFormCreatedCircumstance `json:"circumstance" legend:"base"` // circumstance
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
FormId int `json:"formId" legend:"base"` // form_id
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
Reason HistoricalEventMusicalFormCreatedReason `json:"reason" legend:"base"` // reason
ReasonId int `json:"reasonId" legend:"base"` // reason_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventMusicalFormCreated() *HistoricalEventMusicalFormCreated {
return &HistoricalEventMusicalFormCreated{
CircumstanceId: -1,
FormId: -1,
HistFigureId: -1,
ReasonId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventMusicalFormCreated) Type() string { return "musical form created" }
func (x *HistoricalEventMusicalFormCreated) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventMusicalFormCreated) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventMusicalFormCreated) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventMusicalFormCreated) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventMusicalFormCreated) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventMusicalFormCreated) CheckFields() {
}
func (x *HistoricalEventMusicalFormCreated) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Circumstance != 0 {
d["circumstance"] = x.Circumstance
}
if x.CircumstanceId != -1 {
d["circumstanceId"] = x.CircumstanceId
}
if x.FormId != -1 {
d["formId"] = x.FormId
}
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.Reason != 0 {
d["reason"] = x.Reason
}
if x.ReasonId != -1 {
d["reasonId"] = x.ReasonId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventNewSiteLeader struct {
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
NewLeaderHfid int `json:"newLeaderHfid" legend:"base"` // new_leader_hfid
NewSiteCivId int `json:"newSiteCivId" legend:"base"` // new_site_civ_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventNewSiteLeader() *HistoricalEventNewSiteLeader {
return &HistoricalEventNewSiteLeader{
AttackerCivId: -1,
DefenderCivId: -1,
NewLeaderHfid: -1,
NewSiteCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventNewSiteLeader) Type() string { return "new site leader" }
func (x *HistoricalEventNewSiteLeader) RelatedToEntity(id int) bool {
return x.AttackerCivId == id || x.DefenderCivId == id || x.NewSiteCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventNewSiteLeader) RelatedToHf(id int) bool { return x.NewLeaderHfid == id }
func (x *HistoricalEventNewSiteLeader) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventNewSiteLeader) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventNewSiteLeader) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventNewSiteLeader) CheckFields() {
}
func (x *HistoricalEventNewSiteLeader) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackerCivId != -1 {
d["attackerCivId"] = x.AttackerCivId
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
if x.NewLeaderHfid != -1 {
d["newLeaderHfid"] = x.NewLeaderHfid
}
if x.NewSiteCivId != -1 {
d["newSiteCivId"] = x.NewSiteCivId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventPeaceAcceptedTopic int
const (
HistoricalEventPeaceAcceptedTopic_Unknown HistoricalEventPeaceAcceptedTopic = iota
HistoricalEventPeaceAcceptedTopic_Requestpeace
)
func parseHistoricalEventPeaceAcceptedTopic(s string) HistoricalEventPeaceAcceptedTopic {
switch s {
case "requestpeace":
return HistoricalEventPeaceAcceptedTopic_Requestpeace
}
return HistoricalEventPeaceAcceptedTopic_Unknown
}
func (s HistoricalEventPeaceAcceptedTopic) String() string {
switch s {
case HistoricalEventPeaceAcceptedTopic_Requestpeace:
return "requestpeace"
}
return "unknown"
}
func (s HistoricalEventPeaceAcceptedTopic) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventPeaceAccepted struct {
Destination int `json:"destination" legend:"plus"` // destination
SiteId int `json:"siteId" legend:"base"` // site_id
Source int `json:"source" legend:"plus"` // source
Topic HistoricalEventPeaceAcceptedTopic `json:"topic" legend:"plus"` // topic
}
func NewHistoricalEventPeaceAccepted() *HistoricalEventPeaceAccepted {
return &HistoricalEventPeaceAccepted{
Destination: -1,
SiteId: -1,
Source: -1,
}
}
func (x *HistoricalEventPeaceAccepted) Type() string { return "peace accepted" }
func (x *HistoricalEventPeaceAccepted) RelatedToEntity(id int) bool {
return x.Destination == id || x.Source == id
}
func (x *HistoricalEventPeaceAccepted) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventPeaceAccepted) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventPeaceAccepted) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventPeaceAccepted) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventPeaceAccepted) CheckFields() {
if x.Destination != x.SiteId {
sameFields["HistoricalEventPeaceAccepted"]["Destination"]["SiteId"] = false
}
if x.Source != x.SiteId {
sameFields["HistoricalEventPeaceAccepted"]["Source"]["SiteId"] = false
}
}
func (x *HistoricalEventPeaceAccepted) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Destination != -1 {
d["destination"] = x.Destination
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.Source != -1 {
d["source"] = x.Source
}
if x.Topic != 0 {
d["topic"] = x.Topic
}
return json.Marshal(d)
}
type HistoricalEventPeaceRejectedTopic int
const (
HistoricalEventPeaceRejectedTopic_Unknown HistoricalEventPeaceRejectedTopic = iota
HistoricalEventPeaceRejectedTopic_Requestpeace
)
func parseHistoricalEventPeaceRejectedTopic(s string) HistoricalEventPeaceRejectedTopic {
switch s {
case "requestpeace":
return HistoricalEventPeaceRejectedTopic_Requestpeace
}
return HistoricalEventPeaceRejectedTopic_Unknown
}
func (s HistoricalEventPeaceRejectedTopic) String() string {
switch s {
case HistoricalEventPeaceRejectedTopic_Requestpeace:
return "requestpeace"
}
return "unknown"
}
func (s HistoricalEventPeaceRejectedTopic) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventPeaceRejected struct {
Destination int `json:"destination" legend:"plus"` // destination
SiteId int `json:"siteId" legend:"base"` // site_id
Source int `json:"source" legend:"plus"` // source
Topic HistoricalEventPeaceRejectedTopic `json:"topic" legend:"plus"` // topic
}
func NewHistoricalEventPeaceRejected() *HistoricalEventPeaceRejected {
return &HistoricalEventPeaceRejected{
Destination: -1,
SiteId: -1,
Source: -1,
}
}
func (x *HistoricalEventPeaceRejected) Type() string { return "peace rejected" }
func (x *HistoricalEventPeaceRejected) RelatedToEntity(id int) bool {
return x.Destination == id || x.Source == id
}
func (x *HistoricalEventPeaceRejected) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventPeaceRejected) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventPeaceRejected) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventPeaceRejected) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventPeaceRejected) CheckFields() {
if x.Destination != x.SiteId {
sameFields["HistoricalEventPeaceRejected"]["Destination"]["SiteId"] = false
}
if x.Source != x.SiteId {
sameFields["HistoricalEventPeaceRejected"]["Source"]["SiteId"] = false
}
}
func (x *HistoricalEventPeaceRejected) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Destination != -1 {
d["destination"] = x.Destination
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.Source != -1 {
d["source"] = x.Source
}
if x.Topic != 0 {
d["topic"] = x.Topic
}
return json.Marshal(d)
}
type HistoricalEventPerformance struct {
CivId int `json:"civId" legend:"base"` // civ_id
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
OccasionId int `json:"occasionId" legend:"base"` // occasion_id
ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventPerformance() *HistoricalEventPerformance {
return &HistoricalEventPerformance{
CivId: -1,
FeatureLayerId: -1,
OccasionId: -1,
ScheduleId: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventPerformance) Type() string { return "performance" }
func (x *HistoricalEventPerformance) RelatedToEntity(id int) bool { return x.CivId == id }
func (x *HistoricalEventPerformance) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventPerformance) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventPerformance) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventPerformance) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventPerformance) CheckFields() {
}
func (x *HistoricalEventPerformance) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.OccasionId != -1 {
d["occasionId"] = x.OccasionId
}
if x.ScheduleId != -1 {
d["scheduleId"] = x.ScheduleId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventPlunderedSite struct {
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
Detected bool `json:"detected" legend:"base"` // detected
NoDefeatMention bool `json:"noDefeatMention" legend:"base"` // no_defeat_mention
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
TookItems bool `json:"tookItems" legend:"base"` // took_items
TookLivestock bool `json:"tookLivestock" legend:"base"` // took_livestock
WasRaid bool `json:"wasRaid" legend:"base"` // was_raid
}
func NewHistoricalEventPlunderedSite() *HistoricalEventPlunderedSite {
return &HistoricalEventPlunderedSite{
AttackerCivId: -1,
DefenderCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventPlunderedSite) Type() string { return "plundered site" }
func (x *HistoricalEventPlunderedSite) RelatedToEntity(id int) bool {
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventPlunderedSite) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventPlunderedSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventPlunderedSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventPlunderedSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventPlunderedSite) CheckFields() {
}
func (x *HistoricalEventPlunderedSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackerCivId != -1 {
d["attackerCivId"] = x.AttackerCivId
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
d["detected"] = x.Detected
d["noDefeatMention"] = x.NoDefeatMention
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
d["tookItems"] = x.TookItems
d["tookLivestock"] = x.TookLivestock
d["wasRaid"] = x.WasRaid
return json.Marshal(d)
}
type HistoricalEventPoeticFormCreatedCircumstance int
const (
HistoricalEventPoeticFormCreatedCircumstance_Unknown HistoricalEventPoeticFormCreatedCircumstance = iota
HistoricalEventPoeticFormCreatedCircumstance_Dream
HistoricalEventPoeticFormCreatedCircumstance_Nightmare
)
func parseHistoricalEventPoeticFormCreatedCircumstance(s string) HistoricalEventPoeticFormCreatedCircumstance {
switch s {
case "dream":
return HistoricalEventPoeticFormCreatedCircumstance_Dream
case "nightmare":
return HistoricalEventPoeticFormCreatedCircumstance_Nightmare
}
return HistoricalEventPoeticFormCreatedCircumstance_Unknown
}
func (s HistoricalEventPoeticFormCreatedCircumstance) String() string {
switch s {
case HistoricalEventPoeticFormCreatedCircumstance_Dream:
return "dream"
case HistoricalEventPoeticFormCreatedCircumstance_Nightmare:
return "nightmare"
}
return "unknown"
}
func (s HistoricalEventPoeticFormCreatedCircumstance) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventPoeticFormCreated struct {
Circumstance HistoricalEventPoeticFormCreatedCircumstance `json:"circumstance" legend:"base"` // circumstance
FormId int `json:"formId" legend:"base"` // form_id
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventPoeticFormCreated() *HistoricalEventPoeticFormCreated {
return &HistoricalEventPoeticFormCreated{
FormId: -1,
HistFigureId: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventPoeticFormCreated) Type() string { return "poetic form created" }
func (x *HistoricalEventPoeticFormCreated) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventPoeticFormCreated) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventPoeticFormCreated) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventPoeticFormCreated) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventPoeticFormCreated) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventPoeticFormCreated) CheckFields() {
}
func (x *HistoricalEventPoeticFormCreated) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Circumstance != 0 {
d["circumstance"] = x.Circumstance
}
if x.FormId != -1 {
d["formId"] = x.FormId
}
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventProcession struct {
CivId int `json:"civId" legend:"base"` // civ_id
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
OccasionId int `json:"occasionId" legend:"base"` // occasion_id
ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventProcession() *HistoricalEventProcession {
return &HistoricalEventProcession{
CivId: -1,
FeatureLayerId: -1,
OccasionId: -1,
ScheduleId: -1,
SiteId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventProcession) Type() string { return "procession" }
func (x *HistoricalEventProcession) RelatedToEntity(id int) bool { return x.CivId == id }
func (x *HistoricalEventProcession) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventProcession) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventProcession) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventProcession) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventProcession) CheckFields() {
}
func (x *HistoricalEventProcession) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.OccasionId != -1 {
d["occasionId"] = x.OccasionId
}
if x.ScheduleId != -1 {
d["scheduleId"] = x.ScheduleId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventRazedStructure struct {
CivId int `json:"civId" legend:"base"` // civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
}
func NewHistoricalEventRazedStructure() *HistoricalEventRazedStructure {
return &HistoricalEventRazedStructure{
CivId: -1,
SiteId: -1,
StructureId: -1,
}
}
func (x *HistoricalEventRazedStructure) Type() string { return "razed structure" }
func (x *HistoricalEventRazedStructure) RelatedToEntity(id int) bool { return x.CivId == id }
func (x *HistoricalEventRazedStructure) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventRazedStructure) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventRazedStructure) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventRazedStructure) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventRazedStructure) CheckFields() {
}
func (x *HistoricalEventRazedStructure) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
return json.Marshal(d)
}
type HistoricalEventReclaimSite struct {
CivId int `json:"civId" legend:"base"` // civ_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
Unretire bool `json:"unretire" legend:"base"` // unretire
}
func NewHistoricalEventReclaimSite() *HistoricalEventReclaimSite {
return &HistoricalEventReclaimSite{
CivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventReclaimSite) Type() string { return "reclaim site" }
func (x *HistoricalEventReclaimSite) RelatedToEntity(id int) bool {
return x.CivId == id || x.SiteCivId == id
}
func (x *HistoricalEventReclaimSite) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventReclaimSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventReclaimSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventReclaimSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventReclaimSite) CheckFields() {
}
func (x *HistoricalEventReclaimSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
d["unretire"] = x.Unretire
return json.Marshal(d)
}
type HistoricalEventRegionpopIncorporatedIntoEntity struct {
JoinEntityId int `json:"joinEntityId" legend:"base"` // join_entity_id
PopFlid int `json:"popFlid" legend:"base"` // pop_flid
PopNumberMoved int `json:"popNumberMoved" legend:"base"` // pop_number_moved
PopRace int `json:"popRace" legend:"base"` // pop_race
PopSrid int `json:"popSrid" legend:"base"` // pop_srid
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventRegionpopIncorporatedIntoEntity() *HistoricalEventRegionpopIncorporatedIntoEntity {
return &HistoricalEventRegionpopIncorporatedIntoEntity{
JoinEntityId: -1,
PopFlid: -1,
PopNumberMoved: -1,
PopRace: -1,
PopSrid: -1,
SiteId: -1,
}
}
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) Type() string {
return "regionpop incorporated into entity"
}
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) RelatedToEntity(id int) bool {
return x.JoinEntityId == id
}
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) RelatedToSite(id int) bool {
return x.SiteId == id
}
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) RelatedToRegion(id int) bool {
return x.PopSrid == id
}
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) CheckFields() {
}
func (x *HistoricalEventRegionpopIncorporatedIntoEntity) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.JoinEntityId != -1 {
d["joinEntityId"] = x.JoinEntityId
}
if x.PopFlid != -1 {
d["popFlid"] = x.PopFlid
}
if x.PopNumberMoved != -1 {
d["popNumberMoved"] = x.PopNumberMoved
}
if x.PopRace != -1 {
d["popRace"] = x.PopRace
}
if x.PopSrid != -1 {
d["popSrid"] = x.PopSrid
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventRelationshipRelationship int
const (
HistoricalEventRelationshipRelationship_Unknown HistoricalEventRelationshipRelationship = iota
HistoricalEventRelationshipRelationship_ArtisticBuddy
HistoricalEventRelationshipRelationship_AtheleticRival
HistoricalEventRelationshipRelationship_AthleteBuddy
HistoricalEventRelationshipRelationship_BusinessRival
HistoricalEventRelationshipRelationship_ChildhoodFriend
HistoricalEventRelationshipRelationship_FormerLover
HistoricalEventRelationshipRelationship_Grudge
HistoricalEventRelationshipRelationship_JealousObsession
HistoricalEventRelationshipRelationship_JealousRelationshipGrudge
HistoricalEventRelationshipRelationship_Lieutenant
HistoricalEventRelationshipRelationship_Lover
HistoricalEventRelationshipRelationship_PersecutionGrudge
HistoricalEventRelationshipRelationship_ReligiousPersecutionGrudge
HistoricalEventRelationshipRelationship_ScholarBuddy
HistoricalEventRelationshipRelationship_SupernaturalGrudge
HistoricalEventRelationshipRelationship_WarBuddy
)
func parseHistoricalEventRelationshipRelationship(s string) HistoricalEventRelationshipRelationship {
switch s {
case "artistic_buddy":
return HistoricalEventRelationshipRelationship_ArtisticBuddy
case "atheletic_rival":
return HistoricalEventRelationshipRelationship_AtheleticRival
case "athlete_buddy":
return HistoricalEventRelationshipRelationship_AthleteBuddy
case "business_rival":
return HistoricalEventRelationshipRelationship_BusinessRival
case "childhood_friend":
return HistoricalEventRelationshipRelationship_ChildhoodFriend
case "former_lover":
return HistoricalEventRelationshipRelationship_FormerLover
case "grudge":
return HistoricalEventRelationshipRelationship_Grudge
case "jealous_obsession":
return HistoricalEventRelationshipRelationship_JealousObsession
case "jealous_relationship_grudge":
return HistoricalEventRelationshipRelationship_JealousRelationshipGrudge
case "lieutenant":
return HistoricalEventRelationshipRelationship_Lieutenant
case "lover":
return HistoricalEventRelationshipRelationship_Lover
case "persecution_grudge":
return HistoricalEventRelationshipRelationship_PersecutionGrudge
case "religious_persecution_grudge":
return HistoricalEventRelationshipRelationship_ReligiousPersecutionGrudge
case "scholar_buddy":
return HistoricalEventRelationshipRelationship_ScholarBuddy
case "supernatural_grudge":
return HistoricalEventRelationshipRelationship_SupernaturalGrudge
case "war_buddy":
return HistoricalEventRelationshipRelationship_WarBuddy
}
return HistoricalEventRelationshipRelationship_Unknown
}
func (s HistoricalEventRelationshipRelationship) String() string {
switch s {
case HistoricalEventRelationshipRelationship_ArtisticBuddy:
return "artistic buddy"
case HistoricalEventRelationshipRelationship_AtheleticRival:
return "atheletic rival"
case HistoricalEventRelationshipRelationship_AthleteBuddy:
return "athlete buddy"
case HistoricalEventRelationshipRelationship_BusinessRival:
return "business rival"
case HistoricalEventRelationshipRelationship_ChildhoodFriend:
return "childhood friend"
case HistoricalEventRelationshipRelationship_FormerLover:
return "former lover"
case HistoricalEventRelationshipRelationship_Grudge:
return "grudge"
case HistoricalEventRelationshipRelationship_JealousObsession:
return "jealous obsession"
case HistoricalEventRelationshipRelationship_JealousRelationshipGrudge:
return "jealous relationship grudge"
case HistoricalEventRelationshipRelationship_Lieutenant:
return "lieutenant"
case HistoricalEventRelationshipRelationship_Lover:
return "lover"
case HistoricalEventRelationshipRelationship_PersecutionGrudge:
return "persecution grudge"
case HistoricalEventRelationshipRelationship_ReligiousPersecutionGrudge:
return "religious persecution grudge"
case HistoricalEventRelationshipRelationship_ScholarBuddy:
return "scholar buddy"
case HistoricalEventRelationshipRelationship_SupernaturalGrudge:
return "supernatural grudge"
case HistoricalEventRelationshipRelationship_WarBuddy:
return "war buddy"
}
return "unknown"
}
func (s HistoricalEventRelationshipRelationship) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventRelationship struct {
Event int `json:"event" legend:"plus"` // event
Relationship HistoricalEventRelationshipRelationship `json:"relationship" legend:"plus"` // relationship
SourceHf int `json:"sourceHf" legend:"plus"` // source_hf
TargetHf int `json:"targetHf" legend:"plus"` // target_hf
Year int `json:"year" legend:"plus"` // year
}
func NewHistoricalEventRelationship() *HistoricalEventRelationship {
return &HistoricalEventRelationship{
Event: -1,
SourceHf: -1,
TargetHf: -1,
Year: -1,
}
}
func (x *HistoricalEventRelationship) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventRelationship) RelatedToHf(id int) bool {
return x.SourceHf == id || x.TargetHf == id
}
func (x *HistoricalEventRelationship) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventRelationship) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventRelationship) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventRelationship) CheckFields() {
}
func (x *HistoricalEventRelationship) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Event != -1 {
d["event"] = x.Event
}
if x.Relationship != 0 {
d["relationship"] = x.Relationship
}
if x.SourceHf != -1 {
d["sourceHf"] = x.SourceHf
}
if x.TargetHf != -1 {
d["targetHf"] = x.TargetHf
}
if x.Year != -1 {
d["year"] = x.Year
}
return json.Marshal(d)
}
type HistoricalEventRelationshipSupplement struct {
Event int `json:"event" legend:"plus"` // event
OccasionType int `json:"occasionType" legend:"plus"` // occasion_type
Site int `json:"site" legend:"plus"` // site
Unk1 int `json:"unk1" legend:"plus"` // unk_1
}
func NewHistoricalEventRelationshipSupplement() *HistoricalEventRelationshipSupplement {
return &HistoricalEventRelationshipSupplement{
Event: -1,
OccasionType: -1,
Site: -1,
Unk1: -1,
}
}
func (x *HistoricalEventRelationshipSupplement) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventRelationshipSupplement) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventRelationshipSupplement) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventRelationshipSupplement) RelatedToSite(id int) bool { return x.Site == id }
func (x *HistoricalEventRelationshipSupplement) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventRelationshipSupplement) CheckFields() {
}
func (x *HistoricalEventRelationshipSupplement) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Event != -1 {
d["event"] = x.Event
}
if x.OccasionType != -1 {
d["occasionType"] = x.OccasionType
}
if x.Site != -1 {
d["site"] = x.Site
}
if x.Unk1 != -1 {
d["unk1"] = x.Unk1
}
return json.Marshal(d)
}
type HistoricalEventRemoveHfEntityLinkLink int
const (
HistoricalEventRemoveHfEntityLinkLink_Unknown HistoricalEventRemoveHfEntityLinkLink = iota
HistoricalEventRemoveHfEntityLinkLink_Member
HistoricalEventRemoveHfEntityLinkLink_Position
HistoricalEventRemoveHfEntityLinkLink_Prisoner
HistoricalEventRemoveHfEntityLinkLink_Slave
)
func parseHistoricalEventRemoveHfEntityLinkLink(s string) HistoricalEventRemoveHfEntityLinkLink {
switch s {
case "member":
return HistoricalEventRemoveHfEntityLinkLink_Member
case "position":
return HistoricalEventRemoveHfEntityLinkLink_Position
case "prisoner":
return HistoricalEventRemoveHfEntityLinkLink_Prisoner
case "slave":
return HistoricalEventRemoveHfEntityLinkLink_Slave
}
return HistoricalEventRemoveHfEntityLinkLink_Unknown
}
func (s HistoricalEventRemoveHfEntityLinkLink) String() string {
switch s {
case HistoricalEventRemoveHfEntityLinkLink_Member:
return "member"
case HistoricalEventRemoveHfEntityLinkLink_Position:
return "position"
case HistoricalEventRemoveHfEntityLinkLink_Prisoner:
return "prisoner"
case HistoricalEventRemoveHfEntityLinkLink_Slave:
return "slave"
}
return "unknown"
}
func (s HistoricalEventRemoveHfEntityLinkLink) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventRemoveHfEntityLinkLinkType int
const (
HistoricalEventRemoveHfEntityLinkLinkType_Unknown HistoricalEventRemoveHfEntityLinkLinkType = iota
HistoricalEventRemoveHfEntityLinkLinkType_Member
HistoricalEventRemoveHfEntityLinkLinkType_Position
HistoricalEventRemoveHfEntityLinkLinkType_Prisoner
HistoricalEventRemoveHfEntityLinkLinkType_Slave
)
func parseHistoricalEventRemoveHfEntityLinkLinkType(s string) HistoricalEventRemoveHfEntityLinkLinkType {
switch s {
case "member":
return HistoricalEventRemoveHfEntityLinkLinkType_Member
case "position":
return HistoricalEventRemoveHfEntityLinkLinkType_Position
case "prisoner":
return HistoricalEventRemoveHfEntityLinkLinkType_Prisoner
case "slave":
return HistoricalEventRemoveHfEntityLinkLinkType_Slave
}
return HistoricalEventRemoveHfEntityLinkLinkType_Unknown
}
func (s HistoricalEventRemoveHfEntityLinkLinkType) String() string {
switch s {
case HistoricalEventRemoveHfEntityLinkLinkType_Member:
return "member"
case HistoricalEventRemoveHfEntityLinkLinkType_Position:
return "position"
case HistoricalEventRemoveHfEntityLinkLinkType_Prisoner:
return "prisoner"
case HistoricalEventRemoveHfEntityLinkLinkType_Slave:
return "slave"
}
return "unknown"
}
func (s HistoricalEventRemoveHfEntityLinkLinkType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventRemoveHfEntityLink struct {
CivId int `json:"civId" legend:"base"` // civ_id
Hfid int `json:"hfid" legend:"base"` // hfid
Link HistoricalEventRemoveHfEntityLinkLink `json:"link" legend:"base"` // link
Position string `json:"position" legend:"plus"` // position
PositionId int `json:"positionId" legend:"base"` // position_id
}
func NewHistoricalEventRemoveHfEntityLink() *HistoricalEventRemoveHfEntityLink {
return &HistoricalEventRemoveHfEntityLink{
CivId: -1,
Hfid: -1,
PositionId: -1,
}
}
func (x *HistoricalEventRemoveHfEntityLink) Type() string { return "remove hf entity link" }
func (x *HistoricalEventRemoveHfEntityLink) RelatedToEntity(id int) bool { return x.CivId == id }
func (x *HistoricalEventRemoveHfEntityLink) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *HistoricalEventRemoveHfEntityLink) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventRemoveHfEntityLink) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventRemoveHfEntityLink) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventRemoveHfEntityLink) CheckFields() {
}
func (x *HistoricalEventRemoveHfEntityLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.Link != 0 {
d["link"] = x.Link
}
d["position"] = x.Position
if x.PositionId != -1 {
d["positionId"] = x.PositionId
}
return json.Marshal(d)
}
type HistoricalEventRemoveHfHfLink struct {
Hfid int `json:"hfid" legend:"base"` // hfid
HfidTarget int `json:"hfidTarget" legend:"base"` // hfid_target
}
func NewHistoricalEventRemoveHfHfLink() *HistoricalEventRemoveHfHfLink {
return &HistoricalEventRemoveHfHfLink{
Hfid: -1,
HfidTarget: -1,
}
}
func (x *HistoricalEventRemoveHfHfLink) Type() string { return "remove hf hf link" }
func (x *HistoricalEventRemoveHfHfLink) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventRemoveHfHfLink) RelatedToHf(id int) bool {
return x.Hfid == id || x.HfidTarget == id
}
func (x *HistoricalEventRemoveHfHfLink) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventRemoveHfHfLink) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventRemoveHfHfLink) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventRemoveHfHfLink) CheckFields() {
}
func (x *HistoricalEventRemoveHfHfLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.HfidTarget != -1 {
d["hfidTarget"] = x.HfidTarget
}
return json.Marshal(d)
}
type HistoricalEventRemoveHfSiteLinkLinkType int
const (
HistoricalEventRemoveHfSiteLinkLinkType_Unknown HistoricalEventRemoveHfSiteLinkLinkType = iota
HistoricalEventRemoveHfSiteLinkLinkType_HomeSiteAbstractBuilding
HistoricalEventRemoveHfSiteLinkLinkType_Occupation
HistoricalEventRemoveHfSiteLinkLinkType_SeatOfPower
)
func parseHistoricalEventRemoveHfSiteLinkLinkType(s string) HistoricalEventRemoveHfSiteLinkLinkType {
switch s {
case "home_site_abstract_building":
return HistoricalEventRemoveHfSiteLinkLinkType_HomeSiteAbstractBuilding
case "occupation":
return HistoricalEventRemoveHfSiteLinkLinkType_Occupation
case "seat_of_power":
return HistoricalEventRemoveHfSiteLinkLinkType_SeatOfPower
}
return HistoricalEventRemoveHfSiteLinkLinkType_Unknown
}
func (s HistoricalEventRemoveHfSiteLinkLinkType) String() string {
switch s {
case HistoricalEventRemoveHfSiteLinkLinkType_HomeSiteAbstractBuilding:
return "home site abstract building"
case HistoricalEventRemoveHfSiteLinkLinkType_Occupation:
return "occupation"
case HistoricalEventRemoveHfSiteLinkLinkType_SeatOfPower:
return "seat of power"
}
return "unknown"
}
func (s HistoricalEventRemoveHfSiteLinkLinkType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventRemoveHfSiteLink struct {
Civ int `json:"civ" legend:"plus"` // civ
Histfig int `json:"histfig" legend:"plus"` // histfig
LinkType HistoricalEventRemoveHfSiteLinkLinkType `json:"linkType" legend:"plus"` // link_type
SiteId int `json:"siteId" legend:"base"` // site_id
Structure int `json:"structure" legend:"plus"` // structure
}
func NewHistoricalEventRemoveHfSiteLink() *HistoricalEventRemoveHfSiteLink {
return &HistoricalEventRemoveHfSiteLink{
Civ: -1,
Histfig: -1,
SiteId: -1,
Structure: -1,
}
}
func (x *HistoricalEventRemoveHfSiteLink) Type() string { return "remove hf site link" }
func (x *HistoricalEventRemoveHfSiteLink) RelatedToEntity(id int) bool { return x.Civ == id }
func (x *HistoricalEventRemoveHfSiteLink) RelatedToHf(id int) bool { return x.Histfig == id }
func (x *HistoricalEventRemoveHfSiteLink) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventRemoveHfSiteLink) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventRemoveHfSiteLink) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventRemoveHfSiteLink) CheckFields() {
if x.Civ != x.SiteId {
sameFields["HistoricalEventRemoveHfSiteLink"]["Civ"]["SiteId"] = false
}
if x.Histfig != x.SiteId {
sameFields["HistoricalEventRemoveHfSiteLink"]["Histfig"]["SiteId"] = false
}
if x.Structure != x.SiteId {
sameFields["HistoricalEventRemoveHfSiteLink"]["Structure"]["SiteId"] = false
}
}
func (x *HistoricalEventRemoveHfSiteLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Civ != -1 {
d["civ"] = x.Civ
}
if x.Histfig != -1 {
d["histfig"] = x.Histfig
}
if x.LinkType != 0 {
d["linkType"] = x.LinkType
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.Structure != -1 {
d["structure"] = x.Structure
}
return json.Marshal(d)
}
type HistoricalEventReplacedStructure struct {
CivId int `json:"civId" legend:"base"` // civ_id
NewAbId int `json:"newAbId" legend:"base"` // new_ab_id
OldAbId int `json:"oldAbId" legend:"base"` // old_ab_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventReplacedStructure() *HistoricalEventReplacedStructure {
return &HistoricalEventReplacedStructure{
CivId: -1,
NewAbId: -1,
OldAbId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventReplacedStructure) Type() string { return "replaced structure" }
func (x *HistoricalEventReplacedStructure) RelatedToEntity(id int) bool {
return x.CivId == id || x.SiteCivId == id
}
func (x *HistoricalEventReplacedStructure) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventReplacedStructure) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventReplacedStructure) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventReplacedStructure) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventReplacedStructure) CheckFields() {
}
func (x *HistoricalEventReplacedStructure) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.NewAbId != -1 {
d["newAbId"] = x.NewAbId
}
if x.OldAbId != -1 {
d["oldAbId"] = x.OldAbId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventSiteDied struct {
Abandoned bool `json:"abandoned" legend:"base"` // abandoned
CivId int `json:"civId" legend:"base"` // civ_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventSiteDied() *HistoricalEventSiteDied {
return &HistoricalEventSiteDied{
CivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventSiteDied) Type() string { return "site died" }
func (x *HistoricalEventSiteDied) RelatedToEntity(id int) bool {
return x.CivId == id || x.SiteCivId == id
}
func (x *HistoricalEventSiteDied) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventSiteDied) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventSiteDied) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventSiteDied) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventSiteDied) CheckFields() {
}
func (x *HistoricalEventSiteDied) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["abandoned"] = x.Abandoned
if x.CivId != -1 {
d["civId"] = x.CivId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventSiteDisputeDispute int
const (
HistoricalEventSiteDisputeDispute_Unknown HistoricalEventSiteDisputeDispute = iota
HistoricalEventSiteDisputeDispute_FishingRights
HistoricalEventSiteDisputeDispute_GrazingRights
HistoricalEventSiteDisputeDispute_LivestockOwnership
HistoricalEventSiteDisputeDispute_RightsOfWay
HistoricalEventSiteDisputeDispute_Territory
HistoricalEventSiteDisputeDispute_WaterRights
)
func parseHistoricalEventSiteDisputeDispute(s string) HistoricalEventSiteDisputeDispute {
switch s {
case "fishing rights":
return HistoricalEventSiteDisputeDispute_FishingRights
case "grazing rights":
return HistoricalEventSiteDisputeDispute_GrazingRights
case "livestock ownership":
return HistoricalEventSiteDisputeDispute_LivestockOwnership
case "rights-of-way":
return HistoricalEventSiteDisputeDispute_RightsOfWay
case "territory":
return HistoricalEventSiteDisputeDispute_Territory
case "water rights":
return HistoricalEventSiteDisputeDispute_WaterRights
}
return HistoricalEventSiteDisputeDispute_Unknown
}
func (s HistoricalEventSiteDisputeDispute) String() string {
switch s {
case HistoricalEventSiteDisputeDispute_FishingRights:
return "fishing rights"
case HistoricalEventSiteDisputeDispute_GrazingRights:
return "grazing rights"
case HistoricalEventSiteDisputeDispute_LivestockOwnership:
return "livestock ownership"
case HistoricalEventSiteDisputeDispute_RightsOfWay:
return "rights of way"
case HistoricalEventSiteDisputeDispute_Territory:
return "territory"
case HistoricalEventSiteDisputeDispute_WaterRights:
return "water rights"
}
return "unknown"
}
func (s HistoricalEventSiteDisputeDispute) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventSiteDispute struct {
Dispute HistoricalEventSiteDisputeDispute `json:"dispute" legend:"base"` // dispute
EntityId1 int `json:"entityId1" legend:"base"` // entity_id_1
EntityId2 int `json:"entityId2" legend:"base"` // entity_id_2
SiteId1 int `json:"siteId1" legend:"base"` // site_id_1
SiteId2 int `json:"siteId2" legend:"base"` // site_id_2
}
func NewHistoricalEventSiteDispute() *HistoricalEventSiteDispute {
return &HistoricalEventSiteDispute{
EntityId1: -1,
EntityId2: -1,
SiteId1: -1,
SiteId2: -1,
}
}
func (x *HistoricalEventSiteDispute) Type() string { return "site dispute" }
func (x *HistoricalEventSiteDispute) RelatedToEntity(id int) bool {
return x.EntityId1 == id || x.EntityId2 == id
}
func (x *HistoricalEventSiteDispute) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventSiteDispute) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventSiteDispute) RelatedToSite(id int) bool { return false }
func (x *HistoricalEventSiteDispute) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventSiteDispute) CheckFields() {
}
func (x *HistoricalEventSiteDispute) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Dispute != 0 {
d["dispute"] = x.Dispute
}
if x.EntityId1 != -1 {
d["entityId1"] = x.EntityId1
}
if x.EntityId2 != -1 {
d["entityId2"] = x.EntityId2
}
if x.SiteId1 != -1 {
d["siteId1"] = x.SiteId1
}
if x.SiteId2 != -1 {
d["siteId2"] = x.SiteId2
}
return json.Marshal(d)
}
type HistoricalEventSiteRetired struct {
CivId int `json:"civId" legend:"base"` // civ_id
First bool `json:"first" legend:"base"` // first
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventSiteRetired() *HistoricalEventSiteRetired {
return &HistoricalEventSiteRetired{
CivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventSiteRetired) Type() string { return "site retired" }
func (x *HistoricalEventSiteRetired) RelatedToEntity(id int) bool {
return x.CivId == id || x.SiteCivId == id
}
func (x *HistoricalEventSiteRetired) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventSiteRetired) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventSiteRetired) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventSiteRetired) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventSiteRetired) CheckFields() {
}
func (x *HistoricalEventSiteRetired) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
d["first"] = x.First
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventSiteSurrendered struct {
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventSiteSurrendered() *HistoricalEventSiteSurrendered {
return &HistoricalEventSiteSurrendered{
AttackerCivId: -1,
DefenderCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventSiteSurrendered) Type() string { return "site surrendered" }
func (x *HistoricalEventSiteSurrendered) RelatedToEntity(id int) bool {
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventSiteSurrendered) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventSiteSurrendered) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventSiteSurrendered) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventSiteSurrendered) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventSiteSurrendered) CheckFields() {
}
func (x *HistoricalEventSiteSurrendered) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackerCivId != -1 {
d["attackerCivId"] = x.AttackerCivId
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventSiteTakenOver struct {
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
NewSiteCivId int `json:"newSiteCivId" legend:"base"` // new_site_civ_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventSiteTakenOver() *HistoricalEventSiteTakenOver {
return &HistoricalEventSiteTakenOver{
AttackerCivId: -1,
DefenderCivId: -1,
NewSiteCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventSiteTakenOver) Type() string { return "site taken over" }
func (x *HistoricalEventSiteTakenOver) RelatedToEntity(id int) bool {
return x.AttackerCivId == id || x.DefenderCivId == id || x.NewSiteCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventSiteTakenOver) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventSiteTakenOver) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventSiteTakenOver) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventSiteTakenOver) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventSiteTakenOver) CheckFields() {
}
func (x *HistoricalEventSiteTakenOver) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackerCivId != -1 {
d["attackerCivId"] = x.AttackerCivId
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
if x.NewSiteCivId != -1 {
d["newSiteCivId"] = x.NewSiteCivId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventSiteTributeForcedSeason int
const (
HistoricalEventSiteTributeForcedSeason_Unknown HistoricalEventSiteTributeForcedSeason = iota
HistoricalEventSiteTributeForcedSeason_Autumn
HistoricalEventSiteTributeForcedSeason_Spring
HistoricalEventSiteTributeForcedSeason_Summer
)
func parseHistoricalEventSiteTributeForcedSeason(s string) HistoricalEventSiteTributeForcedSeason {
switch s {
case "Autumn":
return HistoricalEventSiteTributeForcedSeason_Autumn
case "Spring":
return HistoricalEventSiteTributeForcedSeason_Spring
case "Summer":
return HistoricalEventSiteTributeForcedSeason_Summer
}
return HistoricalEventSiteTributeForcedSeason_Unknown
}
func (s HistoricalEventSiteTributeForcedSeason) String() string {
switch s {
case HistoricalEventSiteTributeForcedSeason_Autumn:
return "autumn"
case HistoricalEventSiteTributeForcedSeason_Spring:
return "spring"
case HistoricalEventSiteTributeForcedSeason_Summer:
return "summer"
}
return "unknown"
}
func (s HistoricalEventSiteTributeForcedSeason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventSiteTributeForced struct {
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
Season HistoricalEventSiteTributeForcedSeason `json:"season" legend:"base"` // season
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventSiteTributeForced() *HistoricalEventSiteTributeForced {
return &HistoricalEventSiteTributeForced{
AttackerCivId: -1,
DefenderCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventSiteTributeForced) Type() string { return "site tribute forced" }
func (x *HistoricalEventSiteTributeForced) RelatedToEntity(id int) bool {
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventSiteTributeForced) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventSiteTributeForced) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventSiteTributeForced) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventSiteTributeForced) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventSiteTributeForced) CheckFields() {
}
func (x *HistoricalEventSiteTributeForced) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackerCivId != -1 {
d["attackerCivId"] = x.AttackerCivId
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
if x.Season != 0 {
d["season"] = x.Season
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventSneakIntoSite struct {
AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id
DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalEventSneakIntoSite() *HistoricalEventSneakIntoSite {
return &HistoricalEventSneakIntoSite{
AttackerCivId: -1,
DefenderCivId: -1,
SiteCivId: -1,
SiteId: -1,
}
}
func (x *HistoricalEventSneakIntoSite) Type() string { return "sneak into site" }
func (x *HistoricalEventSneakIntoSite) RelatedToEntity(id int) bool {
return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventSneakIntoSite) RelatedToHf(id int) bool { return false }
func (x *HistoricalEventSneakIntoSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventSneakIntoSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventSneakIntoSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventSneakIntoSite) CheckFields() {
}
func (x *HistoricalEventSneakIntoSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AttackerCivId != -1 {
d["attackerCivId"] = x.AttackerCivId
}
if x.DefenderCivId != -1 {
d["defenderCivId"] = x.DefenderCivId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HistoricalEventSpottedLeavingSite struct {
LeaverCivId int `json:"leaverCivId" legend:"base"` // leaver_civ_id
SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id
SiteId int `json:"siteId" legend:"base"` // site_id
SpotterHfid int `json:"spotterHfid" legend:"base"` // spotter_hfid
}
func NewHistoricalEventSpottedLeavingSite() *HistoricalEventSpottedLeavingSite {
return &HistoricalEventSpottedLeavingSite{
LeaverCivId: -1,
SiteCivId: -1,
SiteId: -1,
SpotterHfid: -1,
}
}
func (x *HistoricalEventSpottedLeavingSite) Type() string { return "spotted leaving site" }
func (x *HistoricalEventSpottedLeavingSite) RelatedToEntity(id int) bool {
return x.LeaverCivId == id || x.SiteCivId == id
}
func (x *HistoricalEventSpottedLeavingSite) RelatedToHf(id int) bool { return x.SpotterHfid == id }
func (x *HistoricalEventSpottedLeavingSite) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventSpottedLeavingSite) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventSpottedLeavingSite) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventSpottedLeavingSite) CheckFields() {
}
func (x *HistoricalEventSpottedLeavingSite) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.LeaverCivId != -1 {
d["leaverCivId"] = x.LeaverCivId
}
if x.SiteCivId != -1 {
d["siteCivId"] = x.SiteCivId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SpotterHfid != -1 {
d["spotterHfid"] = x.SpotterHfid
}
return json.Marshal(d)
}
type HistoricalEventSquadVsSquad struct {
AHfid []int `json:"aHfid" legend:"base"` // a_hfid
ALeaderHfid int `json:"aLeaderHfid" legend:"base"` // a_leader_hfid
ALeadershipRoll int `json:"aLeadershipRoll" legend:"base"` // a_leadership_roll
ASquadId int `json:"aSquadId" legend:"base"` // a_squad_id
DEffect int `json:"dEffect" legend:"base"` // d_effect
DHfid []int `json:"dHfid" legend:"base"` // d_hfid
DInteraction int `json:"dInteraction" legend:"base"` // d_interaction
DLeaderHfid int `json:"dLeaderHfid" legend:"base"` // d_leader_hfid
DLeadershipRoll int `json:"dLeadershipRoll" legend:"base"` // d_leadership_roll
DNumber int `json:"dNumber" legend:"base"` // d_number
DRace int `json:"dRace" legend:"base"` // d_race
DSlain int `json:"dSlain" legend:"base"` // d_slain
DSquadId int `json:"dSquadId" legend:"base"` // d_squad_id
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
SiteId int `json:"siteId" legend:"base"` // site_id
StructureId int `json:"structureId" legend:"base"` // structure_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventSquadVsSquad() *HistoricalEventSquadVsSquad {
return &HistoricalEventSquadVsSquad{
ALeaderHfid: -1,
ALeadershipRoll: -1,
ASquadId: -1,
DEffect: -1,
DInteraction: -1,
DLeaderHfid: -1,
DLeadershipRoll: -1,
DNumber: -1,
DRace: -1,
DSlain: -1,
DSquadId: -1,
FeatureLayerId: -1,
SiteId: -1,
StructureId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventSquadVsSquad) Type() string { return "squad vs squad" }
func (x *HistoricalEventSquadVsSquad) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventSquadVsSquad) RelatedToHf(id int) bool {
return containsInt(x.AHfid, id) || containsInt(x.DHfid, id) || x.ALeaderHfid == id || x.DLeaderHfid == id
}
func (x *HistoricalEventSquadVsSquad) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventSquadVsSquad) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventSquadVsSquad) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventSquadVsSquad) CheckFields() {
}
func (x *HistoricalEventSquadVsSquad) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["aHfid"] = x.AHfid
if x.ALeaderHfid != -1 {
d["aLeaderHfid"] = x.ALeaderHfid
}
if x.ALeadershipRoll != -1 {
d["aLeadershipRoll"] = x.ALeadershipRoll
}
if x.ASquadId != -1 {
d["aSquadId"] = x.ASquadId
}
if x.DEffect != -1 {
d["dEffect"] = x.DEffect
}
d["dHfid"] = x.DHfid
if x.DInteraction != -1 {
d["dInteraction"] = x.DInteraction
}
if x.DLeaderHfid != -1 {
d["dLeaderHfid"] = x.DLeaderHfid
}
if x.DLeadershipRoll != -1 {
d["dLeadershipRoll"] = x.DLeadershipRoll
}
if x.DNumber != -1 {
d["dNumber"] = x.DNumber
}
if x.DRace != -1 {
d["dRace"] = x.DRace
}
if x.DSlain != -1 {
d["dSlain"] = x.DSlain
}
if x.DSquadId != -1 {
d["dSquadId"] = x.DSquadId
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventTacticalSituationSituation int
const (
HistoricalEventTacticalSituationSituation_Unknown HistoricalEventTacticalSituationSituation = iota
HistoricalEventTacticalSituationSituation_AFavored
HistoricalEventTacticalSituationSituation_ASlightlyFavored
HistoricalEventTacticalSituationSituation_AStronglyFavored
HistoricalEventTacticalSituationSituation_DSlightlyFavored
HistoricalEventTacticalSituationSituation_DStronglyFavored
HistoricalEventTacticalSituationSituation_NeitherFavored
)
func parseHistoricalEventTacticalSituationSituation(s string) HistoricalEventTacticalSituationSituation {
switch s {
case "a favored":
return HistoricalEventTacticalSituationSituation_AFavored
case "a slightly favored":
return HistoricalEventTacticalSituationSituation_ASlightlyFavored
case "a strongly favored":
return HistoricalEventTacticalSituationSituation_AStronglyFavored
case "d slightly favored":
return HistoricalEventTacticalSituationSituation_DSlightlyFavored
case "d strongly favored":
return HistoricalEventTacticalSituationSituation_DStronglyFavored
case "neither favored":
return HistoricalEventTacticalSituationSituation_NeitherFavored
}
return HistoricalEventTacticalSituationSituation_Unknown
}
func (s HistoricalEventTacticalSituationSituation) String() string {
switch s {
case HistoricalEventTacticalSituationSituation_AFavored:
return "a favored"
case HistoricalEventTacticalSituationSituation_ASlightlyFavored:
return "a slightly favored"
case HistoricalEventTacticalSituationSituation_AStronglyFavored:
return "a strongly favored"
case HistoricalEventTacticalSituationSituation_DSlightlyFavored:
return "d slightly favored"
case HistoricalEventTacticalSituationSituation_DStronglyFavored:
return "d strongly favored"
case HistoricalEventTacticalSituationSituation_NeitherFavored:
return "neither favored"
}
return "unknown"
}
func (s HistoricalEventTacticalSituationSituation) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventTacticalSituation struct {
ATacticianHfid int `json:"aTacticianHfid" legend:"base"` // a_tactician_hfid
ATacticsRoll int `json:"aTacticsRoll" legend:"base"` // a_tactics_roll
DTacticianHfid int `json:"dTacticianHfid" legend:"base"` // d_tactician_hfid
DTacticsRoll int `json:"dTacticsRoll" legend:"base"` // d_tactics_roll
FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id
SiteId int `json:"siteId" legend:"base"` // site_id
Situation HistoricalEventTacticalSituationSituation `json:"situation" legend:"base"` // situation
Start bool `json:"start" legend:"base"` // start
StructureId int `json:"structureId" legend:"base"` // structure_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
}
func NewHistoricalEventTacticalSituation() *HistoricalEventTacticalSituation {
return &HistoricalEventTacticalSituation{
ATacticianHfid: -1,
ATacticsRoll: -1,
DTacticianHfid: -1,
DTacticsRoll: -1,
FeatureLayerId: -1,
SiteId: -1,
StructureId: -1,
SubregionId: -1,
}
}
func (x *HistoricalEventTacticalSituation) Type() string { return "tactical situation" }
func (x *HistoricalEventTacticalSituation) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventTacticalSituation) RelatedToHf(id int) bool {
return x.ATacticianHfid == id || x.DTacticianHfid == id
}
func (x *HistoricalEventTacticalSituation) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventTacticalSituation) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventTacticalSituation) RelatedToRegion(id int) bool { return x.SubregionId == id }
func (x *HistoricalEventTacticalSituation) CheckFields() {
}
func (x *HistoricalEventTacticalSituation) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ATacticianHfid != -1 {
d["aTacticianHfid"] = x.ATacticianHfid
}
if x.ATacticsRoll != -1 {
d["aTacticsRoll"] = x.ATacticsRoll
}
if x.DTacticianHfid != -1 {
d["dTacticianHfid"] = x.DTacticianHfid
}
if x.DTacticsRoll != -1 {
d["dTacticsRoll"] = x.DTacticsRoll
}
if x.FeatureLayerId != -1 {
d["featureLayerId"] = x.FeatureLayerId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.Situation != 0 {
d["situation"] = x.Situation
}
d["start"] = x.Start
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
return json.Marshal(d)
}
type HistoricalEventTrade struct {
AccountShift int `json:"accountShift" legend:"base"` // account_shift
Allotment int `json:"allotment" legend:"base"` // allotment
AllotmentIndex int `json:"allotmentIndex" legend:"base"` // allotment_index
DestSiteId int `json:"destSiteId" legend:"base"` // dest_site_id
ProductionZoneId int `json:"productionZoneId" legend:"base"` // production_zone_id
SourceSiteId int `json:"sourceSiteId" legend:"base"` // source_site_id
TraderEntityId int `json:"traderEntityId" legend:"base"` // trader_entity_id
TraderHfid int `json:"traderHfid" legend:"base"` // trader_hfid
}
func NewHistoricalEventTrade() *HistoricalEventTrade {
return &HistoricalEventTrade{
AccountShift: -1,
Allotment: -1,
AllotmentIndex: -1,
DestSiteId: -1,
ProductionZoneId: -1,
SourceSiteId: -1,
TraderEntityId: -1,
TraderHfid: -1,
}
}
func (x *HistoricalEventTrade) Type() string { return "trade" }
func (x *HistoricalEventTrade) RelatedToEntity(id int) bool { return x.TraderEntityId == id }
func (x *HistoricalEventTrade) RelatedToHf(id int) bool { return x.TraderHfid == id }
func (x *HistoricalEventTrade) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventTrade) RelatedToSite(id int) bool {
return x.DestSiteId == id || x.SourceSiteId == id
}
func (x *HistoricalEventTrade) RelatedToRegion(id int) bool { return false }
func (x *HistoricalEventTrade) CheckFields() {
}
func (x *HistoricalEventTrade) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AccountShift != -1 {
d["accountShift"] = x.AccountShift
}
if x.Allotment != -1 {
d["allotment"] = x.Allotment
}
if x.AllotmentIndex != -1 {
d["allotmentIndex"] = x.AllotmentIndex
}
if x.DestSiteId != -1 {
d["destSiteId"] = x.DestSiteId
}
if x.ProductionZoneId != -1 {
d["productionZoneId"] = x.ProductionZoneId
}
if x.SourceSiteId != -1 {
d["sourceSiteId"] = x.SourceSiteId
}
if x.TraderEntityId != -1 {
d["traderEntityId"] = x.TraderEntityId
}
if x.TraderHfid != -1 {
d["traderHfid"] = x.TraderHfid
}
return json.Marshal(d)
}
type HistoricalEventWrittenContentComposedCircumstance int
const (
HistoricalEventWrittenContentComposedCircumstance_Unknown HistoricalEventWrittenContentComposedCircumstance = iota
HistoricalEventWrittenContentComposedCircumstance_Dream
HistoricalEventWrittenContentComposedCircumstance_DreamAboutHf
HistoricalEventWrittenContentComposedCircumstance_Nightmare
HistoricalEventWrittenContentComposedCircumstance_PrayToHf
)
func parseHistoricalEventWrittenContentComposedCircumstance(s string) HistoricalEventWrittenContentComposedCircumstance {
switch s {
case "dream":
return HistoricalEventWrittenContentComposedCircumstance_Dream
case "dream about hf":
return HistoricalEventWrittenContentComposedCircumstance_DreamAboutHf
case "nightmare":
return HistoricalEventWrittenContentComposedCircumstance_Nightmare
case "pray to hf":
return HistoricalEventWrittenContentComposedCircumstance_PrayToHf
}
return HistoricalEventWrittenContentComposedCircumstance_Unknown
}
func (s HistoricalEventWrittenContentComposedCircumstance) String() string {
switch s {
case HistoricalEventWrittenContentComposedCircumstance_Dream:
return "dream"
case HistoricalEventWrittenContentComposedCircumstance_DreamAboutHf:
return "dream about hf"
case HistoricalEventWrittenContentComposedCircumstance_Nightmare:
return "nightmare"
case HistoricalEventWrittenContentComposedCircumstance_PrayToHf:
return "pray to hf"
}
return "unknown"
}
func (s HistoricalEventWrittenContentComposedCircumstance) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventWrittenContentComposedReason int
const (
HistoricalEventWrittenContentComposedReason_Unknown HistoricalEventWrittenContentComposedReason = iota
HistoricalEventWrittenContentComposedReason_GlorifyHf
)
func parseHistoricalEventWrittenContentComposedReason(s string) HistoricalEventWrittenContentComposedReason {
switch s {
case "glorify hf":
return HistoricalEventWrittenContentComposedReason_GlorifyHf
}
return HistoricalEventWrittenContentComposedReason_Unknown
}
func (s HistoricalEventWrittenContentComposedReason) String() string {
switch s {
case HistoricalEventWrittenContentComposedReason_GlorifyHf:
return "glorify hf"
}
return "unknown"
}
func (s HistoricalEventWrittenContentComposedReason) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalEventWrittenContentComposed struct {
Circumstance HistoricalEventWrittenContentComposedCircumstance `json:"circumstance" legend:"base"` // circumstance
CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id
HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id
Reason HistoricalEventWrittenContentComposedReason `json:"reason" legend:"base"` // reason
ReasonId int `json:"reasonId" legend:"base"` // reason_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubregionId int `json:"subregionId" legend:"base"` // subregion_id
WcId int `json:"wcId" legend:"base"` // wc_id
}
func NewHistoricalEventWrittenContentComposed() *HistoricalEventWrittenContentComposed {
return &HistoricalEventWrittenContentComposed{
CircumstanceId: -1,
HistFigureId: -1,
ReasonId: -1,
SiteId: -1,
SubregionId: -1,
WcId: -1,
}
}
func (x *HistoricalEventWrittenContentComposed) Type() string { return "written content composed" }
func (x *HistoricalEventWrittenContentComposed) RelatedToEntity(id int) bool { return false }
func (x *HistoricalEventWrittenContentComposed) RelatedToHf(id int) bool { return x.HistFigureId == id }
func (x *HistoricalEventWrittenContentComposed) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalEventWrittenContentComposed) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalEventWrittenContentComposed) RelatedToRegion(id int) bool {
return x.SubregionId == id
}
func (x *HistoricalEventWrittenContentComposed) CheckFields() {
}
func (x *HistoricalEventWrittenContentComposed) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Circumstance != 0 {
d["circumstance"] = x.Circumstance
}
if x.CircumstanceId != -1 {
d["circumstanceId"] = x.CircumstanceId
}
if x.HistFigureId != -1 {
d["histFigureId"] = x.HistFigureId
}
if x.Reason != 0 {
d["reason"] = x.Reason
}
if x.ReasonId != -1 {
d["reasonId"] = x.ReasonId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubregionId != -1 {
d["subregionId"] = x.SubregionId
}
if x.WcId != -1 {
d["wcId"] = x.WcId
}
return json.Marshal(d)
}
type HistoricalFigureGoal int
const (
HistoricalFigureGoal_Unknown HistoricalFigureGoal = iota
HistoricalFigureGoal_AttainRankInSociety
HistoricalFigureGoal_BatheWorldInChaos
HistoricalFigureGoal_BecomeALegendaryWarrior
HistoricalFigureGoal_BringPeaceToTheWorld
HistoricalFigureGoal_CraftAMasterwork
HistoricalFigureGoal_CreateAGreatWorkOfArt
HistoricalFigureGoal_FallInLove
HistoricalFigureGoal_Immortality
HistoricalFigureGoal_MaintainEntityStatus
HistoricalFigureGoal_MakeAGreatDiscovery
HistoricalFigureGoal_MasterASkill
HistoricalFigureGoal_RuleTheWorld
HistoricalFigureGoal_SeeTheGreatNaturalSites
HistoricalFigureGoal_StartAFamily
)
func parseHistoricalFigureGoal(s string) HistoricalFigureGoal {
switch s {
case "attain rank in society":
return HistoricalFigureGoal_AttainRankInSociety
case "bathe world in chaos":
return HistoricalFigureGoal_BatheWorldInChaos
case "become a legendary warrior":
return HistoricalFigureGoal_BecomeALegendaryWarrior
case "bring peace to the world":
return HistoricalFigureGoal_BringPeaceToTheWorld
case "craft a masterwork":
return HistoricalFigureGoal_CraftAMasterwork
case "create a great work of art":
return HistoricalFigureGoal_CreateAGreatWorkOfArt
case "fall in love":
return HistoricalFigureGoal_FallInLove
case "immortality":
return HistoricalFigureGoal_Immortality
case "maintain entity status":
return HistoricalFigureGoal_MaintainEntityStatus
case "make a great discovery":
return HistoricalFigureGoal_MakeAGreatDiscovery
case "master a skill":
return HistoricalFigureGoal_MasterASkill
case "rule the world":
return HistoricalFigureGoal_RuleTheWorld
case "see the great natural sites":
return HistoricalFigureGoal_SeeTheGreatNaturalSites
case "start a family":
return HistoricalFigureGoal_StartAFamily
}
return HistoricalFigureGoal_Unknown
}
func (s HistoricalFigureGoal) String() string {
switch s {
case HistoricalFigureGoal_AttainRankInSociety:
return "attain rank in society"
case HistoricalFigureGoal_BatheWorldInChaos:
return "bathe world in chaos"
case HistoricalFigureGoal_BecomeALegendaryWarrior:
return "become a legendary warrior"
case HistoricalFigureGoal_BringPeaceToTheWorld:
return "bring peace to the world"
case HistoricalFigureGoal_CraftAMasterwork:
return "craft a masterwork"
case HistoricalFigureGoal_CreateAGreatWorkOfArt:
return "create a great work of art"
case HistoricalFigureGoal_FallInLove:
return "fall in love"
case HistoricalFigureGoal_Immortality:
return "immortality"
case HistoricalFigureGoal_MaintainEntityStatus:
return "maintain entity status"
case HistoricalFigureGoal_MakeAGreatDiscovery:
return "make a great discovery"
case HistoricalFigureGoal_MasterASkill:
return "master a skill"
case HistoricalFigureGoal_RuleTheWorld:
return "rule the world"
case HistoricalFigureGoal_SeeTheGreatNaturalSites:
return "see the great natural sites"
case HistoricalFigureGoal_StartAFamily:
return "start a family"
}
return "unknown"
}
func (s HistoricalFigureGoal) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalFigure struct {
ActiveInteraction []string `json:"activeInteraction" legend:"base"` // active_interaction
Adventurer bool `json:"adventurer" legend:"base"` // adventurer
Animated bool `json:"animated" legend:"base"` // animated
AnimatedString string `json:"animatedString" legend:"base"` // animated_string
Appeared int `json:"appeared" legend:"base"` // appeared
AssociatedType string `json:"associatedType" legend:"base"` // associated_type
BirthSeconds72 int `json:"birthSeconds72" legend:"base"` // birth_seconds72
BirthYear int `json:"birthYear" legend:"base"` // birth_year
BreedId int `json:"breedId" legend:"base"` // breed_id
Caste string `json:"caste" legend:"base"` // caste
CurrentIdentityId int `json:"currentIdentityId" legend:"base"` // current_identity_id
DeathSeconds72 int `json:"deathSeconds72" legend:"base"` // death_seconds72
DeathYear int `json:"deathYear" legend:"base"` // death_year
Deity bool `json:"deity" legend:"base"` // deity
EntPopId int `json:"entPopId" legend:"base"` // ent_pop_id
EntityFormerPositionLink []*EntityFormerPositionLink `json:"entityFormerPositionLink" legend:"base"` // entity_former_position_link
EntityFormerSquadLink []*EntityFormerSquadLink `json:"entityFormerSquadLink" legend:"base"` // entity_former_squad_link
EntityLink []*HistoricalFigureEntityLink `json:"entityLink" legend:"base"` // entity_link
EntityPositionLink []*EntityPositionLink `json:"entityPositionLink" legend:"base"` // entity_position_link
EntityReputation []*EntityReputation `json:"entityReputation" legend:"base"` // entity_reputation
EntitySquadLink []*EntitySquadLink `json:"entitySquadLink" legend:"base"` // entity_squad_link
Force bool `json:"force" legend:"base"` // force
Ghost bool `json:"ghost" legend:"base"` // ghost
Goal []HistoricalFigureGoal `json:"goal" legend:"base"` // goal
HfLink []*HfLink `json:"hfLink" legend:"base"` // hf_link
HfSkill []*HfSkill `json:"hfSkill" legend:"base"` // hf_skill
HoldsArtifact []int `json:"holdsArtifact" legend:"base"` // holds_artifact
HonorEntity []*HonorEntity `json:"honorEntity" legend:"base"` // honor_entity
Id_ int `json:"id" legend:"both"` // id
InteractionKnowledge []string `json:"interactionKnowledge" legend:"base"` // interaction_knowledge
IntrigueActor []*IntrigueActor `json:"intrigueActor" legend:"base"` // intrigue_actor
IntriguePlot []*IntriguePlot `json:"intriguePlot" legend:"base"` // intrigue_plot
JourneyPet []string `json:"journeyPet" legend:"base"` // journey_pet
Name_ string `json:"name" legend:"base"` // name
Race string `json:"race" legend:"both"` // race
RelationshipProfileHfHistorical []*RelationshipProfileHfHistorical `json:"relationshipProfileHfHistorical" legend:"base"` // relationship_profile_hf_historical
RelationshipProfileHfIdentity []*RelationshipProfileHfIdentity `json:"relationshipProfileHfIdentity" legend:"base"` // relationship_profile_hf_identity
RelationshipProfileHfVisual []*RelationshipProfileHfVisual `json:"relationshipProfileHfVisual" legend:"base"` // relationship_profile_hf_visual
Sex int `json:"sex" legend:"plus"` // sex
SiteLink []*SiteLink `json:"siteLink" legend:"base"` // site_link
SiteProperty []*HistoricalFigureSiteProperty `json:"siteProperty" legend:"base"` // site_property
Sphere []string `json:"sphere" legend:"base"` // sphere
UsedIdentityId []int `json:"usedIdentityId" legend:"base"` // used_identity_id
VagueRelationship []*VagueRelationship `json:"vagueRelationship" legend:"base"` // vague_relationship
Vampire bool `json:"vampire" legend:"add"` // Vampire
Werebeast bool `json:"werebeast" legend:"add"` // Werebeast
}
func NewHistoricalFigure() *HistoricalFigure {
return &HistoricalFigure{
Appeared: -1,
BirthSeconds72: -1,
BirthYear: -1,
BreedId: -1,
CurrentIdentityId: -1,
DeathSeconds72: -1,
DeathYear: -1,
EntPopId: -1,
Id_: -1,
Sex: -1,
}
}
func (x *HistoricalFigure) Id() int { return x.Id_ }
func (x *HistoricalFigure) setId(id int) { x.Id_ = id }
func (x *HistoricalFigure) Name() string { return x.Name_ }
func (x *HistoricalFigure) RelatedToEntity(id int) bool {
return containsInt(x.UsedIdentityId, id) || x.CurrentIdentityId == id
}
func (x *HistoricalFigure) RelatedToHf(id int) bool { return false }
func (x *HistoricalFigure) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalFigure) RelatedToSite(id int) bool { return false }
func (x *HistoricalFigure) RelatedToRegion(id int) bool { return false }
func (x *HistoricalFigure) CheckFields() {
if x.Sex != x.Appeared {
sameFields["HistoricalFigure"]["Sex"]["Appeared"] = false
}
if x.Sex != x.BirthSeconds72 {
sameFields["HistoricalFigure"]["Sex"]["BirthSeconds72"] = false
}
if x.Sex != x.BirthYear {
sameFields["HistoricalFigure"]["Sex"]["BirthYear"] = false
}
if x.Sex != x.BreedId {
sameFields["HistoricalFigure"]["Sex"]["BreedId"] = false
}
if x.Sex != x.CurrentIdentityId {
sameFields["HistoricalFigure"]["Sex"]["CurrentIdentityId"] = false
}
if x.Sex != x.DeathSeconds72 {
sameFields["HistoricalFigure"]["Sex"]["DeathSeconds72"] = false
}
if x.Sex != x.DeathYear {
sameFields["HistoricalFigure"]["Sex"]["DeathYear"] = false
}
if x.Sex != x.EntPopId {
sameFields["HistoricalFigure"]["Sex"]["EntPopId"] = false
}
}
func (x *HistoricalFigure) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["activeInteraction"] = x.ActiveInteraction
d["adventurer"] = x.Adventurer
d["animated"] = x.Animated
d["animatedString"] = x.AnimatedString
if x.Appeared != -1 {
d["appeared"] = x.Appeared
}
d["associatedType"] = x.AssociatedType
if x.BirthSeconds72 != -1 {
d["birthSeconds72"] = x.BirthSeconds72
}
if x.BirthYear != -1 {
d["birthYear"] = x.BirthYear
}
if x.BreedId != -1 {
d["breedId"] = x.BreedId
}
d["caste"] = x.Caste
if x.CurrentIdentityId != -1 {
d["currentIdentityId"] = x.CurrentIdentityId
}
if x.DeathSeconds72 != -1 {
d["deathSeconds72"] = x.DeathSeconds72
}
if x.DeathYear != -1 {
d["deathYear"] = x.DeathYear
}
d["deity"] = x.Deity
if x.EntPopId != -1 {
d["entPopId"] = x.EntPopId
}
d["entityFormerPositionLink"] = x.EntityFormerPositionLink
d["entityFormerSquadLink"] = x.EntityFormerSquadLink
d["entityLink"] = x.EntityLink
d["entityPositionLink"] = x.EntityPositionLink
d["entityReputation"] = x.EntityReputation
d["entitySquadLink"] = x.EntitySquadLink
d["force"] = x.Force
d["ghost"] = x.Ghost
d["goal"] = x.Goal
d["hfLink"] = x.HfLink
d["hfSkill"] = x.HfSkill
d["holdsArtifact"] = x.HoldsArtifact
d["honorEntity"] = x.HonorEntity
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["interactionKnowledge"] = x.InteractionKnowledge
d["intrigueActor"] = x.IntrigueActor
d["intriguePlot"] = x.IntriguePlot
d["journeyPet"] = x.JourneyPet
d["name"] = x.Name_
d["race"] = x.Race
d["relationshipProfileHfHistorical"] = x.RelationshipProfileHfHistorical
d["relationshipProfileHfIdentity"] = x.RelationshipProfileHfIdentity
d["relationshipProfileHfVisual"] = x.RelationshipProfileHfVisual
if x.Sex != -1 {
d["sex"] = x.Sex
}
d["siteLink"] = x.SiteLink
d["siteProperty"] = x.SiteProperty
d["sphere"] = x.Sphere
d["usedIdentityId"] = x.UsedIdentityId
d["vagueRelationship"] = x.VagueRelationship
return json.Marshal(d)
}
type HistoricalFigureEntityLinkLinkType int
const (
HistoricalFigureEntityLinkLinkType_Unknown HistoricalFigureEntityLinkLinkType = iota
HistoricalFigureEntityLinkLinkType_Criminal
HistoricalFigureEntityLinkLinkType_Enemy
HistoricalFigureEntityLinkLinkType_FormerMember
HistoricalFigureEntityLinkLinkType_FormerPrisoner
HistoricalFigureEntityLinkLinkType_FormerSlave
HistoricalFigureEntityLinkLinkType_Member
HistoricalFigureEntityLinkLinkType_Prisoner
HistoricalFigureEntityLinkLinkType_Slave
)
func parseHistoricalFigureEntityLinkLinkType(s string) HistoricalFigureEntityLinkLinkType {
switch s {
case "criminal":
return HistoricalFigureEntityLinkLinkType_Criminal
case "enemy":
return HistoricalFigureEntityLinkLinkType_Enemy
case "former member":
return HistoricalFigureEntityLinkLinkType_FormerMember
case "former prisoner":
return HistoricalFigureEntityLinkLinkType_FormerPrisoner
case "former slave":
return HistoricalFigureEntityLinkLinkType_FormerSlave
case "member":
return HistoricalFigureEntityLinkLinkType_Member
case "prisoner":
return HistoricalFigureEntityLinkLinkType_Prisoner
case "slave":
return HistoricalFigureEntityLinkLinkType_Slave
}
return HistoricalFigureEntityLinkLinkType_Unknown
}
func (s HistoricalFigureEntityLinkLinkType) String() string {
switch s {
case HistoricalFigureEntityLinkLinkType_Criminal:
return "criminal"
case HistoricalFigureEntityLinkLinkType_Enemy:
return "enemy"
case HistoricalFigureEntityLinkLinkType_FormerMember:
return "former member"
case HistoricalFigureEntityLinkLinkType_FormerPrisoner:
return "former prisoner"
case HistoricalFigureEntityLinkLinkType_FormerSlave:
return "former slave"
case HistoricalFigureEntityLinkLinkType_Member:
return "member"
case HistoricalFigureEntityLinkLinkType_Prisoner:
return "prisoner"
case HistoricalFigureEntityLinkLinkType_Slave:
return "slave"
}
return "unknown"
}
func (s HistoricalFigureEntityLinkLinkType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type HistoricalFigureEntityLink struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
LinkStrength int `json:"linkStrength" legend:"base"` // link_strength
LinkType HistoricalFigureEntityLinkLinkType `json:"linkType" legend:"base"` // link_type
}
func NewHistoricalFigureEntityLink() *HistoricalFigureEntityLink {
return &HistoricalFigureEntityLink{
EntityId: -1,
LinkStrength: -1,
}
}
func (x *HistoricalFigureEntityLink) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *HistoricalFigureEntityLink) RelatedToHf(id int) bool { return false }
func (x *HistoricalFigureEntityLink) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalFigureEntityLink) RelatedToSite(id int) bool { return false }
func (x *HistoricalFigureEntityLink) RelatedToRegion(id int) bool { return false }
func (x *HistoricalFigureEntityLink) CheckFields() {
}
func (x *HistoricalFigureEntityLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.LinkStrength != -1 {
d["linkStrength"] = x.LinkStrength
}
if x.LinkType != 0 {
d["linkType"] = x.LinkType
}
return json.Marshal(d)
}
type HistoricalFigureSiteProperty struct {
PropertyId int `json:"propertyId" legend:"base"` // property_id
SiteId int `json:"siteId" legend:"base"` // site_id
}
func NewHistoricalFigureSiteProperty() *HistoricalFigureSiteProperty {
return &HistoricalFigureSiteProperty{
PropertyId: -1,
SiteId: -1,
}
}
func (x *HistoricalFigureSiteProperty) RelatedToEntity(id int) bool { return false }
func (x *HistoricalFigureSiteProperty) RelatedToHf(id int) bool { return false }
func (x *HistoricalFigureSiteProperty) RelatedToArtifact(id int) bool { return false }
func (x *HistoricalFigureSiteProperty) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *HistoricalFigureSiteProperty) RelatedToRegion(id int) bool { return false }
func (x *HistoricalFigureSiteProperty) CheckFields() {
}
func (x *HistoricalFigureSiteProperty) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.PropertyId != -1 {
d["propertyId"] = x.PropertyId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
return json.Marshal(d)
}
type HonorRequiredSkill int
const (
HonorRequiredSkill_Unknown HonorRequiredSkill = iota
HonorRequiredSkill_AXE
HonorRequiredSkill_BOW
HonorRequiredSkill_CROSSBOW
HonorRequiredSkill_HAMMER
HonorRequiredSkill_MACE
HonorRequiredSkill_PIKE
HonorRequiredSkill_SPEAR
HonorRequiredSkill_SWORD
HonorRequiredSkill_WHIP
)
func parseHonorRequiredSkill(s string) HonorRequiredSkill {
switch s {
case "AXE":
return HonorRequiredSkill_AXE
case "BOW":
return HonorRequiredSkill_BOW
case "CROSSBOW":
return HonorRequiredSkill_CROSSBOW
case "HAMMER":
return HonorRequiredSkill_HAMMER
case "MACE":
return HonorRequiredSkill_MACE
case "PIKE":
return HonorRequiredSkill_PIKE
case "SPEAR":
return HonorRequiredSkill_SPEAR
case "SWORD":
return HonorRequiredSkill_SWORD
case "WHIP":
return HonorRequiredSkill_WHIP
}
return HonorRequiredSkill_Unknown
}
func (s HonorRequiredSkill) String() string {
switch s {
case HonorRequiredSkill_AXE:
return "axe"
case HonorRequiredSkill_BOW:
return "bow"
case HonorRequiredSkill_CROSSBOW:
return "crossbow"
case HonorRequiredSkill_HAMMER:
return "hammer"
case HonorRequiredSkill_MACE:
return "mace"
case HonorRequiredSkill_PIKE:
return "pike"
case HonorRequiredSkill_SPEAR:
return "spear"
case HonorRequiredSkill_SWORD:
return "sword"
case HonorRequiredSkill_WHIP:
return "whip"
}
return "unknown"
}
func (s HonorRequiredSkill) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type Honor struct {
ExemptEpid int `json:"exemptEpid" legend:"base"` // exempt_epid
ExemptFormerEpid int `json:"exemptFormerEpid" legend:"base"` // exempt_former_epid
GivesPrecedence int `json:"givesPrecedence" legend:"base"` // gives_precedence
GrantedToEverybody bool `json:"grantedToEverybody" legend:"base"` // granted_to_everybody
Id_ int `json:"id" legend:"base"` // id
Name_ string `json:"name" legend:"base"` // name
RequiredBattles int `json:"requiredBattles" legend:"base"` // required_battles
RequiredKills int `json:"requiredKills" legend:"base"` // required_kills
RequiredSkill HonorRequiredSkill `json:"requiredSkill" legend:"base"` // required_skill
RequiredSkillIpTotal int `json:"requiredSkillIpTotal" legend:"base"` // required_skill_ip_total
RequiredYears int `json:"requiredYears" legend:"base"` // required_years
RequiresAnyMeleeOrRangedSkill bool `json:"requiresAnyMeleeOrRangedSkill" legend:"base"` // requires_any_melee_or_ranged_skill
}
func NewHonor() *Honor {
return &Honor{
ExemptEpid: -1,
ExemptFormerEpid: -1,
GivesPrecedence: -1,
Id_: -1,
RequiredBattles: -1,
RequiredKills: -1,
RequiredSkillIpTotal: -1,
RequiredYears: -1,
}
}
func (x *Honor) Id() int { return x.Id_ }
func (x *Honor) setId(id int) { x.Id_ = id }
func (x *Honor) Name() string { return x.Name_ }
func (x *Honor) RelatedToEntity(id int) bool { return false }
func (x *Honor) RelatedToHf(id int) bool { return false }
func (x *Honor) RelatedToArtifact(id int) bool { return false }
func (x *Honor) RelatedToSite(id int) bool { return false }
func (x *Honor) RelatedToRegion(id int) bool { return false }
func (x *Honor) CheckFields() {
}
func (x *Honor) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ExemptEpid != -1 {
d["exemptEpid"] = x.ExemptEpid
}
if x.ExemptFormerEpid != -1 {
d["exemptFormerEpid"] = x.ExemptFormerEpid
}
if x.GivesPrecedence != -1 {
d["givesPrecedence"] = x.GivesPrecedence
}
d["grantedToEverybody"] = x.GrantedToEverybody
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
if x.RequiredBattles != -1 {
d["requiredBattles"] = x.RequiredBattles
}
if x.RequiredKills != -1 {
d["requiredKills"] = x.RequiredKills
}
if x.RequiredSkill != 0 {
d["requiredSkill"] = x.RequiredSkill
}
if x.RequiredSkillIpTotal != -1 {
d["requiredSkillIpTotal"] = x.RequiredSkillIpTotal
}
if x.RequiredYears != -1 {
d["requiredYears"] = x.RequiredYears
}
d["requiresAnyMeleeOrRangedSkill"] = x.RequiresAnyMeleeOrRangedSkill
return json.Marshal(d)
}
type HonorEntity struct {
Battles int `json:"battles" legend:"base"` // battles
Entity int `json:"entity" legend:"base"` // entity
HonorId []int `json:"honorId" legend:"base"` // honor_id
Kills int `json:"kills" legend:"base"` // kills
}
func NewHonorEntity() *HonorEntity {
return &HonorEntity{
Battles: -1,
Entity: -1,
Kills: -1,
}
}
func (x *HonorEntity) RelatedToEntity(id int) bool { return x.Entity == id }
func (x *HonorEntity) RelatedToHf(id int) bool { return false }
func (x *HonorEntity) RelatedToArtifact(id int) bool { return false }
func (x *HonorEntity) RelatedToSite(id int) bool { return false }
func (x *HonorEntity) RelatedToRegion(id int) bool { return false }
func (x *HonorEntity) CheckFields() {
}
func (x *HonorEntity) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Battles != -1 {
d["battles"] = x.Battles
}
if x.Entity != -1 {
d["entity"] = x.Entity
}
d["honorId"] = x.HonorId
if x.Kills != -1 {
d["kills"] = x.Kills
}
return json.Marshal(d)
}
type IdentityProfession int
const (
IdentityProfession_Unknown IdentityProfession = iota
IdentityProfession_Bard
IdentityProfession_BeastHunter
IdentityProfession_Criminal
IdentityProfession_Dancer
IdentityProfession_Mercenary
IdentityProfession_Merchant
IdentityProfession_Monk
IdentityProfession_MonsterSlayer
IdentityProfession_Peddler
IdentityProfession_Pilgrim
IdentityProfession_Poet
IdentityProfession_Prophet
IdentityProfession_Scholar
IdentityProfession_Snatcher
IdentityProfession_Standard
)
func parseIdentityProfession(s string) IdentityProfession {
switch s {
case "bard":
return IdentityProfession_Bard
case "beast_hunter":
return IdentityProfession_BeastHunter
case "criminal":
return IdentityProfession_Criminal
case "dancer":
return IdentityProfession_Dancer
case "mercenary":
return IdentityProfession_Mercenary
case "merchant":
return IdentityProfession_Merchant
case "monk":
return IdentityProfession_Monk
case "monster_slayer":
return IdentityProfession_MonsterSlayer
case "peddler":
return IdentityProfession_Peddler
case "pilgrim":
return IdentityProfession_Pilgrim
case "poet":
return IdentityProfession_Poet
case "prophet":
return IdentityProfession_Prophet
case "scholar":
return IdentityProfession_Scholar
case "snatcher":
return IdentityProfession_Snatcher
case "standard":
return IdentityProfession_Standard
}
return IdentityProfession_Unknown
}
func (s IdentityProfession) String() string {
switch s {
case IdentityProfession_Bard:
return "bard"
case IdentityProfession_BeastHunter:
return "beast hunter"
case IdentityProfession_Criminal:
return "criminal"
case IdentityProfession_Dancer:
return "dancer"
case IdentityProfession_Mercenary:
return "mercenary"
case IdentityProfession_Merchant:
return "merchant"
case IdentityProfession_Monk:
return "monk"
case IdentityProfession_MonsterSlayer:
return "monster slayer"
case IdentityProfession_Peddler:
return "peddler"
case IdentityProfession_Pilgrim:
return "pilgrim"
case IdentityProfession_Poet:
return "poet"
case IdentityProfession_Prophet:
return "prophet"
case IdentityProfession_Scholar:
return "scholar"
case IdentityProfession_Snatcher:
return "snatcher"
case IdentityProfession_Standard:
return "standard"
}
return "unknown"
}
func (s IdentityProfession) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type Identity struct {
BirthSecond int `json:"birthSecond" legend:"plus"` // birth_second
BirthYear int `json:"birthYear" legend:"plus"` // birth_year
Caste string `json:"caste" legend:"plus"` // caste
EntityId int `json:"entityId" legend:"plus"` // entity_id
HistfigId int `json:"histfigId" legend:"plus"` // histfig_id
Id_ int `json:"id" legend:"plus"` // id
Name_ string `json:"name" legend:"plus"` // name
NemesisId int `json:"nemesisId" legend:"plus"` // nemesis_id
Profession IdentityProfession `json:"profession" legend:"plus"` // profession
Race string `json:"race" legend:"plus"` // race
}
func NewIdentity() *Identity {
return &Identity{
BirthSecond: -1,
BirthYear: -1,
EntityId: -1,
HistfigId: -1,
Id_: -1,
NemesisId: -1,
}
}
func (x *Identity) Id() int { return x.Id_ }
func (x *Identity) setId(id int) { x.Id_ = id }
func (x *Identity) Name() string { return x.Name_ }
func (x *Identity) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *Identity) RelatedToHf(id int) bool { return x.HistfigId == id }
func (x *Identity) RelatedToArtifact(id int) bool { return false }
func (x *Identity) RelatedToSite(id int) bool { return false }
func (x *Identity) RelatedToRegion(id int) bool { return false }
func (x *Identity) CheckFields() {
}
func (x *Identity) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.BirthSecond != -1 {
d["birthSecond"] = x.BirthSecond
}
if x.BirthYear != -1 {
d["birthYear"] = x.BirthYear
}
d["caste"] = x.Caste
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.HistfigId != -1 {
d["histfigId"] = x.HistfigId
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
if x.NemesisId != -1 {
d["nemesisId"] = x.NemesisId
}
if x.Profession != 0 {
d["profession"] = x.Profession
}
d["race"] = x.Race
return json.Marshal(d)
}
type IntrigueActorRole int
const (
IntrigueActorRole_Unknown IntrigueActorRole = iota
IntrigueActorRole_Asset
IntrigueActorRole_CorruptPositionHolder
IntrigueActorRole_DeliveryTarget
IntrigueActorRole_Enemy
IntrigueActorRole_Handler
IntrigueActorRole_Lieutenant
IntrigueActorRole_Master
IntrigueActorRole_PossibleThreat
IntrigueActorRole_PossiblyUnknownDirector
IntrigueActorRole_PotentialEmployer
IntrigueActorRole_Rebuffed
IntrigueActorRole_SourceOfFunds
IntrigueActorRole_SourceOfFundsForMaster
IntrigueActorRole_SuspectedCriminal
IntrigueActorRole_UnderworldContact
IntrigueActorRole_UsableAssassin
IntrigueActorRole_UsableSnatcher
IntrigueActorRole_UsableThief
)
func parseIntrigueActorRole(s string) IntrigueActorRole {
switch s {
case "asset":
return IntrigueActorRole_Asset
case "corrupt position holder":
return IntrigueActorRole_CorruptPositionHolder
case "delivery target":
return IntrigueActorRole_DeliveryTarget
case "enemy":
return IntrigueActorRole_Enemy
case "handler":
return IntrigueActorRole_Handler
case "lieutenant":
return IntrigueActorRole_Lieutenant
case "master":
return IntrigueActorRole_Master
case "possible threat":
return IntrigueActorRole_PossibleThreat
case "possibly unknown director":
return IntrigueActorRole_PossiblyUnknownDirector
case "potential employer":
return IntrigueActorRole_PotentialEmployer
case "rebuffed":
return IntrigueActorRole_Rebuffed
case "source of funds":
return IntrigueActorRole_SourceOfFunds
case "source of funds for master":
return IntrigueActorRole_SourceOfFundsForMaster
case "suspected criminal":
return IntrigueActorRole_SuspectedCriminal
case "underworld contact":
return IntrigueActorRole_UnderworldContact
case "usable assassin":
return IntrigueActorRole_UsableAssassin
case "usable snatcher":
return IntrigueActorRole_UsableSnatcher
case "usable thief":
return IntrigueActorRole_UsableThief
}
return IntrigueActorRole_Unknown
}
func (s IntrigueActorRole) String() string {
switch s {
case IntrigueActorRole_Asset:
return "asset"
case IntrigueActorRole_CorruptPositionHolder:
return "corrupt position holder"
case IntrigueActorRole_DeliveryTarget:
return "delivery target"
case IntrigueActorRole_Enemy:
return "enemy"
case IntrigueActorRole_Handler:
return "handler"
case IntrigueActorRole_Lieutenant:
return "lieutenant"
case IntrigueActorRole_Master:
return "master"
case IntrigueActorRole_PossibleThreat:
return "possible threat"
case IntrigueActorRole_PossiblyUnknownDirector:
return "possibly unknown director"
case IntrigueActorRole_PotentialEmployer:
return "potential employer"
case IntrigueActorRole_Rebuffed:
return "rebuffed"
case IntrigueActorRole_SourceOfFunds:
return "source of funds"
case IntrigueActorRole_SourceOfFundsForMaster:
return "source of funds for master"
case IntrigueActorRole_SuspectedCriminal:
return "suspected criminal"
case IntrigueActorRole_UnderworldContact:
return "underworld contact"
case IntrigueActorRole_UsableAssassin:
return "usable assassin"
case IntrigueActorRole_UsableSnatcher:
return "usable snatcher"
case IntrigueActorRole_UsableThief:
return "usable thief"
}
return "unknown"
}
func (s IntrigueActorRole) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type IntrigueActorStrategy int
const (
IntrigueActorStrategy_Unknown IntrigueActorStrategy = iota
IntrigueActorStrategy_Avoid
IntrigueActorStrategy_CorruptAndPacify
IntrigueActorStrategy_Monitor
IntrigueActorStrategy_Neutralize
IntrigueActorStrategy_Obey
IntrigueActorStrategy_Tax
IntrigueActorStrategy_Torment
IntrigueActorStrategy_Use
IntrigueActorStrategy_WorkIfSuited
)
func parseIntrigueActorStrategy(s string) IntrigueActorStrategy {
switch s {
case "avoid":
return IntrigueActorStrategy_Avoid
case "corrupt and pacify":
return IntrigueActorStrategy_CorruptAndPacify
case "monitor":
return IntrigueActorStrategy_Monitor
case "neutralize":
return IntrigueActorStrategy_Neutralize
case "obey":
return IntrigueActorStrategy_Obey
case "tax":
return IntrigueActorStrategy_Tax
case "torment":
return IntrigueActorStrategy_Torment
case "use":
return IntrigueActorStrategy_Use
case "work if suited":
return IntrigueActorStrategy_WorkIfSuited
}
return IntrigueActorStrategy_Unknown
}
func (s IntrigueActorStrategy) String() string {
switch s {
case IntrigueActorStrategy_Avoid:
return "avoid"
case IntrigueActorStrategy_CorruptAndPacify:
return "corrupt and pacify"
case IntrigueActorStrategy_Monitor:
return "monitor"
case IntrigueActorStrategy_Neutralize:
return "neutralize"
case IntrigueActorStrategy_Obey:
return "obey"
case IntrigueActorStrategy_Tax:
return "tax"
case IntrigueActorStrategy_Torment:
return "torment"
case IntrigueActorStrategy_Use:
return "use"
case IntrigueActorStrategy_WorkIfSuited:
return "work if suited"
}
return "unknown"
}
func (s IntrigueActorStrategy) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type IntrigueActor struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
HandleActorId int `json:"handleActorId" legend:"base"` // handle_actor_id
Hfid int `json:"hfid" legend:"base"` // hfid
LocalId int `json:"localId" legend:"base"` // local_id
PromisedActorImmortality bool `json:"promisedActorImmortality" legend:"base"` // promised_actor_immortality
PromisedMeImmortality bool `json:"promisedMeImmortality" legend:"base"` // promised_me_immortality
Role IntrigueActorRole `json:"role" legend:"base"` // role
Strategy IntrigueActorStrategy `json:"strategy" legend:"base"` // strategy
StrategyEnid int `json:"strategyEnid" legend:"base"` // strategy_enid
StrategyEppid int `json:"strategyEppid" legend:"base"` // strategy_eppid
}
func NewIntrigueActor() *IntrigueActor {
return &IntrigueActor{
EntityId: -1,
HandleActorId: -1,
Hfid: -1,
LocalId: -1,
StrategyEnid: -1,
StrategyEppid: -1,
}
}
func (x *IntrigueActor) RelatedToEntity(id int) bool { return x.EntityId == id || x.StrategyEnid == id }
func (x *IntrigueActor) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *IntrigueActor) RelatedToArtifact(id int) bool { return false }
func (x *IntrigueActor) RelatedToSite(id int) bool { return false }
func (x *IntrigueActor) RelatedToRegion(id int) bool { return false }
func (x *IntrigueActor) CheckFields() {
}
func (x *IntrigueActor) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.HandleActorId != -1 {
d["handleActorId"] = x.HandleActorId
}
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
if x.LocalId != -1 {
d["localId"] = x.LocalId
}
d["promisedActorImmortality"] = x.PromisedActorImmortality
d["promisedMeImmortality"] = x.PromisedMeImmortality
if x.Role != 0 {
d["role"] = x.Role
}
if x.Strategy != 0 {
d["strategy"] = x.Strategy
}
if x.StrategyEnid != -1 {
d["strategyEnid"] = x.StrategyEnid
}
if x.StrategyEppid != -1 {
d["strategyEppid"] = x.StrategyEppid
}
return json.Marshal(d)
}
type IntriguePlotType int
const (
IntriguePlotType_Unknown IntriguePlotType = iota
IntriguePlotType_AcquireArtifact
IntriguePlotType_AssassinateActor
IntriguePlotType_AttainRank
IntriguePlotType_BecomeImmortal
IntriguePlotType_CorruptActorsGovernment
IntriguePlotType_CorruptlyPunishActor
IntriguePlotType_Counterintelligence
IntriguePlotType_DirectWarToActor
IntriguePlotType_FrameActor
IntriguePlotType_GrowAssetNetwork
IntriguePlotType_GrowCorruptionNetwork
IntriguePlotType_GrowFundingNetwork
IntriguePlotType_InfiltrateSociety
IntriguePlotType_KidnapActor
IntriguePlotType_SabotageActor
IntriguePlotType_UndeadWorldConquest
)
func parseIntriguePlotType(s string) IntriguePlotType {
switch s {
case "acquire artifact":
return IntriguePlotType_AcquireArtifact
case "assassinate actor":
return IntriguePlotType_AssassinateActor
case "attain rank":
return IntriguePlotType_AttainRank
case "become immortal":
return IntriguePlotType_BecomeImmortal
case "corrupt actor's government":
return IntriguePlotType_CorruptActorsGovernment
case "corruptly punish actor":
return IntriguePlotType_CorruptlyPunishActor
case "counterintelligence":
return IntriguePlotType_Counterintelligence
case "direct war to actor":
return IntriguePlotType_DirectWarToActor
case "frame actor":
return IntriguePlotType_FrameActor
case "grow asset network":
return IntriguePlotType_GrowAssetNetwork
case "grow corruption network":
return IntriguePlotType_GrowCorruptionNetwork
case "grow funding network":
return IntriguePlotType_GrowFundingNetwork
case "infiltrate society":
return IntriguePlotType_InfiltrateSociety
case "kidnap actor":
return IntriguePlotType_KidnapActor
case "sabotage actor":
return IntriguePlotType_SabotageActor
case "undead world conquest":
return IntriguePlotType_UndeadWorldConquest
}
return IntriguePlotType_Unknown
}
func (s IntriguePlotType) String() string {
switch s {
case IntriguePlotType_AcquireArtifact:
return "acquire artifact"
case IntriguePlotType_AssassinateActor:
return "assassinate actor"
case IntriguePlotType_AttainRank:
return "attain rank"
case IntriguePlotType_BecomeImmortal:
return "become immortal"
case IntriguePlotType_CorruptActorsGovernment:
return "corrupt actors government"
case IntriguePlotType_CorruptlyPunishActor:
return "corruptly punish actor"
case IntriguePlotType_Counterintelligence:
return "counterintelligence"
case IntriguePlotType_DirectWarToActor:
return "direct war to actor"
case IntriguePlotType_FrameActor:
return "frame actor"
case IntriguePlotType_GrowAssetNetwork:
return "grow asset network"
case IntriguePlotType_GrowCorruptionNetwork:
return "grow corruption network"
case IntriguePlotType_GrowFundingNetwork:
return "grow funding network"
case IntriguePlotType_InfiltrateSociety:
return "infiltrate society"
case IntriguePlotType_KidnapActor:
return "kidnap actor"
case IntriguePlotType_SabotageActor:
return "sabotage actor"
case IntriguePlotType_UndeadWorldConquest:
return "undead world conquest"
}
return "unknown"
}
func (s IntriguePlotType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type IntriguePlot struct {
ActorId int `json:"actorId" legend:"base"` // actor_id
ArtifactId int `json:"artifactId" legend:"base"` // artifact_id
DelegatedPlotHfid int `json:"delegatedPlotHfid" legend:"base"` // delegated_plot_hfid
DelegatedPlotId int `json:"delegatedPlotId" legend:"base"` // delegated_plot_id
EntityId int `json:"entityId" legend:"base"` // entity_id
LocalId int `json:"localId" legend:"base"` // local_id
OnHold bool `json:"onHold" legend:"base"` // on_hold
ParentPlotHfid int `json:"parentPlotHfid" legend:"base"` // parent_plot_hfid
ParentPlotId int `json:"parentPlotId" legend:"base"` // parent_plot_id
PlotActor []*PlotActor `json:"plotActor" legend:"base"` // plot_actor
Type_ IntriguePlotType `json:"type" legend:"base"` // type
}
func NewIntriguePlot() *IntriguePlot {
return &IntriguePlot{
ActorId: -1,
ArtifactId: -1,
DelegatedPlotHfid: -1,
DelegatedPlotId: -1,
EntityId: -1,
LocalId: -1,
ParentPlotHfid: -1,
ParentPlotId: -1,
}
}
func (x *IntriguePlot) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *IntriguePlot) RelatedToHf(id int) bool {
return x.DelegatedPlotHfid == id || x.ParentPlotHfid == id
}
func (x *IntriguePlot) RelatedToArtifact(id int) bool { return x.ArtifactId == id }
func (x *IntriguePlot) RelatedToSite(id int) bool { return false }
func (x *IntriguePlot) RelatedToRegion(id int) bool { return false }
func (x *IntriguePlot) CheckFields() {
}
func (x *IntriguePlot) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ActorId != -1 {
d["actorId"] = x.ActorId
}
if x.ArtifactId != -1 {
d["artifactId"] = x.ArtifactId
}
if x.DelegatedPlotHfid != -1 {
d["delegatedPlotHfid"] = x.DelegatedPlotHfid
}
if x.DelegatedPlotId != -1 {
d["delegatedPlotId"] = x.DelegatedPlotId
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.LocalId != -1 {
d["localId"] = x.LocalId
}
d["onHold"] = x.OnHold
if x.ParentPlotHfid != -1 {
d["parentPlotHfid"] = x.ParentPlotHfid
}
if x.ParentPlotId != -1 {
d["parentPlotId"] = x.ParentPlotId
}
d["plotActor"] = x.PlotActor
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type Item struct {
NameString string `json:"nameString" legend:"base"` // name_string
PageNumber int `json:"pageNumber" legend:"base"` // page_number
PageWrittenContentId int `json:"pageWrittenContentId" legend:"base"` // page_written_content_id
WritingWrittenContentId int `json:"writingWrittenContentId" legend:"base"` // writing_written_content_id
}
func NewItem() *Item {
return &Item{
PageNumber: -1,
PageWrittenContentId: -1,
WritingWrittenContentId: -1,
}
}
func (x *Item) RelatedToEntity(id int) bool { return false }
func (x *Item) RelatedToHf(id int) bool { return false }
func (x *Item) RelatedToArtifact(id int) bool { return false }
func (x *Item) RelatedToSite(id int) bool { return false }
func (x *Item) RelatedToRegion(id int) bool { return false }
func (x *Item) CheckFields() {
}
func (x *Item) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["nameString"] = x.NameString
if x.PageNumber != -1 {
d["pageNumber"] = x.PageNumber
}
if x.PageWrittenContentId != -1 {
d["pageWrittenContentId"] = x.PageWrittenContentId
}
if x.WritingWrittenContentId != -1 {
d["writingWrittenContentId"] = x.WritingWrittenContentId
}
return json.Marshal(d)
}
type Landmass struct {
Coord1 string `json:"coord1" legend:"plus"` // coord_1
Coord2 string `json:"coord2" legend:"plus"` // coord_2
Id_ int `json:"id" legend:"plus"` // id
Name_ string `json:"name" legend:"plus"` // name
}
func NewLandmass() *Landmass {
return &Landmass{
Id_: -1,
}
}
func (x *Landmass) Id() int { return x.Id_ }
func (x *Landmass) setId(id int) { x.Id_ = id }
func (x *Landmass) Name() string { return x.Name_ }
func (x *Landmass) RelatedToEntity(id int) bool { return false }
func (x *Landmass) RelatedToHf(id int) bool { return false }
func (x *Landmass) RelatedToArtifact(id int) bool { return false }
func (x *Landmass) RelatedToSite(id int) bool { return false }
func (x *Landmass) RelatedToRegion(id int) bool { return false }
func (x *Landmass) CheckFields() {
}
func (x *Landmass) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coord1"] = x.Coord1
d["coord2"] = x.Coord2
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
return json.Marshal(d)
}
type MountainPeak struct {
Coords string `json:"coords" legend:"plus"` // coords
Height int `json:"height" legend:"plus"` // height
Id_ int `json:"id" legend:"plus"` // id
IsVolcano bool `json:"isVolcano" legend:"plus"` // is_volcano
Name_ string `json:"name" legend:"plus"` // name
}
func NewMountainPeak() *MountainPeak {
return &MountainPeak{
Height: -1,
Id_: -1,
}
}
func (x *MountainPeak) Id() int { return x.Id_ }
func (x *MountainPeak) setId(id int) { x.Id_ = id }
func (x *MountainPeak) Name() string { return x.Name_ }
func (x *MountainPeak) RelatedToEntity(id int) bool { return false }
func (x *MountainPeak) RelatedToHf(id int) bool { return false }
func (x *MountainPeak) RelatedToArtifact(id int) bool { return false }
func (x *MountainPeak) RelatedToSite(id int) bool { return false }
func (x *MountainPeak) RelatedToRegion(id int) bool { return false }
func (x *MountainPeak) CheckFields() {
}
func (x *MountainPeak) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coords"] = x.Coords
if x.Height != -1 {
d["height"] = x.Height
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["isVolcano"] = x.IsVolcano
d["name"] = x.Name_
return json.Marshal(d)
}
type MusicalForm struct {
Description string `json:"description" legend:"base"` // description
Id_ int `json:"id" legend:"both"` // id
Name_ string `json:"name" legend:"plus"` // name
}
func NewMusicalForm() *MusicalForm {
return &MusicalForm{
Id_: -1,
}
}
func (x *MusicalForm) Id() int { return x.Id_ }
func (x *MusicalForm) setId(id int) { x.Id_ = id }
func (x *MusicalForm) Name() string { return x.Name_ }
func (x *MusicalForm) RelatedToEntity(id int) bool { return false }
func (x *MusicalForm) RelatedToHf(id int) bool { return false }
func (x *MusicalForm) RelatedToArtifact(id int) bool { return false }
func (x *MusicalForm) RelatedToSite(id int) bool { return false }
func (x *MusicalForm) RelatedToRegion(id int) bool { return false }
func (x *MusicalForm) CheckFields() {
}
func (x *MusicalForm) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["description"] = x.Description
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
return json.Marshal(d)
}
type Occasion struct {
Event int `json:"event" legend:"plus"` // event
Id_ int `json:"id" legend:"plus"` // id
Name_ string `json:"name" legend:"plus"` // name
Schedule []*Schedule `json:"schedule" legend:"plus"` // schedule
}
func NewOccasion() *Occasion {
return &Occasion{
Event: -1,
Id_: -1,
}
}
func (x *Occasion) Id() int { return x.Id_ }
func (x *Occasion) setId(id int) { x.Id_ = id }
func (x *Occasion) Name() string { return x.Name_ }
func (x *Occasion) RelatedToEntity(id int) bool { return false }
func (x *Occasion) RelatedToHf(id int) bool { return false }
func (x *Occasion) RelatedToArtifact(id int) bool { return false }
func (x *Occasion) RelatedToSite(id int) bool { return false }
func (x *Occasion) RelatedToRegion(id int) bool { return false }
func (x *Occasion) CheckFields() {
}
func (x *Occasion) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Event != -1 {
d["event"] = x.Event
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
d["schedule"] = x.Schedule
return json.Marshal(d)
}
type PlotActorPlotRole int
const (
PlotActorPlotRole_Unknown PlotActorPlotRole = iota
PlotActorPlotRole_Assassin
PlotActorPlotRole_SourceOfFunds
PlotActorPlotRole_Thief
)
func parsePlotActorPlotRole(s string) PlotActorPlotRole {
switch s {
case "assassin":
return PlotActorPlotRole_Assassin
case "source of funds":
return PlotActorPlotRole_SourceOfFunds
case "thief":
return PlotActorPlotRole_Thief
}
return PlotActorPlotRole_Unknown
}
func (s PlotActorPlotRole) String() string {
switch s {
case PlotActorPlotRole_Assassin:
return "assassin"
case PlotActorPlotRole_SourceOfFunds:
return "source of funds"
case PlotActorPlotRole_Thief:
return "thief"
}
return "unknown"
}
func (s PlotActorPlotRole) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type PlotActor struct {
ActorId int `json:"actorId" legend:"base"` // actor_id
AgreementHasMessenger bool `json:"agreementHasMessenger" legend:"base"` // agreement_has_messenger
AgreementId int `json:"agreementId" legend:"base"` // agreement_id
PlotRole PlotActorPlotRole `json:"plotRole" legend:"base"` // plot_role
}
func NewPlotActor() *PlotActor {
return &PlotActor{
ActorId: -1,
AgreementId: -1,
}
}
func (x *PlotActor) RelatedToEntity(id int) bool { return false }
func (x *PlotActor) RelatedToHf(id int) bool { return false }
func (x *PlotActor) RelatedToArtifact(id int) bool { return false }
func (x *PlotActor) RelatedToSite(id int) bool { return false }
func (x *PlotActor) RelatedToRegion(id int) bool { return false }
func (x *PlotActor) CheckFields() {
}
func (x *PlotActor) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.ActorId != -1 {
d["actorId"] = x.ActorId
}
d["agreementHasMessenger"] = x.AgreementHasMessenger
if x.AgreementId != -1 {
d["agreementId"] = x.AgreementId
}
if x.PlotRole != 0 {
d["plotRole"] = x.PlotRole
}
return json.Marshal(d)
}
type PoeticForm struct {
Description string `json:"description" legend:"base"` // description
Id_ int `json:"id" legend:"both"` // id
Name_ string `json:"name" legend:"plus"` // name
}
func NewPoeticForm() *PoeticForm {
return &PoeticForm{
Id_: -1,
}
}
func (x *PoeticForm) Id() int { return x.Id_ }
func (x *PoeticForm) setId(id int) { x.Id_ = id }
func (x *PoeticForm) Name() string { return x.Name_ }
func (x *PoeticForm) RelatedToEntity(id int) bool { return false }
func (x *PoeticForm) RelatedToHf(id int) bool { return false }
func (x *PoeticForm) RelatedToArtifact(id int) bool { return false }
func (x *PoeticForm) RelatedToSite(id int) bool { return false }
func (x *PoeticForm) RelatedToRegion(id int) bool { return false }
func (x *PoeticForm) CheckFields() {
}
func (x *PoeticForm) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["description"] = x.Description
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
return json.Marshal(d)
}
type ReferenceType int
const (
ReferenceType_Unknown ReferenceType = iota
ReferenceType_ABSTRACTBUILDING
ReferenceType_ARTIFACT
ReferenceType_DANCEFORM
ReferenceType_ENTITY
ReferenceType_HISTORICALEVENT
ReferenceType_HISTORICALFIGURE
ReferenceType_INTERACTION
ReferenceType_KNOWLEDGESCHOLARFLAG
ReferenceType_LANGUAGE
ReferenceType_MUSICALFORM
ReferenceType_POETICFORM
ReferenceType_SITE
ReferenceType_SUBREGION
ReferenceType_VALUELEVEL
ReferenceType_WRITTENCONTENT
)
func parseReferenceType(s string) ReferenceType {
switch s {
case "ABSTRACT_BUILDING":
return ReferenceType_ABSTRACTBUILDING
case "ARTIFACT":
return ReferenceType_ARTIFACT
case "DANCE_FORM":
return ReferenceType_DANCEFORM
case "ENTITY":
return ReferenceType_ENTITY
case "HISTORICAL_EVENT":
return ReferenceType_HISTORICALEVENT
case "HISTORICAL_FIGURE":
return ReferenceType_HISTORICALFIGURE
case "INTERACTION":
return ReferenceType_INTERACTION
case "KNOWLEDGE_SCHOLAR_FLAG":
return ReferenceType_KNOWLEDGESCHOLARFLAG
case "LANGUAGE":
return ReferenceType_LANGUAGE
case "MUSICAL_FORM":
return ReferenceType_MUSICALFORM
case "POETIC_FORM":
return ReferenceType_POETICFORM
case "SITE":
return ReferenceType_SITE
case "SUBREGION":
return ReferenceType_SUBREGION
case "VALUE_LEVEL":
return ReferenceType_VALUELEVEL
case "WRITTEN_CONTENT":
return ReferenceType_WRITTENCONTENT
}
return ReferenceType_Unknown
}
func (s ReferenceType) String() string {
switch s {
case ReferenceType_ABSTRACTBUILDING:
return "abstractbuilding"
case ReferenceType_ARTIFACT:
return "artifact"
case ReferenceType_DANCEFORM:
return "danceform"
case ReferenceType_ENTITY:
return "entity"
case ReferenceType_HISTORICALEVENT:
return "historicalevent"
case ReferenceType_HISTORICALFIGURE:
return "historicalfigure"
case ReferenceType_INTERACTION:
return "interaction"
case ReferenceType_KNOWLEDGESCHOLARFLAG:
return "knowledgescholarflag"
case ReferenceType_LANGUAGE:
return "language"
case ReferenceType_MUSICALFORM:
return "musicalform"
case ReferenceType_POETICFORM:
return "poeticform"
case ReferenceType_SITE:
return "site"
case ReferenceType_SUBREGION:
return "subregion"
case ReferenceType_VALUELEVEL:
return "valuelevel"
case ReferenceType_WRITTENCONTENT:
return "writtencontent"
}
return "unknown"
}
func (s ReferenceType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type Reference struct {
Id_ int `json:"id" legend:"plus"` // id
Type_ ReferenceType `json:"type" legend:"plus"` // type
}
func NewReference() *Reference {
return &Reference{
Id_: -1,
}
}
func (x *Reference) Id() int { return x.Id_ }
func (x *Reference) setId(id int) { x.Id_ = id }
func (x *Reference) RelatedToEntity(id int) bool { return false }
func (x *Reference) RelatedToHf(id int) bool { return false }
func (x *Reference) RelatedToArtifact(id int) bool { return false }
func (x *Reference) RelatedToSite(id int) bool { return false }
func (x *Reference) RelatedToRegion(id int) bool { return false }
func (x *Reference) CheckFields() {
}
func (x *Reference) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Id_ != -1 {
d["id"] = x.Id_
}
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type RegionEvilness int
const (
RegionEvilness_Unknown RegionEvilness = iota
RegionEvilness_Evil
RegionEvilness_Good
RegionEvilness_Neutral
)
func parseRegionEvilness(s string) RegionEvilness {
switch s {
case "evil":
return RegionEvilness_Evil
case "good":
return RegionEvilness_Good
case "neutral":
return RegionEvilness_Neutral
}
return RegionEvilness_Unknown
}
func (s RegionEvilness) String() string {
switch s {
case RegionEvilness_Evil:
return "evil"
case RegionEvilness_Good:
return "good"
case RegionEvilness_Neutral:
return "neutral"
}
return "unknown"
}
func (s RegionEvilness) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type RegionType int
const (
RegionType_Unknown RegionType = iota
RegionType_Desert
RegionType_Forest
RegionType_Glacier
RegionType_Grassland
RegionType_Hills
RegionType_Lake
RegionType_Mountains
RegionType_Ocean
RegionType_Tundra
RegionType_Wetland
)
func parseRegionType(s string) RegionType {
switch s {
case "Desert":
return RegionType_Desert
case "Forest":
return RegionType_Forest
case "Glacier":
return RegionType_Glacier
case "Grassland":
return RegionType_Grassland
case "Hills":
return RegionType_Hills
case "Lake":
return RegionType_Lake
case "Mountains":
return RegionType_Mountains
case "Ocean":
return RegionType_Ocean
case "Tundra":
return RegionType_Tundra
case "Wetland":
return RegionType_Wetland
}
return RegionType_Unknown
}
func (s RegionType) String() string {
switch s {
case RegionType_Desert:
return "desert"
case RegionType_Forest:
return "forest"
case RegionType_Glacier:
return "glacier"
case RegionType_Grassland:
return "grassland"
case RegionType_Hills:
return "hills"
case RegionType_Lake:
return "lake"
case RegionType_Mountains:
return "mountains"
case RegionType_Ocean:
return "ocean"
case RegionType_Tundra:
return "tundra"
case RegionType_Wetland:
return "wetland"
}
return "unknown"
}
func (s RegionType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type Region struct {
Coords string `json:"coords" legend:"plus"` // coords
Evilness RegionEvilness `json:"evilness" legend:"plus"` // evilness
ForceId int `json:"forceId" legend:"plus"` // force_id
Id_ int `json:"id" legend:"both"` // id
Name_ string `json:"name" legend:"base"` // name
Type_ RegionType `json:"type" legend:"base"` // type
}
func NewRegion() *Region {
return &Region{
ForceId: -1,
Id_: -1,
}
}
func (x *Region) Id() int { return x.Id_ }
func (x *Region) setId(id int) { x.Id_ = id }
func (x *Region) Name() string { return x.Name_ }
func (x *Region) RelatedToEntity(id int) bool { return false }
func (x *Region) RelatedToHf(id int) bool { return false }
func (x *Region) RelatedToArtifact(id int) bool { return false }
func (x *Region) RelatedToSite(id int) bool { return false }
func (x *Region) RelatedToRegion(id int) bool { return false }
func (x *Region) CheckFields() {
}
func (x *Region) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coords"] = x.Coords
if x.Evilness != 0 {
d["evilness"] = x.Evilness
}
if x.ForceId != -1 {
d["forceId"] = x.ForceId
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type RelationshipProfileHfHistorical struct {
Fear int `json:"fear" legend:"base"` // fear
HfId int `json:"hfId" legend:"base"` // hf_id
Love int `json:"love" legend:"base"` // love
Loyalty int `json:"loyalty" legend:"base"` // loyalty
RepEnemyFighter int `json:"repEnemyFighter" legend:"base"` // rep_enemy_fighter
RepHero int `json:"repHero" legend:"base"` // rep_hero
RepHunter int `json:"repHunter" legend:"base"` // rep_hunter
RepKiller int `json:"repKiller" legend:"base"` // rep_killer
RepPsychopath int `json:"repPsychopath" legend:"base"` // rep_psychopath
RepStoryteller int `json:"repStoryteller" legend:"base"` // rep_storyteller
RepViolent int `json:"repViolent" legend:"base"` // rep_violent
Respect int `json:"respect" legend:"base"` // respect
Trust int `json:"trust" legend:"base"` // trust
}
func NewRelationshipProfileHfHistorical() *RelationshipProfileHfHistorical {
return &RelationshipProfileHfHistorical{
Fear: -1,
HfId: -1,
Love: -1,
Loyalty: -1,
RepEnemyFighter: -1,
RepHero: -1,
RepHunter: -1,
RepKiller: -1,
RepPsychopath: -1,
RepStoryteller: -1,
RepViolent: -1,
Respect: -1,
Trust: -1,
}
}
func (x *RelationshipProfileHfHistorical) RelatedToEntity(id int) bool { return false }
func (x *RelationshipProfileHfHistorical) RelatedToHf(id int) bool { return x.HfId == id }
func (x *RelationshipProfileHfHistorical) RelatedToArtifact(id int) bool { return false }
func (x *RelationshipProfileHfHistorical) RelatedToSite(id int) bool { return false }
func (x *RelationshipProfileHfHistorical) RelatedToRegion(id int) bool { return false }
func (x *RelationshipProfileHfHistorical) CheckFields() {
}
func (x *RelationshipProfileHfHistorical) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Fear != -1 {
d["fear"] = x.Fear
}
if x.HfId != -1 {
d["hfId"] = x.HfId
}
if x.Love != -1 {
d["love"] = x.Love
}
if x.Loyalty != -1 {
d["loyalty"] = x.Loyalty
}
if x.RepEnemyFighter != -1 {
d["repEnemyFighter"] = x.RepEnemyFighter
}
if x.RepHero != -1 {
d["repHero"] = x.RepHero
}
if x.RepHunter != -1 {
d["repHunter"] = x.RepHunter
}
if x.RepKiller != -1 {
d["repKiller"] = x.RepKiller
}
if x.RepPsychopath != -1 {
d["repPsychopath"] = x.RepPsychopath
}
if x.RepStoryteller != -1 {
d["repStoryteller"] = x.RepStoryteller
}
if x.RepViolent != -1 {
d["repViolent"] = x.RepViolent
}
if x.Respect != -1 {
d["respect"] = x.Respect
}
if x.Trust != -1 {
d["trust"] = x.Trust
}
return json.Marshal(d)
}
type RelationshipProfileHfIdentity struct {
Fear int `json:"fear" legend:"base"` // fear
Id_ int `json:"id" legend:"base"` // id
Love int `json:"love" legend:"base"` // love
Loyalty int `json:"loyalty" legend:"base"` // loyalty
RepPsychopath int `json:"repPsychopath" legend:"base"` // rep_psychopath
Respect int `json:"respect" legend:"base"` // respect
Trust int `json:"trust" legend:"base"` // trust
}
func NewRelationshipProfileHfIdentity() *RelationshipProfileHfIdentity {
return &RelationshipProfileHfIdentity{
Fear: -1,
Id_: -1,
Love: -1,
Loyalty: -1,
RepPsychopath: -1,
Respect: -1,
Trust: -1,
}
}
func (x *RelationshipProfileHfIdentity) Id() int { return x.Id_ }
func (x *RelationshipProfileHfIdentity) setId(id int) { x.Id_ = id }
func (x *RelationshipProfileHfIdentity) RelatedToEntity(id int) bool { return false }
func (x *RelationshipProfileHfIdentity) RelatedToHf(id int) bool { return false }
func (x *RelationshipProfileHfIdentity) RelatedToArtifact(id int) bool { return false }
func (x *RelationshipProfileHfIdentity) RelatedToSite(id int) bool { return false }
func (x *RelationshipProfileHfIdentity) RelatedToRegion(id int) bool { return false }
func (x *RelationshipProfileHfIdentity) CheckFields() {
}
func (x *RelationshipProfileHfIdentity) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Fear != -1 {
d["fear"] = x.Fear
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
if x.Love != -1 {
d["love"] = x.Love
}
if x.Loyalty != -1 {
d["loyalty"] = x.Loyalty
}
if x.RepPsychopath != -1 {
d["repPsychopath"] = x.RepPsychopath
}
if x.Respect != -1 {
d["respect"] = x.Respect
}
if x.Trust != -1 {
d["trust"] = x.Trust
}
return json.Marshal(d)
}
type RelationshipProfileHfVisual struct {
Fear int `json:"fear" legend:"base"` // fear
HfId int `json:"hfId" legend:"base"` // hf_id
KnownIdentityId []int `json:"knownIdentityId" legend:"base"` // known_identity_id
LastMeetSeconds72 int `json:"lastMeetSeconds72" legend:"base"` // last_meet_seconds72
LastMeetYear int `json:"lastMeetYear" legend:"base"` // last_meet_year
Love int `json:"love" legend:"base"` // love
Loyalty int `json:"loyalty" legend:"base"` // loyalty
MeetCount int `json:"meetCount" legend:"base"` // meet_count
RepBonded int `json:"repBonded" legend:"base"` // rep_bonded
RepComrade int `json:"repComrade" legend:"base"` // rep_comrade
RepFlatterer int `json:"repFlatterer" legend:"base"` // rep_flatterer
RepFriendly int `json:"repFriendly" legend:"base"` // rep_friendly
RepHero int `json:"repHero" legend:"base"` // rep_hero
RepHunter int `json:"repHunter" legend:"base"` // rep_hunter
RepInformationSource int `json:"repInformationSource" legend:"base"` // rep_information_source
RepKiller int `json:"repKiller" legend:"base"` // rep_killer
RepPsychopath int `json:"repPsychopath" legend:"base"` // rep_psychopath
RepQuarreler int `json:"repQuarreler" legend:"base"` // rep_quarreler
RepTradePartner int `json:"repTradePartner" legend:"base"` // rep_trade_partner
Respect int `json:"respect" legend:"base"` // respect
Trust int `json:"trust" legend:"base"` // trust
}
func NewRelationshipProfileHfVisual() *RelationshipProfileHfVisual {
return &RelationshipProfileHfVisual{
Fear: -1,
HfId: -1,
LastMeetSeconds72: -1,
LastMeetYear: -1,
Love: -1,
Loyalty: -1,
MeetCount: -1,
RepBonded: -1,
RepComrade: -1,
RepFlatterer: -1,
RepFriendly: -1,
RepHero: -1,
RepHunter: -1,
RepInformationSource: -1,
RepKiller: -1,
RepPsychopath: -1,
RepQuarreler: -1,
RepTradePartner: -1,
Respect: -1,
Trust: -1,
}
}
func (x *RelationshipProfileHfVisual) RelatedToEntity(id int) bool {
return containsInt(x.KnownIdentityId, id)
}
func (x *RelationshipProfileHfVisual) RelatedToHf(id int) bool { return x.HfId == id }
func (x *RelationshipProfileHfVisual) RelatedToArtifact(id int) bool { return false }
func (x *RelationshipProfileHfVisual) RelatedToSite(id int) bool { return false }
func (x *RelationshipProfileHfVisual) RelatedToRegion(id int) bool { return false }
func (x *RelationshipProfileHfVisual) CheckFields() {
}
func (x *RelationshipProfileHfVisual) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Fear != -1 {
d["fear"] = x.Fear
}
if x.HfId != -1 {
d["hfId"] = x.HfId
}
d["knownIdentityId"] = x.KnownIdentityId
if x.LastMeetSeconds72 != -1 {
d["lastMeetSeconds72"] = x.LastMeetSeconds72
}
if x.LastMeetYear != -1 {
d["lastMeetYear"] = x.LastMeetYear
}
if x.Love != -1 {
d["love"] = x.Love
}
if x.Loyalty != -1 {
d["loyalty"] = x.Loyalty
}
if x.MeetCount != -1 {
d["meetCount"] = x.MeetCount
}
if x.RepBonded != -1 {
d["repBonded"] = x.RepBonded
}
if x.RepComrade != -1 {
d["repComrade"] = x.RepComrade
}
if x.RepFlatterer != -1 {
d["repFlatterer"] = x.RepFlatterer
}
if x.RepFriendly != -1 {
d["repFriendly"] = x.RepFriendly
}
if x.RepHero != -1 {
d["repHero"] = x.RepHero
}
if x.RepHunter != -1 {
d["repHunter"] = x.RepHunter
}
if x.RepInformationSource != -1 {
d["repInformationSource"] = x.RepInformationSource
}
if x.RepKiller != -1 {
d["repKiller"] = x.RepKiller
}
if x.RepPsychopath != -1 {
d["repPsychopath"] = x.RepPsychopath
}
if x.RepQuarreler != -1 {
d["repQuarreler"] = x.RepQuarreler
}
if x.RepTradePartner != -1 {
d["repTradePartner"] = x.RepTradePartner
}
if x.Respect != -1 {
d["respect"] = x.Respect
}
if x.Trust != -1 {
d["trust"] = x.Trust
}
return json.Marshal(d)
}
type River struct {
EndPos string `json:"endPos" legend:"plus"` // end_pos
Name_ string `json:"name" legend:"plus"` // name
Path string `json:"path" legend:"plus"` // path
}
func NewRiver() *River {
return &River{}
}
func (x *River) Name() string { return x.Name_ }
func (x *River) RelatedToEntity(id int) bool { return false }
func (x *River) RelatedToHf(id int) bool { return false }
func (x *River) RelatedToArtifact(id int) bool { return false }
func (x *River) RelatedToSite(id int) bool { return false }
func (x *River) RelatedToRegion(id int) bool { return false }
func (x *River) CheckFields() {
}
func (x *River) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["endPos"] = x.EndPos
d["name"] = x.Name_
d["path"] = x.Path
return json.Marshal(d)
}
type ScheduleItemSubtype int
const (
ScheduleItemSubtype_Unknown ScheduleItemSubtype = iota
ScheduleItemSubtype_AstodStand
ScheduleItemSubtype_BattleAxe
ScheduleItemSubtype_Bow
ScheduleItemSubtype_Crossbow
ScheduleItemSubtype_Flail
ScheduleItemSubtype_GreatAxe
ScheduleItemSubtype_Halberd
ScheduleItemSubtype_Hive
ScheduleItemSubtype_LongSword
ScheduleItemSubtype_Mace
ScheduleItemSubtype_Maul
ScheduleItemSubtype_Morningstar
ScheduleItemSubtype_Pedestal
ScheduleItemSubtype_Pike
ScheduleItemSubtype_Quire
ScheduleItemSubtype_RohirBody
ScheduleItemSubtype_Scimitar
ScheduleItemSubtype_ShortSword
ScheduleItemSubtype_Spear
ScheduleItemSubtype_TwoHandedSword
ScheduleItemSubtype_WarHammer
ScheduleItemSubtype_Whip
)
func parseScheduleItemSubtype(s string) ScheduleItemSubtype {
switch s {
case "astod stand":
return ScheduleItemSubtype_AstodStand
case "battle axe":
return ScheduleItemSubtype_BattleAxe
case "bow":
return ScheduleItemSubtype_Bow
case "crossbow":
return ScheduleItemSubtype_Crossbow
case "flail":
return ScheduleItemSubtype_Flail
case "great axe":
return ScheduleItemSubtype_GreatAxe
case "halberd":
return ScheduleItemSubtype_Halberd
case "hive":
return ScheduleItemSubtype_Hive
case "long sword":
return ScheduleItemSubtype_LongSword
case "mace":
return ScheduleItemSubtype_Mace
case "maul":
return ScheduleItemSubtype_Maul
case "morningstar":
return ScheduleItemSubtype_Morningstar
case "pedestal":
return ScheduleItemSubtype_Pedestal
case "pike":
return ScheduleItemSubtype_Pike
case "quire":
return ScheduleItemSubtype_Quire
case "rohir body":
return ScheduleItemSubtype_RohirBody
case "scimitar":
return ScheduleItemSubtype_Scimitar
case "short sword":
return ScheduleItemSubtype_ShortSword
case "spear":
return ScheduleItemSubtype_Spear
case "two-handed sword":
return ScheduleItemSubtype_TwoHandedSword
case "war hammer":
return ScheduleItemSubtype_WarHammer
case "whip":
return ScheduleItemSubtype_Whip
}
return ScheduleItemSubtype_Unknown
}
func (s ScheduleItemSubtype) String() string {
switch s {
case ScheduleItemSubtype_AstodStand:
return "astod stand"
case ScheduleItemSubtype_BattleAxe:
return "battle axe"
case ScheduleItemSubtype_Bow:
return "bow"
case ScheduleItemSubtype_Crossbow:
return "crossbow"
case ScheduleItemSubtype_Flail:
return "flail"
case ScheduleItemSubtype_GreatAxe:
return "great axe"
case ScheduleItemSubtype_Halberd:
return "halberd"
case ScheduleItemSubtype_Hive:
return "hive"
case ScheduleItemSubtype_LongSword:
return "long sword"
case ScheduleItemSubtype_Mace:
return "mace"
case ScheduleItemSubtype_Maul:
return "maul"
case ScheduleItemSubtype_Morningstar:
return "morningstar"
case ScheduleItemSubtype_Pedestal:
return "pedestal"
case ScheduleItemSubtype_Pike:
return "pike"
case ScheduleItemSubtype_Quire:
return "quire"
case ScheduleItemSubtype_RohirBody:
return "rohir body"
case ScheduleItemSubtype_Scimitar:
return "scimitar"
case ScheduleItemSubtype_ShortSword:
return "short sword"
case ScheduleItemSubtype_Spear:
return "spear"
case ScheduleItemSubtype_TwoHandedSword:
return "two handed sword"
case ScheduleItemSubtype_WarHammer:
return "war hammer"
case ScheduleItemSubtype_Whip:
return "whip"
}
return "unknown"
}
func (s ScheduleItemSubtype) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type ScheduleItemType int
const (
ScheduleItemType_Unknown ScheduleItemType = iota
ScheduleItemType_Tool
ScheduleItemType_Weapon
)
func parseScheduleItemType(s string) ScheduleItemType {
switch s {
case "tool":
return ScheduleItemType_Tool
case "weapon":
return ScheduleItemType_Weapon
}
return ScheduleItemType_Unknown
}
func (s ScheduleItemType) String() string {
switch s {
case ScheduleItemType_Tool:
return "tool"
case ScheduleItemType_Weapon:
return "weapon"
}
return "unknown"
}
func (s ScheduleItemType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type ScheduleType int
const (
ScheduleType_Unknown ScheduleType = iota
ScheduleType_Ceremony
ScheduleType_DanceCompetition
ScheduleType_DancePerformance
ScheduleType_FootRace
ScheduleType_GladiatoryCompetition
ScheduleType_MusicalCompetition
ScheduleType_MusicalPerformance
ScheduleType_PoetryCompetition
ScheduleType_PoetryRecital
ScheduleType_Procession
ScheduleType_Storytelling
ScheduleType_ThrowingCompetition
ScheduleType_WrestlingCompetition
)
func parseScheduleType(s string) ScheduleType {
switch s {
case "ceremony":
return ScheduleType_Ceremony
case "dance_competition":
return ScheduleType_DanceCompetition
case "dance_performance":
return ScheduleType_DancePerformance
case "foot_race":
return ScheduleType_FootRace
case "gladiatory_competition":
return ScheduleType_GladiatoryCompetition
case "musical_competition":
return ScheduleType_MusicalCompetition
case "musical_performance":
return ScheduleType_MusicalPerformance
case "poetry_competition":
return ScheduleType_PoetryCompetition
case "poetry_recital":
return ScheduleType_PoetryRecital
case "procession":
return ScheduleType_Procession
case "storytelling":
return ScheduleType_Storytelling
case "throwing_competition":
return ScheduleType_ThrowingCompetition
case "wrestling_competition":
return ScheduleType_WrestlingCompetition
}
return ScheduleType_Unknown
}
func (s ScheduleType) String() string {
switch s {
case ScheduleType_Ceremony:
return "ceremony"
case ScheduleType_DanceCompetition:
return "dance competition"
case ScheduleType_DancePerformance:
return "dance performance"
case ScheduleType_FootRace:
return "foot race"
case ScheduleType_GladiatoryCompetition:
return "gladiatory competition"
case ScheduleType_MusicalCompetition:
return "musical competition"
case ScheduleType_MusicalPerformance:
return "musical performance"
case ScheduleType_PoetryCompetition:
return "poetry competition"
case ScheduleType_PoetryRecital:
return "poetry recital"
case ScheduleType_Procession:
return "procession"
case ScheduleType_Storytelling:
return "storytelling"
case ScheduleType_ThrowingCompetition:
return "throwing competition"
case ScheduleType_WrestlingCompetition:
return "wrestling competition"
}
return "unknown"
}
func (s ScheduleType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type Schedule struct {
Feature []*Feature `json:"feature" legend:"plus"` // feature
Id_ int `json:"id" legend:"plus"` // id
ItemSubtype ScheduleItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype
ItemType ScheduleItemType `json:"itemType" legend:"plus"` // item_type
Reference int `json:"reference" legend:"plus"` // reference
Reference2 int `json:"reference2" legend:"plus"` // reference2
Type_ ScheduleType `json:"type" legend:"plus"` // type
}
func NewSchedule() *Schedule {
return &Schedule{
Id_: -1,
Reference: -1,
Reference2: -1,
}
}
func (x *Schedule) Id() int { return x.Id_ }
func (x *Schedule) setId(id int) { x.Id_ = id }
func (x *Schedule) RelatedToEntity(id int) bool { return false }
func (x *Schedule) RelatedToHf(id int) bool { return false }
func (x *Schedule) RelatedToArtifact(id int) bool { return false }
func (x *Schedule) RelatedToSite(id int) bool { return false }
func (x *Schedule) RelatedToRegion(id int) bool { return false }
func (x *Schedule) CheckFields() {
}
func (x *Schedule) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["feature"] = x.Feature
if x.Id_ != -1 {
d["id"] = x.Id_
}
if x.ItemSubtype != 0 {
d["itemSubtype"] = x.ItemSubtype
}
if x.ItemType != 0 {
d["itemType"] = x.ItemType
}
if x.Reference != -1 {
d["reference"] = x.Reference
}
if x.Reference2 != -1 {
d["reference2"] = x.Reference2
}
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type SiteType int
const (
SiteType_Unknown SiteType = iota
SiteType_Camp
SiteType_Castle
SiteType_Cave
SiteType_DarkFortress
SiteType_DarkPits
SiteType_ForestRetreat
SiteType_Fort
SiteType_Fortress
SiteType_Hamlet
SiteType_Hillocks
SiteType_ImportantLocation
SiteType_Labyrinth
SiteType_Lair
SiteType_Monastery
SiteType_MountainHalls
SiteType_Shrine
SiteType_Tomb
SiteType_Tower
SiteType_Town
SiteType_Vault
)
func parseSiteType(s string) SiteType {
switch s {
case "camp":
return SiteType_Camp
case "castle":
return SiteType_Castle
case "cave":
return SiteType_Cave
case "dark fortress":
return SiteType_DarkFortress
case "dark pits":
return SiteType_DarkPits
case "forest retreat":
return SiteType_ForestRetreat
case "fort":
return SiteType_Fort
case "fortress":
return SiteType_Fortress
case "hamlet":
return SiteType_Hamlet
case "hillocks":
return SiteType_Hillocks
case "important location":
return SiteType_ImportantLocation
case "labyrinth":
return SiteType_Labyrinth
case "lair":
return SiteType_Lair
case "monastery":
return SiteType_Monastery
case "mountain halls":
return SiteType_MountainHalls
case "shrine":
return SiteType_Shrine
case "tomb":
return SiteType_Tomb
case "tower":
return SiteType_Tower
case "town":
return SiteType_Town
case "vault":
return SiteType_Vault
}
return SiteType_Unknown
}
func (s SiteType) String() string {
switch s {
case SiteType_Camp:
return "camp"
case SiteType_Castle:
return "castle"
case SiteType_Cave:
return "cave"
case SiteType_DarkFortress:
return "dark fortress"
case SiteType_DarkPits:
return "dark pits"
case SiteType_ForestRetreat:
return "forest retreat"
case SiteType_Fort:
return "fort"
case SiteType_Fortress:
return "fortress"
case SiteType_Hamlet:
return "hamlet"
case SiteType_Hillocks:
return "hillocks"
case SiteType_ImportantLocation:
return "important location"
case SiteType_Labyrinth:
return "labyrinth"
case SiteType_Lair:
return "lair"
case SiteType_Monastery:
return "monastery"
case SiteType_MountainHalls:
return "mountain halls"
case SiteType_Shrine:
return "shrine"
case SiteType_Tomb:
return "tomb"
case SiteType_Tower:
return "tower"
case SiteType_Town:
return "town"
case SiteType_Vault:
return "vault"
}
return "unknown"
}
func (s SiteType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type Site struct {
CivId int `json:"civId" legend:"plus"` // civ_id
Coords string `json:"coords" legend:"base"` // coords
CurOwnerId int `json:"curOwnerId" legend:"plus"` // cur_owner_id
Id_ int `json:"id" legend:"both"` // id
Name_ string `json:"name" legend:"base"` // name
Rectangle string `json:"rectangle" legend:"base"` // rectangle
SiteProperties map[int]*SiteSiteProperty `json:"siteProperties" legend:"base"` // site_properties
Structures map[int]*Structure `json:"structures" legend:"both"` // structures
Type_ SiteType `json:"type" legend:"base"` // type
Ruin bool `json:"ruin" legend:"add"` // Ruin
}
func NewSite() *Site {
return &Site{
CivId: -1,
CurOwnerId: -1,
Id_: -1,
SiteProperties: make(map[int]*SiteSiteProperty),
Structures: make(map[int]*Structure),
}
}
func (x *Site) Id() int { return x.Id_ }
func (x *Site) setId(id int) { x.Id_ = id }
func (x *Site) Name() string { return x.Name_ }
func (x *Site) RelatedToEntity(id int) bool { return x.CivId == id }
func (x *Site) RelatedToHf(id int) bool { return false }
func (x *Site) RelatedToArtifact(id int) bool { return false }
func (x *Site) RelatedToSite(id int) bool { return false }
func (x *Site) RelatedToRegion(id int) bool { return false }
func (x *Site) CheckFields() {
}
func (x *Site) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.CivId != -1 {
d["civId"] = x.CivId
}
d["coords"] = x.Coords
if x.CurOwnerId != -1 {
d["curOwnerId"] = x.CurOwnerId
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
d["rectangle"] = x.Rectangle
d["siteProperties"] = x.SiteProperties
d["structures"] = x.Structures
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type SiteLinkLinkType int
const (
SiteLinkLinkType_Unknown SiteLinkLinkType = iota
SiteLinkLinkType_Hangout
SiteLinkLinkType_HomeSavedZone
SiteLinkLinkType_HomeSiteBuilding
SiteLinkLinkType_HomeSiteUnderground
SiteLinkLinkType_HomeStructure
SiteLinkLinkType_Lair
SiteLinkLinkType_Occupation
SiteLinkLinkType_SeatOfPower
)
func parseSiteLinkLinkType(s string) SiteLinkLinkType {
switch s {
case "hangout":
return SiteLinkLinkType_Hangout
case "home saved zone":
return SiteLinkLinkType_HomeSavedZone
case "home site building":
return SiteLinkLinkType_HomeSiteBuilding
case "home site underground":
return SiteLinkLinkType_HomeSiteUnderground
case "home structure":
return SiteLinkLinkType_HomeStructure
case "lair":
return SiteLinkLinkType_Lair
case "occupation":
return SiteLinkLinkType_Occupation
case "seat of power":
return SiteLinkLinkType_SeatOfPower
}
return SiteLinkLinkType_Unknown
}
func (s SiteLinkLinkType) String() string {
switch s {
case SiteLinkLinkType_Hangout:
return "hangout"
case SiteLinkLinkType_HomeSavedZone:
return "home saved zone"
case SiteLinkLinkType_HomeSiteBuilding:
return "home site building"
case SiteLinkLinkType_HomeSiteUnderground:
return "home site underground"
case SiteLinkLinkType_HomeStructure:
return "home structure"
case SiteLinkLinkType_Lair:
return "lair"
case SiteLinkLinkType_Occupation:
return "occupation"
case SiteLinkLinkType_SeatOfPower:
return "seat of power"
}
return "unknown"
}
func (s SiteLinkLinkType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type SiteLink struct {
EntityId int `json:"entityId" legend:"base"` // entity_id
LinkType SiteLinkLinkType `json:"linkType" legend:"base"` // link_type
OccupationId int `json:"occupationId" legend:"base"` // occupation_id
SiteId int `json:"siteId" legend:"base"` // site_id
SubId int `json:"subId" legend:"base"` // sub_id
}
func NewSiteLink() *SiteLink {
return &SiteLink{
EntityId: -1,
OccupationId: -1,
SiteId: -1,
SubId: -1,
}
}
func (x *SiteLink) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *SiteLink) RelatedToHf(id int) bool { return false }
func (x *SiteLink) RelatedToArtifact(id int) bool { return false }
func (x *SiteLink) RelatedToSite(id int) bool { return x.SiteId == id }
func (x *SiteLink) RelatedToRegion(id int) bool { return false }
func (x *SiteLink) CheckFields() {
}
func (x *SiteLink) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.LinkType != 0 {
d["linkType"] = x.LinkType
}
if x.OccupationId != -1 {
d["occupationId"] = x.OccupationId
}
if x.SiteId != -1 {
d["siteId"] = x.SiteId
}
if x.SubId != -1 {
d["subId"] = x.SubId
}
return json.Marshal(d)
}
type SiteSitePropertyType int
const (
SiteSitePropertyType_Unknown SiteSitePropertyType = iota
SiteSitePropertyType_House
)
func parseSiteSitePropertyType(s string) SiteSitePropertyType {
switch s {
case "house":
return SiteSitePropertyType_House
}
return SiteSitePropertyType_Unknown
}
func (s SiteSitePropertyType) String() string {
switch s {
case SiteSitePropertyType_House:
return "house"
}
return "unknown"
}
func (s SiteSitePropertyType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type SiteSiteProperty struct {
Id_ int `json:"id" legend:"base"` // id
OwnerHfid int `json:"ownerHfid" legend:"base"` // owner_hfid
StructureId int `json:"structureId" legend:"base"` // structure_id
Type_ SiteSitePropertyType `json:"type" legend:"base"` // type
}
func NewSiteSiteProperty() *SiteSiteProperty {
return &SiteSiteProperty{
Id_: -1,
OwnerHfid: -1,
StructureId: -1,
}
}
func (x *SiteSiteProperty) Id() int { return x.Id_ }
func (x *SiteSiteProperty) setId(id int) { x.Id_ = id }
func (x *SiteSiteProperty) RelatedToEntity(id int) bool { return false }
func (x *SiteSiteProperty) RelatedToHf(id int) bool { return x.OwnerHfid == id }
func (x *SiteSiteProperty) RelatedToArtifact(id int) bool { return false }
func (x *SiteSiteProperty) RelatedToSite(id int) bool { return false }
func (x *SiteSiteProperty) RelatedToRegion(id int) bool { return false }
func (x *SiteSiteProperty) CheckFields() {
}
func (x *SiteSiteProperty) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.Id_ != -1 {
d["id"] = x.Id_
}
if x.OwnerHfid != -1 {
d["ownerHfid"] = x.OwnerHfid
}
if x.StructureId != -1 {
d["structureId"] = x.StructureId
}
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type StructureSubtype int
const (
StructureSubtype_Unknown StructureSubtype = iota
StructureSubtype_Catacombs
StructureSubtype_Sewers
)
func parseStructureSubtype(s string) StructureSubtype {
switch s {
case "catacombs":
return StructureSubtype_Catacombs
case "sewers":
return StructureSubtype_Sewers
}
return StructureSubtype_Unknown
}
func (s StructureSubtype) String() string {
switch s {
case StructureSubtype_Catacombs:
return "catacombs"
case StructureSubtype_Sewers:
return "sewers"
}
return "unknown"
}
func (s StructureSubtype) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type StructureType int
const (
StructureType_Unknown StructureType = iota
StructureType_CountingHouse
StructureType_Dungeon
StructureType_Guildhall
StructureType_InnTavern
StructureType_Keep
StructureType_Library
StructureType_Market
StructureType_MeadHall
StructureType_Temple
StructureType_Tomb
StructureType_Tower
StructureType_UnderworldSpire
)
func parseStructureType(s string) StructureType {
switch s {
case "counting house":
return StructureType_CountingHouse
case "counting_house":
return StructureType_CountingHouse
case "dungeon":
return StructureType_Dungeon
case "guildhall":
return StructureType_Guildhall
case "inn tavern":
return StructureType_InnTavern
case "inn_tavern":
return StructureType_InnTavern
case "keep":
return StructureType_Keep
case "library":
return StructureType_Library
case "market":
return StructureType_Market
case "mead hall":
return StructureType_MeadHall
case "mead_hall":
return StructureType_MeadHall
case "temple":
return StructureType_Temple
case "tomb":
return StructureType_Tomb
case "tower":
return StructureType_Tower
case "underworld spire":
return StructureType_UnderworldSpire
case "underworld_spire":
return StructureType_UnderworldSpire
}
return StructureType_Unknown
}
func (s StructureType) String() string {
switch s {
case StructureType_CountingHouse:
return "counting house"
case StructureType_Dungeon:
return "dungeon"
case StructureType_Guildhall:
return "guildhall"
case StructureType_InnTavern:
return "inn tavern"
case StructureType_Keep:
return "keep"
case StructureType_Library:
return "library"
case StructureType_Market:
return "market"
case StructureType_MeadHall:
return "mead hall"
case StructureType_Temple:
return "temple"
case StructureType_Tomb:
return "tomb"
case StructureType_Tower:
return "tower"
case StructureType_UnderworldSpire:
return "underworld spire"
}
return "unknown"
}
func (s StructureType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type Structure struct {
CopiedArtifactId []int `json:"copiedArtifactId" legend:"base"` // copied_artifact_id
Deity int `json:"deity" legend:"plus"` // deity
DeityType int `json:"deityType" legend:"plus"` // deity_type
DungeonType int `json:"dungeonType" legend:"plus"` // dungeon_type
EntityId int `json:"entityId" legend:"base"` // entity_id
Id_ int `json:"id" legend:"plus"` // id
Inhabitant []int `json:"inhabitant" legend:"plus"` // inhabitant
LocalId int `json:"localId" legend:"base"` // local_id
Name_ string `json:"name" legend:"both"` // name
Name2 string `json:"name2" legend:"plus"` // name2
Religion int `json:"religion" legend:"plus"` // religion
Subtype StructureSubtype `json:"subtype" legend:"base"` // subtype
Type_ StructureType `json:"type" legend:"both"` // type
WorshipHfid int `json:"worshipHfid" legend:"base"` // worship_hfid
SiteId int `json:"siteId" legend:"add"` // SiteId
}
func NewStructure() *Structure {
return &Structure{
Deity: -1,
DeityType: -1,
DungeonType: -1,
EntityId: -1,
Id_: -1,
LocalId: -1,
Religion: -1,
WorshipHfid: -1,
SiteId: -1,
}
}
func (x *Structure) Id() int { return x.Id_ }
func (x *Structure) setId(id int) { x.Id_ = id }
func (x *Structure) Name() string { return x.Name_ }
func (x *Structure) RelatedToEntity(id int) bool { return x.EntityId == id }
func (x *Structure) RelatedToHf(id int) bool { return x.WorshipHfid == id }
func (x *Structure) RelatedToArtifact(id int) bool { return containsInt(x.CopiedArtifactId, id) }
func (x *Structure) RelatedToSite(id int) bool { return false }
func (x *Structure) RelatedToRegion(id int) bool { return false }
func (x *Structure) CheckFields() {
if x.Deity != x.EntityId {
sameFields["Structure"]["Deity"]["EntityId"] = false
}
if x.Deity != x.LocalId {
sameFields["Structure"]["Deity"]["LocalId"] = false
}
if x.Deity != x.WorshipHfid {
sameFields["Structure"]["Deity"]["WorshipHfid"] = false
}
if x.DeityType != x.EntityId {
sameFields["Structure"]["DeityType"]["EntityId"] = false
}
if x.DeityType != x.LocalId {
sameFields["Structure"]["DeityType"]["LocalId"] = false
}
if x.DeityType != x.WorshipHfid {
sameFields["Structure"]["DeityType"]["WorshipHfid"] = false
}
if x.DungeonType != x.EntityId {
sameFields["Structure"]["DungeonType"]["EntityId"] = false
}
if x.DungeonType != x.LocalId {
sameFields["Structure"]["DungeonType"]["LocalId"] = false
}
if x.DungeonType != x.WorshipHfid {
sameFields["Structure"]["DungeonType"]["WorshipHfid"] = false
}
if x.Religion != x.EntityId {
sameFields["Structure"]["Religion"]["EntityId"] = false
}
if x.Religion != x.LocalId {
sameFields["Structure"]["Religion"]["LocalId"] = false
}
if x.Religion != x.WorshipHfid {
sameFields["Structure"]["Religion"]["WorshipHfid"] = false
}
}
func (x *Structure) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["copiedArtifactId"] = x.CopiedArtifactId
if x.Deity != -1 {
d["deity"] = x.Deity
}
if x.DeityType != -1 {
d["deityType"] = x.DeityType
}
if x.DungeonType != -1 {
d["dungeonType"] = x.DungeonType
}
if x.EntityId != -1 {
d["entityId"] = x.EntityId
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["inhabitant"] = x.Inhabitant
if x.LocalId != -1 {
d["localId"] = x.LocalId
}
d["name"] = x.Name_
d["name2"] = x.Name2
if x.Religion != -1 {
d["religion"] = x.Religion
}
if x.Subtype != 0 {
d["subtype"] = x.Subtype
}
if x.Type_ != 0 {
d["type"] = x.Type_
}
if x.WorshipHfid != -1 {
d["worshipHfid"] = x.WorshipHfid
}
return json.Marshal(d)
}
type UndergroundRegionType int
const (
UndergroundRegionType_Unknown UndergroundRegionType = iota
UndergroundRegionType_Cavern
UndergroundRegionType_Magma
UndergroundRegionType_Underworld
)
func parseUndergroundRegionType(s string) UndergroundRegionType {
switch s {
case "cavern":
return UndergroundRegionType_Cavern
case "magma":
return UndergroundRegionType_Magma
case "underworld":
return UndergroundRegionType_Underworld
}
return UndergroundRegionType_Unknown
}
func (s UndergroundRegionType) String() string {
switch s {
case UndergroundRegionType_Cavern:
return "cavern"
case UndergroundRegionType_Magma:
return "magma"
case UndergroundRegionType_Underworld:
return "underworld"
}
return "unknown"
}
func (s UndergroundRegionType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type UndergroundRegion struct {
Coords string `json:"coords" legend:"plus"` // coords
Depth int `json:"depth" legend:"base"` // depth
Id_ int `json:"id" legend:"both"` // id
Type_ UndergroundRegionType `json:"type" legend:"base"` // type
}
func NewUndergroundRegion() *UndergroundRegion {
return &UndergroundRegion{
Depth: -1,
Id_: -1,
}
}
func (x *UndergroundRegion) Id() int { return x.Id_ }
func (x *UndergroundRegion) setId(id int) { x.Id_ = id }
func (x *UndergroundRegion) RelatedToEntity(id int) bool { return false }
func (x *UndergroundRegion) RelatedToHf(id int) bool { return false }
func (x *UndergroundRegion) RelatedToArtifact(id int) bool { return false }
func (x *UndergroundRegion) RelatedToSite(id int) bool { return false }
func (x *UndergroundRegion) RelatedToRegion(id int) bool { return false }
func (x *UndergroundRegion) CheckFields() {
}
func (x *UndergroundRegion) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coords"] = x.Coords
if x.Depth != -1 {
d["depth"] = x.Depth
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type VagueRelationship struct {
ArtisticBuddy bool `json:"artisticBuddy" legend:"base"` // artistic_buddy
AtheleticRival bool `json:"atheleticRival" legend:"base"` // atheletic_rival
AthleteBuddy bool `json:"athleteBuddy" legend:"base"` // athlete_buddy
BusinessRival bool `json:"businessRival" legend:"base"` // business_rival
ChildhoodFriend bool `json:"childhoodFriend" legend:"base"` // childhood_friend
Grudge bool `json:"grudge" legend:"base"` // grudge
Hfid int `json:"hfid" legend:"base"` // hfid
JealousObsession bool `json:"jealousObsession" legend:"base"` // jealous_obsession
JealousRelationshipGrudge bool `json:"jealousRelationshipGrudge" legend:"base"` // jealous_relationship_grudge
PersecutionGrudge bool `json:"persecutionGrudge" legend:"base"` // persecution_grudge
ReligiousPersecutionGrudge bool `json:"religiousPersecutionGrudge" legend:"base"` // religious_persecution_grudge
ScholarBuddy bool `json:"scholarBuddy" legend:"base"` // scholar_buddy
SupernaturalGrudge bool `json:"supernaturalGrudge" legend:"base"` // supernatural_grudge
WarBuddy bool `json:"warBuddy" legend:"base"` // war_buddy
}
func NewVagueRelationship() *VagueRelationship {
return &VagueRelationship{
Hfid: -1,
}
}
func (x *VagueRelationship) RelatedToEntity(id int) bool { return false }
func (x *VagueRelationship) RelatedToHf(id int) bool { return x.Hfid == id }
func (x *VagueRelationship) RelatedToArtifact(id int) bool { return false }
func (x *VagueRelationship) RelatedToSite(id int) bool { return false }
func (x *VagueRelationship) RelatedToRegion(id int) bool { return false }
func (x *VagueRelationship) CheckFields() {
}
func (x *VagueRelationship) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["artisticBuddy"] = x.ArtisticBuddy
d["atheleticRival"] = x.AtheleticRival
d["athleteBuddy"] = x.AthleteBuddy
d["businessRival"] = x.BusinessRival
d["childhoodFriend"] = x.ChildhoodFriend
d["grudge"] = x.Grudge
if x.Hfid != -1 {
d["hfid"] = x.Hfid
}
d["jealousObsession"] = x.JealousObsession
d["jealousRelationshipGrudge"] = x.JealousRelationshipGrudge
d["persecutionGrudge"] = x.PersecutionGrudge
d["religiousPersecutionGrudge"] = x.ReligiousPersecutionGrudge
d["scholarBuddy"] = x.ScholarBuddy
d["supernaturalGrudge"] = x.SupernaturalGrudge
d["warBuddy"] = x.WarBuddy
return json.Marshal(d)
}
type WorldConstructionType int
const (
WorldConstructionType_Unknown WorldConstructionType = iota
WorldConstructionType_Bridge
WorldConstructionType_Road
WorldConstructionType_Tunnel
)
func parseWorldConstructionType(s string) WorldConstructionType {
switch s {
case "bridge":
return WorldConstructionType_Bridge
case "road":
return WorldConstructionType_Road
case "tunnel":
return WorldConstructionType_Tunnel
}
return WorldConstructionType_Unknown
}
func (s WorldConstructionType) String() string {
switch s {
case WorldConstructionType_Bridge:
return "bridge"
case WorldConstructionType_Road:
return "road"
case WorldConstructionType_Tunnel:
return "tunnel"
}
return "unknown"
}
func (s WorldConstructionType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type WorldConstruction struct {
Coords string `json:"coords" legend:"plus"` // coords
Id_ int `json:"id" legend:"plus"` // id
Name_ string `json:"name" legend:"plus"` // name
Type_ WorldConstructionType `json:"type" legend:"plus"` // type
}
func NewWorldConstruction() *WorldConstruction {
return &WorldConstruction{
Id_: -1,
}
}
func (x *WorldConstruction) Id() int { return x.Id_ }
func (x *WorldConstruction) setId(id int) { x.Id_ = id }
func (x *WorldConstruction) Name() string { return x.Name_ }
func (x *WorldConstruction) RelatedToEntity(id int) bool { return false }
func (x *WorldConstruction) RelatedToHf(id int) bool { return false }
func (x *WorldConstruction) RelatedToArtifact(id int) bool { return false }
func (x *WorldConstruction) RelatedToSite(id int) bool { return false }
func (x *WorldConstruction) RelatedToRegion(id int) bool { return false }
func (x *WorldConstruction) CheckFields() {
}
func (x *WorldConstruction) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
d["coords"] = x.Coords
if x.Id_ != -1 {
d["id"] = x.Id_
}
d["name"] = x.Name_
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
type WrittenContentForm int
const (
WrittenContentForm_Unknown WrittenContentForm = iota
WrittenContentForm_AlternateHistory
WrittenContentForm_Atlas
WrittenContentForm_Autobiography
WrittenContentForm_Biography
WrittenContentForm_Choreography
WrittenContentForm_Chronicle
WrittenContentForm_ComparativeBiography
WrittenContentForm_CulturalComparison
WrittenContentForm_CulturalHistory
WrittenContentForm_Dialog
WrittenContentForm_Dictionary
WrittenContentForm_Encyclopedia
WrittenContentForm_Essay
WrittenContentForm_Genealogy
WrittenContentForm_Guide
WrittenContentForm_Letter
WrittenContentForm_Manual
WrittenContentForm_MusicalComposition
WrittenContentForm_Novel
WrittenContentForm_Play
WrittenContentForm_Poem
WrittenContentForm_ShortStory
WrittenContentForm_StarCatalogue
WrittenContentForm_StarChart
WrittenContentForm_TreatiseOnTechnologicalEvolution
)
func parseWrittenContentForm(s string) WrittenContentForm {
switch s {
case "alternate history":
return WrittenContentForm_AlternateHistory
case "atlas":
return WrittenContentForm_Atlas
case "autobiography":
return WrittenContentForm_Autobiography
case "biography":
return WrittenContentForm_Biography
case "choreography":
return WrittenContentForm_Choreography
case "chronicle":
return WrittenContentForm_Chronicle
case "comparative biography":
return WrittenContentForm_ComparativeBiography
case "cultural comparison":
return WrittenContentForm_CulturalComparison
case "cultural history":
return WrittenContentForm_CulturalHistory
case "dialog":
return WrittenContentForm_Dialog
case "dictionary":
return WrittenContentForm_Dictionary
case "encyclopedia":
return WrittenContentForm_Encyclopedia
case "essay":
return WrittenContentForm_Essay
case "genealogy":
return WrittenContentForm_Genealogy
case "guide":
return WrittenContentForm_Guide
case "letter":
return WrittenContentForm_Letter
case "manual":
return WrittenContentForm_Manual
case "musical composition":
return WrittenContentForm_MusicalComposition
case "novel":
return WrittenContentForm_Novel
case "play":
return WrittenContentForm_Play
case "poem":
return WrittenContentForm_Poem
case "short story":
return WrittenContentForm_ShortStory
case "star catalogue":
return WrittenContentForm_StarCatalogue
case "star chart":
return WrittenContentForm_StarChart
case "treatise on technological evolution":
return WrittenContentForm_TreatiseOnTechnologicalEvolution
}
return WrittenContentForm_Unknown
}
func (s WrittenContentForm) String() string {
switch s {
case WrittenContentForm_AlternateHistory:
return "alternate history"
case WrittenContentForm_Atlas:
return "atlas"
case WrittenContentForm_Autobiography:
return "autobiography"
case WrittenContentForm_Biography:
return "biography"
case WrittenContentForm_Choreography:
return "choreography"
case WrittenContentForm_Chronicle:
return "chronicle"
case WrittenContentForm_ComparativeBiography:
return "comparative biography"
case WrittenContentForm_CulturalComparison:
return "cultural comparison"
case WrittenContentForm_CulturalHistory:
return "cultural history"
case WrittenContentForm_Dialog:
return "dialog"
case WrittenContentForm_Dictionary:
return "dictionary"
case WrittenContentForm_Encyclopedia:
return "encyclopedia"
case WrittenContentForm_Essay:
return "essay"
case WrittenContentForm_Genealogy:
return "genealogy"
case WrittenContentForm_Guide:
return "guide"
case WrittenContentForm_Letter:
return "letter"
case WrittenContentForm_Manual:
return "manual"
case WrittenContentForm_MusicalComposition:
return "musical composition"
case WrittenContentForm_Novel:
return "novel"
case WrittenContentForm_Play:
return "play"
case WrittenContentForm_Poem:
return "poem"
case WrittenContentForm_ShortStory:
return "short story"
case WrittenContentForm_StarCatalogue:
return "star catalogue"
case WrittenContentForm_StarChart:
return "star chart"
case WrittenContentForm_TreatiseOnTechnologicalEvolution:
return "treatise on technological evolution"
}
return "unknown"
}
func (s WrittenContentForm) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type WrittenContentType int
const (
WrittenContentType_Unknown WrittenContentType = iota
WrittenContentType_AlternateHistory
WrittenContentType_Atlas
WrittenContentType_Autobiography
WrittenContentType_Biography
WrittenContentType_Choreography
WrittenContentType_Chronicle
WrittenContentType_ComparativeBiography
WrittenContentType_CulturalComparison
WrittenContentType_CulturalHistory
WrittenContentType_Dialog
WrittenContentType_Dictionary
WrittenContentType_Encyclopedia
WrittenContentType_Essay
WrittenContentType_Genealogy
WrittenContentType_Guide
WrittenContentType_Letter
WrittenContentType_Manual
WrittenContentType_MusicalComposition
WrittenContentType_Novel
WrittenContentType_Play
WrittenContentType_Poem
WrittenContentType_ShortStory
WrittenContentType_StarCatalogue
WrittenContentType_StarChart
WrittenContentType_TreatiseOnTechnologicalEvolution
)
func parseWrittenContentType(s string) WrittenContentType {
switch s {
case "AlternateHistory":
return WrittenContentType_AlternateHistory
case "Atlas":
return WrittenContentType_Atlas
case "Autobiography":
return WrittenContentType_Autobiography
case "Biography":
return WrittenContentType_Biography
case "Choreography":
return WrittenContentType_Choreography
case "Chronicle":
return WrittenContentType_Chronicle
case "ComparativeBiography":
return WrittenContentType_ComparativeBiography
case "CulturalComparison":
return WrittenContentType_CulturalComparison
case "CulturalHistory":
return WrittenContentType_CulturalHistory
case "Dialog":
return WrittenContentType_Dialog
case "Dictionary":
return WrittenContentType_Dictionary
case "Encyclopedia":
return WrittenContentType_Encyclopedia
case "Essay":
return WrittenContentType_Essay
case "Genealogy":
return WrittenContentType_Genealogy
case "Guide":
return WrittenContentType_Guide
case "Letter":
return WrittenContentType_Letter
case "Manual":
return WrittenContentType_Manual
case "MusicalComposition":
return WrittenContentType_MusicalComposition
case "Novel":
return WrittenContentType_Novel
case "Play":
return WrittenContentType_Play
case "Poem":
return WrittenContentType_Poem
case "ShortStory":
return WrittenContentType_ShortStory
case "StarCatalogue":
return WrittenContentType_StarCatalogue
case "StarChart":
return WrittenContentType_StarChart
case "TreatiseOnTechnologicalEvolution":
return WrittenContentType_TreatiseOnTechnologicalEvolution
}
return WrittenContentType_Unknown
}
func (s WrittenContentType) String() string {
switch s {
case WrittenContentType_AlternateHistory:
return "alternate history"
case WrittenContentType_Atlas:
return "atlas"
case WrittenContentType_Autobiography:
return "autobiography"
case WrittenContentType_Biography:
return "biography"
case WrittenContentType_Choreography:
return "choreography"
case WrittenContentType_Chronicle:
return "chronicle"
case WrittenContentType_ComparativeBiography:
return "comparative biography"
case WrittenContentType_CulturalComparison:
return "cultural comparison"
case WrittenContentType_CulturalHistory:
return "cultural history"
case WrittenContentType_Dialog:
return "dialog"
case WrittenContentType_Dictionary:
return "dictionary"
case WrittenContentType_Encyclopedia:
return "encyclopedia"
case WrittenContentType_Essay:
return "essay"
case WrittenContentType_Genealogy:
return "genealogy"
case WrittenContentType_Guide:
return "guide"
case WrittenContentType_Letter:
return "letter"
case WrittenContentType_Manual:
return "manual"
case WrittenContentType_MusicalComposition:
return "musical composition"
case WrittenContentType_Novel:
return "novel"
case WrittenContentType_Play:
return "play"
case WrittenContentType_Poem:
return "poem"
case WrittenContentType_ShortStory:
return "short story"
case WrittenContentType_StarCatalogue:
return "star catalogue"
case WrittenContentType_StarChart:
return "star chart"
case WrittenContentType_TreatiseOnTechnologicalEvolution:
return "treatise on technological evolution"
}
return "unknown"
}
func (s WrittenContentType) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}
type WrittenContent struct {
AuthorHfid int `json:"authorHfid" legend:"base"` // author_hfid
AuthorRoll int `json:"authorRoll" legend:"base"` // author_roll
Form WrittenContentForm `json:"form" legend:"base"` // form
FormId int `json:"formId" legend:"base"` // form_id
Id_ int `json:"id" legend:"both"` // id
PageEnd int `json:"pageEnd" legend:"plus"` // page_end
PageStart int `json:"pageStart" legend:"plus"` // page_start
Reference []*Reference `json:"reference" legend:"plus"` // reference
Style []string `json:"style" legend:"both"` // style
Title string `json:"title" legend:"both"` // title
Type_ WrittenContentType `json:"type" legend:"plus"` // type
}
func NewWrittenContent() *WrittenContent {
return &WrittenContent{
AuthorHfid: -1,
AuthorRoll: -1,
FormId: -1,
Id_: -1,
PageEnd: -1,
PageStart: -1,
}
}
func (x *WrittenContent) Id() int { return x.Id_ }
func (x *WrittenContent) setId(id int) { x.Id_ = id }
func (x *WrittenContent) RelatedToEntity(id int) bool { return false }
func (x *WrittenContent) RelatedToHf(id int) bool { return x.AuthorHfid == id }
func (x *WrittenContent) RelatedToArtifact(id int) bool { return false }
func (x *WrittenContent) RelatedToSite(id int) bool { return false }
func (x *WrittenContent) RelatedToRegion(id int) bool { return false }
func (x *WrittenContent) CheckFields() {
if x.PageEnd != x.AuthorHfid {
sameFields["WrittenContent"]["PageEnd"]["AuthorHfid"] = false
}
if x.PageEnd != x.AuthorRoll {
sameFields["WrittenContent"]["PageEnd"]["AuthorRoll"] = false
}
if x.PageEnd != x.FormId {
sameFields["WrittenContent"]["PageEnd"]["FormId"] = false
}
if x.PageStart != x.AuthorHfid {
sameFields["WrittenContent"]["PageStart"]["AuthorHfid"] = false
}
if x.PageStart != x.AuthorRoll {
sameFields["WrittenContent"]["PageStart"]["AuthorRoll"] = false
}
if x.PageStart != x.FormId {
sameFields["WrittenContent"]["PageStart"]["FormId"] = false
}
}
func (x *WrittenContent) MarshalJSON() ([]byte, error) {
d := make(map[string]any)
if x.AuthorHfid != -1 {
d["authorHfid"] = x.AuthorHfid
}
if x.AuthorRoll != -1 {
d["authorRoll"] = x.AuthorRoll
}
if x.Form != 0 {
d["form"] = x.Form
}
if x.FormId != -1 {
d["formId"] = x.FormId
}
if x.Id_ != -1 {
d["id"] = x.Id_
}
if x.PageEnd != -1 {
d["pageEnd"] = x.PageEnd
}
if x.PageStart != -1 {
d["pageStart"] = x.PageStart
}
d["reference"] = x.Reference
d["style"] = x.Style
d["title"] = x.Title
if x.Type_ != 0 {
d["type"] = x.Type_
}
return json.Marshal(d)
}
// Parser
func parseArtifact(p *util.XMLParser) (*Artifact, error) {
var obj = NewArtifact()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "abs_tile_x":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AbsTileX = num(data)
case "abs_tile_y":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AbsTileY = num(data)
case "abs_tile_z":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AbsTileZ = num(data)
case "holder_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HolderHfid = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "item":
v, _ := parseItem(p)
obj.Item = v
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_local_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureLocalId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseArtifactPlus(p *util.XMLParser, obj *Artifact) (*Artifact, error) {
if obj == nil {
obj = NewArtifact()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "item_description":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemDescription = txt(data)
case "item_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemSubtype = txt(data)
case "item_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemType = txt(data)
case "mat":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Mat = txt(data)
case "page_count":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PageCount = num(data)
case "writing":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Writing = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseCreature(p *util.XMLParser) (*Creature, error) {
var obj = NewCreature()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseCreaturePlus(p *util.XMLParser, obj *Creature) (*Creature, error) {
if obj == nil {
obj = NewCreature()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "all_castes_alive":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.AllCastesAlive = true
case "artificial_hiveable":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtificialHiveable = true
case "biome_desert_badland":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeDesertBadland = true
case "biome_desert_rock":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeDesertRock = true
case "biome_desert_sand":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeDesertSand = true
case "biome_forest_taiga":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeForestTaiga = true
case "biome_forest_temperate_broadleaf":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeForestTemperateBroadleaf = true
case "biome_forest_temperate_conifer":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeForestTemperateConifer = true
case "biome_forest_tropical_conifer":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeForestTropicalConifer = true
case "biome_forest_tropical_dry_broadleaf":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeForestTropicalDryBroadleaf = true
case "biome_forest_tropical_moist_broadleaf":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeForestTropicalMoistBroadleaf = true
case "biome_glacier":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeGlacier = true
case "biome_grassland_temperate":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeGrasslandTemperate = true
case "biome_grassland_tropical":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeGrasslandTropical = true
case "biome_lake_temperate_brackishwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeLakeTemperateBrackishwater = true
case "biome_lake_temperate_freshwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeLakeTemperateFreshwater = true
case "biome_lake_temperate_saltwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeLakeTemperateSaltwater = true
case "biome_lake_tropical_brackishwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeLakeTropicalBrackishwater = true
case "biome_lake_tropical_freshwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeLakeTropicalFreshwater = true
case "biome_lake_tropical_saltwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeLakeTropicalSaltwater = true
case "biome_marsh_temperate_freshwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeMarshTemperateFreshwater = true
case "biome_marsh_temperate_saltwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeMarshTemperateSaltwater = true
case "biome_marsh_tropical_freshwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeMarshTropicalFreshwater = true
case "biome_marsh_tropical_saltwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeMarshTropicalSaltwater = true
case "biome_mountain":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeMountain = true
case "biome_ocean_arctic":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeOceanArctic = true
case "biome_ocean_temperate":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeOceanTemperate = true
case "biome_ocean_tropical":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeOceanTropical = true
case "biome_pool_temperate_brackishwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomePoolTemperateBrackishwater = true
case "biome_pool_temperate_freshwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomePoolTemperateFreshwater = true
case "biome_pool_temperate_saltwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomePoolTemperateSaltwater = true
case "biome_pool_tropical_brackishwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomePoolTropicalBrackishwater = true
case "biome_pool_tropical_freshwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomePoolTropicalFreshwater = true
case "biome_pool_tropical_saltwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomePoolTropicalSaltwater = true
case "biome_river_temperate_brackishwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeRiverTemperateBrackishwater = true
case "biome_river_temperate_freshwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeRiverTemperateFreshwater = true
case "biome_river_temperate_saltwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeRiverTemperateSaltwater = true
case "biome_river_tropical_brackishwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeRiverTropicalBrackishwater = true
case "biome_river_tropical_freshwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeRiverTropicalFreshwater = true
case "biome_river_tropical_saltwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeRiverTropicalSaltwater = true
case "biome_savanna_temperate":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeSavannaTemperate = true
case "biome_savanna_tropical":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeSavannaTropical = true
case "biome_shrubland_temperate":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeShrublandTemperate = true
case "biome_shrubland_tropical":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeShrublandTropical = true
case "biome_subterranean_chasm":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeSubterraneanChasm = true
case "biome_subterranean_lava":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeSubterraneanLava = true
case "biome_subterranean_water":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeSubterraneanWater = true
case "biome_swamp_mangrove":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeSwampMangrove = true
case "biome_swamp_temperate_freshwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeSwampTemperateFreshwater = true
case "biome_swamp_temperate_saltwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeSwampTemperateSaltwater = true
case "biome_swamp_tropical_freshwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeSwampTropicalFreshwater = true
case "biome_swamp_tropical_saltwater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeSwampTropicalSaltwater = true
case "biome_tundra":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BiomeTundra = true
case "creature_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CreatureId = txt(data)
case "does_not_exist":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.DoesNotExist = true
case "equipment":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Equipment = true
case "equipment_wagon":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.EquipmentWagon = true
case "evil":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Evil = true
case "fanciful":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Fanciful = true
case "generated":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Generated = true
case "good":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Good = true
case "has_any_benign":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyBenign = true
case "has_any_can_swim":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyCanSwim = true
case "has_any_cannot_breathe_air":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyCannotBreatheAir = true
case "has_any_cannot_breathe_water":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyCannotBreatheWater = true
case "has_any_carnivore":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyCarnivore = true
case "has_any_common_domestic":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyCommonDomestic = true
case "has_any_curious_beast":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyCuriousBeast = true
case "has_any_demon":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyDemon = true
case "has_any_feature_beast":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyFeatureBeast = true
case "has_any_flier":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyFlier = true
case "has_any_fly_race_gait":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyFlyRaceGait = true
case "has_any_grasp":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyGrasp = true
case "has_any_grazer":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyGrazer = true
case "has_any_has_blood":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyHasBlood = true
case "has_any_immobile":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyImmobile = true
case "has_any_intelligent_learns":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyIntelligentLearns = true
case "has_any_intelligent_speaks":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyIntelligentSpeaks = true
case "has_any_large_predator":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyLargePredator = true
case "has_any_local_pops_controllable":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyLocalPopsControllable = true
case "has_any_local_pops_produce_heroes":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyLocalPopsProduceHeroes = true
case "has_any_megabeast":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyMegabeast = true
case "has_any_mischievous":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyMischievous = true
case "has_any_natural_animal":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyNaturalAnimal = true
case "has_any_night_creature":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyNightCreature = true
case "has_any_night_creature_bogeyman":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyNightCreatureBogeyman = true
case "has_any_night_creature_hunter":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyNightCreatureHunter = true
case "has_any_night_creature_nightmare":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyNightCreatureNightmare = true
case "has_any_not_fireimmune":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyNotFireimmune = true
case "has_any_not_living":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyNotLiving = true
case "has_any_outsider_controllable":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyOutsiderControllable = true
case "has_any_race_gait":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyRaceGait = true
case "has_any_semimegabeast":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnySemimegabeast = true
case "has_any_slow_learner":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnySlowLearner = true
case "has_any_supernatural":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnySupernatural = true
case "has_any_titan":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyTitan = true
case "has_any_unique_demon":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyUniqueDemon = true
case "has_any_utterances":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyUtterances = true
case "has_any_vermin_hateable":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyVerminHateable = true
case "has_any_vermin_micro":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasAnyVerminMicro = true
case "has_female":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasFemale = true
case "has_male":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HasMale = true
case "large_roaming":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.LargeRoaming = true
case "loose_clusters":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.LooseClusters = true
case "mates_to_breed":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.MatesToBreed = true
case "mundane":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Mundane = true
case "name_plural":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NamePlural = txt(data)
case "name_singular":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NameSingular = txt(data)
case "occurs_as_entity_race":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.OccursAsEntityRace = true
case "savage":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Savage = true
case "small_race":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.SmallRace = true
case "two_genders":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.TwoGenders = true
case "ubiquitous":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Ubiquitous = true
case "vermin_eater":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.VerminEater = true
case "vermin_fish":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.VerminFish = true
case "vermin_grounder":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.VerminGrounder = true
case "vermin_rotter":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.VerminRotter = true
case "vermin_soil":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.VerminSoil = true
case "vermin_soil_colony":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.VerminSoilColony = true
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseDanceForm(p *util.XMLParser) (*DanceForm, error) {
var obj = NewDanceForm()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "description":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Description = txt(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseDanceFormPlus(p *util.XMLParser, obj *DanceForm) (*DanceForm, error) {
if obj == nil {
obj = NewDanceForm()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseDfWorld(p *util.XMLParser) (*DfWorld, error) {
var obj = NewDfWorld()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifacts":
parseMap(p, &obj.Artifacts, parseArtifact)
case "dance_forms":
parseMap(p, &obj.DanceForms, parseDanceForm)
case "entities":
parseMap(p, &obj.Entities, parseEntity)
case "entity_populations":
parseMap(p, &obj.EntityPopulations, parseEntityPopulation)
case "historical_eras":
parseArray(p, &obj.HistoricalEras, parseHistoricalEra)
case "historical_event_collections":
parseMap(p, &obj.HistoricalEventCollections, parseHistoricalEventCollection)
case "historical_events":
parseMap(p, &obj.HistoricalEvents, parseHistoricalEvent)
case "historical_figures":
parseMap(p, &obj.HistoricalFigures, parseHistoricalFigure)
case "musical_forms":
parseMap(p, &obj.MusicalForms, parseMusicalForm)
case "poetic_forms":
parseMap(p, &obj.PoeticForms, parsePoeticForm)
case "regions":
parseMap(p, &obj.Regions, parseRegion)
case "sites":
parseMap(p, &obj.Sites, parseSite)
case "underground_regions":
parseMap(p, &obj.UndergroundRegions, parseUndergroundRegion)
case "world_constructions":
parseMap(p, &obj.WorldConstructions, parseWorldConstruction)
case "written_contents":
parseMap(p, &obj.WrittenContents, parseWrittenContent)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseDfWorldPlus(p *util.XMLParser, obj *DfWorld) (*DfWorld, error) {
if obj == nil {
obj = NewDfWorld()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "altname":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Altname = txt(data)
case "artifacts":
parseMapPlus(p, &obj.Artifacts, parseArtifactPlus)
case "creature_raw":
parseArray(p, &obj.CreatureRaw, parseCreature)
case "dance_forms":
parseMapPlus(p, &obj.DanceForms, parseDanceFormPlus)
case "entities":
parseMapPlus(p, &obj.Entities, parseEntityPlus)
case "entity_populations":
parseMapPlus(p, &obj.EntityPopulations, parseEntityPopulationPlus)
case "historical_eras":
parseArray(p, &obj.HistoricalEras, parseHistoricalEra)
case "historical_event_collections":
parseMapPlus(p, &obj.HistoricalEventCollections, parseHistoricalEventCollectionPlus)
case "historical_event_relationship_supplements":
parseArray(p, &obj.HistoricalEventRelationshipSupplements, parseHistoricalEventRelationshipSupplement)
case "historical_event_relationships":
parseArray(p, &obj.HistoricalEventRelationships, parseHistoricalEventRelationship)
case "historical_events":
parseMapPlus(p, &obj.HistoricalEvents, parseHistoricalEventPlus)
case "historical_figures":
parseMapPlus(p, &obj.HistoricalFigures, parseHistoricalFigurePlus)
case "identities":
parseMapPlus(p, &obj.Identities, parseIdentityPlus)
case "landmasses":
parseMapPlus(p, &obj.Landmasses, parseLandmassPlus)
case "mountain_peaks":
parseMapPlus(p, &obj.MountainPeaks, parseMountainPeakPlus)
case "musical_forms":
parseMapPlus(p, &obj.MusicalForms, parseMusicalFormPlus)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "poetic_forms":
parseMapPlus(p, &obj.PoeticForms, parsePoeticFormPlus)
case "regions":
parseMapPlus(p, &obj.Regions, parseRegionPlus)
case "rivers":
parseArray(p, &obj.Rivers, parseRiver)
case "sites":
parseMapPlus(p, &obj.Sites, parseSitePlus)
case "underground_regions":
parseMapPlus(p, &obj.UndergroundRegions, parseUndergroundRegionPlus)
case "world_constructions":
parseMapPlus(p, &obj.WorldConstructions, parseWorldConstructionPlus)
case "written_contents":
parseMapPlus(p, &obj.WrittenContents, parseWrittenContentPlus)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntity(p *util.XMLParser) (*Entity, error) {
var obj = NewEntity()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "honor":
v, _ := parseHonor(p)
obj.Honor = append(obj.Honor, v)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityPlus(p *util.XMLParser, obj *Entity) (*Entity, error) {
if obj == nil {
obj = NewEntity()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "child":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Child = append(obj.Child, num(data))
case "claims":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Claims = txt(data)
case "entity_link":
v, _ := parseEntityEntityLinkPlus(p, &EntityEntityLink{})
obj.EntityLink = append(obj.EntityLink, v)
case "entity_position":
v, _ := parseEntityPositionPlus(p, &EntityPosition{})
obj.EntityPosition = append(obj.EntityPosition, v)
case "entity_position_assignment":
v, _ := parseEntityPositionAssignmentPlus(p, &EntityPositionAssignment{})
obj.EntityPositionAssignment = append(obj.EntityPositionAssignment, v)
case "histfig_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistfigId = append(obj.HistfigId, num(data))
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "occasion":
v, _ := parseOccasionPlus(p, &Occasion{})
obj.Occasion = append(obj.Occasion, v)
case "profession":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Profession = parseEntityProfession(txt(data))
case "race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Race = txt(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseEntityType(txt(data))
case "weapon":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Weapon = append(obj.Weapon, parseEntityWeapon(txt(data)))
case "worship_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WorshipId = append(obj.WorshipId, num(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityEntityLink(p *util.XMLParser) (*EntityEntityLink, error) {
var obj = NewEntityEntityLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityEntityLinkPlus(p *util.XMLParser, obj *EntityEntityLink) (*EntityEntityLink, error) {
if obj == nil {
obj = NewEntityEntityLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "strength":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Strength = num(data)
case "target":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Target = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseEntityEntityLinkType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityFormerPositionLink(p *util.XMLParser) (*EntityFormerPositionLink, error) {
var obj = NewEntityFormerPositionLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "end_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EndYear = num(data)
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "position_profile_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PositionProfileId = num(data)
case "start_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StartYear = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityFormerPositionLinkPlus(p *util.XMLParser, obj *EntityFormerPositionLink) (*EntityFormerPositionLink, error) {
if obj == nil {
obj = NewEntityFormerPositionLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityFormerSquadLink(p *util.XMLParser) (*EntityFormerSquadLink, error) {
var obj = NewEntityFormerSquadLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "end_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EndYear = num(data)
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "squad_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SquadId = num(data)
case "start_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StartYear = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityFormerSquadLinkPlus(p *util.XMLParser, obj *EntityFormerSquadLink) (*EntityFormerSquadLink, error) {
if obj == nil {
obj = NewEntityFormerSquadLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityPopulation(p *util.XMLParser) (*EntityPopulation, error) {
var obj = NewEntityPopulation()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityPopulationPlus(p *util.XMLParser, obj *EntityPopulation) (*EntityPopulation, error) {
if obj == nil {
obj = NewEntityPopulation()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Race = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityPosition(p *util.XMLParser) (*EntityPosition, error) {
var obj = NewEntityPosition()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityPositionPlus(p *util.XMLParser, obj *EntityPosition) (*EntityPosition, error) {
if obj == nil {
obj = NewEntityPosition()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "name_female":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NameFemale = txt(data)
case "name_male":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NameMale = txt(data)
case "spouse":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Spouse = txt(data)
case "spouse_female":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SpouseFemale = txt(data)
case "spouse_male":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SpouseMale = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityPositionAssignment(p *util.XMLParser) (*EntityPositionAssignment, error) {
var obj = NewEntityPositionAssignment()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityPositionAssignmentPlus(p *util.XMLParser, obj *EntityPositionAssignment) (*EntityPositionAssignment, error) {
if obj == nil {
obj = NewEntityPositionAssignment()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Histfig = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "position_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PositionId = num(data)
case "squad_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SquadId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityPositionLink(p *util.XMLParser) (*EntityPositionLink, error) {
var obj = NewEntityPositionLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "position_profile_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PositionProfileId = num(data)
case "start_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StartYear = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityPositionLinkPlus(p *util.XMLParser, obj *EntityPositionLink) (*EntityPositionLink, error) {
if obj == nil {
obj = NewEntityPositionLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityReputation(p *util.XMLParser) (*EntityReputation, error) {
var obj = NewEntityReputation()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "first_ageless_season_count":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FirstAgelessSeasonCount = num(data)
case "first_ageless_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FirstAgelessYear = num(data)
case "rep_bard":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepBard = num(data)
case "rep_enemy_fighter":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepEnemyFighter = num(data)
case "rep_hero":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepHero = num(data)
case "rep_hunter":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepHunter = num(data)
case "rep_killer":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepKiller = num(data)
case "rep_knowledge_preserver":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepKnowledgePreserver = num(data)
case "rep_poet":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepPoet = num(data)
case "rep_protector_of_weak":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepProtectorOfWeak = num(data)
case "rep_storyteller":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepStoryteller = num(data)
case "rep_thief":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepThief = num(data)
case "rep_treasure_hunter":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepTreasureHunter = num(data)
case "unsolved_murders":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.UnsolvedMurders = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntityReputationPlus(p *util.XMLParser, obj *EntityReputation) (*EntityReputation, error) {
if obj == nil {
obj = NewEntityReputation()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntitySquadLink(p *util.XMLParser) (*EntitySquadLink, error) {
var obj = NewEntitySquadLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "squad_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SquadId = num(data)
case "squad_position":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SquadPosition = num(data)
case "start_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StartYear = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseEntitySquadLinkPlus(p *util.XMLParser, obj *EntitySquadLink) (*EntitySquadLink, error) {
if obj == nil {
obj = NewEntitySquadLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseFeature(p *util.XMLParser) (*Feature, error) {
var obj = NewFeature()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseFeaturePlus(p *util.XMLParser, obj *Feature) (*Feature, error) {
if obj == nil {
obj = NewFeature()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "reference":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reference = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseFeatureType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHfLink(p *util.XMLParser) (*HfLink, error) {
var obj = NewHfLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "link_strength":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LinkStrength = num(data)
case "link_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LinkType = parseHfLinkLinkType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHfLinkPlus(p *util.XMLParser, obj *HfLink) (*HfLink, error) {
if obj == nil {
obj = NewHfLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHfSkill(p *util.XMLParser) (*HfSkill, error) {
var obj = NewHfSkill()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "skill":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Skill = txt(data)
case "total_ip":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TotalIp = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHfSkillPlus(p *util.XMLParser, obj *HfSkill) (*HfSkill, error) {
if obj == nil {
obj = NewHfSkill()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEra(p *util.XMLParser) (*HistoricalEra, error) {
var obj = NewHistoricalEra()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "start_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StartYear = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEraPlus(p *util.XMLParser, obj *HistoricalEra) (*HistoricalEra, error) {
if obj == nil {
obj = NewHistoricalEra()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEvent(p *util.XMLParser) (*HistoricalEvent, error) {
var obj = NewHistoricalEvent()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "seconds72":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Seconds72 = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
switch string(data) {
case "add hf entity honor":
obj.Details, err = parseHistoricalEventAddHfEntityHonor(p)
case "add hf entity link":
obj.Details, err = parseHistoricalEventAddHfEntityLink(p)
case "add hf hf link":
obj.Details, err = parseHistoricalEventAddHfHfLink(p)
case "add hf site link":
obj.Details, err = parseHistoricalEventAddHfSiteLink(p)
case "agreement concluded":
obj.Details, err = parseHistoricalEventAgreementConcluded(p)
case "agreement formed":
obj.Details, err = parseHistoricalEventAgreementFormed(p)
case "agreement made":
obj.Details, err = parseHistoricalEventAgreementMade(p)
case "agreement rejected":
obj.Details, err = parseHistoricalEventAgreementRejected(p)
case "artifact claim formed":
obj.Details, err = parseHistoricalEventArtifactClaimFormed(p)
case "artifact copied":
obj.Details, err = parseHistoricalEventArtifactCopied(p)
case "artifact created":
obj.Details, err = parseHistoricalEventArtifactCreated(p)
case "artifact destroyed":
obj.Details, err = parseHistoricalEventArtifactDestroyed(p)
case "artifact found":
obj.Details, err = parseHistoricalEventArtifactFound(p)
case "artifact given":
obj.Details, err = parseHistoricalEventArtifactGiven(p)
case "artifact lost":
obj.Details, err = parseHistoricalEventArtifactLost(p)
case "artifact possessed":
obj.Details, err = parseHistoricalEventArtifactPossessed(p)
case "artifact recovered":
obj.Details, err = parseHistoricalEventArtifactRecovered(p)
case "artifact stored":
obj.Details, err = parseHistoricalEventArtifactStored(p)
case "artifact transformed":
obj.Details, err = parseHistoricalEventArtifactTransformed(p)
case "assume identity":
obj.Details, err = parseHistoricalEventAssumeIdentity(p)
case "attacked site":
obj.Details, err = parseHistoricalEventAttackedSite(p)
case "body abused":
obj.Details, err = parseHistoricalEventBodyAbused(p)
case "building profile acquired":
obj.Details, err = parseHistoricalEventBuildingProfileAcquired(p)
case "ceremony":
obj.Details, err = parseHistoricalEventCeremony(p)
case "change hf body state":
obj.Details, err = parseHistoricalEventChangeHfBodyState(p)
case "change hf job":
obj.Details, err = parseHistoricalEventChangeHfJob(p)
case "change hf state":
obj.Details, err = parseHistoricalEventChangeHfState(p)
case "changed creature type":
obj.Details, err = parseHistoricalEventChangedCreatureType(p)
case "competition":
obj.Details, err = parseHistoricalEventCompetition(p)
case "create entity position":
obj.Details, err = parseHistoricalEventCreateEntityPosition(p)
case "created site":
obj.Details, err = parseHistoricalEventCreatedSite(p)
case "created structure":
obj.Details, err = parseHistoricalEventCreatedStructure(p)
case "created world construction":
obj.Details, err = parseHistoricalEventCreatedWorldConstruction(p)
case "creature devoured":
obj.Details, err = parseHistoricalEventCreatureDevoured(p)
case "dance form created":
obj.Details, err = parseHistoricalEventDanceFormCreated(p)
case "destroyed site":
obj.Details, err = parseHistoricalEventDestroyedSite(p)
case "diplomat lost":
obj.Details, err = parseHistoricalEventDiplomatLost(p)
case "entity alliance formed":
obj.Details, err = parseHistoricalEventEntityAllianceFormed(p)
case "entity breach feature layer":
obj.Details, err = parseHistoricalEventEntityBreachFeatureLayer(p)
case "entity created":
obj.Details, err = parseHistoricalEventEntityCreated(p)
case "entity dissolved":
obj.Details, err = parseHistoricalEventEntityDissolved(p)
case "entity equipment purchase":
obj.Details, err = parseHistoricalEventEntityEquipmentPurchase(p)
case "entity expels hf":
obj.Details, err = parseHistoricalEventEntityExpelsHf(p)
case "entity fled site":
obj.Details, err = parseHistoricalEventEntityFledSite(p)
case "entity incorporated":
obj.Details, err = parseHistoricalEventEntityIncorporated(p)
case "entity law":
obj.Details, err = parseHistoricalEventEntityLaw(p)
case "entity overthrown":
obj.Details, err = parseHistoricalEventEntityOverthrown(p)
case "entity persecuted":
obj.Details, err = parseHistoricalEventEntityPersecuted(p)
case "entity primary criminals":
obj.Details, err = parseHistoricalEventEntityPrimaryCriminals(p)
case "entity rampaged in site":
obj.Details, err = parseHistoricalEventEntityRampagedInSite(p)
case "entity relocate":
obj.Details, err = parseHistoricalEventEntityRelocate(p)
case "entity searched site":
obj.Details, err = parseHistoricalEventEntitySearchedSite(p)
case "failed frame attempt":
obj.Details, err = parseHistoricalEventFailedFrameAttempt(p)
case "failed intrigue corruption":
obj.Details, err = parseHistoricalEventFailedIntrigueCorruption(p)
case "field battle":
obj.Details, err = parseHistoricalEventFieldBattle(p)
case "first contact":
obj.Details, err = parseHistoricalEventFirstContact(p)
case "gamble":
obj.Details, err = parseHistoricalEventGamble(p)
case "hf abducted":
obj.Details, err = parseHistoricalEventHfAbducted(p)
case "hf attacked site":
obj.Details, err = parseHistoricalEventHfAttackedSite(p)
case "hf confronted":
obj.Details, err = parseHistoricalEventHfConfronted(p)
case "hf convicted":
obj.Details, err = parseHistoricalEventHfConvicted(p)
case "hf destroyed site":
obj.Details, err = parseHistoricalEventHfDestroyedSite(p)
case "hf died":
obj.Details, err = parseHistoricalEventHfDied(p)
case "hf disturbed structure":
obj.Details, err = parseHistoricalEventHfDisturbedStructure(p)
case "hf does interaction":
obj.Details, err = parseHistoricalEventHfDoesInteraction(p)
case "hf enslaved":
obj.Details, err = parseHistoricalEventHfEnslaved(p)
case "hf equipment purchase":
obj.Details, err = parseHistoricalEventHfEquipmentPurchase(p)
case "hf freed":
obj.Details, err = parseHistoricalEventHfFreed(p)
case "hf gains secret goal":
obj.Details, err = parseHistoricalEventHfGainsSecretGoal(p)
case "hf interrogated":
obj.Details, err = parseHistoricalEventHfInterrogated(p)
case "hf learns secret":
obj.Details, err = parseHistoricalEventHfLearnsSecret(p)
case "hf new pet":
obj.Details, err = parseHistoricalEventHfNewPet(p)
case "hf performed horrible experiments":
obj.Details, err = parseHistoricalEventHfPerformedHorribleExperiments(p)
case "hf prayed inside structure":
obj.Details, err = parseHistoricalEventHfPrayedInsideStructure(p)
case "hf preach":
obj.Details, err = parseHistoricalEventHfPreach(p)
case "hf profaned structure":
obj.Details, err = parseHistoricalEventHfProfanedStructure(p)
case "hf ransomed":
obj.Details, err = parseHistoricalEventHfRansomed(p)
case "hf reach summit":
obj.Details, err = parseHistoricalEventHfReachSummit(p)
case "hf recruited unit type for entity":
obj.Details, err = parseHistoricalEventHfRecruitedUnitTypeForEntity(p)
case "hf relationship denied":
obj.Details, err = parseHistoricalEventHfRelationshipDenied(p)
case "hf reunion":
obj.Details, err = parseHistoricalEventHfReunion(p)
case "hf revived":
obj.Details, err = parseHistoricalEventHfRevived(p)
case "hf simple battle event":
obj.Details, err = parseHistoricalEventHfSimpleBattleEvent(p)
case "hf travel":
obj.Details, err = parseHistoricalEventHfTravel(p)
case "hf viewed artifact":
obj.Details, err = parseHistoricalEventHfViewedArtifact(p)
case "hf wounded":
obj.Details, err = parseHistoricalEventHfWounded(p)
case "hfs formed intrigue relationship":
obj.Details, err = parseHistoricalEventHfsFormedIntrigueRelationship(p)
case "hfs formed reputation relationship":
obj.Details, err = parseHistoricalEventHfsFormedReputationRelationship(p)
case "holy city declaration":
obj.Details, err = parseHistoricalEventHolyCityDeclaration(p)
case "insurrection started":
obj.Details, err = parseHistoricalEventInsurrectionStarted(p)
case "item stolen":
obj.Details, err = parseHistoricalEventItemStolen(p)
case "knowledge discovered":
obj.Details, err = parseHistoricalEventKnowledgeDiscovered(p)
case "masterpiece arch constructed":
obj.Details, err = parseHistoricalEventMasterpieceArchConstructed(p)
case "masterpiece dye":
obj.Details, err = parseHistoricalEventMasterpieceDye(p)
case "masterpiece engraving":
obj.Details, err = parseHistoricalEventMasterpieceEngraving(p)
case "masterpiece food":
obj.Details, err = parseHistoricalEventMasterpieceFood(p)
case "masterpiece item":
obj.Details, err = parseHistoricalEventMasterpieceItem(p)
case "masterpiece item improvement":
obj.Details, err = parseHistoricalEventMasterpieceItemImprovement(p)
case "masterpiece lost":
obj.Details, err = parseHistoricalEventMasterpieceLost(p)
case "merchant":
obj.Details, err = parseHistoricalEventMerchant(p)
case "modified building":
obj.Details, err = parseHistoricalEventModifiedBuilding(p)
case "musical form created":
obj.Details, err = parseHistoricalEventMusicalFormCreated(p)
case "new site leader":
obj.Details, err = parseHistoricalEventNewSiteLeader(p)
case "peace accepted":
obj.Details, err = parseHistoricalEventPeaceAccepted(p)
case "peace rejected":
obj.Details, err = parseHistoricalEventPeaceRejected(p)
case "performance":
obj.Details, err = parseHistoricalEventPerformance(p)
case "plundered site":
obj.Details, err = parseHistoricalEventPlunderedSite(p)
case "poetic form created":
obj.Details, err = parseHistoricalEventPoeticFormCreated(p)
case "procession":
obj.Details, err = parseHistoricalEventProcession(p)
case "razed structure":
obj.Details, err = parseHistoricalEventRazedStructure(p)
case "reclaim site":
obj.Details, err = parseHistoricalEventReclaimSite(p)
case "regionpop incorporated into entity":
obj.Details, err = parseHistoricalEventRegionpopIncorporatedIntoEntity(p)
case "remove hf entity link":
obj.Details, err = parseHistoricalEventRemoveHfEntityLink(p)
case "remove hf hf link":
obj.Details, err = parseHistoricalEventRemoveHfHfLink(p)
case "remove hf site link":
obj.Details, err = parseHistoricalEventRemoveHfSiteLink(p)
case "replaced structure":
obj.Details, err = parseHistoricalEventReplacedStructure(p)
case "site died":
obj.Details, err = parseHistoricalEventSiteDied(p)
case "site dispute":
obj.Details, err = parseHistoricalEventSiteDispute(p)
case "site retired":
obj.Details, err = parseHistoricalEventSiteRetired(p)
case "site surrendered":
obj.Details, err = parseHistoricalEventSiteSurrendered(p)
case "site taken over":
obj.Details, err = parseHistoricalEventSiteTakenOver(p)
case "site tribute forced":
obj.Details, err = parseHistoricalEventSiteTributeForced(p)
case "sneak into site":
obj.Details, err = parseHistoricalEventSneakIntoSite(p)
case "spotted leaving site":
obj.Details, err = parseHistoricalEventSpottedLeavingSite(p)
case "squad vs squad":
obj.Details, err = parseHistoricalEventSquadVsSquad(p)
case "tactical situation":
obj.Details, err = parseHistoricalEventTacticalSituation(p)
case "trade":
obj.Details, err = parseHistoricalEventTrade(p)
case "written content composed":
obj.Details, err = parseHistoricalEventWrittenContentComposed(p)
default:
p.Skip()
}
if err != nil {
return nil, err
}
return obj, nil
case "year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Year = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPlus(p *util.XMLParser, obj *HistoricalEvent) (*HistoricalEvent, error) {
if obj == nil {
obj = NewHistoricalEvent()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
switch string(data) {
case "add_hf_entity_link":
obj.Details, err = parseHistoricalEventAddHfEntityLinkPlus(p, obj.Details.(*HistoricalEventAddHfEntityLink))
case "add_hf_hf_link":
obj.Details, err = parseHistoricalEventAddHfHfLinkPlus(p, obj.Details.(*HistoricalEventAddHfHfLink))
case "add_hf_site_link":
obj.Details, err = parseHistoricalEventAddHfSiteLinkPlus(p, obj.Details.(*HistoricalEventAddHfSiteLink))
case "artifact_created":
obj.Details, err = parseHistoricalEventArtifactCreatedPlus(p, obj.Details.(*HistoricalEventArtifactCreated))
case "assume_identity":
obj.Details, err = parseHistoricalEventAssumeIdentityPlus(p, obj.Details.(*HistoricalEventAssumeIdentity))
case "body_abused":
obj.Details, err = parseHistoricalEventBodyAbusedPlus(p, obj.Details.(*HistoricalEventBodyAbused))
case "change_creature_type":
obj.Details, err = parseHistoricalEventChangedCreatureTypePlus(p, obj.Details.(*HistoricalEventChangedCreatureType))
case "change_hf_job":
obj.Details, err = parseHistoricalEventChangeHfJobPlus(p, obj.Details.(*HistoricalEventChangeHfJob))
case "change_hf_state":
obj.Details, err = parseHistoricalEventChangeHfStatePlus(p, obj.Details.(*HistoricalEventChangeHfState))
case "create_entity_position":
obj.Details, err = parseHistoricalEventCreateEntityPositionPlus(p, obj.Details.(*HistoricalEventCreateEntityPosition))
case "created_building":
obj.Details, err = parseHistoricalEventCreatedStructurePlus(p, obj.Details.(*HistoricalEventCreatedStructure))
case "creature_devoured":
obj.Details, err = parseHistoricalEventCreatureDevouredPlus(p, obj.Details.(*HistoricalEventCreatureDevoured))
case "diplomat_lost":
obj.Details, err = parseHistoricalEventDiplomatLostPlus(p, obj.Details.(*HistoricalEventDiplomatLost))
case "entity_action":
switch details := obj.Details.(type) {
case *HistoricalEventEntityPrimaryCriminals:
obj.Details, err = parseHistoricalEventEntityPrimaryCriminalsPlus(p, details)
case *HistoricalEventEntityRelocate:
obj.Details, err = parseHistoricalEventEntityRelocatePlus(p, details)
default:
fmt.Println("unknown subtype option", obj.Details)
p.Skip()
}
case "hf_act_on_building":
switch details := obj.Details.(type) {
case *HistoricalEventHfDisturbedStructure:
obj.Details, err = parseHistoricalEventHfDisturbedStructurePlus(p, details)
case *HistoricalEventHfPrayedInsideStructure:
obj.Details, err = parseHistoricalEventHfPrayedInsideStructurePlus(p, details)
case *HistoricalEventHfProfanedStructure:
obj.Details, err = parseHistoricalEventHfProfanedStructurePlus(p, details)
default:
fmt.Println("unknown subtype option", obj.Details)
p.Skip()
}
case "hf_does_interaction":
obj.Details, err = parseHistoricalEventHfDoesInteractionPlus(p, obj.Details.(*HistoricalEventHfDoesInteraction))
case "hf_learns_secret":
obj.Details, err = parseHistoricalEventHfLearnsSecretPlus(p, obj.Details.(*HistoricalEventHfLearnsSecret))
case "hist_figure_died":
obj.Details, err = parseHistoricalEventHfDiedPlus(p, obj.Details.(*HistoricalEventHfDied))
case "hist_figure_new_pet":
obj.Details, err = parseHistoricalEventHfNewPetPlus(p, obj.Details.(*HistoricalEventHfNewPet))
case "hist_figure_reach_summit":
obj.Details, err = parseHistoricalEventHfReachSummitPlus(p, obj.Details.(*HistoricalEventHfReachSummit))
case "hist_figure_wounded":
obj.Details, err = parseHistoricalEventHfWoundedPlus(p, obj.Details.(*HistoricalEventHfWounded))
case "item_stolen":
obj.Details, err = parseHistoricalEventItemStolenPlus(p, obj.Details.(*HistoricalEventItemStolen))
case "masterpiece_created_arch_construct":
obj.Details, err = parseHistoricalEventMasterpieceArchConstructedPlus(p, obj.Details.(*HistoricalEventMasterpieceArchConstructed))
case "masterpiece_created_dye_item":
obj.Details, err = parseHistoricalEventMasterpieceDyePlus(p, obj.Details.(*HistoricalEventMasterpieceDye))
case "masterpiece_created_engraving":
obj.Details, err = parseHistoricalEventMasterpieceEngravingPlus(p, obj.Details.(*HistoricalEventMasterpieceEngraving))
case "masterpiece_created_food":
obj.Details, err = parseHistoricalEventMasterpieceFoodPlus(p, obj.Details.(*HistoricalEventMasterpieceFood))
case "masterpiece_created_item":
obj.Details, err = parseHistoricalEventMasterpieceItemPlus(p, obj.Details.(*HistoricalEventMasterpieceItem))
case "masterpiece_created_item_improvement":
obj.Details, err = parseHistoricalEventMasterpieceItemImprovementPlus(p, obj.Details.(*HistoricalEventMasterpieceItemImprovement))
case "masterpiece_lost":
obj.Details, err = parseHistoricalEventMasterpieceLostPlus(p, obj.Details.(*HistoricalEventMasterpieceLost))
case "merchant":
obj.Details, err = parseHistoricalEventMerchantPlus(p, obj.Details.(*HistoricalEventMerchant))
case "remove_hf_entity_link":
obj.Details, err = parseHistoricalEventRemoveHfEntityLinkPlus(p, obj.Details.(*HistoricalEventRemoveHfEntityLink))
case "remove_hf_site_link":
obj.Details, err = parseHistoricalEventRemoveHfSiteLinkPlus(p, obj.Details.(*HistoricalEventRemoveHfSiteLink))
case "replaced_building":
obj.Details, err = parseHistoricalEventReplacedStructurePlus(p, obj.Details.(*HistoricalEventReplacedStructure))
case "topicagreement_concluded":
obj.Details, err = parseHistoricalEventAgreementConcludedPlus(p, obj.Details.(*HistoricalEventAgreementConcluded))
case "topicagreement_made":
obj.Details, err = parseHistoricalEventAgreementMadePlus(p, obj.Details.(*HistoricalEventAgreementMade))
case "topicagreement_rejected":
obj.Details, err = parseHistoricalEventAgreementRejectedPlus(p, obj.Details.(*HistoricalEventAgreementRejected))
case "war_peace_accepted":
obj.Details, err = parseHistoricalEventPeaceAcceptedPlus(p, obj.Details.(*HistoricalEventPeaceAccepted))
case "war_peace_rejected":
obj.Details, err = parseHistoricalEventPeaceRejectedPlus(p, obj.Details.(*HistoricalEventPeaceRejected))
default:
p.Skip()
}
if err != nil {
return nil, err
}
return obj, nil
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAddHfEntityHonor(p *util.XMLParser) (*HistoricalEventAddHfEntityHonor, error) {
var obj = NewHistoricalEventAddHfEntityHonor()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "honor_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HonorId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAddHfEntityHonorPlus(p *util.XMLParser, obj *HistoricalEventAddHfEntityHonor) (*HistoricalEventAddHfEntityHonor, error) {
if obj == nil {
obj = NewHistoricalEventAddHfEntityHonor()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAddHfEntityLink(p *util.XMLParser) (*HistoricalEventAddHfEntityLink, error) {
var obj = NewHistoricalEventAddHfEntityLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "appointer_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AppointerHfid = num(data)
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "link":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Link = parseHistoricalEventAddHfEntityLinkLink(txt(data))
case "position_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PositionId = num(data)
case "promise_to_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PromiseToHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAddHfEntityLinkPlus(p *util.XMLParser, obj *HistoricalEventAddHfEntityLink) (*HistoricalEventAddHfEntityLink, error) {
if obj == nil {
obj = NewHistoricalEventAddHfEntityLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "appointer_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AppointerHfid = num(data)
case "civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "link_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Link = parseHistoricalEventAddHfEntityLinkLink(txt(data))
case "position":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Position = txt(data)
case "promise_to_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PromiseToHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAddHfHfLink(p *util.XMLParser) (*HistoricalEventAddHfHfLink, error) {
var obj = NewHistoricalEventAddHfHfLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "hfid_target":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HfidTarget = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAddHfHfLinkPlus(p *util.XMLParser, obj *HistoricalEventAddHfHfLink) (*HistoricalEventAddHfHfLink, error) {
if obj == nil {
obj = NewHistoricalEventAddHfHfLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hf":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "hf_target":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HfidTarget = num(data)
case "link_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LinkType = parseHistoricalEventAddHfHfLinkLinkType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAddHfSiteLink(p *util.XMLParser) (*HistoricalEventAddHfSiteLink, error) {
var obj = NewHistoricalEventAddHfSiteLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAddHfSiteLinkPlus(p *util.XMLParser, obj *HistoricalEventAddHfSiteLink) (*HistoricalEventAddHfSiteLink, error) {
if obj == nil {
obj = NewHistoricalEventAddHfSiteLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Civ = num(data)
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Histfig = num(data)
case "link_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LinkType = parseHistoricalEventAddHfSiteLinkLinkType(txt(data))
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Structure = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAgreementConcluded(p *util.XMLParser) (*HistoricalEventAgreementConcluded, error) {
var obj = NewHistoricalEventAgreementConcluded()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAgreementConcludedPlus(p *util.XMLParser, obj *HistoricalEventAgreementConcluded) (*HistoricalEventAgreementConcluded, error) {
if obj == nil {
obj = NewHistoricalEventAgreementConcluded()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "destination":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Destination = num(data)
case "result":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Result = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Site = num(data)
case "source":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Source = num(data)
case "topic":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Topic = parseHistoricalEventAgreementConcludedTopic(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAgreementFormed(p *util.XMLParser) (*HistoricalEventAgreementFormed, error) {
var obj = NewHistoricalEventAgreementFormed()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "action":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Action = parseHistoricalEventAgreementFormedAction(txt(data))
case "agreement_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AgreementId = num(data)
case "agreement_subject_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AgreementSubjectId = num(data)
case "ally_defense_bonus":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AllyDefenseBonus = num(data)
case "coconspirator_bonus":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CoconspiratorBonus = num(data)
case "concluder_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ConcluderHfid = num(data)
case "delegated":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Delegated = true
case "failed_judgment_test":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.FailedJudgmentTest = true
case "method":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Method = parseHistoricalEventAgreementFormedMethod(txt(data))
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventAgreementFormedReason(txt(data))
case "relevant_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RelevantEntityId = num(data)
case "relevant_id_for_method":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RelevantIdForMethod = num(data)
case "relevant_position_profile_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RelevantPositionProfileId = num(data)
case "successful":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Successful = true
case "top_facet":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopFacet = parseHistoricalEventAgreementFormedTopFacet(txt(data))
case "top_facet_modifier":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopFacetModifier = num(data)
case "top_facet_rating":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopFacetRating = num(data)
case "top_relationship_factor":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopRelationshipFactor = parseHistoricalEventAgreementFormedTopRelationshipFactor(txt(data))
case "top_relationship_modifier":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopRelationshipModifier = num(data)
case "top_relationship_rating":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopRelationshipRating = num(data)
case "top_value":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopValue = parseHistoricalEventAgreementFormedTopValue(txt(data))
case "top_value_modifier":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopValueModifier = num(data)
case "top_value_rating":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopValueRating = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAgreementFormedPlus(p *util.XMLParser, obj *HistoricalEventAgreementFormed) (*HistoricalEventAgreementFormed, error) {
if obj == nil {
obj = NewHistoricalEventAgreementFormed()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAgreementMade(p *util.XMLParser) (*HistoricalEventAgreementMade, error) {
var obj = NewHistoricalEventAgreementMade()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAgreementMadePlus(p *util.XMLParser, obj *HistoricalEventAgreementMade) (*HistoricalEventAgreementMade, error) {
if obj == nil {
obj = NewHistoricalEventAgreementMade()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "destination":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Destination = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "source":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Source = num(data)
case "topic":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Topic = parseHistoricalEventAgreementMadeTopic(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAgreementRejected(p *util.XMLParser) (*HistoricalEventAgreementRejected, error) {
var obj = NewHistoricalEventAgreementRejected()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAgreementRejectedPlus(p *util.XMLParser, obj *HistoricalEventAgreementRejected) (*HistoricalEventAgreementRejected, error) {
if obj == nil {
obj = NewHistoricalEventAgreementRejected()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "destination":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Destination = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "source":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Source = num(data)
case "topic":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Topic = parseHistoricalEventAgreementRejectedTopic(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactClaimFormed(p *util.XMLParser) (*HistoricalEventArtifactClaimFormed, error) {
var obj = NewHistoricalEventArtifactClaimFormed()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "circumstance":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Circumstance = parseHistoricalEventArtifactClaimFormedCircumstance(txt(data))
case "claim":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Claim = parseHistoricalEventArtifactClaimFormedClaim(txt(data))
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "position_profile_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PositionProfileId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactClaimFormedPlus(p *util.XMLParser, obj *HistoricalEventArtifactClaimFormed) (*HistoricalEventArtifactClaimFormed, error) {
if obj == nil {
obj = NewHistoricalEventArtifactClaimFormed()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactCopied(p *util.XMLParser) (*HistoricalEventArtifactCopied, error) {
var obj = NewHistoricalEventArtifactCopied()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "dest_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DestEntityId = num(data)
case "dest_site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DestSiteId = num(data)
case "dest_structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DestStructureId = num(data)
case "from_original":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.FromOriginal = true
case "source_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SourceEntityId = num(data)
case "source_site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SourceSiteId = num(data)
case "source_structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SourceStructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactCopiedPlus(p *util.XMLParser, obj *HistoricalEventArtifactCopied) (*HistoricalEventArtifactCopied, error) {
if obj == nil {
obj = NewHistoricalEventArtifactCopied()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactCreated(p *util.XMLParser) (*HistoricalEventArtifactCreated, error) {
var obj = NewHistoricalEventArtifactCreated()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "name_only":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.NameOnly = true
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "unit_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.UnitId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactCreatedPlus(p *util.XMLParser, obj *HistoricalEventArtifactCreated) (*HistoricalEventArtifactCreated, error) {
if obj == nil {
obj = NewHistoricalEventArtifactCreated()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "circumstance":
v, _ := parseHistoricalEventArtifactCreatedCircumstancePlus(p, &HistoricalEventArtifactCreatedCircumstance{})
obj.Circumstance = v
case "creator_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "creator_unit_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.UnitId = num(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventArtifactCreatedReason(txt(data))
case "sanctify_hf":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SanctifyHf = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactCreatedCircumstance(p *util.XMLParser) (*HistoricalEventArtifactCreatedCircumstance, error) {
var obj = NewHistoricalEventArtifactCreatedCircumstance()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactCreatedCircumstancePlus(p *util.XMLParser, obj *HistoricalEventArtifactCreatedCircumstance) (*HistoricalEventArtifactCreatedCircumstance, error) {
if obj == nil {
obj = NewHistoricalEventArtifactCreatedCircumstance()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "defeated":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Defeated = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseHistoricalEventArtifactCreatedCircumstanceType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactDestroyed(p *util.XMLParser) (*HistoricalEventArtifactDestroyed, error) {
var obj = NewHistoricalEventArtifactDestroyed()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "destroyer_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DestroyerEnid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactDestroyedPlus(p *util.XMLParser, obj *HistoricalEventArtifactDestroyed) (*HistoricalEventArtifactDestroyed, error) {
if obj == nil {
obj = NewHistoricalEventArtifactDestroyed()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactFound(p *util.XMLParser) (*HistoricalEventArtifactFound, error) {
var obj = NewHistoricalEventArtifactFound()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "site_property_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SitePropertyId = num(data)
case "unit_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.UnitId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactFoundPlus(p *util.XMLParser, obj *HistoricalEventArtifactFound) (*HistoricalEventArtifactFound, error) {
if obj == nil {
obj = NewHistoricalEventArtifactFound()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactGiven(p *util.XMLParser) (*HistoricalEventArtifactGiven, error) {
var obj = NewHistoricalEventArtifactGiven()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "giver_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.GiverEntityId = num(data)
case "giver_hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.GiverHistFigureId = num(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventArtifactGivenReason(txt(data))
case "receiver_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ReceiverEntityId = num(data)
case "receiver_hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ReceiverHistFigureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactGivenPlus(p *util.XMLParser, obj *HistoricalEventArtifactGiven) (*HistoricalEventArtifactGiven, error) {
if obj == nil {
obj = NewHistoricalEventArtifactGiven()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactLost(p *util.XMLParser) (*HistoricalEventArtifactLost, error) {
var obj = NewHistoricalEventArtifactLost()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "site_property_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SitePropertyId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactLostPlus(p *util.XMLParser, obj *HistoricalEventArtifactLost) (*HistoricalEventArtifactLost, error) {
if obj == nil {
obj = NewHistoricalEventArtifactLost()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactPossessed(p *util.XMLParser) (*HistoricalEventArtifactPossessed, error) {
var obj = NewHistoricalEventArtifactPossessed()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "circumstance":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Circumstance = parseHistoricalEventArtifactPossessedCircumstance(txt(data))
case "circumstance_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CircumstanceId = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventArtifactPossessedReason(txt(data))
case "reason_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ReasonId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "unit_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.UnitId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactPossessedPlus(p *util.XMLParser, obj *HistoricalEventArtifactPossessed) (*HistoricalEventArtifactPossessed, error) {
if obj == nil {
obj = NewHistoricalEventArtifactPossessed()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactRecovered(p *util.XMLParser) (*HistoricalEventArtifactRecovered, error) {
var obj = NewHistoricalEventArtifactRecovered()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "unit_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.UnitId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactRecoveredPlus(p *util.XMLParser, obj *HistoricalEventArtifactRecovered) (*HistoricalEventArtifactRecovered, error) {
if obj == nil {
obj = NewHistoricalEventArtifactRecovered()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactStored(p *util.XMLParser) (*HistoricalEventArtifactStored, error) {
var obj = NewHistoricalEventArtifactStored()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "unit_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.UnitId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactStoredPlus(p *util.XMLParser, obj *HistoricalEventArtifactStored) (*HistoricalEventArtifactStored, error) {
if obj == nil {
obj = NewHistoricalEventArtifactStored()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactTransformed(p *util.XMLParser) (*HistoricalEventArtifactTransformed, error) {
var obj = NewHistoricalEventArtifactTransformed()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "new_artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewArtifactId = num(data)
case "old_artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OldArtifactId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "unit_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.UnitId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventArtifactTransformedPlus(p *util.XMLParser, obj *HistoricalEventArtifactTransformed) (*HistoricalEventArtifactTransformed, error) {
if obj == nil {
obj = NewHistoricalEventArtifactTransformed()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAssumeIdentity(p *util.XMLParser) (*HistoricalEventAssumeIdentity, error) {
var obj = NewHistoricalEventAssumeIdentity()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "identity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.IdentityId = num(data)
case "target_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetEnid = num(data)
case "trickster_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TricksterHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAssumeIdentityPlus(p *util.XMLParser, obj *HistoricalEventAssumeIdentity) (*HistoricalEventAssumeIdentity, error) {
if obj == nil {
obj = NewHistoricalEventAssumeIdentity()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "identity_caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.IdentityCaste = txt(data)
case "identity_histfig_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TricksterHfid = num(data)
case "identity_name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.IdentityName = txt(data)
case "identity_nemesis_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TricksterHfid = num(data)
case "identity_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.IdentityRace = txt(data)
case "target":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetEnid = num(data)
case "trickster":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TricksterHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAttackedSite(p *util.XMLParser) (*HistoricalEventAttackedSite, error) {
var obj = NewHistoricalEventAttackedSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "a_support_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ASupportMercEnid = num(data)
case "attacker_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerCivId = num(data)
case "attacker_general_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerGeneralHfid = num(data)
case "attacker_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerMercEnid = num(data)
case "d_support_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DSupportMercEnid = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "defender_general_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderGeneralHfid = num(data)
case "defender_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderMercEnid = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventAttackedSitePlus(p *util.XMLParser, obj *HistoricalEventAttackedSite) (*HistoricalEventAttackedSite, error) {
if obj == nil {
obj = NewHistoricalEventAttackedSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventBodyAbused(p *util.XMLParser) (*HistoricalEventBodyAbused, error) {
var obj = NewHistoricalEventBodyAbused()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventBodyAbusedPlus(p *util.XMLParser, obj *HistoricalEventBodyAbused) (*HistoricalEventBodyAbused, error) {
if obj == nil {
obj = NewHistoricalEventBodyAbused()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "abuse_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AbuseType = parseHistoricalEventBodyAbusedAbuseType(txt(data))
case "bodies":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Bodies = append(obj.Bodies, num(data))
case "civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Civ = num(data)
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Histfig = num(data)
case "interaction":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Interaction = num(data)
case "item_mat":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemMat = txt(data)
case "item_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemSubtype = parseHistoricalEventBodyAbusedItemSubtype(txt(data))
case "item_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemType = parseHistoricalEventBodyAbusedItemType(txt(data))
case "pile_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PileType = parseHistoricalEventBodyAbusedPileType(txt(data))
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Structure = num(data)
case "tree":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Tree = num(data)
case "victim_entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.VictimEntity = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventBuildingProfileAcquired(p *util.XMLParser) (*HistoricalEventBuildingProfileAcquired, error) {
var obj = NewHistoricalEventBuildingProfileAcquired()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "acquirer_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AcquirerEnid = num(data)
case "acquirer_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AcquirerHfid = num(data)
case "building_profile_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BuildingProfileId = num(data)
case "inherited":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Inherited = true
case "last_owner_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LastOwnerHfid = num(data)
case "purchased_unowned":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.PurchasedUnowned = true
case "rebuilt_ruined":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.RebuiltRuined = true
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventBuildingProfileAcquiredPlus(p *util.XMLParser, obj *HistoricalEventBuildingProfileAcquired) (*HistoricalEventBuildingProfileAcquired, error) {
if obj == nil {
obj = NewHistoricalEventBuildingProfileAcquired()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCeremony(p *util.XMLParser) (*HistoricalEventCeremony, error) {
var obj = NewHistoricalEventCeremony()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "occasion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OccasionId = num(data)
case "schedule_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ScheduleId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCeremonyPlus(p *util.XMLParser, obj *HistoricalEventCeremony) (*HistoricalEventCeremony, error) {
if obj == nil {
obj = NewHistoricalEventCeremony()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventChangeHfBodyState(p *util.XMLParser) (*HistoricalEventChangeHfBodyState, error) {
var obj = NewHistoricalEventChangeHfBodyState()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "body_state":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BodyState = parseHistoricalEventChangeHfBodyStateBodyState(txt(data))
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventChangeHfBodyStatePlus(p *util.XMLParser, obj *HistoricalEventChangeHfBodyState) (*HistoricalEventChangeHfBodyState, error) {
if obj == nil {
obj = NewHistoricalEventChangeHfBodyState()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventChangeHfJob(p *util.XMLParser) (*HistoricalEventChangeHfJob, error) {
var obj = NewHistoricalEventChangeHfJob()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventChangeHfJobPlus(p *util.XMLParser, obj *HistoricalEventChangeHfJob) (*HistoricalEventChangeHfJob, error) {
if obj == nil {
obj = NewHistoricalEventChangeHfJob()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "new_job":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewJob = txt(data)
case "old_job":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OldJob = txt(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventChangeHfState(p *util.XMLParser) (*HistoricalEventChangeHfState, error) {
var obj = NewHistoricalEventChangeHfState()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "mood":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Mood = parseHistoricalEventChangeHfStateMood(txt(data))
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventChangeHfStateReason(txt(data))
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "state":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.State = parseHistoricalEventChangeHfStateState(txt(data))
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventChangeHfStatePlus(p *util.XMLParser, obj *HistoricalEventChangeHfState) (*HistoricalEventChangeHfState, error) {
if obj == nil {
obj = NewHistoricalEventChangeHfState()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventChangeHfStateReason(txt(data))
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "state":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.State = parseHistoricalEventChangeHfStateState(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventChangedCreatureType(p *util.XMLParser) (*HistoricalEventChangedCreatureType, error) {
var obj = NewHistoricalEventChangedCreatureType()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "changee_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ChangeeHfid = num(data)
case "changer_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ChangerHfid = num(data)
case "new_caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewCaste = txt(data)
case "new_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewRace = txt(data)
case "old_caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OldCaste = txt(data)
case "old_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OldRace = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventChangedCreatureTypePlus(p *util.XMLParser, obj *HistoricalEventChangedCreatureType) (*HistoricalEventChangedCreatureType, error) {
if obj == nil {
obj = NewHistoricalEventChangedCreatureType()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "changee":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ChangeeHfid = num(data)
case "changer":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ChangerHfid = num(data)
case "new_caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewCaste = txt(data)
case "new_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewRace = txt(data)
case "old_caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OldCaste = txt(data)
case "old_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OldRace = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollection(p *util.XMLParser) (*HistoricalEventCollection, error) {
var obj = NewHistoricalEventCollection()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "end_seconds72":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EndSeconds72 = num(data)
case "end_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EndYear = num(data)
case "event":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Event = append(obj.Event, num(data))
case "eventcol":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Eventcol = append(obj.Eventcol, num(data))
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "start_seconds72":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StartSeconds72 = num(data)
case "start_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StartYear = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
switch string(data) {
case "abduction":
obj.Details, err = parseHistoricalEventCollectionAbduction(p)
case "battle":
obj.Details, err = parseHistoricalEventCollectionBattle(p)
case "beast attack":
obj.Details, err = parseHistoricalEventCollectionBeastAttack(p)
case "ceremony":
obj.Details, err = parseHistoricalEventCollectionCeremony(p)
case "competition":
obj.Details, err = parseHistoricalEventCollectionCompetition(p)
case "duel":
obj.Details, err = parseHistoricalEventCollectionDuel(p)
case "entity overthrown":
obj.Details, err = parseHistoricalEventCollectionEntityOverthrown(p)
case "insurrection":
obj.Details, err = parseHistoricalEventCollectionInsurrection(p)
case "journey":
obj.Details, err = parseHistoricalEventCollectionJourney(p)
case "occasion":
obj.Details, err = parseHistoricalEventCollectionOccasion(p)
case "performance":
obj.Details, err = parseHistoricalEventCollectionPerformance(p)
case "persecution":
obj.Details, err = parseHistoricalEventCollectionPersecution(p)
case "procession":
obj.Details, err = parseHistoricalEventCollectionProcession(p)
case "purge":
obj.Details, err = parseHistoricalEventCollectionPurge(p)
case "raid":
obj.Details, err = parseHistoricalEventCollectionRaid(p)
case "site conquered":
obj.Details, err = parseHistoricalEventCollectionSiteConquered(p)
case "theft":
obj.Details, err = parseHistoricalEventCollectionTheft(p)
case "war":
obj.Details, err = parseHistoricalEventCollectionWar(p)
default:
p.Skip()
}
if err != nil {
return nil, err
}
return obj, nil
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionPlus(p *util.XMLParser, obj *HistoricalEventCollection) (*HistoricalEventCollection, error) {
if obj == nil {
obj = NewHistoricalEventCollection()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionAbduction(p *util.XMLParser) (*HistoricalEventCollectionAbduction, error) {
var obj = NewHistoricalEventCollectionAbduction()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacking_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingEnid = num(data)
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "defending_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingEnid = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
case "parent_eventcol":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ParentEventcol = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionAbductionPlus(p *util.XMLParser, obj *HistoricalEventCollectionAbduction) (*HistoricalEventCollectionAbduction, error) {
if obj == nil {
obj = NewHistoricalEventCollectionAbduction()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionBattle(p *util.XMLParser) (*HistoricalEventCollectionBattle, error) {
var obj = NewHistoricalEventCollectionBattle()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "a_support_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ASupportMercEnid = num(data)
case "a_support_merc_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ASupportMercHfid = append(obj.ASupportMercHfid, num(data))
case "attacking_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingHfid = append(obj.AttackingHfid, num(data))
case "attacking_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingMercEnid = num(data)
case "attacking_squad_animated":
case "attacking_squad_deaths":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingSquadDeaths = append(obj.AttackingSquadDeaths, num(data))
case "attacking_squad_entity_pop":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingSquadEntityPop = append(obj.AttackingSquadEntityPop, num(data))
case "attacking_squad_number":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingSquadNumber = append(obj.AttackingSquadNumber, num(data))
case "attacking_squad_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingSquadRace = append(obj.AttackingSquadRace, txt(data))
case "attacking_squad_site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingSquadSite = append(obj.AttackingSquadSite, num(data))
case "company_merc":
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "d_support_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DSupportMercEnid = num(data)
case "d_support_merc_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DSupportMercHfid = append(obj.DSupportMercHfid, num(data))
case "defending_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingHfid = append(obj.DefendingHfid, num(data))
case "defending_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingMercEnid = num(data)
case "defending_squad_animated":
case "defending_squad_deaths":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingSquadDeaths = append(obj.DefendingSquadDeaths, num(data))
case "defending_squad_entity_pop":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingSquadEntityPop = append(obj.DefendingSquadEntityPop, num(data))
case "defending_squad_number":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingSquadNumber = append(obj.DefendingSquadNumber, num(data))
case "defending_squad_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingSquadRace = append(obj.DefendingSquadRace, txt(data))
case "defending_squad_site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingSquadSite = append(obj.DefendingSquadSite, num(data))
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "individual_merc":
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "noncom_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NoncomHfid = append(obj.NoncomHfid, num(data))
case "outcome":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Outcome = parseHistoricalEventCollectionBattleOutcome(txt(data))
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "war_eventcol":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WarEventcol = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionBattlePlus(p *util.XMLParser, obj *HistoricalEventCollectionBattle) (*HistoricalEventCollectionBattle, error) {
if obj == nil {
obj = NewHistoricalEventCollectionBattle()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionBeastAttack(p *util.XMLParser) (*HistoricalEventCollectionBeastAttack, error) {
var obj = NewHistoricalEventCollectionBeastAttack()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "defending_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingEnid = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
case "parent_eventcol":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ParentEventcol = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionBeastAttackPlus(p *util.XMLParser, obj *HistoricalEventCollectionBeastAttack) (*HistoricalEventCollectionBeastAttack, error) {
if obj == nil {
obj = NewHistoricalEventCollectionBeastAttack()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionCeremony(p *util.XMLParser) (*HistoricalEventCollectionCeremony, error) {
var obj = NewHistoricalEventCollectionCeremony()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionCeremonyPlus(p *util.XMLParser, obj *HistoricalEventCollectionCeremony) (*HistoricalEventCollectionCeremony, error) {
if obj == nil {
obj = NewHistoricalEventCollectionCeremony()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionCompetition(p *util.XMLParser) (*HistoricalEventCollectionCompetition, error) {
var obj = NewHistoricalEventCollectionCompetition()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionCompetitionPlus(p *util.XMLParser, obj *HistoricalEventCollectionCompetition) (*HistoricalEventCollectionCompetition, error) {
if obj == nil {
obj = NewHistoricalEventCollectionCompetition()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionDuel(p *util.XMLParser) (*HistoricalEventCollectionDuel, error) {
var obj = NewHistoricalEventCollectionDuel()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacking_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingHfid = num(data)
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "defending_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingHfid = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
case "parent_eventcol":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ParentEventcol = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionDuelPlus(p *util.XMLParser, obj *HistoricalEventCollectionDuel) (*HistoricalEventCollectionDuel, error) {
if obj == nil {
obj = NewHistoricalEventCollectionDuel()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionEntityOverthrown(p *util.XMLParser) (*HistoricalEventCollectionEntityOverthrown, error) {
var obj = NewHistoricalEventCollectionEntityOverthrown()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "target_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetEntityId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionEntityOverthrownPlus(p *util.XMLParser, obj *HistoricalEventCollectionEntityOverthrown) (*HistoricalEventCollectionEntityOverthrown, error) {
if obj == nil {
obj = NewHistoricalEventCollectionEntityOverthrown()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionInsurrection(p *util.XMLParser) (*HistoricalEventCollectionInsurrection, error) {
var obj = NewHistoricalEventCollectionInsurrection()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "target_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetEnid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionInsurrectionPlus(p *util.XMLParser, obj *HistoricalEventCollectionInsurrection) (*HistoricalEventCollectionInsurrection, error) {
if obj == nil {
obj = NewHistoricalEventCollectionInsurrection()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionJourney(p *util.XMLParser) (*HistoricalEventCollectionJourney, error) {
var obj = NewHistoricalEventCollectionJourney()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionJourneyPlus(p *util.XMLParser, obj *HistoricalEventCollectionJourney) (*HistoricalEventCollectionJourney, error) {
if obj == nil {
obj = NewHistoricalEventCollectionJourney()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionOccasion(p *util.XMLParser) (*HistoricalEventCollectionOccasion, error) {
var obj = NewHistoricalEventCollectionOccasion()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "occasion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OccasionId = num(data)
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionOccasionPlus(p *util.XMLParser, obj *HistoricalEventCollectionOccasion) (*HistoricalEventCollectionOccasion, error) {
if obj == nil {
obj = NewHistoricalEventCollectionOccasion()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionPerformance(p *util.XMLParser) (*HistoricalEventCollectionPerformance, error) {
var obj = NewHistoricalEventCollectionPerformance()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionPerformancePlus(p *util.XMLParser, obj *HistoricalEventCollectionPerformance) (*HistoricalEventCollectionPerformance, error) {
if obj == nil {
obj = NewHistoricalEventCollectionPerformance()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionPersecution(p *util.XMLParser) (*HistoricalEventCollectionPersecution, error) {
var obj = NewHistoricalEventCollectionPersecution()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "target_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetEntityId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionPersecutionPlus(p *util.XMLParser, obj *HistoricalEventCollectionPersecution) (*HistoricalEventCollectionPersecution, error) {
if obj == nil {
obj = NewHistoricalEventCollectionPersecution()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionProcession(p *util.XMLParser) (*HistoricalEventCollectionProcession, error) {
var obj = NewHistoricalEventCollectionProcession()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionProcessionPlus(p *util.XMLParser, obj *HistoricalEventCollectionProcession) (*HistoricalEventCollectionProcession, error) {
if obj == nil {
obj = NewHistoricalEventCollectionProcession()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionPurge(p *util.XMLParser) (*HistoricalEventCollectionPurge, error) {
var obj = NewHistoricalEventCollectionPurge()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "adjective":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Adjective = parseHistoricalEventCollectionPurgeAdjective(txt(data))
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionPurgePlus(p *util.XMLParser, obj *HistoricalEventCollectionPurge) (*HistoricalEventCollectionPurge, error) {
if obj == nil {
obj = NewHistoricalEventCollectionPurge()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionRaid(p *util.XMLParser) (*HistoricalEventCollectionRaid, error) {
var obj = NewHistoricalEventCollectionRaid()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacking_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingEnid = num(data)
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "defending_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingEnid = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
case "parent_eventcol":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ParentEventcol = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionRaidPlus(p *util.XMLParser, obj *HistoricalEventCollectionRaid) (*HistoricalEventCollectionRaid, error) {
if obj == nil {
obj = NewHistoricalEventCollectionRaid()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionSiteConquered(p *util.XMLParser) (*HistoricalEventCollectionSiteConquered, error) {
var obj = NewHistoricalEventCollectionSiteConquered()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacking_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingEnid = num(data)
case "defending_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingEnid = num(data)
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "war_eventcol":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WarEventcol = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionSiteConqueredPlus(p *util.XMLParser, obj *HistoricalEventCollectionSiteConquered) (*HistoricalEventCollectionSiteConquered, error) {
if obj == nil {
obj = NewHistoricalEventCollectionSiteConquered()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionTheft(p *util.XMLParser) (*HistoricalEventCollectionTheft, error) {
var obj = NewHistoricalEventCollectionTheft()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacking_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackingEnid = num(data)
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "defending_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefendingEnid = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "ordinal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ordinal = num(data)
case "parent_eventcol":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ParentEventcol = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionTheftPlus(p *util.XMLParser, obj *HistoricalEventCollectionTheft) (*HistoricalEventCollectionTheft, error) {
if obj == nil {
obj = NewHistoricalEventCollectionTheft()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionWar(p *util.XMLParser) (*HistoricalEventCollectionWar, error) {
var obj = NewHistoricalEventCollectionWar()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "aggressor_ent_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AggressorEntId = num(data)
case "defender_ent_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderEntId = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCollectionWarPlus(p *util.XMLParser, obj *HistoricalEventCollectionWar) (*HistoricalEventCollectionWar, error) {
if obj == nil {
obj = NewHistoricalEventCollectionWar()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCompetition(p *util.XMLParser) (*HistoricalEventCompetition, error) {
var obj = NewHistoricalEventCompetition()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "competitor_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CompetitorHfid = append(obj.CompetitorHfid, num(data))
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "occasion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OccasionId = num(data)
case "schedule_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ScheduleId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "winner_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WinnerHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCompetitionPlus(p *util.XMLParser, obj *HistoricalEventCompetition) (*HistoricalEventCompetition, error) {
if obj == nil {
obj = NewHistoricalEventCompetition()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCreateEntityPosition(p *util.XMLParser) (*HistoricalEventCreateEntityPosition, error) {
var obj = NewHistoricalEventCreateEntityPosition()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCreateEntityPositionPlus(p *util.XMLParser, obj *HistoricalEventCreateEntityPosition) (*HistoricalEventCreateEntityPosition, error) {
if obj == nil {
obj = NewHistoricalEventCreateEntityPosition()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Civ = num(data)
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Histfig = num(data)
case "position":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Position = txt(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventCreateEntityPositionReason(txt(data))
case "site_civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCiv = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCreatedSite(p *util.XMLParser) (*HistoricalEventCreatedSite, error) {
var obj = NewHistoricalEventCreatedSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "builder_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BuilderHfid = num(data)
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "resident_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ResidentCivId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCreatedSitePlus(p *util.XMLParser, obj *HistoricalEventCreatedSite) (*HistoricalEventCreatedSite, error) {
if obj == nil {
obj = NewHistoricalEventCreatedSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCreatedStructure(p *util.XMLParser) (*HistoricalEventCreatedStructure, error) {
var obj = NewHistoricalEventCreatedStructure()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "builder_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BuilderHfid = num(data)
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "rebuilt":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Rebuilt = true
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCreatedStructurePlus(p *util.XMLParser, obj *HistoricalEventCreatedStructure) (*HistoricalEventCreatedStructure, error) {
if obj == nil {
obj = NewHistoricalEventCreatedStructure()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "builder_hf":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BuilderHfid = num(data)
case "civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "rebuild":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Rebuild = parseHistoricalEventCreatedStructureRebuild(txt(data))
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "site_civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCreatedWorldConstruction(p *util.XMLParser) (*HistoricalEventCreatedWorldConstruction, error) {
var obj = NewHistoricalEventCreatedWorldConstruction()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "master_wcid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.MasterWcid = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id1":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId1 = num(data)
case "site_id2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId2 = num(data)
case "wcid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Wcid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCreatedWorldConstructionPlus(p *util.XMLParser, obj *HistoricalEventCreatedWorldConstruction) (*HistoricalEventCreatedWorldConstruction, error) {
if obj == nil {
obj = NewHistoricalEventCreatedWorldConstruction()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCreatureDevoured(p *util.XMLParser) (*HistoricalEventCreatureDevoured, error) {
var obj = NewHistoricalEventCreatureDevoured()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventCreatureDevouredPlus(p *util.XMLParser, obj *HistoricalEventCreatureDevoured) (*HistoricalEventCreatureDevoured, error) {
if obj == nil {
obj = NewHistoricalEventCreatureDevoured()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Caste = txt(data)
case "eater":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Eater = num(data)
case "entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Entity = num(data)
case "race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Race = txt(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "victim":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Victim = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventDanceFormCreated(p *util.XMLParser) (*HistoricalEventDanceFormCreated, error) {
var obj = NewHistoricalEventDanceFormCreated()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "circumstance":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Circumstance = parseHistoricalEventDanceFormCreatedCircumstance(txt(data))
case "circumstance_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CircumstanceId = num(data)
case "form_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FormId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventDanceFormCreatedReason(txt(data))
case "reason_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ReasonId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventDanceFormCreatedPlus(p *util.XMLParser, obj *HistoricalEventDanceFormCreated) (*HistoricalEventDanceFormCreated, error) {
if obj == nil {
obj = NewHistoricalEventDanceFormCreated()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventDestroyedSite(p *util.XMLParser) (*HistoricalEventDestroyedSite, error) {
var obj = NewHistoricalEventDestroyedSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacker_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerCivId = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "no_defeat_mention":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.NoDefeatMention = true
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventDestroyedSitePlus(p *util.XMLParser, obj *HistoricalEventDestroyedSite) (*HistoricalEventDestroyedSite, error) {
if obj == nil {
obj = NewHistoricalEventDestroyedSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventDiplomatLost(p *util.XMLParser) (*HistoricalEventDiplomatLost, error) {
var obj = NewHistoricalEventDiplomatLost()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventDiplomatLostPlus(p *util.XMLParser, obj *HistoricalEventDiplomatLost) (*HistoricalEventDiplomatLost, error) {
if obj == nil {
obj = NewHistoricalEventDiplomatLost()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Entity = num(data)
case "involved":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Involved = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityAllianceFormed(p *util.XMLParser) (*HistoricalEventEntityAllianceFormed, error) {
var obj = NewHistoricalEventEntityAllianceFormed()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "initiating_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.InitiatingEnid = num(data)
case "joining_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.JoiningEnid = append(obj.JoiningEnid, num(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityAllianceFormedPlus(p *util.XMLParser, obj *HistoricalEventEntityAllianceFormed) (*HistoricalEventEntityAllianceFormed, error) {
if obj == nil {
obj = NewHistoricalEventEntityAllianceFormed()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityBreachFeatureLayer(p *util.XMLParser) (*HistoricalEventEntityBreachFeatureLayer, error) {
var obj = NewHistoricalEventEntityBreachFeatureLayer()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivEntityId = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "site_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteEntityId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityBreachFeatureLayerPlus(p *util.XMLParser, obj *HistoricalEventEntityBreachFeatureLayer) (*HistoricalEventEntityBreachFeatureLayer, error) {
if obj == nil {
obj = NewHistoricalEventEntityBreachFeatureLayer()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityCreated(p *util.XMLParser) (*HistoricalEventEntityCreated, error) {
var obj = NewHistoricalEventEntityCreated()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "creator_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CreatorHfid = num(data)
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityCreatedPlus(p *util.XMLParser, obj *HistoricalEventEntityCreated) (*HistoricalEventEntityCreated, error) {
if obj == nil {
obj = NewHistoricalEventEntityCreated()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityDissolved(p *util.XMLParser) (*HistoricalEventEntityDissolved, error) {
var obj = NewHistoricalEventEntityDissolved()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventEntityDissolvedReason(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityDissolvedPlus(p *util.XMLParser, obj *HistoricalEventEntityDissolved) (*HistoricalEventEntityDissolved, error) {
if obj == nil {
obj = NewHistoricalEventEntityDissolved()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityEquipmentPurchase(p *util.XMLParser) (*HistoricalEventEntityEquipmentPurchase, error) {
var obj = NewHistoricalEventEntityEquipmentPurchase()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = append(obj.Hfid, num(data))
case "new_equipment_level":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewEquipmentLevel = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityEquipmentPurchasePlus(p *util.XMLParser, obj *HistoricalEventEntityEquipmentPurchase) (*HistoricalEventEntityEquipmentPurchase, error) {
if obj == nil {
obj = NewHistoricalEventEntityEquipmentPurchase()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityExpelsHf(p *util.XMLParser) (*HistoricalEventEntityExpelsHf, error) {
var obj = NewHistoricalEventEntityExpelsHf()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityExpelsHfPlus(p *util.XMLParser, obj *HistoricalEventEntityExpelsHf) (*HistoricalEventEntityExpelsHf, error) {
if obj == nil {
obj = NewHistoricalEventEntityExpelsHf()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityFledSite(p *util.XMLParser) (*HistoricalEventEntityFledSite, error) {
var obj = NewHistoricalEventEntityFledSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "fled_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FledCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityFledSitePlus(p *util.XMLParser, obj *HistoricalEventEntityFledSite) (*HistoricalEventEntityFledSite, error) {
if obj == nil {
obj = NewHistoricalEventEntityFledSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityIncorporated(p *util.XMLParser) (*HistoricalEventEntityIncorporated, error) {
var obj = NewHistoricalEventEntityIncorporated()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "joined_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.JoinedEntityId = num(data)
case "joiner_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.JoinerEntityId = num(data)
case "leader_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LeaderHfid = num(data)
case "partial_incorporation":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.PartialIncorporation = true
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityIncorporatedPlus(p *util.XMLParser, obj *HistoricalEventEntityIncorporated) (*HistoricalEventEntityIncorporated, error) {
if obj == nil {
obj = NewHistoricalEventEntityIncorporated()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityLaw(p *util.XMLParser) (*HistoricalEventEntityLaw, error) {
var obj = NewHistoricalEventEntityLaw()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "law_add":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LawAdd = parseHistoricalEventEntityLawLawAdd(txt(data))
case "law_remove":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LawRemove = parseHistoricalEventEntityLawLawRemove(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityLawPlus(p *util.XMLParser, obj *HistoricalEventEntityLaw) (*HistoricalEventEntityLaw, error) {
if obj == nil {
obj = NewHistoricalEventEntityLaw()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityOverthrown(p *util.XMLParser) (*HistoricalEventEntityOverthrown, error) {
var obj = NewHistoricalEventEntityOverthrown()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "conspirator_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ConspiratorHfid = append(obj.ConspiratorHfid, num(data))
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "instigator_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.InstigatorHfid = num(data)
case "overthrown_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OverthrownHfid = num(data)
case "pos_taker_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PosTakerHfid = num(data)
case "position_profile_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PositionProfileId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityOverthrownPlus(p *util.XMLParser, obj *HistoricalEventEntityOverthrown) (*HistoricalEventEntityOverthrown, error) {
if obj == nil {
obj = NewHistoricalEventEntityOverthrown()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityPersecuted(p *util.XMLParser) (*HistoricalEventEntityPersecuted, error) {
var obj = NewHistoricalEventEntityPersecuted()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "destroyed_structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DestroyedStructureId = num(data)
case "expelled_creature":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ExpelledCreature = append(obj.ExpelledCreature, num(data))
case "expelled_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ExpelledHfid = append(obj.ExpelledHfid, num(data))
case "expelled_number":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ExpelledNumber = append(obj.ExpelledNumber, num(data))
case "expelled_pop_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ExpelledPopId = append(obj.ExpelledPopId, num(data))
case "persecutor_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PersecutorEnid = num(data)
case "persecutor_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PersecutorHfid = num(data)
case "property_confiscated_from_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PropertyConfiscatedFromHfid = append(obj.PropertyConfiscatedFromHfid, num(data))
case "shrine_amount_destroyed":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ShrineAmountDestroyed = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "target_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetEnid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityPersecutedPlus(p *util.XMLParser, obj *HistoricalEventEntityPersecuted) (*HistoricalEventEntityPersecuted, error) {
if obj == nil {
obj = NewHistoricalEventEntityPersecuted()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityPrimaryCriminals(p *util.XMLParser) (*HistoricalEventEntityPrimaryCriminals, error) {
var obj = NewHistoricalEventEntityPrimaryCriminals()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityPrimaryCriminalsPlus(p *util.XMLParser, obj *HistoricalEventEntityPrimaryCriminals) (*HistoricalEventEntityPrimaryCriminals, error) {
if obj == nil {
obj = NewHistoricalEventEntityPrimaryCriminals()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "action":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Action = parseHistoricalEventEntityPrimaryCriminalsAction(txt(data))
case "entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityRampagedInSite(p *util.XMLParser) (*HistoricalEventEntityRampagedInSite, error) {
var obj = NewHistoricalEventEntityRampagedInSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "rampage_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RampageCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityRampagedInSitePlus(p *util.XMLParser, obj *HistoricalEventEntityRampagedInSite) (*HistoricalEventEntityRampagedInSite, error) {
if obj == nil {
obj = NewHistoricalEventEntityRampagedInSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityRelocate(p *util.XMLParser) (*HistoricalEventEntityRelocate, error) {
var obj = NewHistoricalEventEntityRelocate()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntityRelocatePlus(p *util.XMLParser, obj *HistoricalEventEntityRelocate) (*HistoricalEventEntityRelocate, error) {
if obj == nil {
obj = NewHistoricalEventEntityRelocate()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "action":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Action = parseHistoricalEventEntityRelocateAction(txt(data))
case "entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntitySearchedSite(p *util.XMLParser) (*HistoricalEventEntitySearchedSite, error) {
var obj = NewHistoricalEventEntitySearchedSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "result":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Result = parseHistoricalEventEntitySearchedSiteResult(txt(data))
case "searcher_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SearcherCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventEntitySearchedSitePlus(p *util.XMLParser, obj *HistoricalEventEntitySearchedSite) (*HistoricalEventEntitySearchedSite, error) {
if obj == nil {
obj = NewHistoricalEventEntitySearchedSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventFailedFrameAttempt(p *util.XMLParser) (*HistoricalEventFailedFrameAttempt, error) {
var obj = NewHistoricalEventFailedFrameAttempt()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "convicter_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ConvicterEnid = num(data)
case "crime":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Crime = parseHistoricalEventFailedFrameAttemptCrime(txt(data))
case "fooled_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FooledHfid = num(data)
case "framer_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FramerHfid = num(data)
case "plotter_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PlotterHfid = num(data)
case "target_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventFailedFrameAttemptPlus(p *util.XMLParser, obj *HistoricalEventFailedFrameAttempt) (*HistoricalEventFailedFrameAttempt, error) {
if obj == nil {
obj = NewHistoricalEventFailedFrameAttempt()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventFailedIntrigueCorruption(p *util.XMLParser) (*HistoricalEventFailedIntrigueCorruption, error) {
var obj = NewHistoricalEventFailedIntrigueCorruption()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "action":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Action = parseHistoricalEventFailedIntrigueCorruptionAction(txt(data))
case "ally_defense_bonus":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AllyDefenseBonus = num(data)
case "coconspirator_bonus":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CoconspiratorBonus = num(data)
case "corruptor_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CorruptorHfid = num(data)
case "corruptor_identity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CorruptorIdentity = num(data)
case "failed_judgment_test":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.FailedJudgmentTest = true
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "lure_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LureHfid = num(data)
case "method":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Method = parseHistoricalEventFailedIntrigueCorruptionMethod(txt(data))
case "relevant_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RelevantEntityId = num(data)
case "relevant_id_for_method":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RelevantIdForMethod = num(data)
case "relevant_position_profile_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RelevantPositionProfileId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "target_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetHfid = num(data)
case "target_identity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetIdentity = num(data)
case "top_facet":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopFacet = parseHistoricalEventFailedIntrigueCorruptionTopFacet(txt(data))
case "top_facet_modifier":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopFacetModifier = num(data)
case "top_facet_rating":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopFacetRating = num(data)
case "top_relationship_factor":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopRelationshipFactor = parseHistoricalEventFailedIntrigueCorruptionTopRelationshipFactor(txt(data))
case "top_relationship_modifier":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopRelationshipModifier = num(data)
case "top_relationship_rating":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopRelationshipRating = num(data)
case "top_value":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopValue = parseHistoricalEventFailedIntrigueCorruptionTopValue(txt(data))
case "top_value_modifier":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopValueModifier = num(data)
case "top_value_rating":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopValueRating = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventFailedIntrigueCorruptionPlus(p *util.XMLParser, obj *HistoricalEventFailedIntrigueCorruption) (*HistoricalEventFailedIntrigueCorruption, error) {
if obj == nil {
obj = NewHistoricalEventFailedIntrigueCorruption()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventFieldBattle(p *util.XMLParser) (*HistoricalEventFieldBattle, error) {
var obj = NewHistoricalEventFieldBattle()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "a_support_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ASupportMercEnid = num(data)
case "attacker_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerCivId = num(data)
case "attacker_general_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerGeneralHfid = num(data)
case "attacker_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerMercEnid = num(data)
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "d_support_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DSupportMercEnid = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "defender_general_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderGeneralHfid = num(data)
case "defender_merc_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderMercEnid = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventFieldBattlePlus(p *util.XMLParser, obj *HistoricalEventFieldBattle) (*HistoricalEventFieldBattle, error) {
if obj == nil {
obj = NewHistoricalEventFieldBattle()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventFirstContact(p *util.XMLParser) (*HistoricalEventFirstContact, error) {
var obj = NewHistoricalEventFirstContact()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "contacted_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ContactedEnid = num(data)
case "contactor_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ContactorEnid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventFirstContactPlus(p *util.XMLParser, obj *HistoricalEventFirstContact) (*HistoricalEventFirstContact, error) {
if obj == nil {
obj = NewHistoricalEventFirstContact()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventGamble(p *util.XMLParser) (*HistoricalEventGamble, error) {
var obj = NewHistoricalEventGamble()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "gambler_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.GamblerHfid = num(data)
case "new_account":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewAccount = num(data)
case "old_account":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OldAccount = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventGamblePlus(p *util.XMLParser, obj *HistoricalEventGamble) (*HistoricalEventGamble, error) {
if obj == nil {
obj = NewHistoricalEventGamble()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfAbducted(p *util.XMLParser) (*HistoricalEventHfAbducted, error) {
var obj = NewHistoricalEventHfAbducted()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "snatcher_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SnatcherHfid = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "target_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfAbductedPlus(p *util.XMLParser, obj *HistoricalEventHfAbducted) (*HistoricalEventHfAbducted, error) {
if obj == nil {
obj = NewHistoricalEventHfAbducted()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfAttackedSite(p *util.XMLParser) (*HistoricalEventHfAttackedSite, error) {
var obj = NewHistoricalEventHfAttackedSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacker_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerHfid = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfAttackedSitePlus(p *util.XMLParser, obj *HistoricalEventHfAttackedSite) (*HistoricalEventHfAttackedSite, error) {
if obj == nil {
obj = NewHistoricalEventHfAttackedSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfConfronted(p *util.XMLParser) (*HistoricalEventHfConfronted, error) {
var obj = NewHistoricalEventHfConfronted()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = append(obj.Reason, parseHistoricalEventHfConfrontedReason(txt(data)))
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "situation":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Situation = parseHistoricalEventHfConfrontedSituation(txt(data))
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfConfrontedPlus(p *util.XMLParser, obj *HistoricalEventHfConfronted) (*HistoricalEventHfConfronted, error) {
if obj == nil {
obj = NewHistoricalEventHfConfronted()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfConvicted(p *util.XMLParser) (*HistoricalEventHfConvicted, error) {
var obj = NewHistoricalEventHfConvicted()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "beating":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Beating = true
case "coconspirator_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CoconspiratorHfid = num(data)
case "confessed_after_apb_arrest_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ConfessedAfterApbArrestEnid = num(data)
case "contact_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ContactHfid = num(data)
case "convict_is_contact":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.ConvictIsContact = true
case "convicted_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ConvictedHfid = num(data)
case "convicter_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ConvicterEnid = num(data)
case "corrupt_convicter_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CorruptConvicterHfid = num(data)
case "crime":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Crime = parseHistoricalEventHfConvictedCrime(txt(data))
case "death_penalty":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.DeathPenalty = true
case "did_not_reveal_all_in_interrogation":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.DidNotRevealAllInInterrogation = true
case "exiled":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Exiled = true
case "fooled_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FooledHfid = num(data)
case "framer_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FramerHfid = num(data)
case "hammerstrokes":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hammerstrokes = num(data)
case "held_firm_in_interrogation":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HeldFirmInInterrogation = true
case "implicated_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ImplicatedHfid = append(obj.ImplicatedHfid, num(data))
case "interrogator_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.InterrogatorHfid = num(data)
case "no_prison_available":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.NoPrisonAvailable = true
case "plotter_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PlotterHfid = num(data)
case "prison_months":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PrisonMonths = num(data)
case "surveiled_coconspirator":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.SurveiledCoconspirator = true
case "surveiled_contact":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.SurveiledContact = true
case "surveiled_convicted":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.SurveiledConvicted = true
case "surveiled_target":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.SurveiledTarget = true
case "target_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetHfid = num(data)
case "wrongful_conviction":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.WrongfulConviction = true
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfConvictedPlus(p *util.XMLParser, obj *HistoricalEventHfConvicted) (*HistoricalEventHfConvicted, error) {
if obj == nil {
obj = NewHistoricalEventHfConvicted()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfDestroyedSite(p *util.XMLParser) (*HistoricalEventHfDestroyedSite, error) {
var obj = NewHistoricalEventHfDestroyedSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacker_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerHfid = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfDestroyedSitePlus(p *util.XMLParser, obj *HistoricalEventHfDestroyedSite) (*HistoricalEventHfDestroyedSite, error) {
if obj == nil {
obj = NewHistoricalEventHfDestroyedSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfDied(p *util.XMLParser) (*HistoricalEventHfDied, error) {
var obj = NewHistoricalEventHfDied()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "cause":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Cause = parseHistoricalEventHfDiedCause(txt(data))
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "slayer_caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SlayerCaste = txt(data)
case "slayer_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SlayerHfid = num(data)
case "slayer_item_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SlayerItemId = num(data)
case "slayer_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SlayerRace = txt(data)
case "slayer_shooter_item_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SlayerShooterItemId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfDiedPlus(p *util.XMLParser, obj *HistoricalEventHfDied) (*HistoricalEventHfDied, error) {
if obj == nil {
obj = NewHistoricalEventHfDied()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SlayerItemId = num(data)
case "death_cause":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Cause = parseHistoricalEventHfDiedCause(txt(data))
case "item":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SlayerItemId = num(data)
case "item_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemSubtype = txt(data)
case "item_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemType = txt(data)
case "mat":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Mat = txt(data)
case "shooter_artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ShooterArtifactId = num(data)
case "shooter_item":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ShooterItem = num(data)
case "shooter_item_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ShooterItemSubtype = parseHistoricalEventHfDiedShooterItemSubtype(txt(data))
case "shooter_item_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ShooterItemType = parseHistoricalEventHfDiedShooterItemType(txt(data))
case "shooter_mat":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ShooterMat = txt(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "slayer_caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SlayerCaste = txt(data)
case "slayer_hf":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SlayerHfid = num(data)
case "slayer_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SlayerRace = txt(data)
case "victim_hf":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfDisturbedStructure(p *util.XMLParser) (*HistoricalEventHfDisturbedStructure, error) {
var obj = NewHistoricalEventHfDisturbedStructure()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hist_fig_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfDisturbedStructurePlus(p *util.XMLParser, obj *HistoricalEventHfDisturbedStructure) (*HistoricalEventHfDisturbedStructure, error) {
if obj == nil {
obj = NewHistoricalEventHfDisturbedStructure()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "action":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Action = parseHistoricalEventHfDisturbedStructureAction(txt(data))
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigId = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfDoesInteraction(p *util.XMLParser) (*HistoricalEventHfDoesInteraction, error) {
var obj = NewHistoricalEventHfDoesInteraction()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "doer_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DoerHfid = num(data)
case "interaction":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Interaction = txt(data)
case "target_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfDoesInteractionPlus(p *util.XMLParser, obj *HistoricalEventHfDoesInteraction) (*HistoricalEventHfDoesInteraction, error) {
if obj == nil {
obj = NewHistoricalEventHfDoesInteraction()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "doer":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DoerHfid = num(data)
case "interaction_action":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.InteractionAction = txt(data)
case "region":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Region = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Site = num(data)
case "source":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Source = num(data)
case "target":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfEnslaved(p *util.XMLParser) (*HistoricalEventHfEnslaved, error) {
var obj = NewHistoricalEventHfEnslaved()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "enslaved_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EnslavedHfid = num(data)
case "moved_to_site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.MovedToSiteId = num(data)
case "payer_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PayerEntityId = num(data)
case "seller_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SellerHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfEnslavedPlus(p *util.XMLParser, obj *HistoricalEventHfEnslaved) (*HistoricalEventHfEnslaved, error) {
if obj == nil {
obj = NewHistoricalEventHfEnslaved()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfEquipmentPurchase(p *util.XMLParser) (*HistoricalEventHfEquipmentPurchase, error) {
var obj = NewHistoricalEventHfEquipmentPurchase()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "group_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.GroupHfid = num(data)
case "quality":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Quality = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfEquipmentPurchasePlus(p *util.XMLParser, obj *HistoricalEventHfEquipmentPurchase) (*HistoricalEventHfEquipmentPurchase, error) {
if obj == nil {
obj = NewHistoricalEventHfEquipmentPurchase()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfFreed(p *util.XMLParser) (*HistoricalEventHfFreed, error) {
var obj = NewHistoricalEventHfFreed()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "freeing_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FreeingCivId = num(data)
case "freeing_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FreeingHfid = num(data)
case "holding_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HoldingCivId = num(data)
case "rescued_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RescuedHfid = append(obj.RescuedHfid, num(data))
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfFreedPlus(p *util.XMLParser, obj *HistoricalEventHfFreed) (*HistoricalEventHfFreed, error) {
if obj == nil {
obj = NewHistoricalEventHfFreed()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfGainsSecretGoal(p *util.XMLParser) (*HistoricalEventHfGainsSecretGoal, error) {
var obj = NewHistoricalEventHfGainsSecretGoal()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "secret_goal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SecretGoal = parseHistoricalEventHfGainsSecretGoalSecretGoal(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfGainsSecretGoalPlus(p *util.XMLParser, obj *HistoricalEventHfGainsSecretGoal) (*HistoricalEventHfGainsSecretGoal, error) {
if obj == nil {
obj = NewHistoricalEventHfGainsSecretGoal()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfInterrogated(p *util.XMLParser) (*HistoricalEventHfInterrogated, error) {
var obj = NewHistoricalEventHfInterrogated()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "arresting_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArrestingEnid = num(data)
case "held_firm_in_interrogation":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.HeldFirmInInterrogation = true
case "implicated_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ImplicatedHfid = num(data)
case "interrogator_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.InterrogatorHfid = num(data)
case "target_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetHfid = num(data)
case "wanted_and_recognized":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.WantedAndRecognized = true
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfInterrogatedPlus(p *util.XMLParser, obj *HistoricalEventHfInterrogated) (*HistoricalEventHfInterrogated, error) {
if obj == nil {
obj = NewHistoricalEventHfInterrogated()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfLearnsSecret(p *util.XMLParser) (*HistoricalEventHfLearnsSecret, error) {
var obj = NewHistoricalEventHfLearnsSecret()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "interaction":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Interaction = txt(data)
case "student_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StudentHfid = num(data)
case "teacher_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TeacherHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfLearnsSecretPlus(p *util.XMLParser, obj *HistoricalEventHfLearnsSecret) (*HistoricalEventHfLearnsSecret, error) {
if obj == nil {
obj = NewHistoricalEventHfLearnsSecret()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "secret_text":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SecretText = parseHistoricalEventHfLearnsSecretSecretText(txt(data))
case "student":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StudentHfid = num(data)
case "teacher":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TeacherHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfNewPet(p *util.XMLParser) (*HistoricalEventHfNewPet, error) {
var obj = NewHistoricalEventHfNewPet()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "group_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.GroupHfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfNewPetPlus(p *util.XMLParser, obj *HistoricalEventHfNewPet) (*HistoricalEventHfNewPet, error) {
if obj == nil {
obj = NewHistoricalEventHfNewPet()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "group":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.GroupHfid = num(data)
case "pets":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Pets = txt(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfPerformedHorribleExperiments(p *util.XMLParser) (*HistoricalEventHfPerformedHorribleExperiments, error) {
var obj = NewHistoricalEventHfPerformedHorribleExperiments()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "group_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.GroupHfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfPerformedHorribleExperimentsPlus(p *util.XMLParser, obj *HistoricalEventHfPerformedHorribleExperiments) (*HistoricalEventHfPerformedHorribleExperiments, error) {
if obj == nil {
obj = NewHistoricalEventHfPerformedHorribleExperiments()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfPrayedInsideStructure(p *util.XMLParser) (*HistoricalEventHfPrayedInsideStructure, error) {
var obj = NewHistoricalEventHfPrayedInsideStructure()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hist_fig_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfPrayedInsideStructurePlus(p *util.XMLParser, obj *HistoricalEventHfPrayedInsideStructure) (*HistoricalEventHfPrayedInsideStructure, error) {
if obj == nil {
obj = NewHistoricalEventHfPrayedInsideStructure()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "action":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Action = parseHistoricalEventHfPrayedInsideStructureAction(txt(data))
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigId = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfPreach(p *util.XMLParser) (*HistoricalEventHfPreach, error) {
var obj = NewHistoricalEventHfPreach()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_1":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Entity1 = num(data)
case "entity_2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Entity2 = num(data)
case "site_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteHfid = num(data)
case "speaker_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SpeakerHfid = num(data)
case "topic":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Topic = parseHistoricalEventHfPreachTopic(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfPreachPlus(p *util.XMLParser, obj *HistoricalEventHfPreach) (*HistoricalEventHfPreach, error) {
if obj == nil {
obj = NewHistoricalEventHfPreach()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfProfanedStructure(p *util.XMLParser) (*HistoricalEventHfProfanedStructure, error) {
var obj = NewHistoricalEventHfProfanedStructure()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hist_fig_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfProfanedStructurePlus(p *util.XMLParser, obj *HistoricalEventHfProfanedStructure) (*HistoricalEventHfProfanedStructure, error) {
if obj == nil {
obj = NewHistoricalEventHfProfanedStructure()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "action":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Action = parseHistoricalEventHfProfanedStructureAction(txt(data))
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigId = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfRansomed(p *util.XMLParser) (*HistoricalEventHfRansomed, error) {
var obj = NewHistoricalEventHfRansomed()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "moved_to_site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.MovedToSiteId = num(data)
case "payer_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PayerEntityId = num(data)
case "payer_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PayerHfid = num(data)
case "ransomed_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RansomedHfid = num(data)
case "ransomer_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RansomerHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfRansomedPlus(p *util.XMLParser, obj *HistoricalEventHfRansomed) (*HistoricalEventHfRansomed, error) {
if obj == nil {
obj = NewHistoricalEventHfRansomed()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfReachSummit(p *util.XMLParser) (*HistoricalEventHfReachSummit, error) {
var obj = NewHistoricalEventHfReachSummit()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "group_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.GroupHfid = append(obj.GroupHfid, num(data))
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfReachSummitPlus(p *util.XMLParser, obj *HistoricalEventHfReachSummit) (*HistoricalEventHfReachSummit, error) {
if obj == nil {
obj = NewHistoricalEventHfReachSummit()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "group":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Group = append(obj.Group, num(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfRecruitedUnitTypeForEntity(p *util.XMLParser) (*HistoricalEventHfRecruitedUnitTypeForEntity, error) {
var obj = NewHistoricalEventHfRecruitedUnitTypeForEntity()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "unit_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.UnitType = parseHistoricalEventHfRecruitedUnitTypeForEntityUnitType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfRecruitedUnitTypeForEntityPlus(p *util.XMLParser, obj *HistoricalEventHfRecruitedUnitTypeForEntity) (*HistoricalEventHfRecruitedUnitTypeForEntity, error) {
if obj == nil {
obj = NewHistoricalEventHfRecruitedUnitTypeForEntity()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfRelationshipDenied(p *util.XMLParser) (*HistoricalEventHfRelationshipDenied, error) {
var obj = NewHistoricalEventHfRelationshipDenied()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventHfRelationshipDeniedReason(txt(data))
case "reason_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ReasonId = num(data)
case "relationship":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Relationship = parseHistoricalEventHfRelationshipDeniedRelationship(txt(data))
case "seeker_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SeekerHfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "target_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfRelationshipDeniedPlus(p *util.XMLParser, obj *HistoricalEventHfRelationshipDenied) (*HistoricalEventHfRelationshipDenied, error) {
if obj == nil {
obj = NewHistoricalEventHfRelationshipDenied()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfReunion(p *util.XMLParser) (*HistoricalEventHfReunion, error) {
var obj = NewHistoricalEventHfReunion()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "group_1_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Group1Hfid = num(data)
case "group_2_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Group2Hfid = append(obj.Group2Hfid, num(data))
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfReunionPlus(p *util.XMLParser, obj *HistoricalEventHfReunion) (*HistoricalEventHfReunion, error) {
if obj == nil {
obj = NewHistoricalEventHfReunion()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfRevived(p *util.XMLParser) (*HistoricalEventHfRevived, error) {
var obj = NewHistoricalEventHfRevived()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "actor_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ActorHfid = num(data)
case "disturbance":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Disturbance = true
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "ghost":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Ghost = parseHistoricalEventHfRevivedGhost(txt(data))
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "raised_before":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.RaisedBefore = true
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfRevivedPlus(p *util.XMLParser, obj *HistoricalEventHfRevived) (*HistoricalEventHfRevived, error) {
if obj == nil {
obj = NewHistoricalEventHfRevived()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfSimpleBattleEvent(p *util.XMLParser) (*HistoricalEventHfSimpleBattleEvent, error) {
var obj = NewHistoricalEventHfSimpleBattleEvent()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "group_1_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Group1Hfid = num(data)
case "group_2_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Group2Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Subtype = parseHistoricalEventHfSimpleBattleEventSubtype(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfSimpleBattleEventPlus(p *util.XMLParser, obj *HistoricalEventHfSimpleBattleEvent) (*HistoricalEventHfSimpleBattleEvent, error) {
if obj == nil {
obj = NewHistoricalEventHfSimpleBattleEvent()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfTravel(p *util.XMLParser) (*HistoricalEventHfTravel, error) {
var obj = NewHistoricalEventHfTravel()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "group_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.GroupHfid = append(obj.GroupHfid, num(data))
case "return":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Return = true
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfTravelPlus(p *util.XMLParser, obj *HistoricalEventHfTravel) (*HistoricalEventHfTravel, error) {
if obj == nil {
obj = NewHistoricalEventHfTravel()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfViewedArtifact(p *util.XMLParser) (*HistoricalEventHfViewedArtifact, error) {
var obj = NewHistoricalEventHfViewedArtifact()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "hist_fig_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfViewedArtifactPlus(p *util.XMLParser, obj *HistoricalEventHfViewedArtifact) (*HistoricalEventHfViewedArtifact, error) {
if obj == nil {
obj = NewHistoricalEventHfViewedArtifact()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfWounded(p *util.XMLParser) (*HistoricalEventHfWounded, error) {
var obj = NewHistoricalEventHfWounded()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "was_torture":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.WasTorture = true
case "woundee_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WoundeeHfid = num(data)
case "wounder_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WounderHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfWoundedPlus(p *util.XMLParser, obj *HistoricalEventHfWounded) (*HistoricalEventHfWounded, error) {
if obj == nil {
obj = NewHistoricalEventHfWounded()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "body_part":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BodyPart = num(data)
case "injury_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.InjuryType = parseHistoricalEventHfWoundedInjuryType(txt(data))
case "part_lost":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PartLost = parseHistoricalEventHfWoundedPartLost(txt(data))
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "woundee":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WoundeeHfid = num(data)
case "woundee_caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WoundeeCaste = num(data)
case "woundee_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WoundeeRace = num(data)
case "wounder":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WounderHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfsFormedIntrigueRelationship(p *util.XMLParser) (*HistoricalEventHfsFormedIntrigueRelationship, error) {
var obj = NewHistoricalEventHfsFormedIntrigueRelationship()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "action":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Action = parseHistoricalEventHfsFormedIntrigueRelationshipAction(txt(data))
case "ally_defense_bonus":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AllyDefenseBonus = num(data)
case "circumstance":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Circumstance = parseHistoricalEventHfsFormedIntrigueRelationshipCircumstance(txt(data))
case "circumstance_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CircumstanceId = num(data)
case "coconspirator_bonus":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CoconspiratorBonus = num(data)
case "corruptor_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CorruptorHfid = num(data)
case "corruptor_identity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CorruptorIdentity = num(data)
case "corruptor_seen_as":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CorruptorSeenAs = parseHistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs(txt(data))
case "failed_judgment_test":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.FailedJudgmentTest = true
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "lure_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LureHfid = num(data)
case "method":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Method = parseHistoricalEventHfsFormedIntrigueRelationshipMethod(txt(data))
case "relevant_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RelevantEntityId = num(data)
case "relevant_id_for_method":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RelevantIdForMethod = num(data)
case "relevant_position_profile_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RelevantPositionProfileId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "successful":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Successful = true
case "target_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetHfid = num(data)
case "target_identity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetIdentity = num(data)
case "target_seen_as":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetSeenAs = parseHistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs(txt(data))
case "top_facet":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopFacet = parseHistoricalEventHfsFormedIntrigueRelationshipTopFacet(txt(data))
case "top_facet_modifier":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopFacetModifier = num(data)
case "top_facet_rating":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopFacetRating = num(data)
case "top_relationship_factor":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopRelationshipFactor = parseHistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor(txt(data))
case "top_relationship_modifier":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopRelationshipModifier = num(data)
case "top_relationship_rating":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopRelationshipRating = num(data)
case "top_value":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopValue = parseHistoricalEventHfsFormedIntrigueRelationshipTopValue(txt(data))
case "top_value_modifier":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopValueModifier = num(data)
case "top_value_rating":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TopValueRating = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfsFormedIntrigueRelationshipPlus(p *util.XMLParser, obj *HistoricalEventHfsFormedIntrigueRelationship) (*HistoricalEventHfsFormedIntrigueRelationship, error) {
if obj == nil {
obj = NewHistoricalEventHfsFormedIntrigueRelationship()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfsFormedReputationRelationship(p *util.XMLParser) (*HistoricalEventHfsFormedReputationRelationship, error) {
var obj = NewHistoricalEventHfsFormedReputationRelationship()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "hf_rep_1_of_2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HfRep1Of2 = parseHistoricalEventHfsFormedReputationRelationshipHfRep1Of2(txt(data))
case "hf_rep_2_of_1":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HfRep2Of1 = parseHistoricalEventHfsFormedReputationRelationshipHfRep2Of1(txt(data))
case "hfid1":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid1 = num(data)
case "hfid2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid2 = num(data)
case "identity_id1":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.IdentityId1 = num(data)
case "identity_id2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.IdentityId2 = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHfsFormedReputationRelationshipPlus(p *util.XMLParser, obj *HistoricalEventHfsFormedReputationRelationship) (*HistoricalEventHfsFormedReputationRelationship, error) {
if obj == nil {
obj = NewHistoricalEventHfsFormedReputationRelationship()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHolyCityDeclaration(p *util.XMLParser) (*HistoricalEventHolyCityDeclaration, error) {
var obj = NewHistoricalEventHolyCityDeclaration()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "religion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ReligionId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventHolyCityDeclarationPlus(p *util.XMLParser, obj *HistoricalEventHolyCityDeclaration) (*HistoricalEventHolyCityDeclaration, error) {
if obj == nil {
obj = NewHistoricalEventHolyCityDeclaration()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventInsurrectionStarted(p *util.XMLParser) (*HistoricalEventInsurrectionStarted, error) {
var obj = NewHistoricalEventInsurrectionStarted()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "outcome":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Outcome = parseHistoricalEventInsurrectionStartedOutcome(txt(data))
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "target_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetCivId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventInsurrectionStartedPlus(p *util.XMLParser, obj *HistoricalEventInsurrectionStarted) (*HistoricalEventInsurrectionStarted, error) {
if obj == nil {
obj = NewHistoricalEventInsurrectionStarted()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventItemStolen(p *util.XMLParser) (*HistoricalEventItemStolen, error) {
var obj = NewHistoricalEventItemStolen()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "circumstance":
v, _ := parseHistoricalEventItemStolenCircumstance(p)
obj.Circumstance = v
case "circumstance_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CircumstanceId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventItemStolenPlus(p *util.XMLParser, obj *HistoricalEventItemStolen) (*HistoricalEventItemStolen, error) {
if obj == nil {
obj = NewHistoricalEventItemStolen()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "circumstance":
v, _ := parseHistoricalEventItemStolenCircumstancePlus(p, &HistoricalEventItemStolenCircumstance{})
obj.Circumstance = v
case "entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Entity = num(data)
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Histfig = num(data)
case "item":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Item = num(data)
case "item_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemSubtype = txt(data)
case "item_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemType = txt(data)
case "mat":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Mat = txt(data)
case "matindex":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Matindex = num(data)
case "mattype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Mattype = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Site = num(data)
case "stash_site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StashSite = num(data)
case "structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Structure = num(data)
case "theft_method":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TheftMethod = parseHistoricalEventItemStolenTheftMethod(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventItemStolenCircumstance(p *util.XMLParser) (*HistoricalEventItemStolenCircumstance, error) {
var obj = NewHistoricalEventItemStolenCircumstance()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventItemStolenCircumstancePlus(p *util.XMLParser, obj *HistoricalEventItemStolenCircumstance) (*HistoricalEventItemStolenCircumstance, error) {
if obj == nil {
obj = NewHistoricalEventItemStolenCircumstance()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "defeated":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Defeated = num(data)
case "hist_event_collection":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistEventCollection = num(data)
case "murdered":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Murdered = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseHistoricalEventItemStolenCircumstanceType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventKnowledgeDiscovered(p *util.XMLParser) (*HistoricalEventKnowledgeDiscovered, error) {
var obj = NewHistoricalEventKnowledgeDiscovered()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "first":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.First = true
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "knowledge":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Knowledge = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventKnowledgeDiscoveredPlus(p *util.XMLParser, obj *HistoricalEventKnowledgeDiscovered) (*HistoricalEventKnowledgeDiscovered, error) {
if obj == nil {
obj = NewHistoricalEventKnowledgeDiscovered()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceArchConstructed(p *util.XMLParser) (*HistoricalEventMasterpieceArchConstructed, error) {
var obj = NewHistoricalEventMasterpieceArchConstructed()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = parseHistoricalEventMasterpieceArchConstructedSkillAtTime(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceArchConstructedPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceArchConstructed) (*HistoricalEventMasterpieceArchConstructed, error) {
if obj == nil {
obj = NewHistoricalEventMasterpieceArchConstructed()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "building_custom":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BuildingCustom = num(data)
case "building_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BuildingSubtype = parseHistoricalEventMasterpieceArchConstructedBuildingSubtype(txt(data))
case "building_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BuildingType = parseHistoricalEventMasterpieceArchConstructedBuildingType(txt(data))
case "maker":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "maker_entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = parseHistoricalEventMasterpieceArchConstructedSkillAtTime(txt(data))
case "unk_2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Unk2 = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceDye(p *util.XMLParser) (*HistoricalEventMasterpieceDye, error) {
var obj = NewHistoricalEventMasterpieceDye()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = parseHistoricalEventMasterpieceDyeSkillAtTime(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceDyePlus(p *util.XMLParser, obj *HistoricalEventMasterpieceDye) (*HistoricalEventMasterpieceDye, error) {
if obj == nil {
obj = NewHistoricalEventMasterpieceDye()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "dye_mat":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DyeMat = txt(data)
case "dye_mat_index":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DyeMatIndex = num(data)
case "item_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemType = parseHistoricalEventMasterpieceDyeItemType(txt(data))
case "maker":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Maker = num(data)
case "maker_entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.MakerEntity = num(data)
case "mat":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Mat = parseHistoricalEventMasterpieceDyeMat(txt(data))
case "mat_index":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.MatIndex = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Site = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = parseHistoricalEventMasterpieceDyeSkillAtTime(txt(data))
case "unk_2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Unk2 = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceEngraving(p *util.XMLParser) (*HistoricalEventMasterpieceEngraving, error) {
var obj = NewHistoricalEventMasterpieceEngraving()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceEngravingPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceEngraving) (*HistoricalEventMasterpieceEngraving, error) {
if obj == nil {
obj = NewHistoricalEventMasterpieceEngraving()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "art_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtId = num(data)
case "art_subid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtSubid = num(data)
case "maker":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "maker_entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceFood(p *util.XMLParser) (*HistoricalEventMasterpieceFood, error) {
var obj = NewHistoricalEventMasterpieceFood()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = parseHistoricalEventMasterpieceFoodSkillAtTime(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceFoodPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceFood) (*HistoricalEventMasterpieceFood, error) {
if obj == nil {
obj = NewHistoricalEventMasterpieceFood()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "item_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemId = num(data)
case "item_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemSubtype = parseHistoricalEventMasterpieceFoodItemSubtype(txt(data))
case "item_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemType = parseHistoricalEventMasterpieceFoodItemType(txt(data))
case "maker":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Maker = num(data)
case "maker_entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.MakerEntity = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Site = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = parseHistoricalEventMasterpieceFoodSkillAtTime(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceItem(p *util.XMLParser) (*HistoricalEventMasterpieceItem, error) {
var obj = NewHistoricalEventMasterpieceItem()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceItemPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceItem) (*HistoricalEventMasterpieceItem, error) {
if obj == nil {
obj = NewHistoricalEventMasterpieceItem()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "item_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemId = num(data)
case "item_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemSubtype = txt(data)
case "item_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemType = txt(data)
case "maker":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "maker_entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "mat":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Mat = txt(data)
case "mat_index":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.MatIndex = num(data)
case "mat_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.MatType = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceItemImprovement(p *util.XMLParser) (*HistoricalEventMasterpieceItemImprovement, error) {
var obj = NewHistoricalEventMasterpieceItemImprovement()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = parseHistoricalEventMasterpieceItemImprovementSkillAtTime(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceItemImprovementPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceItemImprovement) (*HistoricalEventMasterpieceItemImprovement, error) {
if obj == nil {
obj = NewHistoricalEventMasterpieceItemImprovement()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "art_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtId = num(data)
case "art_subid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtSubid = num(data)
case "imp_mat":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ImpMat = txt(data)
case "improvement_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ImprovementSubtype = num(data)
case "improvement_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ImprovementType = parseHistoricalEventMasterpieceItemImprovementImprovementType(txt(data))
case "item_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemSubtype = txt(data)
case "item_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemType = txt(data)
case "maker":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Maker = num(data)
case "maker_entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.MakerEntity = num(data)
case "mat":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Mat = txt(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Site = num(data)
case "skill_at_time":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SkillAtTime = parseHistoricalEventMasterpieceItemImprovementSkillAtTime(txt(data))
case "unk_2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Unk2 = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceLost(p *util.XMLParser) (*HistoricalEventMasterpieceLost, error) {
var obj = NewHistoricalEventMasterpieceLost()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMasterpieceLostPlus(p *util.XMLParser, obj *HistoricalEventMasterpieceLost) (*HistoricalEventMasterpieceLost, error) {
if obj == nil {
obj = NewHistoricalEventMasterpieceLost()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "creation_event":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CreationEvent = num(data)
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Histfig = num(data)
case "method":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Method = txt(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Site = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMerchant(p *util.XMLParser) (*HistoricalEventMerchant, error) {
var obj = NewHistoricalEventMerchant()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "depot_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DepotEntityId = num(data)
case "hardship":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Hardship = true
case "lost_value":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.LostValue = true
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "trader_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TraderEntityId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMerchantPlus(p *util.XMLParser, obj *HistoricalEventMerchant) (*HistoricalEventMerchant, error) {
if obj == nil {
obj = NewHistoricalEventMerchant()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "destination":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DepotEntityId = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "source":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TraderEntityId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventModifiedBuilding(p *util.XMLParser) (*HistoricalEventModifiedBuilding, error) {
var obj = NewHistoricalEventModifiedBuilding()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "modification":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Modification = parseHistoricalEventModifiedBuildingModification(txt(data))
case "modifier_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ModifierHfid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventModifiedBuildingPlus(p *util.XMLParser, obj *HistoricalEventModifiedBuilding) (*HistoricalEventModifiedBuilding, error) {
if obj == nil {
obj = NewHistoricalEventModifiedBuilding()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMusicalFormCreated(p *util.XMLParser) (*HistoricalEventMusicalFormCreated, error) {
var obj = NewHistoricalEventMusicalFormCreated()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "circumstance":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Circumstance = parseHistoricalEventMusicalFormCreatedCircumstance(txt(data))
case "circumstance_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CircumstanceId = num(data)
case "form_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FormId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventMusicalFormCreatedReason(txt(data))
case "reason_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ReasonId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventMusicalFormCreatedPlus(p *util.XMLParser, obj *HistoricalEventMusicalFormCreated) (*HistoricalEventMusicalFormCreated, error) {
if obj == nil {
obj = NewHistoricalEventMusicalFormCreated()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventNewSiteLeader(p *util.XMLParser) (*HistoricalEventNewSiteLeader, error) {
var obj = NewHistoricalEventNewSiteLeader()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacker_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerCivId = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "new_leader_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewLeaderHfid = num(data)
case "new_site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewSiteCivId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventNewSiteLeaderPlus(p *util.XMLParser, obj *HistoricalEventNewSiteLeader) (*HistoricalEventNewSiteLeader, error) {
if obj == nil {
obj = NewHistoricalEventNewSiteLeader()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPeaceAccepted(p *util.XMLParser) (*HistoricalEventPeaceAccepted, error) {
var obj = NewHistoricalEventPeaceAccepted()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPeaceAcceptedPlus(p *util.XMLParser, obj *HistoricalEventPeaceAccepted) (*HistoricalEventPeaceAccepted, error) {
if obj == nil {
obj = NewHistoricalEventPeaceAccepted()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "destination":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Destination = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "source":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Source = num(data)
case "topic":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Topic = parseHistoricalEventPeaceAcceptedTopic(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPeaceRejected(p *util.XMLParser) (*HistoricalEventPeaceRejected, error) {
var obj = NewHistoricalEventPeaceRejected()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPeaceRejectedPlus(p *util.XMLParser, obj *HistoricalEventPeaceRejected) (*HistoricalEventPeaceRejected, error) {
if obj == nil {
obj = NewHistoricalEventPeaceRejected()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "destination":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Destination = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "source":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Source = num(data)
case "topic":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Topic = parseHistoricalEventPeaceRejectedTopic(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPerformance(p *util.XMLParser) (*HistoricalEventPerformance, error) {
var obj = NewHistoricalEventPerformance()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "occasion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OccasionId = num(data)
case "schedule_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ScheduleId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPerformancePlus(p *util.XMLParser, obj *HistoricalEventPerformance) (*HistoricalEventPerformance, error) {
if obj == nil {
obj = NewHistoricalEventPerformance()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPlunderedSite(p *util.XMLParser) (*HistoricalEventPlunderedSite, error) {
var obj = NewHistoricalEventPlunderedSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacker_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerCivId = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "detected":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Detected = true
case "no_defeat_mention":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.NoDefeatMention = true
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "took_items":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.TookItems = true
case "took_livestock":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.TookLivestock = true
case "was_raid":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.WasRaid = true
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPlunderedSitePlus(p *util.XMLParser, obj *HistoricalEventPlunderedSite) (*HistoricalEventPlunderedSite, error) {
if obj == nil {
obj = NewHistoricalEventPlunderedSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPoeticFormCreated(p *util.XMLParser) (*HistoricalEventPoeticFormCreated, error) {
var obj = NewHistoricalEventPoeticFormCreated()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "circumstance":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Circumstance = parseHistoricalEventPoeticFormCreatedCircumstance(txt(data))
case "form_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FormId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventPoeticFormCreatedPlus(p *util.XMLParser, obj *HistoricalEventPoeticFormCreated) (*HistoricalEventPoeticFormCreated, error) {
if obj == nil {
obj = NewHistoricalEventPoeticFormCreated()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventProcession(p *util.XMLParser) (*HistoricalEventProcession, error) {
var obj = NewHistoricalEventProcession()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "occasion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OccasionId = num(data)
case "schedule_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ScheduleId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventProcessionPlus(p *util.XMLParser, obj *HistoricalEventProcession) (*HistoricalEventProcession, error) {
if obj == nil {
obj = NewHistoricalEventProcession()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRazedStructure(p *util.XMLParser) (*HistoricalEventRazedStructure, error) {
var obj = NewHistoricalEventRazedStructure()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRazedStructurePlus(p *util.XMLParser, obj *HistoricalEventRazedStructure) (*HistoricalEventRazedStructure, error) {
if obj == nil {
obj = NewHistoricalEventRazedStructure()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventReclaimSite(p *util.XMLParser) (*HistoricalEventReclaimSite, error) {
var obj = NewHistoricalEventReclaimSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "unretire":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Unretire = true
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventReclaimSitePlus(p *util.XMLParser, obj *HistoricalEventReclaimSite) (*HistoricalEventReclaimSite, error) {
if obj == nil {
obj = NewHistoricalEventReclaimSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRegionpopIncorporatedIntoEntity(p *util.XMLParser) (*HistoricalEventRegionpopIncorporatedIntoEntity, error) {
var obj = NewHistoricalEventRegionpopIncorporatedIntoEntity()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "join_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.JoinEntityId = num(data)
case "pop_flid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PopFlid = num(data)
case "pop_number_moved":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PopNumberMoved = num(data)
case "pop_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PopRace = num(data)
case "pop_srid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PopSrid = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRegionpopIncorporatedIntoEntityPlus(p *util.XMLParser, obj *HistoricalEventRegionpopIncorporatedIntoEntity) (*HistoricalEventRegionpopIncorporatedIntoEntity, error) {
if obj == nil {
obj = NewHistoricalEventRegionpopIncorporatedIntoEntity()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRelationship(p *util.XMLParser) (*HistoricalEventRelationship, error) {
var obj = NewHistoricalEventRelationship()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRelationshipPlus(p *util.XMLParser, obj *HistoricalEventRelationship) (*HistoricalEventRelationship, error) {
if obj == nil {
obj = NewHistoricalEventRelationship()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "event":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Event = num(data)
case "relationship":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Relationship = parseHistoricalEventRelationshipRelationship(txt(data))
case "source_hf":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SourceHf = num(data)
case "target_hf":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TargetHf = num(data)
case "year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Year = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRelationshipSupplement(p *util.XMLParser) (*HistoricalEventRelationshipSupplement, error) {
var obj = NewHistoricalEventRelationshipSupplement()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRelationshipSupplementPlus(p *util.XMLParser, obj *HistoricalEventRelationshipSupplement) (*HistoricalEventRelationshipSupplement, error) {
if obj == nil {
obj = NewHistoricalEventRelationshipSupplement()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "event":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Event = num(data)
case "occasion_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OccasionType = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Site = num(data)
case "unk_1":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Unk1 = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRemoveHfEntityLink(p *util.XMLParser) (*HistoricalEventRemoveHfEntityLink, error) {
var obj = NewHistoricalEventRemoveHfEntityLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "link":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Link = parseHistoricalEventRemoveHfEntityLinkLink(txt(data))
case "position_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PositionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRemoveHfEntityLinkPlus(p *util.XMLParser, obj *HistoricalEventRemoveHfEntityLink) (*HistoricalEventRemoveHfEntityLink, error) {
if obj == nil {
obj = NewHistoricalEventRemoveHfEntityLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "link_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Link = parseHistoricalEventRemoveHfEntityLinkLink(txt(data))
case "position":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Position = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRemoveHfHfLink(p *util.XMLParser) (*HistoricalEventRemoveHfHfLink, error) {
var obj = NewHistoricalEventRemoveHfHfLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "hfid_target":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HfidTarget = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRemoveHfHfLinkPlus(p *util.XMLParser, obj *HistoricalEventRemoveHfHfLink) (*HistoricalEventRemoveHfHfLink, error) {
if obj == nil {
obj = NewHistoricalEventRemoveHfHfLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRemoveHfSiteLink(p *util.XMLParser) (*HistoricalEventRemoveHfSiteLink, error) {
var obj = NewHistoricalEventRemoveHfSiteLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventRemoveHfSiteLinkPlus(p *util.XMLParser, obj *HistoricalEventRemoveHfSiteLink) (*HistoricalEventRemoveHfSiteLink, error) {
if obj == nil {
obj = NewHistoricalEventRemoveHfSiteLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Civ = num(data)
case "histfig":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Histfig = num(data)
case "link_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LinkType = parseHistoricalEventRemoveHfSiteLinkLinkType(txt(data))
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Structure = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventReplacedStructure(p *util.XMLParser) (*HistoricalEventReplacedStructure, error) {
var obj = NewHistoricalEventReplacedStructure()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "new_ab_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewAbId = num(data)
case "old_ab_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OldAbId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventReplacedStructurePlus(p *util.XMLParser, obj *HistoricalEventReplacedStructure) (*HistoricalEventReplacedStructure, error) {
if obj == nil {
obj = NewHistoricalEventReplacedStructure()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "new_structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewAbId = num(data)
case "old_structure":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OldAbId = num(data)
case "site":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "site_civ":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteDied(p *util.XMLParser) (*HistoricalEventSiteDied, error) {
var obj = NewHistoricalEventSiteDied()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "abandoned":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Abandoned = true
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteDiedPlus(p *util.XMLParser, obj *HistoricalEventSiteDied) (*HistoricalEventSiteDied, error) {
if obj == nil {
obj = NewHistoricalEventSiteDied()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteDispute(p *util.XMLParser) (*HistoricalEventSiteDispute, error) {
var obj = NewHistoricalEventSiteDispute()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "dispute":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Dispute = parseHistoricalEventSiteDisputeDispute(txt(data))
case "entity_id_1":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId1 = num(data)
case "entity_id_2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId2 = num(data)
case "site_id_1":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId1 = num(data)
case "site_id_2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId2 = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteDisputePlus(p *util.XMLParser, obj *HistoricalEventSiteDispute) (*HistoricalEventSiteDispute, error) {
if obj == nil {
obj = NewHistoricalEventSiteDispute()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteRetired(p *util.XMLParser) (*HistoricalEventSiteRetired, error) {
var obj = NewHistoricalEventSiteRetired()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "first":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.First = true
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteRetiredPlus(p *util.XMLParser, obj *HistoricalEventSiteRetired) (*HistoricalEventSiteRetired, error) {
if obj == nil {
obj = NewHistoricalEventSiteRetired()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteSurrendered(p *util.XMLParser) (*HistoricalEventSiteSurrendered, error) {
var obj = NewHistoricalEventSiteSurrendered()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacker_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerCivId = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteSurrenderedPlus(p *util.XMLParser, obj *HistoricalEventSiteSurrendered) (*HistoricalEventSiteSurrendered, error) {
if obj == nil {
obj = NewHistoricalEventSiteSurrendered()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteTakenOver(p *util.XMLParser) (*HistoricalEventSiteTakenOver, error) {
var obj = NewHistoricalEventSiteTakenOver()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacker_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerCivId = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "new_site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NewSiteCivId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteTakenOverPlus(p *util.XMLParser, obj *HistoricalEventSiteTakenOver) (*HistoricalEventSiteTakenOver, error) {
if obj == nil {
obj = NewHistoricalEventSiteTakenOver()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteTributeForced(p *util.XMLParser) (*HistoricalEventSiteTributeForced, error) {
var obj = NewHistoricalEventSiteTributeForced()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacker_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerCivId = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "season":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Season = parseHistoricalEventSiteTributeForcedSeason(txt(data))
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSiteTributeForcedPlus(p *util.XMLParser, obj *HistoricalEventSiteTributeForced) (*HistoricalEventSiteTributeForced, error) {
if obj == nil {
obj = NewHistoricalEventSiteTributeForced()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSneakIntoSite(p *util.XMLParser) (*HistoricalEventSneakIntoSite, error) {
var obj = NewHistoricalEventSneakIntoSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "attacker_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AttackerCivId = num(data)
case "defender_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DefenderCivId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSneakIntoSitePlus(p *util.XMLParser, obj *HistoricalEventSneakIntoSite) (*HistoricalEventSneakIntoSite, error) {
if obj == nil {
obj = NewHistoricalEventSneakIntoSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSpottedLeavingSite(p *util.XMLParser) (*HistoricalEventSpottedLeavingSite, error) {
var obj = NewHistoricalEventSpottedLeavingSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "leaver_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LeaverCivId = num(data)
case "site_civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteCivId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "spotter_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SpotterHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSpottedLeavingSitePlus(p *util.XMLParser, obj *HistoricalEventSpottedLeavingSite) (*HistoricalEventSpottedLeavingSite, error) {
if obj == nil {
obj = NewHistoricalEventSpottedLeavingSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSquadVsSquad(p *util.XMLParser) (*HistoricalEventSquadVsSquad, error) {
var obj = NewHistoricalEventSquadVsSquad()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "a_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AHfid = append(obj.AHfid, num(data))
case "a_leader_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ALeaderHfid = num(data)
case "a_leadership_roll":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ALeadershipRoll = num(data)
case "a_squad_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ASquadId = num(data)
case "d_effect":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DEffect = num(data)
case "d_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DHfid = append(obj.DHfid, num(data))
case "d_interaction":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DInteraction = num(data)
case "d_leader_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DLeaderHfid = num(data)
case "d_leadership_roll":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DLeadershipRoll = num(data)
case "d_number":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DNumber = num(data)
case "d_race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DRace = num(data)
case "d_slain":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DSlain = num(data)
case "d_squad_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DSquadId = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventSquadVsSquadPlus(p *util.XMLParser, obj *HistoricalEventSquadVsSquad) (*HistoricalEventSquadVsSquad, error) {
if obj == nil {
obj = NewHistoricalEventSquadVsSquad()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventTacticalSituation(p *util.XMLParser) (*HistoricalEventTacticalSituation, error) {
var obj = NewHistoricalEventTacticalSituation()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "a_tactician_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ATacticianHfid = num(data)
case "a_tactics_roll":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ATacticsRoll = num(data)
case "d_tactician_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DTacticianHfid = num(data)
case "d_tactics_roll":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DTacticsRoll = num(data)
case "feature_layer_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FeatureLayerId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "situation":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Situation = parseHistoricalEventTacticalSituationSituation(txt(data))
case "start":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Start = true
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventTacticalSituationPlus(p *util.XMLParser, obj *HistoricalEventTacticalSituation) (*HistoricalEventTacticalSituation, error) {
if obj == nil {
obj = NewHistoricalEventTacticalSituation()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventTrade(p *util.XMLParser) (*HistoricalEventTrade, error) {
var obj = NewHistoricalEventTrade()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "account_shift":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AccountShift = num(data)
case "allotment":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Allotment = num(data)
case "allotment_index":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AllotmentIndex = num(data)
case "dest_site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DestSiteId = num(data)
case "production_zone_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ProductionZoneId = num(data)
case "source_site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SourceSiteId = num(data)
case "trader_entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TraderEntityId = num(data)
case "trader_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.TraderHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventTradePlus(p *util.XMLParser, obj *HistoricalEventTrade) (*HistoricalEventTrade, error) {
if obj == nil {
obj = NewHistoricalEventTrade()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventWrittenContentComposed(p *util.XMLParser) (*HistoricalEventWrittenContentComposed, error) {
var obj = NewHistoricalEventWrittenContentComposed()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "circumstance":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Circumstance = parseHistoricalEventWrittenContentComposedCircumstance(txt(data))
case "circumstance_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CircumstanceId = num(data)
case "hist_figure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistFigureId = num(data)
case "reason":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reason = parseHistoricalEventWrittenContentComposedReason(txt(data))
case "reason_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ReasonId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "subregion_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubregionId = num(data)
case "wc_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WcId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalEventWrittenContentComposedPlus(p *util.XMLParser, obj *HistoricalEventWrittenContentComposed) (*HistoricalEventWrittenContentComposed, error) {
if obj == nil {
obj = NewHistoricalEventWrittenContentComposed()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalFigure(p *util.XMLParser) (*HistoricalFigure, error) {
var obj = NewHistoricalFigure()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "active_interaction":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ActiveInteraction = append(obj.ActiveInteraction, txt(data))
case "adventurer":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Adventurer = true
case "animated":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Animated = true
case "animated_string":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AnimatedString = txt(data)
case "appeared":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Appeared = num(data)
case "associated_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AssociatedType = txt(data)
case "birth_seconds72":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BirthSeconds72 = num(data)
case "birth_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BirthYear = num(data)
case "breed_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BreedId = num(data)
case "caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Caste = txt(data)
case "current_identity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CurrentIdentityId = num(data)
case "death_seconds72":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DeathSeconds72 = num(data)
case "death_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DeathYear = num(data)
case "deity":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Deity = true
case "ent_pop_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntPopId = num(data)
case "entity_former_position_link":
v, _ := parseEntityFormerPositionLink(p)
obj.EntityFormerPositionLink = append(obj.EntityFormerPositionLink, v)
case "entity_former_squad_link":
v, _ := parseEntityFormerSquadLink(p)
obj.EntityFormerSquadLink = append(obj.EntityFormerSquadLink, v)
case "entity_link":
v, _ := parseHistoricalFigureEntityLink(p)
obj.EntityLink = append(obj.EntityLink, v)
case "entity_position_link":
v, _ := parseEntityPositionLink(p)
obj.EntityPositionLink = append(obj.EntityPositionLink, v)
case "entity_reputation":
v, _ := parseEntityReputation(p)
obj.EntityReputation = append(obj.EntityReputation, v)
case "entity_squad_link":
v, _ := parseEntitySquadLink(p)
obj.EntitySquadLink = append(obj.EntitySquadLink, v)
case "force":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Force = true
case "ghost":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Ghost = true
case "goal":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Goal = append(obj.Goal, parseHistoricalFigureGoal(txt(data)))
case "hf_link":
v, _ := parseHfLink(p)
obj.HfLink = append(obj.HfLink, v)
case "hf_skill":
v, _ := parseHfSkill(p)
obj.HfSkill = append(obj.HfSkill, v)
case "holds_artifact":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HoldsArtifact = append(obj.HoldsArtifact, num(data))
case "honor_entity":
v, _ := parseHonorEntity(p)
obj.HonorEntity = append(obj.HonorEntity, v)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "interaction_knowledge":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.InteractionKnowledge = append(obj.InteractionKnowledge, txt(data))
case "intrigue_actor":
v, _ := parseIntrigueActor(p)
obj.IntrigueActor = append(obj.IntrigueActor, v)
case "intrigue_plot":
v, _ := parseIntriguePlot(p)
obj.IntriguePlot = append(obj.IntriguePlot, v)
case "journey_pet":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.JourneyPet = append(obj.JourneyPet, txt(data))
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Race = txt(data)
case "relationship_profile_hf_historical":
v, _ := parseRelationshipProfileHfHistorical(p)
obj.RelationshipProfileHfHistorical = append(obj.RelationshipProfileHfHistorical, v)
case "relationship_profile_hf_identity":
v, _ := parseRelationshipProfileHfIdentity(p)
obj.RelationshipProfileHfIdentity = append(obj.RelationshipProfileHfIdentity, v)
case "relationship_profile_hf_visual":
v, _ := parseRelationshipProfileHfVisual(p)
obj.RelationshipProfileHfVisual = append(obj.RelationshipProfileHfVisual, v)
case "site_link":
v, _ := parseSiteLink(p)
obj.SiteLink = append(obj.SiteLink, v)
case "site_property":
v, _ := parseHistoricalFigureSiteProperty(p)
obj.SiteProperty = append(obj.SiteProperty, v)
case "sphere":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Sphere = append(obj.Sphere, txt(data))
case "used_identity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.UsedIdentityId = append(obj.UsedIdentityId, num(data))
case "vague_relationship":
v, _ := parseVagueRelationship(p)
obj.VagueRelationship = append(obj.VagueRelationship, v)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalFigurePlus(p *util.XMLParser, obj *HistoricalFigure) (*HistoricalFigure, error) {
if obj == nil {
obj = NewHistoricalFigure()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Race = txt(data)
case "sex":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Sex = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalFigureEntityLink(p *util.XMLParser) (*HistoricalFigureEntityLink, error) {
var obj = NewHistoricalFigureEntityLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "link_strength":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LinkStrength = num(data)
case "link_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LinkType = parseHistoricalFigureEntityLinkLinkType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalFigureEntityLinkPlus(p *util.XMLParser, obj *HistoricalFigureEntityLink) (*HistoricalFigureEntityLink, error) {
if obj == nil {
obj = NewHistoricalFigureEntityLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalFigureSiteProperty(p *util.XMLParser) (*HistoricalFigureSiteProperty, error) {
var obj = NewHistoricalFigureSiteProperty()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "property_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PropertyId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHistoricalFigureSitePropertyPlus(p *util.XMLParser, obj *HistoricalFigureSiteProperty) (*HistoricalFigureSiteProperty, error) {
if obj == nil {
obj = NewHistoricalFigureSiteProperty()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHonor(p *util.XMLParser) (*Honor, error) {
var obj = NewHonor()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "exempt_epid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ExemptEpid = num(data)
case "exempt_former_epid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ExemptFormerEpid = num(data)
case "gives_precedence":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.GivesPrecedence = num(data)
case "granted_to_everybody":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.GrantedToEverybody = true
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "required_battles":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RequiredBattles = num(data)
case "required_kills":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RequiredKills = num(data)
case "required_skill":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RequiredSkill = parseHonorRequiredSkill(txt(data))
case "required_skill_ip_total":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RequiredSkillIpTotal = num(data)
case "required_years":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RequiredYears = num(data)
case "requires_any_melee_or_ranged_skill":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.RequiresAnyMeleeOrRangedSkill = true
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHonorPlus(p *util.XMLParser, obj *Honor) (*Honor, error) {
if obj == nil {
obj = NewHonor()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHonorEntity(p *util.XMLParser) (*HonorEntity, error) {
var obj = NewHonorEntity()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "battles":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Battles = num(data)
case "entity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Entity = num(data)
case "honor_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HonorId = append(obj.HonorId, num(data))
case "kills":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Kills = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseHonorEntityPlus(p *util.XMLParser, obj *HonorEntity) (*HonorEntity, error) {
if obj == nil {
obj = NewHonorEntity()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseIdentity(p *util.XMLParser) (*Identity, error) {
var obj = NewIdentity()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseIdentityPlus(p *util.XMLParser, obj *Identity) (*Identity, error) {
if obj == nil {
obj = NewIdentity()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "birth_second":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BirthSecond = num(data)
case "birth_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.BirthYear = num(data)
case "caste":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Caste = txt(data)
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "histfig_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HistfigId = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "nemesis_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NemesisId = num(data)
case "profession":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Profession = parseIdentityProfession(txt(data))
case "race":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Race = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseIntrigueActor(p *util.XMLParser) (*IntrigueActor, error) {
var obj = NewIntrigueActor()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "handle_actor_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HandleActorId = num(data)
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "local_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LocalId = num(data)
case "promised_actor_immortality":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.PromisedActorImmortality = true
case "promised_me_immortality":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.PromisedMeImmortality = true
case "role":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Role = parseIntrigueActorRole(txt(data))
case "strategy":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Strategy = parseIntrigueActorStrategy(txt(data))
case "strategy_enid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StrategyEnid = num(data)
case "strategy_eppid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StrategyEppid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseIntrigueActorPlus(p *util.XMLParser, obj *IntrigueActor) (*IntrigueActor, error) {
if obj == nil {
obj = NewIntrigueActor()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseIntriguePlot(p *util.XMLParser) (*IntriguePlot, error) {
var obj = NewIntriguePlot()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "actor_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ActorId = num(data)
case "artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtifactId = num(data)
case "delegated_plot_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DelegatedPlotHfid = num(data)
case "delegated_plot_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DelegatedPlotId = num(data)
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "local_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LocalId = num(data)
case "on_hold":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.OnHold = true
case "parent_plot_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ParentPlotHfid = num(data)
case "parent_plot_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ParentPlotId = num(data)
case "plot_actor":
v, _ := parsePlotActor(p)
obj.PlotActor = append(obj.PlotActor, v)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseIntriguePlotType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseIntriguePlotPlus(p *util.XMLParser, obj *IntriguePlot) (*IntriguePlot, error) {
if obj == nil {
obj = NewIntriguePlot()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseItem(p *util.XMLParser) (*Item, error) {
var obj = NewItem()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "name_string":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.NameString = txt(data)
case "page_number":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PageNumber = num(data)
case "page_written_content_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PageWrittenContentId = num(data)
case "writing_written_content_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WritingWrittenContentId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseItemPlus(p *util.XMLParser, obj *Item) (*Item, error) {
if obj == nil {
obj = NewItem()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseLandmass(p *util.XMLParser) (*Landmass, error) {
var obj = NewLandmass()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseLandmassPlus(p *util.XMLParser, obj *Landmass) (*Landmass, error) {
if obj == nil {
obj = NewLandmass()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coord_1":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coord1 = txt(data)
case "coord_2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coord2 = txt(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseMountainPeak(p *util.XMLParser) (*MountainPeak, error) {
var obj = NewMountainPeak()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseMountainPeakPlus(p *util.XMLParser, obj *MountainPeak) (*MountainPeak, error) {
if obj == nil {
obj = NewMountainPeak()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "height":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Height = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "is_volcano":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.IsVolcano = true
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseMusicalForm(p *util.XMLParser) (*MusicalForm, error) {
var obj = NewMusicalForm()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "description":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Description = txt(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseMusicalFormPlus(p *util.XMLParser, obj *MusicalForm) (*MusicalForm, error) {
if obj == nil {
obj = NewMusicalForm()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseOccasion(p *util.XMLParser) (*Occasion, error) {
var obj = NewOccasion()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseOccasionPlus(p *util.XMLParser, obj *Occasion) (*Occasion, error) {
if obj == nil {
obj = NewOccasion()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "event":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Event = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "schedule":
v, _ := parseSchedulePlus(p, &Schedule{})
obj.Schedule = append(obj.Schedule, v)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parsePlotActor(p *util.XMLParser) (*PlotActor, error) {
var obj = NewPlotActor()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "actor_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ActorId = num(data)
case "agreement_has_messenger":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.AgreementHasMessenger = true
case "agreement_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AgreementId = num(data)
case "plot_role":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PlotRole = parsePlotActorPlotRole(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parsePlotActorPlus(p *util.XMLParser, obj *PlotActor) (*PlotActor, error) {
if obj == nil {
obj = NewPlotActor()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parsePoeticForm(p *util.XMLParser) (*PoeticForm, error) {
var obj = NewPoeticForm()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "description":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Description = txt(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parsePoeticFormPlus(p *util.XMLParser, obj *PoeticForm) (*PoeticForm, error) {
if obj == nil {
obj = NewPoeticForm()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseReference(p *util.XMLParser) (*Reference, error) {
var obj = NewReference()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseReferencePlus(p *util.XMLParser, obj *Reference) (*Reference, error) {
if obj == nil {
obj = NewReference()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseReferenceType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseRegion(p *util.XMLParser) (*Region, error) {
var obj = NewRegion()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseRegionType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseRegionPlus(p *util.XMLParser, obj *Region) (*Region, error) {
if obj == nil {
obj = NewRegion()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "evilness":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Evilness = parseRegionEvilness(txt(data))
case "force_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ForceId = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseRelationshipProfileHfHistorical(p *util.XMLParser) (*RelationshipProfileHfHistorical, error) {
var obj = NewRelationshipProfileHfHistorical()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "fear":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Fear = num(data)
case "hf_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HfId = num(data)
case "love":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Love = num(data)
case "loyalty":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Loyalty = num(data)
case "rep_enemy_fighter":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepEnemyFighter = num(data)
case "rep_hero":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepHero = num(data)
case "rep_hunter":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepHunter = num(data)
case "rep_killer":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepKiller = num(data)
case "rep_psychopath":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepPsychopath = num(data)
case "rep_storyteller":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepStoryteller = num(data)
case "rep_violent":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepViolent = num(data)
case "respect":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Respect = num(data)
case "trust":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Trust = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseRelationshipProfileHfHistoricalPlus(p *util.XMLParser, obj *RelationshipProfileHfHistorical) (*RelationshipProfileHfHistorical, error) {
if obj == nil {
obj = NewRelationshipProfileHfHistorical()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseRelationshipProfileHfIdentity(p *util.XMLParser) (*RelationshipProfileHfIdentity, error) {
var obj = NewRelationshipProfileHfIdentity()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "fear":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Fear = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "love":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Love = num(data)
case "loyalty":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Loyalty = num(data)
case "rep_psychopath":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepPsychopath = num(data)
case "respect":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Respect = num(data)
case "trust":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Trust = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseRelationshipProfileHfIdentityPlus(p *util.XMLParser, obj *RelationshipProfileHfIdentity) (*RelationshipProfileHfIdentity, error) {
if obj == nil {
obj = NewRelationshipProfileHfIdentity()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseRelationshipProfileHfVisual(p *util.XMLParser) (*RelationshipProfileHfVisual, error) {
var obj = NewRelationshipProfileHfVisual()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "fear":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Fear = num(data)
case "hf_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.HfId = num(data)
case "known_identity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.KnownIdentityId = append(obj.KnownIdentityId, num(data))
case "last_meet_seconds72":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LastMeetSeconds72 = num(data)
case "last_meet_year":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LastMeetYear = num(data)
case "love":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Love = num(data)
case "loyalty":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Loyalty = num(data)
case "meet_count":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.MeetCount = num(data)
case "rep_bonded":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepBonded = num(data)
case "rep_comrade":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepComrade = num(data)
case "rep_flatterer":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepFlatterer = num(data)
case "rep_friendly":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepFriendly = num(data)
case "rep_hero":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepHero = num(data)
case "rep_hunter":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepHunter = num(data)
case "rep_information_source":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepInformationSource = num(data)
case "rep_killer":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepKiller = num(data)
case "rep_psychopath":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepPsychopath = num(data)
case "rep_quarreler":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepQuarreler = num(data)
case "rep_trade_partner":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.RepTradePartner = num(data)
case "respect":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Respect = num(data)
case "trust":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Trust = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseRelationshipProfileHfVisualPlus(p *util.XMLParser, obj *RelationshipProfileHfVisual) (*RelationshipProfileHfVisual, error) {
if obj == nil {
obj = NewRelationshipProfileHfVisual()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseRiver(p *util.XMLParser) (*River, error) {
var obj = NewRiver()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseRiverPlus(p *util.XMLParser, obj *River) (*River, error) {
if obj == nil {
obj = NewRiver()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "end_pos":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EndPos = txt(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "path":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Path = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseSchedule(p *util.XMLParser) (*Schedule, error) {
var obj = NewSchedule()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseSchedulePlus(p *util.XMLParser, obj *Schedule) (*Schedule, error) {
if obj == nil {
obj = NewSchedule()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "feature":
v, _ := parseFeaturePlus(p, &Feature{})
obj.Feature = append(obj.Feature, v)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "item_subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemSubtype = parseScheduleItemSubtype(txt(data))
case "item_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.ItemType = parseScheduleItemType(txt(data))
case "reference":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reference = num(data)
case "reference2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Reference2 = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseScheduleType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseSite(p *util.XMLParser) (*Site, error) {
var obj = NewSite()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "rectangle":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Rectangle = txt(data)
case "site_properties":
parseMap(p, &obj.SiteProperties, parseSiteSiteProperty)
case "structures":
parseMap(p, &obj.Structures, parseStructure)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseSiteType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseSitePlus(p *util.XMLParser, obj *Site) (*Site, error) {
if obj == nil {
obj = NewSite()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "civ_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CivId = num(data)
case "cur_owner_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CurOwnerId = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "structures":
parseMapPlus(p, &obj.Structures, parseStructurePlus)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseSiteLink(p *util.XMLParser) (*SiteLink, error) {
var obj = NewSiteLink()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "link_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LinkType = parseSiteLinkLinkType(txt(data))
case "occupation_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OccupationId = num(data)
case "site_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SiteId = num(data)
case "sub_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.SubId = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseSiteLinkPlus(p *util.XMLParser, obj *SiteLink) (*SiteLink, error) {
if obj == nil {
obj = NewSiteLink()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseSiteSiteProperty(p *util.XMLParser) (*SiteSiteProperty, error) {
var obj = NewSiteSiteProperty()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "owner_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.OwnerHfid = num(data)
case "structure_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.StructureId = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseSiteSitePropertyType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseSiteSitePropertyPlus(p *util.XMLParser, obj *SiteSiteProperty) (*SiteSiteProperty, error) {
if obj == nil {
obj = NewSiteSiteProperty()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseStructure(p *util.XMLParser) (*Structure, error) {
var obj = NewStructure()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "copied_artifact_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.CopiedArtifactId = append(obj.CopiedArtifactId, num(data))
case "entity_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.EntityId = num(data)
case "local_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.LocalId = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "subtype":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Subtype = parseStructureSubtype(txt(data))
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseStructureType(txt(data))
case "worship_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.WorshipHfid = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseStructurePlus(p *util.XMLParser, obj *Structure) (*Structure, error) {
if obj == nil {
obj = NewStructure()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "deity":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Deity = num(data)
case "deity_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DeityType = num(data)
case "dungeon_type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.DungeonType = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "inhabitant":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Inhabitant = append(obj.Inhabitant, num(data))
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "name2":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name2 = txt(data)
case "religion":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Religion = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseStructureType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseUndergroundRegion(p *util.XMLParser) (*UndergroundRegion, error) {
var obj = NewUndergroundRegion()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "depth":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Depth = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseUndergroundRegionType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseUndergroundRegionPlus(p *util.XMLParser, obj *UndergroundRegion) (*UndergroundRegion, error) {
if obj == nil {
obj = NewUndergroundRegion()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseVagueRelationship(p *util.XMLParser) (*VagueRelationship, error) {
var obj = NewVagueRelationship()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "artistic_buddy":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.ArtisticBuddy = true
case "atheletic_rival":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.AtheleticRival = true
case "athlete_buddy":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.AthleteBuddy = true
case "business_rival":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.BusinessRival = true
case "childhood_friend":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.ChildhoodFriend = true
case "grudge":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.Grudge = true
case "hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Hfid = num(data)
case "jealous_obsession":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.JealousObsession = true
case "jealous_relationship_grudge":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.JealousRelationshipGrudge = true
case "persecution_grudge":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.PersecutionGrudge = true
case "religious_persecution_grudge":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.ReligiousPersecutionGrudge = true
case "scholar_buddy":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.ScholarBuddy = true
case "supernatural_grudge":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.SupernaturalGrudge = true
case "war_buddy":
_, err := p.Value()
if err != nil {
return nil, err
}
obj.WarBuddy = true
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseVagueRelationshipPlus(p *util.XMLParser, obj *VagueRelationship) (*VagueRelationship, error) {
if obj == nil {
obj = NewVagueRelationship()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseWorldConstruction(p *util.XMLParser) (*WorldConstruction, error) {
var obj = NewWorldConstruction()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseWorldConstructionPlus(p *util.XMLParser, obj *WorldConstruction) (*WorldConstruction, error) {
if obj == nil {
obj = NewWorldConstruction()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "coords":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Coords = txt(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "name":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Name_ = txt(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseWorldConstructionType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseWrittenContent(p *util.XMLParser) (*WrittenContent, error) {
var obj = NewWrittenContent()
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "author_hfid":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AuthorHfid = num(data)
case "author_roll":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AuthorRoll = num(data)
case "form":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Form = parseWrittenContentForm(txt(data))
case "form_id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.FormId = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "style":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Style = append(obj.Style, txt(data))
case "title":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Title = txt(data)
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}
func parseWrittenContentPlus(p *util.XMLParser, obj *WrittenContent) (*WrittenContent, error) {
if obj == nil {
obj = NewWrittenContent()
}
for {
t, n, err := p.Token()
if err != nil {
return nil, err
}
switch t {
case util.StartElement:
switch n {
case "author":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.AuthorHfid = num(data)
case "id":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Id_ = num(data)
case "page_end":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PageEnd = num(data)
case "page_start":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.PageStart = num(data)
case "reference":
v, _ := parseReferencePlus(p, &Reference{})
obj.Reference = append(obj.Reference, v)
case "style":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Style = append(obj.Style, txt(data))
case "title":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Title = txt(data)
case "type":
data, err := p.Value()
if err != nil {
return nil, err
}
obj.Type_ = parseWrittenContentType(txt(data))
default:
// fmt.Println("unknown field", n)
p.Skip()
}
case util.EndElement:
obj.CheckFields()
return obj, nil
}
}
}