Repository navigation
Add cyberware-gated pool trajectory preview - #155
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the accepted optical trajectory assistant to pool, unlocked by cyberware actually installed through the ripperdoc. Default Kiroshi optics tiers 1/2/3 grant incoming impact guidance, separate white/first-object outgoing paths, then bounded cushion rebounds. Configuration controls the minimum free level, implant/slot/tier mappings, condition threshold, range, bounce limit and estimation precision. No implant grants no overlay by default.
The server reads character cyberware metadata, sends only the current shooter's personal numeric grant, and refreshes it independently once per second as well as on watch/entry. Inventory possession and client-supplied levels do not grant assistance. Implant removal, tier changes, ownership loss and character changes revoke the presentation; invalid or missing grants fail closed without interrupting ball playback.
The preview responds to direction and charge, includes drag/momentum-transfer/cushion loss, ends at pockets or the next static-ball collision, and deliberately quantizes direction/power. It is an estimate of the first impact, not a full multi-ball simulation. The existing HUD labels it as an optical estimate. Real ball physics, scoring, native model pack and shot validation remain unchanged.
Validation: full Lua suite 6,722 checks with zero failures; all 69 audits pass. New tests cover installed tiers/condition/slot/custom config, private grants, independent removal/tier refresh, spoofed levels, malformed wire data, first-impact geometry, cut-shot outgoing paths, pockets, charge-dependent range, cushion rebounds, cleanup and native line/VM limits. The measured worst preview callback at the maximum configured 6 m range is 7,300 instructions (guard 8,000); normal enabled-client startup is 6,000. Geometry remains within 20 native lines and expires after 200 ms. Syntax, sandbox scan and pool UI lifecycle pass.
Not yet verified in game: compare all three optic levels and withdrawal during play after reconnecting. Deployment adds the new TRAJECTORY defaults only when absent, preserving existing pool placement/settings. No assets, SQL migration, clinic placement or UI build change is required. MANUAL documents all settings and limits.
Closes #154. Documentation site tracking: opx77-framework/opx77_doc#19.