1#ifndef YAZE_SRC_CLI_HANDLERS_DUNGEON_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_DUNGEON_COMMANDS_H_
15 std::string
GetName()
const {
return "dungeon-list-sprites"; }
17 return "List all sprites in a dungeon room";
20 return "dungeon-list-sprites --room <room_id> [--sprite-registry <path>] "
21 "[--format <json|text>]";
37 std::string
GetName()
const {
return "dungeon-describe-room"; }
39 return "Get detailed description of a dungeon room";
42 return "dungeon-describe-room --room <room_id> [--sprite-registry <path>] "
43 "[--format <json|text>]";
59 std::string
GetName()
const {
return "dungeon-list-chests"; }
61 return "List chest contents for dungeon rooms";
64 return "dungeon-list-chests [--room <room_id>] [--format <json|text>]";
69 return absl::OkStatus();
81 std::string
GetName()
const {
return "dungeon-get-entrance"; }
83 return "Get entrance metadata for a dungeon room";
86 return "dungeon-get-entrance --entrance <entrance_id> [--spawn] "
87 "[--format <json|text>]";
103 std::string
GetName()
const {
return "dungeon-export-room"; }
105 return "Export room data to JSON format";
108 return "dungeon-export-room --room <room_id> [--format <json|text>]";
124 std::string
GetName()
const {
return "dungeon-list-objects"; }
126 return "List all objects in a dungeon room";
129 return "dungeon-list-objects --room <room_id> [--format <json|text>]";
145 std::string
GetName()
const {
return "dungeon-get-room-tiles"; }
147 return "Get tile data for a dungeon room";
150 return "dungeon-get-room-tiles --room <room_id> [--format <json|text>]";
166 std::string
GetName()
const {
return "dungeon-set-room-property"; }
168 return "Set a property on a dungeon room";
171 return "dungeon-set-room-property --room <room_id> --property <property> "
172 "--value <value> [--format <json|text>]";
176 return parser.
RequireArgs({
"room",
"property",
"value"});
188 std::string
GetName()
const {
return "dungeon-room-header"; }
190 return "Read raw room header bytes for debugging ROM address issues";
193 return "dungeon-room-header --room <room_id> [--format <json|text>]";
214 std::string
GetName()
const {
return "dungeon-generate-track-collision"; }
216 return "Generate collision overlay from rail objects for minecart rooms";
219 return "dungeon-generate-track-collision --room <room_id> | "
220 "--rooms <hex,hex,...> "
221 "[--write] [--preserve-stops] [--visualize] [--promote-switch X,Y] "
222 "[--project-context <path.yaze|path.yazeproj>] "
223 "[--format <json|text>]";
228 if (parser.
GetString(
"room").has_value() ||
230 return absl::OkStatus();
232 return absl::InvalidArgumentError(
"Either --room or --rooms is required");
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Command handler for describing a dungeon room.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const
Get the command name.
std::string GetUsage() const
Get the command usage string.
Command handler for exporting room data.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const
Get the command usage string.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetDescription() const
std::string GetName() const
Get the command name.
Generate track collision data from rail objects in a room.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const
Get the command usage string.
std::string GetDescription() const
Command handler for inspecting a dungeon entrance.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const
Get the command usage string.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const
Get the command name.
Command handler for getting room tiles.
std::string GetUsage() const
Get the command usage string.
std::string GetDescription() const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const
Get the command name.
Command handler for listing chest items in dungeon rooms.
std::string GetName() const
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &) override
Validate command arguments.
std::string GetUsage() const
Get the command usage string.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetDescription() const
Command handler for listing objects in a room.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const
Get the command name.
std::string GetUsage() const
Get the command usage string.
std::string GetDescription() const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
Command handler for listing sprites in a dungeon room.
std::string GetDescription() const
std::string GetName() const
Get the command name.
std::string GetUsage() const
Get the command usage string.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
Command handler for reading raw room header bytes (diagnostic)
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const
Get the command name.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const
Get the command usage string.
std::string GetDescription() const
Command handler for setting room properties.
std::string GetUsage() const
Get the command usage string.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const
Get the command name.
Utility for parsing common CLI argument patterns.
std::optional< std::string > GetString(const std::string &name) const
Parse a named argument (e.g., –format=json or –format json)
absl::Status RequireArgs(const std::vector< std::string > &required) const
Validate that required arguments are present.
Base class for CLI command handlers.