Class: VaultCoh::Player
- Inherits:
-
Object
- Object
- VaultCoh::Player
- Defined in:
- lib/vault_coh/player.rb
Overview
Game-specific player representation. Includes generally immutable information alongside data specific to the replay being parsed.
Instance Method Summary collapse
-
#battlegroup ⇒ Integer|NilClass
The pbgid of the battlegroup the player selected, or
nil
if no battlegroup was selected. -
#battlegroup_commands ⇒ Array<Command>
A list of only battlegroup-related commands executed by the player in the match.
-
#build_commands ⇒ Array<Command>
A list of only build-related commands executed by the player in the match.
-
#commands ⇒ Array<Command>
A list of all commands executed by the player in the match.
-
#faction ⇒ Faction::AMERICANS|Faction::WEHRMACHT|Faction::BRITISH|Faction::AFRIKAKORPS
The faction selected by the player in this match.
-
#human? ⇒ Boolean
Whether or not the player was a human or an AI/CPU player.
-
#messages ⇒ Array<Message>
A list of all messages sent by the player in the match.
-
#name ⇒ String
Name of the player at the time the replay was recorded.
-
#profile_id ⇒ Integer|NilClass
The Relic profile ID of the player, or
nil
if the player is AI. -
#steam_id ⇒ Integer|NilClass
The Steam ID of the player, or
nil
if the player is AI. -
#team ⇒ Team::FIRST|Team::SECOND
The team the player was assigned to.
-
#to_h ⇒ Hash
Returns a hash representation of the object.
Instance Method Details
#battlegroup ⇒ Integer|NilClass
The pbgid of the battlegroup the player selected, or nil
if no battlegroup was selected. For details on what this ID represents please see Commands::SelectBattlegroup#pbgid.
37 |
# File 'lib/vault_coh/player.rb', line 37 def battlegroup; end |
#battlegroup_commands ⇒ Array<Command>
A list of only battlegroup-related commands executed by the player in the match. A battlegroup command is any that involves the select or use of battlegroups and their abilities. Sorted chronologically from first to last.
79 |
# File 'lib/vault_coh/player.rb', line 79 def battlegroup_commands; end |
#build_commands ⇒ Array<Command>
A list of only build-related commands executed by the player in the match. A build command is any that enqueues the construction of a new unit or upgrade. Sorted chronologically from first to last.
71 |
# File 'lib/vault_coh/player.rb', line 71 def build_commands; end |
#commands ⇒ Array<Command>
A list of all commands executed by the player in the match. Sorted chronologically from first to last.
64 |
# File 'lib/vault_coh/player.rb', line 64 def commands; end |
#faction ⇒ Faction::AMERICANS|Faction::WEHRMACHT|Faction::BRITISH|Faction::AFRIKAKORPS
The faction selected by the player in this match.
24 |
# File 'lib/vault_coh/player.rb', line 24 def faction; end |
#human? ⇒ Boolean
Whether or not the player was a human or an AI/CPU player.
19 |
# File 'lib/vault_coh/player.rb', line 19 def human?; end |
#messages ⇒ Array<Message>
A list of all messages sent by the player in the match. Sorted chronologically from first to last.
58 |
# File 'lib/vault_coh/player.rb', line 58 def ; end |
#name ⇒ String
Name of the player at the time the replay was recorded. Note that the player may have changed their name since time of recording. If attempting to uniquely identify players across replay files, look at #steam_id and #profile_id instead. The string is UTF-16 encoded.
14 |
# File 'lib/vault_coh/player.rb', line 14 def name; end |
#profile_id ⇒ Integer|NilClass
The Relic profile ID of the player, or nil
if the player is AI. This ID can be used to uniquely identify a player between replays, and can be used to query statistical information about the player from Relic’s stats API.
52 |
# File 'lib/vault_coh/player.rb', line 52 def profile_id; end |
#steam_id ⇒ Integer|NilClass
The Steam ID of the player, or nil
if the player is AI. This ID can be used to uniquely identify a player between replays, and connect them to their Steam profile.
44 |
# File 'lib/vault_coh/player.rb', line 44 def steam_id; end |
#team ⇒ Team::FIRST|Team::SECOND
The team the player was assigned to. Currently only head-to-head matchups are supported (max two teams).
30 |
# File 'lib/vault_coh/player.rb', line 30 def team; end |
#to_h ⇒ Hash
Returns a hash representation of the object.
84 |
# File 'lib/vault_coh/player.rb', line 84 def to_h; end |