def init(): # events hook host.registerGameStatusHandler(onGameStatusChanged) if host.sgl_getIsAIGame() == 1: host.sh_setEnableCommander(1) else: host.sh_setEnableCommander(1) host.registerHandler("TimeLimitReached", onTimeLimitReached, 1) if g_debug: print "gpm_cq.py initialized"
def init(): # events hook try: host.registerGameStatusHandler(onGameStatusChanged) if host.sgl_getIsAIGame() == 1: host.sh_setEnableCommander(0) else: host.sh_setEnableCommander(1) if g_debug: print "gpm_sl.py initialized" except Error, e: print "init faield "+ str(e)
def init(): # events hook global g_plugin host.registerGameStatusHandler(onGameStatusChanged) if host.sgl_getIsAIGame() == 1: host.sh_setEnableCommander(1) else: host.sh_setEnableCommander(1) host.registerHandler('TimeLimitReached', onTimeLimitReached, 1) if g_debug: print "gpm_cq.py initialized" g_plugin = game.gameplayPlugin.pluginsystem()
def init(): # events hook global g_plugin host.registerGameStatusHandler(onGameStatusChanged) if host.sgl_getIsAIGame() == 1: host.sh_setEnableCommander(1) else: host.sh_setEnableCommander(1) host.registerHandler('TimeLimitReached', onTimeLimitReached, 1) # Reset ticket loss values game.gameplayPlugin.setDefaultTicketLossPerMin(1, game.gameplayPlugin.DEFAULT_TICKET_LOSS_PER_MIN) game.gameplayPlugin.setDefaultTicketLossPerMin(2, game.gameplayPlugin.DEFAULT_TICKET_LOSS_PER_MIN) if g_debug: print "gpm_cq.py initialized" g_plugin = game.gameplayPlugin.pluginsystem()