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

Custom event system and Action management #420

Merged
merged 16 commits into from
May 30, 2018
Merged

Custom event system and Action management #420

merged 16 commits into from
May 30, 2018

Conversation

veteran29
Copy link
Member

@veteran29 veteran29 commented May 23, 2018

Q A
Bug fix? no
New feature? yes
Needs wipe? no
Fixes #413 #414

Description:

Event system that allows to subscribe to mission events, foundation for more extensible framework.

Content:

Tested on:

  • Local MP Vanilla
  • Local MP ACE
  • Dedicated MP Vanilla
  • Dedicated MP ACE

@veteran29 veteran29 added this to the Sprint 2 milestone May 23, 2018
@veteran29 veteran29 self-assigned this May 23, 2018
if(_local) then {
_arguments call _x;
} else {
[_arguments, _x] remoteExecCall ["call", _targets];
Copy link
Member Author

@veteran29 veteran29 May 23, 2018

Choose a reason for hiding this comment

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

This is completely wrong as it will fire Local handlers on all Remote clients. Remote clients should be notified about event and fire their own handlers.

Do not code when tired 😒

@veteran29 veteran29 changed the title Custom event system Custom event system and Action management May 28, 2018
@veteran29 veteran29 requested a review from Wyqer May 28, 2018 21:05
@@ -299,14 +299,14 @@ while {KPLIB_intro_started} do {
// Get the name of the sector we're looking at
private _sectorName = "";
if (_actualTargetPos distance KPLIB_eden_startbase < 300) then {
_sectorName = "BEGIN OF OPERATION";
_sectorName = "BEGIN OF OPERATION"; // Should this be localized?
Copy link
Member

Choose a reason for hiding this comment

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

👍

["player_fob", {
params ["_player", "_fob"];

private _redeployActionId = _player getVariable ["KPLIB_redeployActionId", nil];
Copy link
Member

Choose a reason for hiding this comment

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

Just a small thing:
I think KPLIB_actionId_redeploy (or similar) would be better concerning the project_category_specify convention instead of the project_specifyCategory which is used currently.

@@ -24,13 +24,16 @@
// Read the module globals
call compile preprocessFileLineNumbers "modules\01_core\globals.sqf";

// Initialize actions
call KPLIB_fnc_core_setupPlayerActions;
Copy link
Member

Choose a reason for hiding this comment

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

I thought about putting the "stuff for everyone" at the end and not at the start. So it'll executed after the locality specific things. Can't say "this is better because of ....", it's just a initial thought. Any opinion? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

We need to add event handlers that add actions to vehicles before actual vehicle spawning happens. Otherwise initially spawned vehicles will have no actions available.

Copy link
Member

Choose a reason for hiding this comment

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

Very good point, of course 👍

@@ -1254,7 +1254,7 @@
</Key>
</Package>
<Package name="Actions">
<Key ID="STR_FOB_DEPLOY">
<Key ID="STR_FOB_DEPLOY_ACTION">
Copy link
Member

Choose a reason for hiding this comment

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

Same as mentioned above.
What about STR_ACTION_FOB_DEPLOY and STR_ACTION_REDEPLOY?

0: BOOL - Should created namespace be global

Returns:
BOOLEAN - TRUE if removed, FALSE if didn't exist
Copy link
Member

Choose a reason for hiding this comment

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

Copy/Paste Typo?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup. 😒

@veteran29
Copy link
Member Author

veteran29 commented May 30, 2018

EDIT: Closed by accident. Wrong PR.

@veteran29 veteran29 closed this May 30, 2018
@veteran29 veteran29 reopened this May 30, 2018
@veteran29 veteran29 merged commit 43b89b2 into v0.97S2 May 30, 2018
@veteran29 veteran29 added Done and removed Review/QA labels May 30, 2018
@veteran29 veteran29 deleted the v0.97S2-413 branch May 31, 2018 09:53
@Wyqer Wyqer mentioned this pull request Jun 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants