Skip to content

feat: use dedicated :EVENT:SECTOR: and :EVENT:ENDMISSION: commands#98

Merged
fank merged 1 commit intomainfrom
feat/typed-sector-endmission-events
Mar 7, 2026
Merged

feat: use dedicated :EVENT:SECTOR: and :EVENT:ENDMISSION: commands#98
fank merged 1 commit intomainfrom
feat/typed-sector-endmission-events

Conversation

@fank
Copy link
Copy Markdown
Member

@fank fank commented Mar 7, 2026

Summary

Changes

  • fnc_handleCustomEvent.sqf: sector cases → :EVENT:SECTOR:, endMission case → :EVENT:ENDMISSION:
  • fnc_exportData.sqf: endMission → :EVENT:ENDMISSION: with [frame, side, message] (removed redundant "endMission" arg since the command identifies the type)

Test plan

  • hemtt build succeeds
  • In-game: sector capture/contest events recorded correctly
  • In-game: endMission event recorded correctly
  • Web playback shows sector and endMission events unchanged

Route sector events (captured/contested/capturedFlag) through :EVENT:SECTOR:
and endMission through :EVENT:ENDMISSION: instead of piggybacking on
:EVENT:GENERAL:. This matches the new typed event commands in the extension.

- fnc_handleCustomEvent: sector → :EVENT:SECTOR:, endMission → :EVENT:ENDMISSION:
- fnc_exportData: endMission → :EVENT:ENDMISSION: with [frame, side, message]
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the event handling mechanism by introducing dedicated event commands, ":EVENT:SECTOR:" and ":EVENT:ENDMISSION:", for sector and end-mission events respectively. This change streamlines the routing of these specific event types, moving them away from the general event command, and is part of a broader effort to improve event data consistency and processing, as indicated by a companion extension PR.

Highlights

  • Event Routing: Dedicated commands ":EVENT:SECTOR:" and ":EVENT:ENDMISSION:" were introduced for sector and end-mission events, replacing the generic ":EVENT:GENERAL:".
  • fnc_handleCustomEvent.sqf: Updated to route sector events via ":EVENT:SECTOR:" and end-mission events via ":EVENT:ENDMISSION:".
  • fnc_exportData.sqf: Modified to use ":EVENT:ENDMISSION:" for end-mission events and removed a redundant "endMission" argument.
Changelog
  • addons/recorder/fnc_exportData.sqf
    • Switched endMission event command from ":EVENT:GENERAL:" to ":EVENT:ENDMISSION:".
    • Removed the redundant "endMission" argument from the event data array.
  • addons/recorder/fnc_handleCustomEvent.sqf
    • Updated the file description to reflect the new event routing strategy.
    • Modified the switch statement to route sector events using ":EVENT:SECTOR:".
    • Modified the switch statement to route endMission events using ":EVENT:ENDMISSION:" and adjusted its arguments.
Activity
  • The PR includes a test plan to verify correct recording of sector and endMission events in-game and their unchanged display in web playback.
  • "hemtt build" has been confirmed to succeed.
  • In-game testing for sector capture/contest events is pending.
  • In-game testing for endMission events is pending.
  • Web playback verification for sector and endMission events is pending.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors event handling to use more specific commands for sector and mission end events, which improves clarity. No specific security vulnerabilities were found in the provided code changes. However, an inconsistency was noted in fnc_handleCustomEvent.sqf where the event name is still included in the payload for sector events, unlike the endMission case.

Comment thread addons/recorder/fnc_handleCustomEvent.sqf
@fank fank merged commit 2bc1b7f into main Mar 7, 2026
1 check passed
@fank fank deleted the feat/typed-sector-endmission-events branch March 7, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant