Major refactoring
This commit is contained in:
1 parent
92ba3f2b60
commit
a1dda3fd50
8 files changed
+75
-487
No files matched your search
+3
-32
@@ -110,20 +110,19 @@ namespace ZL {
|
||||
|
||||
api.set_function("start_dialogue",
|
||||
[game](const std::string& dialogueId) {
|
||||
/*----r
|
||||
if (!game->requestDialogueStart(dialogueId)) {
|
||||
std::cerr << "[script] start_dialogue failed for id: " << dialogueId << "\n";
|
||||
}*/
|
||||
}
|
||||
});
|
||||
|
||||
api.set_function("set_dialogue_flag",
|
||||
[game](const std::string& flag, int value) {
|
||||
//game->setDialogueFlag(flag, value); ---rrr
|
||||
game->setDialogueFlag(flag, value);
|
||||
});
|
||||
|
||||
api.set_function("get_dialogue_flag",
|
||||
[game](const std::string& flag) {
|
||||
//return game->getDialogueFlag(flag); ---rrr
|
||||
return game->getDialogueFlag(flag);
|
||||
});
|
||||
|
||||
api.set_function("set_navigation_area_available",
|
||||
@@ -255,32 +254,4 @@ namespace ZL {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void ScriptEngine::showInventory(Game* game) {
|
||||
std::cout << "[script] toggle_inventory called" << std::endl;
|
||||
|
||||
bool isVisible = game->menuManager.uiManager.getNodeVisible("inventory_items_panel");
|
||||
game->menuManager.uiManager.setNodeVisible("inventory_items_panel", !isVisible);
|
||||
game->menuManager.uiManager.setNodeVisible("close_inventory_button", !isVisible);
|
||||
|
||||
game->inventoryOpen = !isVisible;
|
||||
|
||||
if (!isVisible) {
|
||||
const auto& items = game->inventory.getItems();
|
||||
std::string itemText;
|
||||
|
||||
if (items.empty()) {
|
||||
itemText = "Inventory (Empty)";
|
||||
}
|
||||
else {
|
||||
itemText = "Inventory (" + std::to_string(items.size()) + " items)\n\n";
|
||||
for (size_t i = 0; i < items.size(); ++i) {
|
||||
itemText += std::to_string(i + 1) + ". " + items[i].name + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
game->menuManager.uiManager.setText("inventory_items_text", itemText);
|
||||
}
|
||||
}*/
|
||||
|
||||
} // namespace ZL
|
||||
Reference in new issue
Block a user