-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Garage Sell Button #3237
Garage Sell Button #3237
Conversation
Mostly copied from #general-dev-stuff: The main thing you're missing is that the internal garage code shouldn't be calling Antistasi functions (eg resources, vehiclePrice) or using Antistasi vars (eg. theBoss) directly. Instead that should go through stub functions in public.inc, and selling ability shouldn't be assumed, because the garage might be used as a separate mod where money isn't a valid concept. You'll need a separate commander check function from isCmdClient because unlocking and selling permissions are somewhat different. Should rename isCmdClient to canLock or something similarly specific. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just dealing with the Antistasi/Garage split for now.
Is editing garage code legal? Or you asked Hakon for it? |
Asked Hakon, yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency, a spelling error, and an optimization.
Co-authored-by: Jouni Järvinen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine. Could be refactored a bit, but that wouldn't necessarily make it more readable or substantially reduce the code size. I think I'd also prefer the sell price on the button, but whatever.
Marked one chunk of dead code that can be cleared out.
private _disp = findDisplay HR_GRG_IDD_Garage; | ||
|
||
{ | ||
_ctrl = _disp displayCtrl _x; | ||
_ctrl ctrlEnable false; | ||
_ctrl ctrlShow false; | ||
} forEach [HR_GRG_IDC_ExtraMounts,HR_GRG_IDC_ExtraTexture,HR_GRG_IDC_ExtraAnim,HR_GRG_IDC_ExtraPylonsContainer]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't do anything and can be stripped out. It's only present in onLoad because these controls all start enabled, and switchExtrasMenu only disables the currently-enabled control for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another consistency.
|
||
|
||
Return Value: | ||
<nil> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<nil> | |
<NIL> |
I missed this one somehow.
What type of PR is this.
What have you changed and why?
Information: Added an integrated sell button to the garage GUI.
Checks for commander status and locked status before selling
Please specify which Issue this PR Resolves.
closes #2377
Please verify the following and ensure all checks are completed.
Is further testing or are further changes required?
How can the changes be tested?
Steps:
Mostly needs testing to see if everything works in a multiplayer setting. None of the core functionality was changed too much, so it should be fine but still needs to be tested
Notes: