main map, world name
This commit is contained in:
parent
862cb7a82d
commit
f13fa945e6
3 changed files with 23 additions and 12 deletions
|
@ -32,6 +32,10 @@ func (w *DfWorld) LoadHistory() {
|
|||
return
|
||||
}
|
||||
|
||||
lines := strings.Split(string(data), "\n")
|
||||
w.Name_ = lines[0]
|
||||
w.Altname = lines[1]
|
||||
|
||||
fmt.Println("found world history", path)
|
||||
leaderRegEx := regexp.MustCompile(` \[\*\] (.+?) \(.*?Reign Began: (-?\d+)\)`)
|
||||
results := regexp.MustCompile(`\n([^ ].*?), [^\n]+(?:\n [^\n]+)*`).FindAllStringSubmatch(util.ConvertCp473(data), -1)
|
||||
|
|
|
@ -3,6 +3,21 @@
|
|||
{{define "title"}}Legends Browser{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
|
||||
{{ if world.MapReady }}
|
||||
<div class="object-map">
|
||||
{{- if ne world.Name "" -}}
|
||||
<h3>{{world.Name}} - {{world.Altname}}</h3>
|
||||
{{- end }}
|
||||
<div id="map" style="width: 750px; height: 750px"></div>
|
||||
</div>
|
||||
{{initMap}}
|
||||
{{- range $race, $civs := .Civilizations }}{{- range $civs }}{{- range .Sites }}
|
||||
{{ addSite . true }}
|
||||
{{- end }}{{- end }}{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
<h3>Civilizations</h3>
|
||||
|
||||
<ul>
|
||||
|
@ -16,16 +31,4 @@
|
|||
{{- end }}
|
||||
</ul>
|
||||
|
||||
{{ if world.MapReady }}
|
||||
<div id="map" style="height: 400px"></div>
|
||||
{{initMap}}
|
||||
{{- range $race, $civs := .Civilizations }}
|
||||
{{- range $civs }}
|
||||
{{- range .Sites }}
|
||||
{{ addSite . true }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
{{define "content"}}
|
||||
|
||||
{{- if ne world.Name "" -}}
|
||||
<h3>{{world.Name}} - {{world.Altname}}</h3>
|
||||
{{- end }}
|
||||
|
||||
{{ if world.MapReady }}
|
||||
<div id="map" style="width: 100%; height: 1000px"></div>
|
||||
{{initMap}}
|
||||
|
|
Loading…
Reference in a new issue