posat un poc d'ordre en els comandos de la consola

This commit is contained in:
2026-04-03 07:50:11 +02:00
parent 6faa80eef4
commit 052607873b
4 changed files with 57 additions and 40 deletions

View File

@@ -931,6 +931,18 @@ auto MapEditor::hasSelectedEnemy() const -> bool {
return selected_enemy_ >= 0 && selected_enemy_ < static_cast<int>(room_data_.enemies.size());
}
// Devuelve las propiedades válidas de SET según la selección actual
auto MapEditor::getSetCompletions() const -> std::vector<std::string> {
if (hasSelectedEnemy()) {
return {"ANIMATION", "COLOR", "VX", "VY", "FLIP", "MIRROR"};
}
if (hasSelectedItem()) {
return {"TILE", "COUNTER"};
}
// Room
return {"BGCOLOR", "BORDER", "ITEMCOLOR1", "ITEMCOLOR2", "CONVEYOR", "TILESET", "UP", "DOWN", "LEFT", "RIGHT"};
}
// Modifica una propiedad del enemigo seleccionado
auto MapEditor::setEnemyProperty(const std::string& property, const std::string& value) -> std::string {
if (!active_) { return "Editor not active"; }