mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-03-22 05:52:30 +01:00
Fixed minor bug and removed TODO commentary
This commit is contained in:
@ -514,21 +514,24 @@ minetest.register_abm({
|
|||||||
local compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability")
|
local compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability")
|
||||||
if compchance == 0 then
|
if compchance == 0 then
|
||||||
hslot = hslot+1
|
hslot = hslot+1
|
||||||
|
if hslot == 6 then return end
|
||||||
compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability")
|
compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability")
|
||||||
if compchance == 0 then
|
if compchance == 0 then
|
||||||
hslot = hslot+1
|
hslot = hslot+1
|
||||||
|
if hslot == 6 then return end
|
||||||
compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability")
|
compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability")
|
||||||
if compchance == 0 then
|
if compchance == 0 then
|
||||||
hslot = hslot+1
|
hslot = hslot+1
|
||||||
|
if hslot == 6 then return end
|
||||||
compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability")
|
compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability")
|
||||||
if compchance == 0 then
|
if compchance == 0 then
|
||||||
hslot = hslot+1
|
hslot = hslot+1
|
||||||
|
if hslot == 6 then return end
|
||||||
compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability")
|
compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- TODO: make it go to next hslot if item isn't compostable
|
|
||||||
if compchance > 0 then
|
if compchance > 0 then
|
||||||
itemcomp[hslot]:take_item()
|
itemcomp[hslot]:take_item()
|
||||||
inv:set_list("main", itemcomp)
|
inv:set_list("main", itemcomp)
|
||||||
|
Reference in New Issue
Block a user