Module necro.game.level.LevelUtils

Functions

addEntityAttribute (entity, component, field, value, default) Sets an attribute for a specific component/field for the specified entity.
addEntityToInventory (holderEntity, itemEntity) Adds an item entity to the specified holder entity's inventory
getReverseTileIDMap (mappingTable) Converts a level tile ID map into a flat table of session-specific tile IDs which can be indexed directly when loading a level.
lookUpTileIDMapEntry (mappingTable, index) Looks up a single entry in a tile ID mapping table
makeEntity (entityType, x, y) Creates an entity for use in the intermediate level format
newTileIDMap () Creates a level tile ID map, which maps session-dependent tile IDs to a level-specific, dense range of IDs.
setEntityPriceTag (entity, bloodCost, saleCost) Assigns a purchase price to the specified entity


Functions

addEntityAttribute (entity, component, field, value, default)
Sets an attribute for a specific component/field for the specified entity. If a "default" value is supplied, the attribute will not be set if its value equals the default value.

Parameters:

  • entity
  • component
  • field
  • value
  • default
addEntityToInventory (holderEntity, itemEntity)
Adds an item entity to the specified holder entity's inventory

Parameters:

  • holderEntity
  • itemEntity
getReverseTileIDMap (mappingTable)
Converts a level tile ID map into a flat table of session-specific tile IDs which can be indexed directly when loading a level.

Parameters:

  • mappingTable
lookUpTileIDMapEntry (mappingTable, index)
Looks up a single entry in a tile ID mapping table

Parameters:

  • mappingTable
  • index
makeEntity (entityType, x, y)
Creates an entity for use in the intermediate level format

Parameters:

  • entityType
  • x
  • y
newTileIDMap ()
Creates a level tile ID map, which maps session-dependent tile IDs to a level-specific, dense range of IDs.
setEntityPriceTag (entity, bloodCost, saleCost)
Assigns a purchase price to the specified entity

Parameters:

  • entity
  • bloodCost
  • saleCost
generated by LDoc 1.4.6