quick pickupToActionBar manipulation

This commit is contained in:
Zithia Satazaki 2023-11-01 15:10:34 -04:00
parent 38910aeead
commit 213ce4bc0f

View File

@ -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<uint16_t> teamNumber) {
player->setTeam(EntityDamageTeam(TeamTypeNames.getLeft(typeName), teamNumber.value(0)));