diff options
Diffstat (limited to 'utils/validate_config.rb')
| -rw-r--r-- | utils/validate_config.rb | 9 |
1 files changed, 8 insertions, 1 deletions
| diff --git a/utils/validate_config.rb b/utils/validate_config.rb index 831fee2..498980b 100644 --- a/utils/validate_config.rb +++ b/utils/validate_config.rb | |||
| @@ -39,11 +39,12 @@ mentioned_doors = Set[] | |||
| 39 | mentioned_panels = Set[] | 39 | mentioned_panels = Set[] |
| 40 | mentioned_sunwarp_entrances = Set[] | 40 | mentioned_sunwarp_entrances = Set[] |
| 41 | mentioned_sunwarp_exits = Set[] | 41 | mentioned_sunwarp_exits = Set[] |
| 42 | mentioned_paintings = Set[] | ||
| 42 | 43 | ||
| 43 | door_groups = {} | 44 | door_groups = {} |
| 44 | 45 | ||
| 45 | directives = Set["entrances", "panels", "doors", "paintings", "sunwarps", "progression"] | 46 | directives = Set["entrances", "panels", "doors", "paintings", "sunwarps", "progression"] |
| 46 | panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt"] | 47 | panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt", "location_name"] |
| 47 | door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "door_group", "include_reduce", "event", "warp_id"] | 48 | door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "door_group", "include_reduce", "event", "warp_id"] |
| 48 | painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] | 49 | painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] |
| 49 | 50 | ||
| @@ -257,6 +258,12 @@ config.each do |room_name, room| | |||
| 257 | unless paintings.include? painting["id"] then | 258 | unless paintings.include? painting["id"] then |
| 258 | puts "#{room_name} :::: Invalid Painting ID #{painting["id"]}" | 259 | puts "#{room_name} :::: Invalid Painting ID #{painting["id"]}" |
| 259 | end | 260 | end |
| 261 | |||
| 262 | if mentioned_paintings.include?(painting["id"]) then | ||
| 263 | puts "Painting #{painting["id"]} is mentioned more than once" | ||
| 264 | else | ||
| 265 | mentioned_paintings.add(painting["id"]) | ||
| 266 | end | ||
| 260 | else | 267 | else |
| 261 | puts "#{room_name} :::: Painting is missing an ID" | 268 | puts "#{room_name} :::: Painting is missing an ID" |
| 262 | end | 269 | end |
