allow sprite variation in constant-combinator

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
gheift
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Mar 03, 2015 9:20 pm
Contact:

allow sprite variation in constant-combinator

Post by gheift »

Please allow multiple sprites in the constant-combinator prototype, these can then be selected with entity.graphics_variation like with the simple-entity:

Code: Select all

data:extend{{
    name = "my-entity",
    type = "constant-combinator",
    sprites = {
        north = {
            { filename = "__mod__/graphic/sprite-north-1.png", width = 32, height = 32, },
            { filename = "__mod__/graphic/sprite-north-2.png", width = 32, height = 32, },
        },
        east = {
            { filename = "__mod__/graphic/sprite-east-1.png", width = 32, height = 32, },
            { filename = "__mod__/graphic/sprite-east-2.png", width = 32, height = 32, },
        },
        south = {
            { filename = "__mod__/graphic/sprite-south-1.png", width = 32, height = 32, },
            { filename = "__mod__/graphic/sprite-south-2.png", width = 32, height = 32, },
        },
        west = {
            { filename = "__mod__/graphic/sprite-west-1.png", width = 32, height = 32, },
            { filename = "__mod__/graphic/sprite-west-2.png", width = 32, height = 32, },
        },
    -- ...
}}
Thanks,
Gerhard

Rseding91
Factorio Staff
Factorio Staff
Posts: 13223
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: allow sprite variation in constant-combinator

Post by Rseding91 »

Why? That's just more data we would have to save per constant combinator (the graphics variation) that would never get used in the base game.
If you want to get ahold of me I'm almost always on Discord.

gheift
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Mar 03, 2015 9:20 pm
Contact:

Re: allow sprite variation in constant-combinator

Post by gheift »

It would be 8 byte per constant combinator, which would be added in the base game.

The reason I would like to have this is to have a simple entity, which is able to change the sprite and is able to be connected to the circuit network. The current solution is to make the constant combinator transparent (which looks wired on placing) and managing a simple-entity in parallel for the sprites, which is possible, but needs more memory and processing time than just adding one field to the constant-combinator.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13223
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: allow sprite variation in constant-combinator

Post by Rseding91 »

I meant why would this ever be needed? constant combinators don't use the concept of direction and don't need to.
If you want to get ahold of me I'm almost always on Discord.

gheift
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Mar 03, 2015 9:20 pm
Contact:

Re: allow sprite variation in constant-combinator

Post by gheift »

The constant-combinator is already rotateable/has a direction in the base game without any mods. If you place one, it can be rotated. The example code I gave above is just a modified version of the normal entity definition from data/prototypes/entity/entities.lua. The structure entity.sprites.north etc is form the original one.

Post Reply

Return to “Modding interface requests”