moonstream-to / web3

Moonstream game engine for blockchain games. Lootboxes, crafting, dropper, mini games that will enrich your game economy
20 stars 10 forks source link

Inventory: Add `canEquipPredicate` #330

Open zomglings opened 1 year ago

zomglings commented 1 year ago

This should be an override.

This is so that Inventory subclasses can implement their own equip behavior for various slots.

Signature:

function canEquipPredicate(uint256 tokenID, uint256 slotID, uint256 itemType, address itemAddress, uint256 itemTokenID, uint256 amount) returns (bool);

An example of how this will be used - conditional slots for a character based on its on-chain state. For example, high strength characters may have more storage slots.