parent
c521ae3c58
commit
17b3e4e172
1 changed files with 6 additions and 0 deletions
|
@ -104,8 +104,13 @@ function widgets.SkillWidget:new(character, menu_name, skill)
|
|||
label2 = "0" .. label2
|
||||
end
|
||||
end
|
||||
local color = {1, 1, 1}
|
||||
if (self.skilldata.cost > character.abstract.pp) then
|
||||
color = {1, 0.3, 0.3}
|
||||
end
|
||||
|
||||
widgets.SkillWidget.super.new(self, character, menu_name, self.skilldata.fullname, "-" .. label2, "skills")
|
||||
self.color = color
|
||||
end
|
||||
|
||||
function widgets.SkillWidget:sendCharacterData()
|
||||
|
@ -117,6 +122,7 @@ function widgets.SkillWidget:sendCharacterData()
|
|||
core.debug:warning("cbs/menu", "skill " .. self.skillname .. " doesn't exist")
|
||||
self.character:doNothing()
|
||||
self.assets.sfx["mError"]:play()
|
||||
self.scene.turns.hud:showMessage("You haven't enough PP!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue