forked from minetest-mods/moreblocks
Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Sys Quatre | 00187d7ff6 | |
sys4-fr | 6a6a22f699 | |
sys4-fr | 88726c5913 | |
sys4-fr | cd0d527c8f | |
sys4-fr | 3cbc708742 |
|
@ -242,6 +242,7 @@ function circular_saw.allow_metadata_inventory_put(
|
|||
local incost = (incount * 8) + microstack:get_count()
|
||||
local maxcost = (stackmax * 8) + 7
|
||||
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
|
||||
return math.max((maxcost - incost) / cost, 0)
|
||||
end
|
||||
|
|
|
@ -49,6 +49,8 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
|||
"desert_sandstone_block",
|
||||
"sandstone_block",
|
||||
"coral_skeleton",
|
||||
"ice",
|
||||
"snowblock",
|
||||
}
|
||||
|
||||
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])
|
||||
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.
|
||||
if type(ndef.drop) == "string" then
|
||||
ndef.drop = ndef.drop:gsub(".+:", "")
|
||||
|
|
Loading…
Reference in New Issue