From 213ce4bc0f01fb69229b837b8c4a9e59e8ea8976 Mon Sep 17 00:00:00 2001 From: Zithia Satazaki Date: Wed, 1 Nov 2023 15:10:34 -0400 Subject: [PATCH] quick pickupToActionBar manipulation --- source/game/scripting/StarPlayerLuaBindings.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/game/scripting/StarPlayerLuaBindings.cpp b/source/game/scripting/StarPlayerLuaBindings.cpp index 7214f02..749b61d 100644 --- a/source/game/scripting/StarPlayerLuaBindings.cpp +++ b/source/game/scripting/StarPlayerLuaBindings.cpp @@ -207,6 +207,9 @@ LuaCallbacks LuaBindings::makePlayerCallbacks(Player* player) { auto itemDatabase = Root::singleton().itemDatabase(); player->inventory()->setItem(slot, itemDatabase->item(ItemDescriptor(item))); }); + + callbacks.registerCallback("pickupToActionBar", []() { return Root::singleton().configuration()->getPath("inventory.pickupToActionBar").toBool(); }); + callbacks.registerCallback("setPickupToActionBar", [](bool b) { Root::singleton().configuration()->setPath("inventory.pickupToActionBar", b); }); callbacks.registerCallback("setDamageTeam", [player](String const& typeName, Maybe teamNumber) { player->setTeam(EntityDamageTeam(TeamTypeNames.getLeft(typeName), teamNumber.value(0)));