def announcePenalty(driver_name, lap, detail):
    if SERVERS and any(ac.getServerName().startswith(x) for x in SERVERS):
        try:
            ac.sendChatMessage(APP_NAME + " %s : %s penalty on Lap: %d: %s" %
                               (VERSION, driver_name, lap, detail))
        except Exception as e:
            ac.log(APP_NAME + ": Error in announce penalty: %s" % e)
def announceTotalPenalty(driver_name, lap):
    if SERVERS and any(ac.getServerName().startswith(x) for x in SERVERS):
        global totalPenalty
        ac.sendChatMessage(
            APP_NAME +
            " %s : %s ended Lap: %d with total penalty of %d seconds." %
            (VERSION, driver_name, lap, totalPenalty))
def announceStart():
    if SERVERS and any(ac.getServerName().startswith(x) for x in SERVERS):
        driver_name = ac.getDriverName(0)
        digest = hashlib.md5(
            open("apps/python/%s/%s.py" % (APP_NAME, APP_NAME),
                 'rb').read()).hexdigest()
        ac.sendChatMessage(APP_NAME + " %s : %s --> %s" %
                           (VERSION, driver_name, digest))
Beispiel #4
0
def acMain(ac_version):
    global appWindow, sharedMem

    appWindow = ac.newApp("SimulatorController")

    ac.setTitle(appWindow, "SimulatorController")
    ac.setSize(appWindow, 300, 40)

    sharedmem = sharedMem.getsharedmem()
    sharedmem.serverName = ac.getServerName().encode('utf-8')
    sharedmem.acInstallPath = os.path.abspath(os.curdir).encode('utf-8')
    sharedmem.isInternalMemoryModuleLoaded = libInit
    sharedmem.pluginVersion = pluginVersion.encode('utf-8')
    return "SimulatorController"
Beispiel #5
0
def acMain(ac_version):
  global appWindow,sharedMem

  appWindow = ac.newApp("CrewChiefEx")

  ac.setTitle(appWindow, "CrewChiefEx")
  ac.setSize(appWindow, 300, 40)

  ac.log("CrewChief Was Here! damage report ?")
  ac.console("CrewChief Was Here! damage report ?")

  sharedmem = sharedMem.getsharedmem()
  sharedmem.serverName = ac.getServerName().encode('utf-8')

  return "CrewChiefEx"
Beispiel #6
0
def acMain(ac_version):
    global appWindow, sharedMem

    appWindow = ac.newApp("SecondMonitorEx")

    ac.setTitle(appWindow, "SecondMonitorEx")
    ac.setSize(appWindow, 300, 40)

    ac.log("SecondMonitor Shared memory Initialized")
    ac.console("SecondMonitor Shared memory Initialized")

    sharedmem = sharedMem.getsharedmem()
    sharedmem.serverName = ac.getServerName().encode('utf-8')
    sharedmem.acInstallPath = os.path.abspath(os.curdir).encode('utf-8')
    sharedmem.pluginVersion = pluginVersion.encode('utf-8')
    return "SecondMonitorEx"
Beispiel #7
0
def acMain(ac_version):
    global appWindow, sharedMem

    appWindow = ac.newApp("CrewChiefEx")

    ac.setTitle(appWindow, "CrewChiefEx")
    ac.setSize(appWindow, 300, 40)

    ac.log("CrewChief Was Here! damage report ?")
    ac.console("CrewChief Was Here! damage report ?")

    sharedmem = sharedMem.getsharedmem()
    sharedmem.serverName = ac.getServerName().encode('utf-8')
    sharedmem.acInstallPath = os.path.abspath(os.curdir).encode('utf-8')
    sharedmem.isInternalMemoryModuleLoaded = libInit
    sharedmem.pluginVersion = pluginVersion.encode('utf-8')
    return "CrewChiefEx"
Beispiel #8
0
 def name(self):
     return ac.getServerName()