I'm new to modding and really happy about how modding is possible in this game.
However, I have create a mod that replace the inserters in game.
All the prototype are done but i want to delete the long inserter from the game since it won't be used anymore.
I have already add those lines:
Code: Select all
data.raw.recipe["long-handed-inserter"] = nil
data.raw.inserter["long-handed-inserter"] = nil
data.raw.item["long-handed-inserter"] = nil
But now the next issue:
When i go into the sandbox scenario, the game load the file : control.lua in the __base__/scenarios/sandbox folder
In this control.lua file there is:
Code: Select all
function give_items(player)
local items =
{
...
["long-handed-inserter"] = "50",
...
}
But if i'm not wrong the file is loaded by the game when you enter the sandbox scenario. So i can't call the function while the game load.
Then, I would like to create a control.lua in my mod that manualy load the file with " require("scenarios.sandbox.control") " at the beggining and replace the function " give_items(player) " by the same one without the " ["long-handed-inserter"] = "50", ".
As i'm new to lua too it would be grateful if you could spare some help about it. And excuse me for my explanation i don't speak english fluently.
Happy new year everybody .