Sokomine / cottages

Minetest mod for building medieval houses
GNU General Public License v3.0
15 stars 19 forks source link

straw not craftable #13

Open Nordall opened 4 years ago

Nordall commented 4 years ago

The crafting recipes in straw.lua don't allow crafting straw. Straw_bales are always turned into straw_mat and vice versa.

I propone a progression starting from straw_mat, produced by the thresh_floor. 6 or 9 straw_mat craft 4 straw, 4 straw craft 1 straw_bale. And vice versa from bale over straw to straw_mat. (The numbers are just examples.)

I need straw for my bunkbed mod. https://forum.minetest.net/viewtopic.php?f=9&t=23684&hilit=bunkbed I like cottages and thought of a simple bed you can stack on each other to save space in small poor farmers cottage.

It may still be possible to craft straw the usual way with 9 harvested strawplants. But I like your implemented logic of threshing_floor and handmill.

orbea commented 4 years ago

This seems to be fixed.

minetest.register_craft({
    output = "cottages:straw_bale",
    recipe = {
        {"cottages:straw_mat"},
        {"cottages:straw_mat"},
        {"cottages:straw_mat"},
    },
})

minetest.register_craft({
    output = "cottages:straw",
    recipe = {
        {"cottages:straw_bale"},
    },
})

minetest.register_craft({
    output = "cottages:straw_bale",
    recipe = {
        {"cottages:straw"},
    },
})

minetest.register_craft({
    output = "cottages:straw_mat 3",
    recipe = {
        {"cottages:straw_bale"},
    },
})

https://github.com/Sokomine/cottages/blob/ccb66008c4b1e9a402b1734641a1239aebd28592/nodes_straw.lua#L557