whitevo
Feeling good, thats what I do.
I know that if items have different actionID's they do not stack.
However if I create a ice gem [9970] item with Game.createItem() function
and another ice gem with Player.addItem() function.
They can not be stacked?!
Both should have actionID [0]
Although there is an function I have overwritten in Lua: What I assumed caused the problem
But now I'm not so sure, when I change both of these gem ActionID's to 0, they cant be stacked.
However If I changed them to actionID 100, they could be stacked.
creating gems only using createItem function or only with addItem() function allows me to stack them.
So whats the deal here? What am I missing.. Why I cant stack these gems??
However if I create a ice gem [9970] item with Game.createItem() function
and another ice gem with Player.addItem() function.
They can not be stacked?!
Both should have actionID [0]
Although there is an function I have overwritten in Lua: What I assumed caused the problem
Code:
function Item.setActionId(item, AID)
if AID and AID >= 100 then item:setAttribute(ACTIONID, AID) end
if not AID and item:getActionId() >= 100 then item:setAttribute(ACTIONID, 0) end
return item
end
But now I'm not so sure, when I change both of these gem ActionID's to 0, they cant be stacked.
However If I changed them to actionID 100, they could be stacked.
creating gems only using createItem function or only with addItem() function allows me to stack them.
So whats the deal here? What am I missing.. Why I cant stack these gems??
Code:
function createItem(ID, pos, count, AID, fluidType, itemText)
local item
count = count or 1
if not fluidType then
item = Game.createItem(ID, count, pos)
if not item then return end
item:setActionId(AID)
item:setAttribute(TEXT, itemText)
if count > 1 and not item:isStackable() then
for x=1, count-1 do
local item = Game.createItem(ID, 1, pos):setActionId(AID)
item:setAttribute(TEXT, itemText)
end
end
else
for x=1, count do
item = Game.createItem(ID, fluidType, pos)
if not item then return end
item:setActionId(AID)
item:setAttribute(TEXT, itemText)
end
end
return item
end