Add Sprite4Way to ContainerPrototype

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
embermctillhawk
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Feb 23, 2020 2:01 am
Contact:

Add Sprite4Way to ContainerPrototype

Post by embermctillhawk »

TL;DR
Topic name.

What?
Add an optional entry of type Sprite4Way to ContainerPrototype, similar to how CombinatorPrototype has the "sprites" entry, which will override the "picture" entry if present.
I don't remember if the game already will allow rotating the collision box if the entity is non-square with the ContainerPrototype. I know it does this for CraftingMachinePrototype. That might need tweaking as well if this was implemented.
Probably rotating is only allowed if the Sprite4Way is defined.

Why?
Nonsquare containers already exist in the vanilla game as cars and tanks and trains. The engine already allows for nonvehicle nonsquare containers and uses them for things like the crashed ship. However, it does not allow for rotating these nonsquare containers, which messes with things like blueprints.
There are ways to work around this but this mostly involves writing custom lua to hook into various events. See; the modular chests mod.
I was working on a cursed mod with silly things like 2x5 assemblers and long chests but very quickly found out the limitations of the existing system. Adding this at the engine layer would be much cleaner than anything that could be done in lua.

Koub
Global Moderator
Global Moderator
Posts: 7614
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Add Sprite4Way to ContainerPrototype

Post by Koub »

[Koub] Moved to modding interface requests.
Koub - Please consider English is not my native language.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Add Sprite4Way to ContainerPrototype

Post by FuryoftheStars »

I feel like this may be related?
viewtopic.php?f=28&t=100628
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

curiosity
Filter Inserter
Filter Inserter
Posts: 433
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Add Sprite4Way to ContainerPrototype

Post by curiosity »

FuryoftheStars wrote:
Fri Jul 05, 2024 11:36 pm
I feel like this may be related?
viewtopic.php?f=28&t=100628
Only related. This is a better and more concrete request.

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

Re: Add Sprite4Way to ContainerPrototype

Post by Rseding91 »

curiosity wrote:
Sat Jul 06, 2024 1:04 am
FuryoftheStars wrote:
Fri Jul 05, 2024 11:36 pm
I feel like this may be related?
viewtopic.php?f=28&t=100628
Only related. This is a better and more concrete request.
It's the other way around. An entity needs to support rotation before having directional sprites has any meaning. Supporting direction/rotation implies there is sprite support for those directions.
If you want to get ahold of me I'm almost always on Discord.

curiosity
Filter Inserter
Filter Inserter
Posts: 433
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Add Sprite4Way to ContainerPrototype

Post by curiosity »

Rseding91 wrote:
Sat Jul 06, 2024 7:56 am
It's the other way around. An entity needs to support rotation before having directional sprites has any meaning. Supporting direction/rotation implies there is sprite support for those directions.
But there is no point is directional sprites if the entity doesn't support directions. The two are equivalent. And this request is asking for only one type of entity.

Post Reply

Return to “Modding interface requests”