mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-24 19:41:08 +01:00
Clean up hopper minecart
This commit is contained in:
parent
ce457eb351
commit
9065170b1c
3 changed files with 7 additions and 23 deletions
|
@ -2,14 +2,9 @@ mcl_entity_invs = {}
|
|||
|
||||
local open_invs = {}
|
||||
|
||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_default",false)
|
||||
local LOG_MODULE = "[Entity Invs]"
|
||||
local function mcl_log (message)
|
||||
if LOGGING_ON and message then
|
||||
minetest.log(LOG_MODULE .. " " .. message)
|
||||
mcl_util.mcl_log (message, "[Entity Invs]")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function check_distance(inv,player,count)
|
||||
for _,o in pairs(minetest.get_objects_inside_radius(player:get_pos(),5)) do
|
||||
|
|
|
@ -7,11 +7,10 @@ local pool = {}
|
|||
local tick = false
|
||||
|
||||
|
||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_default",false)
|
||||
local LOG_MODULE = "[Item entities]"
|
||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_item_entities",false)
|
||||
local function mcl_log (message)
|
||||
if LOGGING_ON and message then
|
||||
minetest.log(LOG_MODULE .. " " .. message)
|
||||
if LOGGING_ON then
|
||||
mcl_util.mcl_log (message, "[Item Entities]", true)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -388,17 +387,7 @@ end
|
|||
|
||||
local function hopper_take_item (self, pos)
|
||||
--mcl_log("self.itemstring: ".. self.itemstring)
|
||||
|
||||
--local current_itemstack = nil
|
||||
--if self.itemstring then
|
||||
-- mcl_log("there is an itemstring")
|
||||
-- current_itemstack = ItemStack(self.itemstring)
|
||||
--else
|
||||
-- mcl_log("no item string")
|
||||
--end
|
||||
|
||||
--mcl_log("self.itemstring: ".. minetest.pos_to_string(pos))
|
||||
--minetest.get_node(pos).name
|
||||
|
||||
local objs = minetest.get_objects_inside_radius(pos, 2)
|
||||
|
||||
|
@ -445,7 +434,7 @@ local function hopper_take_item (self, pos)
|
|||
if not taken_items then
|
||||
local items_remaining = current_itemstack:get_count()
|
||||
|
||||
-- This will take pat of a floating item stack
|
||||
-- This will take part of a floating item stack if no slot can hold the full amount
|
||||
for i = 1, ent._inv_size,1 do
|
||||
local stack1 = inv:get_stack("main", i)
|
||||
|
||||
|
|
|
@ -311,9 +311,9 @@ function mcl_beds.get_bed_top (pos)
|
|||
local bed_top = minetest.get_node(bed_top_pos)
|
||||
|
||||
if bed_top then
|
||||
mcl_log("Has a bed top")
|
||||
--mcl_log("Has a bed top")
|
||||
else
|
||||
mcl_log("No bed top")
|
||||
--mcl_log("No bed top")
|
||||
end
|
||||
return bed_top_pos
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue