Repository navigation
The Vneck GA QoL Improvement: Add an opt-in Galactic Anomaly countdown to the HUD - #299
Conversation
|
This PR contains more than just it's own change and therefore can't be committed as is. |
1ed9d12 to
da8f3b2
Compare
|
You're right—the shared helper branches had brought unrelated changes into this PR. I've rebuilt it on current dev with only the anomaly timer, its TOML setting and localized examples. The shared helpers, loading-screen changes, tests and CI wiring are out of both the diff and the branch ancestry; #304 and #305 are no longer prerequisites. The timer keeps its invocation and metadata safety checks locally. The Windows release build and example-config validation pass. I've also updated the description to match the standalone change and distinguish the earlier in-game testing from this cleanup. |
netniV
left a comment
There was a problem hiding this comment.
There seems to be a lot of overlap with existing functions, just wondering why we are creating a whole new set?
| New function | Existing equivalent | Meaningful difference |
|---|---|---|
| Class() | il2cpp_get_class_helper_impl() | Adds null checks for domain, assembly and image. |
| TypeMethod() | GetMethodInfoSpecial() | Also searches parents, excludes generic methods and selects exactly System.Type. |
| Get() / Value() | GetProperty().GetRaw() / .Get() | Supports arbitrary zero-argument methods; Value() validates value type and size. Existing property helpers resolve virtual methods. |
| Set() | GetProperty().SetRaw() | Also handles ordinary methods such as SetActive; reports invocation failure. |
| Component() / WithType() | GameObject::GetComponentFastPath2() / GetType() | Accepts runtime classes and Component targets, and supports other type-taking methods. |
| Local Vector2 / Color | Existing vec2 / color | Repeats the same component fields; existing structs are explicitly packed. |
|
@netniV Thanks for mapping the overlap. I pushed 3c464eb: property getters now use the existing GetProperty().GetRaw() helper, and the local Vector2/Color copies are replaced by the repository's packed vec2/color types. I kept the smaller local wrappers where the behavior differs: Class guards missing optional assemblies; TypeMethod filters generic overloads, searches parents and selects System.Type; Value checks boxed type and size and can call the ordinary CanShowGalacticAnomaly method; Set reports invocation failures and also handles SetActive; Component/WithType accept runtime-selected classes and Component targets. The alternative is to extend the shared helpers. That would expand their API and require checking other callers as part of this PR, so I kept the feature-specific checks local. If another patch needs them, they can be promoted into the shared helpers with that use case. |
Adds an opt-in countdown for the Galactic Anomaly in the viewed system. It appears below the Help All / Engage / Claim buttons, follows that HUD drawer's scale and visibility, and reads the game's remaining-time data every 250 ms. It hides when the viewed system is ineligible or the anomaly expires.
Enable it in the existing
[graphics]section ofcommunity_patch_settings.toml, then restart:The setting defaults to false and all localized examples are updated. The implementation uses the existing main-thread ScreenManager update dispatcher, adds no detour target, and does not intercept clicks. Property getters and vector/color values now use existing repository helpers and types. Optional metadata lookup, checked method invocation and Unity object checks stay within the timer implementation; the PR stands alone against dev.
Validation: Windows release build and diff checks passed; all 11 example files parse as TOML. The earlier Windows client 262 build was tested in-game for countdown operation, final placement and the manager cache. The exact Windows release DLL for commit 3c464eb passed a user smoke test; its scope was not specified. Expiry, HUD recreation/reload and macOS runtime remain unverified; PR CI checks macOS compilation.