BigBrotherBot v1.9.0
System Development Information for the BigBrotherBot project.

b3::parsers::frostbite2::util::MapListBlock Class Reference

List of all members.

Public Member Functions

def __init__
def append
def __len__
def __getitem__
def __repr__
def getByName
def getByNameAndGamemode
def getByNameGamemodeAndRounds
def __init__
def append
def __len__
def __getitem__
def __repr__
def getByName
def getByNameAndGamemode
def getByNameGamemodeAndRounds

Private Attributes

 _num_maps
 _num_words
 _map_data

Detailed Description

help extract map list from frostbite data

usage :
    mapList = MapListBlock([2, 3, "MP_001", "ConquestLarge0", 2, "MP_011", "Rush", 3])
    print "num of maps : %s" % len(mapList)
    print "first map name : %s" % mapList[0]['name']
    print "second map gamemode : %s" % mapList[1]['gamemode']
    print "the first 2 maps data : %s" % mapList[0:2]
    print "the first 2 maps num_of_rounds : %s" % [x['num_of_rounds'] for x in mapList[0:2]]
    for p in mapList:
        print p

Constructor & Destructor Documentation

def b3::parsers::frostbite2::util::MapListBlock::__init__ (   self,
  data = None 
)
This describes the set of maps which the server rotates through. 

Format is as follows: 
    <number of maps: integer> - number of maps that follow
    <number of words per map: integer> - number of words per map 
    <map name: string> - name of map 
    <gamemode name: string> - name of gamemode 
    <number of rounds: integer> - number of rounds to play on map before switching

The reason for the <number of words per map> specification is future proofing; 
in the future, DICE might add extra words per map after the first three. However, 
the first three words are very likely to remain the same. 
def b3::parsers::frostbite2::util::MapListBlock::__init__ (   self,
  data = None 
)
This describes the set of maps which the server rotates through. 

Format is as follows: 
    <number of maps: integer> - number of maps that follow
    <number of words per map: integer> - number of words per map 
    <map name: string> - name of map 
    <gamemode name: string> - name of gamemode 
    <number of rounds: integer> - number of rounds to play on map before switching

The reason for the <number of words per map> specification is future proofing; 
in the future, DICE might add extra words per map after the first three. However, 
the first three words are very likely to remain the same. 

Member Function Documentation

def b3::parsers::frostbite2::util::MapListBlock::__getitem__ (   self,
  key 
)
Returns the map data, for provided key (int or slice)
def b3::parsers::frostbite2::util::MapListBlock::__getitem__ (   self,
  key 
)
Returns the map data, for provided key (int or slice)
def b3::parsers::frostbite2::util::MapListBlock::__len__ (   self)
def b3::parsers::frostbite2::util::MapListBlock::__len__ (   self)
def b3::parsers::frostbite2::util::MapListBlock::__repr__ (   self)
def b3::parsers::frostbite2::util::MapListBlock::__repr__ (   self)
def b3::parsers::frostbite2::util::MapListBlock::append (   self,
  data 
)
Parses and appends the maps from raw_data.
data : words as received from the Frostbite2 mapList.list command
def b3::parsers::frostbite2::util::MapListBlock::append (   self,
  data 
)
Parses and appends the maps from raw_data.
data : words as received from the Frostbite2 mapList.list command
def b3::parsers::frostbite2::util::MapListBlock::getByName (   self,
  map_name 
)
Returns a dict with map indexes as keys and map info as values for all maps of given name
def b3::parsers::frostbite2::util::MapListBlock::getByName (   self,
  map_name 
)
Returns a dict with map indexes as keys and map info as values for all maps of given name
def b3::parsers::frostbite2::util::MapListBlock::getByNameAndGamemode (   self,
  map_name,
  gamemode 
)
Returns a dict with map indexes as keys and map info as values for all maps of given name and given gamemode
def b3::parsers::frostbite2::util::MapListBlock::getByNameAndGamemode (   self,
  map_name,
  gamemode 
)
Returns a dict with map indexes as keys and map info as values for all maps of given name and given gamemode
def b3::parsers::frostbite2::util::MapListBlock::getByNameGamemodeAndRounds (   self,
  map_name,
  gamemode,
  num_of_rounds 
)
Returns a dict with map indexes as keys and map info as values for all maps of given name, gamemode and number of rounds
def b3::parsers::frostbite2::util::MapListBlock::getByNameGamemodeAndRounds (   self,
  map_name,
  gamemode,
  num_of_rounds 
)
Returns a dict with map indexes as keys and map info as values for all maps of given name, gamemode and number of rounds

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Properties