8-way constant combinator
Posted: Thu Aug 23, 2018 4:36 am
I am trying to make an 8-way constant combinator.
This fails to load with the error, "Count of light offsets doesn't match the count of sprite positions".
If I leave the activity_led_light_offsets and circuit_wire_connection_points at default settings, it does load. But the diagonal rotations don't have unique graphics, they simply use one of the 4 main direction graphics.
Code: Select all
local combinator = data.raw["constant-combinator"]["constant-combinator"]
table.insert(combinator.flags, "building-direction-8-way")
combinator.sprites.sheets = {
{
filename = "__base__/graphics/entity/rail-endings/rail-endings-background.png",
frames = 8,
width = 128,
height = 128,
}
}
combinator.activity_led_sprites.sheets = {
{
filename = "__base__/graphics/entity/rail-endings/rail-endings-background.png",
frames = 8,
width = 128,
height = 128,
}
}
for i = 1, 8 do
combinator.activity_led_light_offsets[i] = {0,0}
combinator.circuit_wire_connection_points[i] = {
wire = {green={0,0}, red={0,0}},
shadow = {green={0,0}, red={0,0}},
}
end
If I leave the activity_led_light_offsets and circuit_wire_connection_points at default settings, it does load. But the diagonal rotations don't have unique graphics, they simply use one of the 4 main direction graphics.