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

Addition of Gear_Selection Module #159

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open

Addition of Gear_Selection Module #159

wants to merge 6 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 19, 2018

This pull request will add the following:

A menu, accessible during the briefing stage of a multiplayer mission (also in single player and maybe local multiplayer), giving the player the ability to choose aspects of their gear, as defined by the mission maker. The file 'settings.hpp' includes all the config for the module, including category support, custom scripting options, and full customization support for the actual display of the options.

A help file is forthcoming.

@ghost
Copy link
Author

ghost commented Jan 19, 2018

This commit is in response to the following issue (lines 224-236).

				//If babel is enabled, allowed spectator to hear all languages present in mission.
				if (!isNil "FW_enable_babel" && FW_enable_babel) then {
					_missionLanguages = [];
					{
						{
							if (!(_x in _missionLanguages)) then {
								_missionLanguages pushback _x;
							};
						} foreach _x;
					} forEach FW_languages_babel;
					_missionLanguages call acre_api_fnc_babelSetSpokenLanguages;
				};

@ghost
Copy link
Author

ghost commented Jan 19, 2018

This commit is in response to the following issue #135

Copy link
Collaborator

@BlackHawkPL BlackHawkPL left a comment

Choose a reason for hiding this comment

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

some stuff I noticed at first glance

@@ -221,10 +221,23 @@ if (!isDedicated) then {
player setVariable ["FW_Spectating", true, true];
[true] call acre_api_fnc_setSpectator;

//If babel is enabled, allowed spectator to hear all languages present in mission.
if (!isNil "FW_enable_babel" && FW_enable_babel) then {
Copy link
Collaborator

@BlackHawkPL BlackHawkPL Jan 19, 2018

Choose a reason for hiding this comment

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

Add lazy evaluation (wrap FW_enable_babel in {}) to avoid game trying to retrieve value even if it's nil.

@@ -221,10 +221,23 @@ if (!isDedicated) then {
player setVariable ["FW_Spectating", true, true];
[true] call acre_api_fnc_setSpectator;

//If babel is enabled, allowed spectator to hear all languages present in mission.
if (!isNil "FW_enable_babel" && FW_enable_babel) then {
_missionLanguages = [];
Copy link
Collaborator

Choose a reason for hiding this comment

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

add private

_codeText = format [_code, str _classname];
diag_log text _codeText;
_call = compile _codeText;
call _call;
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can merge these 2 lines

@EM-Creations
Copy link

@nathan423 Would you have any objections to me including this in my fork of the framework?

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