dynamic::Value simplified

This commit is contained in:
MihailRis
2024-05-07 18:39:12 +03:00
parent 8e83a07094
commit a4c21984d5
26 changed files with 230 additions and 297 deletions
+3 -3
View File
@@ -387,10 +387,10 @@ void Hud::add(HudElement element) {
auto document = element.getDocument();
if (document) {
auto inventory = invview ? invview->getInventory() : nullptr;
std::vector<std::unique_ptr<Value>> args;
args.push_back(value_of(inventory ? inventory.get()->getId() : 0));
std::vector<Value> args;
args.push_back(inventory ? inventory.get()->getId() : 0);
for (int i = 0; i < 3; i++) {
args.push_back(value_of(static_cast<integer_t>(blockPos[i])));
args.push_back(static_cast<integer_t>(blockPos[i]));
}
scripting::on_ui_open(
element.getDocument(),