mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 04:32:33 -06:00
31 lines
898 B
Python
31 lines
898 B
Python
|
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):
|
||
|
if holidayId in self.currentHolidays:
|
||
|
return True
|
||
|
|
||
|
def isMoreXpHolidayRunning(self):
|
||
|
if ToontownGlobals.MORE_XP_HOLIDAY in self.currentHolidays:
|
||
|
self.xpMultiplier = 2
|
||
|
return True
|
||
|
return False
|
||
|
|
||
|
def getXpMultiplier(self):
|
||
|
return self.xpMultiplier
|