Beispiel #1
0
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
Beispiel #2
0
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__(self, filename=None, *args, **kwargs):
     # Initializes the parser by reading options from the named file.
     import os.path
     import BugPath
     super(CvConfigParser, self).__init__(*args, **kwargs)
     BugPath.init()
     if filename != None:
         filenames = [
             os.path.join(os.path.dirname(BugPath._assetFileSearchPaths),
                          filename)
         ]
         self.read(filenames)
Beispiel #4
0
    def __init__(self, filename = None, *args, **kwargs):
        """Initializes the parser by reading options from the named file."""
        super(CvConfigParser, self).__init__(*args, **kwargs)
# Rise of Mankind 2.8 - init paths before searching config files		
        BugPath.init()
#        BugPath.initSearchPaths()
        if (filename != None):
            filenames = [os.path.join(os.path.dirname(dir), filename) 
                for dir in BugPath._assetFileSearchPaths]
#			filenames += [os.path.join(os.path.dirname(dir), filename) 
#				for dir in BugPath.iniFileSearchPaths]
# Rise of Mankind 2.6 end		
			
			# print "filenames\n", filenames
            self.read(filenames)
Beispiel #5
0
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

    import BugPath
    BugPath.init()

    loadMod("init")
    import BugCore
    BugCore.initDone()

    callInits()

    g_initDone = True
    CyGlobalContext().setIsBug(True)

    return True
Beispiel #6
0
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
Beispiel #7
0
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