Struggling getting a recipe to display in game
Posted: Mon Jun 12, 2017 3:40 am
I have written a mod but to take it to the next step I need to get an entity in game that I can place and rotate. However, it seems like no matter what I do I cannot get the recipe to show. I started with "selection-tool" and that showed in the recipe list but, that doesn't allow for the rotation. I tried using a transport belt but that seemed to require much more than I need. It seems like simple-entity should be sort of a default entity to build from but as I have done more research that may not be the answer either. But what entity I clone is kind of not relevant at the moment since I cannot get the recipe to show. Any help would be appreciated. Below is my data.lua file.
Made a few updates and now it is showing so... I guess I should have waited a moment
Made a few updates and now it is showing so... I guess I should have waited a moment
Code: Select all
local autoMiner = util.table.deepcopy(data.raw["simple-entity-with-force"])
autoMiner = {}
autoMiner.type = "simple-entity-with-force"
autoMiner.name = "autoMiner"
autoMiner.icon = "__AutoMine__/autoMineEast.png"
autoMiner.render_layer = "object"
autoMiner.flags = {
"placeable-neutral",
"placeable-player",
"player-creation"
}
autoMiner.pictures = {
filename = "__AutoMine__/autoMineNorth.png",
width = 32,
height = 32,
}
local autoMinerItem = table.deepcopy(data.raw.item["simple-entity-with-force"])
autoMinerItem.name="autoMiner"
autoMinerItem.place_result="autoMiner"
autoMinerItem.icon="__AutoMine__/autoMineEast.png"
local autoMinerRecipe = {
type = "recipe",
enabled = true,
normal = {
ingredients = {},
result = "autoMiner",
},
name = "autoMiner",
}
data:extend({autoMiner, autoMinerRecipe, autoMinerItem})