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: Remove double actions (orders to civilians) #439

Merged
merged 10 commits into from Dec 13, 2017
Merged

Add: Remove double actions (orders to civilians) #439

merged 10 commits into from Dec 13, 2017

Conversation

1kuemmel1
Copy link

@1kuemmel1 1kuemmel1 commented Nov 27, 2017

  • Add: Remove double actions (orders to civilians).

When merged this pull request will:

  • Remove the "Get Down!" and "Go Away!" actions from ACE³-interaction menu (see screenshots below)

Final test:

  • local
  • server

Screenshots
OLD:
civ_actions_old
NEW:
civ_actions_new

@Vdauphin
Copy link
Owner

Hello, sadly I am not sure if this approach will work on all class name (see acemod/ACE3#2576 (comment)). Looks like some mods are not compatible with CBA XEH (Giallustio@33323af#diff-92e95921cfc9c8acde69602348016377).

I don't have a lot of knowledge on this. If this work on dedicate with all mod supported by the H&M, I will accept it.

If it is not working, use the Giallustio approach (https://github.com/Vdauphin/HeartsAndMinds/blob/master_daily/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/int/add_actions.sqf)

@Vdauphin Vdauphin added this to the 1.18 milestone Nov 27, 2017
@1kuemmel1
Copy link
Author

1kuemmel1 commented Nov 28, 2017

Oh, I didn't know about this.

If this work on dedicate with all mod supported by the H&M, I will accept it.

Give me some time 😆. I will test this.

@1kuemmel1
Copy link
Author

1kuemmel1 commented Dec 3, 2017

Hiho here is a first review/feedback.
(All mods tested local and on server, all mods are up to date - 05. Dec.17)

Additional notes for Not Working:

  • default ACE³ actions are not removed
  • civilians do not respond to orders: Get Down!, Go Away!, Stop! (from H&M and ACE³ interactions)

Update: tested with #440

@Vdauphin
Copy link
Owner

Vdauphin commented Dec 4, 2017

Good job!
When you say No interactions available at all you mean :
No "Get Down!" and "Go Away!" actions from ACE³-interaction and no "Civil Orders" actions from H&M-interaction ?

@Vdauphin
Copy link
Owner

Vdauphin commented Dec 4, 2017

This will fix the No interactions available at all problem :)

@1kuemmel1
Copy link
Author

Update list.

My conclusion so far: do not implement, because unfortunately not all mods are supported.

@Vdauphin
Copy link
Owner

Vdauphin commented Dec 9, 2017

Basically it not working because Civilian is not use by some mod in parents class ... I think this would works if you use CAManBase or Man and then use https://github.com/Vdauphin/HeartsAndMinds/blob/master_daily/%3DBTC%3Dco%4030_Hearts_and_Minds.Altis/core/fnc/eh/unit_init.sqf and do a if side == civilian removeinteraction

Or use the add_actions file as said previously

See you!

@1kuemmel1
Copy link
Author

Basically it not working because Civilian is not use by some mod in parents class ... I think this would works if you use CAManBase or Man...
This is a good approach!
I will take a look at these the next days.

@Vdauphin
Copy link
Owner

Check before if mods use CAManBase parent in config to avoid waste of your time

@1kuemmel1
Copy link
Author

Please remember; you need #440 for this.

@1kuemmel1
Copy link
Author

update: now it´s include the fix from #440

@Vdauphin
Copy link
Owner

Vdauphin commented Dec 13, 2017

Here your goal is to remove the action. So why not just add in /core/fnc/int/add_actions.sqf#L78 :

{
	//remove "get down" order
	[_x, 0,["ACE_MainActions","ACE_GetDown"]] call ace_interact_menu_fnc_removeActionFromClass;

	//remove "go away" order
	[_x, 0,["ACE_MainActions","ACE_SendAway"]] call ace_interact_menu_fnc_removeActionFromClass;
} forEach btc_civ_type_units;

Just 4 lines of code, nothing complicated. I am agree the CBA Extended_InitPost_EventHandlers is really powerfull but not necessary to do what you want to do. Stay simple.

If you want to take advantage of CBA Extended_InitPost_EventHandlers do it in a seperate pull request and transfer all actions (add_actions.sqf#L53-L77) and call of btc_fnc_mil_unit_create, btc_fnc_civ_unit_create in it. Like Giallustio did in the past : Giallustio@33323af#diff-92e95921cfc9c8acde69602348016377

@Vdauphin Vdauphin self-requested a review December 13, 2017 22:11
Copy link
Owner

@Vdauphin Vdauphin left a comment

Choose a reason for hiding this comment

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

I will do final phase soon :)

@Vdauphin Vdauphin merged commit 151b777 into Vdauphin:master_daily Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants