[RSeding][2.0.73] Crash rendering agricultural tower crane part with no graphics (DrawPartContext::getDrawPosition)
Posted: Mon Jan 19, 2026 5:19 am
Agricultural tower is modified like this:
Grabbing the tower into cursor crashes the game when previewing placement, so does loading into a save with a tower present.
Defining rotated_sprite, rotated_sprite_shadow and rotated_sprite_reflection makes the game not crash.
Code: Select all
table.insert(data.raw['agricultural-tower']['agricultural-tower'].crane.parts, {
extendable_length = {0, 10, 10},
static_length = {0, 0, 0},
}
)
Defining rotated_sprite, rotated_sprite_shadow and rotated_sprite_reflection makes the game not crash.
Code: Select all
table.insert(data.raw['agricultural-tower']['agricultural-tower'].crane.parts, {
rotated_sprite =
util.sprite_load("__space-age__/graphics/entity/agricultural-tower/agricultural-tower-crane-3", {
priority = "very-low",
direction_count = 128,
scale = 0.5
}),
rotated_sprite_shadow =
util.sprite_load("__space-age__/graphics/entity/agricultural-tower/agricultural-tower-crane-3-shadow", {
priority = "very-low",
direction_count = 32,
scale = 1,
draw_as_shadow = true
}),
rotated_sprite_reflection =
util.sprite_load("__space-age__/graphics/entity/agricultural-tower/agricultural-tower-crane-3-reflection", {
priority = "very-low",
direction_count = 8,
scale = 5
}),
extendable_length = {0, 10, 10},
static_length = {0, 0, 0},
}
)