![]() |
VR-Forces 5.0.3 Developer's Guide
|
Typedefs | |
| typedef luabind::object(* | rwToLuaBindObjectFcn )(const DtReaderWriter *rw, lua_State *L) |
Functions | |
| luabind::object | luaGetEntityParam (lua_State *L, const DtScriptVrfObject &entity, std::string const ¶mName) |
| luabind::object | luaGetSystemAttribute (const DtScriptComponentSystem &system, const std::string &attributeName, bool *error, lua_State *L) |
| luabind::object | luaGetContactInfo (lua_State *L, const DtScriptOwnshipObject &thisEntity, const DtScriptVrfObject &otherEntity) |
| luabind::object | luaGetSubordinateFormation (lua_State *L, const DtScriptOwnshipObject &entity, DtScriptVrfObject &leadSubordinate) |
| std::list< DtVectorOffset3D > | luaGetOptionFormationPositions (lua_State *L, const DtScriptVrfObject &unit, const std::string &formationName, luabind::object const &options, int *leaderIndex) |
| std::list< DtVectorOffset3D > | luaGetFormationPositions (lua_State *L, const DtScriptVrfObject &unit, const std::string &formationName, int *leaderIndex) |
| luabind::object | luaGetParameterSubordinateFunctions (lua_State *L, const DtScriptVrfObject &entity) |
| luabind::object | luaGetSubordinateFunctions (lua_State *L, const DtScriptVrfObject &entity) |
| bool | luaSetSubordinateFunctions (lua_State *L, const DtScriptVrfObject &entity, luabind::object const &subsAndFunctions) |
| std::string | luaGetSubordinateFunction (lua_State *L, const DtScriptVrfObject &entity, const DtScriptVrfObject &subEntity) |
| bool | luaSetSubordinateFunction (lua_State *L, const DtScriptVrfObject &entity, const DtScriptVrfObject &subEntity, const std::string &subFunction) |
| luabind::object | luaGetTargetPriorityList (lua_State *L, const DtScriptOwnshipObject &thisEntity) |
| std::list< DtScriptVrfObject > | luaGetContactsWithFilter (lua_State *L, const DtScriptOwnshipObject &entity, luabind::object const &typeFilters, bool observedOnly) |
| std::list< DtScriptVrfObject > | luaGetContactsWithFilterAliveOnly (lua_State *L, const DtScriptOwnshipObject &entity, luabind::object const &typeFilters, bool observedOnly, bool aliveOnly) |
| std::list< DtScriptVrfObject > | luaGetHostileContactsWithFilterAliveOnly (lua_State *L, const DtScriptOwnshipObject &entity, luabind::object const &typeFilters, bool observedOnly, bool aliveOnly) |
| std::list< DtScriptVrfObject > | luaGetContacts (lua_State *L, const DtScriptOwnshipObject &entity, luabind::object const &typeFilters, luabind::object const &flags) |
| bool | luaSetStateProperty (lua_State *L, DtScriptOwnshipObject &entity, const std::string &propertyName, luabind::object const &prop) |
| bool | luaSetOrAddStateProperty (lua_State *L, DtScriptOwnshipObject &entity, const std::string &propertyName, luabind::object const &prop, bool addIfNotFound) |
| bool | luaSetStatePropertyListItem (lua_State *L, DtScriptOwnshipObject &entity, const std::string &propertyName, luabind::object const &keyValues, luabind::object const &itemValue) |
| bool | luaSetStatePropertyListItemByIndex (lua_State *L, DtScriptOwnshipObject &entity, const std::string &propertyName, int index, luabind::object const &itemValue) |
| bool | luaSetStatePropertyMapItem (lua_State *L, DtScriptOwnshipObject &entity, const std::string &propertyName, luabind::object const &keyValue, luabind::object const &itemValue) |
| luabind::object | luaGetStateProperty (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName) |
| luabind::object | luaGetStateOwnshipProperty (lua_State *L, const DtScriptOwnshipObject &entity, const std::string &propertyName) |
| luabind::object | luaGetStatePropertyListItem (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &keyValues, int &index) |
| luabind::object | luaGetStateOwnshipPropertyListItem (lua_State *L, const DtScriptOwnshipObject &entity, const std::string &propertyName, luabind::object const &keyValues, int &index) |
| luabind::object | luaGetStatePropertyListItemByIndex (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, int index) |
| luabind::object | luaGetStateOwnshipPropertyListItemByIndex (lua_State *L, const DtScriptOwnshipObject &entity, const std::string &propertyName, int index) |
| luabind::object | luaGetStatePropertyMapItem (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &keyValue) |
| luabind::object | luaGetStateOwnshipPropertyMapItem (lua_State *L, const DtScriptOwnshipObject &entity, const std::string &propertyName, luabind::object const &keyValue) |
| luabind::object | luaGetParamProperty (lua_State *L, const DtScriptVrfObject &entity, std::string const ¶mName) |
| luabind::object | luaGetOwnshipParamProperty (lua_State *L, const DtScriptOwnshipObject &entity, std::string const ¶mName) |
| luabind::object | luaGetParameterPropertyListItem (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &keyValues, int &index) |
| luabind::object | luaGetOwnshipParameterPropertyListItem (lua_State *L, const DtScriptOwnshipObject &entity, const std::string &propertyName, luabind::object const &keyValues, int &index) |
| luabind::object | luaGetParameterPropertyListItemByIndex (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, int index) |
| luabind::object | luaGetOwnshipParameterPropertyListItemByIndex (lua_State *L, const DtScriptOwnshipObject &entity, const std::string &propertyName, int index) |
| luabind::object | luaGetParameterPropertyMapItem (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &keyValue) |
| luabind::object | luaGetOwnshipParameterPropertyMapItem (lua_State *L, const DtScriptOwnshipObject &entity, const std::string &propertyName, luabind::object const &keyValue) |
| bool | luaSetSystemAttribute (DtScriptComponentSystem &system, const std::string &attributeName, const luabind::object &value, lua_State *L) |
| static const std::map < DtString, rwToLuaBindObjectFcn > & | rwToLuaBindObjectMap () |
Other functions that are Lua-specific, so not in the VRF class declarations, but do not belong in the interface impl class either. They are used for methods for geometry objects, etc.
///////////////////////////////////////////////////////////////////////!
| typedef luabind::object(* luaScriptInterface::rwToLuaBindObjectFcn)(const DtReaderWriter *rw, lua_State *L) |
| luabind::object luaScriptInterface::luaGetEntityParam | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| std::string const & | paramName | ||
| ) |
| luabind::object luaScriptInterface::luaGetSystemAttribute | ( | const DtScriptComponentSystem & | system, |
| const std::string & | attributeName, | ||
| bool * | error, | ||
| lua_State * | L | ||
| ) |
| luabind::object luaScriptInterface::luaGetContactInfo | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | thisEntity, | ||
| const DtScriptVrfObject & | otherEntity | ||
| ) |
Gets the perceived contact info that this entity has for another entity.
| luabind::object luaScriptInterface::luaGetSubordinateFormation | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| DtScriptVrfObject & | leadSubordinate | ||
| ) |
Gets a table indexed by simObject (subordinates) of position offset relative to the formation leader, position offset relative to unit center, and promotion ID. Also returns the formation leader in the out arguments.
| std::list<DtVectorOffset3D> luaScriptInterface::luaGetOptionFormationPositions | ( | lua_State * | L, |
| const DtScriptVrfObject & | unit, | ||
| const std::string & | formationName, | ||
| luabind::object const & | options, | ||
| int * | leaderIndex | ||
| ) |
Gets a list of offset vectors defining the positions in the formation. Returns the index of the leader position in leaderIndex. The options argument is a table that can contain fields "quantity", "reference", and/or "spacing". Quantity is the number of positions to return, reference is either "unit" or "leader", indicating what the offsets are from, and spacing is the desired space between the leader and its closest follower (all offsets are scaled accordingly).
| std::list<DtVectorOffset3D> luaScriptInterface::luaGetFormationPositions | ( | lua_State * | L, |
| const DtScriptVrfObject & | unit, | ||
| const std::string & | formationName, | ||
| int * | leaderIndex | ||
| ) |
Calls luaGetOptionFormationPositions with empty options.
| luabind::object luaScriptInterface::luaGetParameterSubordinateFunctions | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity | ||
| ) |
Gets a table of entity type and subordinate function handle pairs {{ENTITY_TYPE_STRING, FUNCTION_HANDLE_STRING}}.
| luabind::object luaScriptInterface::luaGetSubordinateFunctions | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity | ||
| ) |
Return a table of {{"subordinate" = DtScriptVrfObject, "function" = string}}.
| bool luaScriptInterface::luaSetSubordinateFunctions | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| luabind::object const & | subsAndFunctions | ||
| ) |
Given a table of {{"subordinate" = DtScriptVrfObject, "function" = string}} Set the state property 'SubordinateFunctions' Return true.
| std::string luaScriptInterface::luaGetSubordinateFunction | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| const DtScriptVrfObject & | subEntity | ||
| ) |
Return a string representing subordinate function for indicated subordinate.
| bool luaScriptInterface::luaSetSubordinateFunction | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| const DtScriptVrfObject & | subEntity, | ||
| const std::string & | subFunction | ||
| ) |
Given a table of {{"subordinate" = DtScriptVrfObject, "function" = string}} Set the state property 'SubordinateFunctions' Return true.
| luabind::object luaScriptInterface::luaGetTargetPriorityList | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | thisEntity | ||
| ) |
Gets the target priority list that this entity has.
| std::list<DtScriptVrfObject> luaScriptInterface::luaGetContactsWithFilter | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| luabind::object const & | typeFilters, | ||
| bool | observedOnly | ||
| ) |
This function supports the script API. It gets the list of contacts matching the given filter and returns it. The Lua API function has a Lua table as an argument, so to decode this, there is a wrapper function for it in the vrfLua module. Gets contacts from the entity's contact list, but filters them by type given the type list argument, and filters out contacts that are created from spot reports only if observedOnly is true.
| std::list<DtScriptVrfObject> luaScriptInterface::luaGetContactsWithFilterAliveOnly | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| luabind::object const & | typeFilters, | ||
| bool | observedOnly, | ||
| bool | aliveOnly | ||
| ) |
Same as luaGetContactsWithFiler but adds a boolean flag to indicate that only non-destroyed entities should be returned.
| std::list<DtScriptVrfObject> luaScriptInterface::luaGetHostileContactsWithFilterAliveOnly | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| luabind::object const & | typeFilters, | ||
| bool | observedOnly, | ||
| bool | aliveOnly | ||
| ) |
This function is the same as luaGetContactsWithFilterAliveOnly, but it returns only hostile contacts.
| std::list<DtScriptVrfObject> luaScriptInterface::luaGetContacts | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| luabind::object const & | typeFilters, | ||
| luabind::object const & | flags | ||
| ) |
Lua "getContacts()" Return a list of contacts matching the given table of entity type filters. Accepts a table of boolean flags, each indexed by a name, such as: {observedOnly=true, aliveOnly=true, hostileOnly=true}.
| bool luaScriptInterface::luaSetStateProperty | ( | lua_State * | L, |
| DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | prop | ||
| ) |
Sets the specified state property with the given value. If the property does not exist or the format of the data is incorrect, returns false.
| bool luaScriptInterface::luaSetOrAddStateProperty | ( | lua_State * | L, |
| DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | prop, | ||
| bool | addIfNotFound | ||
| ) |
Sets the specified state property with the given value. If not found and addIfNotFound is true, then an attempt will be made to add the new property. If the format of the data is incorrect, returns false.
| bool luaScriptInterface::luaSetStatePropertyListItem | ( | lua_State * | L, |
| DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | keyValues, | ||
| luabind::object const & | itemValue | ||
| ) |
Sets a single item in a list state property to the given value. First looks in the list to see if any existing items match the specified key fields and values. If so, the existing item is updated. If not, a new list item is added. If the property does not exist or the format of the data is incorrect, returns false.
| bool luaScriptInterface::luaSetStatePropertyListItemByIndex | ( | lua_State * | L, |
| DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| int | index, | ||
| luabind::object const & | itemValue | ||
| ) |
Finds the item in the list at the specified index and updates it to the new value. If the list is not long enough, new entries are added. Any items added in this way will be given the same value as the new entry. If the property does not exist or the format of the data is incorrect, returns false.
| bool luaScriptInterface::luaSetStatePropertyMapItem | ( | lua_State * | L, |
| DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | keyValue, | ||
| luabind::object const & | itemValue | ||
| ) |
Sets a single item in a map state property to the given value. First looks in the map to see if any existing items match the specified key value. If so, the existing item is updated. If not, a new list item is added. If the property does not exist or the format of the data is incorrect, returns false.
| luabind::object luaScriptInterface::luaGetStateProperty | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| const std::string & | propertyName | ||
| ) |
Returns an object containing the value of the requested state property. May be a table containing a number of fields that make up the property, or a single value. If the property could not be found, the returned table will be empty.
| luabind::object luaScriptInterface::luaGetStateOwnshipProperty | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName | ||
| ) |
| luabind::object luaScriptInterface::luaGetStatePropertyListItem | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | keyValues, | ||
| int & | index | ||
| ) |
Returns an object containing the value of the of an item in the given state property. The state property must be a list. The item returned will have values matching the specified key values in the key fields. The result may be a table containing a number of fields that make up the item, or a single value, depending on the data type of the list items. If the property or list item could not be found, the returned table will be empty. Sets index to be the index of the item, using the Lua convention that the first item is at index 1.
| luabind::object luaScriptInterface::luaGetStateOwnshipPropertyListItem | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | keyValues, | ||
| int & | index | ||
| ) |
| luabind::object luaScriptInterface::luaGetStatePropertyListItemByIndex | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| const std::string & | propertyName, | ||
| int | index | ||
| ) |
Returns an object containing the value of the of an item in the given state property. The state property must be a list. Returns the item at the given index, using the Lua convention that the first item is at index 1. The result may be a table containing a number of fields that make up the item, or a single value, depending on the data type of the list items. If the property or list item could not be found, the returned table will be empty.
| luabind::object luaScriptInterface::luaGetStateOwnshipPropertyListItemByIndex | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| int | index | ||
| ) |
| luabind::object luaScriptInterface::luaGetStatePropertyMapItem | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | keyValue | ||
| ) |
Returns an object containing the value of the of an item in the given state property. The state property must be a map. The item returned will have values matching the specified key value. The result may be a table containing a number of fields that make up the item, or a single value, depending on the data type of the list items. If the property or map item could not be found, the returned table will be empty.
| luabind::object luaScriptInterface::luaGetStateOwnshipPropertyMapItem | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | keyValue | ||
| ) |
| luabind::object luaScriptInterface::luaGetParamProperty | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| std::string const & | paramName | ||
| ) |
Returns an object containing the value of the requested parameter property. May be a table containing a number of fields that make up the property, or a single value. If the property could not be found, the returned table will be empty.
| luabind::object luaScriptInterface::luaGetOwnshipParamProperty | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| std::string const & | paramName | ||
| ) |
| luabind::object luaScriptInterface::luaGetParameterPropertyListItem | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | keyValues, | ||
| int & | index | ||
| ) |
Returns an object containing the value of the of an item in the given parameter property. The property must be a list. The item returned will have values matching the specified key values in the key fields. The result may be a table containing a number of fields that make up the item, or a single value, depending on the data type of the list items. If the property or list item could not be found, the returned table will be empty. Sets index to be the index of the item, using the Lua convention that the first item is at index 1.
| luabind::object luaScriptInterface::luaGetOwnshipParameterPropertyListItem | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | keyValues, | ||
| int & | index | ||
| ) |
| luabind::object luaScriptInterface::luaGetParameterPropertyListItemByIndex | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| const std::string & | propertyName, | ||
| int | index | ||
| ) |
Returns an object containing the value of the of an item in the given parameter property. The property must be a list. Returns the item at the given index, using the Lua convention that the first item is at index 1. The result may be a table containing a number of fields that make up the item, or a single value, depending on the data type of the list items. If the property or list item could not be found, the returned table will be empty.
| luabind::object luaScriptInterface::luaGetOwnshipParameterPropertyListItemByIndex | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| int | index | ||
| ) |
| luabind::object luaScriptInterface::luaGetParameterPropertyMapItem | ( | lua_State * | L, |
| const DtScriptVrfObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | keyValue | ||
| ) |
Returns an object containing the value of the of an item in the given parameter property. The property must be a map. The item returned will have values matching the specified key value. The result may be a table containing a number of fields that make up the item, or a single value, depending on the data type of the list items. If the property or map item could not be found, the returned table will be empty.
| luabind::object luaScriptInterface::luaGetOwnshipParameterPropertyMapItem | ( | lua_State * | L, |
| const DtScriptOwnshipObject & | entity, | ||
| const std::string & | propertyName, | ||
| luabind::object const & | keyValue | ||
| ) |
| bool luaScriptInterface::luaSetSystemAttribute | ( | DtScriptComponentSystem & | system, |
| const std::string & | attributeName, | ||
| const luabind::object & | value, | ||
| lua_State * | L | ||
| ) |
|
static |