[SOLVED] electric-energy-interface animations not working?
Posted: Sat Mar 24, 2018 2:22 am
I have an electric-energy-interface entity that I'm writing that has a three layer animation, but the animation is stuck at the first frame.
Here is the spec:
Am I missing something? The sprite itself is PNG with the 8 frames appended horizontally, and as far as the loading goes the game is perfectly happy with how it's spec'd out. But the animation just doesn't want to run.
Any help?
EDIT: This happens even without layers (specifying the first layer as the top-level table keys).
Here is the spec:
Code: Select all
data:extend{{
type = 'electric-energy-interface',
name = 'hand-crank',
icon = '__base__/graphics/icons/accumulator.png',
icon_size = 32,
flags = {'placeable-neutral', 'player-creation'},
minable = {hardness = 0.1, mining_time = 0.2, result = 'hand-crank'},
max_health = 40,
corpse = 'small-remnants',
collision_box = {{-0.78, -0.62}, {0.77, 0.48}},
selection_box = {{-0.78, -0.62}, {0.77, 0.48}},
enable_gui = true,
allow_copy_paste = false,
energy_source =
{
type = 'electric',
usage_priority = 'primary-output',
render_no_power_icon = false,
render_no_network_icon = true,
buffer_capacity = '10kW',
input_flow_limit = '0kW',
output_flow_limit = '10kW'
},
energy_production = '0kW',
energy_usage = "0kW",
animation =
{
layers =
{
{
filename = '__HandCrank__/graphics/entity/hand-crank.png',
priority = 'extra-high',
width = 96,
height = 48,
shift = {0.6, 0},
line_length = 0,
frame_count = 8,
animation_speed = 0.2,
run_mode = 'forward'
},
{
filename = '__HandCrank__/graphics/entity/hand-crank_dark.png',
priority = 'extra-high',
width = 96,
height = 48,
shift = {0.6, 0},
frame_count = 8,
line_length = 0,
animation_speed = 0.2,
draw_as_shadow = true,
run_mode = 'forward'
},
{
filename = '__HandCrank__/graphics/entity/hand-crank_shadow.png',
priority = 'extra-high',
width = 96,
height = 48,
shift = {0.6, 0},
line_length = 0,
frame_count = 8,
animation_speed = 0.2,
run_mode = 'forward'
}
}
},
vehicle_impact_sound = {
filename = '__base__/sound/car-metal-impact.ogg',
volume = 0.4
}
}}
Any help?
EDIT: This happens even without layers (specifying the first layer as the top-level table keys).