Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/x/s/xsbs-HEAD/src/pyscripts/MapRotation/maprotation.py   xsbs(Download)
def presetRotate():
	try:
		map = getSuccessor(sbserver.gameMode(), sbserver.mapName())
	except KeyError:
		logging.warning('No map list specified for current mode.  Defaulting to user-specified rotation.')
		clientReloadRotate()
	else:
		sbserver.setMap(map, sbserver.gameMode())
	if sbserver.numClients() == 0:
		rotate_on_join[0] = True
	else:
		try:
			sbserver.playerMessage(cn, info(nextmap_response.substitute(colordict, mapname=getSuccessor(sbserver.gameMode(), sbserver.mapName()))))
		except (KeyError, ValueError):
			sbserver.playerMessage(cn, error('Could not determine next map'))

src/x/s/xsbs-HEAD/src/pyscripts/MapVote/mapvote.py   xsbs(Download)
	elif isAtLeastMaster(cn) and sbserver.masterMode() > 0:
		sbserver.setMap(mapname, mapmode)
	elif mapmode != sbserver.gameMode() and (lock_mode or not allow_modevote):
		p.message(error('You cannot request a new game mode'))
 
	elif isAtLeastMaster(cn) and sbserver.masterMode() > 0:
		setMap(mapname, mapmode)
	elif mapmode != sbserver.gameMode() and (lock_mode or not allow_modevote):
		p.message(error('You cannot vote for a new game mode'))
	else:

src/x/s/xsbs-HEAD/src/pyscripts/DuelMode/duel.py   xsbs(Download)
		elif len(args) == 1:
			map = args[0]
			mode = sbserver.gameMode()
		else:
			sbserver.playerMessage(cn, error('Usage: #duel <mapname> (mode)'))

src/x/s/xsbs-HEAD/src/pyscripts/xsbs/game.py   xsbs(Download)
def currentMode():
	'''Integer value of current game mode'''
	return sbserver.gameMode()
 
def setMap(map_name, mode_number):