diff options
| author | historia <[not public]> | 2026-09-18 15:16:44 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-18 15:16:44 -0400 |
| commit | 7eab582d8a8ee2af1a6baae7baf0696c7005de2e (patch) | |
| tree | 902bbc8c6e39c9f62f779ca23267714ec420b9f5 /internal/validate/validate.go | |
| parent | 153acb7f644d755c45533b7c5311e3ffa47e8973 (diff) | |
| download | thehouseoficarus-7eab582d8a8ee2af1a6baae7baf0696c7005de2e.tar.gz | |
fix: harden triggers, economy, casino, world data, and admin/net paths
Diffstat (limited to 'internal/validate/validate.go')
| -rw-r--r-- | internal/validate/validate.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/validate/validate.go b/internal/validate/validate.go index 8ca4555..6a05eb6 100644 --- a/internal/validate/validate.go +++ b/internal/validate/validate.go @@ -57,6 +57,13 @@ type Source struct { TechIDs map[string]bool RootRooms []int IgnoreUnreachable []int + // ModuleElements is the set of science module elements present in the data + // (solar/hydro/eco/bio/chaos). A mob weakness matching none can never + // trigger. Nil skips the check (synthetic test sources). + ModuleElements map[string]bool + // ModuleDestinations maps module id to destination room for transport + // modules. A destination that is not a real room soft-locks the player. + ModuleDestinations map[string]int } // Run executes all checks and returns the collected issues. @@ -67,7 +74,7 @@ func Run(s Source) []Issue { {"items", "item"}, {"rooms", "room"}, {"mobs", "mob"}, {"objects", "object"}, {"drops", "drop table"}, {"courses", "course"}, {"modules", "module"}, {"techs", "tech"}, {"help", "help topic"}, - {"triggers", "trigger"}, + {"triggers", "trigger"}, {"hazards", "hazard"}, } { issues = append(issues, validateIDs(s.DataDir, dir.sub, dir.label)...) } @@ -86,6 +93,7 @@ func Run(s Source) []Issue { issues = append(issues, validateRoomTriggers(s)...) issues = append(issues, validateTechs(s)...) issues = append(issues, validateRoomWiring(s)...) + issues = append(issues, validateModuleDestinations(s)...) issues = append(issues, validateRoomGrid(s)...) issues = append(issues, validateExitReciprocity(s)...) |
