-
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
AAR actions + track temperatures of spare barrels #3438
Conversation
Still a bit WIP. todo:
|
Should we leave the old |
|
I don't think anything prevents us from using a displayName. I don't think "Spare Barrel" will share it's name with any other item in any language.
|
@commy2, that code is pretty much what I was referring with this.
It just makes the code a little more complicated. |
For 3.6.0? |
Ah @esteldunedain just moved it ahead. |
Sorry, I never intended this for 3.5.0, I marked it by mistake. |
Function could be moved to common or even CBA. It's just that this has overhead. Losing translations for items feels bad. |
Yeah, it's very minor though. It only needs to be done a maximum of 4~5 times each time a barrel is swapped or temperatures are checked. |
@commy2, I'm more worried about the += operator for |
Only way to test this is to spawn as every machine gunner with the item and then to check if any grenades shows up as 0x in the hud, or if any items are missing. |
TRACE_4("cooling",_temperature,_totalTime,_barrelMass,_barrelSurface); | ||
|
||
private _time = 0; | ||
while {true} do { |
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.
while true in a call? are you sure?
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 works but cleaner might be;
while {_time >= _totalTime} do { .. };
_temperature max 0;
And obviously remove the exitWith
statement on line 57.
I don't see it as an issue eitherway though. Not in this context.
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.
Plus it's old code, I just moved it to a sepparate function.
But I do like @Glowbal's version better.
I cooked up these. Dunno if it's that useful for CBA or if it's superfluous.
|
This is pretty much ready, although more testing in MP would be good. As soon as @commy2 commit BTW @commy2, your function worked great even with text with accents and non-typical letters like the spanish translation of "Spare Barrel". |
Yup. It cannot be broken with any localization. |
|
||
if (_displayName isEqualTo "") exitWith {[]}; | ||
|
||
magazinesDetail _unit select {_x find _displayName == 0} apply {_x = _x splitString "[:]"; _x select (count _x - 1)}; |
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.
Wrap this in ()
and travis will no longer complain.
(magazinesDetail _unit select {_x find _displayName == 0}) apply {_x = _x splitString "[:]"; _x select (count _x - 1)};
I merged the AAR actions branch into this PR to keep things simple, specialy because I made some changes to the spare barrels functions to support the new code. @Glowbal, this should be ready for reviewing/merging. It's based on master, so target is 3.6.0. |
Overheating - Add Master Enabled Setting (barrelPR)
When merged this pull request will:
Known issues
Same as vehicle keys, the name of the spare Barrel item cannot be localized, because it is part of the it's name as returned byFixed.magazineDetails
. This could be worked around if deemed important enoughI'm not sure how to add magazines in config because it'd require the += operator. Maybe @commy2 can help with that. Otherwise, they could be added through scripting like the earplugs are, or not automatically added at allSpare barrels were removed from AR equipments.