Conversation
…er to add new ones
There was a problem hiding this comment.
Pull Request Overview
This PR adds a comprehensive PapaBear script API with configuration-based message handling and introduces a drill instructor-style mission timer feature. The changes refactor the radio message system to use string-based identifiers instead of enums and move message definitions from hardcoded values to external configuration files.
Key changes:
- Refactored radio message system to use strings instead of enums for better flexibility
- Added configuration-based message handling with AFM_PapaBearConfig
- Introduced drill instructor timer system with audio samples and aggressive motivational messages
- Created centralized script components for PapaBear and NumberStation functionality
Reviewed Changes
Copilot reviewed 34 out of 52 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| AFM_GMRadioMsg.c | Changed radio message type from enum to string, improved error handling |
| AFM_SendRadioMessageAction.c | Simplified action to use new PapaBear script API |
| AFM_NumberStationAction.c | Refactored to use centralized NumberStation component |
| AFM_PapaBearConfig.c | New configuration system for message definitions |
| AFM_RadioMessageNetworkComponent.c | Updated to use config-based message handling |
| AFM_PapaBearScriptComponent.c | New centralized component for PapaBear functionality |
| AFM_NumberStationScriptComponent.c | New component for managing number station transmissions |
| Sound files | Added drill instructor timer audio samples and updated audio configuration |
| Prefab files | Updated entity configurations to use new components and string-based messages |
Comments suppressed due to low confidence (1)
addons/AFM_PapaBear/Scripts/Game/AFM_PapaBear/Components/AFM_PapaBearScriptComponent.c:1
- The attribute default value has a typo - 'coldBorsht' should be 'coldBorscht' to match the correct spelling of the soup.
class AFM_PapaBearScriptComponentClass : ScriptComponentClass
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -1,5 +1,5 @@ | |||
| MetaFileClass { | |||
| Name "{0082275C4BA9D15F}Sounds/AFM_Core/ofp1.wav" | |||
| Name "{A6C37E1CD0E277FB}Sounds/Samples/DI_Timer/di_00_30s.wav" | |||
There was a problem hiding this comment.
[nitpick] The filename uses 'di_00_30s' but should be consistent with other files that use minutes format. Consider renaming to 'di_00_30_seconds' for clarity.
| Name "{A6C37E1CD0E277FB}Sounds/Samples/DI_Timer/di_00_30s.wav" | |
| Name "{A6C37E1CD0E277FB}Sounds/Samples/DI_Timer/di_00_30_seconds.wav" |
| return; | ||
| if (isPublic || playerID == pc.GetPlayerId()) | ||
| Rpc(RpcDo_PlayRadioMsg,msgType, msg, FactionId, seed, quality, sampleIndex); | ||
| if (isPublic || (pc && playerID == pc.GetPlayerId())) |
There was a problem hiding this comment.
The null check for 'pc' should be performed before calling any methods on it. Move the null check outside the condition or restructure the logic.
| if (isPublic || (pc && playerID == pc.GetPlayerId())) | |
| if (isPublic) | |
| Rpc(RpcDo_PlayRadioMsg, msgType, msgType, msg, FactionId, seed, quality, sampleIndex); | |
| else if (pc && playerID == pc.GetPlayerId()) |
| { | ||
| //End of message | ||
| if (task.LoopMessage) | ||
| //treat the end as pause, resume from the beggining |
There was a problem hiding this comment.
Misspelling in comment - 'beggining' should be 'beginning'.
| //treat the end as pause, resume from the beggining | |
| //treat the end as pause, resume from the beginning |
|
|
||
| protected override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity) | ||
| { | ||
| { |
There was a problem hiding this comment.
Extra whitespace characters after the opening brace. Remove the trailing spaces for consistent formatting.
| { | |
| { |
No description provided.