sscharter 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sscharter/cli.rb +7 -0
- data/lib/sscharter/utils.rb +1 -1
- data/lib/sscharter/version.rb +1 -1
- data/lib/sscharter.rb +4 -3
- data/tutorial/tutorial.md +15 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce79b0e7cd394c7481ae58378e26af8c6cd319a7a9dbce5b36d0882cdac69af3
|
4
|
+
data.tar.gz: baa62e322601453959eaa93b353ee535f2ce56561894438c900694792a116f96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1cb17ba611908ba3c2ec03d061e8f72e1f90ddcbd21fc7240bf0997b97ee608e0199b5e032084ccb470b2ab2aeecd9da89e1ef27caa85cd247349cc61964e16
|
7
|
+
data.tar.gz: 59c5e7e375432ba5061807c29bc7a0a3959d4cc5b9b8b2b92bf9686938269b36d0973a881c90b61113ad2beb534a8ddeb88c21017748cb742fb9d93a512a8472
|
data/Gemfile.lock
CHANGED
data/lib/sscharter/cli.rb
CHANGED
@@ -157,6 +157,13 @@ module Sunniesnow::Charter::CLI
|
|
157
157
|
end
|
158
158
|
end
|
159
159
|
::Sunniesnow::Charter.charts.each do |name, chart|
|
160
|
+
begin
|
161
|
+
output = chart.output_json
|
162
|
+
rescue => e
|
163
|
+
puts 'An error happened. Report if this is a bug of sscharter.'
|
164
|
+
puts e.full_message
|
165
|
+
return 2
|
166
|
+
end
|
160
167
|
zip_file.get_output_stream "#{name}.json" do |file|
|
161
168
|
file.write chart.output_json
|
162
169
|
end
|
data/lib/sscharter/utils.rb
CHANGED
data/lib/sscharter/version.rb
CHANGED
data/lib/sscharter.rb
CHANGED
@@ -156,7 +156,7 @@ class Sunniesnow::Charter
|
|
156
156
|
cyy = zz*yy - yz*zy
|
157
157
|
cyx = zz*yx - yz*zx
|
158
158
|
dyp = cy0*-cross + cyy*dy + cyx*dx
|
159
|
-
|
159
|
+
|
160
160
|
event[:angle] = atan2 dyp, dxp
|
161
161
|
event
|
162
162
|
end
|
@@ -490,6 +490,7 @@ class Sunniesnow::Charter
|
|
490
490
|
end
|
491
491
|
@groups.each { _1.push event }
|
492
492
|
end
|
493
|
+
@current_duplicate += 1
|
493
494
|
result
|
494
495
|
end
|
495
496
|
|
@@ -540,8 +541,8 @@ class Sunniesnow::Charter
|
|
540
541
|
alias f flick
|
541
542
|
|
542
543
|
def bg_note x, y, duration_beats = 0, text = ''
|
543
|
-
if !x.is_a?(Numeric) || !y.is_a?(Numeric)
|
544
|
-
raise ArgumentError, 'x and
|
544
|
+
if !x.is_a?(Numeric) || !y.is_a?(Numeric) || !duration_beats.is_a?(Numeric)
|
545
|
+
raise ArgumentError, 'x, y, and duration_beats must be numbers'
|
545
546
|
end
|
546
547
|
if duration_beats < 0
|
547
548
|
raise ArgumentError, 'duration must be non-negative'
|
data/tutorial/tutorial.md
CHANGED
@@ -691,7 +691,7 @@ end
|
|
691
691
|
|
692
692
|
Transformations can also be used to bulk edit notes.
|
693
693
|
Imagine that you have already written a bunch of notes with their coordinates,
|
694
|
-
but you then decided them move them (say, translating by vector
|
694
|
+
but you then decided them move them (say, translating by vector $`(25,25)`$).
|
695
695
|
You can use `transform` to do that:
|
696
696
|
|
697
697
|
```ruby
|
@@ -999,6 +999,18 @@ their duplicates are also connected by the same tip point, too.
|
|
999
999
|
|
1000
1000
|
TODO.
|
1001
1001
|
|
1002
|
+
### Use Git as a version manager
|
1003
|
+
|
1004
|
+
### Useful loops
|
1005
|
+
|
1006
|
+
### Homography
|
1007
|
+
|
1008
|
+
### Tip points and placeholders
|
1009
|
+
|
1010
|
+
### Multiple offsets
|
1011
|
+
|
1012
|
+
### JSON post-processing
|
1013
|
+
|
1002
1014
|
## Step 6: review your chart and write the README
|
1003
1015
|
|
1004
1016
|
Now, you have finished writing the chart!
|
@@ -1016,4 +1028,5 @@ Congratulations! You finished your chart.
|
|
1016
1028
|
Now, you can distribute the level file to people who may want to play it.
|
1017
1029
|
|
1018
1030
|
If you want your chart to be available as an online level of Sunniesnow,
|
1019
|
-
you need to
|
1031
|
+
you need to
|
1032
|
+
<a href="mailto:UlyssesZhan <ulysseszhan@gmail.com>">contact the author of Sunniesnow</a>.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sscharter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ulysses Zhan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|