dcsex.env.Mission
Represents a mission table.
Contents
Description
Handles loading a mission table and provides some common ways of accessing the data. Also provides a class method to extract the mission table from a zip.
Methods
mission:loadfile(zfile)
It is assumed the mission is zip compressed.
Parameters
- zfile
- string zip compressed file path
Returns
- a Mission instance ortherwise nil and an error string
mission:groupTable(grp, countryID, dcscategory)
Parameters
- grp
- the group definition
- countryID
- the country the group belongs to, will determine which coalition the group belongs to in game
- dcscategory
- the Unit.Category the group belongs to
Returns
- a table
mission:processCategory(grplist, cattbl, cntryid, dcscategory, logger)
Parameters
- grplist
- [output] list of groups found, indexed by group name
- cattbl
- category table from a mission.coalition table
- cntryid
- country id
- dcscategory
- category from Unit.Category
- logger
- a Logger instance
mission:processCoalition(coatbl, logger)
Parameters
- coatbl
- coalition table, example
env.mission.coalition
- logger
- reference to an env.Logger instance
Returns
- table keyed on group names.
mission:addZone(zonetbl)
Parameters
- zonetbl
- the zone definition to process
mission:addGroup(grp, countryID, dcscategory)
Parameters
- grp
- the group definition
- countryID
- the country the group belongs to, will determine which coalition the group belongs to in game
- dcscategory
- the Unit.Category the group belongs to
Metamethods
mission:__init(miztbl, logger)
Parameters
- miztbl
- logger
Tables
mission.categorymap
The keys are the mission table entries in lower case and the values map the Unit.Category[
Parameters
- [HELICOPTER]
- [SHIP]
- [VEHICLE]
- [PLANE]
- [STATIC]