Skip to content

Commit

Permalink
Merge pull request #10 from tuntematonjr/1.6.0
Browse files Browse the repository at this point in the history
1.6.0
  • Loading branch information
tuntematonjr authored Feb 20, 2022
2 parents ab7aa0c + 0208ba7 commit a0b2ef5
Show file tree
Hide file tree
Showing 30 changed files with 927 additions and 310 deletions.
98 changes: 98 additions & 0 deletions addons/MSP/Stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@
<Russian>Enable MSP</Russian>
<German>Enable MSP</German>
</Key>
<Key ID="STR_Tun_MSP_CBA_allowCheckTicketsMSP">
<Original>Check tickets from msp</Original>
<English>Check tickets from msp</English>
<Czech>Check tickets from msp</Czech>
<French>Check tickets from msp</French>
<Spanish>Check tickets from msp</Spanish>
<Italian>Check tickets from msp</Italian>
<Polish>Check tickets from msp</Polish>
<Portuguese>Check tickets from msp</Portuguese>
<Russian>Check tickets from msp</Russian>
<German>Check tickets from msp</German>
</Key>
<Key ID="STR_Tun_MSP_CBA_tooltip_Enable">
<Original>Enable MSP system</Original>
<English>Enable MSP system</English>
Expand Down Expand Up @@ -475,5 +487,91 @@
<German>Remaining time until respawn: %1</German>
</Key>
</Container>
<Container name="Notifications">
<Key ID="STR_Tun_MSP_CBA_whoGetsSetUpNotification">
<Original>Who gets notification from MSP setup/pack?</Original>
<English>Who gets notification from MSP setup/pack?</English>
<Czech>Who gets notification from MSP setup/pack?</Czech>
<French>Who gets notification from MSP setup/pack?</French>
<Spanish>Who gets notification from MSP setup/pack?</Spanish>
<Italian>Who gets notification from MSP setup/pack?</Italian>
<Polish>Who gets notification from MSP setup/pack?</Polish>
<Portuguese>Who gets notification from MSP setup/pack?</Portuguese>
<Russian>Who gets notification from MSP setup/pack?</Russian>
<German>Who gets notification from MSP setup/pack?</German>
</Key>
<Key ID="STR_Tun_MSP_CBA_whoGetsContestedNotification">
<Original>Who gets notification when MSP contested?</Original>
<English>Who gets notification when MSP contested?</English>
<Czech>Who gets notification when MSP contested?</Czech>
<French>Who gets notification when MSP contested?</French>
<Spanish>Who gets notification when MSP contested?</Spanish>
<Italian>Who gets notification when MSP contested?</Italian>
<Polish>Who gets notification when MSP contested?</Polish>
<Portuguese>Who gets notification when MSP contested?</Portuguese>
<Russian>Who gets notification when MSP contested?</Russian>
<German>Who gets notification when MSP contested?</German>
</Key>
<Key ID="STR_Tun_MSP_CBA_whoGetsReportEnemiesNotification">
<Original>Who gets notification when there is enemies near MSP?</Original>
<English>Who gets notification when there is enemies near MSP?</English>
<Czech>Who gets notification when there is enemies near MSP?</Czech>
<French>Who gets notification when there is enemies near MSP?</French>
<Spanish>Who gets notification when there is enemies near MSP?</Spanish>
<Italian>Who gets notification when there is enemies near MSP?</Italian>
<Polish>Who gets notification when there is enemies near MSP?</Polish>
<Portuguese>Who gets notification when there is enemies near MSP?</Portuguese>
<Russian>Who gets notification when there is enemies near MSP?</Russian>
<German>Who gets notification when there is enemies near MSP?</German>
</Key>
<Key ID="STR_Tun_MSP_CBA_whoGetsSetUpNotification_Tooltip">
<Original>When MSP is setup or packed up, who whil recive notification from it. Default: Group Leader</Original>
<English>When MSP is setup or packed up, who whil recive notification from it. Default: Group Leader</English>
<Czech>When MSP is setup or packed up, who whil recive notification from it. Default: Group Leader</Czech>
<French>When MSP is setup or packed up, who whil recive notification from it. Default: Group Leader</French>
<Spanish>When MSP is setup or packed up, who whil recive notification from it. Default: Group Leader</Spanish>
<Italian>When MSP is setup or packed up, who whil recive notification from it. Default: Group Leader</Italian>
<Polish>When MSP is setup or packed up, who whil recive notification from it. Default: Group Leader</Polish>
<Portuguese>When MSP is setup or packed up, who whil recive notification from it. Default: Group Leader</Portuguese>
<Russian>When MSP is setup or packed up, who whil recive notification from it. Default: Group Leader</Russian>
<German>When MSP is setup or packed up, who whil recive notification from it. Default: Group Leader</German>
</Key>
<Key ID="STR_Tun_MSP_CBA_whoGetsContestedNotification_Tooltip">
<Original>When MSP is contested, who whil recive notification from it. Default: Group Leader</Original>
<English>When MSP is contested, who whil recive notification from it. Default: Group Leader</English>
<Czech>When MSP is contested, who whil recive notification from it. Default: Group Leader</Czech>
<French>When MSP is contested, who whil recive notification from it. Default: Group Leader</French>
<Spanish>When MSP is contested, who whil recive notification from it. Default: Group Leader</Spanish>
<Italian>When MSP is contested, who whil recive notification from it. Default: Group Leader</Italian>
<Polish>When MSP is contested, who whil recive notification from it. Default: Group Leader</Polish>
<Portuguese>When MSP is contested, who whil recive notification from it. Default: Group Leader</Portuguese>
<Russian>When MSP is contested, who whil recive notification from it. Default: Group Leader</Russian>
<German>When MSP is contested, who whil recive notification from it. Default: Group Leader</German>
</Key>
<Key ID="STR_Tun_MSP_CBA_whoGetsReportEnemies_Tooltip">
<Original>When there is enemies near MSP, who whil recive notification from it. Default: Group Leader</Original>
<English>When there is enemies near MSP, who whil recive notification from it. Default: Group Leader</English>
<Czech>When there is enemies near MSP, who whil recive notification from it. Default: Group Leader</Czech>
<French>When there is enemies near MSP, who whil recive notification from it. Default: Group Leader</French>
<Spanish>When there is enemies near MSP, who whil recive notification from it. Default: Group Leader</Spanish>
<Italian>When there is enemies near MSP, who whil recive notification from it. Default: Group Leader</Italian>
<Polish>When there is enemies near MSP, who whil recive notification from it. Default: Group Leader</Polish>
<Portuguese>When there is enemies near MSP, who whil recive notification from it. Default: Group Leader</Portuguese>
<Russian>When there is enemies near MSP, who whil recive notification from it. Default: Group Leader</Russian>
<German>When there is enemies near MSP, who whil recive notification from it. Default: Group Leader</German>
</Key>
<Key ID="STR_Tun_MSP_CBA_notificationCategory">
<Original>Notifications</Original>
<English>Notifications</English>
<Czech>Notifications</Czech>
<French>Notifications</French>
<Spanish>Notifications</Spanish>
<Italian>Notifications</Italian>
<Polish>Notifications</Polish>
<Portuguese>Notifications</Portuguese>
<Russian>Notifications</Russian>
<German>Notifications</German>
</Key>
</Container>
</Package>
</Project>
3 changes: 3 additions & 0 deletions addons/MSP/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ if (isServer) then {

if (hasInterface) then {
[] call FUNC(ace_actions);
if (Tun_respawn_briefingEnable) then {
[] call FUNC(briefingNotes);
};
};
51 changes: 50 additions & 1 deletion addons/MSP/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@


if (isServer) then {
missionNamespace setVariable [QGVAR(disableContestedCheck), false, true];

missionNamespace setVariable [QGVAR(contested_east), false, true];
missionNamespace setVariable [QGVAR(contested_west), false, true];
missionNamespace setVariable [QGVAR(contested_guer), false, true];
Expand Down Expand Up @@ -48,6 +50,7 @@ if (isServer) then {
};



[
QGVAR(enable), // Unique setting name. Matches resulting variable name <STRING>
"CHECKBOX", // Type of setting. Can be "CHECKBOX", "EDITBOX", "LIST", "SLIDER" or "COLOR" <STRING>
Expand All @@ -59,6 +62,17 @@ if (isServer) then {
true //Setting will be marked as needing mission restart after being changed. (optional, default false) <BOOL>
] call CBA_Settings_fnc_init;

[
QGVAR(allowCheckTicketsMSP), // Unique setting name. Matches resulting variable name <STRING>
"CHECKBOX", // Type of setting. Can be "CHECKBOX", "EDITBOX", "LIST", "SLIDER" or "COLOR" <STRING>
["STR_Tun_MSP_CBA_allowCheckTicketsMSP" call BIS_fnc_localize, "STR_Tun_Respawn_CBA_tooltip_CheckTickets" call BIS_fnc_localize], // Display name or display name + tooltip (optional, default: same as setting name) <STRING, ARRAY>
"STR_Tun_MSP_CBA_Category_main" call BIS_fnc_localize, // Category for the settings menu + optional sub-category <STRING, ARRAY>
false, // Extra properties of the setting depending of _settingType.
1, // 1: all clients share the same setting, 2: setting can't be overwritten (optional, default: 0) <ARRAY>
{}, // Script to execute when setting is changed. (optional) <CODE>
true //Setting will be marked as needing mission restart after being changed. (optional, default false) <BOOL>
] call CBA_Settings_fnc_init;


[
QGVAR(report_enemies), // Unique setting name. Matches resulting variable name <STRING>
Expand Down Expand Up @@ -201,4 +215,39 @@ if (isServer) then {
1, // 1: all clients share the same setting, 2: setting can't be overwritten (optional, default: 0) <ARRAY>
{}, // Script to execute when setting is changed. (optional) <CODE>
true //Setting will be marked as needing mission restart after being changed. (optional, default false) <BOOL>
] call CBA_Settings_fnc_init;
] call CBA_Settings_fnc_init;


[
QGVAR(setupNotification), // Unique setting name. Matches resulting variable name <STRING>
"LIST", // Type of setting. Can be "CHECKBOX", "EDITBOX", "LIST", "SLIDER" or "COLOR" <STRING>
["STR_Tun_MSP_CBA_whoGetsSetUpNotification" call BIS_fnc_localize, "STR_Tun_MSP_CBA_whoGetsSetUpNotification_Tooltip" call BIS_fnc_localize], // Display name or display name + tooltip (optional, default: same as setting name) <STRING, ARRAY>
["STR_Tun_MSP_CBA_Category_main" call BIS_fnc_localize, "STR_Tun_MSP_CBA_notificationCategory" call BIS_fnc_localize], // Category for the settings menu + optional sub-category <STRING, ARRAY>
[[0, 1], ["Group Leaders", "Side"], 0], // Extra properties of the setting depending of _settingType.
1, // 1: all clients share the same setting, 2: setting can't be overwritten (optional, default: 0) <ARRAY>
{}, // Script to execute when setting is changed. (optional) <CODE>
true //Setting will be marked as needing mission restart after being changed. (optional, default false) <BOOL>
] call CBA_Settings_fnc_init;

[
QGVAR(contestedNotification), // Unique setting name. Matches resulting variable name <STRING>
"LIST", // Type of setting. Can be "CHECKBOX", "EDITBOX", "LIST", "SLIDER" or "COLOR" <STRING>
["STR_Tun_MSP_CBA_whoGetsContestedNotification" call BIS_fnc_localize, "STR_Tun_MSP_CBA_whoGetsContestedNotification_Tooltip" call BIS_fnc_localize], // Display name or display name + tooltip (optional, default: same as setting name) <STRING, ARRAY>
["STR_Tun_MSP_CBA_Category_main" call BIS_fnc_localize, "STR_Tun_MSP_CBA_notificationCategory" call BIS_fnc_localize], // Category for the settings menu + optional sub-category <STRING, ARRAY>
[[0, 1], ["Group Leaders", "Side"], 0], // Extra properties of the setting depending of _settingType.
1, // 1: all clients share the same setting, 2: setting can't be overwritten (optional, default: 0) <ARRAY>
{}, // Script to execute when setting is changed. (optional) <CODE>
true //Setting will be marked as needing mission restart after being changed. (optional, default false) <BOOL>
] call CBA_Settings_fnc_init;

[
QGVAR(reportEnemiesNotification), // Unique setting name. Matches resulting variable name <STRING>
"LIST", // Type of setting. Can be "CHECKBOX", "EDITBOX", "LIST", "SLIDER" or "COLOR" <STRING>
["STR_Tun_MSP_CBA_whoGetsReportEnemiesNotification" call BIS_fnc_localize, "STR_Tun_MSP_CBA_whoGetsReportEnemies_Tooltip" call BIS_fnc_localize], // Display name or display name + tooltip (optional, default: same as setting name) <STRING, ARRAY>
["STR_Tun_MSP_CBA_Category_main" call BIS_fnc_localize, "STR_Tun_MSP_CBA_notificationCategory" call BIS_fnc_localize], // Category for the settings menu + optional sub-category <STRING, ARRAY>
[[0, 1], ["Group Leaders", "Side"], 0], // Extra properties of the setting depending of _settingType.
1, // 1: all clients share the same setting, 2: setting can't be overwritten (optional, default: 0) <ARRAY>
{}, // Script to execute when setting is changed. (optional) <CODE>
true //Setting will be marked as needing mission restart after being changed. (optional, default false) <BOOL>
] call CBA_Settings_fnc_init;

4 changes: 2 additions & 2 deletions addons/MSP/XEH_prep.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ PREP(add_EH);
PREP(contestedCheck);
PREP(contestedSummary);
PREP(create_msp_props);
PREP(force_contested_check);
PREP(init_contested);
PREP(initate_msp_action);
PREP(report_enemies);
PREP(update_status);
PREP(update_status);
PREP(briefingNotes);
6 changes: 6 additions & 0 deletions addons/MSP/functions/fnc_ace_actions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ private _vehicle = switch (playerSide) do {
};
};

//check that class exist
if !(isClass (configFile >> "CfgVehicles" >> _vehicle)) exitWith {
private _errorText = format ["(Tun_MSP_fnc_ace_actions) Tried to add following classname as MSP: %1. But it does not exist",_vehicle];
ERROR(_errorText);
};

//create msp action
_create_condition = { alive _target && {_target getVariable QGVAR(side) == playerSide} && { driver _target == player} && { speed player == 0 } && {!(missionNamespace getVariable [format ["%1_%2", QGVAR(status), playerSide], false])}};;
_createMSP = ["Set up MSP", "Set up MSP", "", {[_target, true] spawn FUNC(initate_msp_action);}, _create_condition, {}, [], [0, 0, 0], 2, [false, true, false, false, false]] call ace_interact_menu_fnc_createAction;
Expand Down
7 changes: 7 additions & 0 deletions addons/MSP/functions/fnc_add_EH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@

//Add side variable for vehicle classname
if (isServer) then {

//check that class exist
if !(isClass (configFile >> "CfgVehicles" >> _vehicle)) exitWith {
private _errorText = format ["(Tun_MSP_fnc_add_eh) Tried to add following classname as MSP: %1. But it does not exist",_vehicle];
ERROR(_errorText);
};

[_vehicle, "Init", {
params ["_entity"];

Expand Down
49 changes: 49 additions & 0 deletions addons/MSP/functions/fnc_briefingNotes.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Author: [Tuntematon]
* [Description]
*
* Arguments:
* 0: The first argument <STRING>
* 1: The second argument <OBJECT>
* 2: Multiple input types <STRING|ARRAY|CODE>
* 3: Optional input <BOOL> (default: true)
* 4: Optional input with multiple types <CODE|STRING> (default: {true})
* 5: Not mandatory input <STRING> (default: nil)
*
* Return Value:
* The return value <BOOL>
*
* Example:
* ["something", player] call Tun_Respawn_fnc_briefingNotes
*/
#include "script_component.hpp"

private _text = "<font face='PuristaBold' size='30'>MSP settings</font><br/>";

_text = format ["%1<br/>- Tickets can be checked from MSP: %2",_text, GVAR(allowCheckTicketsMSP)];

_text = format ["%1<br/><br/><font face='PuristaBold' size='17'>Report enemies</font><br/>",_text];
_text = format ["%1<br/>- Report enemies: %2",_text, GVAR(report_enemies)];
if (GVAR(report_enemies)) then {
_text = format ["%1<br/>- Report enemies interval: %2",_text, GVAR(report_enemies_interval)];
_text = format ["%1<br/> -%2",_text, "STR_Tun_MSP_CBA_tooltip_report_enemies_interval" call BIS_fnc_localize];

_text = format ["%1<br/>- Report enemies range: %2",_text, GVAR(report_enemies_range)];
_text = format ["%1<br/> -%2",_text, "STR_Tun_MSP_CBA_tooltip_report_enemies_range" call BIS_fnc_localize];
};

_text = format ["%1<br/><br/><font face='PuristaBold' size='17'>Contested settings</font><br/>",_text];
_text = format ["%1<br/>- Contested check interval: %2",_text, GVAR(contested_check_interval)];
_text = format ["%1<br/> -%2",_text, "STR_Tun_MSP_CBA_tooltip_contested_check_interval" call BIS_fnc_localize];

_text = format ["%1<br/>- Contested range max: %2",_text, GVAR(contested_radius_max)];
_text = format ["%1<br/> -%2",_text, "STR_Tun_MSP_CBA_tooltip_contested_max" call BIS_fnc_localize];

_text = format ["%1<br/>- Contested range min: %2",_text, GVAR(contested_radius_min)];
_text = format ["%1<br/> -%2",_text, "STR_Tun_MSP_CBA_tooltip_contested_min" call BIS_fnc_localize];

_text = format ["%1<br/><br/><font color='#4F4F4F' size='11'>Powered By TuntematonEngine v%2.%3.%4</font>", _text, MAJOR, MINOR, PATCHLVL];

player createDiaryRecord ["Diary",["Respawn info",_text]];
player createDiarySubject ["Respawn info","Tun - Respawn info"];
player createDiaryRecord ["Respawn info",["Tun - Respawn info",_text]];
Loading

0 comments on commit a0b2ef5

Please sign in to comment.