-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
faf-commons-data/src/main/java/com/faforever/commons/replay/header/GameMod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.faforever.commons.replay.header; | ||
|
||
/** | ||
* Populated by the game mods field of the table that is passed to `CLobby:LaunchGame` | ||
* @param location | ||
* @param name | ||
* @param description | ||
* @param author | ||
* @param uid | ||
* @param version | ||
* @param url | ||
* @param urlGithub | ||
*/ | ||
public record GameMod(String location, String name, String description, String author, String uid, String version, | ||
String url, String urlGithub) { | ||
} |
75 changes: 75 additions & 0 deletions
75
faf-commons-data/src/main/java/com/faforever/commons/replay/header/GameOption.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package com.faforever.commons.replay.header; | ||
|
||
/** | ||
* Populated by the game options field of the table that is passed to `CLobby:LaunchGame` | ||
* @param autoTeams | ||
* @param teamLock | ||
* @param teamSpawn | ||
* @param allowObservers | ||
* @param cheatsEnabled | ||
* @param prebuiltUnits | ||
* @param revealedCivilians | ||
* @param scoreEnabled | ||
* @param unitCap | ||
* @param unRated | ||
* @param victory | ||
*/ | ||
public record GameOption(AutoTeams autoTeams, TeamLock teamLock, TeamSpawn teamSpawn, boolean allowObservers, | ||
boolean cheatsEnabled, boolean prebuiltUnits, boolean revealedCivilians, boolean scoreEnabled, | ||
int unitCap, boolean unRated, Victory victory) { | ||
|
||
public enum AutoTeams { | ||
none("None"), | ||
manual("Manual"), | ||
tvsb("Top versus bottom"), | ||
lvsr("Left versus right"), | ||
pvsi("Even versus uneven"); | ||
|
||
private final String string; | ||
|
||
AutoTeams(String string) { | ||
this.string = string; | ||
} | ||
} | ||
|
||
public enum TeamLock { | ||
locked("Locked"), unlocked("Unlocked"); | ||
|
||
private final String string; | ||
|
||
TeamLock(String string) { | ||
this.string = string; | ||
} | ||
} | ||
|
||
public enum TeamSpawn { | ||
fixed("Fixed"), | ||
random("Random"), | ||
balanced("Balanced"), | ||
balanced_flex("Flexible balanced"), | ||
random_reveal("Random and revealed"), | ||
balanced_reveal("Balanced and revealed"), | ||
balanced_reveal_mirrored("Mirror balanced and revealed"), | ||
balanced_flex_reveal("Flexible balanced and revealed"); | ||
|
||
private final String string; | ||
|
||
TeamSpawn(String string) { | ||
this.string = string; | ||
} | ||
} | ||
|
||
public enum Victory { | ||
demoralization("Assasination"), | ||
domination("Supremacy"), | ||
eradication("Annihilation"), | ||
sandbox("Sandbox"); | ||
|
||
private final String string; | ||
|
||
Victory(String string) { | ||
this.string = string; | ||
} | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
faf-commons-data/src/main/java/com/faforever/commons/replay/header/Header.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.faforever.commons.replay.header; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Populated by the table that is passed to `CLobby:LaunchGame` | ||
*/ | ||
public record Header(String gameVersion, String replayVersion, String mapName, boolean cheatsEnabled, int seed, | ||
List<Source> sources, | ||
List<GameMod> mods, | ||
List<GameOption> gameOptions, | ||
List<PlayerOption> playerOptions | ||
) { | ||
} |
30 changes: 30 additions & 0 deletions
30
faf-commons-data/src/main/java/com/faforever/commons/replay/header/PlayerOption.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.faforever.commons.replay.header; | ||
|
||
/** | ||
* Populated by the player options field of the table that is passed to `CLobby:LaunchGame` | ||
* | ||
* @param isHuman | ||
* @param aiPersonality | ||
* @param ratingMean | ||
* @param ratingDeviation | ||
* @param clan | ||
* @param isCivilian | ||
* @param isReady | ||
* @param isBadMap | ||
* @param lobbyIndex | ||
* @param armyName | ||
* @param armyColor | ||
* @param playerColor | ||
* @param playerName | ||
* @param ratedGamesPlayed | ||
* @param country | ||
* @param team | ||
* @param faction | ||
* @param sourceId | ||
*/ | ||
public record PlayerOption(boolean isHuman, String aiPersonality, float ratingMean, float ratingDeviation, String clan, | ||
boolean isCivilian, boolean isReady, boolean isBadMap, int lobbyIndex, | ||
String armyName, String armyColor, String playerColor, String playerName, | ||
int ratedGamesPlayed, String country, | ||
int team, int faction, int sourceId) { | ||
} |
9 changes: 9 additions & 0 deletions
9
faf-commons-data/src/main/java/com/faforever/commons/replay/header/Source.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.faforever.commons.replay.header; | ||
|
||
/** | ||
* Populated by the engine to map clients to players | ||
* @param name | ||
* @param sourceId | ||
*/ | ||
public record Source(String name, int sourceId) { | ||
} |