events
This commit is contained in:
parent
b97f4a750f
commit
7cbdb55fbf
4 changed files with 58 additions and 47 deletions
|
@ -11,6 +11,12 @@
|
|||
"HistoricalEventAddHfSiteLink": {
|
||||
"Site": "SiteId"
|
||||
},
|
||||
"HistoricalEventAgreementMade": {
|
||||
"Site": "SiteId"
|
||||
},
|
||||
"HistoricalEventAgreementRejected": {
|
||||
"Site": "SiteId"
|
||||
},
|
||||
"HistoricalEventArtifactCreated": {
|
||||
"CreatorHfid": "HistFigureId",
|
||||
"CreatorUnitId": "UnitId",
|
||||
|
|
|
@ -119,16 +119,45 @@ func (x *HistoricalEventAddHfSiteLink) Html(c *context) string {
|
|||
}
|
||||
}
|
||||
|
||||
func (x *HistoricalEventAgreementConcluded) Html(c *context) string { // TODO wording
|
||||
r := ""
|
||||
switch x.Topic {
|
||||
case HistoricalEventAgreementConcludedTopic_Treequota:
|
||||
r += "a lumber agreement"
|
||||
}
|
||||
return r + " proposed by " + entity(x.Source) + " was concluded by " + entity(x.Destination) + site(x.Site, " at")
|
||||
}
|
||||
|
||||
func (x *HistoricalEventAgreementFormed) Html(c *context) string { // TODO
|
||||
return "UNKNWON HistoricalEventAgreementFormed"
|
||||
}
|
||||
|
||||
func (x *HistoricalEventAgreementMade) Html(c *context) string { // TODO
|
||||
return "UNKNWON HistoricalEventAgreementMade"
|
||||
func (x *HistoricalEventAgreementMade) Html(c *context) string {
|
||||
r := ""
|
||||
switch x.Topic {
|
||||
case HistoricalEventAgreementMadeTopic_Becomelandholder:
|
||||
r += "the establishment of landed nobility"
|
||||
case HistoricalEventAgreementMadeTopic_Promotelandholder:
|
||||
r += "the elevation of landed nobility"
|
||||
case HistoricalEventAgreementMadeTopic_Treequota:
|
||||
r += "a lumber agreement"
|
||||
}
|
||||
return r + " proposed by " + entity(x.Source) + " was accepted by " + entity(x.Destination) + site(x.SiteId, " at")
|
||||
}
|
||||
|
||||
func (x *HistoricalEventAgreementRejected) Html(c *context) string { // TODO
|
||||
return "UNKNWON HistoricalEventAgreementRejected"
|
||||
func (x *HistoricalEventAgreementRejected) Html(c *context) string {
|
||||
r := ""
|
||||
switch x.Topic {
|
||||
case HistoricalEventAgreementRejectedTopic_Becomelandholder:
|
||||
r += "the establishment of landed nobility"
|
||||
case HistoricalEventAgreementRejectedTopic_Treequota:
|
||||
r += "a lumber agreement"
|
||||
case HistoricalEventAgreementRejectedTopic_Tributeagreement:
|
||||
r += "a tribute agreement"
|
||||
case HistoricalEventAgreementRejectedTopic_Unknown10:
|
||||
r += "a demand of unconditional surrender"
|
||||
}
|
||||
return r + " proposed by " + entity(x.Source) + " was rejected by " + entity(x.Destination) + site(x.SiteId, " at")
|
||||
}
|
||||
|
||||
func (x *HistoricalEventArtifactClaimFormed) Html(c *context) string {
|
||||
|
@ -1131,18 +1160,23 @@ func (x *HistoricalEventInsurrectionStarted) Html(c *context) string {
|
|||
func (x *HistoricalEventItemStolen) Html(c *context) string {
|
||||
i := util.If(x.Item != -1, artifact(x.Item), articled(x.Mat+" "+x.ItemType))
|
||||
circumstance := ""
|
||||
switch x.Circumstance.Type {
|
||||
case HistoricalEventItemStolenCircumstanceType_Defeated:
|
||||
circumstance = " after defeating " + c.hfRelated(x.Circumstance.Defeated, x.Histfig)
|
||||
case HistoricalEventItemStolenCircumstanceType_Histeventcollection:
|
||||
case HistoricalEventItemStolenCircumstanceType_Murdered:
|
||||
if x.Circumstance != nil {
|
||||
switch x.Circumstance.Type {
|
||||
case HistoricalEventItemStolenCircumstanceType_Defeated:
|
||||
circumstance = " after defeating " + c.hfRelated(x.Circumstance.Defeated, x.Histfig)
|
||||
case HistoricalEventItemStolenCircumstanceType_Histeventcollection: // TODO during ...
|
||||
case HistoricalEventItemStolenCircumstanceType_Murdered:
|
||||
circumstance = " after murdering " + c.hfRelated(x.Circumstance.Defeated, x.Histfig)
|
||||
}
|
||||
}
|
||||
|
||||
switch x.TheftMethod {
|
||||
case HistoricalEventItemStolenTheftMethod_Confiscated: // TODO
|
||||
case HistoricalEventItemStolenTheftMethod_Confiscated:
|
||||
return i + " was confiscated by " + c.hf(x.Histfig) + circumstance + util.If(x.Site != -1, site(x.Site, " in"), "")
|
||||
case HistoricalEventItemStolenTheftMethod_Looted:
|
||||
return i + " was looted " + util.If(x.Site != -1, site(x.Site, " from"), "") + " by " + c.hf(x.Histfig) + circumstance
|
||||
case HistoricalEventItemStolenTheftMethod_Recovered:
|
||||
return i + " was recovered by " + c.hf(x.Histfig) + circumstance
|
||||
return i + " was recovered by " + c.hf(x.Histfig) + circumstance + util.If(x.Site != -1, site(x.Site, " in"), "")
|
||||
}
|
||||
return i + " was stolen " + siteStructure(x.Site, x.Structure, "from") + " by " + c.hf(x.Histfig) + circumstance +
|
||||
util.If(x.StashSite != -1, " and brought "+site(x.StashSite, "to"), "")
|
||||
|
@ -1155,6 +1189,9 @@ func (x *HistoricalEventKnowledgeDiscovered) Html(c *context) string {
|
|||
func (x *HistoricalEventMasterpieceArchConstructed) Html(c *context) string {
|
||||
return "UNKNWON HistoricalEventMasterpieceArchConstructed"
|
||||
}
|
||||
func (x *HistoricalEventMasterpieceDye) Html(c *context) string { // TODO
|
||||
return "UNKNWON HistoricalEventMasterpieceDye"
|
||||
}
|
||||
func (x *HistoricalEventMasterpieceEngraving) Html(c *context) string {
|
||||
return "UNKNWON HistoricalEventMasterpieceEngraving"
|
||||
}
|
||||
|
@ -1372,10 +1409,3 @@ func (x *HistoricalEventWrittenContentComposed) Html(c *context) string {
|
|||
}
|
||||
return writtenContent(x.WcId) + " was authored by " + c.hf(x.HistFigureId) + location(x.SiteId, " in", x.SubregionId, " in") + reason + circumstance
|
||||
}
|
||||
|
||||
func (x *HistoricalEventAgreementConcluded) Html(c *context) string { // TODO
|
||||
return "UNKNWON HistoricalEventAgreementConcluded"
|
||||
}
|
||||
func (x *HistoricalEventMasterpieceDye) Html(c *context) string { // TODO
|
||||
return "UNKNWON HistoricalEventMasterpieceDye"
|
||||
}
|
||||
|
|
|
@ -3751,7 +3751,6 @@ func (s HistoricalEventAgreementMadeTopic) MarshalJSON() ([]byte, error) {
|
|||
|
||||
type HistoricalEventAgreementMade struct {
|
||||
Destination int `json:"destination" legend:"plus"` // destination
|
||||
Site int `json:"site" legend:"plus"` // site
|
||||
SiteId int `json:"siteId" legend:"base"` // site_id
|
||||
Source int `json:"source" legend:"plus"` // source
|
||||
Topic HistoricalEventAgreementMadeTopic `json:"topic" legend:"plus"` // topic
|
||||
|
@ -3760,7 +3759,6 @@ type HistoricalEventAgreementMade struct {
|
|||
func NewHistoricalEventAgreementMade() *HistoricalEventAgreementMade {
|
||||
return &HistoricalEventAgreementMade{
|
||||
Destination: -1,
|
||||
Site: -1,
|
||||
SiteId: -1,
|
||||
Source: -1,
|
||||
}
|
||||
|
@ -3776,9 +3774,6 @@ func (x *HistoricalEventAgreementMade) CheckFields() {
|
|||
if x.Destination != x.SiteId {
|
||||
sameFields["HistoricalEventAgreementMade"]["Destination"]["SiteId"] = false
|
||||
}
|
||||
if x.Site != x.SiteId {
|
||||
sameFields["HistoricalEventAgreementMade"]["Site"]["SiteId"] = false
|
||||
}
|
||||
if x.Source != x.SiteId {
|
||||
sameFields["HistoricalEventAgreementMade"]["Source"]["SiteId"] = false
|
||||
}
|
||||
|
@ -3789,9 +3784,6 @@ func (x *HistoricalEventAgreementMade) MarshalJSON() ([]byte, error) {
|
|||
if x.Destination != -1 {
|
||||
d["destination"] = x.Destination
|
||||
}
|
||||
if x.Site != -1 {
|
||||
d["site"] = x.Site
|
||||
}
|
||||
if x.SiteId != -1 {
|
||||
d["siteId"] = x.SiteId
|
||||
}
|
||||
|
@ -3848,7 +3840,6 @@ func (s HistoricalEventAgreementRejectedTopic) MarshalJSON() ([]byte, error) {
|
|||
|
||||
type HistoricalEventAgreementRejected struct {
|
||||
Destination int `json:"destination" legend:"plus"` // destination
|
||||
Site int `json:"site" legend:"plus"` // site
|
||||
SiteId int `json:"siteId" legend:"base"` // site_id
|
||||
Source int `json:"source" legend:"plus"` // source
|
||||
Topic HistoricalEventAgreementRejectedTopic `json:"topic" legend:"plus"` // topic
|
||||
|
@ -3857,7 +3848,6 @@ type HistoricalEventAgreementRejected struct {
|
|||
func NewHistoricalEventAgreementRejected() *HistoricalEventAgreementRejected {
|
||||
return &HistoricalEventAgreementRejected{
|
||||
Destination: -1,
|
||||
Site: -1,
|
||||
SiteId: -1,
|
||||
Source: -1,
|
||||
}
|
||||
|
@ -3873,9 +3863,6 @@ func (x *HistoricalEventAgreementRejected) CheckFields() {
|
|||
if x.Destination != x.SiteId {
|
||||
sameFields["HistoricalEventAgreementRejected"]["Destination"]["SiteId"] = false
|
||||
}
|
||||
if x.Site != x.SiteId {
|
||||
sameFields["HistoricalEventAgreementRejected"]["Site"]["SiteId"] = false
|
||||
}
|
||||
if x.Source != x.SiteId {
|
||||
sameFields["HistoricalEventAgreementRejected"]["Source"]["SiteId"] = false
|
||||
}
|
||||
|
@ -3886,9 +3873,6 @@ func (x *HistoricalEventAgreementRejected) MarshalJSON() ([]byte, error) {
|
|||
if x.Destination != -1 {
|
||||
d["destination"] = x.Destination
|
||||
}
|
||||
if x.Site != -1 {
|
||||
d["site"] = x.Site
|
||||
}
|
||||
if x.SiteId != -1 {
|
||||
d["siteId"] = x.SiteId
|
||||
}
|
||||
|
@ -22480,7 +22464,7 @@ func parseHistoricalEventAgreementMadePlus(p *util.XMLParser, obj *HistoricalEve
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
obj.Site = num(data)
|
||||
obj.SiteId = num(data)
|
||||
case "source":
|
||||
data, err := p.Value()
|
||||
if err != nil {
|
||||
|
@ -22556,7 +22540,7 @@ func parseHistoricalEventAgreementRejectedPlus(p *util.XMLParser, obj *Historica
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
obj.Site = num(data)
|
||||
obj.SiteId = num(data)
|
||||
case "source":
|
||||
data, err := p.Value()
|
||||
if err != nil {
|
||||
|
|
|
@ -6,25 +6,16 @@
|
|||
"Site": "SiteId"
|
||||
},
|
||||
"HistoricalEventAgreementMade": {
|
||||
"Destination": "SiteId",
|
||||
"Site": "SiteId",
|
||||
"Source": "SiteId"
|
||||
"Site": "SiteId"
|
||||
},
|
||||
"HistoricalEventAgreementRejected": {
|
||||
"Destination": "SiteId",
|
||||
"Site": "SiteId",
|
||||
"Source": "SiteId"
|
||||
"Site": "SiteId"
|
||||
},
|
||||
"HistoricalEventDiplomatLost": {
|
||||
"Entity": "SiteId",
|
||||
"Involved": "SiteId",
|
||||
"Site": "SiteId"
|
||||
},
|
||||
"HistoricalEventHfDied": {
|
||||
"ItemSubtype": "Cause",
|
||||
"Mat": "Cause",
|
||||
"ShooterMat": "Cause"
|
||||
},
|
||||
"HistoricalEventPeaceAccepted": {
|
||||
"Site": "SiteId"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue