From 8aaace30a53ac2f2ef9df1ca2d8a4c3ebf416b86 Mon Sep 17 00:00:00 2001 From: Stepland <16676308+Stepland@users.noreply.github.com> Date: Wed, 22 Dec 2021 14:21:10 +0100 Subject: [PATCH] Re-enable negative chart levels --- docs/source/changelog.md | 8 +++++++- schema.json | 2 +- .../pass/as a number.json | 9 +++++++++ .../pass/as a string .json | 9 +++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 tests/data/11 - level can be negative for all I care/pass/as a number.json create mode 100644 tests/data/11 - level can be negative for all I care/pass/as a string .json diff --git a/docs/source/changelog.md b/docs/source/changelog.md index 857397f..cee38f6 100644 --- a/docs/source/changelog.md +++ b/docs/source/changelog.md @@ -1,6 +1,12 @@ # Changelog -## v1.0.0 +## v1.0.0-rc.2 +- **Changed** + - In the chart object, `level` can now be negative, it was mistakenly restricted to being positive in `v1.0.0-rc.1` as a part of turning it into a decimal value +- **Schema bugs** + - `#/$defs/positiveDecimal` allowed for negative number literals, not anymore + +## v1.0.0-rc.1 - **Added** - Symbolic times such as `t` and `l` in notes can also now be expressed as a tuple of 3 ints representing a mixed number - Decimal numbers such as the offset or the bpm can now also be stored as strings to make it easier to preserve clean decimal notations diff --git a/schema.json b/schema.json index b2735b2..f1722a1 100644 --- a/schema.json +++ b/schema.json @@ -67,7 +67,7 @@ "properties": { "level": { "description": "Level rating of the chart, typically goes from 1 to 10.9 in jubeat", - "$ref": "#/$defs/positiveDecimal" + "$ref": "#/$defs/decimal" }, "resolution": { "description": "Number of ticks in a beat for the notes", diff --git a/tests/data/11 - level can be negative for all I care/pass/as a number.json b/tests/data/11 - level can be negative for all I care/pass/as a number.json new file mode 100644 index 0000000..ae57961 --- /dev/null +++ b/tests/data/11 - level can be negative for all I care/pass/as a number.json @@ -0,0 +1,9 @@ +{ + "version": "1.0.0", + "data": { + "a": { + "level": -5, + "notes": [] + } + } +} \ No newline at end of file diff --git a/tests/data/11 - level can be negative for all I care/pass/as a string .json b/tests/data/11 - level can be negative for all I care/pass/as a string .json new file mode 100644 index 0000000..b524ad2 --- /dev/null +++ b/tests/data/11 - level can be negative for all I care/pass/as a string .json @@ -0,0 +1,9 @@ +{ + "version": "1.0.0", + "data": { + "a": { + "level": "-0.0", + "notes": [] + } + } +} \ No newline at end of file