-
Notifications
You must be signed in to change notification settings - Fork 737
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
Medical & Captive Load Menu Overhaul #5519
Conversation
TODO: captive seems to rely on it's own functions and standards for loading people. Make it more like medical & use common's functions
@@ -0,0 +1,42 @@ | |||
/* | |||
* Author: 654wak654 | |||
* Adds child actions to the "load patient" action for near vehicles |
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.
Missing final dot.
* 1: The patient <OBJECT> | ||
* | ||
* Return Value: | ||
* The child actions |
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.
<ARRAY>
Also "The" is superfluous everywhere.
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 copied most things from other medical headers so I'm keeping all the "the"s.
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.
We should go for no "the"s, majority (I hope) is not using them, it's superfluous and quiet silly.
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.
at least for non-medical files
@@ -0,0 +1,42 @@ | |||
/* | |||
* Author: 654wak654 | |||
* Adds child actions to the "load captive" action for near vehicles |
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.
Missing final dot.
addons/captives/CfgVehicles.hpp
Outdated
@@ -51,6 +51,7 @@ class CfgVehicles { | |||
showDisabled = 0; | |||
icon = QPATHTOF(UI\captive_ca.paa); | |||
priority = 2.2; | |||
insertChildren = QUOTE([ARR_2(_player, _target)] call DFUNC(addLoadCaptiveActions)); |
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 _this call...
works here as well, so you don't need to do macro shenanigans.
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 [_target, _player]
and @654wak654 wants reversed array (I think).
Also space in ARR_2
macro. Also see @commy2 comment #5384 (review)
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.
He is calling his own function, may as well revers the order there.
Single quotes are fine but you lose syntax highlighting because it's all a long string then, personal preference. I prefer single quotes if it really makes the thing shorter, but in this case you don't need anything but QUOTE and DFUNC.
I will try to test this later, but there are some delicate issue when loading a person into a turret or FFV "gunner" position |
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 meant to press "request changes" above...
Move vehicles actions code to common function
|
||
params ["_unit"]; | ||
|
||
private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F", "Pod_Heli_Transport_04_crewed_base_F"], 10]; |
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.
Making the distance configurable by allowing it to be passed along as a parameter would be more flexible.
params ["_unit", ["_distance", 10]];
private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F", "Pod_Heli_Transport_04_crewed_base_F"], _distance];
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.
Because of this function's very specific purpose it's good that everyone gets the same search distance IMO.
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's a common function though. Name of it implies it finds nearest no matter the distance. As a common function I agree with @thojkooi, can always simply call it with distance of 10 from medical/captives.
Handcuffing a unit and loading (via captives) ✔️ |
This has been fixed by #5544 |
When merged this pull request will: