From 7eab582d8a8ee2af1a6baae7baf0696c7005de2e Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 15:16:44 -0400 Subject: fix: harden triggers, economy, casino, world data, and admin/net paths --- internal/game/core_validate.go | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'internal/game/core_validate.go') 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, } } -- cgit v1.2.3