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

Scripting: Expose Tileset.transformationFlags #4100

Merged

Conversation

dogboydog
Copy link
Contributor

@dogboydog dogboydog commented Nov 13, 2024

Fix #3753

Examples (scripting console with a Tileset as the active asset)

>tiled.activeAsset.transformationFlags |= Tileset.AllowFlipVertically
2
> tiled.activeAsset.transformationFlags
$8 = 2
> if ((tiled.activeAsset.transformationFlags | Tileset.AllowFlipVertically) > 0) { tiled.log('vertical flip enabled'); } 
vertical flip enabled

@dogboydog dogboydog force-pushed the 3753-allowed-transformations-scripting branch from cba056b to 61d0a6a Compare November 14, 2024 00:00
Copy link
Member

@bjorn bjorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks mostly fine, I only see some empty lines missing between functions and there is no @since on the new property (and needs addition to CHANGELOG.md).

Thanks for implementing this!

@dogboydog
Copy link
Contributor Author

What should be used for @since ? I'll make the other updates too.

@bjorn
Copy link
Member

bjorn commented Nov 14, 2024

@dogboydog Ah, for other scripting additions I've used @since 1.11.1 so I'd suggest you do the same. I may still do a 1.11.1 release after all.

@dogboydog
Copy link
Contributor Author

Done, thanks

@dogboydog
Copy link
Contributor Author

Sorry I forgot the changelog

@bjorn bjorn merged commit 3281d80 into mapeditor:master Nov 14, 2024
13 of 14 checks passed
@dogboydog dogboydog deleted the 3753-allowed-transformations-scripting branch November 14, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scripting: Expose "Allowed Transformations" properties
2 participants