diff options
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)...) |
