updated the areas mod's patch, updated plantlife

master
Vanessa Ezekowitz 2015-07-27 06:22:11 -04:00
parent b80ebe4f45
commit 3c1f4c8c81
3 changed files with 8 additions and 7 deletions

View File

@ -25,8 +25,8 @@ end
function areas:getAreasForArea(pos1, pos2)
local res = {}
if self.store then
local areas = self.store:get_areas_in_area({min = pos1,
max = pos2}, true, false, true)
local areas = self.store:get_areas_in_area(pos1,
pos2, true, false, true)
for store_id, store_area in pairs(areas) do
local id = tonumber(store_area.data)
res[id] = self.areas[id]

View File

@ -26,8 +26,9 @@ local function populateStore(self)
local store_ids = {}
store:reserve(#self.areas)
for id, area in pairs(areas.areas) do
local sid = store:insert_area({min = area.pos1,
max = area.pos2, data = dump(id)})
local sid = store:insert_area(area.pos1,
area.pos2, dump(id))
assert(sid ~= nil) -- if its nil, no id could be found
store_ids[id] = sid
end
self.store = store
@ -65,8 +66,8 @@ function areas:add(owner, name, pos1, pos2, parent)
parent=parent}
-- add to AreaStore
if self.store then
local sid = self.store:insert_area({min = pos1, max = pos2,
data = dump(id)})
local sid = self.store:insert_area(pos1, pos2, dump(id))
assert(sid ~= nil) -- if its nil, no id could be found
self.store_ids[id] = sid
end
return id

@ -1 +1 @@
Subproject commit e110b09920757780e034d41131f2374075be3dce
Subproject commit 273ad9d1da1226a4918b88dd276c47df3f69117b