As seen in this image, placing an AMS machine into a recycler (image taken with just QA, Quality and the Base Mod) shows an unlocalised message saying that the machine can't be recycled. Please fix this issue, as the category property is OPTIONAL, and the code to create the AMS machines doesn't opt-out of recycling, or use a category banned from recycling such as chemistry or crafting-with-fluid.
Here is the relevant part of the code, where Machine is the entity the mod is making an AMS version of.
Code: Select all
AMSMachineRecipe = {}
AMSMachineRecipe.name = AMSMachineItem.name
AMSMachineRecipe.type = "recipe"
if Machine.localised_name ~= nil and not Machine.localised_name == {} and not Machine.localised_name == "" then
AMSMachineRecipe.localised_name = {"?", {"ams.name", {"?", {"__ENTITY__" .. Machine.name .. "__"}, Machine.localised_name}}, "ams.fallback-name"}
else
AMSMachineRecipe.localised_name = {"?", {"ams.name", {"__ENTITY__" .. Machine.name .. "__"}}, {"ams.fallback-name"}}
end
if Machine.localised_description ~= nil and not Machine.localised_description == {} and not Machine.localised_description == "" then
AMSMachineRecipe.localised_description = {"?", {"ams.description", {"?", {"__ENTITY__" .. Machine.name .. "__"}, Machine.localised_description}}, "ams.fallback-description"}
else
AMSMachineRecipe.localised_description = {"?", {"ams.description", {"__ENTITY__" .. Machine.name .. "__"}}, {"ams.fallback-description"}}
end
if Machine.MachineItem == nil and Machine.minable ~= nil then
if Machine.minable.result ~= nil and Machine.minable.result ~= "" then
AMSMachineRecipe.ingredients = {{type = "item", name = Machine.minable.result, amount = 1}, {type = "item", name = "steel-plate", amount = 10}, {type = "item", name = "copper-cable", amount = 20}}
else
AMSMachineRecipe.ingredients = {{type = "item", name = "electronic-circuit", amount = 1}, {type = "item", name = "steel-plate", amount = 10}, {type = "item", name = "copper-cable", amount = 20}}
end
else
AMSMachineRecipe.ingredients = {{type = "item", name = Machine.MachineItem, amount = 1}, {type = "item", name = "steel-plate", amount = 10}, {type = "item", name = "copper-cable", amount = 20}}
end
if AMSMachineRecipe.ingredients[1]["name"] == nil then
AMSMachineRecipe.ingredients[1]["name"] = "electronic-circuit"
log("Had to replace ingredient name for \"" .. AMSMachineRecipe.name .. "\"")
end
AMSMachineRecipe.results = {{type = "item", name = AMSMachineItem.name, amount = 1}}
AMSMachineRecipe.enabled = false
Code: Select all
log("Made AMS version of \"" .. Machine.name .. "\".")
data:extend{AMSMachine, AMSMachineItem, AMSMachineRecipe, AMSMachineTechnology}