Skip to content

Commit

Permalink
Update documentation block
Browse files Browse the repository at this point in the history
  • Loading branch information
narc0tiq committed Apr 11, 2019
1 parent a2f408c commit ecb4db3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libs/ore_tracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
Provides two major helpers:
- add_entity(), which will store an entity's particulars and provide a
cache key to allow retrieving its data quickly, and
- get_entity(), which will retrieve the entity's data (position and
resource_amount), as well as a link back to the entity itself.
- get_entity_cache(), which will retrieve a table indexed by the
previously-mentioned cache key, containing data about the stored entity
(position, resource_amount, and a reference to the entity itself).
Internally, the ore tracker also continually iterates its entities and
updates the cache with their resource_amount, to allow callers to avoid
having to query the entity directly (thus, not crossing the Lua/C++
boundary unnecessarily).
Requires an `on_load` and `on_tick`, and relies on the setting
'YARM-entities-per-tick' to control the updates.
'YARM-entities-per-tick' to control the rate of updates.
]]--

Expand Down

0 comments on commit ecb4db3

Please sign in to comment.