collision map

This commit is contained in:
2026-04-06 20:27:35 +02:00
parent ef04500a44
commit 98715ef3a7
36 changed files with 489 additions and 297 deletions

View File

@@ -707,6 +707,15 @@ static auto cmdEdit(const std::vector<std::string>& args) -> std::string { // N
if (args[1] == "INFO") { return MapEditor::get()->showInfo(show); }
if (args[1] == "GRID") { return MapEditor::get()->showGrid(show); }
}
// EDIT DRAW / EDIT COLLISION
if (args[0] == "DRAW") {
if ((MapEditor::get() == nullptr) || !MapEditor::get()->isActive()) { return "Editor not active"; }
return MapEditor::get()->setEditingCollision(false);
}
if (args[0] == "COLLISION") {
if ((MapEditor::get() == nullptr) || !MapEditor::get()->isActive()) { return "Editor not active"; }
return MapEditor::get()->setEditingCollision(true);
}
// EDIT MAPBG/MAPCONN <color>
if (args[0] == "MAPBG" && args.size() >= 2) {
if ((MapEditor::get() == nullptr) || !MapEditor::get()->isActive()) { return "Editor not active"; }