Пример #1
0
def get_num_foreign_worms():
    ret = 0
    ids = cmd.getWormList()
    if len(ids) < 1:
        return 0  #Ugly error handling
    for id in ids:
        if not worm_is_local(id):
            ret += 1
    return ret
Пример #2
0
def get_num_foreign_worms():
	ret = 0
	ids = cmd.getWormList()
	if len(ids) < 1:
		return 0 #Ugly error handling
	for id in ids:
		if not worm_is_local(id):
			ret += 1	
	return ret
Пример #3
0
def try_start_lobby_countdown():
    global lobby_countdown_started, lobby_countdown_left
    if lobby_countdown_started == False and cmd.getGameState(
    )[0] == "S_SVRLOBBY" and len(
            cmd.getWormList()) >= MIN_PLAYERS_TO_START_GAME:
        lobby_countdown_started = True
        lobby_countdown_left = LOBBY_COUNTDOWN_SECONDS
        cmd.chatMsg("The game will start in %i seconds" %
                    LOBBY_COUNTDOWN_SECONDS)
        return True
    return False
Пример #4
0
def try_start_lobby_countdown():
	global lobby_countdown_started, lobby_countdown_left
	if lobby_countdown_started == False and cmd.getGameState()[0] == "S_SVRLOBBY" and len(cmd.getWormList()) >= MIN_PLAYERS_TO_START_GAME:
		lobby_countdown_started = True
		lobby_countdown_left = LOBBY_COUNTDOWN_SECONDS
		cmd.chatMsg("The game will start in %i seconds" % LOBBY_COUNTDOWN_SECONDS)
		return True
	return False