#include "validator.h" #include #include "proto/human.pb.h" #include "structs.h" #include "util/identifiers.h" namespace com::fourisland::lingo2_archipelago { namespace { void ValidateMap(const std::string& map_name, const MapInfo& map_info) { for (const auto& [node_path, node_info] : map_info.game_nodes) { if (node_info.uses > 1) { std::cout << "Map " << map_name << " node " << node_path << " is used in multiple places." << std::endl; } else if (node_info.uses == 0) { std::cout << "Map " << map_name << " node " << node_path << " is not used." << std::endl; } if (!node_info.defined) { std::cout << "Map " << map_name << " node " << node_path << " is not defined in the game file." << std::endl; } } } void ValidateRoom(const RoomIdentifier& room_identifier, const RoomInfo& room_info) { if (room_info.definitions.empty()) { std::cout << "Room " << room_identifier.ShortDebugString() << " has no definition, but was referenced:" << std::endl; for (const DoorIdentifier& door_identifier : room_info.doors_referenced_by) { std::cout << " DOOR " << door_identifier.ShortDebugString() << std::endl; } for (const PanelIdentifier& panel_identifier : room_info.panels_referenced_by) { std::cout << " PANEL " << panel_identifier.ShortDebugString() << std::endl; } for (const HumanConnection& connection : room_info.connections_referenced_by) { std::cout << " CONNECTION " << connection.ShortDebugString() << std::endl; } } else if (room_info.definitions.size() > 1) { std::cout << "Room " << room_identifier.ShortDebugString() << " was defined multiple times." << std::endl; } } void ValidateDoor(const DoorIdentifier& door_identifier, const DoorInfo& door_info) { if (door_info.definitions.empty()) { std::cout << "Door " << door_identifier.ShortDebugString() << " has no definition, but was referenced:" << std::endl; for (const DoorIdentifier& other_door_identifier : door_info.doors_referenced_by) { std::cout << " DOOR " << other_door_identifier.ShortDebugString() << std::endl; } for (const PanelIdentifier& panel_identifier : door_info.panels_referenced_by) { std::cout << " PANEL " << panel_identifier.ShortDebugString() << std::endl; } for (const PaintingIdentifier& painting_identifier : door_info.paintings_referenced_by) { std::cout << " PAINTING " << painting_identifier.ShortDebugString() << std::endl; } for (const PortIdentifier& port_identifier : door_info.ports_referenced_by) { std::cout << " PORT " << port_identifier.ShortDebugString() << std::endl; } for (const HumanConnection& connection : door_info.connections_referenced_by) { std::cout << " CONNECTION " << connection.ShortDebugString() << std::endl; } } else if (door_info.definitions.size() > 1) { std::cout << "Door " << door_identifier.ShortDebugString() << " was defined multiple times." << std::endl; } if (door_info.malformed_identifiers.HasAny()) { std::cout << "Door " << door_identifier.ShortDebugString() << " has malformed identifiers:" << std::endl; for (const PaintingIdentifier& painting_identifier : door_info.malformed_identifiers.paintings) { std::cout << " PAINTING " << painting_identifier.ShortDebugString() << std::endl; } for (const PanelIdentifier& panel_identifier : door_info.malformed_identifiers.panels) { std::cout << " PANEL " << panel_identifier.ShortDebugString() << std::endl; } for (const Key
#ifndef TOOLS_VALIDATOR_GODOT_PROCESSOR_H_
#define TOOLS_VALIDATOR_GODOT_PROCESSOR_H_

#include <string>

namespace com::fourisland::lingo2_archipelago {

struct CollectedInfo;

void ProcessGodotData(const std::string& repodir, CollectedInfo& info);

}  // namespace com::fourisland::lingo2_archipelago

#endif /* TOOLS_VALIDATOR_GODOT_PROCESSOR_H_ */