something along the lines of
Code: Select all
harv_entity : pictures = "animation_state"
controle.lua:
if havrester(car) is on ore then
get direction(?)
if harvester(car).direction = North then
animation_state = "N_mining"
N_mining=
{
filename = "__mod__/graphics/entity/vehicle/north-sheet.png",
line_length = 5
frame_width = 140,
frame_height = 110,
shift={0.5, 0},
axially_symmetrical = false,
direction_count = 64
},
if harvester.direction = south then
animation_state = "S_mining"
S_mining=
{
filename = "__mod__/graphics/entity/vehicle/south-sheet.png",
line_length = 5
frame_width = 140,
frame_height = 110,
shift={0.5, 0},
axially_symmetrical = false,
direction_count = 64
},
and so on
then else if its not on ore or dumping cargo revert back to the original sprite sheet.
else if harvester. not on ore
animation_state = "normal"
normal =
{
filename = "__mod__/graphics/entity/vehicle/normal-sheet.png",
line_length = 8,
frame_width = 140,
frame_height = 110,
shift={0.5, 0},
axially_symmetrical = false,
direction_count = 64
},
If harvester is "dumping cargo"
animation_state ="dump_cargo"
dump_cargo =
{
filename = "__mod__/graphics/entity/vehicle/dump-cargo-sheet.png",
line_length = 4,
frame_width = 140,
frame_height = 110,
shift={0.5, 0},
axially_symmetrical = false,
direction_count = 64
},