Encountered in FNEI 0.3.4
The code that displays entities that could craft a recipe, which also handles phony mining recipes, does not filter out mining entities that could mine a resource-category but have no input fluidbox when one would be required to mine a certain resource. Such a resource would be uranium in vanilla, modded resources like that are many. Notable entities that cannot mine resources that require fluids are 'character' and 'burner-mining-drill'.
Here are the changes to FNEI code that will handle said filtering
FNEI/utils/crafting_category_list.lua ~ line 85, in function CraftCategoty:create_crafting_category_list()
-- A building may be used to mine a certain item
for category, _ in pairs(entity.resource_categories or {}) do
add_category_entry("mine" .. category, { type = "resource-miner", val = item, mining_speed = entity.mining_speed, ifbox = in_fluidbox})
end
In the same function, you should also take a look at character entities, those can also mine resources
-- Add character 'by hand' recipes
You might want to consider the resources that could be mined by said entity, for brevity sake. I reckon that it might not be that useful to a vanilla play, but it is in heavy modded overhauls, at start, to figure out what research is mandatory to get a certain resource.
FNEI/scripts/recipe/gui.lua ~line 293, in function RecipeGui.set_made_in_list(recipe)
elseif cat.type == 'resource-miner' and cat.mining_speed and Settings.get_val("show-recipes", "buildings", cat.val.name) then
-- matching resource-category with mining-category is not enough, entity must have an input fluidbox if resource requires a fluid to be mined
local in_fluidbox_cnt = 0
for _,prot in pairs(recipe.ingredients) do
if prot.type == "fluid" then
in_fluidbox_cnt = in_fluidbox_cnt + 1
end
end
if in_fluidbox_cnt <= (cat.ifbox or 0) then
element = {
type = "choose-elem-button",
name = "item_" .. cat.val.name,
style = "fnei_default_button",
elem_type = "item",
elem_value = cat.val.name,
locked = true
}
-- https://wiki.factorio.com/Mining
caption = round(recipe.mining_time / (cat.mining_speed), 3)
end
end
Here are some screenshots before and after above code changes for a resource that requires a fluid to be mined
Encountered in FNEI 0.3.4 The code that displays entities that could craft a recipe, which also handles phony mining recipes, does not filter out mining entities that could mine a resource-category but have no input fluidbox when one would be required to mine a certain resource. Such a resource would be uranium in vanilla, modded resources like that are many. Notable entities that cannot mine resources that require fluids are 'character' and 'burner-mining-drill'.
Here are the changes to FNEI code that will handle said filtering FNEI/utils/crafting_category_list.lua ~ line 85, in function CraftCategoty:create_crafting_category_list()
In the same function, you should also take a look at character entities, those can also mine resources
-- Add character 'by hand' recipes
You might want to consider the resources that could be mined by said entity, for brevity sake. I reckon that it might not be that useful to a vanilla play, but it is in heavy modded overhauls, at start, to figure out what research is mandatory to get a certain resource.FNEI/scripts/recipe/gui.lua ~line 293, in function RecipeGui.set_made_in_list(recipe)
Here are some screenshots before and after above code changes for a resource that requires a fluid to be mined
Before
After