diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:54:45 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:54:45 +0300 |
| commit | 68d4c9bbd80ed2e6528244569c79676b87295bd1 (patch) | |
| tree | 6efd42fbf6f1281874ae0ff1f8816b01fe0c7153 /Client/FSM/updateclient.fsm | |
| download | a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.tar.gz a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.tar.bz2 a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.zip | |
init
Diffstat (limited to 'Client/FSM/updateclient.fsm')
| -rw-r--r-- | Client/FSM/updateclient.fsm | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/Client/FSM/updateclient.fsm b/Client/FSM/updateclient.fsm new file mode 100644 index 0000000..f6f1538 --- /dev/null +++ b/Client/FSM/updateclient.fsm @@ -0,0 +1,175 @@ +/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updateclient">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,66.278671,-152.869141,156.278748,-102.869209,0.000000,"Init"};
+item1[] = {"Update_Client",2,250,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Update Client"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.668854,-56.267559,-126.668869,-6.267574,0.000000,"Gameover"};
+item5[] = {"Update_Commander",2,4346,66.545486,22.916348,156.545471,72.916397,0.000000,"Update" \n "Commander"};
+item6[] = {"Change_Commander",4,218,-66.545563,22.916351,23.454376,72.916374,0.000000,"Change" \n "Commander"};
+link0[] = {0,3};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {1,6};
+link4[] = {3,1};
+link5[] = {4,2};
+link6[] = {5,3};
+link7[] = {6,5};
+globals[] = {0.000000,0,0,0,0,640,480,1,22,6316128,1,-345.209412,345.209290,108.499458,-297.536255,1028,906,1};
+window[] = {2,-1,-1,-1,-1,834,200,1652,200,3,1046};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updateclient";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"commanderTeam = (SideJoined) Call GetCommanderTeam;" \n
+ "" \n
+ "_lastCommanderTeam = commanderTeam;" \n
+ "_changeCommander = false;" \n
+ "_timer = 0;" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Client";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Client">*/
+ class Update_Client
+ {
+ name = "Update_Client";
+ init = /*%FSM<STATEINIT""">*/"commanderTeam = (sideJoined) Call GetCommanderTeam;" \n
+ "if (IsNull commanderTeam && !IsNull _lastCommanderTeam) then {_changeCommander = true};" \n
+ "if (!IsNull commanderTeam && IsNull _lastCommanderTeam) then {_changeCommander = true};" \n
+ "if (!isNull commanderTeam && !isNull _lastCommanderTeam) then {" \n
+ " if (commanderTeam != _lastCommanderTeam) then {_changeCommander = true};" \n
+ "};" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Change_Commander">*/
+ class Change_Commander
+ {
+ priority = 0.000000;
+ to="Update_Commander";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_changeCommander && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Client";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Commander">*/
+ class Update_Commander
+ {
+ name = "Update_Commander";
+ init = /*%FSM<STATEINIT""">*/"_changeCommander = false;" \n
+ "_lastCommanderTeam = commanderTeam; " \n
+ "_MHQ = (sideJoinedText) Call GetSideHQ;" \n
+ "" \n
+ "if (IsNull commanderTeam) then {" \n
+ " if (!IsNull _MHQ) then {" \n
+ " _MHQ RemoveAction 0;" \n
+ " _MHQ RemoveAction 1;" \n
+ " _MHQ RemoveAction 2;" \n
+ " _MHQ RemoveAction 3;" \n
+ " };" \n
+ " if (!isNil ""HQAction"") then {player removeAction HQAction};" \n
+ " if (count (hcAllGroups player) > 0) then {HCRemoveAllGroups player};" \n
+ " {[_x,false] Call SetTeamAutonomous} forEach clientTeams;" \n
+ "};" \n
+ " " \n
+ "if (!isNull(commanderTeam)) then {" \n
+ " if (commanderTeam == Group player) then {" \n
+ " if (!IsNull _MHQ) then {" \n
+ " _MHQ addAction [localize ""STR_WF_Unlock_MHQ"",""Client\Action\Action_ToggleLock.sqf"", [], 95, false, true, '', 'alive _target && locked _target'];" \n
+ " _MHQ addAction [localize ""STR_WF_Lock_MHQ"",""Client\Action\Action_ToggleLock.sqf"", [], 94, false, true, '', 'alive _target && !(locked _target)'];" \n
+ " };" \n
+ " _deployed = (sideJoinedText) Call GetSideHQDeployed;" \n
+ " if (_deployed) then {" \n
+ " ['WFBE_AREAHQDEPLOYED' Call GetNameSpace,true,MCoin] Call Compile PreprocessFile ""Client\Init\Init_Coin.sqf"";" \n
+ " } else {" \n
+ " ['WFBE_AREAHQUNDEPLOYED' Call GetNamespace,false,MCoin] Call Compile PreprocessFile ""Client\Init\Init_Coin.sqf"";" \n
+ " };" \n
+ " HQAction = leader(group player) addAction [localize ""STR_WF_BuildMenu"",""Client\Action\Action_Build.sqf"", [_MHQ], 100, false, true, """", ""hqInRange && canBuildWHQ && (_target == player)""]; " \n
+ " if (paramHighCommand) then {player setVariable [""BIS_HC_scope"",HC];{if !(isNil '_x') then {player HCSetGroup [_x]; [_x,false] Call SetTeamAutonomous}} forEach clientTeams};" \n
+ " [Localize ""STR_WF_CHAT_PlayerCommander""] Call TitleTextMessage;" \n
+ " } else {" \n
+ " if (!isNil ""HQAction"") then {player removeAction HQAction};" \n
+ " if (count (hcAllGroups player) > 0 && paramHighCommand) then {HCRemoveAllGroups player};" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Client";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/
\ No newline at end of file |
