sscharter 0.4.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e26848981238d761f60a4786887aa548f502cd3368ac7eb1f7519ce3de0c45c4
4
- data.tar.gz: 7cc0a9f86404d13634c0cdd5c693efd70bc25da2f6683b70c8f51c304ea4254e
3
+ metadata.gz: 8a943768e6ccb1b3d49ea613906e43cb2f67754163452b40ddca1a2bc79931ed
4
+ data.tar.gz: d2d6e47744b310cf86dca899136d26a7ed36b6322a663354be26b06c81de573e
5
5
  SHA512:
6
- metadata.gz: 2f63c492ff1d26eeba0b259f1e644fd5c848f1a578624198f085a142242094211d89ab91e2087466f8ee7a74093e311a73ba4d076d427830bbeffad43dbdc153
7
- data.tar.gz: 6f80c45d548c2ad1509fd0854226343f4da2bca7f407019c517c525244b9d1ba7b0d0890bbf94938e92ecc55728dd500db828003c3668bcca80e6c1bbeca6745
6
+ metadata.gz: d9895ab04396393eee863bb0cb8af4631e27af7c7c7f1b154dcac4da796a691dcaf35cba80ece174b1cda9332f245c8a7ad4ac23c8159888fb29cd677d52f802
7
+ data.tar.gz: 2104bc67acc80130c885388b495f89fd3ce3c23d75a82d2f82d8829f51f47e669c5ef1541616b82fb987eede8f5a39b52484ef6e12d9764371a1d815f6447fe8
@@ -7,7 +7,7 @@ class Sunniesnow::Chart
7
7
  using Sunniesnow::Utils
8
8
 
9
9
  attr_accessor :title, :artist, :charter
10
- attr_accessor :difficulty_name, :difficulty_color, :difficulty
10
+ attr_accessor :difficulty_name, :difficulty_color, :difficulty, :difficulty_sup
11
11
  attr_reader :events
12
12
 
13
13
  def initialize
@@ -17,6 +17,7 @@ class Sunniesnow::Chart
17
17
  @difficulty_name = ''
18
18
  @difficulty_color = '#000000'
19
19
  @difficulty = ''
20
+ @difficulty_sup = ''
20
21
  @events = []
21
22
  end
22
23
 
@@ -28,6 +29,7 @@ class Sunniesnow::Chart
28
29
  difficultyName: @difficulty_name,
29
30
  difficultyColor: @difficulty_color,
30
31
  difficulty: @difficulty,
32
+ difficultySup: @difficulty_sup,
31
33
  events: @events
32
34
  }.to_json
33
35
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sunniesnow
4
4
  class Charter
5
- VERSION = "0.4.0"
5
+ VERSION = "0.5.0"
6
6
  end
7
7
  end
data/lib/sscharter.rb CHANGED
@@ -363,6 +363,10 @@ class Sunniesnow::Charter
363
363
  @difficulty = difficulty.to_s
364
364
  end
365
365
 
366
+ def difficulty_sup difficulty_sup
367
+ @difficulty_sup = difficulty_sup.to_s
368
+ end
369
+
366
370
  def offset offset
367
371
  raise ArgumentError, 'offset must be a number' unless offset.is_a? Numeric
368
372
  @current_offset = offset.to_f
@@ -591,7 +595,7 @@ class Sunniesnow::Charter
591
595
  event :big_text, duration_beats.to_r, text: text.to_s
592
596
  end
593
597
 
594
- %i[grid hexagon checkerboard diamond_grid pentagon turntable].each do |method_name|
598
+ %i[grid hexagon checkerboard diamond_grid pentagon turntable hexagram].each do |method_name|
595
599
  define_method method_name do |duration_beats = 0|
596
600
  unless duration_beats.is_a? Numeric
597
601
  raise ArgumentError, 'duration_beats must be a number'
@@ -614,6 +618,7 @@ class Sunniesnow::Charter
614
618
  result.difficulty_name = @difficulty_name
615
619
  result.difficulty_color = @difficulty_color
