elimina 10 NOLINT cognitive-complexity obsolets a map_editor
This commit is contained in:
@@ -433,7 +433,7 @@ void MapEditor::render() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Maneja eventos del editor
|
// Maneja eventos del editor
|
||||||
void MapEditor::handleEvent(const SDL_Event& event) { // NOLINT(readability-function-cognitive-complexity)
|
void MapEditor::handleEvent(const SDL_Event& event) {
|
||||||
// Si el tile picker está abierto, los eventos van a él.
|
// Si el tile picker está abierto, los eventos van a él.
|
||||||
// Excepción: la T lo cierra como toggle (sin tocar el brush).
|
// Excepción: la T lo cierra como toggle (sin tocar el brush).
|
||||||
const auto* kc = KeyConfig::get();
|
const auto* kc = KeyConfig::get();
|
||||||
@@ -1374,7 +1374,7 @@ void MapEditor::updateMousePosition() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Actualiza la información de la barra de estado
|
// Actualiza la información de la barra de estado
|
||||||
void MapEditor::updateStatusBarInfo() { // NOLINT(readability-function-cognitive-complexity)
|
void MapEditor::updateStatusBarInfo() {
|
||||||
if (!statusbar_) { return; }
|
if (!statusbar_) { return; }
|
||||||
|
|
||||||
statusbar_->setMouseTile(mouse_tile_x_, mouse_tile_y_);
|
statusbar_->setMouseTile(mouse_tile_x_, mouse_tile_y_);
|
||||||
@@ -1563,7 +1563,7 @@ auto MapEditor::getAnimationCompletions() const -> std::vector<std::string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Modifica una propiedad del enemigo seleccionado
|
// Modifica una propiedad del enemigo seleccionado
|
||||||
auto MapEditor::setEnemyProperty(const std::string& property, const std::string& value) -> std::string { // NOLINT(readability-function-cognitive-complexity)
|
auto MapEditor::setEnemyProperty(const std::string& property, const std::string& value) -> std::string {
|
||||||
if (!active_) { return "Editor not active"; }
|
if (!active_) { return "Editor not active"; }
|
||||||
if (!hasSelectedEnemy()) { return "No enemy selected"; }
|
if (!hasSelectedEnemy()) { return "No enemy selected"; }
|
||||||
|
|
||||||
@@ -1730,7 +1730,7 @@ auto MapEditor::duplicateEnemy() -> std::string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Modifica una propiedad de la habitación
|
// Modifica una propiedad de la habitación
|
||||||
auto MapEditor::setRoomProperty(const std::string& property, const std::string& value) -> std::string { // NOLINT(readability-function-cognitive-complexity)
|
auto MapEditor::setRoomProperty(const std::string& property, const std::string& value) -> std::string {
|
||||||
if (!active_) { return "Editor not active"; }
|
if (!active_) { return "Editor not active"; }
|
||||||
|
|
||||||
std::string val = toLower(value);
|
std::string val = toLower(value);
|
||||||
@@ -1921,7 +1921,7 @@ auto MapEditor::setRoomProperty(const std::string& property, const std::string&
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Crea una nueva habitación
|
// Crea una nueva habitación
|
||||||
auto MapEditor::createNewRoom(const std::string& direction) -> std::string { // NOLINT(readability-function-cognitive-complexity)
|
auto MapEditor::createNewRoom(const std::string& direction) -> std::string {
|
||||||
if (!active_) { return "Editor not active"; }
|
if (!active_) { return "Editor not active"; }
|
||||||
|
|
||||||
// Validar dirección si se proporcionó
|
// Validar dirección si se proporcionó
|
||||||
@@ -2056,7 +2056,7 @@ auto MapEditor::createNewRoom(const std::string& direction) -> std::string { //
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Elimina la habitación actual
|
// Elimina la habitación actual
|
||||||
auto MapEditor::deleteRoom() -> std::string { // NOLINT(readability-function-cognitive-complexity)
|
auto MapEditor::deleteRoom() -> std::string {
|
||||||
if (!active_) { return "Editor not active"; }
|
if (!active_) { return "Editor not active"; }
|
||||||
|
|
||||||
std::string deleted_name = room_path_;
|
std::string deleted_name = room_path_;
|
||||||
|
|||||||
Reference in New Issue
Block a user