progress bar, enums
This commit is contained in:
parent
5f200e7fd5
commit
53c3bc13e7
|
@ -1,2 +1,2 @@
|
||||||
*.json
|
model.json
|
||||||
analyze
|
analyze
|
10390
analyze/analyze.json
10390
analyze/analyze.json
File diff suppressed because it is too large
Load Diff
|
@ -15,6 +15,8 @@ func Generate() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listEnumCandidates(a)
|
||||||
|
|
||||||
m, err := createMetadata(a)
|
m, err := createMetadata(a)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -24,9 +26,9 @@ func Generate() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// if err := generateEventsCode(m); err != nil {
|
if err := generateEventsCode(m); err != nil {
|
||||||
// return err
|
return err
|
||||||
// }
|
}
|
||||||
|
|
||||||
if err := generateFrontendCode(m); err != nil {
|
if err := generateFrontendCode(m); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -245,3 +247,29 @@ func isObject(typ string, types []string) (bool, string) {
|
||||||
}
|
}
|
||||||
return fc > 0, typ
|
return fc > 0, typ
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func listEnumCandidates(a *AnalyzeData) {
|
||||||
|
keys := util.Keys(a.Fields)
|
||||||
|
sort.Strings(keys)
|
||||||
|
|
||||||
|
for _, k := range keys {
|
||||||
|
f := a.Fields[k]
|
||||||
|
if !f.Enum {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
f.Enum = false
|
||||||
|
n := k[strings.LastIndex(k, PATH_SEPARATOR)+1:]
|
||||||
|
if n == "name" || n == "altname" || strings.Contains(n, "name_") || strings.Contains(n, "spouse") || n == "coords" || n == "rectangle" || n == "interaction_action" || strings.Contains(n, "race") || strings.Contains(n, "caste") || strings.Contains(n, "_mat") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if f.IsString {
|
||||||
|
v := util.Keys(f.Values)
|
||||||
|
sort.Strings(v)
|
||||||
|
if len(v) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
fmt.Println(k, ":", strings.Join(v, ", "))
|
||||||
|
f.Enum = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/cheggaaa/pb/v3"
|
||||||
"github.com/iancoleman/strcase"
|
"github.com/iancoleman/strcase"
|
||||||
"github.com/robertjanetzko/LegendsBrowser2/backend/util"
|
"github.com/robertjanetzko/LegendsBrowser2/backend/util"
|
||||||
)
|
)
|
||||||
|
@ -38,10 +39,15 @@ type FieldData struct {
|
||||||
Multiple bool
|
Multiple bool
|
||||||
Base bool
|
Base bool
|
||||||
Plus bool
|
Plus bool
|
||||||
|
Values map[string]bool
|
||||||
|
Enum bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFieldData() *FieldData {
|
func NewFieldData() *FieldData {
|
||||||
return &FieldData{}
|
return &FieldData{
|
||||||
|
Enum: true,
|
||||||
|
Values: make(map[string]bool),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type AnalyzeData struct {
|
type AnalyzeData struct {
|
||||||
|
@ -79,7 +85,7 @@ func (a *AnalyzeData) GetField(s string) *FieldData {
|
||||||
if f, ok := a.Fields[s]; ok {
|
if f, ok := a.Fields[s]; ok {
|
||||||
return f
|
return f
|
||||||
} else {
|
} else {
|
||||||
f := &FieldData{}
|
f := NewFieldData()
|
||||||
a.Fields[s] = f
|
a.Fields[s] = f
|
||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
@ -123,32 +129,57 @@ func analyze(file string, a *AnalyzeData) error {
|
||||||
|
|
||||||
// base file
|
// base file
|
||||||
|
|
||||||
|
fi, err := os.Stat(file)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
size := fi.Size()
|
||||||
|
bar := pb.Full.Start64(size)
|
||||||
|
|
||||||
xmlFile, err := os.Open(file)
|
xmlFile, err := os.Open(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Successfully Opened", file)
|
fmt.Println("\nAnalyzing", file)
|
||||||
defer xmlFile.Close()
|
defer xmlFile.Close()
|
||||||
|
|
||||||
_, err = analyzeElement(xml.NewDecoder(util.NewConvertReader(xmlFile)), a, make([]string, 0), &ctx)
|
converter := util.NewConvertReader(xmlFile)
|
||||||
|
barReader := bar.NewProxyReader(converter)
|
||||||
|
|
||||||
|
_, err = analyzeElement(xml.NewDecoder(barReader), a, make([]string, 0), &ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bar.Finish()
|
||||||
|
|
||||||
// plus file
|
// plus file
|
||||||
|
|
||||||
ctx.plus = true
|
ctx.plus = true
|
||||||
file = strings.Replace(file, "-legends.xml", "-legends_plus.xml", 1)
|
file = strings.Replace(file, "-legends.xml", "-legends_plus.xml", 1)
|
||||||
|
|
||||||
|
fi, err = os.Stat(file)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
size = fi.Size()
|
||||||
|
bar = pb.Full.Start64(size)
|
||||||
|
|
||||||
xmlFile, err = os.Open(file)
|
xmlFile, err = os.Open(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Successfully Opened", file)
|
fmt.Println("\nAnalyzing", file)
|
||||||
defer xmlFile.Close()
|
defer xmlFile.Close()
|
||||||
|
|
||||||
_, err = analyzeElement(xml.NewDecoder(util.NewConvertReader(xmlFile)), a, make([]string, 0), &ctx)
|
converter = util.NewConvertReader(xmlFile)
|
||||||
|
barReader = bar.NewProxyReader(converter)
|
||||||
|
|
||||||
|
_, err = analyzeElement(xml.NewDecoder(barReader), a, make([]string, 0), &ctx)
|
||||||
|
|
||||||
|
bar.Finish()
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -241,18 +272,28 @@ Loop:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if allowedTyped[strings.Join(path, PATH_SEPARATOR)] {
|
||||||
path[len(path)-1] = path[len(path)-1] + "+" + strcase.ToCamel(subtype)
|
path[len(path)-1] = path[len(path)-1] + "+" + strcase.ToCamel(subtype)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case xml.CharData:
|
case xml.CharData:
|
||||||
data = append(data, t...)
|
data = append(data, t...)
|
||||||
|
|
||||||
case xml.EndElement:
|
case xml.EndElement:
|
||||||
if value {
|
if value {
|
||||||
s := string(data)
|
s := strings.TrimSpace(string(data))
|
||||||
if _, err := strconv.Atoi(s); err != nil {
|
if _, err := strconv.Atoi(s); err != nil {
|
||||||
a.GetField(strings.Join(path, PATH_SEPARATOR)).IsString = true
|
f := a.GetField(strings.Join(path, PATH_SEPARATOR))
|
||||||
|
f.IsString = true
|
||||||
|
if s != "" && f.Enum {
|
||||||
|
f.Values[s] = true
|
||||||
|
}
|
||||||
|
if len(f.Values) > 30 {
|
||||||
|
f.Values = make(map[string]bool)
|
||||||
|
f.Enum = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if len(s) > 0 {
|
if len(s) > 0 {
|
||||||
a.GetField(strings.Join(path, PATH_SEPARATOR)).NoBool = true
|
a.GetField(strings.Join(path, PATH_SEPARATOR)).NoBool = true
|
||||||
|
|
|
@ -4,4 +4,17 @@ go 1.18
|
||||||
|
|
||||||
require github.com/iancoleman/strcase v0.2.0
|
require github.com/iancoleman/strcase v0.2.0
|
||||||
|
|
||||||
require github.com/robertjanetzko/LegendsBrowser2/backend v0.0.0-20220414135947-77b720f8d215
|
require (
|
||||||
|
github.com/cheggaaa/pb/v3 v3.0.8
|
||||||
|
github.com/robertjanetzko/LegendsBrowser2/backend v0.0.0-20220414135947-77b720f8d215
|
||||||
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/VividCortex/ewma v1.1.1 // indirect
|
||||||
|
github.com/fatih/color v1.10.0 // indirect
|
||||||
|
github.com/mattn/go-colorable v0.1.8 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.12 // indirect
|
||||||
|
github.com/mattn/go-runewidth v0.0.12 // indirect
|
||||||
|
github.com/rivo/uniseg v0.2.0 // indirect
|
||||||
|
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect
|
||||||
|
)
|
||||||
|
|
|
@ -1,4 +1,23 @@
|
||||||
|
github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM=
|
||||||
|
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
|
||||||
|
github.com/cheggaaa/pb/v3 v3.0.8 h1:bC8oemdChbke2FHIIGy9mn4DPJ2caZYQnfbRqwmdCoA=
|
||||||
|
github.com/cheggaaa/pb/v3 v3.0.8/go.mod h1:UICbiLec/XO6Hw6k+BHEtHeQFzzBH4i2/qk/ow1EJTA=
|
||||||
|
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
|
||||||
|
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||||
github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=
|
github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=
|
||||||
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
|
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
|
||||||
|
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
|
||||||
|
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
|
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||||
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||||
|
github.com/mattn/go-runewidth v0.0.12 h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow=
|
||||||
|
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||||
|
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
|
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
||||||
|
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
github.com/robertjanetzko/LegendsBrowser2/backend v0.0.0-20220414135947-77b720f8d215 h1:i23QGS93i7zoDyarU2dQLYDYxSo8MkatzhISsRQuljM=
|
github.com/robertjanetzko/LegendsBrowser2/backend v0.0.0-20220414135947-77b720f8d215 h1:i23QGS93i7zoDyarU2dQLYDYxSo8MkatzhISsRQuljM=
|
||||||
github.com/robertjanetzko/LegendsBrowser2/backend v0.0.0-20220414135947-77b720f8d215/go.mod h1:b6NU94RVWS7nz92lGiifeWN1cLV2EeNSzx0Oop+Ma54=
|
github.com/robertjanetzko/LegendsBrowser2/backend v0.0.0-20220414135947-77b720f8d215/go.mod h1:b6NU94RVWS7nz92lGiifeWN1cLV2EeNSzx0Oop+Ma54=
|
||||||
|
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A=
|
||||||
|
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
|
|
@ -3,6 +3,17 @@ module github.com/robertjanetzko/LegendsBrowser2/backend
|
||||||
go 1.18
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/cheggaaa/pb/v3 v3.0.8
|
||||||
github.com/gorilla/mux v1.8.0
|
github.com/gorilla/mux v1.8.0
|
||||||
github.com/pkg/profile v1.6.0
|
github.com/pkg/profile v1.6.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/VividCortex/ewma v1.1.1 // indirect
|
||||||
|
github.com/fatih/color v1.10.0 // indirect
|
||||||
|
github.com/mattn/go-colorable v0.1.8 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.12 // indirect
|
||||||
|
github.com/mattn/go-runewidth v0.0.12 // indirect
|
||||||
|
github.com/rivo/uniseg v0.2.0 // indirect
|
||||||
|
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect
|
||||||
|
)
|
||||||
|
|
|
@ -1,4 +1,23 @@
|
||||||
|
github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM=
|
||||||
|
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
|
||||||
|
github.com/cheggaaa/pb/v3 v3.0.8 h1:bC8oemdChbke2FHIIGy9mn4DPJ2caZYQnfbRqwmdCoA=
|
||||||
|
github.com/cheggaaa/pb/v3 v3.0.8/go.mod h1:UICbiLec/XO6Hw6k+BHEtHeQFzzBH4i2/qk/ow1EJTA=
|
||||||
|
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
|
||||||
|
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
||||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||||
|
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
|
||||||
|
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
|
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||||
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||||
|
github.com/mattn/go-runewidth v0.0.12 h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow=
|
||||||
|
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||||
github.com/pkg/profile v1.6.0 h1:hUDfIISABYI59DyeB3OTay/HxSRwTQ8rB/H83k6r5dM=
|
github.com/pkg/profile v1.6.0 h1:hUDfIISABYI59DyeB3OTay/HxSRwTQ8rB/H83k6r5dM=
|
||||||
github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
|
github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
|
||||||
|
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
|
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
||||||
|
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
|
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A=
|
||||||
|
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
|
|
@ -12,6 +12,10 @@ func (x *HistoricalEventAddHfSiteLink) Html() string { return "UNKNWON Historica
|
||||||
func (x *HistoricalEventAgreementFormed) Html() string {
|
func (x *HistoricalEventAgreementFormed) Html() string {
|
||||||
return "UNKNWON HistoricalEventAgreementFormed"
|
return "UNKNWON HistoricalEventAgreementFormed"
|
||||||
}
|
}
|
||||||
|
func (x *HistoricalEventAgreementMade) Html() string { return "UNKNWON HistoricalEventAgreementMade" }
|
||||||
|
func (x *HistoricalEventAgreementRejected) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventAgreementRejected"
|
||||||
|
}
|
||||||
func (x *HistoricalEventArtifactClaimFormed) Html() string {
|
func (x *HistoricalEventArtifactClaimFormed) Html() string {
|
||||||
return "UNKNWON HistoricalEventArtifactClaimFormed"
|
return "UNKNWON HistoricalEventArtifactClaimFormed"
|
||||||
}
|
}
|
||||||
|
@ -32,6 +36,9 @@ func (x *HistoricalEventArtifactRecovered) Html() string {
|
||||||
return "UNKNWON HistoricalEventArtifactRecovered"
|
return "UNKNWON HistoricalEventArtifactRecovered"
|
||||||
}
|
}
|
||||||
func (x *HistoricalEventArtifactStored) Html() string { return "UNKNWON HistoricalEventArtifactStored" }
|
func (x *HistoricalEventArtifactStored) Html() string { return "UNKNWON HistoricalEventArtifactStored" }
|
||||||
|
func (x *HistoricalEventArtifactTransformed) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventArtifactTransformed"
|
||||||
|
}
|
||||||
func (x *HistoricalEventAssumeIdentity) Html() string { return "UNKNWON HistoricalEventAssumeIdentity" }
|
func (x *HistoricalEventAssumeIdentity) Html() string { return "UNKNWON HistoricalEventAssumeIdentity" }
|
||||||
func (x *HistoricalEventAttackedSite) Html() string { return "UNKNWON HistoricalEventAttackedSite" }
|
func (x *HistoricalEventAttackedSite) Html() string { return "UNKNWON HistoricalEventAttackedSite" }
|
||||||
func (x *HistoricalEventBodyAbused) Html() string { return "UNKNWON HistoricalEventBodyAbused" }
|
func (x *HistoricalEventBodyAbused) Html() string { return "UNKNWON HistoricalEventBodyAbused" }
|
||||||
|
@ -65,6 +72,7 @@ func (x *HistoricalEventDanceFormCreated) Html() string {
|
||||||
return "UNKNWON HistoricalEventDanceFormCreated"
|
return "UNKNWON HistoricalEventDanceFormCreated"
|
||||||
}
|
}
|
||||||
func (x *HistoricalEventDestroyedSite) Html() string { return "UNKNWON HistoricalEventDestroyedSite" }
|
func (x *HistoricalEventDestroyedSite) Html() string { return "UNKNWON HistoricalEventDestroyedSite" }
|
||||||
|
func (x *HistoricalEventDiplomatLost) Html() string { return "UNKNWON HistoricalEventDiplomatLost" }
|
||||||
func (x *HistoricalEventEntityAllianceFormed) Html() string {
|
func (x *HistoricalEventEntityAllianceFormed) Html() string {
|
||||||
return "UNKNWON HistoricalEventEntityAllianceFormed"
|
return "UNKNWON HistoricalEventEntityAllianceFormed"
|
||||||
}
|
}
|
||||||
|
@ -78,6 +86,8 @@ func (x *HistoricalEventEntityDissolved) Html() string {
|
||||||
func (x *HistoricalEventEntityEquipmentPurchase) Html() string {
|
func (x *HistoricalEventEntityEquipmentPurchase) Html() string {
|
||||||
return "UNKNWON HistoricalEventEntityEquipmentPurchase"
|
return "UNKNWON HistoricalEventEntityEquipmentPurchase"
|
||||||
}
|
}
|
||||||
|
func (x *HistoricalEventEntityExpelsHf) Html() string { return "UNKNWON HistoricalEventEntityExpelsHf" }
|
||||||
|
func (x *HistoricalEventEntityFledSite) Html() string { return "UNKNWON HistoricalEventEntityFledSite" }
|
||||||
func (x *HistoricalEventEntityIncorporated) Html() string {
|
func (x *HistoricalEventEntityIncorporated) Html() string {
|
||||||
return "UNKNWON HistoricalEventEntityIncorporated"
|
return "UNKNWON HistoricalEventEntityIncorporated"
|
||||||
}
|
}
|
||||||
|
@ -91,7 +101,13 @@ func (x *HistoricalEventEntityPersecuted) Html() string {
|
||||||
func (x *HistoricalEventEntityPrimaryCriminals) Html() string {
|
func (x *HistoricalEventEntityPrimaryCriminals) Html() string {
|
||||||
return "UNKNWON HistoricalEventEntityPrimaryCriminals"
|
return "UNKNWON HistoricalEventEntityPrimaryCriminals"
|
||||||
}
|
}
|
||||||
|
func (x *HistoricalEventEntityRampagedInSite) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventEntityRampagedInSite"
|
||||||
|
}
|
||||||
func (x *HistoricalEventEntityRelocate) Html() string { return "UNKNWON HistoricalEventEntityRelocate" }
|
func (x *HistoricalEventEntityRelocate) Html() string { return "UNKNWON HistoricalEventEntityRelocate" }
|
||||||
|
func (x *HistoricalEventEntitySearchedSite) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventEntitySearchedSite"
|
||||||
|
}
|
||||||
func (x *HistoricalEventFailedFrameAttempt) Html() string {
|
func (x *HistoricalEventFailedFrameAttempt) Html() string {
|
||||||
return "UNKNWON HistoricalEventFailedFrameAttempt"
|
return "UNKNWON HistoricalEventFailedFrameAttempt"
|
||||||
}
|
}
|
||||||
|
@ -99,6 +115,7 @@ func (x *HistoricalEventFailedIntrigueCorruption) Html() string {
|
||||||
return "UNKNWON HistoricalEventFailedIntrigueCorruption"
|
return "UNKNWON HistoricalEventFailedIntrigueCorruption"
|
||||||
}
|
}
|
||||||
func (x *HistoricalEventFieldBattle) Html() string { return "UNKNWON HistoricalEventFieldBattle" }
|
func (x *HistoricalEventFieldBattle) Html() string { return "UNKNWON HistoricalEventFieldBattle" }
|
||||||
|
func (x *HistoricalEventFirstContact) Html() string { return "UNKNWON HistoricalEventFirstContact" }
|
||||||
func (x *HistoricalEventGamble) Html() string { return "UNKNWON HistoricalEventGamble" }
|
func (x *HistoricalEventGamble) Html() string { return "UNKNWON HistoricalEventGamble" }
|
||||||
func (x *HistoricalEventHfAbducted) Html() string { return "UNKNWON HistoricalEventHfAbducted" }
|
func (x *HistoricalEventHfAbducted) Html() string { return "UNKNWON HistoricalEventHfAbducted" }
|
||||||
func (x *HistoricalEventHfAttackedSite) Html() string { return "UNKNWON HistoricalEventHfAttackedSite" }
|
func (x *HistoricalEventHfAttackedSite) Html() string { return "UNKNWON HistoricalEventHfAttackedSite" }
|
||||||
|
@ -118,6 +135,7 @@ func (x *HistoricalEventHfEnslaved) Html() string { return "UNKNWON HistoricalEv
|
||||||
func (x *HistoricalEventHfEquipmentPurchase) Html() string {
|
func (x *HistoricalEventHfEquipmentPurchase) Html() string {
|
||||||
return "UNKNWON HistoricalEventHfEquipmentPurchase"
|
return "UNKNWON HistoricalEventHfEquipmentPurchase"
|
||||||
}
|
}
|
||||||
|
func (x *HistoricalEventHfFreed) Html() string { return "UNKNWON HistoricalEventHfFreed" }
|
||||||
func (x *HistoricalEventHfGainsSecretGoal) Html() string {
|
func (x *HistoricalEventHfGainsSecretGoal) Html() string {
|
||||||
return "UNKNWON HistoricalEventHfGainsSecretGoal"
|
return "UNKNWON HistoricalEventHfGainsSecretGoal"
|
||||||
}
|
}
|
||||||
|
@ -134,6 +152,8 @@ func (x *HistoricalEventHfPreach) Html() string { return "UNKNWON HistoricalEven
|
||||||
func (x *HistoricalEventHfProfanedStructure) Html() string {
|
func (x *HistoricalEventHfProfanedStructure) Html() string {
|
||||||
return "UNKNWON HistoricalEventHfProfanedStructure"
|
return "UNKNWON HistoricalEventHfProfanedStructure"
|
||||||
}
|
}
|
||||||
|
func (x *HistoricalEventHfRansomed) Html() string { return "UNKNWON HistoricalEventHfRansomed" }
|
||||||
|
func (x *HistoricalEventHfReachSummit) Html() string { return "UNKNWON HistoricalEventHfReachSummit" }
|
||||||
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) Html() string {
|
func (x *HistoricalEventHfRecruitedUnitTypeForEntity) Html() string {
|
||||||
return "UNKNWON HistoricalEventHfRecruitedUnitTypeForEntity"
|
return "UNKNWON HistoricalEventHfRecruitedUnitTypeForEntity"
|
||||||
}
|
}
|
||||||
|
@ -159,13 +179,31 @@ func (x *HistoricalEventHfsFormedReputationRelationship) Html() string {
|
||||||
func (x *HistoricalEventHolyCityDeclaration) Html() string {
|
func (x *HistoricalEventHolyCityDeclaration) Html() string {
|
||||||
return "UNKNWON HistoricalEventHolyCityDeclaration"
|
return "UNKNWON HistoricalEventHolyCityDeclaration"
|
||||||
}
|
}
|
||||||
|
func (x *HistoricalEventInsurrectionStarted) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventInsurrectionStarted"
|
||||||
|
}
|
||||||
func (x *HistoricalEventItemStolen) Html() string { return "UNKNWON HistoricalEventItemStolen" }
|
func (x *HistoricalEventItemStolen) Html() string { return "UNKNWON HistoricalEventItemStolen" }
|
||||||
func (x *HistoricalEventKnowledgeDiscovered) Html() string {
|
func (x *HistoricalEventKnowledgeDiscovered) Html() string {
|
||||||
return "UNKNWON HistoricalEventKnowledgeDiscovered"
|
return "UNKNWON HistoricalEventKnowledgeDiscovered"
|
||||||
}
|
}
|
||||||
|
func (x *HistoricalEventMasterpieceArchConstructed) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventMasterpieceArchConstructed"
|
||||||
|
}
|
||||||
|
func (x *HistoricalEventMasterpieceEngraving) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventMasterpieceEngraving"
|
||||||
|
}
|
||||||
|
func (x *HistoricalEventMasterpieceFood) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventMasterpieceFood"
|
||||||
|
}
|
||||||
func (x *HistoricalEventMasterpieceItem) Html() string {
|
func (x *HistoricalEventMasterpieceItem) Html() string {
|
||||||
return "UNKNWON HistoricalEventMasterpieceItem"
|
return "UNKNWON HistoricalEventMasterpieceItem"
|
||||||
}
|
}
|
||||||
|
func (x *HistoricalEventMasterpieceItemImprovement) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventMasterpieceItemImprovement"
|
||||||
|
}
|
||||||
|
func (x *HistoricalEventMasterpieceLost) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventMasterpieceLost"
|
||||||
|
}
|
||||||
func (x *HistoricalEventMerchant) Html() string { return "UNKNWON HistoricalEventMerchant" }
|
func (x *HistoricalEventMerchant) Html() string { return "UNKNWON HistoricalEventMerchant" }
|
||||||
func (x *HistoricalEventModifiedBuilding) Html() string {
|
func (x *HistoricalEventModifiedBuilding) Html() string {
|
||||||
return "UNKNWON HistoricalEventModifiedBuilding"
|
return "UNKNWON HistoricalEventModifiedBuilding"
|
||||||
|
@ -197,8 +235,20 @@ func (x *HistoricalEventRemoveHfSiteLink) Html() string {
|
||||||
func (x *HistoricalEventReplacedStructure) Html() string {
|
func (x *HistoricalEventReplacedStructure) Html() string {
|
||||||
return "UNKNWON HistoricalEventReplacedStructure"
|
return "UNKNWON HistoricalEventReplacedStructure"
|
||||||
}
|
}
|
||||||
|
func (x *HistoricalEventSiteDied) Html() string { return "UNKNWON HistoricalEventSiteDied" }
|
||||||
func (x *HistoricalEventSiteDispute) Html() string { return "UNKNWON HistoricalEventSiteDispute" }
|
func (x *HistoricalEventSiteDispute) Html() string { return "UNKNWON HistoricalEventSiteDispute" }
|
||||||
|
func (x *HistoricalEventSiteRetired) Html() string { return "UNKNWON HistoricalEventSiteRetired" }
|
||||||
|
func (x *HistoricalEventSiteSurrendered) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventSiteSurrendered"
|
||||||
|
}
|
||||||
func (x *HistoricalEventSiteTakenOver) Html() string { return "UNKNWON HistoricalEventSiteTakenOver" }
|
func (x *HistoricalEventSiteTakenOver) Html() string { return "UNKNWON HistoricalEventSiteTakenOver" }
|
||||||
|
func (x *HistoricalEventSiteTributeForced) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventSiteTributeForced"
|
||||||
|
}
|
||||||
|
func (x *HistoricalEventSneakIntoSite) Html() string { return "UNKNWON HistoricalEventSneakIntoSite" }
|
||||||
|
func (x *HistoricalEventSpottedLeavingSite) Html() string {
|
||||||
|
return "UNKNWON HistoricalEventSpottedLeavingSite"
|
||||||
|
}
|
||||||
func (x *HistoricalEventSquadVsSquad) Html() string { return "UNKNWON HistoricalEventSquadVsSquad" }
|
func (x *HistoricalEventSquadVsSquad) Html() string { return "UNKNWON HistoricalEventSquadVsSquad" }
|
||||||
func (x *HistoricalEventTacticalSituation) Html() string {
|
func (x *HistoricalEventTacticalSituation) Html() string {
|
||||||
return "UNKNWON HistoricalEventTacticalSituation"
|
return "UNKNWON HistoricalEventTacticalSituation"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,14 +10,20 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/cheggaaa/pb/v3"
|
||||||
"github.com/robertjanetzko/LegendsBrowser2/backend/util"
|
"github.com/robertjanetzko/LegendsBrowser2/backend/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (e *HistoricalEvent) Name() string { return "" }
|
func (e *HistoricalEvent) Name() string { return "" }
|
||||||
func (e *HistoricalEventCollection) Name() string { return "" }
|
func (e *HistoricalEventCollection) Name() string { return "" }
|
||||||
|
|
||||||
func Parse(file string) (*DfWorld, error) {
|
func NewLegendsDecoder(file string) (*xml.Decoder, *os.File, *pb.ProgressBar, error) {
|
||||||
InitSameFields()
|
fi, err := os.Stat(file)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, nil, err
|
||||||
|
}
|
||||||
|
size := fi.Size()
|
||||||
|
bar := pb.Full.Start64(size)
|
||||||
|
|
||||||
xmlFile, err := os.Open(file)
|
xmlFile, err := os.Open(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -25,10 +31,22 @@ func Parse(file string) (*DfWorld, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Successfully Opened", file)
|
fmt.Println("Successfully Opened", file)
|
||||||
defer xmlFile.Close()
|
|
||||||
|
|
||||||
converter := util.NewConvertReader(xmlFile)
|
converter := util.NewConvertReader(xmlFile)
|
||||||
d := xml.NewDecoder(converter)
|
barReader := bar.NewProxyReader(converter)
|
||||||
|
d := xml.NewDecoder(barReader)
|
||||||
|
|
||||||
|
return d, xmlFile, bar, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func Parse(file string) (*DfWorld, error) {
|
||||||
|
InitSameFields()
|
||||||
|
|
||||||
|
d, xmlFile, bar, err := NewLegendsDecoder(file)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer xmlFile.Close()
|
||||||
|
|
||||||
var world *DfWorld
|
var world *DfWorld
|
||||||
BaseLoop:
|
BaseLoop:
|
||||||
|
@ -49,22 +67,19 @@ BaseLoop:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bar.Finish()
|
||||||
|
|
||||||
plus := true
|
plus := true
|
||||||
|
|
||||||
if plus {
|
if plus {
|
||||||
file = strings.Replace(file, "-legends.xml", "-legends_plus.xml", 1)
|
file = strings.Replace(file, "-legends.xml", "-legends_plus.xml", 1)
|
||||||
xmlFile, err := os.Open(file)
|
|
||||||
|
d, xmlFile, bar, err := NewLegendsDecoder(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
return nil, err
|
||||||
return world, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Successfully Opened", file)
|
|
||||||
defer xmlFile.Close()
|
defer xmlFile.Close()
|
||||||
|
|
||||||
converter := util.NewConvertReader(xmlFile)
|
|
||||||
d := xml.NewDecoder(converter)
|
|
||||||
|
|
||||||
PlusLoop:
|
PlusLoop:
|
||||||
for {
|
for {
|
||||||
tok, err := d.Token()
|
tok, err := d.Token()
|
||||||
|
@ -82,6 +97,8 @@ BaseLoop:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bar.Finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
same, err := json.MarshalIndent(exportSameFields(), "", " ")
|
same, err := json.MarshalIndent(exportSameFields(), "", " ")
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
{
|
{
|
||||||
"Artifact": {
|
|
||||||
"Writing": "StructureLocalId"
|
|
||||||
},
|
|
||||||
"HistoricalEventAddHfEntityLink": {
|
"HistoricalEventAddHfEntityLink": {
|
||||||
"LinkType": "Link"
|
"LinkType": "Link"
|
||||||
},
|
},
|
||||||
|
@ -11,26 +8,15 @@
|
||||||
"HistoricalEventCreatedStructure": {
|
"HistoricalEventCreatedStructure": {
|
||||||
"Structure": "StructureId"
|
"Structure": "StructureId"
|
||||||
},
|
},
|
||||||
|
"HistoricalEventDiplomatLost": {
|
||||||
|
"Entity": "SiteId",
|
||||||
|
"Involved": "SiteId",
|
||||||
|
"Site": "SiteId"
|
||||||
|
},
|
||||||
"HistoricalEventHfDied": {
|
"HistoricalEventHfDied": {
|
||||||
"ItemSubtype": "Cause",
|
"ItemSubtype": "Cause",
|
||||||
"Mat": "Cause"
|
"Mat": "Cause"
|
||||||
},
|
},
|
||||||
"HistoricalEventHfDoesInteraction": {
|
|
||||||
"InteractionAction": "Interaction"
|
|
||||||
},
|
|
||||||
"HistoricalEventHfLearnsSecret": {
|
|
||||||
"SecretText": "Interaction"
|
|
||||||
},
|
|
||||||
"HistoricalEventMasterpieceItem": {
|
|
||||||
"Maker": "Hfid",
|
|
||||||
"MakerEntity": "EntityId",
|
|
||||||
"Site": "SiteId"
|
|
||||||
},
|
|
||||||
"HistoricalEventMerchant": {
|
|
||||||
"Destination": "DepotEntityId",
|
|
||||||
"Site": "SiteId",
|
|
||||||
"Source": "TraderEntityId"
|
|
||||||
},
|
|
||||||
"HistoricalEventPeaceAccepted": {
|
"HistoricalEventPeaceAccepted": {
|
||||||
"Site": "SiteId"
|
"Site": "SiteId"
|
||||||
},
|
},
|
||||||
|
@ -43,6 +29,9 @@
|
||||||
"HistoricalEventRemoveHfSiteLink": {
|
"HistoricalEventRemoveHfSiteLink": {
|
||||||
"Site": "SiteId"
|
"Site": "SiteId"
|
||||||
},
|
},
|
||||||
|
"HistoricalFigure": {
|
||||||
|
"Sex": "BreedId"
|
||||||
|
},
|
||||||
"Structure": {
|
"Structure": {
|
||||||
"Name2": "Subtype"
|
"Name2": "Subtype"
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,6 +197,12 @@ export interface EntityFormerPositionLink {
|
||||||
positionProfileId: number;
|
positionProfileId: number;
|
||||||
startYear: number;
|
startYear: number;
|
||||||
}
|
}
|
||||||
|
export interface EntityFormerSquadLink {
|
||||||
|
endYear: number;
|
||||||
|
entityId: number;
|
||||||
|
squadId: number;
|
||||||
|
startYear: number;
|
||||||
|
}
|
||||||
export interface EntityPopulation {
|
export interface EntityPopulation {
|
||||||
civId: number;
|
civId: number;
|
||||||
id: number;
|
id: number;
|
||||||
|
@ -226,6 +232,17 @@ export interface EntityReputation {
|
||||||
entityId: number;
|
entityId: number;
|
||||||
firstAgelessSeasonCount: number;
|
firstAgelessSeasonCount: number;
|
||||||
firstAgelessYear: number;
|
firstAgelessYear: number;
|
||||||
|
repBard: number;
|
||||||
|
repEnemyFighter: number;
|
||||||
|
repHero: number;
|
||||||
|
repHunter: number;
|
||||||
|
repKiller: number;
|
||||||
|
repKnowledgePreserver: number;
|
||||||
|
repPoet: number;
|
||||||
|
repProtectorOfWeak: number;
|
||||||
|
repStoryteller: number;
|
||||||
|
repThief: number;
|
||||||
|
repTreasureHunter: number;
|
||||||
unsolvedMurders: number;
|
unsolvedMurders: number;
|
||||||
}
|
}
|
||||||
export interface EntitySquadLink {
|
export interface EntitySquadLink {
|
||||||
|
@ -292,11 +309,14 @@ export interface HistoricalEventAddHfSiteLink {
|
||||||
export interface HistoricalEventAgreementFormed {
|
export interface HistoricalEventAgreementFormed {
|
||||||
action: string;
|
action: string;
|
||||||
agreementId: number;
|
agreementId: number;
|
||||||
|
agreementSubjectId: number;
|
||||||
allyDefenseBonus: number;
|
allyDefenseBonus: number;
|
||||||
coconspiratorBonus: number;
|
coconspiratorBonus: number;
|
||||||
|
concluderHfid: number;
|
||||||
delegated: boolean;
|
delegated: boolean;
|
||||||
failedJudgmentTest: boolean;
|
failedJudgmentTest: boolean;
|
||||||
method: string;
|
method: string;
|
||||||
|
reason: string;
|
||||||
relevantEntityId: number;
|
relevantEntityId: number;
|
||||||
relevantIdForMethod: number;
|
relevantIdForMethod: number;
|
||||||
relevantPositionProfileId: number;
|
relevantPositionProfileId: number;
|
||||||
|
@ -311,6 +331,12 @@ export interface HistoricalEventAgreementFormed {
|
||||||
topValueModifier: number;
|
topValueModifier: number;
|
||||||
topValueRating: number;
|
topValueRating: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventAgreementMade {
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
|
export interface HistoricalEventAgreementRejected {
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventArtifactClaimFormed {
|
export interface HistoricalEventArtifactClaimFormed {
|
||||||
artifactId: number;
|
artifactId: number;
|
||||||
circumstance: string;
|
circumstance: string;
|
||||||
|
@ -361,11 +387,13 @@ export interface HistoricalEventArtifactGiven {
|
||||||
artifactId: number;
|
artifactId: number;
|
||||||
giverEntityId: number;
|
giverEntityId: number;
|
||||||
giverHistFigureId: number;
|
giverHistFigureId: number;
|
||||||
|
reason: string;
|
||||||
receiverEntityId: number;
|
receiverEntityId: number;
|
||||||
receiverHistFigureId: number;
|
receiverHistFigureId: number;
|
||||||
}
|
}
|
||||||
export interface HistoricalEventArtifactLost {
|
export interface HistoricalEventArtifactLost {
|
||||||
artifactId: number;
|
artifactId: number;
|
||||||
|
featureLayerId: number;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
sitePropertyId: number;
|
sitePropertyId: number;
|
||||||
subregionId: number;
|
subregionId: number;
|
||||||
|
@ -397,6 +425,13 @@ export interface HistoricalEventArtifactStored {
|
||||||
siteId: number;
|
siteId: number;
|
||||||
unitId: number;
|
unitId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventArtifactTransformed {
|
||||||
|
histFigureId: number;
|
||||||
|
newArtifactId: number;
|
||||||
|
oldArtifactId: number;
|
||||||
|
siteId: number;
|
||||||
|
unitId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventAssumeIdentity {
|
export interface HistoricalEventAssumeIdentity {
|
||||||
identityCaste: string;
|
identityCaste: string;
|
||||||
identityHistfigId: number;
|
identityHistfigId: number;
|
||||||
|
@ -579,6 +614,11 @@ export interface HistoricalEventCollectionEntityOverthrown {
|
||||||
siteId: number;
|
siteId: number;
|
||||||
targetEntityId: number;
|
targetEntityId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventCollectionInsurrection {
|
||||||
|
ordinal: number;
|
||||||
|
siteId: number;
|
||||||
|
targetEnid: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventCollectionJourney {
|
export interface HistoricalEventCollectionJourney {
|
||||||
ordinal: number;
|
ordinal: number;
|
||||||
}
|
}
|
||||||
|
@ -603,6 +643,16 @@ export interface HistoricalEventCollectionPurge {
|
||||||
ordinal: number;
|
ordinal: number;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventCollectionRaid {
|
||||||
|
attackingEnid: number;
|
||||||
|
coords: string;
|
||||||
|
defendingEnid: number;
|
||||||
|
featureLayerId: number;
|
||||||
|
ordinal: number;
|
||||||
|
parentEventcol: number;
|
||||||
|
siteId: number;
|
||||||
|
subregionId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventCollectionSiteConquered {
|
export interface HistoricalEventCollectionSiteConquered {
|
||||||
attackingEnid: number;
|
attackingEnid: number;
|
||||||
defendingEnid: number;
|
defendingEnid: number;
|
||||||
|
@ -694,9 +744,16 @@ export interface HistoricalEventDanceFormCreated {
|
||||||
export interface HistoricalEventDestroyedSite {
|
export interface HistoricalEventDestroyedSite {
|
||||||
attackerCivId: number;
|
attackerCivId: number;
|
||||||
defenderCivId: number;
|
defenderCivId: number;
|
||||||
|
noDefeatMention: boolean;
|
||||||
siteCivId: number;
|
siteCivId: number;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventDiplomatLost {
|
||||||
|
entity: number;
|
||||||
|
involved: number;
|
||||||
|
site: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventEntityAllianceFormed {
|
export interface HistoricalEventEntityAllianceFormed {
|
||||||
initiatingEnid: number;
|
initiatingEnid: number;
|
||||||
joiningEnid: number[];
|
joiningEnid: number[];
|
||||||
|
@ -722,6 +779,15 @@ export interface HistoricalEventEntityEquipmentPurchase {
|
||||||
hfid: number[];
|
hfid: number[];
|
||||||
newEquipmentLevel: number;
|
newEquipmentLevel: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventEntityExpelsHf {
|
||||||
|
entityId: number;
|
||||||
|
hfid: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
|
export interface HistoricalEventEntityFledSite {
|
||||||
|
fledCivId: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventEntityIncorporated {
|
export interface HistoricalEventEntityIncorporated {
|
||||||
joinedEntityId: number;
|
joinedEntityId: number;
|
||||||
joinerEntityId: number;
|
joinerEntityId: number;
|
||||||
|
@ -766,6 +832,10 @@ export interface HistoricalEventEntityPrimaryCriminals {
|
||||||
structure: number;
|
structure: number;
|
||||||
structureId: number;
|
structureId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventEntityRampagedInSite {
|
||||||
|
rampageCivId: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventEntityRelocate {
|
export interface HistoricalEventEntityRelocate {
|
||||||
action: string;
|
action: string;
|
||||||
entity: number;
|
entity: number;
|
||||||
|
@ -775,6 +845,11 @@ export interface HistoricalEventEntityRelocate {
|
||||||
structure: number;
|
structure: number;
|
||||||
structureId: number;
|
structureId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventEntitySearchedSite {
|
||||||
|
result: string;
|
||||||
|
searcherCivId: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventFailedFrameAttempt {
|
export interface HistoricalEventFailedFrameAttempt {
|
||||||
convicterEnid: number;
|
convicterEnid: number;
|
||||||
crime: string;
|
crime: string;
|
||||||
|
@ -823,6 +898,11 @@ export interface HistoricalEventFieldBattle {
|
||||||
featureLayerId: number;
|
featureLayerId: number;
|
||||||
subregionId: number;
|
subregionId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventFirstContact {
|
||||||
|
contactedEnid: number;
|
||||||
|
contactorEnid: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventGamble {
|
export interface HistoricalEventGamble {
|
||||||
gamblerHfid: number;
|
gamblerHfid: number;
|
||||||
newAccount: number;
|
newAccount: number;
|
||||||
|
@ -853,6 +933,7 @@ export interface HistoricalEventHfConfronted {
|
||||||
subregionId: number;
|
subregionId: number;
|
||||||
}
|
}
|
||||||
export interface HistoricalEventHfConvicted {
|
export interface HistoricalEventHfConvicted {
|
||||||
|
beating: boolean;
|
||||||
coconspiratorHfid: number;
|
coconspiratorHfid: number;
|
||||||
confessedAfterApbArrestEnid: number;
|
confessedAfterApbArrestEnid: number;
|
||||||
contactHfid: number;
|
contactHfid: number;
|
||||||
|
@ -866,9 +947,11 @@ export interface HistoricalEventHfConvicted {
|
||||||
exiled: boolean;
|
exiled: boolean;
|
||||||
fooledHfid: number;
|
fooledHfid: number;
|
||||||
framerHfid: number;
|
framerHfid: number;
|
||||||
|
hammerstrokes: number;
|
||||||
heldFirmInInterrogation: boolean;
|
heldFirmInInterrogation: boolean;
|
||||||
implicatedHfid: number[];
|
implicatedHfid: number[];
|
||||||
interrogatorHfid: number;
|
interrogatorHfid: number;
|
||||||
|
noPrisonAvailable: boolean;
|
||||||
plotterHfid: number;
|
plotterHfid: number;
|
||||||
prisonMonths: number;
|
prisonMonths: number;
|
||||||
surveiledCoconspirator: boolean;
|
surveiledCoconspirator: boolean;
|
||||||
|
@ -939,6 +1022,13 @@ export interface HistoricalEventHfEquipmentPurchase {
|
||||||
structureId: number;
|
structureId: number;
|
||||||
subregionId: number;
|
subregionId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventHfFreed {
|
||||||
|
freeingHfid: number;
|
||||||
|
holdingCivId: number;
|
||||||
|
rescuedHfid: number;
|
||||||
|
siteCivId: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventHfGainsSecretGoal {
|
export interface HistoricalEventHfGainsSecretGoal {
|
||||||
hfid: number;
|
hfid: number;
|
||||||
secretGoal: string;
|
secretGoal: string;
|
||||||
|
@ -946,6 +1036,7 @@ export interface HistoricalEventHfGainsSecretGoal {
|
||||||
export interface HistoricalEventHfInterrogated {
|
export interface HistoricalEventHfInterrogated {
|
||||||
arrestingEnid: number;
|
arrestingEnid: number;
|
||||||
heldFirmInInterrogation: boolean;
|
heldFirmInInterrogation: boolean;
|
||||||
|
implicatedHfid: number;
|
||||||
interrogatorHfid: number;
|
interrogatorHfid: number;
|
||||||
targetHfid: number;
|
targetHfid: number;
|
||||||
wantedAndRecognized: boolean;
|
wantedAndRecognized: boolean;
|
||||||
|
@ -1002,6 +1093,19 @@ export interface HistoricalEventHfProfanedStructure {
|
||||||
structure: number;
|
structure: number;
|
||||||
structureId: number;
|
structureId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventHfRansomed {
|
||||||
|
movedToSiteId: number;
|
||||||
|
payerEntityId: number;
|
||||||
|
payerHfid: number;
|
||||||
|
ransomedHfid: number;
|
||||||
|
ransomerHfid: number;
|
||||||
|
}
|
||||||
|
export interface HistoricalEventHfReachSummit {
|
||||||
|
coords: string;
|
||||||
|
featureLayerId: number;
|
||||||
|
groupHfid: number[];
|
||||||
|
subregionId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventHfRecruitedUnitTypeForEntity {
|
export interface HistoricalEventHfRecruitedUnitTypeForEntity {
|
||||||
entityId: number;
|
entityId: number;
|
||||||
featureLayerId: number;
|
featureLayerId: number;
|
||||||
|
@ -1031,7 +1135,9 @@ export interface HistoricalEventHfRevived {
|
||||||
actorHfid: number;
|
actorHfid: number;
|
||||||
disturbance: boolean;
|
disturbance: boolean;
|
||||||
featureLayerId: number;
|
featureLayerId: number;
|
||||||
|
ghost: string;
|
||||||
hfid: number;
|
hfid: number;
|
||||||
|
raisedBefore: boolean;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
subregionId: number;
|
subregionId: number;
|
||||||
}
|
}
|
||||||
|
@ -1065,6 +1171,7 @@ export interface HistoricalEventHfWounded {
|
||||||
site: number;
|
site: number;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
subregionId: number;
|
subregionId: number;
|
||||||
|
wasTorture: boolean;
|
||||||
woundee: number;
|
woundee: number;
|
||||||
woundeeCaste: number;
|
woundeeCaste: number;
|
||||||
woundeeHfid: number;
|
woundeeHfid: number;
|
||||||
|
@ -1119,6 +1226,11 @@ export interface HistoricalEventHolyCityDeclaration {
|
||||||
religionId: number;
|
religionId: number;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventInsurrectionStarted {
|
||||||
|
outcome: string;
|
||||||
|
siteId: number;
|
||||||
|
targetCivId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventItemStolen {
|
export interface HistoricalEventItemStolen {
|
||||||
circumstance: HistoricalEventItemStolenCircumstance;
|
circumstance: HistoricalEventItemStolenCircumstance;
|
||||||
circumstanceId: number;
|
circumstanceId: number;
|
||||||
|
@ -1146,10 +1258,41 @@ export interface HistoricalEventKnowledgeDiscovered {
|
||||||
hfid: number;
|
hfid: number;
|
||||||
knowledge: string;
|
knowledge: string;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventMasterpieceArchConstructed {
|
||||||
|
buildingCustom: number;
|
||||||
|
buildingSubtype: string;
|
||||||
|
buildingType: string;
|
||||||
|
entityId: number;
|
||||||
|
hfid: number;
|
||||||
|
maker: number;
|
||||||
|
makerEntity: number;
|
||||||
|
site: number;
|
||||||
|
siteId: number;
|
||||||
|
skillAtTime: string;
|
||||||
|
unk2: number;
|
||||||
|
}
|
||||||
|
export interface HistoricalEventMasterpieceEngraving {
|
||||||
|
artId: number;
|
||||||
|
artSubid: number;
|
||||||
|
entityId: number;
|
||||||
|
hfid: number;
|
||||||
|
maker: number;
|
||||||
|
makerEntity: number;
|
||||||
|
site: number;
|
||||||
|
siteId: number;
|
||||||
|
skillAtTime: string;
|
||||||
|
}
|
||||||
|
export interface HistoricalEventMasterpieceFood {
|
||||||
|
entityId: number;
|
||||||
|
hfid: number;
|
||||||
|
siteId: number;
|
||||||
|
skillAtTime: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventMasterpieceItem {
|
export interface HistoricalEventMasterpieceItem {
|
||||||
entityId: number;
|
entityId: number;
|
||||||
hfid: number;
|
hfid: number;
|
||||||
itemId: number;
|
itemId: number;
|
||||||
|
itemSubtype: string;
|
||||||
itemType: string;
|
itemType: string;
|
||||||
maker: number;
|
maker: number;
|
||||||
makerEntity: number;
|
makerEntity: number;
|
||||||
|
@ -1158,9 +1301,23 @@ export interface HistoricalEventMasterpieceItem {
|
||||||
siteId: number;
|
siteId: number;
|
||||||
skillAtTime: string;
|
skillAtTime: string;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventMasterpieceItemImprovement {
|
||||||
|
entityId: number;
|
||||||
|
hfid: number;
|
||||||
|
siteId: number;
|
||||||
|
skillAtTime: number;
|
||||||
|
}
|
||||||
|
export interface HistoricalEventMasterpieceLost {
|
||||||
|
creationEvent: number;
|
||||||
|
histfig: number;
|
||||||
|
method: string;
|
||||||
|
site: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventMerchant {
|
export interface HistoricalEventMerchant {
|
||||||
depotEntityId: number;
|
depotEntityId: number;
|
||||||
destination: number;
|
destination: number;
|
||||||
|
hardship: boolean;
|
||||||
|
lostValue: boolean;
|
||||||
site: number;
|
site: number;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
source: number;
|
source: number;
|
||||||
|
@ -1215,8 +1372,12 @@ export interface HistoricalEventPlunderedSite {
|
||||||
attackerCivId: number;
|
attackerCivId: number;
|
||||||
defenderCivId: number;
|
defenderCivId: number;
|
||||||
detected: boolean;
|
detected: boolean;
|
||||||
|
noDefeatMention: boolean;
|
||||||
siteCivId: number;
|
siteCivId: number;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
|
tookItems: boolean;
|
||||||
|
tookLivestock: boolean;
|
||||||
|
wasRaid: boolean;
|
||||||
}
|
}
|
||||||
export interface HistoricalEventPoeticFormCreated {
|
export interface HistoricalEventPoeticFormCreated {
|
||||||
circumstance: string;
|
circumstance: string;
|
||||||
|
@ -1241,6 +1402,7 @@ export interface HistoricalEventReclaimSite {
|
||||||
civId: number;
|
civId: number;
|
||||||
siteCivId: number;
|
siteCivId: number;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
|
unretire: boolean;
|
||||||
}
|
}
|
||||||
export interface HistoricalEventRegionpopIncorporatedIntoEntity {
|
export interface HistoricalEventRegionpopIncorporatedIntoEntity {
|
||||||
joinEntityId: number;
|
joinEntityId: number;
|
||||||
|
@ -1297,6 +1459,12 @@ export interface HistoricalEventReplacedStructure {
|
||||||
siteCivId: number;
|
siteCivId: number;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventSiteDied {
|
||||||
|
abandoned: boolean;
|
||||||
|
civId: number;
|
||||||
|
siteCivId: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventSiteDispute {
|
export interface HistoricalEventSiteDispute {
|
||||||
dispute: string;
|
dispute: string;
|
||||||
entityId1: number;
|
entityId1: number;
|
||||||
|
@ -1304,6 +1472,18 @@ export interface HistoricalEventSiteDispute {
|
||||||
siteId1: number;
|
siteId1: number;
|
||||||
siteId2: number;
|
siteId2: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventSiteRetired {
|
||||||
|
civId: number;
|
||||||
|
first: boolean;
|
||||||
|
siteCivId: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
|
export interface HistoricalEventSiteSurrendered {
|
||||||
|
attackerCivId: number;
|
||||||
|
defenderCivId: number;
|
||||||
|
siteCivId: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventSiteTakenOver {
|
export interface HistoricalEventSiteTakenOver {
|
||||||
attackerCivId: number;
|
attackerCivId: number;
|
||||||
defenderCivId: number;
|
defenderCivId: number;
|
||||||
|
@ -1311,11 +1491,35 @@ export interface HistoricalEventSiteTakenOver {
|
||||||
siteCivId: number;
|
siteCivId: number;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
}
|
}
|
||||||
|
export interface HistoricalEventSiteTributeForced {
|
||||||
|
attackerCivId: number;
|
||||||
|
defenderCivId: number;
|
||||||
|
season: string;
|
||||||
|
siteCivId: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
|
export interface HistoricalEventSneakIntoSite {
|
||||||
|
attackerCivId: number;
|
||||||
|
defenderCivId: number;
|
||||||
|
siteCivId: number;
|
||||||
|
siteId: number;
|
||||||
|
}
|
||||||
|
export interface HistoricalEventSpottedLeavingSite {
|
||||||
|
leaverCivId: number;
|
||||||
|
siteCivId: number;
|
||||||
|
siteId: number;
|
||||||
|
spotterHfid: number;
|
||||||
|
}
|
||||||
export interface HistoricalEventSquadVsSquad {
|
export interface HistoricalEventSquadVsSquad {
|
||||||
aHfid: number;
|
aHfid: number[];
|
||||||
|
aLeaderHfid: number;
|
||||||
|
aLeadershipRoll: number;
|
||||||
aSquadId: number;
|
aSquadId: number;
|
||||||
dEffect: number;
|
dEffect: number;
|
||||||
|
dHfid: number[];
|
||||||
dInteraction: number;
|
dInteraction: number;
|
||||||
|
dLeaderHfid: number;
|
||||||
|
dLeadershipRoll: number;
|
||||||
dNumber: number;
|
dNumber: number;
|
||||||
dRace: number;
|
dRace: number;
|
||||||
dSlain: number;
|
dSlain: number;
|
||||||
|
@ -1359,12 +1563,14 @@ export interface HistoricalEventWrittenContentComposed {
|
||||||
}
|
}
|
||||||
export interface HistoricalFigure {
|
export interface HistoricalFigure {
|
||||||
activeInteraction: string[];
|
activeInteraction: string[];
|
||||||
|
adventurer: boolean;
|
||||||
animated: boolean;
|
animated: boolean;
|
||||||
animatedString: string;
|
animatedString: string;
|
||||||
appeared: number;
|
appeared: number;
|
||||||
associatedType: string;
|
associatedType: string;
|
||||||
birthSeconds72: number;
|
birthSeconds72: number;
|
||||||
birthYear: number;
|
birthYear: number;
|
||||||
|
breedId: number;
|
||||||
caste: string;
|
caste: string;
|
||||||
currentIdentityId: number;
|
currentIdentityId: number;
|
||||||
deathSeconds72: number;
|
deathSeconds72: number;
|
||||||
|
@ -1372,11 +1578,13 @@ export interface HistoricalFigure {
|
||||||
deity: boolean;
|
deity: boolean;
|
||||||
entPopId: number;
|
entPopId: number;
|
||||||
entityFormerPositionLink: EntityFormerPositionLink[];
|
entityFormerPositionLink: EntityFormerPositionLink[];
|
||||||
|
entityFormerSquadLink: EntityFormerSquadLink[];
|
||||||
entityLink: HistoricalFigureEntityLink[];
|
entityLink: HistoricalFigureEntityLink[];
|
||||||
entityPositionLink: EntityPositionLink[];
|
entityPositionLink: EntityPositionLink[];
|
||||||
entityReputation: EntityReputation[];
|
entityReputation: EntityReputation[];
|
||||||
entitySquadLink: EntitySquadLink;
|
entitySquadLink: EntitySquadLink;
|
||||||
force: boolean;
|
force: boolean;
|
||||||
|
ghost: boolean;
|
||||||
goal: string[];
|
goal: string[];
|
||||||
hfLink: HfLink[];
|
hfLink: HfLink[];
|
||||||
hfSkill: HfSkill[];
|
hfSkill: HfSkill[];
|
||||||
|
@ -1390,6 +1598,7 @@ export interface HistoricalFigure {
|
||||||
name: string;
|
name: string;
|
||||||
race: string;
|
race: string;
|
||||||
relationshipProfileHfHistorical: RelationshipProfileHfHistorical[];
|
relationshipProfileHfHistorical: RelationshipProfileHfHistorical[];
|
||||||
|
relationshipProfileHfIdentity: RelationshipProfileHfIdentity[];
|
||||||
relationshipProfileHfVisual: RelationshipProfileHfVisual[];
|
relationshipProfileHfVisual: RelationshipProfileHfVisual[];
|
||||||
sex: number;
|
sex: number;
|
||||||
siteLink: SiteLink[];
|
siteLink: SiteLink[];
|
||||||
|
@ -1522,6 +1731,22 @@ export interface RelationshipProfileHfHistorical {
|
||||||
hfId: number;
|
hfId: number;
|
||||||
love: number;
|
love: number;
|
||||||
loyalty: number;
|
loyalty: number;
|
||||||
|
repEnemyFighter: number;
|
||||||
|
repHero: number;
|
||||||
|
repHunter: number;
|
||||||
|
repKiller: number;
|
||||||
|
repPsychopath: number;
|
||||||
|
repStoryteller: number;
|
||||||
|
repViolent: number;
|
||||||
|
respect: number;
|
||||||
|
trust: number;
|
||||||
|
}
|
||||||
|
export interface RelationshipProfileHfIdentity {
|
||||||
|
fear: number;
|
||||||
|
id: number;
|
||||||
|
love: number;
|
||||||
|
loyalty: number;
|
||||||
|
repPsychopath: number;
|
||||||
respect: number;
|
respect: number;
|
||||||
trust: number;
|
trust: number;
|
||||||
}
|
}
|
||||||
|
@ -1534,8 +1759,17 @@ export interface RelationshipProfileHfVisual {
|
||||||
love: number;
|
love: number;
|
||||||
loyalty: number;
|
loyalty: number;
|
||||||
meetCount: number;
|
meetCount: number;
|
||||||
|
repBonded: number;
|
||||||
|
repComrade: number;
|
||||||
|
repFlatterer: number;
|
||||||
repFriendly: number;
|
repFriendly: number;
|
||||||
|
repHero: number;
|
||||||
|
repHunter: number;
|
||||||
repInformationSource: number;
|
repInformationSource: number;
|
||||||
|
repKiller: number;
|
||||||
|
repPsychopath: number;
|
||||||
|
repQuarreler: number;
|
||||||
|
repTradePartner: number;
|
||||||
respect: number;
|
respect: number;
|
||||||
trust: number;
|
trust: number;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue