forked from minetest-mods/moreblocks
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
00187d7ff6 | |||
6a6a22f699 | |||
88726c5913 | |||
cd0d527c8f | |||
3cbc708742 |
@ -242,6 +242,7 @@ function circular_saw.allow_metadata_inventory_put(
|
|||||||
local incost = (incount * 8) + microstack:get_count()
|
local incost = (incount * 8) + microstack:get_count()
|
||||||
local maxcost = (stackmax * 8) + 7
|
local maxcost = (stackmax * 8) + 7
|
||||||
local cost = circular_saw:get_cost(inv, stackname)
|
local cost = circular_saw:get_cost(inv, stackname)
|
||||||
|
if not cost then return 0 end -- NALC Fix crash if cost == nil
|
||||||
if (incost + cost) > maxcost then
|
if (incost + cost) > maxcost then
|
||||||
return math.max((maxcost - incost) / cost, 0)
|
return math.max((maxcost - incost) / cost, 0)
|
||||||
end
|
end
|
||||||
|
@ -49,6 +49,8 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
|||||||
"desert_sandstone_block",
|
"desert_sandstone_block",
|
||||||
"sandstone_block",
|
"sandstone_block",
|
||||||
"coral_skeleton",
|
"coral_skeleton",
|
||||||
|
"ice",
|
||||||
|
"snowblock",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, name in pairs(default_nodes) do
|
for _, name in pairs(default_nodes) do
|
||||||
@ -57,6 +59,11 @@ for _, name in pairs(default_nodes) do
|
|||||||
local ndef = table.copy(minetest.registered_nodes[nodename])
|
local ndef = table.copy(minetest.registered_nodes[nodename])
|
||||||
ndef.sunlight_propagates = true
|
ndef.sunlight_propagates = true
|
||||||
|
|
||||||
|
-- Workaround to fix node orientation (minetest >= 0.4.17.1)
|
||||||
|
if ndef.place_param2 == 0 then
|
||||||
|
ndef.place_param2 = nil
|
||||||
|
end
|
||||||
|
|
||||||
-- Stone and desert_stone drop cobble and desert_cobble respectively.
|
-- Stone and desert_stone drop cobble and desert_cobble respectively.
|
||||||
if type(ndef.drop) == "string" then
|
if type(ndef.drop) == "string" then
|
||||||
ndef.drop = ndef.drop:gsub(".+:", "")
|
ndef.drop = ndef.drop:gsub(".+:", "")
|
||||||
|
Reference in New Issue
Block a user