Skip to content

Commit a735955

Browse files
committed
deprecate rotation
1 parent 8490bca commit a735955

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ plugins {
1515

1616
group = "org.scratchapi"
1717
version = (System.getenv("GITHUB_REF_NAME")?.removePrefix("v")
18-
?: "0.0.1a5")
18+
?: "0.0.1a7")
1919

2020
java {
2121
withJavadocJar()

src/main/kotlin/org/scratchapi/scratchdsl/Blocks.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ val yPosition get() =
528528
.withExpression("DY", dy, ValueInput.NUMBER.of("10"))
529529
}
530530

531-
/** A reporter for the sprite's rotation. Can also be used to set or change the rotation. */
532-
val rotation get() =
531+
/** A reporter for the sprite's direction. Can also be used to set or change the direction. */
532+
val direction get() =
533533
HandlesSetNormalExpression("motion_direction")
534534
.withHandlesSet { direction ->
535535
NormalBlock("motion_pointindirection")
@@ -540,6 +540,10 @@ val rotation get() =
540540
.withExpression("DEGREES", degrees, ValueInput.NUMBER.of("15"))
541541
}
542542

543+
@Deprecated("\"rotation\" is a bad name. ", replaceWith = ReplaceWith("direction"))
544+
val rotation inline get() =
545+
direction
546+
543547

544548
// Looks
545549

0 commit comments

Comments
 (0)