616
620
  result.difficulty = @difficulty
621
+ result.difficulty_sup = @difficulty_sup
617
622
  @events.each { result.events.push _1.to_sunniesnow }
618
623
  result
619
624
  end
data/tutorial/tutorial.md CHANGED
@@ -563,6 +563,7 @@ There are totally 7 different kinds of background patterns:
563
563
  | diamond grid | `diamond_grid duration_beats=0` |
564
564
  | pentagon | `pentagon duration_beats=0` |
565
565
  | turntable | `turntable duration_beats=0` |
566
+ | hexagram | `hexagram duration_beats=0` |
566
567
 
567
568
  Most of them only has one optional argument, specifying the duration.
568
569
  The big text is different in that it needs an additional required argument,
@@ -669,13 +670,14 @@ The transformation is done like this:
669
670
  > y'=\mathtt{yx}\cdot x+\mathtt{yy}\cdot y.
670
671
  > ```
671
672
 
672
- *Notice*: When doing spatial transformations,
673
- you do not need to worry about the direction of flick notes.
674
- They are taken care of as well.
675
-
676
- *Another notice*: For background patterns,
677
- they are ignored when doing spatial transformations.
678
- They are still affected by temporal transformations, though.
673
+ > [!NOTE]
674
+ > When doing spatial transformations,
675
+ > you do not need to worry about the direction of flick notes.
676
+ > They are taken care of as well.
677
+ >
678
+ > For background patterns,
679
+ > they are ignored when doing spatial transformations.
680
+ > They are still affected by temporal transformations, though.
679
681
 
680
682
  Therefore, you can also apply, say, a horizontal flip on the duplicated notes like this:
681
683
 
@@ -789,9 +791,10 @@ end
789
791
 
790
792
  ### BPM changes
791
793
 
792
- *Notice*: because *Big-D* does not have BPM changes,
793
- this part of the tutorial will not be used in the actual chart of *Big-D*.
794
- You may still try it out, though.
794
+ > [!NOTE]
795
+ > Because *Big-D* does not have BPM changes,
796
+ > this part of the tutorial will not be used in the actual chart of *Big-D*.
797
+ > You may still try it out, though.
795
798
 
796
799
  You can use `bpm` to set the BPM starting at the current beat.
797
800
 
@@ -918,7 +921,7 @@ For example, in the expression
918
921
  > ```
919
922
  >
920
923
  > the argument `speed:` is a keyword argument in the call of `tp_chain`.
921
- The value of the keyword argument is `100`.
924
+ > The value of the keyword argument is `100`.
922
925
 
923
926
  Knowing how to specify the position and time of the spawning of a tip point,
924
927
  then creating tip points is just as easy as filling events in the code block
@@ -958,16 +961,16 @@ transform duplicate notes do
958
961
  end
959
962
  ```
960
963
 
961
- *Tips*:
962
- Just like `group`, `tip_point_chain` and `tip_point_drop`
963
- may also not preserve beat.
964
- You can let them not preserve beat by specifying the keyword argument `preserve_beat: false`:
965
-
966
- ```ruby
967
- tp_chain 0, 100, speed: 100, preserve_beat: false do
968
- # notes...
969
- end
970
- ```
964
+ > [!NOTE]
965
+ > Just like `group`, `tip_point_chain` and `tip_point_drop`
966
+ > may also not preserve beat.
967
+ > You can let them not preserve beat by specifying the keyword argument `preserve_beat: false`:
968
+ >
969
+ > ```ruby
970
+ > tp_chain 0, 100, speed: 100, preserve_beat: false do
971
+ > # notes...
972
+ > end
973
+ > ```
971
974
 
972
975
  Now, the whole source codes file should look like this:
973
976
 
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.0
4
+ version: 0.5.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-09-25 00:00:00.000000000 Z
11
+ date: 2023-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubygems_version: 3.4.13
138
+ rubygems_version: 3.4.22
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: A Ruby DSL for writing Sunniesnow charts