mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
More Fixes!
FSM should now call all of the functions... Fixed debug messages for selectmission Added recursive call for cleanup for typeName ARRAY arguments Fixed parsing for FillCrate Fixed script errors and removed some RPT spam from missionsmonitor Allow groups for missionsuccesstate Removed debug log for converting data type into array for TargetsKilled
This commit is contained in:
parent
c300f83bb4
commit
a4144c7c07
@ -1,4 +1,4 @@
|
|||||||
/*%FSM<COMPILE "scriptedFSM.cfg, dms_main">*/
|
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, dms_main">*/
|
||||||
/*%FSM<HEAD>*/
|
/*%FSM<HEAD>*/
|
||||||
/*
|
/*
|
||||||
item0[] = {"",7,210,821.012817,321.000000,829.012817,329.000000,0.000000,""};
|
item0[] = {"",7,210,821.012817,321.000000,829.012817,329.000000,0.000000,""};
|
||||||
@ -6,17 +6,17 @@ item1[] = {"INIT",0,250,516.749146,-106.908607,606.749146,-56.908607,0.000000,"I
|
|||||||
item2[] = {"true",8,218,775.000000,25.000000,875.000000,75.000000,0.000000,"true"};
|
item2[] = {"true",8,218,775.000000,25.000000,875.000000,75.000000,0.000000,"true"};
|
||||||
item3[] = {"Waiting",2,250,775.000000,100.000000,875.000000,150.000000,0.000000,"Waiting"};
|
item3[] = {"Waiting",2,250,775.000000,100.000000,875.000000,150.000000,0.000000,"Waiting"};
|
||||||
item4[] = {"",7,210,596.000000,321.000000,604.000000,329.000000,0.000000,""};
|
item4[] = {"",7,210,596.000000,321.000000,604.000000,329.000000,0.000000,""};
|
||||||
item5[] = {"___min_loop_2",4,218,625.012756,175.000000,725.012756,225.000000,1.000000,"1 min loop"};
|
item5[] = {"___min_loop_1",4,218,625.012756,175.000000,725.012756,225.000000,1.000000,"1 min loop"};
|
||||||
item6[] = {"Check_Mission_Running",2,4346,624.311890,250.000000,724.311890,300.000000,0.000000,"Check Mission" \n "Running" \n "Status"};
|
item6[] = {"Check_Mission_Running",2,250,624.311890,250.000000,724.311890,300.000000,0.000000,"Check Mission" \n "Running" \n "Status"};
|
||||||
item7[] = {"",7,210,521.000000,321.000000,529.000000,329.000000,0.000000,""};
|
item7[] = {"",7,210,521.000000,321.000000,529.000000,329.000000,0.000000,""};
|
||||||
item8[] = {"___min_loop_1",4,218,777.816040,173.598328,867.816040,223.598328,2.000000,"1 min loop"};
|
item8[] = {"___min_loop",4,218,777.816040,173.598328,867.816040,223.598328,2.000000,"1 min loop"};
|
||||||
item9[] = {"",7,210,521.000000,46.000000,529.000000,54.000000,0.000000,""};
|
item9[] = {"",7,210,521.000000,46.000000,529.000000,54.000000,0.000000,""};
|
||||||
item10[] = {"",7,210,670.311951,321.000000,678.311951,329.000000,0.000000,""};
|
item10[] = {"",7,210,670.311951,321.000000,678.311951,329.000000,0.000000,""};
|
||||||
item11[] = {"Mission_Cleanup",2,250,774.311890,250.000000,874.311890,300.000000,0.000000,"Mission Cleanup"};
|
item11[] = {"Mission_Cleanup",2,250,774.311890,250.000000,874.311890,300.000000,0.000000,"Mission Cleanup"};
|
||||||
item12[] = {"INITIALIZE",4,218,655.694763,-107.164581,745.694763,-57.164581,0.000000,"INITIALIZE"};
|
item12[] = {"INITIALIZE",4,218,655.694763,-107.164581,745.694763,-57.164581,0.000000,"INITIALIZE"};
|
||||||
item13[] = {"PREPARE",2,250,780.348511,-108.565193,870.348511,-58.565193,0.000000,"PREPARE"};
|
item13[] = {"PREPARE",2,250,780.348511,-108.565193,870.348511,-58.565193,0.000000,"PREPARE"};
|
||||||
item14[] = {"___Min_loop",4,218,914.967773,173.130890,1004.967773,223.130890,3.000000,"1 Min loop"};
|
item14[] = {"___Min_loop",4,218,914.967773,173.130890,1004.967773,223.130890,3.000000,"1 Min loop"};
|
||||||
item15[] = {"Select_Mission",2,250,915.668457,249.519714,1005.668518,299.519714,0.000000,"Select Mission"};
|
item15[] = {"Select_Mission",2,4346,915.668457,249.519714,1005.668518,299.519714,0.000000,"Select Mission"};
|
||||||
item16[] = {"",7,210,956.270142,321.086121,964.270142,329.086121,0.000000,""};
|
item16[] = {"",7,210,956.270142,321.086121,964.270142,329.086121,0.000000,""};
|
||||||
link0[] = {0,10};
|
link0[] = {0,10};
|
||||||
link1[] = {1,12};
|
link1[] = {1,12};
|
||||||
@ -37,197 +37,185 @@ link15[] = {13,2};
|
|||||||
link16[] = {14,15};
|
link16[] = {14,15};
|
||||||
link17[] = {15,16};
|
link17[] = {15,16};
|
||||||
link18[] = {16,0};
|
link18[] = {16,0};
|
||||||
globals[] = {0.000000,0,0,0,0,640,480,2,451,6316128,1,326.983643,1179.875732,440.842163,-196.198654,1217,909,1};
|
globals[] = {0.000000,0,0,0,0,640,480,2,451,6316128,1,326.983643,1179.875732,440.842163,-196.198654,1217,1041,1};
|
||||||
window[] = {2,-1,-1,-1,-1,838,104,1398,104,3,1235};
|
window[] = {2,-1,-1,-1,-1,1009,275,1569,275,3,1235};
|
||||||
*//*%FSM</HEAD>*/
|
*//*%FSM</HEAD>*/
|
||||||
class FSM
|
class FSM
|
||||||
{
|
{
|
||||||
fsmName = "dms_main";
|
fsmName = "dms_main";
|
||||||
class States
|
class States
|
||||||
|
{
|
||||||
|
/*%FSM<STATE "INIT">*/
|
||||||
|
class INIT
|
||||||
|
{
|
||||||
|
name = "INIT";
|
||||||
|
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
||||||
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
|
class Links
|
||||||
|
{
|
||||||
|
/*%FSM<LINK "INITIALIZE">*/
|
||||||
|
class INITIALIZE
|
||||||
{
|
{
|
||||||
/*%FSM<STATE "INIT">*/
|
priority = 0.000000;
|
||||||
class INIT
|
to="PREPARE";
|
||||||
{
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
name = "INIT";
|
condition=/*%FSM<CONDITION""">*/"!isnil ""bis_fnc_init"""/*%FSM</CONDITION""">*/;
|
||||||
itemno = 1;
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||||
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
||||||
class Links
|
|
||||||
{
|
|
||||||
/*%FSM<LINK "INITIALIZE">*/
|
|
||||||
class INITIALIZE
|
|
||||||
{
|
|
||||||
itemno = 12;
|
|
||||||
priority = 0.000000;
|
|
||||||
to="PREPARE";
|
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
||||||
condition=/*%FSM<CONDITION""">*/"!isnil ""bis_fnc_init"""/*%FSM</CONDITION""">*/;
|
|
||||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
||||||
};
|
|
||||||
/*%FSM</LINK>*/
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/*%FSM</STATE>*/
|
|
||||||
/*%FSM<STATE "Waiting">*/
|
|
||||||
class Waiting
|
|
||||||
{
|
|
||||||
name = "Waiting";
|
|
||||||
itemno = 3;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"// Waiting for next task to proceed with."/*%FSM</STATEINIT""">*/;
|
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
||||||
class Links
|
|
||||||
{
|
|
||||||
/*%FSM<LINK "___Min_loop">*/
|
|
||||||
class ___Min_loop
|
|
||||||
{
|
|
||||||
itemno = 14;
|
|
||||||
priority = 3.000000;
|
|
||||||
to="Select_Mission";
|
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
||||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _selectMission) > 60)" \n
|
|
||||||
""/*%FSM</CONDITION""">*/;
|
|
||||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
||||||
};
|
|
||||||
/*%FSM</LINK>*/
|
|
||||||
/*%FSM<LINK "___min_loop_1">*/
|
|
||||||
class ___min_loop_1
|
|
||||||
{
|
|
||||||
itemno = 8;
|
|
||||||
priority = 2.000000;
|
|
||||||
to="Mission_Cleanup";
|
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
||||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _cleanupTime) > 60)"/*%FSM</CONDITION""">*/;
|
|
||||||
action=/*%FSM<ACTION""">*/"_cleanupTime = time;"/*%FSM</ACTION""">*/;
|
|
||||||
};
|
|
||||||
/*%FSM</LINK>*/
|
|
||||||
/*%FSM<LINK "___min_loop_2">*/
|
|
||||||
class ___min_loop_2
|
|
||||||
{
|
|
||||||
itemno = 5;
|
|
||||||
priority = 1.000000;
|
|
||||||
to="Check_Mission_Running";
|
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
||||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _missionsMonitor) > 60)"/*%FSM</CONDITION""">*/;
|
|
||||||
action=/*%FSM<ACTION""">*/"_missionsMonitor = time;"/*%FSM</ACTION""">*/;
|
|
||||||
};
|
|
||||||
/*%FSM</LINK>*/
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/*%FSM</STATE>*/
|
|
||||||
/*%FSM<STATE "Check_Mission_Running">*/
|
|
||||||
class Check_Mission_Running
|
|
||||||
{
|
|
||||||
name = "Check_Mission_Running";
|
|
||||||
itemno = 6;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"call DMS_MissionsMonitor;" \n
|
|
||||||
"" \n
|
|
||||||
"" \n
|
|
||||||
"if(DMS_DEBUG) then {" \n
|
|
||||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling missionsmonitor""];" \n
|
|
||||||
"};"/*%FSM</STATEINIT""">*/;
|
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
||||||
class Links
|
|
||||||
{
|
|
||||||
/*%FSM<LINK "true">*/
|
|
||||||
class true
|
|
||||||
{
|
|
||||||
itemno = 2;
|
|
||||||
priority = 0.000000;
|
|
||||||
to="Waiting";
|
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
||||||
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
|
||||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
||||||
};
|
|
||||||
/*%FSM</LINK>*/
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/*%FSM</STATE>*/
|
|
||||||
/*%FSM<STATE "Mission_Cleanup">*/
|
|
||||||
class Mission_Cleanup
|
|
||||||
{
|
|
||||||
name = "Mission_Cleanup";
|
|
||||||
itemno = 11;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"call DMS_CleanUpManager;" \n
|
|
||||||
"" \n
|
|
||||||
"if(DMS_DEBUG) then {" \n
|
|
||||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling mission cleanup""];" \n
|
|
||||||
"};"/*%FSM</STATEINIT""">*/;
|
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
||||||
class Links
|
|
||||||
{
|
|
||||||
/*%FSM<LINK "true">*/
|
|
||||||
class true
|
|
||||||
{
|
|
||||||
itemno = 2;
|
|
||||||
priority = 0.000000;
|
|
||||||
to="Waiting";
|
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
||||||
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
|
||||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
||||||
};
|
|
||||||
/*%FSM</LINK>*/
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/*%FSM</STATE>*/
|
|
||||||
/*%FSM<STATE "PREPARE">*/
|
|
||||||
class PREPARE
|
|
||||||
{
|
|
||||||
name = "PREPARE";
|
|
||||||
itemno = 13;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"private [""_missionsMonitor"",""_cleanupTime"",""_selectMission""];" \n
|
|
||||||
"diag_log (""DMS :: Initializing FSM mission script"");" \n
|
|
||||||
"" \n
|
|
||||||
"_missionsMonitor = diag_tickTime;" \n
|
|
||||||
"_cleanupTime = diag_tickTime;" \n
|
|
||||||
"_selectMission = diag_tickTime;"/*%FSM</STATEINIT""">*/;
|
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
||||||
class Links
|
|
||||||
{
|
|
||||||
/*%FSM<LINK "true">*/
|
|
||||||
class true
|
|
||||||
{
|
|
||||||
itemno = 2;
|
|
||||||
priority = 0.000000;
|
|
||||||
to="Waiting";
|
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
||||||
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
|
||||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
||||||
};
|
|
||||||
/*%FSM</LINK>*/
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/*%FSM</STATE>*/
|
|
||||||
/*%FSM<STATE "Select_Mission">*/
|
|
||||||
class Select_Mission
|
|
||||||
{
|
|
||||||
name = "Select_Mission";
|
|
||||||
itemno = 15;
|
|
||||||
init = /*%FSM<STATEINIT""">*/"call DMS_selectMission;" \n
|
|
||||||
"" \n
|
|
||||||
"if(DMS_DEBUG) then {" \n
|
|
||||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling mission select""];" \n
|
|
||||||
"};"/*%FSM</STATEINIT""">*/;
|
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
||||||
class Links
|
|
||||||
{
|
|
||||||
/*%FSM<LINK "true">*/
|
|
||||||
class true
|
|
||||||
{
|
|
||||||
itemno = 2;
|
|
||||||
priority = 0.000000;
|
|
||||||
to="Waiting";
|
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
||||||
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
|
||||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
||||||
};
|
|
||||||
/*%FSM</LINK>*/
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/*%FSM</STATE>*/
|
|
||||||
};
|
};
|
||||||
initState="INIT";
|
/*%FSM</LINK>*/
|
||||||
finalStates[] =
|
};
|
||||||
|
};
|
||||||
|
/*%FSM</STATE>*/
|
||||||
|
/*%FSM<STATE "Waiting">*/
|
||||||
|
class Waiting
|
||||||
|
{
|
||||||
|
name = "Waiting";
|
||||||
|
init = /*%FSM<STATEINIT""">*/"// Waiting for next task to proceed with."/*%FSM</STATEINIT""">*/;
|
||||||
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
|
class Links
|
||||||
|
{
|
||||||
|
/*%FSM<LINK "___Min_loop">*/
|
||||||
|
class ___Min_loop
|
||||||
{
|
{
|
||||||
|
priority = 3.000000;
|
||||||
|
to="Select_Mission";
|
||||||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
|
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _selectMission) > 60)" \n
|
||||||
|
""/*%FSM</CONDITION""">*/;
|
||||||
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||||
};
|
};
|
||||||
|
/*%FSM</LINK>*/
|
||||||
|
/*%FSM<LINK "___min_loop">*/
|
||||||
|
class ___min_loop
|
||||||
|
{
|
||||||
|
priority = 2.000000;
|
||||||
|
to="Mission_Cleanup";
|
||||||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
|
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _cleanupTime) > 60)"/*%FSM</CONDITION""">*/;
|
||||||
|
action=/*%FSM<ACTION""">*/"_cleanupTime = time;"/*%FSM</ACTION""">*/;
|
||||||
|
};
|
||||||
|
/*%FSM</LINK>*/
|
||||||
|
/*%FSM<LINK "___min_loop_1">*/
|
||||||
|
class ___min_loop_1
|
||||||
|
{
|
||||||
|
priority = 1.000000;
|
||||||
|
to="Check_Mission_Running";
|
||||||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
|
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _missionsMonitor) > 60)"/*%FSM</CONDITION""">*/;
|
||||||
|
action=/*%FSM<ACTION""">*/"_missionsMonitor = time;"/*%FSM</ACTION""">*/;
|
||||||
|
};
|
||||||
|
/*%FSM</LINK>*/
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/*%FSM</STATE>*/
|
||||||
|
/*%FSM<STATE "Check_Mission_Running">*/
|
||||||
|
class Check_Mission_Running
|
||||||
|
{
|
||||||
|
name = "Check_Mission_Running";
|
||||||
|
init = /*%FSM<STATEINIT""">*/"_missionsMonitor = diag_tickTime;" \n
|
||||||
|
"call DMS_MissionsMonitor;" \n
|
||||||
|
"" \n
|
||||||
|
"if(DMS_DEBUG) then {" \n
|
||||||
|
" diag_log format [""DMS_DEBUG FSM CHECK :: calling missionsmonitor""];" \n
|
||||||
|
"};"/*%FSM</STATEINIT""">*/;
|
||||||
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
|
class Links
|
||||||
|
{
|
||||||
|
/*%FSM<LINK "true">*/
|
||||||
|
class true
|
||||||
|
{
|
||||||
|
priority = 0.000000;
|
||||||
|
to="Waiting";
|
||||||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
|
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
||||||
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||||
|
};
|
||||||
|
/*%FSM</LINK>*/
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/*%FSM</STATE>*/
|
||||||
|
/*%FSM<STATE "Mission_Cleanup">*/
|
||||||
|
class Mission_Cleanup
|
||||||
|
{
|
||||||
|
name = "Mission_Cleanup";
|
||||||
|
init = /*%FSM<STATEINIT""">*/"_cleanupTime = diag_tickTime;" \n
|
||||||
|
"call DMS_CleanUpManager;" \n
|
||||||
|
"" \n
|
||||||
|
"if(DMS_DEBUG) then {" \n
|
||||||
|
" diag_log format [""DMS_DEBUG FSM CHECK :: calling mission cleanup""];" \n
|
||||||
|
"};"/*%FSM</STATEINIT""">*/;
|
||||||
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
|
class Links
|
||||||
|
{
|
||||||
|
/*%FSM<LINK "true">*/
|
||||||
|
class true
|
||||||
|
{
|
||||||
|
priority = 0.000000;
|
||||||
|
to="Waiting";
|
||||||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
|
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
||||||
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||||
|
};
|
||||||
|
/*%FSM</LINK>*/
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/*%FSM</STATE>*/
|
||||||
|
/*%FSM<STATE "PREPARE">*/
|
||||||
|
class PREPARE
|
||||||
|
{
|
||||||
|
name = "PREPARE";
|
||||||
|
init = /*%FSM<STATEINIT""">*/"private [""_missionsMonitor"",""_cleanupTime"",""_selectMission""];" \n
|
||||||
|
"diag_log (""DMS :: Initializing FSM mission script"");" \n
|
||||||
|
"" \n
|
||||||
|
"_missionsMonitor = diag_tickTime;" \n
|
||||||
|
"_cleanupTime = diag_tickTime;" \n
|
||||||
|
"_selectMission = diag_tickTime;"/*%FSM</STATEINIT""">*/;
|
||||||
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
|
class Links
|
||||||
|
{
|
||||||
|
/*%FSM<LINK "true">*/
|
||||||
|
class true
|
||||||
|
{
|
||||||
|
priority = 0.000000;
|
||||||
|
to="Waiting";
|
||||||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
|
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
||||||
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||||
|
};
|
||||||
|
/*%FSM</LINK>*/
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/*%FSM</STATE>*/
|
||||||
|
/*%FSM<STATE "Select_Mission">*/
|
||||||
|
class Select_Mission
|
||||||
|
{
|
||||||
|
name = "Select_Mission";
|
||||||
|
init = /*%FSM<STATEINIT""">*/"_selectMission = diag_tickTime;" \n
|
||||||
|
"call DMS_selectMission;" \n
|
||||||
|
"" \n
|
||||||
|
"if(DMS_DEBUG) then {" \n
|
||||||
|
" diag_log format [""DMS_DEBUG FSM CHECK :: calling mission select""];" \n
|
||||||
|
"};"/*%FSM</STATEINIT""">*/;
|
||||||
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
|
class Links
|
||||||
|
{
|
||||||
|
/*%FSM<LINK "true">*/
|
||||||
|
class true
|
||||||
|
{
|
||||||
|
priority = 0.000000;
|
||||||
|
to="Waiting";
|
||||||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
|
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
||||||
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||||
|
};
|
||||||
|
/*%FSM</LINK>*/
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/*%FSM</STATE>*/
|
||||||
|
};
|
||||||
|
initState="INIT";
|
||||||
|
finalStates[] =
|
||||||
|
{
|
||||||
|
};
|
||||||
};
|
};
|
||||||
/*%FSM</COMPILE>*/
|
/*%FSM</COMPILE>*/
|
@ -28,7 +28,7 @@ if ((_time - DMS_BMissionLastStart > DMS_BMissionDelay) && {diag_fps >= DMS_MinS
|
|||||||
|
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
{
|
{
|
||||||
diag_log format ["DMS_DEBUG SelectMission :: Spawning mission: %1 | DMS_BMissionDelay set to %2",_mission,DMS_TimeBetweenMissions];
|
diag_log format ["DMS_DEBUG SelectMission :: Spawning mission: %1 | DMS_BMissionDelay set to %2",_mission,DMS_BMissionDelay];
|
||||||
};
|
};
|
||||||
|
|
||||||
call compile preprocessFileLineNumbers (format ["\x\addons\DMS\missions\%1.sqf",_mission]);
|
call compile preprocessFileLineNumbers (format ["\x\addons\DMS\missions\%1.sqf",_mission]);
|
||||||
|
@ -98,6 +98,14 @@ _clean =
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
if ((typeName _x) == "ARRAY") exitWith
|
||||||
|
{
|
||||||
|
if (DMS_DEBUG) then
|
||||||
|
{
|
||||||
|
diag_log format ["DMS_DEBUG CleanUp :: Doing recursive call for ARRAY: %1",_x];
|
||||||
|
};
|
||||||
|
_x call DMS_CleanUp;
|
||||||
|
};
|
||||||
diag_log format ["DMS ERROR :: Attempted to call DMS_CleanUp on non- group or object %1 from array %2",_x,_this];
|
diag_log format ["DMS ERROR :: Attempted to call DMS_CleanUp on non- group or object %1 from array %2",_x,_this];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,6 +88,10 @@ if ((_wepCount>0) && {count _weps>0}) then
|
|||||||
{
|
{
|
||||||
_weapon = _weps call BIS_fnc_selectRandom;
|
_weapon = _weps call BIS_fnc_selectRandom;
|
||||||
_ammo = _weapon call DMS_selectMagazine;
|
_ammo = _weapon call DMS_selectMagazine;
|
||||||
|
if ((typeName _weapon)=="STRING") then
|
||||||
|
{
|
||||||
|
_weapon = [_weapon,1];
|
||||||
|
};
|
||||||
_box addWeaponCargoGlobal _weapon;
|
_box addWeaponCargoGlobal _weapon;
|
||||||
_box addItemCargoGlobal [_ammo, (4 + floor(random 3))];
|
_box addItemCargoGlobal [_ammo, (4 + floor(random 3))];
|
||||||
};
|
};
|
||||||
@ -100,6 +104,10 @@ if ((_itemCount > 0) && {count _items>0}) then
|
|||||||
for "_i" from 1 to _itemCount do
|
for "_i" from 1 to _itemCount do
|
||||||
{
|
{
|
||||||
_item = _items call BIS_fnc_selectRandom;
|
_item = _items call BIS_fnc_selectRandom;
|
||||||
|
if ((typeName _item)=="STRING") then
|
||||||
|
{
|
||||||
|
_item = [_item,1];
|
||||||
|
};
|
||||||
_box addItemCargoGlobal _item;
|
_box addItemCargoGlobal _item;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -111,6 +119,10 @@ if ((_backpackCount > 0) && {count _backpacks>0}) then
|
|||||||
for "_i" from 1 to _backpackCount do
|
for "_i" from 1 to _backpackCount do
|
||||||
{
|
{
|
||||||
_backpack = _backpacks call BIS_fnc_selectRandom;
|
_backpack = _backpacks call BIS_fnc_selectRandom;
|
||||||
|
if ((typeName _backpack)=="STRING") then
|
||||||
|
{
|
||||||
|
_backpack = [_backpack,1];
|
||||||
|
};
|
||||||
_box addBackpackCargoGlobal _backpack;
|
_box addBackpackCargoGlobal _backpack;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -122,6 +134,10 @@ if(DMS_RareLoot && {count DMS_RareLoot>0}) then
|
|||||||
if(random 100 < DMS_RareLootChance) then
|
if(random 100 < DMS_RareLootChance) then
|
||||||
{
|
{
|
||||||
_item = DMS_RareLoot call BIS_fnc_selectRandom;
|
_item = DMS_RareLoot call BIS_fnc_selectRandom;
|
||||||
|
if ((typeName _item)=="STRING") then
|
||||||
|
{
|
||||||
|
_item = [_item,1];
|
||||||
|
};
|
||||||
_box addItemCargoGlobal _item;
|
_box addItemCargoGlobal _item;
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -34,7 +34,7 @@ _success = true;
|
|||||||
_OK = _x params
|
_OK = _x params
|
||||||
[
|
[
|
||||||
["_completionType", "", [""] ],
|
["_completionType", "", [""] ],
|
||||||
["_completionArgs", [], [[]] ]
|
["_completionArgs", [], [[],grpNull] ]
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!_OK) exitWith
|
if (!_OK) exitWith
|
||||||
|
@ -22,10 +22,12 @@
|
|||||||
*/
|
*/
|
||||||
if (DMS_Mission_Arr isEqualTo []) exitWith // Empty array, no missions running
|
if (DMS_Mission_Arr isEqualTo []) exitWith // Empty array, no missions running
|
||||||
{
|
{
|
||||||
|
/* Removed because RPT spam
|
||||||
if (DMS_DEBUG) then
|
if (DMS_DEBUG) then
|
||||||
{
|
{
|
||||||
diag_log "DMS_DEBUG MissionStatusCheck :: DMS_Mission_Arr is empty!";
|
diag_log "DMS_DEBUG MissionStatusCheck :: DMS_Mission_Arr is empty!";
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -52,7 +54,7 @@ _index = 0;
|
|||||||
|
|
||||||
if (_success) exitWith
|
if (_success) exitWith
|
||||||
{
|
{
|
||||||
DMS_CleanUpList pushBack [_units+_building,diag_tickTime,DMS_CompletedMissionCleanupTime];
|
DMS_CleanUpList pushBack [_units+_buildings,diag_tickTime,DMS_CompletedMissionCleanupTime];
|
||||||
|
|
||||||
if (_missionSide == "bandit") then
|
if (_missionSide == "bandit") then
|
||||||
{
|
{
|
||||||
|
@ -14,11 +14,6 @@
|
|||||||
|
|
||||||
if ((typeName _this) in ["GROUP","OBJECT"]) then
|
if ((typeName _this) in ["GROUP","OBJECT"]) then
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG TargetsKilled :: Converting %1 into ARRAY",_this];
|
|
||||||
};
|
|
||||||
|
|
||||||
_this = [_this];
|
_this = [_this];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user