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.
Add Sprite4Way to ContainerPrototype
-
- Burner Inserter
- Posts: 11
- Joined: Sun Feb 23, 2020 2:01 am
- Contact:
Re: Add Sprite4Way to ContainerPrototype
[Koub] Moved to modding interface requests.
Koub - Please consider English is not my native language.
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Add Sprite4Way to ContainerPrototype
I feel like this may be related?
viewtopic.php?f=28&t=100628
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
Re: Add Sprite4Way to ContainerPrototype
Only related. This is a better and more concrete request.FuryoftheStars wrote: ↑Fri Jul 05, 2024 11:36 pmI feel like this may be related?
viewtopic.php?f=28&t=100628
Re: Add Sprite4Way to ContainerPrototype
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.curiosity wrote: ↑Sat Jul 06, 2024 1:04 amOnly related. This is a better and more concrete request.FuryoftheStars wrote: ↑Fri Jul 05, 2024 11:36 pmI feel like this may be related?
viewtopic.php?f=28&t=100628
If you want to get ahold of me I'm almost always on Discord.
Re: Add Sprite4Way to ContainerPrototype
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.