[RSeding][2.0.73] Crash rendering agricultural tower crane part with no graphics (DrawPartContext::getDrawPosition)

This subforum contains all the issues which we already resolved.
User avatar
Osmo
Fast Inserter
Fast Inserter
Posts: 233
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

[RSeding][2.0.73] Crash rendering agricultural tower crane part with no graphics (DrawPartContext::getDrawPosition)

Post by Osmo »

Agricultural tower is modified like this:

Code: Select all

table.insert(data.raw['agricultural-tower']['agricultural-tower'].crane.parts, {
        extendable_length = {0, 10, 10},
        static_length =     {0, 0, 0},
    }
)
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, {
        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},
    }
)
Attachments
factorio-current.log
(15.6 KiB) Downloaded 15 times
Post Reply

Return to “Resolved Problems and Bugs”