-
Notifications
You must be signed in to change notification settings - Fork 740
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
Interaction - Add Interaction to take another players launcher #10541
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Jouni Järvinen <[email protected]>
Right now this PR is on hold, as support for multiple muzzles breaks disposables |
thanks to johnb, this PR should be good to go |
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.
Only thing i can see. LGTM otherwise.
Co-authored-by: Mike-MF <[email protected]>
if (GVAR(enableLauncherTaking) && | ||
secondaryWeapon _target != "" && | ||
secondaryWeapon _player == "" && | ||
isNull objectParent _target && | ||
isNull objectParent _player && | ||
side _target == side _player) exitWith {true}; | ||
false |
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.
if (GVAR(enableLauncherTaking) && | |
secondaryWeapon _target != "" && | |
secondaryWeapon _player == "" && | |
isNull objectParent _target && | |
isNull objectParent _player && | |
side _target == side _player) exitWith {true}; | |
false | |
GVAR(enableLauncherTaking) && | |
secondaryWeapon _target != "" && | |
secondaryWeapon _player == "" && | |
isNull objectParent _target && | |
isNull objectParent _player && | |
side _target == side _player | |
I'd personally also wrap every single statement in a lazy eval, but I haven't tested the performance impact.
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.
I don't think this would work when the target is unconscious, as side
changes. Imo would be better to check if the sides have friendly relations (using the sides of the group).
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.
Still not a huge fan of this tbh. There's no way you can object to having your launcher taken.
I'd much prefer if you need to confirm that you want someone to take your launcher (uncon would automatically confirm).
private _playerName = [_player] call EFUNC(common,getName); | ||
private _cfgWeapons = configFile >> "CfgWeapons" >> _launcher; | ||
private _displayName = getText (_cfgWeapons >> "displayName"); | ||
[QEGVAR(common,displayTextStructured), [[LSTRING(TakingLauncherHint), _playerName, _displayName], 1.5, _target], [_target]] call CBA_fnc_targetEvent; |
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.
[QEGVAR(common,displayTextStructured), [[LSTRING(TakingLauncherHint), _playerName, _displayName], 1.5, _target], [_target]] call CBA_fnc_targetEvent; | |
[QEGVAR(common,displayTextStructured), [[LSTRING(TakingLauncherHint), _playerName, _displayName], 1.5, _target], _target] call CBA_fnc_targetEvent; |
[QEGVAR(common,displayTextStructured), [[LSTRING(GaveLauncherHint), _playerName, _displayName], 1.5, _target], [_target]] call CBA_fnc_targetEvent; | ||
[QEGVAR(common,displayTextStructured), [[LSTRING(TookLauncherHint), _targetName, _displayName], 1.5, _player], [_player]] call CBA_fnc_targetEvent; |
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.
[QEGVAR(common,displayTextStructured), [[LSTRING(GaveLauncherHint), _playerName, _displayName], 1.5, _target], [_target]] call CBA_fnc_targetEvent; | |
[QEGVAR(common,displayTextStructured), [[LSTRING(TookLauncherHint), _targetName, _displayName], 1.5, _player], [_player]] call CBA_fnc_targetEvent; | |
[QEGVAR(common,displayTextStructured), [[LSTRING(GaveLauncherHint), _playerName, _displayName], 1.5, _target], _target] call CBA_fnc_targetEvent; | |
[QEGVAR(common,displayTextStructured), [[LSTRING(TookLauncherHint), _targetName, _displayName], 1.5, _player], _player] call CBA_fnc_targetEvent; |
QGVAR(launcherTime), | ||
"SLIDER", |
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.
Even though I prefer this variant, imo it's better to keep consistent styling within the same file when possible.
QGVAR(launcherTime), | |
"SLIDER", | |
QGVAR(launcherTime), "SLIDER", |
LSTRING(takeLauncherTime), | ||
format ["ACE %1", LLSTRING(DisplayName)], | ||
[1, 20, 5, 0], | ||
true |
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.
true | |
1 |
QGVAR(enableLauncherTaking), "CHECKBOX", | ||
LSTRING(takeLauncherSetting), | ||
format ["ACE %1", LLSTRING(DisplayName)], | ||
true |
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.
- Not a fan of the default value, imo it should be off.
- This should be a synced setting imo.
When merged this pull request will:
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.