ika3 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +90 -0
- data/LICENSE.txt +21 -0
- data/README.md +53 -0
- data/Rakefile +8 -0
- data/Steepfile +8 -0
- data/config/sub_weapons.yml +41 -0
- data/config/weapons.yml +237 -0
- data/ika3.gemspec +41 -0
- data/lib/ika3/concerns/utils.rb +12 -0
- data/lib/ika3/version.rb +5 -0
- data/lib/ika3/weapons.rb +98 -0
- data/lib/ika3.rb +14 -0
- data/rbs_collection.lock.yaml +128 -0
- data/rbs_collection.yaml +16 -0
- data/sig/ika3/concerns/utils.rbs +7 -0
- data/sig/ika3/weapon.rbs +33 -0
- data/sig/ika3.rbs +2 -0
- metadata +92 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 548d040dbd4c648da79fb006c15ffde651e00327f242ddf101c8a4aa38161676
|
4
|
+
data.tar.gz: 8cd525770d10cf8a36b0eed678b3117605ad526ac47c2b725a43ffa61636cf00
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 605d7d6c03b39691cc77fe1ca80fa5331ba9c707ed23b5b7c6e127674af797e2f3f03a98e437d5ba173598e34eb806c18e3d5d2cc96958e90b6d4cdde7af69ee
|
7
|
+
data.tar.gz: 8434fd143474068d51239ccd92d6ba4dae33377bef897baaba3009b804ca3a0576691dfc8a3809fca70919ec8b30696c41ca99bf3ca3937bf823160128a09558
|
data/.rspec
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ika3 (0.1.0)
|
5
|
+
activesupport (>= 5.0.0)
|
6
|
+
hashie (>= 2.0.5)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activesupport (6.1.7)
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
+
i18n (>= 1.6, < 2)
|
14
|
+
minitest (>= 5.1)
|
15
|
+
tzinfo (~> 2.0)
|
16
|
+
zeitwerk (~> 2.3)
|
17
|
+
ast (2.4.2)
|
18
|
+
concurrent-ruby (1.1.10)
|
19
|
+
csv (3.2.5)
|
20
|
+
diff-lcs (1.5.0)
|
21
|
+
ffi (1.15.5)
|
22
|
+
fileutils (1.6.0)
|
23
|
+
hashie (5.0.0)
|
24
|
+
i18n (1.12.0)
|
25
|
+
concurrent-ruby (~> 1.0)
|
26
|
+
json (2.6.2)
|
27
|
+
language_server-protocol (3.17.0.1)
|
28
|
+
listen (3.7.1)
|
29
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
30
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
31
|
+
logger (1.5.1)
|
32
|
+
minitest (5.16.3)
|
33
|
+
parallel (1.22.1)
|
34
|
+
parser (3.1.3.0)
|
35
|
+
ast (~> 2.4.1)
|
36
|
+
rainbow (3.1.1)
|
37
|
+
rake (13.0.6)
|
38
|
+
rb-fsevent (0.11.2)
|
39
|
+
rb-inotify (0.10.1)
|
40
|
+
ffi (~> 1.0)
|
41
|
+
rbs (2.8.1)
|
42
|
+
rspec (3.12.0)
|
43
|
+
rspec-core (~> 3.12.0)
|
44
|
+
rspec-expectations (~> 3.12.0)
|
45
|
+
rspec-mocks (~> 3.12.0)
|
46
|
+
rspec-core (3.12.0)
|
47
|
+
rspec-support (~> 3.12.0)
|
48
|
+
rspec-expectations (3.12.0)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.12.0)
|
51
|
+
rspec-mocks (3.12.0)
|
52
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
53
|
+
rspec-support (~> 3.12.0)
|
54
|
+
rspec-support (3.12.0)
|
55
|
+
securerandom (0.2.0)
|
56
|
+
steep (1.3.0)
|
57
|
+
activesupport (>= 5.1)
|
58
|
+
csv (>= 3.0.9)
|
59
|
+
fileutils (>= 1.1.0)
|
60
|
+
json (>= 2.1.0)
|
61
|
+
language_server-protocol (>= 3.15, < 4.0)
|
62
|
+
listen (~> 3.0)
|
63
|
+
logger (>= 1.3.0)
|
64
|
+
parallel (>= 1.0.0)
|
65
|
+
parser (>= 3.1)
|
66
|
+
rainbow (>= 2.2.2, < 4.0)
|
67
|
+
rbs (>= 2.8.0)
|
68
|
+
securerandom (>= 0.1)
|
69
|
+
strscan (>= 1.0.0)
|
70
|
+
terminal-table (>= 2, < 4)
|
71
|
+
strscan (3.0.4)
|
72
|
+
terminal-table (3.0.2)
|
73
|
+
unicode-display_width (>= 1.1.1, < 3)
|
74
|
+
tzinfo (2.0.5)
|
75
|
+
concurrent-ruby (~> 1.0)
|
76
|
+
unicode-display_width (2.3.0)
|
77
|
+
zeitwerk (2.6.6)
|
78
|
+
|
79
|
+
PLATFORMS
|
80
|
+
x86_64-linux
|
81
|
+
|
82
|
+
DEPENDENCIES
|
83
|
+
ika3!
|
84
|
+
rake (~> 13.0)
|
85
|
+
rbs
|
86
|
+
rspec (~> 3.0)
|
87
|
+
steep
|
88
|
+
|
89
|
+
BUNDLED WITH
|
90
|
+
2.3.11
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2022 YutaGoto
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# Ika3
|
2
|
+
|
3
|
+
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/YutaGoto/ika3/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/YutaGoto/ika3/tree/main)
|
4
|
+
|
5
|
+
Weapon data from Splatoon3. This is Unofficial data.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Install the gem and add to the application's Gemfile by executing:
|
10
|
+
|
11
|
+
$ bundle add ika3
|
12
|
+
|
13
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
14
|
+
|
15
|
+
$ gem install ika3
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
reuqire "ika3"
|
21
|
+
```
|
22
|
+
|
23
|
+
### Find Weapon data
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
wakaba = Ika3::Weapon.find_by_name("わかばシューター")
|
27
|
+
=> {:name=>"わかばシューター", :sub=>"スプラボム", :special=>"グレートバリア"}
|
28
|
+
|
29
|
+
wakaba.special
|
30
|
+
=> "グレートバリア"
|
31
|
+
```
|
32
|
+
|
33
|
+
### Get Weapons from Sub-Weapon
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
splatbombs = Ika3::Weapon.filter_by_sub("スプラボム")
|
37
|
+
splatbombs
|
38
|
+
=>
|
39
|
+
[{:name=>"わかばシューター", :sub=>"スプラボム", :special=>"グレートバリア"},
|
40
|
+
{:name=>"スプラチャージャー", :sub=>"スプラボム", :special=>"キューインキ"},
|
41
|
+
{:name=>"スプラスコープ", :sub=>"スプラボム", :special=>"キューインキ"},
|
42
|
+
{:name=>"ノヴァブラスター", :sub=>"スプラボム", :special=>"ショクワンダー"},
|
43
|
+
{:name=>"クラッシュブラスター", :sub=>"スプラボム", :special=>"ウルトラショット"},
|
44
|
+
{:name=>"パブロ", :sub=>"スプラボム", :special=>"メガホンレーザー5.1ch"}]
|
45
|
+
```
|
46
|
+
|
47
|
+
## Contributing
|
48
|
+
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/YutaGoto/ika3.
|
50
|
+
|
51
|
+
## License
|
52
|
+
|
53
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/Steepfile
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
splat_bomb: &splat_bomb
|
2
|
+
name: スプラボム
|
3
|
+
|
4
|
+
suction_bomb: &suction_bomb
|
5
|
+
name: キューバンボム
|
6
|
+
|
7
|
+
curing_bomb: &curing_bomb
|
8
|
+
name: カーリングボム
|
9
|
+
|
10
|
+
burst_bomb: &burst_bomb
|
11
|
+
name: クイックボム
|
12
|
+
|
13
|
+
autobomb: &autobomb
|
14
|
+
name: ロボットボム
|
15
|
+
|
16
|
+
ink_mine: &ink_mine
|
17
|
+
name: トラップ
|
18
|
+
|
19
|
+
toxic_mist: &toxic_mist
|
20
|
+
name: ポイズンミスト
|
21
|
+
|
22
|
+
point_sensor: &point_sensor
|
23
|
+
name: ポイントセンサー
|
24
|
+
|
25
|
+
splash_wall: &splash_wall
|
26
|
+
name: スプラッシュシールド
|
27
|
+
|
28
|
+
sprinkler: &sprinkler
|
29
|
+
name: スプリンクラー
|
30
|
+
|
31
|
+
squid_beacon: &squid_beacon
|
32
|
+
name: ジャンプビーコン
|
33
|
+
|
34
|
+
fizzy_bomb: &fizzy_bomb
|
35
|
+
name: タンサンボム
|
36
|
+
|
37
|
+
torpedo: &torpedo
|
38
|
+
name: トーピード
|
39
|
+
|
40
|
+
angle_shooter: &angle_shooter
|
41
|
+
name: ラインマーカー
|
data/config/weapons.yml
ADDED
@@ -0,0 +1,237 @@
|
|
1
|
+
sploosh_o_matic: &sploosh_o_matic
|
2
|
+
name: ボールドマーカー
|
3
|
+
sub: カーリングボム
|
4
|
+
special: ウルトラハンコ
|
5
|
+
|
6
|
+
splattershot_jr: &splattershot_jr
|
7
|
+
name: わかばシューター
|
8
|
+
sub: スプラボム
|
9
|
+
special: グレートバリア
|
10
|
+
|
11
|
+
splash_o_matic: &splash_o_matic
|
12
|
+
name: シャープマーカー
|
13
|
+
sub: クイックボム
|
14
|
+
special: カニタンク
|
15
|
+
|
16
|
+
aerosparay_mg: &aerosparay_mg
|
17
|
+
name: プロモデラーMG
|
18
|
+
sub: タンサンボム
|
19
|
+
special: サメライド
|
20
|
+
|
21
|
+
splattershot: &splattershot
|
22
|
+
name: スプラシューター
|
23
|
+
sub: キューバンボム
|
24
|
+
special: ウルトラショット
|
25
|
+
|
26
|
+
52_gal: &52_gal
|
27
|
+
name: .52ガロン
|
28
|
+
sub: スプラッシュシールド
|
29
|
+
special: メガホンレーザー5.1ch
|
30
|
+
|
31
|
+
n_zap_85: &n_zap_85
|
32
|
+
name: N-ZAP '85
|
33
|
+
sub: キューバンボム
|
34
|
+
special: エナジースタンド
|
35
|
+
|
36
|
+
splattershot_pro: &splattershot_pro
|
37
|
+
name: プライムシューター
|
38
|
+
sub: ラインマーカー
|
39
|
+
special: カニタンク
|
40
|
+
|
41
|
+
96_gal: &96_gal
|
42
|
+
name: .96ガロン
|
43
|
+
sub: スプリンクラー
|
44
|
+
special: キューインキ
|
45
|
+
|
46
|
+
jet_squelcher: &jet_squelcher
|
47
|
+
name: ジェットスイーパー
|
48
|
+
sub: ラインマーカー
|
49
|
+
special: キューインキ
|
50
|
+
|
51
|
+
l_3_nozzlenose: &l_3_nozzlenose
|
52
|
+
name: L3リールガン
|
53
|
+
sub: カーリングボム
|
54
|
+
special: カニタンク
|
55
|
+
|
56
|
+
h_3_nozzlenose: &h_3_nozzlenose
|
57
|
+
name: H3リールガン
|
58
|
+
sub: ポイントセンサー
|
59
|
+
special: エナジースタンド
|
60
|
+
|
61
|
+
squeezer: &squeezer
|
62
|
+
name: ボトルガイザー
|
63
|
+
sub: スプラッシュシールド
|
64
|
+
special: ウルトラショット
|
65
|
+
|
66
|
+
|
67
|
+
carbon_roller: &carbon_roller
|
68
|
+
name: カーボンローラー
|
69
|
+
sub: ロボットボム
|
70
|
+
special: ショクワンダー
|
71
|
+
|
72
|
+
splatroller: &splatroller
|
73
|
+
name: スプラローラー
|
74
|
+
sub: カーリングボム
|
75
|
+
special: グレートバリア
|
76
|
+
|
77
|
+
dynamo_roller: &dynamo_roller
|
78
|
+
name: ダイナモローラー
|
79
|
+
sub: スプリンクラー
|
80
|
+
special: エナジースタンド
|
81
|
+
|
82
|
+
flingza_roller: &flingza_roller
|
83
|
+
name: ヴァリアブルローラー
|
84
|
+
sub: トラップ
|
85
|
+
special: マルチミサイル
|
86
|
+
|
87
|
+
|
88
|
+
classic_squiffer: &classic_squiffer
|
89
|
+
name: スクイックリン
|
90
|
+
sub: ポイントセンサー
|
91
|
+
special: グレートバリア
|
92
|
+
|
93
|
+
splat_charger: &splat_charger
|
94
|
+
name: スプラチャージャー
|
95
|
+
sub: スプラボム
|
96
|
+
special: キューインキ
|
97
|
+
|
98
|
+
splatterscope: &splatterscope
|
99
|
+
name: スプラスコープ
|
100
|
+
sub: スプラボム
|
101
|
+
special: キューインキ
|
102
|
+
|
103
|
+
e_liter_4k: &e_liter_4k
|
104
|
+
name: リッター4K
|
105
|
+
sub: トラップ
|
106
|
+
special: ホップソナー
|
107
|
+
|
108
|
+
e_liter_4K_scope: &e_liter_4K_scope
|
109
|
+
name: 4Kスコープ
|
110
|
+
sub: トラップ
|
111
|
+
special: ホップソナー
|
112
|
+
|
113
|
+
bamboozler_14_mk_1: &bamboozler_14_mk_1
|
114
|
+
name: 14式竹筒銃・甲
|
115
|
+
sub: ロボットボム
|
116
|
+
special: メガホンレーザー5.1ch
|
117
|
+
|
118
|
+
goo_tuber: &goo_tuber
|
119
|
+
name: ソイチューバー
|
120
|
+
sub: トーピード
|
121
|
+
special: マルチミサイル
|
122
|
+
|
123
|
+
|
124
|
+
slosher: &slosher
|
125
|
+
name: バケットスロッシャー
|
126
|
+
sub: キューバンボム
|
127
|
+
special: トリプルトルネード
|
128
|
+
|
129
|
+
tri_slocher: &tri_slocher
|
130
|
+
name: ヒッセン
|
131
|
+
sub: ポイズンミスト
|
132
|
+
special: ジェットパック
|
133
|
+
|
134
|
+
sloshing_machine: &sloshing_machine
|
135
|
+
name: スクリュースロッシャー
|
136
|
+
sub: タンサンボム
|
137
|
+
special: ナイスダマ
|
138
|
+
|
139
|
+
bloblobber: &bloblobber
|
140
|
+
name: オーバーフロッシャー
|
141
|
+
sub: スプリンクラー
|
142
|
+
special: アメフラシ
|
143
|
+
|
144
|
+
explosher: &explosher
|
145
|
+
name: エクスプロッシャー
|
146
|
+
sub: ポイントセンサー
|
147
|
+
special: アメフラシ
|
148
|
+
|
149
|
+
|
150
|
+
mini_splatling: &mini_splatling
|
151
|
+
name: スプラスピナー
|
152
|
+
sub: クイックボム
|
153
|
+
special: ウルトラハンコ
|
154
|
+
|
155
|
+
heavy_splatling: &heavy_splatling
|
156
|
+
name: バレルスピナー
|
157
|
+
sub: スプリンクラー
|
158
|
+
special: ホップソナー
|
159
|
+
|
160
|
+
hydra_splatling: &hydra_splatling
|
161
|
+
name: ハイドラント
|
162
|
+
sub: ロボットボム
|
163
|
+
special: ナイスダマ
|
164
|
+
|
165
|
+
ballpoint_splatling: &ballpoint_splatling
|
166
|
+
name: クーゲルシュライバー
|
167
|
+
sub: タンサンボム
|
168
|
+
special: ジェットパック
|
169
|
+
|
170
|
+
nautilus_47: &nautilus_47
|
171
|
+
name: ノーチラス47
|
172
|
+
sub: ポイントセンサー
|
173
|
+
special: アメフラシ
|
174
|
+
|
175
|
+
|
176
|
+
luna_blaster: &luna_blaster
|
177
|
+
name: ノヴァブラスター
|
178
|
+
sub: スプラボム
|
179
|
+
special: ショクワンダー
|
180
|
+
|
181
|
+
blaster: &blaster
|
182
|
+
name: ホットブラスター
|
183
|
+
sub: ロボットボム
|
184
|
+
special: グレートバリア
|
185
|
+
|
186
|
+
range_blaster: &range_blaster
|
187
|
+
name: ロングブラスター
|
188
|
+
sub: キューバンボム
|
189
|
+
special: ホップソナー
|
190
|
+
|
191
|
+
clash_blaster: &clash_blaster
|
192
|
+
name: クラッシュブラスター
|
193
|
+
sub: スプラボム
|
194
|
+
special: ウルトラショット
|
195
|
+
|
196
|
+
rapid_blaster: &rapid_blaster
|
197
|
+
name: ラピッドブラスター
|
198
|
+
sub: トラップ
|
199
|
+
special: トリプルトルネード
|
200
|
+
|
201
|
+
rapid_blaster_pro: &rapid_blaster_pro
|
202
|
+
name: Rブラスターエリート
|
203
|
+
sub: ポイズンミスト
|
204
|
+
special: キューインキ
|
205
|
+
|
206
|
+
|
207
|
+
inkbrush: &inkbrush
|
208
|
+
name: パブロ
|
209
|
+
sub: スプラボム
|
210
|
+
special: メガホンレーザー5.1ch
|
211
|
+
|
212
|
+
octobrush: &octobrush
|
213
|
+
name: ホクサイ
|
214
|
+
sub: キューバンボム
|
215
|
+
special: ショクワンダー
|
216
|
+
|
217
|
+
|
218
|
+
tri_stringer: &tri_stringer
|
219
|
+
name: トライストリンガー
|
220
|
+
sub: ポイズンミスト
|
221
|
+
special: メガホンレーザー5.1ch
|
222
|
+
|
223
|
+
reef_lux_450: &reef_lux_450
|
224
|
+
name: LACT-450
|
225
|
+
sub: カーリングボム
|
226
|
+
special: マルチミサイル
|
227
|
+
|
228
|
+
|
229
|
+
splatana_stamper: &splatana_stamper
|
230
|
+
name: ジムワイパー
|
231
|
+
sub: クイックボム
|
232
|
+
special: ショクワンダー
|
233
|
+
|
234
|
+
splatana_wiper: &splatana_wiper
|
235
|
+
name: ドライブワイパー
|
236
|
+
sub: トーピード
|
237
|
+
special: ウルトラハンコ
|
data/ika3.gemspec
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/ika3/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "ika3"
|
7
|
+
spec.version = Ika3::VERSION
|
8
|
+
spec.authors = ["YutaGoto"]
|
9
|
+
spec.email = ["you.goto.510@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "いか3"
|
12
|
+
spec.description = "いか3"
|
13
|
+
spec.homepage = "https://github.com/YutaGoto/ika3"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
16
|
+
|
17
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
18
|
+
|
19
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
+
spec.metadata["source_code_uri"] = "https://github.com/YutaGoto/ika3"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(__dir__) do
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_dependency "activesupport", ">= 5.0.0"
|
34
|
+
spec.add_dependency "hashie", ">= 2.0.5"
|
35
|
+
|
36
|
+
# Uncomment to register a new dependency of your gem
|
37
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
38
|
+
|
39
|
+
# For more information and examples about making a new gem, check out our
|
40
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
41
|
+
end
|
data/lib/ika3/version.rb
ADDED
data/lib/ika3/weapons.rb
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
module Ika3
|
2
|
+
class Weapon < Hash
|
3
|
+
include Hashie::Extensions::MethodAccess
|
4
|
+
|
5
|
+
ATTRIBUTES = [
|
6
|
+
:name, :sub, :special
|
7
|
+
].freeze
|
8
|
+
|
9
|
+
attr_accessor :io
|
10
|
+
|
11
|
+
ATTRIBUTES.each do |attribute|
|
12
|
+
define_method attribute do
|
13
|
+
self[attribute]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class << self
|
18
|
+
include Ika3::Concerns::Utils
|
19
|
+
|
20
|
+
def find(weapon_key)
|
21
|
+
raise "unknown weapon: #{weapon_key}" unless valid?(weapon_key)
|
22
|
+
|
23
|
+
@cache ||= {}
|
24
|
+
unless @cache[weapon_key]
|
25
|
+
weapon_config = config[weapon_key] || {}
|
26
|
+
@cache[weapon_key] = Ika3::Weapon[weapon_config].tap {|weapon| weapon.io = $stdout}
|
27
|
+
end
|
28
|
+
|
29
|
+
@cache[weapon_key]
|
30
|
+
end
|
31
|
+
|
32
|
+
def find_by_name(weapon_name)
|
33
|
+
raise "unknown weapon: #{weapon_name}" unless weapons.values.include?(weapon_name)
|
34
|
+
|
35
|
+
key = weapons.key(weapon_name)
|
36
|
+
find(key)
|
37
|
+
end
|
38
|
+
|
39
|
+
def filter_by_sub(sub_name)
|
40
|
+
raise "unknown sub weapon: #{sub_name}" unless sub_weapons.values.include?(sub_name)
|
41
|
+
|
42
|
+
config.values.filter{|weapon| weapon[:sub] == sub_name}
|
43
|
+
end
|
44
|
+
|
45
|
+
def reload_config!
|
46
|
+
@cache = {}
|
47
|
+
@config = nil
|
48
|
+
@config_sub_weapons = nil
|
49
|
+
config
|
50
|
+
config_sub_weapons
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def names
|
56
|
+
config.keys
|
57
|
+
end
|
58
|
+
|
59
|
+
def weapons
|
60
|
+
@weapon_hash ||= {}
|
61
|
+
if @weapon_hash.empty?
|
62
|
+
config.each do |key, value|
|
63
|
+
@weapon_hash[key] = value[:name]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
@weapon_hash
|
67
|
+
end
|
68
|
+
|
69
|
+
def sub_weapons
|
70
|
+
@sub_weapon_hash ||= {}
|
71
|
+
if @sub_weapon_hash.empty?
|
72
|
+
config_sub_weapons.each do |key, value|
|
73
|
+
@sub_weapon_hash[key] = value[:name]
|
74
|
+
end
|
75
|
+
end
|
76
|
+
@sub_weapon_hash
|
77
|
+
end
|
78
|
+
|
79
|
+
def config
|
80
|
+
unless @config
|
81
|
+
@config = load_yaml_file("#{File.dirname(__FILE__)}/../../config/weapons.yml").deep_symbolize_keys
|
82
|
+
end
|
83
|
+
@config
|
84
|
+
end
|
85
|
+
|
86
|
+
def config_sub_weapons
|
87
|
+
unless @config_sub_weapons
|
88
|
+
@config_sub_weapons = load_yaml_file("#{File.dirname(__FILE__)}/../../config/sub_weapons.yml").deep_symbolize_keys
|
89
|
+
end
|
90
|
+
@config_sub_weapons
|
91
|
+
end
|
92
|
+
|
93
|
+
def valid?(weapon_key)
|
94
|
+
names.include?(weapon_key)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
data/lib/ika3.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "yaml"
|
4
|
+
require "hashie"
|
5
|
+
|
6
|
+
require "active_support/core_ext/hash/keys"
|
7
|
+
|
8
|
+
require "ika3/version"
|
9
|
+
require "ika3/concerns/utils"
|
10
|
+
require "ika3/weapons"
|
11
|
+
|
12
|
+
module Ika3
|
13
|
+
class Error < StandardError; end
|
14
|
+
end
|
@@ -0,0 +1,128 @@
|
|
1
|
+
---
|
2
|
+
sources:
|
3
|
+
- name: ruby/gem_rbs_collection
|
4
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
5
|
+
revision: main
|
6
|
+
repo_dir: gems
|
7
|
+
path: ".gem_rbs_collection"
|
8
|
+
gems:
|
9
|
+
- name: hashie
|
10
|
+
version: '5.0'
|
11
|
+
source:
|
12
|
+
type: git
|
13
|
+
name: ruby/gem_rbs_collection
|
14
|
+
revision: 0a45b6d56b0e1b089731f5eb007912a7c36be121
|
15
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
16
|
+
repo_dir: gems
|
17
|
+
- name: activesupport
|
18
|
+
version: '6.0'
|
19
|
+
source:
|
20
|
+
type: git
|
21
|
+
name: ruby/gem_rbs_collection
|
22
|
+
revision: 0a45b6d56b0e1b089731f5eb007912a7c36be121
|
23
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
24
|
+
repo_dir: gems
|
25
|
+
- name: ast
|
26
|
+
version: '2.4'
|
27
|
+
source:
|
28
|
+
type: git
|
29
|
+
name: ruby/gem_rbs_collection
|
30
|
+
revision: 0a45b6d56b0e1b089731f5eb007912a7c36be121
|
31
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
32
|
+
repo_dir: gems
|
33
|
+
- name: csv
|
34
|
+
version: '0'
|
35
|
+
source:
|
36
|
+
type: stdlib
|
37
|
+
- name: fileutils
|
38
|
+
version: '0'
|
39
|
+
source:
|
40
|
+
type: stdlib
|
41
|
+
- name: i18n
|
42
|
+
version: '1.10'
|
43
|
+
source:
|
44
|
+
type: git
|
45
|
+
name: ruby/gem_rbs_collection
|
46
|
+
revision: 0a45b6d56b0e1b089731f5eb007912a7c36be121
|
47
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
48
|
+
repo_dir: gems
|
49
|
+
- name: ika3
|
50
|
+
version: 0.1.0
|
51
|
+
source:
|
52
|
+
type: rubygems
|
53
|
+
- name: json
|
54
|
+
version: '0'
|
55
|
+
source:
|
56
|
+
type: stdlib
|
57
|
+
- name: listen
|
58
|
+
version: '3.2'
|
59
|
+
source:
|
60
|
+
type: git
|
61
|
+
name: ruby/gem_rbs_collection
|
62
|
+
revision: 0a45b6d56b0e1b089731f5eb007912a7c36be121
|
63
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
64
|
+
repo_dir: gems
|
65
|
+
- name: logger
|
66
|
+
version: '0'
|
67
|
+
source:
|
68
|
+
type: stdlib
|
69
|
+
- name: minitest
|
70
|
+
version: '0'
|
71
|
+
source:
|
72
|
+
type: stdlib
|
73
|
+
- name: parallel
|
74
|
+
version: '1.20'
|
75
|
+
source:
|
76
|
+
type: git
|
77
|
+
name: ruby/gem_rbs_collection
|
78
|
+
revision: 0a45b6d56b0e1b089731f5eb007912a7c36be121
|
79
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
80
|
+
repo_dir: gems
|
81
|
+
- name: rainbow
|
82
|
+
version: '3.0'
|
83
|
+
source:
|
84
|
+
type: git
|
85
|
+
name: ruby/gem_rbs_collection
|
86
|
+
revision: 0a45b6d56b0e1b089731f5eb007912a7c36be121
|
87
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
88
|
+
repo_dir: gems
|
89
|
+
- name: securerandom
|
90
|
+
version: '0'
|
91
|
+
source:
|
92
|
+
type: stdlib
|
93
|
+
- name: steep
|
94
|
+
version: 1.2.1
|
95
|
+
source:
|
96
|
+
type: rubygems
|
97
|
+
- name: strscan
|
98
|
+
version: '0'
|
99
|
+
source:
|
100
|
+
type: stdlib
|
101
|
+
- name: monitor
|
102
|
+
version: '0'
|
103
|
+
source:
|
104
|
+
type: stdlib
|
105
|
+
- name: date
|
106
|
+
version: '0'
|
107
|
+
source:
|
108
|
+
type: stdlib
|
109
|
+
- name: singleton
|
110
|
+
version: '0'
|
111
|
+
source:
|
112
|
+
type: stdlib
|
113
|
+
- name: mutex_m
|
114
|
+
version: '0'
|
115
|
+
source:
|
116
|
+
type: stdlib
|
117
|
+
- name: time
|
118
|
+
version: '0'
|
119
|
+
source:
|
120
|
+
type: stdlib
|
121
|
+
- name: pathname
|
122
|
+
version: '0'
|
123
|
+
source:
|
124
|
+
type: stdlib
|
125
|
+
- name: forwardable
|
126
|
+
version: '0'
|
127
|
+
source:
|
128
|
+
type: stdlib
|
data/rbs_collection.yaml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Download sources
|
2
|
+
sources:
|
3
|
+
- name: ruby/gem_rbs_collection
|
4
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
5
|
+
revision: main
|
6
|
+
repo_dir: gems
|
7
|
+
|
8
|
+
# A directory to install the downloaded RBSs
|
9
|
+
path: .gem_rbs_collection
|
10
|
+
|
11
|
+
gems:
|
12
|
+
# Skip loading rbs gem's RBS.
|
13
|
+
# It's unnecessary if you don't use rbs as a library.
|
14
|
+
- name: rbs
|
15
|
+
ignore: true
|
16
|
+
- name: hashie
|
data/sig/ika3/weapon.rbs
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
module Ika3
|
2
|
+
class Weapon < Hash
|
3
|
+
include Hashie::Extensions::MethodAccess
|
4
|
+
|
5
|
+
ATTRIBUTES: ::Array[:name | :sub | :special]
|
6
|
+
|
7
|
+
attr_accessor io: untyped
|
8
|
+
|
9
|
+
include Ika3::Concerns::Utils
|
10
|
+
|
11
|
+
def self.find: (untyped weapon_key) -> untyped
|
12
|
+
|
13
|
+
def self.find_by_name: (untyped weapon_name) -> untyped
|
14
|
+
|
15
|
+
def self.filter_by_sub: (untyped sub_name) -> untyped
|
16
|
+
|
17
|
+
def self.reload_config!: () -> untyped
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def self.names: () -> Array[Symbol]
|
22
|
+
|
23
|
+
def self.weapons: () -> Array[Object]
|
24
|
+
|
25
|
+
def self.sub_weapons: () -> Array[Object]
|
26
|
+
|
27
|
+
def self.config: () -> untyped
|
28
|
+
|
29
|
+
def self.config_sub_weapons: () -> untyped
|
30
|
+
|
31
|
+
def self.valid?: (untyped weapon_key) -> bool
|
32
|
+
end
|
33
|
+
end
|
data/sig/ika3.rbs
ADDED
metadata
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ika3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- YutaGoto
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-12-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 5.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hashie
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.0.5
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.0.5
|
41
|
+
description: いか3
|
42
|
+
email:
|
43
|
+
- you.goto.510@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".rspec"
|
49
|
+
- Gemfile
|
50
|
+
- Gemfile.lock
|
51
|
+
- LICENSE.txt
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- Steepfile
|
55
|
+
- config/sub_weapons.yml
|
56
|
+
- config/weapons.yml
|
57
|
+
- ika3.gemspec
|
58
|
+
- lib/ika3.rb
|
59
|
+
- lib/ika3/concerns/utils.rb
|
60
|
+
- lib/ika3/version.rb
|
61
|
+
- lib/ika3/weapons.rb
|
62
|
+
- rbs_collection.lock.yaml
|
63
|
+
- rbs_collection.yaml
|
64
|
+
- sig/ika3.rbs
|
65
|
+
- sig/ika3/concerns/utils.rbs
|
66
|
+
- sig/ika3/weapon.rbs
|
67
|
+
homepage: https://github.com/YutaGoto/ika3
|
68
|
+
licenses:
|
69
|
+
- MIT
|
70
|
+
metadata:
|
71
|
+
homepage_uri: https://github.com/YutaGoto/ika3
|
72
|
+
source_code_uri: https://github.com/YutaGoto/ika3
|
73
|
+
post_install_message:
|
74
|
+
rdoc_options: []
|
75
|
+
require_paths:
|
76
|
+
- lib
|
77
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 2.6.0
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
requirements: []
|
88
|
+
rubygems_version: 3.3.7
|
89
|
+
signing_key:
|
90
|
+
specification_version: 4
|
91
|
+
summary: いか3
|
92
|
+
test_files: []
|