Poodletooth-iLand/toontown/ai/HolidayManagerAI.py

30 lines
877 B
Python
Raw Normal View History

2015-03-03 16:10:12 -06:00
from toontown.toonbase import ToontownGlobals
class HolidayManagerAI:
def __init__(self, air):
self.air = air
self.currentHolidays = []
self.xpMultiplier = 1
self.setup()
def setup(self):
holidays = config.GetString('active-holidays','')
if holidays != '':
for holiday in holidays.split(","):
holiday = int(holiday)
self.currentHolidays.append(holiday)
simbase.air.newsManager.setHolidayIdList([self.currentHolidays])
def isHolidayRunning(self, holidayId):
return holidayId in self.currentHolidays
2015-03-03 16:10:12 -06:00
def isMoreXpHolidayRunning(self):
if ToontownGlobals.MORE_XP_HOLIDAY in self.currentHolidays:
self.xpMultiplier = 2
return True
return False
def getXpMultiplier(self):
return self.xpMultiplier