Skip to content

feat(recorder): exclude markers by type - #130

Draft
fank wants to merge 1 commit into
mainfrom
claude/marker-type-exclusion
Draft

fank wants to merge 1 commit into
mainfrom
claude/marker-type-exclusion

Conversation

@fank

@fank fank commented Oct 19, 2026

Copy link
Copy Markdown
Member

What

New CBA setting OCAP_settings_excludeMarkerTypeFromRecord (stringified array of marker type classnames, default []) so missions can filter out markers by type — not just by name prefix.

Addresses OCAP2/OCAP#99: zeus players place Empty-type markers as readable location notes, and those can't be filtered with the existing class-name/prefix exclusion. With ['Empty'] in the new setting they are simply not recorded.

Change

  • XEH_preInit.sqf: new EDITBOX setting in the Exclusions category (global, synced like the other exclusion settings).
  • fnc_handleMarkers.sqf:
    • MarkerCreated / MarkerUpdated event handlers skip markers whose markerType is in the list, client-side (same pattern and placement as the existing name-prefix exclusion — no network traffic).
    • Initial marker collection applies the same check.
    • Server-side CREATED case applies the check too as defense in depth.
  • fnc_init.sqf: parses the setting into OCAP_recorder_excludeMarkerTypeList (same isNil-guard pattern as OCAP_recorder_excludeMarkerList).
  • tests/recorder_regressions.sqf: new section — creates an Empty marker and a mil_dot marker with the exclusion active, asserts the excluded type produces no :MARKER:CREATE:, the other type does (and is tracked), and both deletions are handled correctly.

Design notes

  • Exact type match (config classname, e.g. Empty), consistent with excludeClassFromRecord semantics.
  • Deletions are intentionally not type-filtered: a MarkerDeleted event carries no type (the marker is already gone). That is safe because the server already drops deletions of markers it never tracked — and it keeps a marker that was recorded before the exclusion was enabled deletable.
  • The list is parsed at init time, exactly like the existing name-prefix list (the setting's change callback is empty for all exclusion settings).

Verification

  • hemtt check/hemtt build run in CI (the hemtt CLI could not be installed in my local environment; the diff is syntax-reviewed and follows the existing exclusion code patterns verbatim).
  • The new regression section follows the established suite patterns and needs its standard run in the disposable Arma test mission (per tests/README.md), same as all other sections — it is not executed by CI.

New CBA setting OCAP_settings_excludeMarkerTypeFromRecord (stringified
array of marker type classnames, default []) so missions can filter out
marker types that are used as internal bookkeeping, e.g. zeus players
placing Empty markers as readable location notes.

Addresses OCAP2/OCAP#99.

- MarkerCreated/MarkerUpdated handlers and the initial marker collection
  skip markers whose markerType is in the list, client-side, exactly like
  the existing name-prefix exclusion (no network traffic).
- Server-side CREATED case applies the same check as defense in depth.
- Marker deletions carry no type information and are intentionally not
  filtered: the server already drops deletions of markers it never
  tracked, so this keeps markers recorded before the exclusion was
  enabled deletable.
- tests/recorder_regressions.sqf gains a section covering an excluded
  type, a kept type, the tracked-marker state and both deletions.

This branch has not been deployed

No deployments
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