events
This commit is contained in:
parent
71cb14c0cd
commit
cbc9601c33
|
@ -7,9 +7,11 @@ import (
|
|||
"go/format"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/iancoleman/strcase"
|
||||
"github.com/robertjanetzko/LegendsBrowser2/backend/util"
|
||||
)
|
||||
|
||||
var backendTemplate = template.Must(template.New("").Parse(`// Code generated by legendsbrowser; DO NOT EDIT.
|
||||
|
@ -29,7 +31,7 @@ type {{ $obj.Name }} struct {
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if not (not $obj.SubTypes) }}
|
||||
Details any
|
||||
Details {{ $obj.Name }}Details
|
||||
{{- end }}
|
||||
}
|
||||
|
||||
|
@ -39,6 +41,7 @@ func (x *{{ $obj.Name }}) Id() int { return x.Id_ }
|
|||
{{- if $obj.Named }}
|
||||
func (x *{{ $obj.Name }}) Name() string { return x.Name_ }
|
||||
{{- end }}
|
||||
func (x *{{ $obj.Name }}) RelatedToHf(id int) bool { return {{ $obj.Related "hfid,hf_id,_hf,hist_figure_id,Hfid,histfig_id,histfig" }} }
|
||||
{{- end }}
|
||||
|
||||
// Parser
|
||||
|
@ -214,7 +217,12 @@ func (f Field) StartAction(plus bool) string {
|
|||
}
|
||||
|
||||
if f.Type == "object" {
|
||||
p := fmt.Sprintf("v, _ := parse%s(d, &t)", *f.ElementType)
|
||||
var p string
|
||||
if !plus {
|
||||
p = fmt.Sprintf("v, _ := parse%s(d, &t)", *f.ElementType)
|
||||
} else {
|
||||
p = fmt.Sprintf("v, _ := parse%sPlus(d, &t, &%s{})", *f.ElementType, *f.ElementType)
|
||||
}
|
||||
if !f.Multiple {
|
||||
return fmt.Sprintf("%s\nobj.%s = v", p, n)
|
||||
} else {
|
||||
|
@ -271,3 +279,17 @@ func (f Field) EndAction() string {
|
|||
|
||||
return ""
|
||||
}
|
||||
|
||||
func (obj Object) Related(fields string) string {
|
||||
var list []string
|
||||
fs := strings.Split(fields, ",")
|
||||
for n, f := range obj.Fields {
|
||||
if f.Type == "int" && !f.Multiple && util.ContainsAny(n, fs...) {
|
||||
list = append(list, fmt.Sprintf("x.%s == id", f.Name))
|
||||
}
|
||||
}
|
||||
if len(list) > 0 {
|
||||
return strings.Join(list, " || ")
|
||||
}
|
||||
return "false"
|
||||
}
|
||||
|
|
|
@ -61,6 +61,9 @@ func (f Field) JsonTypeLine() string {
|
|||
if f.Type == "int" {
|
||||
t = "number"
|
||||
}
|
||||
if f.Type == "bool" {
|
||||
t = "boolean"
|
||||
}
|
||||
if f.Type == "array" {
|
||||
t = *f.ElementType + "[]"
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import (
|
|||
"github.com/gorilla/mux"
|
||||
"github.com/pkg/profile"
|
||||
"github.com/robertjanetzko/LegendsBrowser2/backend/model"
|
||||
"github.com/robertjanetzko/LegendsBrowser2/backend/server"
|
||||
"github.com/robertjanetzko/LegendsBrowser2/backend/templates"
|
||||
)
|
||||
|
||||
|
@ -62,6 +61,21 @@ func main() {
|
|||
},
|
||||
"getHf": func(id int) *model.HistoricalFigure { return world.HistoricalFigures[id] },
|
||||
"getEntity": func(id int) *model.Entity { return world.Entities[id] },
|
||||
"events": func(obj model.Identifiable) []*model.HistoricalEvent {
|
||||
id := obj.Id()
|
||||
var list []*model.HistoricalEvent
|
||||
switch obj.(type) {
|
||||
case *model.HistoricalFigure:
|
||||
for _, e := range world.HistoricalEvents {
|
||||
if e.Details.RelatedToHf(id) {
|
||||
list = append(list, e)
|
||||
}
|
||||
}
|
||||
default:
|
||||
fmt.Printf("unknown type %T\n", obj)
|
||||
}
|
||||
return list
|
||||
},
|
||||
}
|
||||
t := templates.New(functions)
|
||||
|
||||
|
@ -100,22 +114,23 @@ func main() {
|
|||
// model.ListOtherElements("poeticForm", &world.PoeticForms)
|
||||
// model.ListOtherElements("written", &world.WrittenContents)
|
||||
|
||||
server.RegisterResource(router, "region", world.Regions)
|
||||
// server.RegisterResource(router, "undergroundRegion", world.UndergroundRegions)
|
||||
server.RegisterResource(router, "landmass", world.Landmasses)
|
||||
server.RegisterResource(router, "site", world.Sites)
|
||||
server.RegisterResource(router, "worldConstruction", world.WorldConstructions)
|
||||
server.RegisterResource(router, "artifact", world.Artifacts)
|
||||
server.RegisterResource(router, "hf", world.HistoricalFigures)
|
||||
server.RegisterResource(router, "collection", world.HistoricalEventCollections)
|
||||
server.RegisterResource(router, "entity", world.Entities)
|
||||
server.RegisterResource(router, "event", world.HistoricalEvents)
|
||||
// server.RegisterResource(router, "era", world.HistoricalEras)
|
||||
server.RegisterResource(router, "danceForm", world.DanceForms)
|
||||
server.RegisterResource(router, "musicalForm", world.MusicalForms)
|
||||
server.RegisterResource(router, "poeticForm", world.PoeticForms)
|
||||
// server.RegisterResource(router, "region", world.Regions)
|
||||
// // server.RegisterResource(router, "undergroundRegion", world.UndergroundRegions)
|
||||
// server.RegisterResource(router, "landmass", world.Landmasses)
|
||||
// server.RegisterResource(router, "site", world.Sites)
|
||||
// server.RegisterResource(router, "worldConstruction", world.WorldConstructions)
|
||||
// server.RegisterResource(router, "artifact", world.Artifacts)
|
||||
// server.RegisterResource(router, "hf", world.HistoricalFigures)
|
||||
// server.RegisterResource(router, "collection", world.HistoricalEventCollections)
|
||||
// server.RegisterResource(router, "entity", world.Entities)
|
||||
// server.RegisterResource(router, "event", world.HistoricalEvents)
|
||||
// // server.RegisterResource(router, "era", world.HistoricalEras)
|
||||
// server.RegisterResource(router, "danceForm", world.DanceForms)
|
||||
// server.RegisterResource(router, "musicalForm", world.MusicalForms)
|
||||
// server.RegisterResource(router, "poeticForm", world.PoeticForms)
|
||||
// server.RegisterResource(router, "written", world.WrittenContents)
|
||||
|
||||
RegisterPage(router, "/entity/{id}", t, "entity.html", func(id int) any { return world.Entities[id] })
|
||||
RegisterPage(router, "/hf/{id}", t, "hf.html", func(id int) any { return world.HistoricalFigures[id] })
|
||||
|
||||
}
|
||||
|
@ -135,6 +150,7 @@ func RegisterPage(router *mux.Router, path string, templates *templates.Template
|
|||
fmt.Fprintln(w, err)
|
||||
fmt.Println(err)
|
||||
}
|
||||
fmt.Println("render", template, id)
|
||||
err = templates.Render(w, template, accessor(id))
|
||||
if err != nil {
|
||||
fmt.Fprintln(w, err)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package model
|
||||
|
||||
func (e *Entity) Position(id int) *EntityPosition {
|
||||
for _, p := range e.EntityPosition {
|
||||
if p.Id_ == id {
|
||||
return p
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type HistoricalEventDetails interface {
|
||||
RelatedToHf(int) bool
|
||||
}
|
||||
|
||||
type HistoricalEventCollectionDetails interface {
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
{{template "layout.html" .}}
|
||||
|
||||
{{define "title"}}{{ title .Name }}{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
{{ json . }}
|
||||
{{- end }}
|
|
@ -0,0 +1,7 @@
|
|||
<ul>
|
||||
{{- range $event := events . }}
|
||||
<li>
|
||||
{{ $event.Id }} in of {{ $event.Year }} {{ json $event.Details }}
|
||||
</li>
|
||||
{{- end}}
|
||||
</ul>
|
|
@ -7,6 +7,23 @@
|
|||
{{ .Race }} (*{{ .BirthYear }}{{ if ge .DeathYear 0 }} †{{ .DeathYear }}{{ end }})
|
||||
{{end}}
|
||||
|
||||
{{- if or (ne 0 (len .EntityFormerPositionLink)) (ne 0 (len .EntityPositionLink)) }}
|
||||
<h3>Positions</h3>
|
||||
<ul>
|
||||
{{- range $i := .EntityFormerPositionLink }}
|
||||
<li>
|
||||
{{ ((getEntity $i.EntityId).Position $i.PositionProfileId).Name }} of {{ template "entityLink.html" (getEntity $i.EntityId) }} ({{
|
||||
$i.StartYear }} - {{ $i.EndYear }})
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- range $i := .EntityPositionLink }}
|
||||
<li>
|
||||
of {{ template "entityLink.html" (getEntity $i.EntityId) }}
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
|
||||
{{- if ne 0 (len .HfLink) }}
|
||||
<h3>Related Figures</h3>
|
||||
<ul>
|
||||
|
@ -28,3 +45,9 @@
|
|||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
|
||||
<h3>Events</h3>
|
||||
|
||||
{{ template "events.html" . }}
|
||||
|
||||
{{ json . }}
|
|
@ -2,6 +2,7 @@ package templates
|
|||
|
||||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io"
|
||||
)
|
||||
|
@ -23,10 +24,10 @@ func New(funcMap template.FuncMap) *Template {
|
|||
}
|
||||
|
||||
func NewDebug(funcMap template.FuncMap) *Template {
|
||||
templates := template.Must(template.New("").Funcs(funcMap).ParseGlob("templates/*.html"))
|
||||
ts := template.Must(template.New("").Funcs(funcMap).ParseGlob("templates/*.html"))
|
||||
return &Template{
|
||||
funcMap: funcMap,
|
||||
templates: templates,
|
||||
templates: ts,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,7 +35,12 @@ var DebugTemplates = true
|
|||
|
||||
func (t *Template) Render(w io.Writer, name string, data interface{}) error {
|
||||
if DebugTemplates {
|
||||
return NewDebug(t.funcMap).templates.ExecuteTemplate(w, name, data)
|
||||
fmt.Println("RENDER", name)
|
||||
tmpl := NewDebug(t.funcMap).templates
|
||||
tmpl = template.Must(tmpl.ParseFiles("templates/" + name))
|
||||
return tmpl.ExecuteTemplate(w, name, data)
|
||||
}
|
||||
return t.templates.ExecuteTemplate(w, name, data)
|
||||
tmpl := template.Must(t.templates.Clone())
|
||||
tmpl = template.Must(tmpl.ParseFS(templateFS, name))
|
||||
return tmpl.ExecuteTemplate(w, name, data)
|
||||
}
|
||||
|
|
|
@ -18,125 +18,125 @@ export interface Artifact {
|
|||
writing: number;
|
||||
}
|
||||
export interface Creature {
|
||||
allCastesAlive: bool;
|
||||
artificialHiveable: bool;
|
||||
biomeDesertBadland: bool;
|
||||
biomeDesertRock: bool;
|
||||
biomeDesertSand: bool;
|
||||
biomeForestTaiga: bool;
|
||||
biomeForestTemperateBroadleaf: bool;
|
||||
biomeForestTemperateConifer: bool;
|
||||
biomeForestTropicalConifer: bool;
|
||||
biomeForestTropicalDryBroadleaf: bool;
|
||||
biomeForestTropicalMoistBroadleaf: bool;
|
||||
biomeGlacier: bool;
|
||||
biomeGrasslandTemperate: bool;
|
||||
biomeGrasslandTropical: bool;
|
||||
biomeLakeTemperateBrackishwater: bool;
|
||||
biomeLakeTemperateFreshwater: bool;
|
||||
biomeLakeTemperateSaltwater: bool;
|
||||
biomeLakeTropicalBrackishwater: bool;
|
||||
biomeLakeTropicalFreshwater: bool;
|
||||
biomeLakeTropicalSaltwater: bool;
|
||||
biomeMarshTemperateFreshwater: bool;
|
||||
biomeMarshTemperateSaltwater: bool;
|
||||
biomeMarshTropicalFreshwater: bool;
|
||||
biomeMarshTropicalSaltwater: bool;
|
||||
biomeMountain: bool;
|
||||
biomeOceanArctic: bool;
|
||||
biomeOceanTemperate: bool;
|
||||
biomeOceanTropical: bool;
|
||||
biomePoolTemperateBrackishwater: bool;
|
||||
biomePoolTemperateFreshwater: bool;
|
||||
biomePoolTemperateSaltwater: bool;
|
||||
biomePoolTropicalBrackishwater: bool;
|
||||
biomePoolTropicalFreshwater: bool;
|
||||
biomePoolTropicalSaltwater: bool;
|
||||
biomeRiverTemperateBrackishwater: bool;
|
||||
biomeRiverTemperateFreshwater: bool;
|
||||
biomeRiverTemperateSaltwater: bool;
|
||||
biomeRiverTropicalBrackishwater: bool;
|
||||
biomeRiverTropicalFreshwater: bool;
|
||||
biomeRiverTropicalSaltwater: bool;
|
||||
biomeSavannaTemperate: bool;
|
||||
biomeSavannaTropical: bool;
|
||||
biomeShrublandTemperate: bool;
|
||||
biomeShrublandTropical: bool;
|
||||
biomeSubterraneanChasm: bool;
|
||||
biomeSubterraneanLava: bool;
|
||||
biomeSubterraneanWater: bool;
|
||||
biomeSwampMangrove: bool;
|
||||
biomeSwampTemperateFreshwater: bool;
|
||||
biomeSwampTemperateSaltwater: bool;
|
||||
biomeSwampTropicalFreshwater: bool;
|
||||
biomeSwampTropicalSaltwater: bool;
|
||||
biomeTundra: bool;
|
||||
allCastesAlive: boolean;
|
||||
artificialHiveable: boolean;
|
||||
biomeDesertBadland: boolean;
|
||||
biomeDesertRock: boolean;
|
||||
biomeDesertSand: boolean;
|
||||
biomeForestTaiga: boolean;
|
||||
biomeForestTemperateBroadleaf: boolean;
|
||||
biomeForestTemperateConifer: boolean;
|
||||
biomeForestTropicalConifer: boolean;
|
||||
biomeForestTropicalDryBroadleaf: boolean;
|
||||
biomeForestTropicalMoistBroadleaf: boolean;
|
||||
biomeGlacier: boolean;
|
||||
biomeGrasslandTemperate: boolean;
|
||||
biomeGrasslandTropical: boolean;
|
||||
biomeLakeTemperateBrackishwater: boolean;
|
||||
biomeLakeTemperateFreshwater: boolean;
|
||||
biomeLakeTemperateSaltwater: boolean;
|
||||
biomeLakeTropicalBrackishwater: boolean;
|
||||
biomeLakeTropicalFreshwater: boolean;
|
||||
biomeLakeTropicalSaltwater: boolean;
|
||||
biomeMarshTemperateFreshwater: boolean;
|
||||
biomeMarshTemperateSaltwater: boolean;
|
||||
biomeMarshTropicalFreshwater: boolean;
|
||||
biomeMarshTropicalSaltwater: boolean;
|
||||
biomeMountain: boolean;
|
||||
biomeOceanArctic: boolean;
|
||||
biomeOceanTemperate: boolean;
|
||||
biomeOceanTropical: boolean;
|
||||
biomePoolTemperateBrackishwater: boolean;
|
||||
biomePoolTemperateFreshwater: boolean;
|
||||
biomePoolTemperateSaltwater: boolean;
|
||||
biomePoolTropicalBrackishwater: boolean;
|
||||
biomePoolTropicalFreshwater: boolean;
|
||||
biomePoolTropicalSaltwater: boolean;
|
||||
biomeRiverTemperateBrackishwater: boolean;
|
||||
biomeRiverTemperateFreshwater: boolean;
|
||||
biomeRiverTemperateSaltwater: boolean;
|
||||
biomeRiverTropicalBrackishwater: boolean;
|
||||
biomeRiverTropicalFreshwater: boolean;
|
||||
biomeRiverTropicalSaltwater: boolean;
|
||||
biomeSavannaTemperate: boolean;
|
||||
biomeSavannaTropical: boolean;
|
||||
biomeShrublandTemperate: boolean;
|
||||
biomeShrublandTropical: boolean;
|
||||
biomeSubterraneanChasm: boolean;
|
||||
biomeSubterraneanLava: boolean;
|
||||
biomeSubterraneanWater: boolean;
|
||||
biomeSwampMangrove: boolean;
|
||||
biomeSwampTemperateFreshwater: boolean;
|
||||
biomeSwampTemperateSaltwater: boolean;
|
||||
biomeSwampTropicalFreshwater: boolean;
|
||||
biomeSwampTropicalSaltwater: boolean;
|
||||
biomeTundra: boolean;
|
||||
creatureId: string;
|
||||
doesNotExist: bool;
|
||||
equipment: bool;
|
||||
equipmentWagon: bool;
|
||||
evil: bool;
|
||||
fanciful: bool;
|
||||
generated: bool;
|
||||
good: bool;
|
||||
hasAnyBenign: bool;
|
||||
hasAnyCanSwim: bool;
|
||||
hasAnyCannotBreatheAir: bool;
|
||||
hasAnyCannotBreatheWater: bool;
|
||||
hasAnyCarnivore: bool;
|
||||
hasAnyCommonDomestic: bool;
|
||||
hasAnyCuriousBeast: bool;
|
||||
hasAnyDemon: bool;
|
||||
hasAnyFeatureBeast: bool;
|
||||
hasAnyFlier: bool;
|
||||
hasAnyFlyRaceGait: bool;
|
||||
hasAnyGrasp: bool;
|
||||
hasAnyGrazer: bool;
|
||||
hasAnyHasBlood: bool;
|
||||
hasAnyImmobile: bool;
|
||||
hasAnyIntelligentLearns: bool;
|
||||
hasAnyIntelligentSpeaks: bool;
|
||||
hasAnyLargePredator: bool;
|
||||
hasAnyLocalPopsControllable: bool;
|
||||
hasAnyLocalPopsProduceHeroes: bool;
|
||||
hasAnyMegabeast: bool;
|
||||
hasAnyMischievous: bool;
|
||||
hasAnyNaturalAnimal: bool;
|
||||
hasAnyNightCreature: bool;
|
||||
hasAnyNightCreatureBogeyman: bool;
|
||||
hasAnyNightCreatureHunter: bool;
|
||||
hasAnyNightCreatureNightmare: bool;
|
||||
hasAnyNotFireimmune: bool;
|
||||
hasAnyNotLiving: bool;
|
||||
hasAnyOutsiderControllable: bool;
|
||||
hasAnyRaceGait: bool;
|
||||
hasAnySemimegabeast: bool;
|
||||
hasAnySlowLearner: bool;
|
||||
hasAnySupernatural: bool;
|
||||
hasAnyTitan: bool;
|
||||
hasAnyUniqueDemon: bool;
|
||||
hasAnyUtterances: bool;
|
||||
hasAnyVerminHateable: bool;
|
||||
hasAnyVerminMicro: bool;
|
||||
hasFemale: bool;
|
||||
hasMale: bool;
|
||||
largeRoaming: bool;
|
||||
looseClusters: bool;
|
||||
matesToBreed: bool;
|
||||
mundane: bool;
|
||||
doesNotExist: boolean;
|
||||
equipment: boolean;
|
||||
equipmentWagon: boolean;
|
||||
evil: boolean;
|
||||
fanciful: boolean;
|
||||
generated: boolean;
|
||||
good: boolean;
|
||||
hasAnyBenign: boolean;
|
||||
hasAnyCanSwim: boolean;
|
||||
hasAnyCannotBreatheAir: boolean;
|
||||
hasAnyCannotBreatheWater: boolean;
|
||||
hasAnyCarnivore: boolean;
|
||||
hasAnyCommonDomestic: boolean;
|
||||
hasAnyCuriousBeast: boolean;
|
||||
hasAnyDemon: boolean;
|
||||
hasAnyFeatureBeast: boolean;
|
||||
hasAnyFlier: boolean;
|
||||
hasAnyFlyRaceGait: boolean;
|
||||
hasAnyGrasp: boolean;
|
||||
hasAnyGrazer: boolean;
|
||||
hasAnyHasBlood: boolean;
|
||||
hasAnyImmobile: boolean;
|
||||
hasAnyIntelligentLearns: boolean;
|
||||
hasAnyIntelligentSpeaks: boolean;
|
||||
hasAnyLargePredator: boolean;
|
||||
hasAnyLocalPopsControllable: boolean;
|
||||
hasAnyLocalPopsProduceHeroes: boolean;
|
||||
hasAnyMegabeast: boolean;
|
||||
hasAnyMischievous: boolean;
|
||||
hasAnyNaturalAnimal: boolean;
|
||||
hasAnyNightCreature: boolean;
|
||||
hasAnyNightCreatureBogeyman: boolean;
|
||||
hasAnyNightCreatureHunter: boolean;
|
||||
hasAnyNightCreatureNightmare: boolean;
|
||||
hasAnyNotFireimmune: boolean;
|
||||
hasAnyNotLiving: boolean;
|
||||
hasAnyOutsiderControllable: boolean;
|
||||
hasAnyRaceGait: boolean;
|
||||
hasAnySemimegabeast: boolean;
|
||||
hasAnySlowLearner: boolean;
|
||||
hasAnySupernatural: boolean;
|
||||
hasAnyTitan: boolean;
|
||||
hasAnyUniqueDemon: boolean;
|
||||
hasAnyUtterances: boolean;
|
||||
hasAnyVerminHateable: boolean;
|
||||
hasAnyVerminMicro: boolean;
|
||||
hasFemale: boolean;
|
||||
hasMale: boolean;
|
||||
largeRoaming: boolean;
|
||||
looseClusters: boolean;
|
||||
matesToBreed: boolean;
|
||||
mundane: boolean;
|
||||
namePlural: string;
|
||||
nameSingular: string;
|
||||
occursAsEntityRace: bool;
|
||||
savage: bool;
|
||||
smallRace: bool;
|
||||
twoGenders: bool;
|
||||
ubiquitous: bool;
|
||||
verminEater: bool;
|
||||
verminFish: bool;
|
||||
verminGrounder: bool;
|
||||
verminRotter: bool;
|
||||
verminSoil: bool;
|
||||
verminSoilColony: bool;
|
||||
occursAsEntityRace: boolean;
|
||||
savage: boolean;
|
||||
smallRace: boolean;
|
||||
twoGenders: boolean;
|
||||
ubiquitous: boolean;
|
||||
verminEater: boolean;
|
||||
verminFish: boolean;
|
||||
verminGrounder: boolean;
|
||||
verminRotter: boolean;
|
||||
verminSoil: boolean;
|
||||
verminSoilColony: boolean;
|
||||
}
|
||||
export interface DanceForm {
|
||||
description: string;
|
||||
|
@ -294,13 +294,13 @@ export interface HistoricalEventAgreementFormed {
|
|||
agreementId: number;
|
||||
allyDefenseBonus: number;
|
||||
coconspiratorBonus: number;
|
||||
delegated: bool;
|
||||
failedJudgmentTest: bool;
|
||||
delegated: boolean;
|
||||
failedJudgmentTest: boolean;
|
||||
method: string;
|
||||
relevantEntityId: number;
|
||||
relevantIdForMethod: number;
|
||||
relevantPositionProfileId: number;
|
||||
successful: bool;
|
||||
successful: boolean;
|
||||
topFacet: string;
|
||||
topFacetModifier: number;
|
||||
topFacetRating: number;
|
||||
|
@ -324,7 +324,7 @@ export interface HistoricalEventArtifactCopied {
|
|||
destEntityId: number;
|
||||
destSiteId: number;
|
||||
destStructureId: number;
|
||||
fromOriginal: bool;
|
||||
fromOriginal: boolean;
|
||||
sourceEntityId: number;
|
||||
sourceSiteId: number;
|
||||
sourceStructureId: number;
|
||||
|
@ -335,7 +335,7 @@ export interface HistoricalEventArtifactCreated {
|
|||
creatorHfid: number;
|
||||
creatorUnitId: number;
|
||||
histFigureId: number;
|
||||
nameOnly: bool;
|
||||
nameOnly: boolean;
|
||||
reason: string;
|
||||
sanctifyHf: number;
|
||||
site: number;
|
||||
|
@ -444,10 +444,10 @@ export interface HistoricalEventBuildingProfileAcquired {
|
|||
acquirerEnid: number;
|
||||
acquirerHfid: number;
|
||||
buildingProfileId: number;
|
||||
inherited: bool;
|
||||
inherited: boolean;
|
||||
lastOwnerHfid: number;
|
||||
purchasedUnowned: bool;
|
||||
rebuiltRuined: bool;
|
||||
purchasedUnowned: boolean;
|
||||
rebuiltRuined: boolean;
|
||||
siteId: number;
|
||||
}
|
||||
export interface HistoricalEventCeremony {
|
||||
|
@ -522,26 +522,26 @@ export interface HistoricalEventCollectionBattle {
|
|||
aSupportMercHfid: number[];
|
||||
attackingHfid: number[];
|
||||
attackingMercEnid: number;
|
||||
attackingSquadAnimated: bool[];
|
||||
attackingSquadAnimated: boolean[];
|
||||
attackingSquadDeaths: number[];
|
||||
attackingSquadEntityPop: number[];
|
||||
attackingSquadNumber: number[];
|
||||
attackingSquadRace: string[];
|
||||
attackingSquadSite: number[];
|
||||
companyMerc: bool[];
|
||||
companyMerc: boolean[];
|
||||
coords: string;
|
||||
dSupportMercEnid: number;
|
||||
dSupportMercHfid: number[];
|
||||
defendingHfid: number[];
|
||||
defendingMercEnid: number;
|
||||
defendingSquadAnimated: bool[];
|
||||
defendingSquadAnimated: boolean[];
|
||||
defendingSquadDeaths: number[];
|
||||
defendingSquadEntityPop: number[];
|
||||
defendingSquadNumber: number[];
|
||||
defendingSquadRace: string[];
|
||||
defendingSquadSite: number[];
|
||||
featureLayerId: number;
|
||||
individualMerc: bool[];
|
||||
individualMerc: boolean[];
|
||||
name: string;
|
||||
noncomHfid: number[];
|
||||
outcome: string;
|
||||
|
@ -655,7 +655,7 @@ export interface HistoricalEventCreatedStructure {
|
|||
civ: number;
|
||||
civId: number;
|
||||
rebuild: string;
|
||||
rebuilt: bool;
|
||||
rebuilt: boolean;
|
||||
site: number;
|
||||
siteCiv: number;
|
||||
siteCivId: number;
|
||||
|
@ -726,7 +726,7 @@ export interface HistoricalEventEntityIncorporated {
|
|||
joinedEntityId: number;
|
||||
joinerEntityId: number;
|
||||
leaderHfid: number;
|
||||
partialIncorporation: bool;
|
||||
partialIncorporation: boolean;
|
||||
siteId: number;
|
||||
}
|
||||
export interface HistoricalEventEntityLaw {
|
||||
|
@ -789,7 +789,7 @@ export interface HistoricalEventFailedIntrigueCorruption {
|
|||
coconspiratorBonus: number;
|
||||
corruptorHfid: number;
|
||||
corruptorIdentity: number;
|
||||
failedJudgmentTest: bool;
|
||||
failedJudgmentTest: boolean;
|
||||
featureLayerId: number;
|
||||
lureHfid: number;
|
||||
method: string;
|
||||
|
@ -856,27 +856,27 @@ export interface HistoricalEventHfConvicted {
|
|||
coconspiratorHfid: number;
|
||||
confessedAfterApbArrestEnid: number;
|
||||
contactHfid: number;
|
||||
convictIsContact: bool;
|
||||
convictIsContact: boolean;
|
||||
convictedHfid: number;
|
||||
convicterEnid: number;
|
||||
corruptConvicterHfid: number;
|
||||
crime: string;
|
||||
deathPenalty: bool;
|
||||
didNotRevealAllInInterrogation: bool;
|
||||
exiled: bool;
|
||||
deathPenalty: boolean;
|
||||
didNotRevealAllInInterrogation: boolean;
|
||||
exiled: boolean;
|
||||
fooledHfid: number;
|
||||
framerHfid: number;
|
||||
heldFirmInInterrogation: bool;
|
||||
heldFirmInInterrogation: boolean;
|
||||
implicatedHfid: number[];
|
||||
interrogatorHfid: number;
|
||||
plotterHfid: number;
|
||||
prisonMonths: number;
|
||||
surveiledCoconspirator: bool;
|
||||
surveiledContact: bool;
|
||||
surveiledConvicted: bool;
|
||||
surveiledTarget: bool;
|
||||
surveiledCoconspirator: boolean;
|
||||
surveiledContact: boolean;
|
||||
surveiledConvicted: boolean;
|
||||
surveiledTarget: boolean;
|
||||
targetHfid: number;
|
||||
wrongfulConviction: bool;
|
||||
wrongfulConviction: boolean;
|
||||
}
|
||||
export interface HistoricalEventHfDestroyedSite {
|
||||
attackerHfid: number;
|
||||
|
@ -891,7 +891,9 @@ export interface HistoricalEventHfDied {
|
|||
featureLayerId: number;
|
||||
hfid: number;
|
||||
item: number;
|
||||
itemSubtype: string;
|
||||
itemType: string;
|
||||
mat: string;
|
||||
site: number;
|
||||
siteId: number;
|
||||
slayerCaste: string;
|
||||
|
@ -943,10 +945,10 @@ export interface HistoricalEventHfGainsSecretGoal {
|
|||
}
|
||||
export interface HistoricalEventHfInterrogated {
|
||||
arrestingEnid: number;
|
||||
heldFirmInInterrogation: bool;
|
||||
heldFirmInInterrogation: boolean;
|
||||
interrogatorHfid: number;
|
||||
targetHfid: number;
|
||||
wantedAndRecognized: bool;
|
||||
wantedAndRecognized: boolean;
|
||||
}
|
||||
export interface HistoricalEventHfLearnsSecret {
|
||||
artifact: number;
|
||||
|
@ -1027,7 +1029,7 @@ export interface HistoricalEventHfReunion {
|
|||
}
|
||||
export interface HistoricalEventHfRevived {
|
||||
actorHfid: number;
|
||||
disturbance: bool;
|
||||
disturbance: boolean;
|
||||
featureLayerId: number;
|
||||
hfid: number;
|
||||
siteId: number;
|
||||
|
@ -1045,7 +1047,7 @@ export interface HistoricalEventHfTravel {
|
|||
coords: string;
|
||||
featureLayerId: number;
|
||||
groupHfid: number[];
|
||||
return: bool;
|
||||
return: boolean;
|
||||
siteId: number;
|
||||
subregionId: number;
|
||||
}
|
||||
|
@ -1079,7 +1081,7 @@ export interface HistoricalEventHfsFormedIntrigueRelationship {
|
|||
corruptorHfid: number;
|
||||
corruptorIdentity: number;
|
||||
corruptorSeenAs: string;
|
||||
failedJudgmentTest: bool;
|
||||
failedJudgmentTest: boolean;
|
||||
featureLayerId: number;
|
||||
lureHfid: number;
|
||||
method: string;
|
||||
|
@ -1088,7 +1090,7 @@ export interface HistoricalEventHfsFormedIntrigueRelationship {
|
|||
relevantPositionProfileId: number;
|
||||
siteId: number;
|
||||
subregionId: number;
|
||||
successful: bool;
|
||||
successful: boolean;
|
||||
targetHfid: number;
|
||||
targetIdentity: number;
|
||||
targetSeenAs: string;
|
||||
|
@ -1140,10 +1142,30 @@ export interface HistoricalEventItemStolenCircumstance {
|
|||
type: string;
|
||||
}
|
||||
export interface HistoricalEventKnowledgeDiscovered {
|
||||
first: bool;
|
||||
first: boolean;
|
||||
hfid: number;
|
||||
knowledge: string;
|
||||
}
|
||||
export interface HistoricalEventMasterpieceItem {
|
||||
entityId: number;
|
||||
hfid: number;
|
||||
itemId: number;
|
||||
itemType: string;
|
||||
maker: number;
|
||||
makerEntity: number;
|
||||
mat: string;
|
||||
site: number;
|
||||
siteId: number;
|
||||
skillAtTime: string;
|
||||
}
|
||||
export interface HistoricalEventMerchant {
|
||||
depotEntityId: number;
|
||||
destination: number;
|
||||
site: number;
|
||||
siteId: number;
|
||||
source: number;
|
||||
traderEntityId: number;
|
||||
}
|
||||
export interface HistoricalEventModifiedBuilding {
|
||||
modification: string;
|
||||
modifierHfid: number;
|
||||
|
@ -1192,7 +1214,7 @@ export interface HistoricalEventPerformance {
|
|||
export interface HistoricalEventPlunderedSite {
|
||||
attackerCivId: number;
|
||||
defenderCivId: number;
|
||||
detected: bool;
|
||||
detected: boolean;
|
||||
siteCivId: number;
|
||||
siteId: number;
|
||||
}
|
||||
|
@ -1289,6 +1311,32 @@ export interface HistoricalEventSiteTakenOver {
|
|||
siteCivId: number;
|
||||
siteId: number;
|
||||
}
|
||||
export interface HistoricalEventSquadVsSquad {
|
||||
aHfid: number;
|
||||
aSquadId: number;
|
||||
dEffect: number;
|
||||
dInteraction: number;
|
||||
dNumber: number;
|
||||
dRace: number;
|
||||
dSlain: number;
|
||||
dSquadId: number;
|
||||
featureLayerId: number;
|
||||
siteId: number;
|
||||
structureId: number;
|
||||
subregionId: number;
|
||||
}
|
||||
export interface HistoricalEventTacticalSituation {
|
||||
aTacticianHfid: number;
|
||||
aTacticsRoll: number;
|
||||
dTacticianHfid: number;
|
||||
dTacticsRoll: number;
|
||||
featureLayerId: number;
|
||||
siteId: number;
|
||||
situation: string;
|
||||
start: boolean;
|
||||
structureId: number;
|
||||
subregionId: number;
|
||||
}
|
||||
export interface HistoricalEventTrade {
|
||||
accountShift: number;
|
||||
allotment: number;
|
||||
|
@ -1311,7 +1359,7 @@ export interface HistoricalEventWrittenContentComposed {
|
|||
}
|
||||
export interface HistoricalFigure {
|
||||
activeInteraction: string[];
|
||||
animated: bool;
|
||||
animated: boolean;
|
||||
animatedString: string;
|
||||
appeared: number;
|
||||
associatedType: string;
|
||||
|
@ -1321,14 +1369,14 @@ export interface HistoricalFigure {
|
|||
currentIdentityId: number;
|
||||
deathSeconds72: number;
|
||||
deathYear: number;
|
||||
deity: bool;
|
||||
deity: boolean;
|
||||
entPopId: number;
|
||||
entityFormerPositionLink: EntityFormerPositionLink[];
|
||||
entityLink: HistoricalFigureEntityLink[];
|
||||
entityPositionLink: EntityPositionLink[];
|
||||
entityReputation: EntityReputation[];
|
||||
entitySquadLink: EntitySquadLink;
|
||||
force: bool;
|
||||
force: boolean;
|
||||
goal: string[];
|
||||
hfLink: HfLink[];
|
||||
hfSkill: HfSkill[];
|
||||
|
@ -1363,7 +1411,7 @@ export interface Honor {
|
|||
exemptEpid: number;
|
||||
exemptFormerEpid: number;
|
||||
givesPrecedence: number;
|
||||
grantedToEverybody: bool;
|
||||
grantedToEverybody: boolean;
|
||||
id: number;
|
||||
name: string;
|
||||
requiredBattles: number;
|
||||
|
@ -1371,7 +1419,7 @@ export interface Honor {
|
|||
requiredSkill: string;
|
||||
requiredSkillIpTotal: number;
|
||||
requiredYears: number;
|
||||
requiresAnyMeleeOrRangedSkill: bool;
|
||||
requiresAnyMeleeOrRangedSkill: boolean;
|
||||
}
|
||||
export interface HonorEntity {
|
||||
battles: number;
|
||||
|
@ -1396,8 +1444,8 @@ export interface IntrigueActor {
|
|||
handleActorId: number;
|
||||
hfid: number;
|
||||
localId: number;
|
||||
promisedActorImmortality: bool;
|
||||
promisedMeImmortality: bool;
|
||||
promisedActorImmortality: boolean;
|
||||
promisedMeImmortality: boolean;
|
||||
role: string;
|
||||
strategy: string;
|
||||
strategyEnid: number;
|
||||
|
@ -1410,10 +1458,10 @@ export interface IntriguePlot {
|
|||
delegatedPlotId: number;
|
||||
entityId: number;
|
||||
localId: number;
|
||||
onHold: bool;
|
||||
onHold: boolean;
|
||||
parentPlotHfid: number;
|
||||
parentPlotId: number;
|
||||
plotActor: PlotActor[];
|
||||
plotActor: PlotActor;
|
||||
type: string;
|
||||
}
|
||||
export interface Item {
|
||||
|
@ -1432,7 +1480,7 @@ export interface MountainPeak {
|
|||
coords: string;
|
||||
height: number;
|
||||
id: number;
|
||||
isVolcano: bool;
|
||||
isVolcano: boolean;
|
||||
name: string;
|
||||
}
|
||||
export interface MusicalForm {
|
||||
|
@ -1448,7 +1496,7 @@ export interface Occasion {
|
|||
}
|
||||
export interface PlotActor {
|
||||
actorId: number;
|
||||
agreementHasMessenger: bool;
|
||||
agreementHasMessenger: boolean;
|
||||
agreementId: number;
|
||||
plotRole: string;
|
||||
}
|
||||
|
@ -1552,20 +1600,20 @@ export interface UndergroundRegion {
|
|||
type: string;
|
||||
}
|
||||
export interface VagueRelationship {
|
||||
artisticBuddy: bool;
|
||||
atheleticRival: bool;
|
||||
athleteBuddy: bool;
|
||||
businessRival: bool;
|
||||
childhoodFriend: bool;
|
||||
grudge: bool;
|
||||
artisticBuddy: boolean;
|
||||
atheleticRival: boolean;
|
||||
athleteBuddy: boolean;
|
||||
businessRival: boolean;
|
||||
childhoodFriend: boolean;
|
||||
grudge: boolean;
|
||||
hfid: number;
|
||||
jealousObsession: bool;
|
||||
jealousRelationshipGrudge: bool;
|
||||
persecutionGrudge: bool;
|
||||
religiousPersecutionGrudge: bool;
|
||||
scholarBuddy: bool;
|
||||
supernaturalGrudge: bool;
|
||||
warBuddy: bool;
|
||||
jealousObsession: boolean;
|
||||
jealousRelationshipGrudge: boolean;
|
||||
persecutionGrudge: boolean;
|
||||
religiousPersecutionGrudge: boolean;
|
||||
scholarBuddy: boolean;
|
||||
supernaturalGrudge: boolean;
|
||||
warBuddy: boolean;
|
||||
}
|
||||
export interface WorldConstruction {
|
||||
coords: string;
|
||||
|
|
Loading…
Reference in New Issue