Skip to content

refactor: standardize command names to :RESOURCE:ACTION: pattern#80

Merged
fank merged 1 commit intomainfrom
refactor/command-naming
Feb 23, 2026
Merged

refactor: standardize command names to :RESOURCE:ACTION: pattern#80
fank merged 1 commit intomainfrom
refactor/command-naming

Conversation

@fank
Copy link
Member

@fank fank commented Feb 23, 2026

Summary

  • Renames all addon command strings from inconsistent naming (overloaded :NEW:, mixed verb/noun ordering, bare nouns) to a consistent :RESOURCE:ACTION: pattern
  • System commands namespaced under :SYS: (INIT, VERSION, LOG, DIR)
  • Entity commands use :RESOURCE:CREATE/STATE: (SOLDIER, VEHICLE, PLACED, MARKER)
  • Event commands namespaced under :EVENT: (GENERAL, KILL, PROJECTILE, CHAT, RADIO)
  • Mission commands flipped to :MISSION:START/SAVE:
  • Callbacks aligned (:EXT:READY::SYS:READY:, :GETDIR::SYS:DIR:)

Coordinated change

Must be deployed together with the extension PR: OCAP2/extension#128

Test plan

  • hemtt build succeeds
  • Grep confirms zero leftover old command strings
  • Integration test with extension using matching branch

@gemini-code-assist
Copy link

Summary of Changes

Hello @fank, 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 significantly refactors the internal command naming scheme to enhance consistency and maintainability across the addon. By adopting a standardized :RESOURCE:ACTION: pattern and namespacing various command types, the changes improve the clarity and predictability of how different components communicate with the extension. This systematic approach simplifies future development and debugging efforts.

Highlights

  • Command Naming Standardization: All addon command strings have been renamed to follow a consistent :RESOURCE:ACTION: pattern, replacing inconsistent naming conventions.
  • System Commands Namespacing: System-related commands such as INIT, VERSION, LOG, and DIR are now consistently namespaced under :SYS:.
  • Entity Command Pattern: Commands related to entities like SOLDIER, VEHICLE, PLACED, and MARKER now use the :RESOURCE:CREATE/STATE: pattern for clarity.
  • Event Commands Namespacing: Event-related commands, including GENERAL, KILL, PROJECTILE, CHAT, and RADIO, are now namespaced under :EVENT:.
  • Mission Commands and Callbacks Alignment: Mission commands have been updated to :MISSION:START/SAVE:, and callbacks like :EXT:READY: and :GETDIR: have been aligned with the new :SYS: namespace.
Changelog
  • addons/extension/fnc_initSession.sqf
    • Renamed version, directory, ready, addon version, and storage initialization commands to use the :SYS: or :STORAGE: namespace.
    • Updated mission start command from :NEW:MISSION: to :MISSION:START:.
    • Changed extension initialization command from :INIT: to :SYS:INIT:.
  • addons/extension/fnc_newMission.sqf
    • Updated mission registration command from :NEW:MISSION: to :MISSION:START:.
  • addons/main/script_macros.hpp
    • Modified the OCAPEXTLOG macro to use the new :SYS:LOG: command.
  • addons/recorder/fnc_aceExplosives.sqf
    • Updated placed explosives data command from :NEW:PLACED: to :PLACED:CREATE:.
  • addons/recorder/fnc_captureLoop.sqf
    • Renamed soldier creation and state update commands to :SOLDIER:CREATE: and :SOLDIER:STATE: respectively.
    • Renamed vehicle creation and state update commands to :VEHICLE:CREATE: and :VEHICLE:STATE: respectively.
  • addons/recorder/fnc_eh_connected.sqf
    • Updated connected event logging command from :EVENT: to :EVENT:GENERAL:.
  • addons/recorder/fnc_eh_disconnected.sqf
    • Updated disconnected event logging command from :EVENT: to :EVENT:GENERAL:.
  • addons/recorder/fnc_eh_fired_client.sqf
    • Updated placed object creation command from :NEW:PLACED: to :PLACED:CREATE:.
  • addons/recorder/fnc_eh_fired_server.sqf
    • Renamed projectile event command from :PROJECTILE: to :EVENT:PROJECTILE:.
    • Updated placed object creation command from :NEW:PLACED: to :PLACED:CREATE:.
  • addons/recorder/fnc_eh_killed.sqf
    • Renamed kill event command from :KILL: to :EVENT:KILL:.
  • addons/recorder/fnc_exportData.sqf
    • Updated end mission event logging command from :EVENT: to :EVENT:GENERAL:.
    • Changed mission save command from :SAVE:MISSION: to :MISSION:SAVE:.
  • addons/recorder/fnc_handleChatMessage.sqf
    • Renamed chat message event command from :CHAT: to :EVENT:CHAT:.
  • addons/recorder/fnc_handleCustomEvent.sqf
    • Updated custom event logging command from :EVENT: to :EVENT:GENERAL:.
  • addons/recorder/fnc_handleMarkers.sqf
    • Renamed marker creation, state update, and deletion commands to :MARKER:CREATE:, :MARKER:STATE:, and :MARKER:DELETE: respectively.
  • addons/recorder/fnc_init.sqf
    • Updated extension version fetching command from :VERSION: to :SYS:VERSION:.
  • addons/recorder/fnc_radioEvent.sqf
    • Renamed radio event command from :RADIO: to :EVENT:RADIO:.
  • addons/recorder/fnc_telemetryLoop.sqf
    • Updated telemetry command from :TELEMETRY: to :TELEMETRY:FRAME:.
  • addons/recorder/fnc_updateTime.sqf
    • Renamed time state update command from :NEW:TIME:STATE: to :TIME:STATE:.
Activity
  • The pull request includes a summary of the refactoring and the new naming patterns.
  • A coordinated change is required with the extension PR refactor: standardize command names to :RESOURCE:ACTION: pattern extension#128, indicating a dependency.
  • The test plan includes verifying hemtt build success, confirming no leftover old command strings via grep, and integration testing with the matching extension branch.
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

@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

The pull request standardizes command names to a :RESOURCE:ACTION: pattern, improving consistency and clarity across the codebase. This refactoring impacts various parts of the system, including extension callbacks, logging, entity creation/state updates, event handling, and mission save/start commands. The changes align with the stated goal of making command names more predictable and organized.

…ttern

Rename all command strings from inconsistent naming (overloaded :NEW:,
mixed verb/noun ordering, bare nouns) to a consistent :RESOURCE:ACTION:
pattern. This is a coordinated change with the extension repo.

Key changes:
- System commands namespaced under :SYS: (INIT, VERSION, LOG, DIR)
- Entity commands use :RESOURCE:CREATE/STATE: (SOLDIER, VEHICLE, PLACED, MARKER)
- Event commands namespaced under :EVENT: (GENERAL, KILL, PROJECTILE, CHAT, RADIO)
- Mission commands flipped to :MISSION:START/SAVE:
- Telemetry uses :TELEMETRY:FRAME:
- Callbacks aligned (:EXT:READY: → :SYS:READY:, :GETDIR: → :SYS:DIR:)
@fank fank force-pushed the refactor/command-naming branch from 305cef4 to 97412ac Compare February 23, 2026 11:41
@fank fank merged commit 9ccbe8f into main Feb 23, 2026
@fank fank deleted the refactor/command-naming branch February 23, 2026 11:42
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