mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 04:32:33 -06:00
Don't hide laff meter based on full hp
This commit is contained in:
parent
8262d5afa4
commit
90a8e5a2f2
2 changed files with 2 additions and 11 deletions
|
@ -6,7 +6,7 @@ from toontown.toonbase import ToontownIntervals
|
||||||
class LaffMeter(DirectFrame):
|
class LaffMeter(DirectFrame):
|
||||||
deathColor = Vec4(0.58039216, 0.80392157, 0.34117647, 1.0)
|
deathColor = Vec4(0.58039216, 0.80392157, 0.34117647, 1.0)
|
||||||
|
|
||||||
def __init__(self, avdna, hp, maxHp, hideFull=False):
|
def __init__(self, avdna, hp, maxHp):
|
||||||
DirectFrame.__init__(self, relief=None, sortOrder=50)
|
DirectFrame.__init__(self, relief=None, sortOrder=50)
|
||||||
self.initialiseoptions(LaffMeter)
|
self.initialiseoptions(LaffMeter)
|
||||||
self.container = DirectFrame(parent=self, relief=None)
|
self.container = DirectFrame(parent=self, relief=None)
|
||||||
|
@ -14,7 +14,6 @@ class LaffMeter(DirectFrame):
|
||||||
self.av = None
|
self.av = None
|
||||||
self.hp = hp
|
self.hp = hp
|
||||||
self.maxHp = maxHp
|
self.maxHp = maxHp
|
||||||
self.hideFull = hideFull
|
|
||||||
self.__obscured = 0
|
self.__obscured = 0
|
||||||
if self.style.type == 't':
|
if self.style.type == 't':
|
||||||
self.isToon = 1
|
self.isToon = 1
|
||||||
|
@ -166,14 +165,6 @@ class LaffMeter(DirectFrame):
|
||||||
self.adjustText()
|
self.adjustText()
|
||||||
if not quietly:
|
if not quietly:
|
||||||
self.animatedEffect(delta)
|
self.animatedEffect(delta)
|
||||||
self.checkVisibility()
|
|
||||||
|
|
||||||
def checkVisibility(self):
|
|
||||||
if self.hideFull:
|
|
||||||
if self.hp >= self.maxHp:
|
|
||||||
self.hide()
|
|
||||||
else:
|
|
||||||
self.show()
|
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
if self.av:
|
if self.av:
|
||||||
|
|
|
@ -3019,7 +3019,7 @@ class Toon(Avatar.Avatar, ToonHead):
|
||||||
if self.headMeter:
|
if self.headMeter:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.headMeter = LaffMeter.LaffMeter(self.style, self.getHp(), self.getMaxHp(), True)
|
self.headMeter = LaffMeter.LaffMeter(self.style, self.getHp(), self.getMaxHp())
|
||||||
self.headMeter.av = self
|
self.headMeter.av = self
|
||||||
self.headMeter.reparentTo(self)
|
self.headMeter.reparentTo(self)
|
||||||
self.headMeter.setPos(0, 0, self.getHeight() + 1.3)
|
self.headMeter.setPos(0, 0, self.getHeight() + 1.3)
|
||||||
|
|
Loading…
Reference in a new issue