mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Organic gag display in the battle GUI and better ~trackBonus command
This commit is contained in:
parent
3d5a138a68
commit
6bdc129b67
2 changed files with 8 additions and 4 deletions
|
@ -4878,18 +4878,20 @@ def givePies(pieType, numPies=0):
|
|||
else:
|
||||
target.b_setNumPies(ToontownGlobals.FullPies)
|
||||
|
||||
@magicWord(category=CATEGORY_PROGRAMMER, types=[int])
|
||||
def trackBonus(trackIndex):
|
||||
@magicWord(category=CATEGORY_PROGRAMMER, types=[int, int])
|
||||
def trackBonus(trackIndex, level):
|
||||
"""
|
||||
Modify the invoker's track bonus level.
|
||||
"""
|
||||
invoker = spellbook.getInvoker()
|
||||
if not 0 <= trackIndex < 7:
|
||||
return 'Invalid track index!'
|
||||
if not -1 <= level <= 6:
|
||||
return 'Invalid level!'
|
||||
trackBonusLevel = [0] * 7
|
||||
trackBonusLevel[trackIndex] = 1
|
||||
trackBonusLevel[trackIndex] = level
|
||||
invoker.b_setTrackBonusLevel(trackBonusLevel)
|
||||
return 'Your track bonus level has been set!'
|
||||
return 'Your track bonus level has been set to %s!' % level
|
||||
|
||||
@magicWord(category=CATEGORY_PROGRAMMER, types=[str, str, int])
|
||||
def track(command, track, value=None):
|
||||
|
|
|
@ -126,6 +126,8 @@ class TownBattleToonPanel(DirectFrame):
|
|||
self.gag.setScale(0.8)
|
||||
self.gag.setPos(0, 0, 0.02)
|
||||
self.hasGag = 1
|
||||
if self.avatar is not None and self.avatar.checkGagBonus(track, level):
|
||||
self.gag.setColor((1, 0, 0, 1) if track == 1 and level == 5 else (0, 1, 0, 1))
|
||||
if numTargets is not None and targetIndex is not None and localNum is not None:
|
||||
self.whichText.show()
|
||||
self.whichText['text'] = self.determineWhichText(numTargets, targetIndex, localNum, index)
|
||||
|
|
Loading…
Reference in a new issue