feat: add a way to remove equipment
This commit is contained in:
parent
50981a7823
commit
f65edf1924
1 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,14 @@ function CharacterEquip:setEquip(category, name)
|
|||
self.stats = self:createStats()
|
||||
end
|
||||
|
||||
function CharacterEquip:removeEquip(category)
|
||||
if (not utils.string.isEmpty(self.equip[category])) then
|
||||
game.loot:addItem(category, self.equip[category], 1)
|
||||
self.equip[category] = ""
|
||||
self.stats = self:createStats()
|
||||
end
|
||||
end
|
||||
|
||||
function CharacterEquip:predictStat(statName, category, name)
|
||||
local data = itemutils.getItemData(category, name)
|
||||
local boost = data.statsBoost[statName] or 0
|
||||
|
|
Loading…
Reference in a new issue