Skip to content

Commit

Permalink
Reverted get5_web_available to use int based gamestate
Browse files Browse the repository at this point in the history
  • Loading branch information
The0mikkel committed Feb 11, 2024
1 parent eb896e7 commit ead83da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions G5API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class Get5StatusTeam
public required string Side { get; set; }
}

public enum Get5GameState
public enum Get5GameState : int
{
None = 0,
PreVeto = 1,
Expand All @@ -81,7 +81,7 @@ public enum Get5GameState
public class G5WebAvailable
{
[JsonPropertyName("gamestate")]
public required string GameState { get; init; }
public required int GameState { get; init; }

[JsonPropertyName("available")]
public int Available { get; } = 1;
Expand Down Expand Up @@ -172,7 +172,7 @@ public void Get5StatusCommand(CCSPlayerController? player, CommandInfo command)
[ConsoleCommand("get5_web_available", "Returns get5 web available")]
public void Get5WebAvailable(CCSPlayerController? player, CommandInfo command)
{
command.ReplyToCommand(JsonSerializer.Serialize(new G5WebAvailable { GameState = mapGet5GameState(getGet5Gamestate()) }));
command.ReplyToCommand(JsonSerializer.Serialize(new G5WebAvailable { GameState = (int) getGet5Gamestate() }));
}

private Get5GameState getGet5Gamestate()
Expand Down

0 comments on commit ead83da

Please sign in to comment.