Adding rotation_shift to RotatedSprite and RotatedAnimation

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
snouz
Inserter
Inserter
Posts: 27
Joined: Sun Jan 03, 2021 6:01 pm
Contact:

Adding rotation_shift to RotatedSprite and RotatedAnimation

Post by snouz »

WHAT
I'm suggesting adding a rotated offset to RotatedSprite and RotatedAnimation, similar to LightDefinition.

WHY
When doing modded vehicles, there's no way to easily change the rotation point. The only way is to re-render or edit 256 images individually.
The shift property applies in an absolute way (it will shift each direction in the same direction) but what if you just want to adjust the position of the image relative to it's current orientation?

EXAMPLE
My specific case is in Cargo Ships. There's a boat that can either be a car if placed on water, or a locomotive+cargo-wagon if placed on a "rail". I can't use the same render for both because in the locomotive/cargo-wagon version, only one of the 2 entities has a sprite
Image
Graphically contributed to : Bio Industries (soon) | Warehousing | MFerrari's mods | Brevven's mods | Bob Artisanal Reskins | Mining Drones | Teleporters | Emoji signals

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 490
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Adding rotation_shift to RotatedSprite and RotatedAnimation

Post by Silari »

+1. Ran into this issue with building remnants when trying to fix an issue with Modular Buildings: viewtopic.php?f=34&t=99015

Having a property to define how it should be offset when rotating would make it MUCH easier to do this, as it could all be done programmatically without needing any new assets.

Post Reply

Return to “Modding interface requests”