Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug construction #41

Closed
LUISDASARTIMANHAS opened this issue Oct 5, 2023 · 13 comments · Fixed by #132
Closed

Bug construction #41

LUISDASARTIMANHAS opened this issue Oct 5, 2023 · 13 comments · Fixed by #132
Labels
bug Something isn't working

Comments

@LUISDASARTIMANHAS
Copy link
Contributor

construction horizontally and occupied space vertically

image

@bahrmichael
Copy link
Owner

Thank you! I've seen that during development, and wasn't sure if it shows up in published releases. Will investigate :)

@bahrmichael bahrmichael added the bug Something isn't working label Oct 5, 2023
@bahrmichael
Copy link
Owner

Maybe factorio gets confused by the shorthand positions. I'll try specifying them as coordinates and see how it goes.

@LUISDASARTIMANHAS
Copy link
Contributor Author

LUISDASARTIMANHAS commented Oct 11, 2023

the conflict and selection coordinates are inverted, I think if you change the x to y it should work
collision_box = { { -8.4, -2.4}, {8.4, 2.4} },
selection_box = { { -8.5, -2.5}, {8.5, 2.5} },
collision_box = { { -x1, -y1}, {x2, y2} },
selection_box = { { -x1, -y1}, {x2, y2} },

left:x1
right:x2
bottom: y1
top: y2

you can try to use the automatic adjustment with the size

@bahrmichael
Copy link
Owner

This issue is a bit more confusing than just having the wrong numbers.

I've seen this again yesterday in my own test:

Screenshot 2023-10-11 at 11 19 26

Today when I reconstruct that building (or construct it in another save):

Screenshot 2023-10-11 at 11 21 00

I only made a formatting change, that really can't be the reason:

Screenshot 2023-10-11 at 11 22 38

@bahrmichael
Copy link
Owner

I also tried replacing the shorthand version {x, y} with the longhand version {x=x, y=y}, but the squeak through mod can't handle that.

@LUISDASARTIMANHAS
Copy link
Contributor Author

So the problem is the image since the game is rotating the hitbox and the structure but the image is not rotated, try putting 2 frames in the official image

@LUISDASARTIMANHAS
Copy link
Contributor Author

Just like the game does with the car that has 64 positions and 64 images in just 1

@LUISDASARTIMANHAS
Copy link
Contributor Author

When you use the R button or rotate the game changes the position and takes the image that fits the position, in this case I notice that the butcher's shop only has 1 image

@LUISDASARTIMANHAS
Copy link
Contributor Author

LUISDASARTIMANHAS commented Oct 11, 2023

I'm working on this bug but I only see the solution of adding another image or leaving the butcher position fixed

@LUISDASARTIMANHAS
Copy link
Contributor Author

LUISDASARTIMANHAS commented Oct 11, 2023

This is an example of what I use in my constructions

local path_main = "__Applied-Energistics-2__/"

data:extend({
    {
        type = "container",
        name = "drive-entidade",
        icon = path_main .. "graficos/Blocos/drive.png",
        icon_size = 128,
        icon_mipmaps = 4,
        minable = { mining_time = 1, result = "drive" },
        max_health = 350,
        inventory_size = 8,
        -- corpse = "big-remnants",
        corpse = "assembling-machine-2-remnants",
        -- dying_explosion = "big-explosion",
        dying_explosion = "assembling-machine-2-explosion",
        alert_icon_shift = { -0.09375, -0.375 },
        collision_box = {
            { -1.2, -1.2 },
            { 1.2,  1.2 }
        },
        selection_box = {
            { -1.5, -1.5 },
            { 1.5,  1.5 }
        },
        drawing_box = {
            { -1.5, -1.5 },
            { 1.5,  1.5 }
        },
        energy_source = {
            emissions_per_minute = 3,
            type = "electric",
            usage_priority = "secondary-input"
        },
        resistances = {
            {
                type = "fire",
                percent = 70
            }
        },
        damaged_trigger_effect = {
            entity_name = "spark-explosion",
            type = "create-entity",
            damage_type_filters = "fire",
            offsets = { { 0, 1 } },
            offset_deviation = { { -0.5, -0.5 }, { 0.5, 0.5 } }
        },
        allowed_effects = {
            "consumption",
            "speed",
            "productivity",
            "pollution"
        },
        flags = {
            "placeable-neutral",
            "placeable-player",
            "player-creation",
            "not-upgradable"
        },
        placeable_by = {
            item = "drive",
            count = 1
        },
        module_specification = {
            module_slots = 0,
            module_info_icon_shift = { 0, 0.5 }
        },
        working_sound = {
            sound = {
                { filename = "__base__/sound/assembling-machine-t2-1.ogg", volume = 0.45 }
            },
            fade_in_ticks = 4,
            audible_distance_modifier = 0.5,
            fade_out_ticks = 20
        },
        vehicle_impact_sound = {
            {
                filename = "__base__/sound/car-metal-impact-2.ogg",
                volume = 0.5
            },
            {
                filename = "__base__/sound/car-metal-impact-3.ogg",
                volume = 0.5
            },
            {
                filename = "__base__/sound/car-metal-impact-4.ogg",
                volume = 0.5
            },
            {
                filename = "__base__/sound/car-metal-impact-5.ogg",
                volume = 0.5
            },
            {
                filename = "__base__/sound/car-metal-impact-6.ogg",
                volume = 0.5
            }
        },
        picture = {
            layers = {
                {
                    filename = path_main .. "graficos/Blocos/drive.png",
                    height = 128,
                    shift = { 0, -0.015625 },
                    priority = "extra-high",
                    width = 128
                },
                {
                    filename = path_main .. "graficos/Blocos/drive.png",
                    height = 128,
                    shift = { 0.3125, 0.203125 },
                    priority = "extra-high",
                    width = 128,
                    draw_as_shadow = true
                }
            }
        },
        close_sound = {
            {
                filename = "__base__/sound/machine-close.ogg",
                volume = 0.5
            }
        },
        open_sound = {
            {
                filename = "__base__/sound/machine-open.ogg",
                volume = 0.5
            }
        },
    }
})

@LUISDASARTIMANHAS
Copy link
Contributor Author

Frame 1

I was thinking about that

@bahrmichael
Copy link
Owner

True, if we can't find the root cause we need to add a vertical image.

@bahrmichael
Copy link
Owner

Screenshot 2023-10-12 at 08 45 51

Problem happened again in editor mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants