Beispiel #1
0
    z=Zone.Zone(name, (x,y), s, g, direction, color=color, type=t)
    z.settings=settings
    m.addZone(team, z)
print("-"*20 + " Respoints settings " + "-"*16)
for i in range(res_num):
    print("Settings for respoint",i+1)
    direction, pos, team=None, None, None
    while(None in [direction, pos, team]):
        try:
            if pos == None:
                x,y=input("Position [x|y]: ").split("|")
                pos=int(x), int(y)
                if len(pos)!=2:
                    raise ValueError()
            if direction == None:
                xdir, ydir=input("Initial drive direction [xdir|ydir]: ").split("|")
                direction=int(xdir), int(ydir)
                if len(direction)!=2:
                    raise ValueError()
            if team==None:
                team=input("Number of team for which the should be used [leave empty if for all teams]: ")
                if team.strip()=="":
                    team=-1
                team=int(team)-1
        except ValueError:
            print("Invalid value entered!")
            continue
        m.addRespoint(pos[0],pos[1],direction[0], direction[1], team)
Mode.modes[m.getEscapedName() ]=m
Mode.saveModes()
Beispiel #2
0
def saveMode(acl, player):
    global data
    Mode.modes[data["mode"].getEscapedName()]=data["mode"]
    Mode.saveModes(modename=data["mode"].getEscapedName())
    Armagetronad.PrintMessage("0x00ff00Saved mode")