mirror of
https://github.com/minetest-mods/digtron.git
synced 2025-01-03 09:37:27 +01:00
No need to test for protection here
This commit is contained in:
parent
9a4713e2e3
commit
6b39a08dab
@ -114,9 +114,6 @@ minetest.register_node("digtron:fuelstore", {
|
|||||||
|
|
||||||
-- Only allow fuel items to be placed in fuel
|
-- Only allow fuel items to be placed in fuel
|
||||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
if minetest.is_protected(pos, player:get_player_name()) then
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
if listname == "fuel" then
|
if listname == "fuel" then
|
||||||
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
|
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
@ -204,9 +201,6 @@ minetest.register_node("digtron:combined_storage", {
|
|||||||
|
|
||||||
-- Only allow fuel items to be placed in fuel
|
-- Only allow fuel items to be placed in fuel
|
||||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
if minetest.is_protected(pos, player:get_player_name()) then
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
if listname == "fuel" then
|
if listname == "fuel" then
|
||||||
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
|
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
|
Loading…
Reference in New Issue
Block a user