I will lead off with a potential (ie. not confirmed) bug. The getObjectTotal function in engine.Map is currently checking for "self(x, y, i)", and if "i" is starting at one then this will actually be checking the terrain and piles of objects will actually only decay the first object in the pile. The following change (using getObject instead of call) should fix that:
Code: Select all
function _M:getObjectTotal(x, y)
-- Compute the map stack position
local i = 1
while self:getObject(x, y, i) do i = i + 1 end
return i - 1
end
This leads me into my development suggestion. I find it frustrating to only realize there is a pile of objects when I physically stand on it. I was thinking about having some sort of visual feedback on the map to identify multiple objects within a tile. The current idea I had was to modify the "if o then" section in engine.Map:updateMap and add another MO with say the number of objects in the tile to the top left corner of the tile.
Code: Select all
if o then
o:getMapObjects(self.tiles, mos, 7)
if self:getObjectTotal(x, y) > 1 then
-- Add an additional MO, but I have no idea how to :-D
end
mm = mm + MM_OBJECT
end
Thoughts?