Fix crash when npc close a door
Comment debug messages
This commit is contained in:
@ -440,7 +440,7 @@ function npc.trade.get_dedicated_trade_offers(self)
|
||||
|
||||
local trade_list = self.trader_data.trade_list
|
||||
|
||||
npc.log("INFO", "NPC Inventory: "..dump(self.inventory))
|
||||
--npc.log("INFO", "NPC Inventory: "..dump(self.inventory))
|
||||
|
||||
for item_name, trade_info in pairs(trade_list) do
|
||||
-- Abort if more than 12 buy or sell offers are made
|
||||
@ -451,8 +451,8 @@ function npc.trade.get_dedicated_trade_offers(self)
|
||||
-- If it is, create a sell offer, else create a buy offer if possible.
|
||||
-- Also, avoid creating sell offers immediately if the item was just bought
|
||||
local item = npc.inventory_contains(self, item_name)
|
||||
minetest.log("Searched item: "..dump(item_name))
|
||||
minetest.log("Found: "..dump(item))
|
||||
--minetest.log("Searched item: "..dump(item_name))
|
||||
--minetest.log("Found: "..dump(item))
|
||||
if item ~= nil and trade_info.last_offer_type ~= npc.trade.OFFER_BUY then
|
||||
-- Check if item can be sold
|
||||
if trade_info.item_sold_count == nil
|
||||
@ -764,4 +764,4 @@ minetest.register_on_player_receive_fields(function (player, formname, fields)
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user