[Mod] More Blocks [moreblocks]

PePe
New member
Posts: 2
Joined: Fri Mar 27, 2020 15:57

Re: [Mod] More Blocks [moreblocks]

by PePe » Post

Calinou wrote:
jolotico wrote:Hello, I have a question, how can I make sure that the pieces of blocks do not fill the inventory pages of unified inventory?
Edit the server's minetest.conf file and add the following line at the end:

Code: Select all

moreblocks.stairsplus_in_creative_inventory = false
(...)
Is there a way to choose which parts of items is displayed in unified inventory?

Like i found those parts in the lua:

Code: Select all

stairsplus_microblocks_not_in_creative_inventory
stairsplus_slabs_not_in_creative_inventory
but a line in the config file like this seems not to work:

Code: Select all

moreblocks.stairsplus_microblocks_not_in_creative_inventory = true

User avatar
Festus1965
Member
Posts: 1225
Joined: Sun Jan 03, 2016 11:58
In-game: Thomas Explorer Thailand
Location: Thailand - Chiang Mai (+5-6h to MEZ)
Contact:

Re: [Mod] More Blocks [moreblocks]

by Festus1965 » Post

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 ...

Code: Select all

stairsplus_microblocks_not_in_creative_inventory = minetest.setting_get("stairsplus_microblocks_not_in_creative_inventory"))
Server: still up, see some gamer - but there is a new 1st important thread "climate change" for me.

User avatar
Linuxdirk
Member
Posts: 2516
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] More Blocks [moreblocks]

by Linuxdirk » Post

Calinou wrote:I haven't started working on a fix yet.
The easiest fix would be leaving the stairs alone :)
Calinou wrote:pull requests are welcome :)
I don’t use Github anymore, but having this as on_place function in the node’s definition would rudimentary fix most placement issues.

Code: Select all

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
And then this function:

Code: Select all

-- 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.

zargulthewizard
Member
Posts: 229
Joined: Wed Jul 26, 2017 18:10
In-game: zargul

Re: [Mod] More Blocks [moreblocks]

by zargulthewizard » Post

I need to check my version, but at some point my inventory became WAY overpopulated by every slab type.
May God be with you, always.

User avatar
BuckarooBanzay
Member
Posts: 367
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] More Blocks [moreblocks]

by BuckarooBanzay » Post

zargulthewizard wrote:I need to check my version, but at some point my inventory became WAY overpopulated by every slab type.
Try adding this to you minetest.conf:

Code: Select all

moreblocks.stairsplus_in_creative_inventory = false

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: [Mod] More Blocks [moreblocks]

by Calinou » Post

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.

User avatar
Linuxdirk
Member
Posts: 2516
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] More Blocks [moreblocks]

by Linuxdirk » Post

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 :)

tigersharke
New member
Posts: 5
Joined: Thu Jan 16, 2020 23:09

Re: [Mod] More Blocks [moreblocks]

by tigersharke » Post

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.

Thank you for your time and your hard work.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests