I'm wanting to use the market entity as a source for a teleporter entity but have it require energy to activate.
I've created a data:extend and added some energy attributes to it, but the created entity doesn't require power.
Is there an additional attribute I need to add for it to recognize it needs power?
Or should I use a different source entity?
Code: Select all
-- teleporter is a modification of the market
local teleporter = util.table.deepcopy( data.raw["market"]["market"])
teleporter.name = "coe-teleporter"
teleporter.energy_source = {
type = "electric",
usage_priority = "primary-input"
}
teleporter.energy_usage = "250kW"
teleporter.active_energy_usage = "2000KW"
teleporter.destructible = false
data:extend({teleporter})