diff options
Diffstat (limited to 'internal/game/core_validate.go')
| -rw-r--r-- | internal/game/core_validate.go | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/internal/game/core_validate.go b/internal/game/core_validate.go index 0e302c0..b6cb3b9 100644 --- a/internal/game/core_validate.go +++ b/internal/game/core_validate.go @@ -37,16 +37,29 @@ func (g *Game) validationSource() validate.Source { techIDs[t.ID] = true } + moduleElements := make(map[string]bool) + moduleDestinations := make(map[string]int) + for _, m := range AllMods { + if m.Element != "" { + moduleElements[m.Element] = true + } + if m.Destination > 0 { + moduleDestinations[m.ID] = m.Destination + } + } + return validate.Source{ - DataDir: g.DataDir, - Items: g.ItemStore, - Objects: g.ObjectStore, - Mobs: g.MobStore, - World: g.World, - Courses: courseViews, - Techs: techViews, - TechIDs: techIDs, - RootRooms: g.ValidationConfig.RootRooms, - IgnoreUnreachable: g.ValidationConfig.IgnoreUnreachable, + DataDir: g.DataDir, + Items: g.ItemStore, + Objects: g.ObjectStore, + Mobs: g.MobStore, + World: g.World, + Courses: courseViews, + Techs: techViews, + TechIDs: techIDs, + RootRooms: g.ValidationConfig.RootRooms, + IgnoreUnreachable: g.ValidationConfig.IgnoreUnreachable, + ModuleElements: moduleElements, + ModuleDestinations: moduleDestinations, } } |
