How to add energy consume to exists entity (deepcopy)
Posted: Sat Mar 13, 2021 5:54 pm
Hey, I am working on a mod for first time which allows me teleport items between chests. This is of course too op so I want to make huge energy consume for each teleportation.
For now I use Steel Chest and Requester Chest (because of the UI) but with deepcopy.
Now I want to make requester chest to consume power and used this for the start
But it does not drain. Also if I use in lua entity.power_usage it says
For now I use Steel Chest and Requester Chest (because of the UI) but with deepcopy.
Now I want to make requester chest to consume power and used this for the start
Code: Select all
energy_source =
{
type = "electric",
usage_priority = "secondary-input",
drain = "0.1kW"
}
Cannot I not modifier/add energy_source if I use deepcopy? LikeEntity is not electric-energy-interface
Code: Select all
table.deepcopy(data.raw["logistic-container"]["logistic-chest-requester"])