diff --git a/darkstat/linker/linker.go b/darkstat/linker/linker.go index a5197f3..722704b 100644 --- a/darkstat/linker/linker.go +++ b/darkstat/linker/linker.go @@ -92,6 +92,8 @@ func (l *Linker) Link() *builder.Builder { ), ) + var infocard_per_good_nickname map[string]configs_export.Infocard = make(map[string]configs_export.Infocard) + for _, base := range data.Bases { // fmt.Println("market_goods, len=", len(base.MarketGoods), " nickname=", base.Nickname, base.Name) build.RegComps( @@ -105,14 +107,17 @@ func (l *Linker) Link() *builder.Builder { front.BaseMarketGoods(base.MarketGoods), ), ) + + for _, good := range base.MarketGoods { + infocard_per_good_nickname[good.Nickname] = good.Infocard + } } - goods := l.configs.GoodsSelEquip - for _, good := range goods { + for good_nickname, infocard := range infocard_per_good_nickname { build.RegComps( builder.NewComponent( - utils_types.FilePath(front.MarketGoodInfocardUrl(good.Nickname)), - front.Infocard(good.Infocard), + utils_types.FilePath(front.MarketGoodInfocardUrl(good_nickname)), + front.Infocard(infocard), ), ) } diff --git a/go.mod b/go.mod index a4513a1..95714bb 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21.1 require ( github.com/a-h/templ v0.2.543 - github.com/darklab8/fl-configs v0.15.0 + github.com/darklab8/fl-configs v0.16.0 github.com/darklab8/go-typelog v0.6.0 github.com/darklab8/go-utils v0.12.0 github.com/yosssi/gohtml v0.0.0-20201013000340-ee4748c638f4 diff --git a/go.sum b/go.sum index 27de9c2..08df170 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,7 @@ github.com/a-h/templ v0.2.543 h1:8YyLvyUtf0/IE2nIwZ62Z/m2o2NqwhnMynzOL78Lzbk= github.com/a-h/templ v0.2.543/go.mod h1:jP908DQCwI08IrnTalhzSEH9WJqG/Q94+EODQcJGFUA= -github.com/darklab8/fl-configs v0.13.1 h1:C/8JD9eVGkxW5PGKwf5Sp7IvopJpbF+5L2v6yNJTHn0= -github.com/darklab8/fl-configs v0.13.1/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY= -github.com/darklab8/fl-configs v0.13.2 h1:HIWrZI4z5PdEba3qkugzz1Ysl7UTJNmvsGTezjivXZw= -github.com/darklab8/fl-configs v0.13.2/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY= -github.com/darklab8/fl-configs v0.14.0 h1:YtK83tiltJpbYd6X8QiLxSIjhFxgBjmXI+IrDSYph60= -github.com/darklab8/fl-configs v0.14.0/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY= -github.com/darklab8/fl-configs v0.15.0 h1:l+G2vlcJG7nhlBx8cuZdQLuDydu4yT0pkUSsTbynPxA= -github.com/darklab8/fl-configs v0.15.0/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY= +github.com/darklab8/fl-configs v0.16.0 h1:eFv++nj/xZt8oc4foRshkVbtR64Bk0XDKSVXH1AqHRg= +github.com/darklab8/fl-configs v0.16.0/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY= github.com/darklab8/go-typelog v0.6.0 h1:Ci8imc7ScXiy5e1qMgf46NyJjrqNLPoIE1gbVe7bxl4= github.com/darklab8/go-typelog v0.6.0/go.mod h1:AwwOf3dkp/tpevHFNbkB+PbwlDrUUgO1CVFkEnj+q5w= github.com/darklab8/go-utils v0.12.0 h1:LxsG3yVNf9W4xyV+tHPOaZB2ewItgM/1BzOXyKFvofs=