Fix skilldesc IDs

This commit is contained in:
CarlPoppa
2025-03-18 21:36:55 +00:00
committed by guiyomu-dev
parent dba9a7b5a5
commit 08a12b1967
3 changed files with 74 additions and 77 deletions

View File

@@ -5,6 +5,7 @@ import (
"bytes"
"fmt"
"os"
"regexp"
"strings"
"text/template"
)
@@ -108,6 +109,10 @@ func generateFile(sourcePath, destinationPath, tpl string) error {
"list": func() []string {
return make([]string, 0)
},
"extractInt": func(s string) string {
reg := regexp.MustCompile("[^0-9]")
return reg.ReplaceAllString(s, "")
},
}
t := template.Must(template.New("tpl").Funcs(funcMap).Parse(tpl))