Add 'overworld find-tile' command for locating tile instances across maps

This commit is contained in:
scawful
2025-10-03 14:12:05 -04:00
parent c7a7707d25
commit b6ba7cb572
6 changed files with 349 additions and 3 deletions

View File

@@ -201,6 +201,15 @@ void ModernCLI::SetupCommands() {
}
};
commands_["overworld find-tile"] = {
.name = "overworld find-tile",
.description = "Search overworld maps for a tile ID",
.usage = "z3ed overworld find-tile --tile <tile_id> [--map <map_id>] [--world light|dark|special] [--format json|text]",
.handler = [this](const std::vector<std::string>& args) -> absl::Status {
return HandleOverworldFindTileCommand(args);
}
};
commands_["overworld set-tile"] = {
.name = "overworld set-tile",
.description = "Set a tile in the overworld",
@@ -434,6 +443,11 @@ absl::Status ModernCLI::HandleOverworldGetTileCommand(const std::vector<std::str
return handler.Run(args);
}
absl::Status ModernCLI::HandleOverworldFindTileCommand(const std::vector<std::string>& args) {
OverworldFindTile handler;
return handler.Run(args);
}
absl::Status ModernCLI::HandleOverworldSetTileCommand(const std::vector<std::string>& args) {
OverworldSetTile handler;
return handler.Run(args);