openra 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/lib/openra/cli.rb +0 -1
- data/lib/openra/cli/commands/replay_data.rb +5 -7
- data/lib/openra/struct.rb +1 -0
- data/lib/openra/struct/client.rb +1 -1
- data/lib/openra/struct/sync_lobby_clients.rb +9 -0
- data/lib/openra/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4aa503f2dda6d282ec8bac4712589703d0be5ca
|
4
|
+
data.tar.gz: 244a1b4a23b706868b9b76e699b3a933bfa6836b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03fd2b0a66d2f4990de25c0e56b1b5f90028536c86db43410cab828493e4279ef1a38a140fd8c5a9700d787ed9a04f66d8f5d15571954df0de8bc8d67ed2575
|
7
|
+
data.tar.gz: d73bc9568db824a77b259377052f423735d2a2fec980e0682c52cb9e9da5f8009a3553aadf71eb0c75b7404bbde1f822d9eb297824099c9aa5dd6a1c4c627e7f
|
data/CHANGELOG.md
CHANGED
@@ -2,10 +2,19 @@
|
|
2
2
|
|
3
3
|
## Fixed
|
4
4
|
|
5
|
+
[replay-data] Use SyncLobbyClients to get chat names ([AMHOL](https://github.com/AMHOL))
|
6
|
+
[replay-data] Make client IP optional in client struct (fixes parsing replays with bots) ([AMHOL](https://github.com/AMHOL))
|
7
|
+
|
8
|
+
[Compare v1.1.0...HEAD](https://github.com/AMHOL/openra-ruby/compare/v1.1.0...HEAD)
|
9
|
+
|
10
|
+
## v1.1.0
|
11
|
+
|
12
|
+
## Fixed
|
13
|
+
|
5
14
|
* [replay-data] Make chat messages show name at time of message ([AMHOL](https://github.com/AMHOL))
|
6
15
|
* [replay-data] Only include clients present at game start ([AMHOL](https://github.com/AMHOL))
|
7
16
|
|
8
|
-
[Compare v1.0.1...
|
17
|
+
[Compare v1.0.1...v1.1.0](https://github.com/AMHOL/openra-ruby/compare/v1.0.1...v1.1.0)
|
9
18
|
|
10
19
|
## v1.0.1
|
11
20
|
|
data/lib/openra/cli.rb
CHANGED
@@ -79,20 +79,18 @@ module Openra
|
|
79
79
|
chat: []
|
80
80
|
}
|
81
81
|
|
82
|
-
|
83
|
-
clients: []
|
84
|
-
)
|
82
|
+
current_sync_clients = []
|
85
83
|
|
86
84
|
replay.orders.each do |order|
|
87
|
-
client =
|
85
|
+
client = current_sync_clients.find do |candidate|
|
88
86
|
candidate.index == order.client_index.to_s
|
89
87
|
end
|
90
88
|
|
91
89
|
case order.command
|
92
|
-
when '
|
93
|
-
|
90
|
+
when 'SyncLobbyClients'
|
91
|
+
current_sync_clients = Openra::Struct::SyncLobbyClients.new(
|
94
92
|
Openra::YAML.load(order.target)
|
95
|
-
)
|
93
|
+
).clients
|
96
94
|
when 'PlaceBuilding'
|
97
95
|
client_hash = replay_data[:clients].find do |candidate|
|
98
96
|
candidate[:index] == order.client_index.to_s
|
data/lib/openra/struct.rb
CHANGED
data/lib/openra/struct/client.rb
CHANGED
@@ -8,7 +8,7 @@ module Openra
|
|
8
8
|
attribute :faction_name, Types::Strict::String.meta(from: 'Faction')
|
9
9
|
attribute :spawn_point, Types::Strict::String.meta(from: 'SpawnPoint')
|
10
10
|
attribute :name, Types::Strict::String.meta(from: 'Name')
|
11
|
-
attribute :ip, Types::Strict::String.meta(from: 'IpAddress')
|
11
|
+
attribute :ip, Types::Strict::String.meta(from: 'IpAddress').optional.default(nil)
|
12
12
|
attribute :state, Types::Strict::String.meta(from: 'State')
|
13
13
|
attribute :team, Types::Strict::String.meta(from: 'Team')
|
14
14
|
attribute :slot, Types::Strict::String.meta(from: 'Slot', omittable: true)
|
data/lib/openra/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Holland
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- lib/openra/struct/player.rb
|
159
159
|
- lib/openra/struct/pre_processor.rb
|
160
160
|
- lib/openra/struct/sync_info.rb
|
161
|
+
- lib/openra/struct/sync_lobby_clients.rb
|
161
162
|
- lib/openra/types.rb
|
162
163
|
- lib/openra/version.rb
|
163
164
|
- lib/openra/yaml.rb
|