Expose Area Mex controller API#7874
Open
UnderarmCape wants to merge 1 commit into
Open
Conversation
Member
|
Can't area commands already be issued from Lua? Why is this needed? Is the issue that Area Mex is not actually implemented as an area command? |
Collaborator
|
I think this would be better solved by exposing this "give notifying order" utility |
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.
Work done
This PR adds a small controller-safe API bridge to
cmd_area_mex.lua:This commit is necessary in order to have functioning Area Mex behavior when using my gamepad support mod (see below)
https://github.com/UnderarmCape/underarmcape-bar-controller-support-attempt-01/releases
This lets controller UI code issue Area Mex with explicit center/radius parameters while reusing BAR's existing Area Mex logic.
The change avoids duplicating Area Mex internals inside a controller widget. The controller UI can provide the selected area directly, and
cmd_area_mex.luastill owns the actual Area Mex behavior: metal spot selection, extractor/build-option logic, command ordering, andWG.resource_spot_builder.ApplyPreviewCmds.Behavior
CommandNotifyhandling forGameCMD.AREA_MEXremains intact.WG.resource_spot_builder.ApplyPreviewCmdsflow is preserved.Setup
No special setup is required for normal mouse/keyboard testing.
Controller-side testing requires a controller UI/widget that calls:
Test steps
Testing performed
Notes
This is intended as a small upstreamable Lua API bridge for controller support. It does not add controller UI to BAR by itself; it only exposes a safe way for controller UI code to reuse the existing Area Mex implementation.