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

Interaction - Add condition to zeus actions #6665

Merged
merged 2 commits into from
Nov 11, 2018

Conversation

Dystopian
Copy link
Contributor

@Dystopian Dystopian commented Nov 7, 2018

When merged this pull request will:

  • title.

Zeus modules can be disabled/enabled with removeCuratorAddons/addCuratorAddons commands. This PR adds condition which checks if addon is enabled for curator and thus zeus interaction menu are controlled the same way.

ref #6632
@Bummeri

@@ -134,4 +134,6 @@
#define MRAD_TO_DEG(d) ((d) / 17.45329252) // Conversion factor: 9 / (50 * PI)
#define MOA_TO_RAD(d) ((d) * 0.00029088) // Conversion factor: PI / 10800

#define ZEUS_ACTION_CONDITION (QUOTE(QUOTE(ADDON)) in curatorAddons _target)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure about macro name because double QUOTE can't be used in actions added by script not config

Copy link
Contributor

Choose a reason for hiding this comment

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

"ace_zeus" in curatorAddons z is ~0.2ms with just ace or 0.5 with my full modset
so we might want to use cached call instead

#define ZEUS_ACTION_CONDITION ([nil, {QUOTE(QUOTE(ADDON)) in curatorAddons _target}, missionNamespace, QUOTE(QUOTE(GVAR(zeusCheck))), 60] call ace_common_fnc_cachedCall)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe add event to clear this cache, e.g. that one on interaction menu closed (don't remember exactly name)? 60s timeout can be not so effective if removeCuratorAddons/addCuratorAddons are used.

Copy link
Contributor

Choose a reason for hiding this comment

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

ace_interactMenuClosed

@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Nov 8, 2018
@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.12.4 Nov 8, 2018
@PabstMirror PabstMirror merged commit 40f371c into acemod:master Nov 11, 2018
@Dystopian Dystopian deleted the add_conditions_to_zeus_actions branch November 11, 2018 17:40
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* Add conditions to zeus actions

* Add condition caching
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.

2 participants