Skip to content

Shelved PR 495 string gated tips

rayswaynl edited this page Jul 3, 2026 · 1 revision

Shelved: PR #495 — string-valued tip gates (fail-closed)

State: Ray-shelved 2026-07-03 (Build 89 / cmdcon44 pick round, "No"). PR #495 was closed without merging; nothing from it is in Build 89 / cmdcon44.

WHAT

Makes the client tip-rotation gate accept string-valued configured constants in addition to scalar feature flags, so tips gated on a string constant become eligible when that string is non-empty (fail-closed for any other type).

Today Client_TipRotation.sqf evaluates each tip's optional gate with a numeric test only:

if (typeName _flag == "STRING" && {_flag != ""}) then {
    if ((missionNamespace getVariable [_flag, 0]) < 1) then {_ok = false};
};

When the gate name resolves to a string missionNamespace value (e.g. WFBE_C_GUER_VBIED_TYPE, WFBE_C_GUER_KA137_FLARE_LAUNCHER — both configured as classname strings, not scalars), "someString" < 1 is a type-error path that silently suppresses those tips. PR #495 replaced the single numeric compare with a type switch:

_gate = missionNamespace getVariable [_flag, 0];
_gateType = typeName _gate;
switch (_gateType) do {
    case "SCALAR": {if (_gate < 1) then {_ok = false}};
    case "STRING": {if ((count (toArray _gate)) < 1) then {_ok = false}};
    default {_ok = false};
};

Behavior after the change: missing gate → scalar 0 → hidden; scalar gate → requires >= 1; string gate → eligible when the string is non-empty; any other type → hidden.

WHERE

  • PR: #495 — "[codex] Lane 245: allow string-gated tips".
  • Branch / head commit: codex/lane245-tiprotation-string-gates @ 32b867b5dd79535b5cf43e96717f9149b373e190.
  • Flags: None. Pure gate-logic change to existing tip rotation; no new missionNamespace constant registered.
  • Files touched (all 3 maps):
    • Missions/[55-2hc]warfarev2_073v48co.chernarus/Client/Functions/Client_TipRotation.sqf
    • Missions_Vanilla/[61-2hc]warfarev2_073v48co.takistan/Client/Functions/Client_TipRotation.sqf
    • Missions_Vanilla/[61-2hc]warfarev2_073v48co.zargabad/Client/Functions/Client_TipRotation.sqf
    • (adds _gateType to the file's private[...] array.)

WHY SHELVED

Ray's pick round call (2026-07-03): No. The affected tips are the two GUER-specific entries (VBIED / Ka-137 flare launcher) that are gated on string classname constants; the net effect of the PR is to surface those two tips when their GUER features are configured. Ray chose not to fold it into Build 89. This is a cosmetic tip-visibility change only — no gameplay, economy, deploy, or GUER-constant impact — so shelving costs nothing at runtime (the tips simply remain hidden as they are today).

HOW TO REVIVE

Clean, low-risk revive whenever the GUER VBIED / Ka-137 tips should be shown:

  • Cherry-pick / re-merge branch codex/lane245-tiprotation-string-gates @ 32b867b5d — it applies to Client_TipRotation.sqf on all three maps and is A2-OA-safe (plain switch/typeName/count (toArray _); no A3 constructs; no ==/!= on Booleans; no namespace setVariable changes; verified check_sqf.py --select A3CMD,BRACKET,NSSETVAR3 clean, bracket delta 0/0/0).
  • Because it is a CLIENT file change, a revive MUST bump the pbo filename + repoint the mission cfg (client changes are cached by filename — see wiki: in-place same-name pbo does not reach A2 clients).
  • Fold via the Chernarus source only, then mirror to TK/ZG with Tools/LoadoutManager so all three Client_TipRotation.sqf files stay hash-matched.
  • No design rework needed; this is purely a "show these two GUER tips" toggle by way of fixing the string-gate type handling.

Sidebar

Clone this wiki locally