Skip to content

Commit

Permalink
Fix bug with check protection.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfence committed Jun 24, 2022
1 parent d6806a1 commit dabac3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dye_machine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,11 @@ for color, data in pairs(clothing.basic_colors) do
return false;
end
function dye_machine:cb_allow_metadata_inventory_put(pos, listname, index, stack, player)
local can_put = self:recipe_inventory_can_put(pos, listname, index, stack, player);
local player_name = nil
if player then
player_name = player:get_player_name()
end
local can_put = self:recipe_inventory_can_put(pos, listname, index, stack, player_name);
if (can_put>0) then
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory();
Expand Down
2 changes: 1 addition & 1 deletion mod.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = clothing
tittle = Clothing mod
description = Add clothing to Minetest game. This mod is based on clothing mod from stujones11, bell07, SmallJoker and aerozoic. For available machines and clothes, use this with appliances mod. It is recomended to use this mod with skinsdb modi which makes clothing visible.
description = Add clothing to Minetest game. This mod is based on clothing mod from stujones11, bell07, SmallJoker and aerozoic. For available machines and clothes, use this with appliances mod. It is recomended to use this mod with skinsdb mod which makes clothing visible.
optional_depends = appliances, multiskin, sfinv, creative, inventory_plus, unified_inventory, wool, bucket, default, farming, bonemeal, skeletons, basic_materials

0 comments on commit dabac3f

Please sign in to comment.