-
Notifications
You must be signed in to change notification settings - Fork 736
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
Rearm limited ammo truck munition #3431
Conversation
I'd wait with the module additions until we decide what to do with settings/Eden attributes. |
Adding width as optional fourth parameter
# Merged Conflicts in addons/rearm/CfgVehicles.hpp
} else { | ||
EGVAR(common,remoteFnc) = [_this, QFUNC(rearmSuccessLocal), 0]; | ||
_turretOwnerID publicVariableClient QEGVAR(common,remoteFnc); | ||
[QGVAR(rearmSuccessLocalEH), _turretOwnerID, _this] call EFUNC(common,targetEvent); | ||
}; | ||
} else { | ||
[_this, QFUNC(rearmSuccess), 1] call EFUNC(common,execRemoteFnc); |
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.
As discussed on Slack, use EFUNC(common,serverEvent)
here and in postInit add the event in isServer
only.
Has this been reviewed? It's a significant amount of code. |
No, I tested it a lot while writing it. That was 2 ArmA versions ago :-( |
Made params nicer, replaced some forEach and used params in XEH_respawn
@GitHawk any further testing on this? |
* Display a structured text. | ||
* | ||
* Arguments: | ||
* 0: Text <ANY> | ||
* 1: Size of the textbox (default: 1.5) <NUMBER> | ||
* 2: Target Unit. Will only display if target is the player controlled object (default: ACE_player) <OBJECT> | ||
* 3: Custom Width <NUMBER><OPTIONAL> |
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.
Why is that necessary? You can just calculate the size based on length of the string, not sure I like this.
Either way, that line should be like:
* 3: Custom Width <NUMBER> (default: 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.
In its original way, you couldn't manipulate the width at all.So in order to break less, I added an optional parameter.
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 guess it doesn't hurt but it will make it inconsistent with other hints. @commy2 ?
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 it won't. The default value is the old fixed value and since it's optional nothing else is broken.
]; | ||
|
||
if (isNull _truck || | ||
{_magazineClass isEqualTo ""}) exitWith {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.
Same line.
Since the first merge broke a lot of stuff, everything should be fine now. |
Why is this branch both change of headers and the rearm modification? |
Unfortunately no. I made this PR in February. In June it gets reviewed. Some changed to headers are suggested, as they changed since. To avoid me and others from making the same (copy paste) error again and again, I replaced all headers that were "wrong". Also I'm getting sick and tired of keeping my month-old PRs up to date. If you want some changes made, please PR me on my branch. |
We have priorities, and this is a large change in code |
Will re-PR this in multiple PRs appropriately. |
The rearm module will be expanded by a new option to select the ammunition amount in an ammo truck.
The two new availability levels are:
The current "unlimited" level will remain as default value.
Supply amount based on caliber means you can for example take either two .50cal magazines or a single 120mm magazine, but not a 155mm magazine when the amount is on the level of 154. So everything can be rearmed but with a limited supply, while bigger calibers take more supply.
Supply amount with certain magazines means you are required to add certain magazines to an ammo truck. No other weapons/magazines will be able to be resupplied.
Documentation for other modders/creators on how to enable refuel will be in a different PR