-
Notifications
You must be signed in to change notification settings - Fork 735
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
CSW - Rework settings #9901
CSW - Rework settings #9901
Conversation
They aren't entirely separate. If you enable advanced assembly, you need ammo handling to be enabled.
if (GVAR(defaultAssemblyMode) && GVAR(ammoHandling) == 0) then { | ||
if (isServer) then { | ||
[QGVAR(ammoHandling), 2, 2, "server"] call CBA_settings_fnc_set; | ||
}; | ||
|
||
// Notify everyone about change | ||
[QEGVAR(common,displayTextStructured), [composeText [ | ||
lineBreak, | ||
parseText format [ | ||
"<t align='center'>%1</t>", format ["%1 requires %2 to be set higher than 0.", QGVAR(defaultAssemblyMode), QGVAR(ammoHandling)] | ||
], | ||
lineBreak, | ||
parseText format ["<t align='center'>%1</t>", "No mission restart is required."] | ||
], 4]] call CBA_fnc_localEvent; | ||
}; |
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 solution I had was to use a different set of global variables to use within the scripts. These global variables would copy the CBA settings at mission start, check if the settings are feasible, correct them accordingly and the variables wouldn't be touched after that.
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.
What I'm reading is CBA Settings framework could use support for child/dependent settings
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.
Definitely.
When merged this pull request will:
When a static weapon is placed down, it either remains a Vanilla weapon or is converted to CSW. If you change
GVAR(defaultAssemblyMode)
mid-mission, it won't change existing static weapons, but it will change all future ones, which imo doesn't make it require a mission restart.GVAR(ammoHandling)
on ifGVAR(defaultAssemblyMode)
is enabled.Check Ammo
interaction always available, regardless of ammo handling.IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.