Skip to content
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

Add Saved selection for modules and Transfer Ownership Module #501

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4d6fd85
Saved Selection and Transfer Ownership
ampersand38 Jan 9, 2021
92f5c61
Toolbox for most Server and Curator targets
ampersand38 Jan 9, 2021
c85e34f
Check for players in selection
ampersand38 Jan 9, 2021
6b84b80
Added module description
ampersand38 Jan 9, 2021
40adda7
remove logging
ampersand38 Jan 9, 2021
3f4bcc2
Improved selection preview
Kexanone Jan 10, 2021
344c9d3
Force toolbox default value
ampersand38 Jan 10, 2021
ebffcfc
Clean-up
Kexanone Jan 10, 2021
f60054c
Merge branch 'save-selection-for-modules' of github-kex:ampersand38/Z…
Kexanone Jan 10, 2021
46a32a3
Add default value for icon cache
Kexanone Jan 10, 2021
bb41331
Naked unit bug fix
Kexanone Jan 11, 2021
c7d75d7
Revert "Naked unit bug fix"
Kexanone Jan 11, 2021
2a07065
add toolbox for hc scripts flags
ampersand38 Jan 12, 2021
84a8872
Update stringtable.xml
Kexanone Jan 13, 2021
30ad1c6
check CfgPatches instead of `acex_headless`
ampersand38 Jan 13, 2021
853b696
Update stringtable.xml
Kexanone Jan 13, 2021
ccf1ff6
Update stringtable.xml
Kexanone Jan 13, 2021
b535ee4
fix condition for objects
ampersand38 Jan 14, 2021
5c49b29
Switch to rendering time scope
Kexanone Jan 14, 2021
2124725
Use a single handler for selection icons
Kexanone Jan 23, 2021
46b755e
Fix syntax
Kexanone Jan 23, 2021
d9d8308
Remove _mehID
Kexanone Jan 23, 2021
e6a09c9
Single delete logic
Kexanone Jan 23, 2021
8feb8a7
Doc comment
Kexanone Jan 23, 2021
6b5755d
Remove correct event handler
Kexanone Jan 23, 2021
98916d6
Merge options
Kexanone Jan 23, 2021
e10c311
Sort player targets by name
Kexanone Jan 23, 2021
f6a5055
Prioritize HCs
Kexanone Jan 23, 2021
e6fe9bb
Change default values
ampersand38 Jan 25, 2021
5b458c4
Merge remote-tracking branch 'upstream/master' into save-selection-fo…
ampersand38 Feb 25, 2021
7d0f755
Update addons/modules/functions/fnc_moduleTransferOwnership.sqf
ampersand38 Mar 4, 2021
7e3f1d1
use select
ampersand38 Mar 4, 2021
a1696ce
Tooltip
ampersand38 Mar 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion addons/modules/functions/fnc_moduleTransferOwnership.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,20 @@ _clientNames = ["str_a3_om_common_definitions.incphone_44"] + _clientNames;
"COMBO",
LSTRING(ModuleTransferOwnership_Client),
[_clientTypes, _clientNames, 0]
],
[
"TOOLBOX",
LSTRING(ModuleTransferOwnership_HCScripts),
Copy link
Member

@CreepPork CreepPork Mar 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tooltip, at least, please? What is a HC script? To an end-user, no idea what this is and why I should enable it or disable it. And why is this a toggle, if it does something good why not auto it?

Copy link
Member Author

@ampersand38 ampersand38 Mar 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does auto-select based on the current locality:

  • If local, assume target will be HC and balancing will be enabled.
  • If remote, assume target will be Curator and balancing will be disabled.
    However I wanted to let user pick for edge cases.

What else can we do to make it easier to understand and use?
a1696ce

[_defaultTarget, 1, 3, [
ELSTRING(common,Enabled),
ELSTRING(common,Disabled),
ELSTRING(common,Unchanged)
]],
true
]
], {
params ["_values", "_args"];
_values params ["_target", "_player"];
_values params ["_target", "_player", "_HCState"];
_args params ["_entities", "_mehID"];

// Stop drawing icons
Expand All @@ -81,6 +91,16 @@ _clientNames = ["str_a3_om_common_definitions.incphone_44"] + _clientNames;
_player
};
};

// set headless client script flags
if (_HCState < 2) then {
if (acex_headless) then {
ampersand38 marked this conversation as resolved.
Show resolved Hide resolved
{
_x setVariable ["ace_headless_blacklist", [false, true] select _HCState, true];
} forEach _entities;
};
};

[QEGVAR(common,transferOwnership), [_entities, _targetID]] call CBA_fnc_serverEvent;
}, {
params ["", "_args"];
Expand Down
3 changes: 3 additions & 0 deletions addons/modules/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,9 @@
<Key ID="STR_ZEN_Modules_ModuleTransferOwnership_Server">
<English>Server</English>
</Key>
<Key ID="STR_ZEN_Modules_ModuleTransferOwnership_HCScripts">
<English>HC Scripts</English>
</Key>
<Key ID="STR_ZEN_Modules_BindVariable">
<English>Bind Variable To Object</English>
<Russian>Привязать переменную к объекту</Russian>
Expand Down