quick pickupToActionBar manipulation
This commit is contained in:
parent
38910aeead
commit
213ce4bc0f
@ -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)));
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user