D00Med / scifi_nodes

Minetest mod that adds scifi themed nodes
Other
12 stars 18 forks source link

Dark Glass Pane recipe overlaps with strong window panel #48

Closed akozlovskiy119 closed 3 years ago

akozlovskiy119 commented 3 years ago

scifi_nodes:glass_pane and scifi_nodes:windowpanel share the same recipe. I believe the author overlooked this because scifi_nodes:glass_pane is automatically generated from the template.


In octagon_panes.lua: recipe_ingredient evaluates to scifi_nodes:glass:

local function register(basename, description, texture)
=>  local nodename_single = "scifi_nodes:" .. basename .. "_pane"
    local nodename_double = "scifi_nodes:" .. basename .. "_pane_double"
    local nodename_offset = "scifi_nodes:" .. basename .. "_pane_offset"
=>  local recipe_ingredient = "scifi_nodes:" .. basename

    ...

    -- register recipes

    minetest.register_craft({
      output = nodename_single .. " 16",
      recipe = {
=>      {recipe_ingredient}
      },
    })

  ...
end

...
=> register("glass", "Dark Glass pane", "scifi_nodes_glass.png")

At the same time in crafts.lua:

-- https://forum.minetest.net/viewtopic.php?f=10&t=13125&p=261481#p261481
minetest.register_craft({
    output = 'scifi_nodes:windowpanel 4',
    recipe = {
=>      {"scifi_nodes:glass","",""}
    }
})
BuckarooBanzay commented 3 years ago

I believe the author overlooked this

That would be me :hand: ...

What would be the best way to resolve this: change the recipe for scifi_nodes:windowpanel or scifi_nodes:glass_pane? Not sure what is more "realistic" :P

akozlovskiy119 commented 3 years ago

How about 4 x scifi_nodes:glass_pane placed in a square -> 1 x scifi_nodes:windowpanel? This way 1 scifi_nodes:glass would still be equal to 4 scifi_nodes:windowpanel in terms of outcome.

This requires one more crafting step, but considering that it was not craftable before, I think it will not break compatibility with other mods.