mt-mods / homedecor_modpack

home decor
Other
2 stars 9 forks source link

more uncraftable items #41

Open wsor4035 opened 2 years ago

wsor4035 commented 2 years ago

total items: 673 ignored items: 281 missing items: 25

https://xkcd.com/1205/

generated by:

minetest.register_chatcommand("hd_test", {
    description = "does stuff, if you cant figure it out, dont use it",
    func = function()
        local valid = {
            homedecor = true,
            building_blocks = true,
            fake_fire = true,
            itemframes = true,
            lavalamp = true,
        }

        local output = {}
        local hd_count, ig_count, missing_count = 0, 0, 0
        for k, v in pairs(minetest.registered_items) do
            if valid[k:split(":")[1]] then
                hd_count = hd_count + 1
                local crafts = minetest.get_all_craft_recipes(k)
                if not crafts then
                    if v.groups and v.groups.not_in_creative_inventory == 1 then
                        ig_count = ig_count + 1
                    else
                        missing_count = missing_count + 1
                        table.insert(output, "* [ ] " .. k)
                    end
                end
            end
        end
        table.insert(output, "total items: " .. hd_count)
        table.insert(output, "ignored items: " .. ig_count)
        table.insert(output, "missing items: " .. missing_count)
        minetest.chat_send_all(dump(output))
        minetest.log("error", dump(output))

        --minetest.get_all_craft_recipes(query item)
    end
})

it may be worth improving this to recursively look through crafts results to validate all node names as well, but see the xkcd, something i slapped together in a few minutes

BuckarooBanzay commented 2 years ago

your snippet is pretty neat, any objections if i use that somewhere else? :smirk:

S-S-X commented 2 years ago

But keep in mind that xkcd does not apply to hobbies so go on and keep working on it 😄

SwissalpS commented 2 years ago

some of these don't need a recipe. e.g. toilet_open -> craft toilet then click on it to open.

BuckarooBanzay commented 2 years ago

some of these don't need a recipe. e.g. toilet_open -> craft toilet then click on it to open.

Then it should fall into the not_in_creative_inventory category i think..

dacmot commented 2 years ago

Note that this check can be made with qa_block. Also it only reports the *_14 items as being uncraftable.

wsor4035 commented 2 years ago

toliet is craftable, it uses groups, probably why it wasnt found

wsor4035 commented 2 years ago

image image glow light 14 is craftable via this way, side note, the glowlight code is rather cursed to read

wsor4035 commented 2 years ago

homedecor:wood_table_large_square homedecor:glass_table_large_square dont seem to exist?

wsor4035 commented 2 years ago

image wall lamp

wsor4035 commented 2 years ago

bed extended fixed https://github.com/mt-mods/homedecor_modpack/commit/a598fa3067e81babeb09f39e42d14a6d720383f4

image

wsor4035 commented 2 years ago

kitchen cabinets are covered by https://github.com/mt-mods/homedecor_modpack/issues/4#issuecomment-1082550588

wsor4035 commented 2 years ago

image desk lamp

wsor4035 commented 2 years ago

tldr it seems most of these are rather cursed crafting paths

ulamthelucky commented 1 year ago

Is there any known reason why the Wall Lamp recipe above that shows up in I3 and Unified Inventory will not show in sfinv / Crafting Guide?

sfinv: image

unified inventory image

wsor4035 commented 1 year ago

@ulamthelucky no idea, out of scope for this issue. probably a bug with sfinv if it works with the other two.

Lazerbeak12345 commented 5 months ago

Craft conflict - partially noted, but now I get the other option between these two (IE OP is now backwards, but still a well known problem.)

My idea is we could do the vertical doors -> drawers -> half thingy instead. (This idea is mostly why I'm bothering to comment).

image image

PS: yes that idea would lead to a very cursed craft order, but at least it isn't conflicting... Alternative might be to copy a slab recipe to get the half one.

monk-afk commented 3 months ago

We faced this issue after switching inventory from Unified Inventory to SFINV. To troubleshoot, a fresh 5.9-dev with only minetest_game, Homedecor plus dependants, and tried first with the sfinv included with minetest_game, and then UI. Screenshots

The recipes are not returned from minetest.get_all_craft_recipes(item_name), regardless of which inventory manager is installed.

I also tried hard-coding the item definitions from the registered_nodes table print(dump(minetest.registered_items[item_name])), also copied the functions to for light on/off, the recipes do show in the sfinv.

That's all i got so far

Niklp09 commented 3 months ago

Confirmed sfinv doesn't show any recipes for Small Glowlight Cube (homedecor:glowlight_small_cube_14), works w/ UI on the same setup.

wsor4035 commented 3 months ago

if i was to guess/take a stab in the dark, see https://github.com/mt-mods/homedecor_modpack/blob/fa3f7f816b18f9aab2df47d05d12d24964817a5e/homedecor_lighting/init.lua#L1886, its probably something to do with the crafts being registered to the alias that sfinv cant handle https://github.com/mt-mods/homedecor_modpack/blob/fa3f7f816b18f9aab2df47d05d12d24964817a5e/homedecor_lighting/init.lua#L1658-L1673

wsor4035 commented 3 months ago

also the issue isnt sfinv, mtg_craftguide is what handles crafts - at least for mtg

wsor4035 commented 3 months ago

verified my guess by adding _14 to the crafts, bug is in mtg_craftguide, please file @monk-afk on the mientest game repo for them to handle aliases.

monk-afk commented 3 months ago

If the aliases are registered before the crafts registrations, the craft recipes work fine. Is this still a mtg issue?

image