diff --git a/go-generate.go b/go-generate.go index e9c8c1f..c88210a 100644 --- a/go-generate.go +++ b/go-generate.go @@ -3,7 +3,7 @@ package main import "os" //go:generate go run ./horsegen -//go:generate go generate ./go/... +//go:generate go generate ./horse/... //go:generate go fmt ./... func main() { diff --git a/go/abilitytype_string.go b/horse/abilitytype_string.go similarity index 100% rename from go/abilitytype_string.go rename to horse/abilitytype_string.go diff --git a/go/global/character.go b/horse/global/character.go similarity index 100% rename from go/global/character.go rename to horse/global/character.go diff --git a/go/global/skill.go b/horse/global/skill.go similarity index 99% rename from go/global/skill.go rename to horse/global/skill.go index edd9dd8..3ab08da 100644 --- a/go/global/skill.go +++ b/horse/global/skill.go @@ -2,7 +2,7 @@ package global // Automatically generated with horsegen; DO NOT EDIT -import . "git.sunturtle.xyz/zephyr/horse/go" +import . "git.sunturtle.xyz/zephyr/horse/horse" const ( SkillWarningShot SkillID = 10071 // Warning Shot! diff --git a/horse/global/skill.kk b/horse/global/skill.kk index c0c0f76..ba4935a 100644 --- a/horse/global/skill.kk +++ b/horse/global/skill.kk @@ -3,7 +3,7 @@ module horse/global/skill // Automatically generated with horsegen; DO NOT EDIT import std/num/decimal -pub import horse/skill-group +pub import horse/global/skill-group // Skill instances. pub type skill diff --git a/go/skill.go b/horse/skill.go similarity index 100% rename from go/skill.go rename to horse/skill.go diff --git a/go/skill_test.go b/horse/skill_test.go similarity index 89% rename from go/skill_test.go rename to horse/skill_test.go index e412246..3b1163d 100644 --- a/go/skill_test.go +++ b/horse/skill_test.go @@ -7,8 +7,8 @@ import ( "sync" "testing" - horse "git.sunturtle.xyz/zephyr/horse/go" - "git.sunturtle.xyz/zephyr/horse/go/global" + "git.sunturtle.xyz/zephyr/horse/horse" + "git.sunturtle.xyz/zephyr/horse/horse/global" ) var SortedSkills = sync.OnceValue(func() []horse.Skill { diff --git a/horsegen/main.go b/horsegen/main.go index b8c6826..2b7bbc3 100644 --- a/horsegen/main.go +++ b/horsegen/main.go @@ -20,7 +20,7 @@ func main() { region string ) flag.StringVar(&mdb, "mdb", os.ExpandEnv(`$USERPROFILE\AppData\LocalLow\Cygames\Umamusume\master\master.mdb`), "`path` to Umamusume master.mdb") - flag.StringVar(&out, "o", `.`, "root `dir`ectory for output files") + flag.StringVar(&out, "o", `.\horse`, "`dir`ectory for output files") flag.StringVar(®ion, "region", "global", "region the database is for (global, jp)") flag.Parse() @@ -86,22 +86,18 @@ func main() { os.Exit(1) } - if err := os.MkdirAll(filepath.Join(out, "horse", region), 0775); err != nil { - slog.Error("create koka output dir", slog.Any("err", err)) - os.Exit(1) - } - if err := os.MkdirAll(filepath.Join(out, "go", region), 0775); err != nil { - slog.Error("create go output dir", slog.Any("err", err)) + if err := os.MkdirAll(filepath.Join(out, region), 0775); err != nil { + slog.Error("create output dir", slog.Any("err", err)) os.Exit(1) } eg, ctx = errgroup.WithContext(pctx) eg.Go(func() error { - cf, err := os.Create(filepath.Join(out, "horse", region, "character.kk")) + cf, err := os.Create(filepath.Join(out, region, "character.kk")) if err != nil { return err } - gf, err := os.Create(filepath.Join(out, "go", region, "character.go")) + gf, err := os.Create(filepath.Join(out, region, "character.go")) if err != nil { return err } @@ -109,16 +105,16 @@ func main() { return ExecCharacter(t, region, cf, gf, charas, pairs, trios) }) eg.Go(func() error { - sf, err := os.Create(filepath.Join(out, "horse", region, "skill.kk")) + sf, err := os.Create(filepath.Join(out, region, "skill.kk")) if err != nil { return err } - gf, err := os.Create(filepath.Join(out, "go", region, "skill.go")) + gf, err := os.Create(filepath.Join(out, region, "skill.go")) slog.Info("write skills") return ExecSkill(t, region, sf, gf, sg, skills) }) eg.Go(func() error { - sf, err := os.Create(filepath.Join(out, "horse", region, "skill-group.kk")) + sf, err := os.Create(filepath.Join(out, region, "skill-group.kk")) if err != nil { return err } diff --git a/horsegen/skill.go.template b/horsegen/skill.go.template index d0fc109..280a9bf 100644 --- a/horsegen/skill.go.template +++ b/horsegen/skill.go.template @@ -3,7 +3,7 @@ package {{ $.Region }} // Automatically generated with horsegen; DO NOT EDIT -import . "git.sunturtle.xyz/zephyr/horse/go" +import . "git.sunturtle.xyz/zephyr/horse/horse" {{/* //go:generate go run golang.org/x/tools/cmd/stringer@v0.41.0 -type SkillID -trimprefix Skill -linecomment diff --git a/horsegen/skill.kk.template b/horsegen/skill.kk.template index 88418a0..f8a4c4c 100644 --- a/horsegen/skill.kk.template +++ b/horsegen/skill.kk.template @@ -53,7 +53,7 @@ module horse/{{ $.Region }}/skill // Automatically generated with horsegen; DO NOT EDIT import std/num/decimal -pub import horse/skill-group +pub import horse/{{ $.Region }}/skill-group // Skill instances. pub type skill