Register an explict plan in the luaSmartObjects registry.
Gets a list of smart object types.
Gets a list of all smart objects.
Gets the number smart objects of a given type.
Returns the nearest object and plan that satisfies the object_type look up.
Returns an object and plan that satisfies the object_type look up.
Removes all plans of a given object from the luaSmartObjects registry.
Removes all plans of a given type from the luaSmartObjects registry.
Removes an object and its plans from the luaSmartObjects registry.
Description:
This is a framework function that defaults to no-oping unless
self.draw_function_active is set to true. Will draw a line from the
origin to the various smart objects in the world.
Register an explict plan in the luaSmartObjects registry. This allows
a lookup by object_type later on. This is useful in allowing an object
to register multiple planning functions.
Arguments:
- Parameters
-
| object_type | string representation of the type of object that's being registered |
| object | the object that is being registered |
| plan | the planning function that is being registered |
| slots | (optional) the number of individuals that this plan can have executed at once; defaults to -1 (infinite) |
Description:
Register an explict object without a plan in the luaSmartObjects registry. This allows
a lookup by object_type later on.
Arguments:
- Parameters
-
| object_type | string representation of the type of object that's being registered |
| object | the object that is being registered |
| slots | (optional) the number of individuals that this plan can have executed at once; defaults to -1 (infinite) |
Arguments:
- Parameters
-
| object_type | string representation of the type of object that's being removed |
| object | the object that is being removed |
Arguments:
- Parameters
-
| object_type | string representation of the type of object that's being removed |
Arguments:
- Parameters
-
| object | the object that's being removed |
If the object has a slot size specified, then only an object with available
slots will be used. (It's up to the object to increment and decrement
the nslots_in_use field.)
Arguments:
- Parameters
-
| object_type | string representation of the type of object that's searched for |
Returns Multiple Values:
- Returns
- object and planning function on success, nil on failure
If the object has a slot size specified then only an object
with available slots will be used. (It's up to the object to increment
and decrement the nslots_in_use field.)
The object and its plan function are registered in register_plan()
Arguments:
- Parameters
-
| searcher | can be a luaCharacter or a diguyCharacter object |
| object_type | string representation of the type of object that's searched for |
| arg_table | optional list of arguments, described below |
| arg_table["exclusion_list"] | list of objects of the given type to exclude from the search |
| arg_table["max_radius"] | maximum radial distance from searcher of returned object |
| (returns | nil if nothing is that close) |
| arg_table["instance_name"] | must have this instance name |
| num_objects | non-nil if we want to return more than one object |
Returns Multiple Values:
- Returns
- object and planning function on success, nil on failure
-
OR array of objects, sorted nearest to farest
Returns:
- Returns
- size of avail objects
Returns:
- Returns
- table of smart objects
Returns:
- Returns
- table of strings containing type names