diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-01-31 19:39:31 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-01-31 19:39:31 -0500 |
commit | 39f5cba27eef35877c91291f518974f34130fcb6 (patch) | |
tree | 117a9d1b7d4ee5f78f73e1216e982c366ed9ecc6 /areas/api.lua | |
parent | 2922421f4a88e56a0a1c819f62bf2bc287835388 (diff) | |
download | dreambuilder_modpack-39f5cba27eef35877c91291f518974f34130fcb6.tar dreambuilder_modpack-39f5cba27eef35877c91291f518974f34130fcb6.tar.gz dreambuilder_modpack-39f5cba27eef35877c91291f518974f34130fcb6.tar.bz2 dreambuilder_modpack-39f5cba27eef35877c91291f518974f34130fcb6.tar.xz dreambuilder_modpack-39f5cba27eef35877c91291f518974f34130fcb6.zip |
Huge update - lots of mods:
areas, biome_lib, blox, bobblocks, boost_cart, homedecor, mobs,
coloredwood, ilights, inbox, item_tweaks, moreblocks, moreores,
pipeworks, plasticbox, signs_lib, stainedglass, roads, unifieddyes,
vines, worldedit, xban2, maybe some others I didn't think about ;-)
Diffstat (limited to 'areas/api.lua')
-rw-r--r-- | areas/api.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/areas/api.lua b/areas/api.lua index e8b9c7a..730e96d 100644 --- a/areas/api.lua +++ b/areas/api.lua @@ -1,7 +1,23 @@ +local hudHandlers = {} + +--- Adds a function as a HUD handler, it will be able to add items to the Areas HUD element. +function areas:registerHudHandler(handler) + table.insert(hudHandlers, handler) +end + + +function areas:getExternalHudEntries(pos) + local areas = {} + for _, func in pairs(hudHandlers) do + func(pos, areas) + end + return areas +end --- Returns a list of areas that include the provided position. function areas:getAreasAtPos(pos) local res = {} + if self.store then local a = self.store:get_areas_for_pos(pos, false, true) for store_id, store_area in pairs(a) do |