hlockey-cli 5 → 7
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/lib/hlockey-cli/actions.rb +25 -6
- data/lib/hlockey-cli/version.rb +1 -1
- data/lib/hlockey-cli.rb +9 -3
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16c105a7278c17b2607ce986bf7a981b889e61f0491cdc775686a23d4663156e
|
4
|
+
data.tar.gz: 3bdb643cd56cc6cad07daf475bc30c34f4a6b95cf8043857c726fb917fe1771c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b32e295fcba98f400ca103085b0832456c9cb4633fb3560e1ff32714ab025ea27627ab7e0464abe415979a74d59b4b229d1ccb15134664e1aa5ede3146fe785
|
7
|
+
data.tar.gz: 2e857344663204a55f0fd3f4593281ada017c46cf0f64bef3de2dced81f8b2597ed872a205e7c846ed4691bdcf15cd9f29dae288894997213ee99f46157cd6e6
|
data/lib/hlockey-cli/actions.rb
CHANGED
@@ -9,7 +9,7 @@ module HlockeyCLI
|
|
9
9
|
class << self
|
10
10
|
def games(league)
|
11
11
|
if league.games.empty?
|
12
|
-
puts(Hlockey::Message.
|
12
|
+
puts(Hlockey::Message.new(:season_off))
|
13
13
|
return
|
14
14
|
end
|
15
15
|
|
@@ -40,7 +40,9 @@ module HlockeyCLI
|
|
40
40
|
|
41
41
|
def standings(league)
|
42
42
|
if league.champion_team
|
43
|
-
puts(Hlockey::Message.
|
43
|
+
puts(Hlockey::Message.new(:season_champion,
|
44
|
+
season: league.season,
|
45
|
+
team: league.champion_team))
|
44
46
|
elsif league.playoff_teams
|
45
47
|
(league.playoff_teams.length / 2).times do |i|
|
46
48
|
put_standings("Playoff Matchup #{i + 1}",
|
@@ -57,18 +59,19 @@ module HlockeyCLI
|
|
57
59
|
(chosen_team.nil? ? league.teams : [chosen_team]).each do |team|
|
58
60
|
puts("#{team.emoji} #{team}")
|
59
61
|
puts("\"#{team.motto}\"")
|
62
|
+
puts(" Evolutions: #{team.evolutions}")
|
60
63
|
puts(" Stadium:")
|
61
64
|
Hlockey::Utils.hash_display_keys(team.stadium.to_h).each do |key, val|
|
62
65
|
puts(" #{key}: #{val}")
|
63
66
|
end
|
64
67
|
team.roster_display.each do |pos, player|
|
65
68
|
puts(" #{pos}:\n #{player}")
|
66
|
-
|
69
|
+
put_info(player)
|
67
70
|
end
|
68
71
|
puts(" Shadows:")
|
69
72
|
team.shadows.each do |player|
|
70
73
|
puts(" #{player}")
|
71
|
-
|
74
|
+
put_info(player)
|
72
75
|
end
|
73
76
|
puts(" Wins: #{team.wins}")
|
74
77
|
puts(" Losses: #{team.losses}")
|
@@ -123,9 +126,25 @@ module HlockeyCLI
|
|
123
126
|
end
|
124
127
|
end
|
125
128
|
|
126
|
-
# @param player [Hlockey::Player]
|
127
|
-
def
|
129
|
+
# @param player [Hlockey::Team::Player]
|
130
|
+
def put_info(player)
|
128
131
|
player.stat_display.each { |key, value| puts(" #{key}: #{value}") }
|
132
|
+
|
133
|
+
return if player.mods.empty?
|
134
|
+
|
135
|
+
puts(" Mods:")
|
136
|
+
player.mods.each do |mod|
|
137
|
+
mod_data = mod.to_data
|
138
|
+
|
139
|
+
if mod_data.is_a?(Array)
|
140
|
+
puts(" #{mod_data.first}")
|
141
|
+
puts(" #{mod.class::DESCRIPTION}")
|
142
|
+
mod_data[1..].each { puts(" With: #{_1}") }
|
143
|
+
else
|
144
|
+
puts(" #{mod_data}")
|
145
|
+
puts(" #{mod.class::DESCRIPTION}")
|
146
|
+
end
|
147
|
+
end
|
129
148
|
end
|
130
149
|
end
|
131
150
|
end
|
data/lib/hlockey-cli/version.rb
CHANGED
data/lib/hlockey-cli.rb
CHANGED
@@ -4,16 +4,22 @@ require("hlockey-cli/actions")
|
|
4
4
|
require("hlockey-cli/user_selection")
|
5
5
|
require("hlockey-cli/version")
|
6
6
|
|
7
|
+
##
|
8
|
+
# Hlockey CLI
|
7
9
|
module HlockeyCLI
|
8
10
|
def self.main
|
9
11
|
puts("Please wait...")
|
10
12
|
|
11
13
|
Hlockey::Message.colorize = ->(color, string) { Paint[string, color] }
|
12
14
|
|
13
|
-
league = Hlockey
|
15
|
+
league = Hlockey.new_current_league
|
14
16
|
alerts = league.alerts.clone
|
15
17
|
|
16
|
-
|
18
|
+
if Time.now < league.start_time
|
19
|
+
puts(Hlockey::Message.new(:season_starts,
|
20
|
+
season: league.season,
|
21
|
+
time: league.start_time))
|
22
|
+
end
|
17
23
|
|
18
24
|
loop do
|
19
25
|
league.update_state
|
@@ -23,7 +29,7 @@ module HlockeyCLI
|
|
23
29
|
alerts.each(&method(:puts))
|
24
30
|
puts # newline
|
25
31
|
end
|
26
|
-
puts(Hlockey::Message.
|
32
|
+
puts(Hlockey::Message.new(:season_day, season: league.season, day: league.day))
|
27
33
|
|
28
34
|
selected_action = user_selection(
|
29
35
|
Actions::ACTIONS,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hlockey-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '7'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lavender Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hlockey
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '7'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: paint
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.3'
|
41
41
|
description: Hlockey console application.
|
42
|
-
email:
|
42
|
+
email: lavender.perry@outlook.com
|
43
43
|
executables:
|
44
44
|
- hlockey
|
45
45
|
extensions: []
|
@@ -50,11 +50,11 @@ files:
|
|
50
50
|
- lib/hlockey-cli/actions.rb
|
51
51
|
- lib/hlockey-cli/user_selection.rb
|
52
52
|
- lib/hlockey-cli/version.rb
|
53
|
-
homepage: https://
|
53
|
+
homepage: https://hlockey.gay
|
54
54
|
licenses:
|
55
55
|
- LicenseRef-LICENSE.md
|
56
56
|
metadata:
|
57
|
-
source_code_uri: https://
|
57
|
+
source_code_uri: https://codeberg.org/LavenderPerry/hlockey
|
58
58
|
post_install_message:
|
59
59
|
rdoc_options: []
|
60
60
|
require_paths:
|
@@ -63,14 +63,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
63
|
requirements:
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
66
|
+
version: 3.1.0
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - ">="
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
|
-
rubygems_version: 3.
|
73
|
+
rubygems_version: 3.5.9
|
74
74
|
signing_key:
|
75
75
|
specification_version: 4
|
76
76
|
summary: Enjoy Hlockey from your terminal.
|