-
Notifications
You must be signed in to change notification settings - Fork 50
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
base: master
Are you sure you want to change the base?
Add Saved selection for modules and Transfer Ownership Module #501
Conversation
|
Is that naked unit bug fix basically same as in ACEX Headless or did you improve it in any way? Side-note: It would be nice to have ACEX Headless compatibility when transfering to client (automatically put into headless blacklist for automatic transfers). Or an API event to be able to do it in a mission framework for example. |
Oh, I forgot about the ACEX one. I basically improved the Achilles' version of the fix by switching to unscheduled and reducing network traffic by not broadcasting the loadouts to all clients.
Yeah, we still have to look into this. |
ACEX Headless does transmit loadout to everyone as well, and that is for sure an improvement in network traffic. But I don't see how it can be enough of an improvement to "fix" the issue, not while there are a million way more intensive things being broadcasted. This seems to be a possible better fix (which I haven't implemented in ACEX yet): acemod/ACEX#180 (comment) (also ref. linked BI ticket). We also haven't really experienced this issue since the first fix implementation in ACEX, so I am mostly putting it down to badly optimized missions/mods. |
I agree with that, but the more important improvement of the new implementation is that the loadouts are guaranteed to be defined when you restore them. Achilles did not check and wait for the loadouts broadcasted via public |
Ah I see what you mean. That's actually a pretty good point. |
Actually, seeing now the ACEX implementation. The |
Sure, I think that would be in scope. Want to open a PR? |
Yeah, I'll work on one when I got time. |
Awesome! 👍 Yeah, it's tagged for 3.16. But things are slow in this age of Arma 3. |
This reverts commit bb41331.
Reverted the fix in favor of CBATeam/CBA_A3#1406 |
* 0: Entity: group, marker, object, or waypoint <GROUP, STRING, OBJECT, ARRAY> | ||
* | ||
* Return Value: | ||
* Handled <BOOL> |
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.
Can this event handler be overridden?
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.
No, we don't store the index of the event anywhere, but we did the same for all other curator event handlers. We could consider bridging them with CBA event handlers, but I would make a separate PR for such a change.
Target: if remote then curator else if HCs then HC else server HC scripts: if default going to HC then enabled, else disabled
], | ||
[ | ||
"TOOLBOX", | ||
LSTRING(ModuleTransferOwnership_HCScripts), |
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.
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?
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.
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
Co-authored-by: Ralfs Garkaklis <ralfs@garkaklis.com>
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 would like to see this feature moved to its own component so it is easier to work on in the future. editor
component already has a lot of responsibilities and it will be difficult to see everything involved in making this work.
[QGVAR(transferOwnership), { | ||
params ["_entities", "_target"]; | ||
if (!(_entities isEqualType [])) then { | ||
_entities = [_entities]; | ||
}; | ||
private _clientID = 0; | ||
if (_target isEqualType 0) then { | ||
_clientID = _target; | ||
}; | ||
if (_target isEqualType objNull) then { | ||
_clientID = owner _target; | ||
}; | ||
{ | ||
if (_x isEqualType grpNull) then { | ||
_x setGroupOwner _clientID; | ||
} else { | ||
if (group _x == grpNull) then { | ||
_x setOwner _clientID; | ||
} else { | ||
group _x setGroupOwner _clientID; | ||
}; | ||
}; | ||
} forEach _entities; | ||
}] call CBA_fnc_addEventHandler; |
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 think this is big enough to warrant moving into a function/separate file.
"TOOLBOX", | ||
[LSTRING(ModuleTransferOwnership_HCScripts), LSTRING(ModuleTransferOwnership_HCScripts_Description)], | ||
[parseNumber (_defaultTarget == 2), 1, 2, [ | ||
ELSTRING(common,Disabled), | ||
ELSTRING(common,Enabled) | ||
]], | ||
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.
Use TOOLBOX:ENABLED
here.
{ | ||
drawIcon3D [ | ||
GVAR(lastModuleIcon), | ||
GVAR(colour), getPosVisual _x, 1, 1, 0 |
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.
getPosVisual
returns AGLS, drawIcon3D
expects AGL.
When merged this pull request will:
zen_editor_savedSelection
which tracks the previous-to-last content ofcuratorSelected
, used for selecting entities then dropping a module affecting them.