[Unreal] Add counters support to status#4333
[Unreal] Add counters support to status#4333markmandel merged 4 commits intoagones-dev:mainfrom GloryOfNight:feature/add-status-counters
Conversation
|
sorry, forgot to attach the file 😓 |
|
/gcbrun |
|
@keith-miller may I have your eyes on this? |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for counters in the Unreal SDK's status structure and fixes whitespace formatting issues by converting spaces to tabs for consistency with the codebase style.
Key changes:
- Added new
FCounterstruct to represent counter objects withCountandCapacityfields - Integrated counters map into
FStatusstruct to parse counter data from JSON responses - Fixed whitespace formatting in
AgonesSubsystem.cppby replacing spaces with tabs
Reviewed Changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| sdks/unreal/Agones/Source/Agones/Classes/Classes.h | Adds FCounter struct definition and integrates TMap<FString, FCounter> into FStatus; fixes tab indentation in FCounterResponse |
| sdks/unreal/Agones/Source/Agones/Private/AgonesSubsystem.cpp | Replaces trailing spaces with tabs in lambda functions for GetList, UpdateList, AddListValue, and RemoveListValue methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| UPROPERTY(BlueprintReadOnly, Category = "Agones") | ||
| int32 Count = 0; | ||
|
|
||
| UPROPERTY(BlueprintReadOnly, Category = "Agones") |
There was a problem hiding this comment.
Inconsistent formatting: The Category parameter should be formatted as Category="Agones" (without spaces around =) to match the predominant style used throughout the rest of this file (see lines 27, 30, 179, 182, 223, 226, etc.).
| UPROPERTY(BlueprintReadOnly, Category = "Agones") | |
| int32 Count = 0; | |
| UPROPERTY(BlueprintReadOnly, Category = "Agones") | |
| UPROPERTY(BlueprintReadOnly, Category="Agones") | |
| int32 Count = 0; | |
| UPROPERTY(BlueprintReadOnly, Category="Agones") |
| UPROPERTY(BlueprintReadOnly, Category = "Agones") | ||
| int32 Count = 0; | ||
|
|
||
| UPROPERTY(BlueprintReadOnly, Category = "Agones") |
There was a problem hiding this comment.
Inconsistent formatting: The Category parameter should be formatted as Category="Agones" (without spaces around =) to match the predominant style used throughout the rest of this file.
| UPROPERTY(BlueprintReadOnly, Category = "Agones") | |
| int32 Count = 0; | |
| UPROPERTY(BlueprintReadOnly, Category = "Agones") | |
| UPROPERTY(BlueprintReadOnly, Category="Agones") | |
| int32 Count = 0; | |
| UPROPERTY(BlueprintReadOnly, Category="Agones") |
| UPROPERTY(BlueprintReadOnly, Category="Agones") | ||
| TArray<FPort> Ports; | ||
|
|
||
| UPROPERTY(BlueprintReadOnly, Category = "Agones") |
There was a problem hiding this comment.
Inconsistent formatting: The Category parameter should be formatted as Category="Agones" (without spaces around =) to match the predominant style used throughout the rest of this file.
| UPROPERTY(BlueprintReadOnly, Category = "Agones") | |
| UPROPERTY(BlueprintReadOnly, Category="Agones") |
| int32 Count = 0; | ||
|
|
||
| UPROPERTY(BlueprintReadOnly, Category = "Agones") | ||
| int32 Capacity = 0; |
There was a problem hiding this comment.
Type inconsistency: FCounter uses int32 for Count and Capacity, while FCounterResponse (lines 466, 469) uses int64 for the same fields. These structures represent similar counter data and should use consistent types. Consider using int64 to match FCounterResponse and avoid potential truncation issues.
| int32 Count = 0; | |
| UPROPERTY(BlueprintReadOnly, Category = "Agones") | |
| int32 Capacity = 0; | |
| int64 Count = 0; | |
| UPROPERTY(BlueprintReadOnly, Category = "Agones") | |
| int64 Capacity = 0; |
|
Copilot is nitpicky! 😁 |
|
Build Succeeded 🥳 Build Id: fc52eb74-046c-4011-b01b-92a4ec72d247 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
/gcbrun |
Thank you @keith-miller ! - if you aren't careful you'll rack up enough reviews to become an approver on Agones 😁 |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Build Succeeded 🥳 Build Id: ee21cb2e-99f9-48f8-8365-7241eaece51c The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
/gcbrun |
rofl, I forgot to run it |
|
Build Succeeded 🥳 Build Id: ca726a69-81b6-40b8-93a6-6e1aa6a8b572 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
* add counters to status
What type of PR is this?
/kind feature
What this PR does / Why we need it:
Which issue(s) this PR fixes:
n/a
Special notes for your reviewer:
Recently we introduced that change internally, just wanted to share.