mirror of
https://github.com/minetest-mods/drawers.git
synced 2024-11-08 07:53:44 +01:00
fix common luacheck errors
This commit is contained in:
parent
fa8095c6a9
commit
dccb164133
@ -199,7 +199,7 @@ function drawers.drawer_insert_object(pos, node, stack, direction)
|
||||
end
|
||||
|
||||
function drawers.drawer_can_insert_object(pos, node, stack, direction)
|
||||
local drawer_visuals = drawers.drawer_visuals[core.serialize(pos)]
|
||||
local drawer_visuals = drawers.drawer_visuals[core.serialize(pos)]
|
||||
if not drawer_visuals then return false end
|
||||
|
||||
|
||||
|
@ -232,7 +232,7 @@ local function controller_node_timer(pos, elapsed)
|
||||
2: Item is not stackable.
|
||||
3. Item is allowed and there is either an existing drawer for that item with room or an empty drawer.
|
||||
4: Item is allowed, but there is no room.
|
||||
|
||||
|
||||
There are three different possibilities for "current_state".
|
||||
1: "running" which means means it's operating normally.
|
||||
2: "stopped" meaning the controller makes no attempt to put in the item possibly due to being unallowed for various reasons.
|
||||
|
@ -100,7 +100,7 @@ core.register_entity("drawers:visual", {
|
||||
self.meta = core.get_meta(self.drawer_pos)
|
||||
|
||||
-- collisionbox
|
||||
local node = core.get_node(self.drawer_pos)
|
||||
node = core.get_node(self.drawer_pos)
|
||||
local colbox
|
||||
if self.drawerType ~= 2 then
|
||||
if node.param2 == 1 or node.param2 == 3 then
|
||||
@ -221,7 +221,7 @@ core.register_entity("drawers:visual", {
|
||||
end
|
||||
local inv = puncher:get_inventory()
|
||||
if inv == nil then
|
||||
return
|
||||
return
|
||||
end
|
||||
local spaceChecker = ItemStack(self.itemName)
|
||||
if add_stack then
|
||||
@ -231,7 +231,7 @@ core.register_entity("drawers:visual", {
|
||||
return
|
||||
end
|
||||
|
||||
stack = self:take_items(add_stack)
|
||||
local stack = self:take_items(add_stack)
|
||||
if stack ~= nil then
|
||||
-- add removed stack to player's inventory
|
||||
inv:add_item("main", stack)
|
||||
|
Loading…
Reference in New Issue
Block a user