if the parameter of config.file is not read inside the mod lua code, it will sure not change anything ...
like maybe ... packed into an if, to check if value is set, and then ...
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= 'node' then return itemstack end
return on_place_orientation(itemstack, placer, pointed_thing)
end
-- Derived from original Minetest Game stairs mod
--
-- The function rotates the placed item upside-down when placed against the
-- upper half of a node.
--
-- @param itemstack The itemstack (wielded node)
-- @param placer The placer (usually a player)
-- @param pointed_thing The node that the item is placed against
-- @return The item placement
local on_place_orientation = function (itemstack, placer, pointed_thing)
local under = pointed_thing.under
local above = pointed_thing.above
local param2 = 0
if placer then
local placer_pos = placer:get_pos()
local fpos = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
local fpos = fpos.y % 1
if placer_pos then
param2 = minetest.dir_to_facedir(vector.subtract(above, placer_pos))
end
if under.y - 1 == above.y or (fpos > 0 and fpos < 0.5) or (fpos < -0.5 and fpos > -0.999999999) then
param2 = param2 + 20
if param2 == 21 then
param2 = 23
elseif param2 == 23 then
param2 = 21
end
end
end
return minetest.item_place(itemstack, placer, pointed_thing, param2)
end
It does not cover the “slabs placed in same orientation“ functionality, though.
I think a good way to solve the creative inventory problem would be to add a /saw command that displays the circular saw GUI and remove Stairs+ nodes from the creative inventory in the process. Help is welcome in adding it, see https://github.com/minetest-mods/moreblocks/issues/144.
Calinou wrote:and remove Stairs+ nodes from the creative inventory
Please, please ffs, PLEASE stop messing with the stairs! Damn! Those are not from your mod, so why not simply leave them alone completely? They’re none of your business :)
The circular saw is an amazing feature and permits a great deal of creativity with its variety of shapes. I too am very interested in additional shapes such as the peak, and apex blocks as well as the inverse remains for such, which would be a hollow in a block the shape of the apex, and similarly for the other shape. The apex block is what I am calling a 1-block with 4-sided slope to a center point on the top face of that block. The inclusion of these will add other possibilities for decoration and further creativity.
Now, I hear the issue of 32768 (max int?) in relation to shapes but not being familiar with the inner workings or how things are setup, I am not clear about why it has to be a problem.
However, perhaps a solution in that the "circular saw" (which many say is not accurately named as its depiction in table saw form) could split the shapes into two categories, angled and square, then either the table saw button will pull-in two different tools, displaying all shapes, and actually tie only part to each. The button would not require UI complexity but the backend would have it instead. If the button and display cannot group it all into the display, how about the construction of a table saw enables the gain of both the square tablesaw and the angled one. How ever the mechanics are, if the groups of shapes were divided logically like this, it would allow for adding further shapes. The concept of multiple table saws along with the name change, may make it clearer if this were to become two mods (circ saw as is, plus table saw as described) or if it is a revision change for one mod (ie, with added capability it gets the name change and this is noted by revision number).
I would hope the above concept would also reduce the chance that the 32768 issue is bumped into but as I said, I do not understand how that numerical value relates to the whole of minetest or mods in general, maybe it is related to sqlite/database stuff. I hope I offered a possible solution that can be implemented fairly easily. I would also very very much like to see minetest be better in all ways possible than the corporate purchased version.
table saw has bug where if you click nodes with newly made nodes from the circular saw it deletes the old nodes if 1. they're from [moreblocks], nodes from other mods don't seem to get deleted/overwritten, 2. they're a full stack or a different shape than the one you're trying to place.
apart from that having shift functionality would be very usefull. rn you have to move both input and output manually.
I would hope the above concept would also reduce the chance that the 32768 issue is bumped into but as I said, I do not understand how that numerical value relates to the whole of minetest or mods in general, maybe it is related to sqlite/database stuff.
It was somewhat arbitrary set in early days of Minetest. And now it won’t be fixed forever.
I Think it will be usefull if in the inventory are only the chainsaw and full blocks, beacause there would be a lesser number of nodes. Or is there a option for this? If yes how do i enable it?
I Think it will be usefull if in the inventory are only the chainsaw and full blocks, beacause there would be a lesser number of nodes. Or is there a option for this? If yes how do i enable it?
You can add the following line to your minetest.conf, either using the mod settings menu or by editing it directly:
I need the code to be licensed under zlib to merge it. Do you allow me to use that code under the zlib license?
This would make no sense because the code as a whole is specifically made for my Minor Redefinitions mod which loads the code after all other mods were loaded and then tries to detect the things by string parsing and then overriding the item’s on_place functions.
A much better solution would be adding those functions directly when registering the items.
Since the GPL version 3 and the zlib license are compatible, feel free to use the functions (you need both for the slabs) as foundation for adding the rotation feature back to slabs and stairs and also add it to your own slopes (I just updated the mod so that it does exactly that).
I need the code to be licensed under zlib to merge it. Do you allow me to use that code under the zlib license?
This would make no sense because the code as a whole is specifically made for my Minor Redefinitions mod which loads the code after all other mods were loaded and then tries to detect the things by string parsing and then overriding the item’s on_place functions.
A much better solution would be adding those functions directly when registering the items.
Since the GPL version 3 and the zlib license are compatible, feel free to use the functions (you need both for the slabs) as foundation for adding the rotation feature back to slabs and stairs and also add it to your own slopes (I just updated the mod so that it does exactly that).
AFAIK zlib is more permissive than the GPL, so zlib code is GPL compatible, but GPL code is not zlib compatible. That would mean that Calinou would strictly need to distribute the whole mod as "GPLv3", if he wants to include your code. And I'd guess that's not what you both (or at least Calinou) want.
EDIT: By the way thanks for your changes, that was exactly what we needed on our server. Also the ladders are pretty cool! :)
AFAIK zlib is more permissive than the GPL, so zlib code is GPL compatible, but GPL code is not zlib compatible. That would mean that Calinou would strictly need to distribute the whole mod as "GPLv3", if he wants to include your code.
ModError: Failed to load and run script from /Users/johann/Library/Application Support/minetest/mods/moreblocks/init.lua:
...t.app/Contents/Resources/builtin/common/misc_helpers.lua:480: table index is nil
stack traceback:
...t.app/Contents/Resources/builtin/common/misc_helpers.lua:480: in function 'copy'
...rt/minetest/mods/moreblocks/stairsplus/registrations.lua:106: in main chunk
[C]: in function 'dofile'
...ion Support/minetest/mods/moreblocks/stairsplus/init.lua:82: in main chunk
[C]: in function 'dofile'
...ry/Application Support/minetest/mods/moreblocks/init.lua:21: in main chunk
Check debug.txt for details.
ModError: Failed to load and run script from /Users/johann/Library/Application Support/minetest/mods/moreblocks/init.lua:
...t.app/Contents/Resources/builtin/common/misc_helpers.lua:480: table index is nil
stack traceback:
...t.app/Contents/Resources/builtin/common/misc_helpers.lua:480: in function 'copy'
...rt/minetest/mods/moreblocks/stairsplus/registrations.lua:106: in main chunk
[C]: in function 'dofile'
...ion Support/minetest/mods/moreblocks/stairsplus/init.lua:82: in main chunk
[C]: in function 'dofile'
...ry/Application Support/minetest/mods/moreblocks/init.lua:21: in main chunk
Check debug.txt for details.
Which Minetest version and More Blocks version are you using? More Blocks 2.0.0 and later require Minetest 5.0.0 or later.
ModError: Failed to load and run script from /Users/johann/Library/Application Support/minetest/mods/moreblocks/init.lua:
...t.app/Contents/Resources/builtin/common/misc_helpers.lua:480: table index is nil
stack traceback:
...t.app/Contents/Resources/builtin/common/misc_helpers.lua:480: in function 'copy'
...rt/minetest/mods/moreblocks/stairsplus/registrations.lua:106: in main chunk
[C]: in function 'dofile'
...ion Support/minetest/mods/moreblocks/stairsplus/init.lua:82: in main chunk
[C]: in function 'dofile'
...ry/Application Support/minetest/mods/moreblocks/init.lua:21: in main chunk
Check debug.txt for details.
Which Minetest version and More Blocks version are you using? More Blocks 2.0.0 and later require Minetest 5.0.0 or later.
Then I don't know what could be causing this error, sorry. Try running a new world with only moreblocks enabled, no other mods to see if it's not due to some kind of mod conflict.
I came across this bug a few days ago, i first reported it to the server admin and it seems that the mod is up to date.
As you can see in the screenshot bellow the circular saw gives 8 slabs of 1/16th of a block instead of 16, didn't check the other shapes though as they are a bit more complex to tally up lol
I also checked the issues on github very quickly, this doesn't seem to have been reported yet.
I like this mod, but I don't like the sloped blocks. Is there a easy way to not use them? Looking throught the files I'm afraid it isn't so simple as commenting one line on the init file