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/validate/validate.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'internal/validate/validate.go') 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)...) -- cgit v1.2.3