quick pickupToActionBar manipulation

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

View File

@ -208,6 +208,9 @@ LuaCallbacks LuaBindings::makePlayerCallbacks(Player* player) {
player->inventory()->setItem(slot, itemDatabase->item(ItemDescriptor(item))); 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) { callbacks.registerCallback("setDamageTeam", [player](String const& typeName, Maybe<uint16_t> teamNumber) {
player->setTeam(EntityDamageTeam(TeamTypeNames.getLeft(typeName), teamNumber.value(0))); player->setTeam(EntityDamageTeam(TeamTypeNames.getLeft(typeName), teamNumber.value(0)));
}); });