openra 0.1.0 → 0.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 +14 -1
- data/lib/openra/cli/commands/replay_data.rb +13 -4
- data/lib/openra/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b2745c6650b2d19d7d86501604c5a9d21be2f49
|
4
|
+
data.tar.gz: 8cba338497c93da033f472dd0bcb9bfbfd6e2765
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7723efc3646a9bca3fe9c473b78def3c1e7fcbac8dac2a7a9653c5e72ecea44a6041e356e0fbbd834bcef87b521d74fc33e590fc453bcbc2d82e0ff168671253
|
7
|
+
data.tar.gz: 76ef7c3987df77ef67b84a777af3919aa2b17bbbfe6b61247ba565fc510f249f27132f33bf50ef3bfebf1a6120a2f4171e6d48f135c6b328bb2b861d29a09fb1
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
-
|
3
|
+
## Added
|
4
|
+
|
5
|
+
* [replay-data] Show chosen and actual faction ([AMHOL](https://github.com/AMHOL))
|
6
|
+
* [replay-data] Add spawn point info
|
7
|
+
|
8
|
+
## Fixed
|
9
|
+
|
10
|
+
* [replay-data] Fetch team from replay metadata players hash ([AMHOL](https://github.com/AMHOL))
|
11
|
+
|
12
|
+
[Compare v0.1.0...HEAD](https://github.com/AMHOL/openra-ruby/compare/v0.1.0...HEAD)
|
13
|
+
|
14
|
+
## v0.1.0
|
4
15
|
|
5
16
|
## Added
|
6
17
|
|
@@ -10,3 +21,5 @@
|
|
10
21
|
## Fixed
|
11
22
|
|
12
23
|
* Return `null` for client team in replay data when team is not set ([AMHOL](https://github.com/AMHOL))
|
24
|
+
|
25
|
+
[Compare v0.0.5...v0.1.0](https://github.com/AMHOL/openra-ruby/compare/v0.0.5...v0.1.0)
|
@@ -69,18 +69,27 @@ module Openra
|
|
69
69
|
sync_info.each_pair do |key, data|
|
70
70
|
case key
|
71
71
|
when /^Client@/
|
72
|
+
player = player_mapping.fetch(data['Index'], {})
|
73
|
+
|
72
74
|
replay_data[:clients] << {
|
73
75
|
index: data['Index'],
|
74
76
|
name: utf8(data['Name']),
|
75
77
|
preferred_color: data['PreferredColor'],
|
76
78
|
color: data['Color'],
|
77
|
-
|
79
|
+
spawn: {
|
80
|
+
random: player.fetch('IsRandomSpawnPoint', 'False') == 'True',
|
81
|
+
point: player.fetch('SpawnPoint', nil)
|
82
|
+
},
|
83
|
+
faction: {
|
84
|
+
chosen: data['Faction'].downcase,
|
85
|
+
actual: player_mapping.fetch(data['Index'], {}).fetch('FactionId', nil)
|
86
|
+
},
|
78
87
|
ip: data['IpAddress'],
|
79
|
-
team:
|
88
|
+
team: player.fetch('Team', '0').to_s == '0' ? nil : data['Team'],
|
80
89
|
is_bot: data['Bot'].nil? ? false : true,
|
81
90
|
is_admin: data['IsAdmin'] == 'True',
|
82
|
-
is_player:
|
83
|
-
is_winner:
|
91
|
+
is_player: !player.empty?,
|
92
|
+
is_winner: player.fetch('Outcome', nil) == 'Won',
|
84
93
|
build: []
|
85
94
|
} unless replay_data[:clients].any? { |client| client[:index] == data['Index'] }
|
86
95
|
when 'GlobalSettings'
|
data/lib/openra/version.rb
CHANGED