#45 iron_lump is registered as steel_ingot recipe

Open
opened 3 months ago by dekunuts · 6 comments

With the pigiron mod used by MeseCraft, the craft guide claims that a lone iron_lump can be smelted into an Iron Ingot as well as a Steel Ingot. However, it will only smelt into Iron Ingot. It should be removed as a possible recipe for Steel Ingots.

With the pigiron mod used by MeseCraft, the craft guide claims that a lone iron_lump can be smelted into an Iron Ingot as well as a Steel Ingot. However, it will only smelt into Iron Ingot. It should be removed as a possible recipe for Steel Ingots.
MeseCraft commented 3 months ago
Owner

Thanks for the report. Do you have technic installed?

Thanks for the report. Do you have technic installed?
dekunuts commented 3 months ago
Poster

No, I do not have technic or any other mods installed. You can see the recipe is still there for the steel_ingot in mods/MTG/default/craftitems.lua

No, I do not have technic or any other mods installed. You can see the recipe is still there for the steel_ingot in mods/MTG/default/craftitems.lua
dekunuts commented 3 months ago
Poster

The pigiron mod calls minetest.clear_craft to remove the iron_lump -> steel_ingot recipe, as it should, but it doesn't seem to do anything for the craftguide used in MeseCraft.

It does work with the default mtg_craftguide mod used in the base minetest game though. It looks like the craftguide mod used in MeseCraft is one that was discontinued some time ago. I'm not familiar with it, but if it needs to keep this craftguide mod then maybe the recipe can still be hidden with its own API call instead.

The pigiron mod calls minetest.clear_craft to remove the iron_lump -> steel_ingot recipe, as it should, but it doesn't seem to do anything for the craftguide used in MeseCraft. It does work with the default mtg_craftguide mod used in the base minetest game though. It looks like the craftguide mod used in MeseCraft is one that was discontinued some time ago. I'm not familiar with it, but if it needs to keep this craftguide mod then maybe the recipe can still be hidden with its own API call instead.
dekunuts commented 3 months ago
Poster

From what I can tell, the craftguide mod is providing the clear_craft function but it only handles string parameters and not tables.

If the clear_craft function is passed a table then it just returns, doing nothing. The code just has a note that says "TODO".

The pigiron mod passes a table, and so the recipe remains in the guide.

From what I can tell, the <code>craftguide</code> mod is providing the <code>clear_craft</code> function but it only handles string parameters and not tables. If the <code>clear_craft</code> function is passed a table then it just returns, doing nothing. The code just has a note that says "TODO". The <code>pigiron</code> mod passes a table, and so the recipe remains in the guide.
dekunuts commented 3 months ago
Poster

I hacked together a fix for the craftguide file. I don't know if it is the most efficient way to do it or if it can handle every recipe definition passed to clear_craft, but it works for this case and may be a good place to start.

I hacked together a fix for the craftguide file. I don't know if it is the most efficient way to do it or if it can handle every recipe definition passed to clear_craft, but it works for this case and may be a good place to start.

The correct method to do this is to use minetest.clear_craft() or to remove recipe from the default mod, since we are forking the default mod anyways.

Keep in mind that it is possible we change the inventory, either with modification or replacement

The correct method to do this is to use minetest.clear_craft() or to remove recipe from the default mod, since we are forking the default mod anyways. Keep in mind that it is possible we change the inventory, either with modification or replacement
Sign in to join this conversation.
No Label
No Milestone
No assignee
3 Participants
Loading...
Cancel
Save
There is no content yet.