add basic mission_settings check w notify in 3den preview
This commit is contained in:
@@ -5,9 +5,10 @@ class DOUBLES(PREFIX,init) {
|
|||||||
file = "framework\init\functions";
|
file = "framework\init\functions";
|
||||||
class initServer { postInit = 1;};
|
class initServer { postInit = 1;};
|
||||||
class initClient { postInit = 1;};
|
class initClient { postInit = 1;};
|
||||||
class setDefaults { postInit = 1; };
|
class setDefaults {};
|
||||||
class addAARChatHandler { postInit = 1; };
|
class addAARChatHandler {};
|
||||||
class addRespawnChatHandler { postInit = 1; };
|
class addRespawnChatHandler {};
|
||||||
|
class checkMissionSettings {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
[
|
[
|
||||||
"saveaar",
|
"saveaar",
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
[
|
[
|
||||||
"respawn",
|
"respawn",
|
||||||
{
|
{
|
||||||
|
|||||||
41
framework/init/functions/fn_checkMissionSettings.sqf
Normal file
41
framework/init/functions/fn_checkMissionSettings.sqf
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
if (!hasInterface || !is3DENPreview) exitWith {};
|
||||||
|
|
||||||
|
private _warningText = [];
|
||||||
|
|
||||||
|
if (getText(missionConfigFile >> "author") in ["MISSION AUTHOR", ""]) then {
|
||||||
|
_warningText pushBack "<t font='EtelkaMonospacePro' size='0.7'>mission_settings\author</t> is blank or default!";
|
||||||
|
};
|
||||||
|
if (getText(missionConfigFile >> "onLoadName") in ["THIS APPEARS ON TOP OF THE LOADING SCREEN IMAGE", ""]) then {
|
||||||
|
_warningText pushBack "<t font='EtelkaMonospacePro' size='0.7'>mission_settings\onLoadName</t> is blank or default!";
|
||||||
|
};
|
||||||
|
|
||||||
|
if (getText(missionConfigFile >> "briefingName") in ["THIS IS THE NAME ON THE #MISSIONS LIST", ""]) then {
|
||||||
|
_warningText pushBack "<t font='EtelkaMonospacePro' size='0.7'>mission_settings\briefingName</t> is blank or default!";
|
||||||
|
};
|
||||||
|
if (getText(missionConfigFile >> "overviewText") in ["THIS IS WHERE YOU DESCRIBE THE MISSION IN THE #MISSION LIST", ""]) then {
|
||||||
|
_warningText pushBack "<t font='EtelkaMonospacePro' size='0.7'>mission_settings\overviewText</t> is blank or default!";
|
||||||
|
};
|
||||||
|
|
||||||
|
if (getText(missionConfigFile >> "missionSeries") in ["MY SERIES NAME", ""]) then {
|
||||||
|
_warningText pushBack "<t font='EtelkaMonospacePro' size='0.7'>mission_settings\missionSeries</t> is blank or default!";
|
||||||
|
};
|
||||||
|
|
||||||
|
if (count GVARMAIN(baseObjects) isEqualTo 0) then {
|
||||||
|
_warningText pushBack "No respawn points placed!";
|
||||||
|
};
|
||||||
|
|
||||||
|
if (count _warningText > 0) then {
|
||||||
|
[{
|
||||||
|
if (isNull (call BIS_fnc_displayMission)) exitWith {};
|
||||||
|
|
||||||
|
(_this#0) spawn {
|
||||||
|
[_this joinString "<br/>", "Issues found!", true, false] call BIS_fnc_guiMessage;
|
||||||
|
};
|
||||||
|
[_this#1] call CBA_fnc_removePerFrameHandler;
|
||||||
|
|
||||||
|
}, 1, _warningText] call CBA_fnc_addPerFrameHandler;
|
||||||
|
};
|
||||||
|
|
||||||
|
nil;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
if ( !hasInterface ) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
["milsim_logText", {
|
["milsim_logText", {
|
||||||
params [["_strArray", [""], [[]]]];
|
params [["_strArray", [""], [[]]]];
|
||||||
@@ -14,6 +14,13 @@ waitUntil {!isNil QGVARMAIN(complete)};
|
|||||||
|
|
||||||
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups;
|
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups;
|
||||||
|
|
||||||
|
// run primary init functions
|
||||||
|
call FUNC(addAARChatHandler);
|
||||||
|
call FUNC(addRespawnChatHandler);
|
||||||
|
call FUNC(setDefaults);
|
||||||
|
call FUNC(checkMissionSettings);
|
||||||
|
|
||||||
|
|
||||||
// Initialize a holder for managing local diary records
|
// Initialize a holder for managing local diary records
|
||||||
// store records in format:
|
// store records in format:
|
||||||
// [subject, [
|
// [subject, [
|
||||||
@@ -34,6 +41,8 @@ call EFUNC(fbcb2_main,initClient);
|
|||||||
call EFUNC(fbcb2_assets,initClient);
|
call EFUNC(fbcb2_assets,initClient);
|
||||||
|
|
||||||
|
|
||||||
|
call FUNC(checkMissionSettings);
|
||||||
|
|
||||||
[
|
[
|
||||||
LEVEL_DEBUG,
|
LEVEL_DEBUG,
|
||||||
QUOTE(COMPONENT),
|
QUOTE(COMPONENT),
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
enableSaving[false, false];
|
enableSaving[false, false];
|
||||||
|
|
||||||
enableRadio false;
|
enableRadio false;
|
||||||
|
|||||||
Reference in New Issue
Block a user