Skip to content
Snippets Groups Projects
Commit 844be54a authored by dg's avatar dg
Browse files

Fix selling unided piles to stores

git-svn-id: http://svn.net-core.org/repos/t-engine4@1414 51575b47-30f0-44d4-a5cc-537603b46e54
parent c342f1a5
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,7 @@ function _M:interact(who)
else
if o:getNumber() > 1 then
local q
q = GetQuantity.new(nil, nil, o:getNumber(), function(qty) self:doSell(who, o, item, qty, d) end)
q = GetQuantity.new(nil, nil, o:getNumber(), function(qty) print("plop", qty) self:doSell(who, o, item, qty, d) end)
game:registerDialog(q)
else
self:doSell(who, o, item, 1, d)
......
......@@ -61,6 +61,8 @@ end
function _M:trySell(who, o, item, nb)
local price = o:getPrice() * self.buy_percent / 100
if price <= 0 or nb <= 0 then return end
-- Id all
o:identify(true)
return nb
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment