def init(): """Performs the one-time initialization of the BUG core and all mods.""" global g_initDone if g_initDone: BugUtil.debug("BugInit - init() already complete") return if not CyGame().isFinalInitialized(): BugUtil.debug("BugInit - game not fully initialized") return global g_initRunning if g_initRunning: BugUtil.warn("BugInit - init() already running") return g_initRunning = True BugUtil.debug("BugInit - initializing...") timer = BugUtil.Timer("BUG init") BugPath.init() timer.log("init paths").start() loadMod("init") BugCore.initDone() timer.log("read configs").start() callInits() timer.log("call inits/events") timer.logTotal() g_initDone = True g_initRunning = False return True
def init(): """Performs the one-time initialization of the BUG core and all mods.""" global g_initDone if g_initDone: BugUtil.warn("BugInit - init() called again") return global g_initRunning if g_initRunning: BugUtil.warn("BugInit - init() already running") return g_initRunning = True BugUtil.debug("BugInit - initializing...") timer = BugUtil.Timer("BUG init") try: # test to see if global context is ready CvUtil.initDynamicFontIcons() except: BugUtil.debug("BugInit - global context not ready") g_initRunning = False return False loadMod("init") BugCore.initDone() timer.log("read configs").start() callInits() timer.log("call inits/events") timer.logTotal() g_initDone = True g_initRunning = False return True
def init(): """Performs the one-time initialization of the BUG core and all mods.""" global g_initDone print "BugInit.init" if g_initDone: print "BugInit.init - already complete" return True BugOptions.initUserSettings() loadMod("init") import BugCore BugCore.initDone() callInits() g_initDone = True CyGlobalContext().setIsBug() return True
def init(): """Performs the one-time initialization of the BUG core and all mods.""" global g_initDone if g_initDone: BugUtil.debug("BugInit - init() already complete") return if not CyGame().isFinalInitialized(): BugUtil.debug("BugInit - game not fully initialized") return # K-Mod. Don't use any BUG features if this is a PitBoss server. if CyGame().isPitbossHost(): BugUtil.debug("BugInit - BUG disabled for PitBoss host") return # K-Mod end global g_initRunning if g_initRunning: BugUtil.warn("BugInit - init() already running") return g_initRunning = True BugUtil.debug("BugInit - initializing...") timer = BugUtil.Timer("BUG init") BugPath.init() timer.log("init paths").start() loadMod("init") BugCore.initDone() timer.log("read configs").start() callInits() timer.log("call inits/events") timer.logTotal() g_initDone = True g_initRunning = False return True