generate object descriptions

This commit is contained in:
Héctor Giménez
2024-05-29 09:06:30 +09:00
parent b428238643
commit c85217e8e7
6 changed files with 1198 additions and 0 deletions

View File

@@ -60,3 +60,13 @@ const templateArmorAndMisc = `
{{ $value.ID }}: {Name: "{{ $value.name }}", ID: {{ $value.ID }}, Code: "{{ $value.code }}", NormalCode: "{{ $value.normcode }}", UberCode: "{{ $value.ubercode }}", UltraCode: "{{ $value.ultracode }}", InventoryWidth: {{ $value.invwidth }}, InventoryHeight: {{ $value.invheight }}, MinDefense: {{ $value.minac }}, MaxDefense: {{ $value.maxac }}, Type: "{{ $value.type }}"},
{{- end }}
`
const templateObjects = `// Code generated by cmd/txttocode. DO NOT EDIT.
// source: cmd/txttocode/txt/objects.txt
package object
var Desc = map[int]Description{
{{- range $key, $value := . }}
{{ index $value "*ID" }}: {Name: "{{ $value.Name }}", ID: {{ index $value "*ID" }}, SizeX: {{ $value.SizeX }}, SizeY: {{ $value.SizeY }}, HasCollision: {{ if eq $value.HasCollision0 "1" }}true{{ else }}false{{ end }}},
{{- end }}
}`