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 Repair and Rearm interactions to Zeus #6632

Merged
merged 2 commits into from
Oct 13, 2018

Conversation

Dystopian
Copy link
Contributor

When merged this pull request will:

  • title;
  • optimize conditions for zeus submenus a little;
  • add conditions for Stance and Remote Control menus;
  • make Remote Control statement multi-line;
  • simplify ace_rearm_fnc_rearmEntireVehicleSuccess params (remove nested array).

statement = QUOTE( \
private _unit = objNull; \
{ \
if ( \
Copy link
Contributor

Choose a reason for hiding this comment

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

this looks like it should be findIf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can't imagine how. Could you explain please?

Copy link
Contributor

@dedmen dedmen Oct 9, 2018

Choose a reason for hiding this comment

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

{
    if (
        side _x in [east,west,resistance,civilian]
        && !(isPlayer _x)
    ) exitWith { _unit = _x; };
} forEach (curatorSelected select 0); 

All this does is find the first unit where the condition returns true. Which is also what findIf does, returns the index of the first element where condition returns true..

private _unit = (curatorSelected select 0) param [
    (curatorSelected select 0) findIf { side _x in [east,west,resistance,civilian] && !(isPlayer _x) }
    , objNull];

Does the same thing. But get's rid of calling if and exitWith on every iteration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't know param can handle -1 as index. Without it this code wouldn't be so elegant.

Copy link
Contributor

Choose a reason for hiding this comment

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

param/params are literally the best commands ever.

@PabstMirror PabstMirror added this to the 3.13.0 milestone Oct 13, 2018
@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Oct 13, 2018
@PabstMirror PabstMirror changed the title Add Repair and Rearm interaction to zeus Zeus - Add Repair and Rearm interactions Oct 13, 2018
@PabstMirror
Copy link
Contributor

Works great
I'm wondering if these actions might be better as modules?
Like medical's Full Heal

@Dystopian
Copy link
Contributor Author

might be better as modules?

I want it to work with many vehicles at the same time, module can handle one vehicle only (as I know).

@PabstMirror
Copy link
Contributor

Also, I generally dislike big code in configs because it's hard to read and maintain (ARR_2( and quote mess), if this needs work in the future maybe we could think about moving to sqf

@PabstMirror PabstMirror merged commit d7c7ead into acemod:master Oct 13, 2018
@PabstMirror PabstMirror changed the title Zeus - Add Repair and Rearm interactions Add Repair and Rearm interactions to Zeus Oct 13, 2018
@Dystopian Dystopian deleted the add_zeus_fullrepair branch October 13, 2018 19:40
@Bummeri
Copy link

Bummeri commented Oct 23, 2018

@Dystopian Please do not add any rearm or repair actions to the interact menu. To my knowledge they cannot be easily removed by the scenario designer from that menu. I want to limit the curator actions to enable more versus oriented approach to curator actions. Adding them there limits the different ways zeus can be used.

@PabstMirror They would be much better if they were modules because that way I as a scenario designer can limit them. I am able to choose what modules get added to which curator and their costs etc.

I hope you please consider this point now and also in the future.

@Dystopian
Copy link
Contributor Author

@Bummeri really, I didn't think about it. What do you think about setting limiting those menus which mission designer can restrict in scenario?

@Bummeri
Copy link

Bummeri commented Oct 23, 2018

@Dystopian If I understand you correctly then that would be a better way to go, since I could disable them from such scenarios.

@Dystopian
Copy link
Contributor Author

I'll make a PR.

@Bummeri
Copy link

Bummeri commented Nov 4, 2018

If it is not done in another way then please revert this.

@Dystopian
Copy link
Contributor Author

This PR is not in release, I will make PR till release, just busy IRL.

@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.12.4 Nov 9, 2018
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* Add Repair and Rearm interaction to zeus

* Optimize remoteControl statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants