From 0303e10c1e774011a166aaf1ab4af94b318bd894 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Sat, 5 Mar 2022 19:54:57 +0000 Subject: [PATCH 01/24] Using default respawn. Removed respawnWaves component, made downtime only work on uncon players. --- .../fn_addSquadManagerActionsToClass.sqf | 20 -- .../briefing/briefings/ca_briefing_player.sqf | 2 - components/downtime/downtime_macros.hpp | 2 +- components/functions.hpp | 31 ++- .../respawnWaves/fn_createPlayerSpawner.sqf | 47 ---- .../respawnWaves/fn_forceRespawnWave.sqf | 40 --- .../respawnWaves/fn_respawnDialogSupport.sqf | 49 ---- components/respawnWaves/fn_respawnWave.sqf | 51 ---- .../respawnWaves/fn_respawnWaveServer.sqf | 80 ------ components/respawnWaves/functions.hpp | 22 -- components/respawnWaves/init_component.sqf | 73 ------ components/respawnWaves/macros.hpp | 4 - components/respawnWaves/respawnDialog.hpp | 187 -------------- components/respawnWaves/ui/respawnTitle.hpp | 43 ---- components/respawnWaves/ui/titles.hpp | 2 - .../ui_functions/fn_respawnTitle_onLoad.sqf | 29 --- components/respawnWaves/ui_macros.hpp | 2 - .../zen/fn_zen_createPlayerSpawner.sqf | 8 - .../respawnWaves/zen/fn_zen_createSpawner.sqf | 8 - .../zen/fn_zen_moveRespawnMarker.sqf | 21 -- .../zen/fn_zen_setRespawnObject.sqf | 19 -- components/respawnWaves/zen_modules.sqf | 43 ---- components/zen_modules.sqf | 1 - description.ext | 41 +-- dialogs.hpp | 2 - initPlayerLocal.sqf | 15 ++ mission.sqm | 6 +- respawnTemplates/parts/applyOldLoadout.sqf | 17 -- respawnTemplates/parts/macros.hpp | 1 - respawnTemplates/parts/tryTeleport.sqf | 33 --- respawnTemplates/respawnWaves/macros.hpp | 3 - .../respawnWaves/onPlayerKilled.sqf | 20 -- .../respawnWaves/onPlayerRespawn.sqf | 239 ------------------ .../components/groups/clientStartupGroup.sqf | 2 - .../components/groups/serverStartupGroup.sqf | 2 - .../groups/clientConfigGroup.sqf | 3 - .../groups/serverConfigGroup.sqf | 3 - titles.hpp | 1 - 38 files changed, 42 insertions(+), 1130 deletions(-) delete mode 100644 components/respawnWaves/fn_createPlayerSpawner.sqf delete mode 100644 components/respawnWaves/fn_forceRespawnWave.sqf delete mode 100644 components/respawnWaves/fn_respawnDialogSupport.sqf delete mode 100644 components/respawnWaves/fn_respawnWave.sqf delete mode 100644 components/respawnWaves/fn_respawnWaveServer.sqf delete mode 100644 components/respawnWaves/functions.hpp delete mode 100644 components/respawnWaves/init_component.sqf delete mode 100644 components/respawnWaves/macros.hpp delete mode 100644 components/respawnWaves/respawnDialog.hpp delete mode 100644 components/respawnWaves/ui/respawnTitle.hpp delete mode 100644 components/respawnWaves/ui/titles.hpp delete mode 100644 components/respawnWaves/ui_functions/fn_respawnTitle_onLoad.sqf delete mode 100644 components/respawnWaves/ui_macros.hpp delete mode 100644 components/respawnWaves/zen/fn_zen_createPlayerSpawner.sqf delete mode 100644 components/respawnWaves/zen/fn_zen_createSpawner.sqf delete mode 100644 components/respawnWaves/zen/fn_zen_moveRespawnMarker.sqf delete mode 100644 components/respawnWaves/zen/fn_zen_setRespawnObject.sqf delete mode 100644 components/respawnWaves/zen_modules.sqf create mode 100644 initPlayerLocal.sqf delete mode 100644 respawnTemplates/parts/applyOldLoadout.sqf delete mode 100644 respawnTemplates/parts/macros.hpp delete mode 100644 respawnTemplates/parts/tryTeleport.sqf delete mode 100644 respawnTemplates/respawnWaves/macros.hpp delete mode 100644 respawnTemplates/respawnWaves/onPlayerKilled.sqf delete mode 100644 respawnTemplates/respawnWaves/onPlayerRespawn.sqf diff --git a/components/aceActions/fn_addSquadManagerActionsToClass.sqf b/components/aceActions/fn_addSquadManagerActionsToClass.sqf index fac0dafc..c1257f23 100644 --- a/components/aceActions/fn_addSquadManagerActionsToClass.sqf +++ b/components/aceActions/fn_addSquadManagerActionsToClass.sqf @@ -27,26 +27,6 @@ _createSquadNode = _children = []; - // Respawn menu action - _action = - [ - "CAFE_RespawnMenu", - "Show Respawn Menu", - "\A3\ui_f\data\igui\cfg\simpleTasks\types\getin_ca.paa", - {createDialog "RespawnWavesDialog";}, - {_player getVariable ["f_var_canUseRespawnMenu", false]}, - {}, - [], - "", - 20, - [false,false,false,false,false], - {} - ]; - - _action call ace_interact_menu_fnc_createAction; - - _children pushBack [_action, [], _target]; - // Squad marker menu action _action = diff --git a/components/briefing/briefings/ca_briefing_player.sqf b/components/briefing/briefings/ca_briefing_player.sqf index ab6bc650..b475efc5 100644 --- a/components/briefing/briefings/ca_briefing_player.sqf +++ b/components/briefing/briefings/ca_briefing_player.sqf @@ -5,8 +5,6 @@ _briefing = ""; _briefing = _briefing + " CA Player Controls

-|- -Respawn system
|- Give self admin menu
diff --git a/components/downtime/downtime_macros.hpp b/components/downtime/downtime_macros.hpp index 8a0ad405..c7afc112 100644 --- a/components/downtime/downtime_macros.hpp +++ b/components/downtime/downtime_macros.hpp @@ -16,6 +16,6 @@ #define PLAYER_IS_AWAITING_RESPAWN (missionNamespace getVariable ["f_var_playerHasBeenKilled", false]) #define PLAYER_IS_DOWN (IS_UNCONSCIOUS(player) or {!alive player} or {PLAYER_IS_AWAITING_RESPAWN}) #define PLAYER_IS_GHOST (PLAYER_IS_AWAITING_RESPAWN and {alive player}) -#define SHOULD_DO_DOWNTIME ((IS_UNCONSCIOUS(player) and {!HAS_OPTED_OUT}) or {!alive player} or {PLAYER_IS_AWAITING_RESPAWN}) +#define SHOULD_DO_DOWNTIME (IS_UNCONSCIOUS(player) and {!HAS_OPTED_OUT}) #define GET_SPECTATOR_CAM_ARGS(MODE) (missionNamespace getVariable [format ["f_var_downtime_spectatorModes_%1", MODE], f_var_downtime_spectatorModes_AllowAll]) diff --git a/components/functions.hpp b/components/functions.hpp index a9bea32c..fe784c49 100644 --- a/components/functions.hpp +++ b/components/functions.hpp @@ -1,31 +1,30 @@ class F { +#include "aceActions\functions.hpp" +#include "aiBehaviour\functions.hpp" +#include "aiCache\functions.hpp" +#include "aiDriver\functions.hpp" #include "briefing\functions.hpp" #include "ceasefire\functions.hpp" +#include "downtime\functions.hpp" +#include "endings\functions.hpp" #include "ftMemberMarkers\functions.hpp" -#include "aiCache\functions.hpp" -#include "aiDriver\functions.hpp" -#include "radios\functions.hpp" #include "gearScript\functions.hpp" +#include "gravestones\functions.hpp" +#include "identity\functions.hpp" +#include "joinInProgress\functions.hpp" +#include "killTracker\functions.hpp" +#include "logiVehicle\functions.hpp" +#include "lootBox\functions.hpp" +#include "mapClick\functions.hpp" #include "miscClient\functions.hpp" #include "miscShared\functions.hpp" -#include "respawnWaves\functions.hpp" +#include "radios\functions.hpp" #include "spawnNpcs\functions.hpp" -#include "joinInProgress\functions.hpp" -#include "mapClick\functions.hpp" -#include "aiBehaviour\functions.hpp" -#include "zeus_ui\functions.hpp" -#include "aceActions\functions.hpp" -#include "killTracker\functions.hpp" -#include "gravestones\functions.hpp" #include "squadMarkers\functions.hpp" -#include "endings\functions.hpp" -#include "lootBox\functions.hpp" #include "viewDistanceEditor\functions.hpp" -#include "downtime\functions.hpp" -#include "identity\functions.hpp" -#include "logiVehicle\functions.hpp" +#include "zeus_ui\functions.hpp" } diff --git a/components/respawnWaves/fn_createPlayerSpawner.sqf b/components/respawnWaves/fn_createPlayerSpawner.sqf deleted file mode 100644 index 256100f5..00000000 --- a/components/respawnWaves/fn_createPlayerSpawner.sqf +++ /dev/null @@ -1,47 +0,0 @@ -#include "macros.hpp" -#include "../../squadmarker_macros.hpp" - -params ["_pos", ["_side", west]]; - -SERVER_ONLY; - -_spawner = "VR_Area_01_square_1x1_yellow_F" createVehicle _pos; -_spawner setPosASL _pos; - -[_spawner, _side] spawn -{ - params ["_spawner", "_side"]; - - sleep 15; - - while {alive _spawner} do - { - _group = GET_SQUAD_ON_SIDE_DYNAMIC("Spectators",_side); - - waitUntil - { - sleep 5; - - (isNull _group) or {count units _group > 0}; - }; - - if !(isNull _group) then - { - _unit = selectRandom units _group; - _unit setVariable ["mySpawner", _spawner, true]; - - hideObjectGlobal _spawner; - - sleep 10; - - deleteVehicle _spawner; - - sleep 1; - - }; - - }; - -}; - -_spawner diff --git a/components/respawnWaves/fn_forceRespawnWave.sqf b/components/respawnWaves/fn_forceRespawnWave.sqf deleted file mode 100644 index 44d05c7e..00000000 --- a/components/respawnWaves/fn_forceRespawnWave.sqf +++ /dev/null @@ -1,40 +0,0 @@ - -#include "macros.hpp" -CLIENT_ONLY; -RUN_AS_ASYNC(f_fnc_forceRespawnWave); - -params ["_side"]; - -_spawnAt = switch (RESPAWN_MODE(_side)) do -{ - case RESPAWN_MODE_BASE: - { - systemChat "Your reinforcements will arrive at the default respawn location in 10 seconds..."; - RESPAWN_ENTITY(_side) - }; - - case RESPAWN_MODE_COMMANDER: - { - if ((groupId group player) isEqualTo "Spectators") then - { - systemChat "Your reinforcements will arrive at the default respawn location in 10 seconds..."; - RESPAWN_ENTITY(_side) - } - else - { - systemChat "Your reinforcements will arrive ON YOUR POSITION in 10 seconds..."; - player - } - - }; - -}; - -if (isNull _spawnAt) then -{ - _spawnAt = RESPAWN_MARKER_POS(_side); -}; - -uiSleep 10; - -[_spawnAt, _side] remoteExec ["f_fnc_respawnWaveServer", 2]; diff --git a/components/respawnWaves/fn_respawnDialogSupport.sqf b/components/respawnWaves/fn_respawnDialogSupport.sqf deleted file mode 100644 index c1e4599b..00000000 --- a/components/respawnWaves/fn_respawnDialogSupport.sqf +++ /dev/null @@ -1,49 +0,0 @@ -#include "macros.hpp" - -// CA - Filling listbox for the ca marker management system. -_alreadyinlist = []; - -while {true} do -{ - disableSerialization; - - _display = findDisplay 1996; - _lb1ctrl = _display displayCtrl 1500; - - _side = side group player; - _groupVar = toLower format ["f_group_spectators_%1", _side]; - _specGroup = missionNamespace getVariable [_groupVar, grpNull]; - - _specPlayers = (units _specGroup); - _listplayers = _specplayers - _alreadyinlist; - - { - _alreadyinlist pushBackUnique _x; - _lb1ctrl lbAdd (name _x); - _lb1ctrl lbSetData [_forEachIndex, (name _x)]; - - } forEach _listplayers; - - _waves = _display displayCtrl 1004; - _noplayers = _display displayCtrl 1005; - _timer = _display displayCtrl 1006; - - _waves ctrlSetText ('Waves left: ' + str RESPAWN_WAVES(_side)); - _noplayers ctrlSetText (str (count _specPlayers) + ' players are waiting.'); - - _time = TIME_UNTIL_RESPAWN_READY(_side); - - if (0 > _time) then - { - _timer ctrlSetText ('Respawn wave available'); - } - else - { - _timeString = [_time] call f_fnc_formatTimeDuration; - - _timer ctrlSetText (_timeString + ' until wave available'); - - }; - - uiSleep 1; -}; diff --git a/components/respawnWaves/fn_respawnWave.sqf b/components/respawnWaves/fn_respawnWave.sqf deleted file mode 100644 index 694b1355..00000000 --- a/components/respawnWaves/fn_respawnWave.sqf +++ /dev/null @@ -1,51 +0,0 @@ - -#include "macros.hpp" -CLIENT_ONLY; -RUN_AS_ASYNC(f_fnc_respawnWave); - -_side = side group player; - -if (RESPAWN_MODE(_side) == RESPAWN_MODE_DISABLED) exitWith -{ - systemChat "Reinforcements are not available for this mission!"; -}; - -if (RESPAWN_WAVES(_side) <= 0) exitWith -{ - systemChat format ["%1 is out of reinforcement waves!", toUpper (str _side)]; -}; - -if !(RESPAWN_WAVE_READY(_side)) exitWith -{ - systemChat "Reinforcements are not possible at this time!"; -}; - - -_spawnAt = switch (RESPAWN_MODE(_side)) do -{ - case RESPAWN_MODE_BASE: {RESPAWN_ENTITY(_side)}; - case RESPAWN_MODE_COMMANDER: - { - if ((groupId group player) isEqualTo "Spectators") then - { - RESPAWN_ENTITY(_side) - } - else - { - player - } - - }; - -}; - -if (isNull _spawnAt) then -{ - _spawnAt = RESPAWN_MARKER_POS(_side); -}; - -// Originally introduced to test group propagation latency. The delay feels nice. Keeping it. -systemChat "Your reinforcements will arrive in five seconds, stand by..."; -uiSleep 5; - -[_spawnAt, _side] remoteExec ["f_fnc_respawnWaveServer", 2]; diff --git a/components/respawnWaves/fn_respawnWaveServer.sqf b/components/respawnWaves/fn_respawnWaveServer.sqf deleted file mode 100644 index cc2459eb..00000000 --- a/components/respawnWaves/fn_respawnWaveServer.sqf +++ /dev/null @@ -1,80 +0,0 @@ -#include "macros.hpp" - -RUN_AS_ASYNC(f_fnc_respawnWaveServer); -SERVER_ONLY; - -params [["_posOrObject", []], "_side"]; - - -if (_posOrObject isEqualTo []) then -{ - _posOrObject = RESPAWN_MARKER_POS(_side); -}; - - - -_squadMode = RESPAWN_SQUAD_MODE(_side); - -_respawnGroupId = switch (_squadMode) do -{ - case (RESPAWN_REJOIN_OLD_SQUAD): - { - ORIGINAL_SQUAD - }; - - case (RESPAWN_JOIN_REINFORCEMENT_SQUAD): - { - _squads = RESPAWN_WAVE_SQUADS(_side); - _squadName = ""; - - if (count _squads <= 0) then - { - _squadName = "Reinforcements"; - } - else - { - _squadName = _squads deleteAt 0; - }; - - _groups = allGroups; - _respawnGroup = _groups param [_groups findIf {(toLower groupId _x) isEqualTo (toLower _squadName)}, grpNull]; - - if (isNull _respawnGroup) then - { - _respawnGroup = createGroup [_side, false]; - _respawnGroup setGroupIdGlobal [_squadName]; - SET_SQUAD_IMPORTANT_DIRECT(_respawnGroup,true); - - }; - - _squadName - - }; - -}; - - - - - -SET_RESPAWN_WAVE_READY(_side,false); - -_waveArray = [true, _posOrObject, _respawnGroupId, serverTime]; -SET_RESPAWN_WAVE(_side,_waveArray); - -_curWaves = RESPAWN_WAVES(_side); -SET_RESPAWN_WAVES(_side,(_curWaves - 1)); - -_message = RESPAWN_MESSAGE(_side); -_message remoteExec ["systemChat", _side]; - - - - -sleep RESPAWN_WAVE_DURATION(_side); - -CLEAR_RESPAWN_WAVE(_side); - -sleep RESPAWN_WAVE_COOLDOWN(_side); - -SET_RESPAWN_WAVE_READY(_side,true); diff --git a/components/respawnWaves/functions.hpp b/components/respawnWaves/functions.hpp deleted file mode 100644 index 1d8d8309..00000000 --- a/components/respawnWaves/functions.hpp +++ /dev/null @@ -1,22 +0,0 @@ -class respawnWaves -{ - file = "components\respawnWaves"; - class respawnWave{}; - class forceRespawnWave{}; - class respawnWaveServer{}; - class respawnDialogSupport{}; - class createPlayerSpawner{}; -}; -class respawnWaves_ui -{ - file = "components\respawnWaves\ui_functions"; - class respawnTitle_onLoad{}; -}; -class respawnWaves_zen -{ - file = "components\respawnWaves\zen"; - class zen_createSpawner{}; - class zen_moveRespawnMarker{}; - class zen_setRespawnObject{}; - class zen_createPlayerSpawner{}; -}; diff --git a/components/respawnWaves/init_component.sqf b/components/respawnWaves/init_component.sqf deleted file mode 100644 index b7d0653d..00000000 --- a/components/respawnWaves/init_component.sqf +++ /dev/null @@ -1,73 +0,0 @@ -#include "macros.hpp" -#include "..\..\squadmarker_macros.hpp" - - -if (isServer) then -{ - { - _markerName = (format ["respawn_%1", toLower str _x]); - - if ((getMarkerColor _markerName) isEqualTo "") then - { - DEBUG_FORMAT1_LOG("[RespawnWaves] The respawn marker '%1' does not exist, creating it automatically at origin.",_markerName) - createMarker [_markerName, [0,0,0]]; - }; - - } forEach [west, east, independent, civilian]; - - - // Hey guess what? If you mark a group as "do not delete" and then all the units leave the group, it gets deleted anyway. cool. - [] spawn - { - waitUntil - { - { - _groupVar = format ["f_group_spectators_%1", toLower str _x]; - - if (isNull (missionNamespace getVariable [_groupVar, grpNull])) then - { - DEBUG_FORMAT1_LOG("[RespawnWaves] Creating spectator group '%1'.",_groupVar) - _group = createGroup [_x, false]; - _group setGroupIdGlobal [format ["Spectators", _x]]; - _group deleteGroupWhenEmpty false; - HIDE_SQUAD_DIRECT(_group); - - missionNamespace setVariable [_groupVar, _group, true]; - }; - - } forEach [west, east, independent, civilian]; - - false - - }; - - }; - -}; - -if (hasInterface) then -{ - DEBUG_PRINT_LOG("initting respawnWaves") - - [] spawn - { - waitUntil - { - _canRespawn = ((leader group player) isEqualTo player); - - if !(_canRespawn) then - { - _canRespawn = (serverCommandAvailable '#kick') - }; - - player setVariable ["f_var_canUseRespawnMenu", _canRespawn]; - - sleep 5; - - false - - }; - - }; - -}; diff --git a/components/respawnWaves/macros.hpp b/components/respawnWaves/macros.hpp deleted file mode 100644 index 05b7e357..00000000 --- a/components/respawnWaves/macros.hpp +++ /dev/null @@ -1,4 +0,0 @@ -#include "../../macros.hpp" -#include "../../respawn_macros.hpp" -#include "../../squadmarker_macros.hpp" -#include "ui_macros.hpp" diff --git a/components/respawnWaves/respawnDialog.hpp b/components/respawnWaves/respawnDialog.hpp deleted file mode 100644 index 87833d91..00000000 --- a/components/respawnWaves/respawnDialog.hpp +++ /dev/null @@ -1,187 +0,0 @@ - -class RscFrame1 -{ - type = 0; - idc = -1; - style = 0x80; - colorBackground[] = {0,0,0,0.7}; - shadow = 2; - colorSelection[] = {0,1,0,1}; - colorText[] = {1,1,1,1}; - colorDisabled[] = {1,0,0,1}; - font = "PuristaLight"; - sizeEx = 0.03; - text = ""; - -}; - - - - -class RscButton1 -{ - access = 0; - type = 1; - text = ""; - colorText[] = {1,1,1,.9}; - colorDisabled[] = {0.4,0.4,0.4,0}; - colorBackground[] = {0.75,0.75,0.75,0.8}; - colorBackgroundDisabled[] = {0,0.0,0}; - colorBackgroundActive[] = {0.75,0.75,0.75,1}; - colorFocused[] = {0.75,0.75,0.75,.5}; - colorShadow[] = {0.023529,0,0.0313725,1}; - colorBorder[] = {0.023529,0,0.0313725,1}; - soundEnter[] = {"\ca\ui\data\sound\onover",0.09,1}; - soundPush[] = {"\ca\ui\data\sound\new1",0,0}; - soundClick[] = {"\ca\ui\data\sound\onclick",0.07,1}; - soundEscape[] = {"\ca\ui\data\sound\onescape",0.09,1}; - style = 2; - x = 0; - y = 0; - w = 0.055589; - h = 0.039216; - shadow = 2; - font = "PuristaLight"; - sizeEx = 0.03921; - offsetX = 0.003; - offsetY = 0.003; - offsetPressedX = 0.002; - offsetPressedY = 0.002; - borderSize = 0; - -}; - - - - -class RscListBox1 -{ - access = 0; - type = 5; - style = 0; - w = 0.4; - h = 0.4; - font = "PuristaLight"; - sizeEx = 0.04; - rowHeight = 0; - colorText[] = {1,1,1,1}; - colorScrollbar[] = {1,1,1,1}; - colorSelect[] = {0,0,0,1}; - colorSelect2[] = {1,0.5,0,1}; - colorSelectBackground[] = {0.6,0.6,0.6,1}; - colorSelectBackground2[] = {0.2,0.2,0.2,1}; - colorBackground[] = {0,0,0,0}; - colorDisabled[] = {1,1,1,0.5}; - - maxHistoryDelay = 1.0; - soundSelect[] = {"",0.1,1}; - period = 1; - autoScrollSpeed = -1; - autoScrollDelay = 5; - autoScrollRewind = 0; - arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)"; - arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; - shadow = 0; - class ListScrollBar - { - color[] = {1,1,1,0.6}; - colorActive[] = {1,1,1,1}; - colorDisabled[] = {1,1,1,0.3}; - thumb = "#(argb,8,8,3)color(1,1,1,1)"; - arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)"; - arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; - border = "#(argb,8,8,3)color(1,1,1,1)"; - shadow = 0; - }; - -}; - - - - -class RespawnWavesDialog -{ - idd= 1996; - movingenable=false; - onLoad= "[] spawn f_fnc_respawnDialogSupport"; - class controls - { - class frame: RscFrame1 - { - idc = 1800; - text = "Reinforcements manager "; - x = 0.3 * safezoneW + safezoneX; - y = 0.2 * safezoneH + safezoneY; - w = 0.45 * safezoneW; - h = 0.6 * safezoneH; - }; - class listbox1: RscListbox1 - { - idc = 1500; - x = 0.5 * safezoneW + safezoneX; - y = 0.3 * safezoneH + safezoneY; - w = 0.1 * safezoneW; - h = 0.5 * safezoneH; - }; - class button: RscButton1 - { - idc = 1600; - text = "Spawn reinforcement wave"; - x = 0.3 * safezoneW + safezoneX; - y = 0.35 * safezoneH + safezoneY; - w = 0.2 * safezoneW; - h = 0.05 * safezoneH; - action = "if ( player getVariable ['f_var_canUseRespawnMenu', false] ) then { [] spawn f_fnc_respawnwave; closeDialog 0; }"; - //closeDialog 0; - }; - class infotext2: RscFrame - { - idc = 1004; - text = "waves"; - x = 0.6 * safezoneW + safezoneX; - y = 0.3 * safezoneH + safezoneY; - w = 0.15 * safezoneW; - h = 0.05 * safezoneH; - }; - class infotext3: RscFrame - { - idc = 1005; - text = "numbplayer"; - x = 0.6 * safezoneW + safezoneX; - y = 0.4 * safezoneH + safezoneY; - w = 0.15 * safezoneW; - h = 0.05 * safezoneH; - }; - class infotext4: RscFrame - { - idc = 1006; - text = "timer"; - x = 0.6 * safezoneW + safezoneX; - y = 0.5 * safezoneH + safezoneY; - w = 0.15 * safezoneW; - h = 0.05 * safezoneH; - }; - class infotext1: RscFrame - { - idc = 1001; - text = "List of players in spectator"; - x = 0.3 * safezoneW + safezoneX; - y = 0.3 * safezoneH + safezoneY; - w = 0.15 * safezoneW; - h = 0.05 * safezoneH; - }; - class button1: RscButton1 - { - idc = 1601; - text = "Close"; - x = 0.3 * safezoneW + safezoneX; - y = 0.7 * safezoneH + safezoneY; - w = 0.1 * safezoneW; - h = 0.1 * safezoneH; - action = "closeDialog 0;"; - - }; - - }; - -}; diff --git a/components/respawnWaves/ui/respawnTitle.hpp b/components/respawnWaves/ui/respawnTitle.hpp deleted file mode 100644 index 013213c4..00000000 --- a/components/respawnWaves/ui/respawnTitle.hpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "../ui_macros.hpp" - -class CAFE_RespawnTitle -{ - idd = 13176; - - movingEnable = false; - enableSimulation = true; - - fadein = 1; - duration = 7; - fadeout = 3; - - onLoad = "_this call f_fnc_respawnTitle_onLoad;"; - - class ControlsBackground - { - class WelcomeBack: CAFE_DefaultText - { - idc = 1000; - style = ST_CENTER; - text = "Welcome back."; - font = "PuristaBold"; - x = 9 * GUI_GRID_W + GUI_GRID_X; - y = 0.5 * GUI_GRID_H + GUI_GRID_Y; - w = 22 * GUI_GRID_W; - h = 2.5 * GUI_GRID_H; - sizeEx = 3 * GUI_GRID_H; - }; - - class InfoText: CAFE_DefaultStructuredText - { - idc = IDC_RESPAWNTITLE_INFOTEXT; - text = ""; - x = 8.5 * GUI_GRID_W + GUI_GRID_X; - y = 3.5 * GUI_GRID_H + GUI_GRID_Y; - w = 23 * GUI_GRID_W; - h = 4.5 * GUI_GRID_H; - }; - - }; - -}; diff --git a/components/respawnWaves/ui/titles.hpp b/components/respawnWaves/ui/titles.hpp deleted file mode 100644 index fdc1f634..00000000 --- a/components/respawnWaves/ui/titles.hpp +++ /dev/null @@ -1,2 +0,0 @@ - -#include "respawnTitle.hpp" diff --git a/components/respawnWaves/ui_functions/fn_respawnTitle_onLoad.sqf b/components/respawnWaves/ui_functions/fn_respawnTitle_onLoad.sqf deleted file mode 100644 index 6343436a..00000000 --- a/components/respawnWaves/ui_functions/fn_respawnTitle_onLoad.sqf +++ /dev/null @@ -1,29 +0,0 @@ -#include "../macros.hpp" - -params ["_display"]; - -_subtitle = _display displayCtrl IDC_RESPAWNTITLE_INFOTEXT; -_text = ""; - -_squadMode = f_var_respawnTitle_squadMode; -_targetSquad = f_var_respawnTitle_targetSquad; - -_text = switch (_squadMode) do -{ - case ("RespawnSquad"): - { - _template = "You will be joined to the new respawn-squad ""%1"".

You can re-join or re-create your old squad
by using the ""CA Squad Actions"" ACE self-interact option.
"; - format [_template, _targetSquad] - }; - case ("OriginalSquad"): - { - _template = "You will be auto-joined to your previous squad ""%1"".

You can create or join a different squad
by using the ""CA Squad Actions"" ACE self-interact option.
"; - format [_template, _targetSquad] - }; - case ("Error"): - { - "A squad could not be automatically found for you.

You can create a new squad or join an existing one
by using the ""CA Squad Actions"" ACE self-interact option.
" - }; -}; - -_subtitle ctrlSetStructuredText parseText _text; diff --git a/components/respawnWaves/ui_macros.hpp b/components/respawnWaves/ui_macros.hpp deleted file mode 100644 index 0f7998d6..00000000 --- a/components/respawnWaves/ui_macros.hpp +++ /dev/null @@ -1,2 +0,0 @@ - -#define IDC_RESPAWNTITLE_INFOTEXT 1100 diff --git a/components/respawnWaves/zen/fn_zen_createPlayerSpawner.sqf b/components/respawnWaves/zen/fn_zen_createPlayerSpawner.sqf deleted file mode 100644 index 767874c0..00000000 --- a/components/respawnWaves/zen/fn_zen_createPlayerSpawner.sqf +++ /dev/null @@ -1,8 +0,0 @@ -#include "../macros.hpp" - -SERVER_ONLY; - -params ["_position", ["_side", west]]; - -_spawner = [_position, _side] call f_fnc_createPlayerSpawner; -[_spawner] call f_fnc_addObjectsToAllZeuses; diff --git a/components/respawnWaves/zen/fn_zen_createSpawner.sqf b/components/respawnWaves/zen/fn_zen_createSpawner.sqf deleted file mode 100644 index a9c674c9..00000000 --- a/components/respawnWaves/zen/fn_zen_createSpawner.sqf +++ /dev/null @@ -1,8 +0,0 @@ -#include "../macros.hpp" - -CLIENT_ONLY; - -params ["_position", ["_side", west]]; - -["This spawner will become active in 15 seconds. Fine tune its position if needed."] call zen_common_fnc_showMessage; -[_position, _side] remoteExec ["f_fnc_zen_createPlayerSpawner", 2]; diff --git a/components/respawnWaves/zen/fn_zen_moveRespawnMarker.sqf b/components/respawnWaves/zen/fn_zen_moveRespawnMarker.sqf deleted file mode 100644 index 7d761f84..00000000 --- a/components/respawnWaves/zen/fn_zen_moveRespawnMarker.sqf +++ /dev/null @@ -1,21 +0,0 @@ -#include "../macros.hpp" - -CLIENT_ONLY; - -params ["_position", ["_side", west]]; - -_sideStr = str _side; -_markerName = toLower ("respawn_" + _sideStr); - -if (getMarkerColor _markerName isEqualTo "") then -{ - _marker = createMarker [_markerName, _position]; - _marker setMarkerAlpha 0; - - ["Created marker '%1' at given position.", _markerName] call zen_common_fnc_showMessage; -} -else -{ - _markerName setMarkerPos _position; - ["Moved marker '%1' to given position.", _markerName] call zen_common_fnc_showMessage; -}; diff --git a/components/respawnWaves/zen/fn_zen_setRespawnObject.sqf b/components/respawnWaves/zen/fn_zen_setRespawnObject.sqf deleted file mode 100644 index 509c1a57..00000000 --- a/components/respawnWaves/zen/fn_zen_setRespawnObject.sqf +++ /dev/null @@ -1,19 +0,0 @@ -#include "../macros.hpp" - -CLIENT_ONLY; - -params ["_position", "_object", ["_side", west]]; - -if (isNull _object) then -{ - ["No object found: respawner object unchanged."] call zen_common_fnc_showMessage; -} -else -{ - _sideStr = str _side; - _objectName = toLower ("respawner_" + _sideStr); - - missionNamespace setVariable [_objectName, _object, true]; - ["Set %1 respawner object to '%2'.", _sideStr, typeOf _object] call zen_common_fnc_showMessage; - -}; diff --git a/components/respawnWaves/zen_modules.sqf b/components/respawnWaves/zen_modules.sqf deleted file mode 100644 index 394f1907..00000000 --- a/components/respawnWaves/zen_modules.sqf +++ /dev/null @@ -1,43 +0,0 @@ -call -{ - private _category = "[CAFE3] Respawners"; - - // Set respawner object (for each side). - - private _objectWest = { [_this#0, _this#1, west] call f_fnc_zen_setRespawnObject }; - private _objectEast = { [_this#0, _this#1, east] call f_fnc_zen_setRespawnObject }; - private _objectIndfor = { [_this#0, _this#1, independent] call f_fnc_zen_setRespawnObject }; - private _objectCiv = { [_this#0, _this#1, civilian] call f_fnc_zen_setRespawnObject }; - - [_category, "Set Respawner Object (BLUFOR)", _objectWest] call zen_custom_modules_fnc_register; - [_category, "Set Respawner Object (OPFOR)", _objectEast] call zen_custom_modules_fnc_register; - [_category, "Set Respawner Object (INDFOR)", _objectIndfor] call zen_custom_modules_fnc_register; - [_category, "Set Respawner Object (Civilian)", _objectCiv] call zen_custom_modules_fnc_register; - - - // Set respawn marker (for each side). - - private _markerWest = { [_this#0, west] call f_fnc_zen_moveRespawnMarker }; - private _markerEast = { [_this#0, east] call f_fnc_zen_moveRespawnMarker }; - private _markerIndfor = { [_this#0, independent] call f_fnc_zen_moveRespawnMarker }; - private _markerCiv = { [_this#0, civilian] call f_fnc_zen_moveRespawnMarker }; - - [_category, "Move Respawn Marker (BLUFOR)", _markerWest] call zen_custom_modules_fnc_register; - [_category, "Move Respawn Marker (OPFOR)", _markerEast] call zen_custom_modules_fnc_register; - [_category, "Move Respawn Marker (INDFOR)", _markerIndfor] call zen_custom_modules_fnc_register; - [_category, "Move Respawn Marker (Civilian)", _markerCiv] call zen_custom_modules_fnc_register; - - - // Create player spawner (for each side). - - private _spawnerWest = { [_this#0, west] call f_fnc_zen_createSpawner }; - private _spawnerEast = { [_this#0, east] call f_fnc_zen_createSpawner }; - private _spawnerIndfor = { [_this#0, independent] call f_fnc_zen_createSpawner }; - private _spawnerCiv = { [_this#0, civilian] call f_fnc_zen_createSpawner }; - - [_category, "Respawn Random Player (BLUFOR)", _spawnerWest] call zen_custom_modules_fnc_register; - [_category, "Respawn Random Player (OPFOR)", _spawnerEast] call zen_custom_modules_fnc_register; - [_category, "Respawn Random Player (INDFOR)", _spawnerIndfor] call zen_custom_modules_fnc_register; - [_category, "Respawn Random Player (Civilian)", _spawnerCiv] call zen_custom_modules_fnc_register; - -}; diff --git a/components/zen_modules.sqf b/components/zen_modules.sqf index 3b25141e..80ad9ec1 100644 --- a/components/zen_modules.sqf +++ b/components/zen_modules.sqf @@ -1,6 +1,5 @@ #include "ceasefire\zen_modules.sqf" #include "logiVehicle\zen_modules.sqf" #include "miscClient\zen_modules.sqf" -#include "respawnWaves\zen_modules.sqf" #include "aiCache\zen_modules.sqf" #include "gearScript\zen_modules.sqf" diff --git a/description.ext b/description.ext index 9c699a1f..c4b83b51 100644 --- a/description.ext +++ b/description.ext @@ -47,19 +47,12 @@ enableDebugConsole = 1; // CAFE - Respawn Settings -// Credits: Please see the CAFE online manual (https://github.com/CombinedArmsGaming/CAFE3/wiki) -// 1 | Respawn as Bird (for normal mission, no reinforcements). -// 2 | Respawn on death location without gear, used in special missions. -// 3 | Respawn at base marker (used when reinforcements are an option). -// 4 | Respawn either in group if an AI slot is filled or as seagull. -// If 3 is chosen, place down makers with the following names as necessary: -// respawn_west, respawn_guerilla, respawn_east, respawn_civillian. -respawn = 3; //Suggested NOT to change this -respawndelay = 3; -respawnOnStart = 0; -respawnTemplates[] = {"respawnWaves"}; // remove "f_spectator" when using respawn. -respawnDialog = 0; +respawn = "BASE"; +respawnDelay = 20; +respawnOnStart = 1; +respawnTemplates[] = {"MenuPosition", "MenuInventory", "Spectator"}; +respawnDialog = 1; // ============================================================================================ @@ -165,28 +158,10 @@ class CfgDebriefing // ============================================================================================ -class CfgRespawnTemplates -{ - /* - class f_Spectator - { - onPlayerRespawn = "f_fnc_CamInit"; - }; +//class CfgRespawnTemplates +//{ - // CAFE JIP Menu - class f_JIP - { - onPlayerRespawn = "f\JIP\f_JIP_playerRespawn.sqf"; - }; - //*/ - //* - class respawnWaves - { - onPlayerRespawn = "respawnTemplates\respawnWaves\onPlayerRespawn.sqf"; - onPlayerKilled = "respawnTemplates\respawnWaves\onPlayerKilled.sqf"; - }; - //*/ -}; +//}; // ============================================================================================ diff --git a/dialogs.hpp b/dialogs.hpp index 409c0e8b..8bb3eb3f 100644 --- a/dialogs.hpp +++ b/dialogs.hpp @@ -2,8 +2,6 @@ #include "baseControls.hpp" #include "ui_defaults.hpp" -#include "components\respawnWaves\respawnDialog.hpp" - #include "components\zeus_ui\config\zeusUI.hpp" #include "components\squadMarkers\ui\squadMarkerDialog.hpp" diff --git a/initPlayerLocal.sqf b/initPlayerLocal.sqf new file mode 100644 index 00000000..77b33075 --- /dev/null +++ b/initPlayerLocal.sqf @@ -0,0 +1,15 @@ +// -- Enable full spectator in respawn screen +// -- Courtesy of https://community.bistudio.com/wiki/Arma_3:_Respawn#Conflicts + +{ + missionNamespace setVariable [_x, true]; +} forEach [ + "BIS_respSpecAi", // Allow spectating of AI + "BIS_respSpecAllowFreeCamera", // Allow moving the camera independent from units (players) + "BIS_respSpecAllow3PPCamera", // Allow 3rd person camera + "BIS_respSpecShowFocus", // Show info about the selected unit (dissapears behind the respawn UI) + "BIS_respSpecShowCameraButtons", // Show buttons for switching between free camera, 1st and 3rd person view (partially overlayed by respawn UI) + "BIS_respSpecShowControlsHelper", // Show the controls tutorial box + "BIS_respSpecShowHeader", // Top bar of the spectator UI including mission time + "BIS_respSpecLists" // Show list of available units and locations on the left hand side +]; \ No newline at end of file diff --git a/mission.sqm b/mission.sqm index d584e52b..9beb2b65 100644 --- a/mission.sqm +++ b/mission.sqm @@ -17,9 +17,9 @@ class EditorData class Camera { pos[]={192.56636,56.192032,108.11068}; - dir[]={0.36540064,-0.3572351,0.85957295}; - up[]={0.13975579,0.9340145,0.32876322}; - aside[]={0.92029935,0,-0.39121518}; + dir[]={0.36540064,-0.35723498,0.85957289}; + up[]={0.13975573,0.93401456,0.3287631}; + aside[]={0.92029929,1.4901161e-008,-0.39121515}; }; }; binarizationWanted=0; diff --git a/respawnTemplates/parts/applyOldLoadout.sqf b/respawnTemplates/parts/applyOldLoadout.sqf deleted file mode 100644 index a2777166..00000000 --- a/respawnTemplates/parts/applyOldLoadout.sqf +++ /dev/null @@ -1,17 +0,0 @@ -_applyOldLoadout = -{ - WAIT_UNTIL_MISSION_STARTED(); - - params ["_unit", "_corpse"]; - - [] call f_fnc_removeRadios; - - _loadout = (_unit getVariable "f_var_assignGear"); - if (isNil '_loadout') then {_loadout = (_corpse getVariable "f_var_assignGear")}; - if (isNil '_loadout') then {_loadout = "default"}; - - _unit setVariable ["f_var_assignGear_done", false, true]; - - [_loadout, _unit] spawn f_fnc_assignGear; - -}; diff --git a/respawnTemplates/parts/macros.hpp b/respawnTemplates/parts/macros.hpp deleted file mode 100644 index ceecf4b0..00000000 --- a/respawnTemplates/parts/macros.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "../../macros.hpp" diff --git a/respawnTemplates/parts/tryTeleport.sqf b/respawnTemplates/parts/tryTeleport.sqf deleted file mode 100644 index 406073a4..00000000 --- a/respawnTemplates/parts/tryTeleport.sqf +++ /dev/null @@ -1,33 +0,0 @@ -_tryTeleport = -{ - params ["_goto"]; - - _onTeleportFailure = - { - params ["_unit", "_posAtlOrObject"]; - - private _respawner = RESPAWN_ENTITY(side group player); - - if EXISTS(_respawner) then - { - DEBUG_FORMAT2_LOG("[RespawnWaves] Failed to teleport to %2, defaulting to respawner entity '%1'.",_respawner,_posAtlOrObject) - [player, _respawner] spawn f_fnc_teleportPlayer; - } - else - { - DEBUG_FORMAT2_LOG("[RespawnWaves] Failed to teleport to %2, defaulting to location of %1.",RESPAWN_MARKER_POS((side group player)),_posAtlOrObject) - _basePos = RESPAWN_MARKER_POS((side group player)); - [player, _basePos] spawn f_fnc_teleportPlayer; - }; - - _text = "Unable to teleport to the proper location.

You will need to find transportation to the AO or ping Zeus."; - [_text] call f_fnc_createSubtitleText; - - }; - - DEBUG_FORMAT1_LOG("[RespawnWaves] Attempting to teleport to %1.",_goto) - _teleHandle = [player, _goto, _onTeleportFailure] spawn f_fnc_teleportPlayer; - - waitUntil { sleep 0.1; scriptDone _teleHandle }; - -}; diff --git a/respawnTemplates/respawnWaves/macros.hpp b/respawnTemplates/respawnWaves/macros.hpp deleted file mode 100644 index 50d56af7..00000000 --- a/respawnTemplates/respawnWaves/macros.hpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "../../macros.hpp" -#include "../../respawn_macros.hpp" -#include "../../squadmarker_macros.hpp" diff --git a/respawnTemplates/respawnWaves/onPlayerKilled.sqf b/respawnTemplates/respawnWaves/onPlayerKilled.sqf deleted file mode 100644 index 647dc7ad..00000000 --- a/respawnTemplates/respawnWaves/onPlayerKilled.sqf +++ /dev/null @@ -1,20 +0,0 @@ -// CA respawn system with wave respawns - -#include "macros.hpp" - -params ["_corpse", "_killer"]; - -DEBUG_PRINT_LOG("[RespawnWaves] Player was killed.") - -LOCAL_ONLY(_corpse); - -f_var_playerHasBeenKilled = true; - -_oldGroupId = groupId (group _corpse); - -if !(_oldGroupId isEqualTo "Spectators") then -{ - f_var_playerOriginalGroupName = groupId (group _corpse); -}; - -[_corpse] joinSilent grpNull; diff --git a/respawnTemplates/respawnWaves/onPlayerRespawn.sqf b/respawnTemplates/respawnWaves/onPlayerRespawn.sqf deleted file mode 100644 index ac109081..00000000 --- a/respawnTemplates/respawnWaves/onPlayerRespawn.sqf +++ /dev/null @@ -1,239 +0,0 @@ -// CA respawn system with wave respawns - -#include "macros.hpp" - -params ["_unit", "_corpse"]; - -DEBUG_PRINT_LOG("[RespawnWaves] Player respawning...") - -CLIENT_ONLY; -LOCAL_ONLY(_unit); - -// MAKE SURE THE PLAYER INITIALIZES PROPERLY -WAIT_UNTIL_PLAYER_EXISTS(); -waitUntil {local player}; - -#include "..\parts\tryTeleport.sqf" - - -// Set language of the units depending on side (BABEL API) -[_unit] spawn f_fnc_clientSetLanguages; - - - -_tryJoinSquad = -{ - params ["_unit", "_groupId", "_cancelIfAlive"]; - - _side = side group _unit; - _foundGroup = grpNull; - - waitUntil - { - sleep 1; - - if (_cancelIfAlive and {!IS_TRUE(f_var_playerHasBeenKilled)}) exitWith {true}; - - _group = GET_SQUAD_ON_SIDE_DYNAMIC(_groupId,_side); - - if !(_group isEqualTo grpNull) exitWith - { - _foundGroup = _group; - true - }; - - false - }; - - sleep 2; - - if (_cancelIfAlive and {!IS_TRUE(f_var_playerHasBeenKilled)}) exitWith {}; - - [_unit] joinSilent _foundGroup; - - sleep 2; - - if !((groupId (group _unit)) isEqualTo _groupId) then - { - sleep 10; - - if (_cancelIfAlive and {!IS_TRUE(f_var_playerHasBeenKilled)}) exitWith {}; - - _text = format ["Unable to auto-join squad '%1'.

You will need to re-join or re-create the squad using 'CA Squad Actions'.", _groupId]; - [_text] call f_fnc_createSubtitleText; - - }; - -}; - - - - -_doRespawn = -{ - params ["_unit", "_corpse", "_isJip"]; - - #include "..\parts\applyOldLoadout.sqf" - [_unit, _corpse] spawn _applyOldLoadout; - - if ((_isJip and IS_TRUE(f_var_JIPTeleport)) or ((!_isJip) and IS_TRUE(f_var_RespawnTeleport))) then - { - player setVariable ["f_var_mayTeleportToGroup", true, true]; - }; - - [_unit, true] call f_fnc_activatePlayer; - f_var_playerHasBeenKilled = false; - -}; - - - - -_waitToShowRespawnTitle = -{ - params ["_groupId", "_mode"]; - - waitUntil - { - sleep 0.25; - !IS_TRUE(f_var_playerHasBeenKilled); - }; - - f_var_respawnTitle_squadMode = _mode; - f_var_respawnTitle_targetSquad = _groupId; - "CAFE_RespawnTitle" cutRsc ["CAFE_RespawnTitle", "PLAIN", -1, false]; -}; - - - - -if (time < 30) exitWith -{ - DEBUG_PRINT_LOG("[RespawnWaves] Time < 30, skipping respawn wave...") - [_unit, _corpse, false] call _doRespawn; -}; // Apply a grace period at mission start. - - - - -_hasBeenKilled = missionNamespace getVariable ["f_var_playerHasBeenKilled", false]; - -DEBUG_FORMAT1_LOG("[RespawnWaves] Player has been killed?: %1",_hasBeenKilled) - - - - -// Join in progress and instant respawn handling -if (!_hasBeenKilled) exitWith -{ - DEBUG_PRINT_LOG("[RespawnWaves] Player was not killed, handling as JIP...") - [_unit, _corpse, true] call _doRespawn; - -}; - - - - -if (_hasBeenKilled) then -{ - DEBUG_PRINT_LOG("[RespawnWaves] Player was killed, adding to respawn wave...") - DEBUG_PRINT_LOG("[RespawnWaves] Joining player to spectator group.") - [_unit, "Spectators", true] spawn _tryJoinSquad; - sleep 2; - - [_unit, false] call f_fnc_activatePlayer; - - // Wait for respawn to happen - _waveInfo = false; - _side = side group _unit; - - waitUntil - { - sleep 0.5; - - _hasSpawner = !(isNull (_unit getVariable ["mySpawner", objNull])); - if (_hasSpawner) exitWith { true }; - - _waveInfo = GET_RESPAWN_WAVE(_side); - _hasWave = ((count _waveInfo) > 0) and {(_waveInfo select WAVEINFO_ISACTIVE) isEqualTo true}; - if (_hasWave) exitWith { true }; - - false - - }; - - if !((_unit getVariable ["mySpawner", objNull]) isEqualTo objNull) then - { - _waveInfo = [true, _unit getVariable ["mySpawner", objNull], ORIGINAL_SQUAD, serverTime]; - }; - - DEBUG_PRINT_LOG("[RespawnWaves] Respawn wave enabled, teleporting...") - - // Try spawning at designated location, or fallback to base location. - _spawnAt = _waveInfo param [WAVEINFO_SPAWNAT, []]; - _joinGroup = _waveInfo param [WAVEINFO_JOINGROUP, ""]; - - // Try *real hard* to get the player out of the damned spectator group. - [_unit] joinSilent grpNull; - sleep 2; - - switch (_joinGroup) do - { - case (ORIGINAL_SQUAD): - { - _originalGroupId = missionNamespace getVariable ["f_var_playerOriginalGroupName", ""]; - - if (_originalGroupId isEqualTo "") then - { - DEBUG_PRINT_LOG("[RespawnWaves] Respawn group was ORIGINAL_SQUAD, but player does not have an original squad. Joining player to empty group.") - //[_unit] joinSilent grpNull; - ["", "Error"] spawn _waitToShowRespawnTitle; - - } - else - { - DEBUG_FORMAT1_LOG("[RespawnWaves] Attempting to join player to original group: %1",_originalGroupId) - [_unit, _originalGroupId, false] spawn _tryJoinSquad; - - [_originalGroupId, "OriginalSquad"] spawn _waitToShowRespawnTitle; - - }; - - }; - - case (""): - { - DEBUG_PRINT_LOG("[RespawnWaves] Respawn group was absent, joining player to empty group.") - //[_unit] joinSilent grpNull; - - ["", "Error"] spawn _waitToShowRespawnTitle; - - }; - - default - { - DEBUG_FORMAT1_LOG("[RespawnWaves] Attempting to join player to respawn group: %1",_joinGroup) - [_unit, _joinGroup, false] spawn _tryJoinSquad; - - [_joinGroup, "RespawnSquad"] spawn _waitToShowRespawnTitle; - - }; - - }; - - - if ((_spawnAt isEqualTo []) or {((typeName _spawnAt) isEqualTo (typeName objNull)) and {isNull _spawnAt}}) then - { - DEBUG_PRINT_LOG("[RespawnWaves] Respawn wave did not include a position or entity, using respawn marker pos.") - _spawnAt = RESPAWN_MARKER_POS(_side); - }; - - _tpHandle = [_spawnAt] spawn _tryTeleport; - - waitUntil { scriptDone _tpHandle }; - - [_unit, _corpse, true] call _doRespawn; - - DEBUG_PRINT_LOG("[RespawnWaves] All done.") - -} diff --git a/startup/components/groups/clientStartupGroup.sqf b/startup/components/groups/clientStartupGroup.sqf index 2fb81189..78489c53 100644 --- a/startup/components/groups/clientStartupGroup.sqf +++ b/startup/components/groups/clientStartupGroup.sqf @@ -20,8 +20,6 @@ INIT_COMPONENT(miscClient) INIT_COMPONENT(miscShared) -INIT_COMPONENT(respawnWaves) - INIT_COMPONENT(zeus_ui) INIT_COMPONENT(downtime) diff --git a/startup/components/groups/serverStartupGroup.sqf b/startup/components/groups/serverStartupGroup.sqf index 47fcba93..c38a683a 100644 --- a/startup/components/groups/serverStartupGroup.sqf +++ b/startup/components/groups/serverStartupGroup.sqf @@ -14,8 +14,6 @@ INIT_COMPONENT(aiCache) // Credits: Please see the CAFE online manual (https://github.com/CombinedArmsGaming/CAFE3/wiki) INIT_COMPONENT(radios) -INIT_COMPONENT(respawnWaves) - INIT_COMPONENT(miscShared) diff --git a/startup/configuration/groups/clientConfigGroup.sqf b/startup/configuration/groups/clientConfigGroup.sqf index 14260427..95fb65ea 100644 --- a/startup/configuration/groups/clientConfigGroup.sqf +++ b/startup/configuration/groups/clientConfigGroup.sqf @@ -16,8 +16,5 @@ // Player respawn #include "..\..\..\configuration\respawn.sqf" -// Respawn waves settings -#include "..\..\..\configuration\respawnWaves.sqf" - // Squad markers #include "..\internals\squadMarkers.sqf" diff --git a/startup/configuration/groups/serverConfigGroup.sqf b/startup/configuration/groups/serverConfigGroup.sqf index 5afd44e2..ed2315ca 100644 --- a/startup/configuration/groups/serverConfigGroup.sqf +++ b/startup/configuration/groups/serverConfigGroup.sqf @@ -4,9 +4,6 @@ // AI Caching settings #include "..\..\..\configuration\aiCache.sqf" -// Respawn waves settings -#include "..\..\..\configuration\respawnWaves.sqf" - // Lootbox #include "..\internals\lootBox.sqf" diff --git a/titles.hpp b/titles.hpp index c862982c..7763d9f9 100644 --- a/titles.hpp +++ b/titles.hpp @@ -1,4 +1,3 @@ #include "components\ceasefire\config\rscCeasefire.hpp" #include "components\downtime\ui\titles.hpp" -#include "components\respawnWaves\ui\titles.hpp" #include "components\miscClient\ui\titles.hpp" From 003262e5392ccfcb9e1a135197e7fdea2d5ab50a Mon Sep 17 00:00:00 2001 From: Bubbus Date: Tue, 8 Mar 2022 20:51:12 +0000 Subject: [PATCH 02/24] Added basic gearscript handler to vanilla respawn system. --- components/functions.hpp | 1 + components/respawn/cfgRespawnTemplates.hpp | 8 ++++++++ components/respawn/functions.hpp | 4 ++++ components/respawn/loadout/onPlayerRespawn.sqf | 16 ++++++++++++++++ components/respawn/macros.hpp | 1 + description.ext | 16 +++++----------- 6 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 components/respawn/cfgRespawnTemplates.hpp create mode 100644 components/respawn/functions.hpp create mode 100644 components/respawn/loadout/onPlayerRespawn.sqf create mode 100644 components/respawn/macros.hpp diff --git a/components/functions.hpp b/components/functions.hpp index fe784c49..99a82b9e 100644 --- a/components/functions.hpp +++ b/components/functions.hpp @@ -21,6 +21,7 @@ class F #include "miscClient\functions.hpp" #include "miscShared\functions.hpp" #include "radios\functions.hpp" +#include "respawn\functions.hpp" #include "spawnNpcs\functions.hpp" #include "squadMarkers\functions.hpp" #include "viewDistanceEditor\functions.hpp" diff --git a/components/respawn/cfgRespawnTemplates.hpp b/components/respawn/cfgRespawnTemplates.hpp new file mode 100644 index 00000000..847a4841 --- /dev/null +++ b/components/respawn/cfgRespawnTemplates.hpp @@ -0,0 +1,8 @@ +class CfgRespawnTemplates +{ + class CAFE_Loadout + { + onPlayerRespawn = "components\respawn\loadout\onPlayerRespawn.sqf"; + isCall = 1; + }; +} \ No newline at end of file diff --git a/components/respawn/functions.hpp b/components/respawn/functions.hpp new file mode 100644 index 00000000..e4f08acb --- /dev/null +++ b/components/respawn/functions.hpp @@ -0,0 +1,4 @@ +class respawn +{ + file = "components\respawn"; +}; diff --git a/components/respawn/loadout/onPlayerRespawn.sqf b/components/respawn/loadout/onPlayerRespawn.sqf new file mode 100644 index 00000000..980e81ad --- /dev/null +++ b/components/respawn/loadout/onPlayerRespawn.sqf @@ -0,0 +1,16 @@ +#include "..\macros.hpp" + +params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"]; + +private _loadout = _newUnit getVariable ["f_var_assignGear", "default"]; +private _faction = _newUnit getVariable ["f_var_assignGear_Faction", nil]; + +if ((_loadout isEqualTo "default") and {!isNull _oldUnit}) then +{ + _loadout = _oldUnit getVariable ["f_var_assignGear", "default"]; + _faction = _oldUnit getVariable ["f_var_assignGear_Faction", nil]; +}; + +DEBUG_FORMAT3_CHAT("[RESPAWN-2]: Applying loadout %1 with faction %2 to %3", _loadout, _faction, _newUnit) + +[_loadout, _newUnit, _faction] call f_fnc_assignGear; diff --git a/components/respawn/macros.hpp b/components/respawn/macros.hpp new file mode 100644 index 00000000..51b97ccc --- /dev/null +++ b/components/respawn/macros.hpp @@ -0,0 +1 @@ +#include "../../macros.hpp" \ No newline at end of file diff --git a/description.ext b/description.ext index c4b83b51..966ff924 100644 --- a/description.ext +++ b/description.ext @@ -47,14 +47,17 @@ enableDebugConsole = 1; // CAFE - Respawn Settings - respawn = "BASE"; respawnDelay = 20; respawnOnStart = 1; -respawnTemplates[] = {"MenuPosition", "MenuInventory", "Spectator"}; +respawnTemplates[] = {"MenuPosition", "Spectator", "CAFE_Loadout"}; respawnDialog = 1; +// CAFE - Respawn system includes. +#include "components\respawn\cfgRespawnTemplates.hpp" + + // ============================================================================================ forceRotorLibSimulation = 0; @@ -158,15 +161,6 @@ class CfgDebriefing // ============================================================================================ -//class CfgRespawnTemplates -//{ - -//}; - - -// ============================================================================================ - - class Params { #include "components\missionParameters.hpp" From 09734b036be14dfd8fc1c0b10d967e5f898a5048 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 10 Mar 2022 23:56:11 +0000 Subject: [PATCH 03/24] Added basic squad handling to respawn refactor. --- components/respawn/cfgRespawnTemplates.hpp | 7 ++++ components/respawn/loadout/macros.hpp | 1 + .../respawn/loadout/onPlayerRespawn.sqf | 8 +++- components/respawn/squad/macros.hpp | 2 + components/respawn/squad/onPlayerKilled.sqf | 41 +++++++++++++++++++ components/respawn/squad/onPlayerRespawn.sqf | 11 +++++ description.ext | 4 +- squadmarker_macros.hpp | 6 +-- 8 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 components/respawn/loadout/macros.hpp create mode 100644 components/respawn/squad/macros.hpp create mode 100644 components/respawn/squad/onPlayerKilled.sqf create mode 100644 components/respawn/squad/onPlayerRespawn.sqf diff --git a/components/respawn/cfgRespawnTemplates.hpp b/components/respawn/cfgRespawnTemplates.hpp index 847a4841..83a6b2aa 100644 --- a/components/respawn/cfgRespawnTemplates.hpp +++ b/components/respawn/cfgRespawnTemplates.hpp @@ -5,4 +5,11 @@ class CfgRespawnTemplates onPlayerRespawn = "components\respawn\loadout\onPlayerRespawn.sqf"; isCall = 1; }; + + class CAFE_Squad + { + onPlayerKilled = "components\respawn\squad\onPlayerKilled.sqf"; + onPlayerRespawn = "components\respawn\squad\onPlayerRespawn.sqf"; + isCall = 1; + }; } \ No newline at end of file diff --git a/components/respawn/loadout/macros.hpp b/components/respawn/loadout/macros.hpp new file mode 100644 index 00000000..5556564c --- /dev/null +++ b/components/respawn/loadout/macros.hpp @@ -0,0 +1 @@ +#include "../macros.hpp" \ No newline at end of file diff --git a/components/respawn/loadout/onPlayerRespawn.sqf b/components/respawn/loadout/onPlayerRespawn.sqf index 980e81ad..e67dc485 100644 --- a/components/respawn/loadout/onPlayerRespawn.sqf +++ b/components/respawn/loadout/onPlayerRespawn.sqf @@ -1,4 +1,10 @@ -#include "..\macros.hpp" +#include "macros.hpp" + +/* + CAFE Loadout on-respawn script. + + Make sure the player receives a gearscripted loadout upon respawn. +*/ params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"]; diff --git a/components/respawn/squad/macros.hpp b/components/respawn/squad/macros.hpp new file mode 100644 index 00000000..844393a4 --- /dev/null +++ b/components/respawn/squad/macros.hpp @@ -0,0 +1,2 @@ +#include "../macros.hpp" +#include "../../../squadmarker_macros.hpp" \ No newline at end of file diff --git a/components/respawn/squad/onPlayerKilled.sqf b/components/respawn/squad/onPlayerKilled.sqf new file mode 100644 index 00000000..36eb7aec --- /dev/null +++ b/components/respawn/squad/onPlayerKilled.sqf @@ -0,0 +1,41 @@ +#include "macros.hpp" + +/* + CAFE Squad on-killed script. + + If an old unit exists, remove it from its squad and make sure the implicit new squad is hidden. +*/ + +params ["_oldUnit", "_killer", "_respawn", "_respawnDelay"]; + +if (isNull _oldUnit) exitWith +{ + DEBUG_PRINT_CHAT("[RESPAWN-2]: No old unit found. respawnOnStart may be set to 1.") +}; + +DEBUG_FORMAT2_CHAT("[RESPAWN-2]: Removing %1 from squad %2.", _oldUnit, (group _oldUnit)) + +private _oldGroup = group _oldUnit; +[_oldUnit] joinSilent grpNull; + +// Wait until unit has properly joined new 'respawn' group and then make it invisible on the map. +[ + // Condition + { + (group (_this#0)) isNotEqualTo (_this#1) + }, + + // Script + { + private _newGroup = group (_this#0); + + if (count units _newGroup <= 1) then + { + SET_SQUAD_VISIBILITY_DIRECT(_newGroup,false); + }; + }, + + // Arguments + [_oldUnit, _oldGroup] + +] call CBA_fnc_waitUntilAndExecute; \ No newline at end of file diff --git a/components/respawn/squad/onPlayerRespawn.sqf b/components/respawn/squad/onPlayerRespawn.sqf new file mode 100644 index 00000000..0a055a07 --- /dev/null +++ b/components/respawn/squad/onPlayerRespawn.sqf @@ -0,0 +1,11 @@ +#include "macros.hpp" + +/* + CAFE Squad on-respawn script. + + Make sure the player sees the squad dialog so they can rejoin their squad and use their teleport token if a JIP. +*/ + +params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"]; + +createDialog "CAFE_GroupPicker_Dialog"; diff --git a/description.ext b/description.ext index 966ff924..1f14a810 100644 --- a/description.ext +++ b/description.ext @@ -48,9 +48,9 @@ enableDebugConsole = 1; // CAFE - Respawn Settings respawn = "BASE"; -respawnDelay = 20; +respawnDelay = 5; respawnOnStart = 1; -respawnTemplates[] = {"MenuPosition", "Spectator", "CAFE_Loadout"}; +respawnTemplates[] = {"MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad"}; respawnDialog = 1; diff --git a/squadmarker_macros.hpp b/squadmarker_macros.hpp index bea1fb7c..23b4de02 100644 --- a/squadmarker_macros.hpp +++ b/squadmarker_macros.hpp @@ -2,20 +2,20 @@ #define FACTION NONE #define SQUADS f_dict_squadmarkers -#define COLOUR_RED [0.9,0,0,1] +#define COLOUR_RED [0.9,0,0,1] #define COLOUR_ORANGE [1,0.5,0,1] #define COLOUR_YELLOW [1,1,0,1] #define COLOUR_GREEN [0,1,0,1] #define COLOUR_BLUE [0.2,0.2,1,1] #define COLOUR_CYAN [0,1,1,1] #define COLOUR_MAGENTA [1,0,1,1] -#define COLOUR_PINK [1,0.3,0.4,1] +#define COLOUR_PINK [1,0.3,0.4,1] #define COLOUR_PURPLE [0.5,0,1,1] #define COLOUR_WHITE [1,1,1,1] #define COLOUR_LIGHTGREY [0.7,0.7,0.7,1] #define COLOUR_DARKGREY [0.3,0.3,0.3,1] #define COLOUR_BLACK [0,0,0,1] -#define COLOUR_GREY [0.5,0.5,0.5,1] +#define COLOUR_GREY [0.5,0.5,0.5,1] #define COLOUR_BROWN [0.5,0.25,0,1] #define COLOUR_KHAKI [0.5,0.6,0.4,1] From 5733b5cbed2fe3c2adb69339e92a37b1528b57d5 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 31 Mar 2022 23:25:07 +0100 Subject: [PATCH 04/24] Progress on respawn: * Torn out now-irrelevant stuff about respawn dialogs etc. * Made configurable (although some of the config doesn't work idk why) --- .../fn_downtimeRespawnMessageMonitor.sqf | 37 --------- components/downtime/fn_downtimeSpectate.sqf | 1 - components/downtime/functions.hpp | 7 -- components/downtime/init_component.sqf | 1 - components/downtime/ui/deadTitle.hpp | 59 -------------- components/downtime/ui/respawnTitle.hpp | 65 --------------- components/downtime/ui/titles.hpp | 2 - .../ui_functions/fn_downtimeDead_onLoad.sqf | 32 -------- .../fn_downtime_respawnTitle_onLoad.sqf | 32 -------- components/downtime/ui_macros.hpp | 5 -- components/gearScript/fn_assignGear.sqf | 65 +++++++-------- .../miscShared/fn_canPlayerOfSideRespawn.sqf | 23 ------ components/miscShared/functions.hpp | 1 - components/respawn/cfgRespawnTemplates.hpp | 28 ++++++- .../respawn/loadout/onPlayerRespawn.sqf | 21 +++-- configuration/debug.hpp | 2 +- configuration/respawn.hpp | 31 +++++++ configuration/respawn.sqf | 17 ---- configuration/respawnWaves.sqf | 74 ----------------- description.ext | 8 +- respawn_macros.hpp | 80 ++----------------- startup/components/globals/clientGlobals.sqf | 38 --------- startup/components/globals/serverGlobals.sqf | 26 ------ .../groups/clientConfigGroup.sqf | 3 - .../configuration/internals/configMacros.hpp | 1 + 25 files changed, 120 insertions(+), 539 deletions(-) delete mode 100644 components/downtime/fn_downtimeRespawnMessageMonitor.sqf delete mode 100644 components/downtime/ui/deadTitle.hpp delete mode 100644 components/downtime/ui/respawnTitle.hpp delete mode 100644 components/downtime/ui_functions/fn_downtimeDead_onLoad.sqf delete mode 100644 components/downtime/ui_functions/fn_downtime_respawnTitle_onLoad.sqf delete mode 100644 components/miscShared/fn_canPlayerOfSideRespawn.sqf create mode 100644 configuration/respawn.hpp delete mode 100644 configuration/respawn.sqf diff --git a/components/downtime/fn_downtimeRespawnMessageMonitor.sqf b/components/downtime/fn_downtimeRespawnMessageMonitor.sqf deleted file mode 100644 index e18ef053..00000000 --- a/components/downtime/fn_downtimeRespawnMessageMonitor.sqf +++ /dev/null @@ -1,37 +0,0 @@ -#include "macros.hpp" - -CLIENT_ONLY; -RUN_AS_ASYNC(f_fnc_downtimeRespawnMessageMonitor); - -while {true} do -{ - sleep 2; - - if ((!HAS_DISABLED_RESPAWN_MESSAGE) and {IS_UNCONSCIOUS(player)}) then - { - uiSleep 7.5; - - while {(!HAS_DISABLED_RESPAWN_MESSAGE) and {IS_UNCONSCIOUS(player)}} do - { - waitUntil - { - sleep 1; - ([side group player] call f_fnc_canPlayerOfSideRespawn) or {!IS_UNCONSCIOUS(player)} - }; - - if (IS_UNCONSCIOUS(player)) then - { - "CAFE_DowntimeRespawn" cutRsc ["CAFE_DowntimeRespawn", "PLAIN", -1, false]; - }; - - waitUntil - { - sleep 1; - !(([side group player] call f_fnc_canPlayerOfSideRespawn) and {IS_UNCONSCIOUS(player)}) - }; - - }; - - }; - -}; diff --git a/components/downtime/fn_downtimeSpectate.sqf b/components/downtime/fn_downtimeSpectate.sqf index 93a78981..b85f780c 100644 --- a/components/downtime/fn_downtimeSpectate.sqf +++ b/components/downtime/fn_downtimeSpectate.sqf @@ -62,7 +62,6 @@ _whenDone = [false] call f_fnc_updateDowntimeSpectatorCameraModes; "CAFE_CutDowntime" cutFadeOut 0; - "CAFE_DowntimeRespawn" cutFadeOut 0; isNil { diff --git a/components/downtime/functions.hpp b/components/downtime/functions.hpp index 685dadb3..6c73c373 100644 --- a/components/downtime/functions.hpp +++ b/components/downtime/functions.hpp @@ -6,11 +6,4 @@ class downtime class blockSelfInteractWhileUnconscious{}; class blockUnconsciousEffectsWhileDowntimeActive{}; class updateDowntimeSpectatorCameraModes{}; - class downtimeRespawnMessageMonitor{}; -}; -class downtime_ui -{ - file = "components\downtime\ui_functions"; - class downtimeDead_onLoad{}; - class downtime_respawnTitle_onLoad{}; }; diff --git a/components/downtime/init_component.sqf b/components/downtime/init_component.sqf index d6500889..effb80f0 100644 --- a/components/downtime/init_component.sqf +++ b/components/downtime/init_component.sqf @@ -22,6 +22,5 @@ waitUntil DEBUG_PRINT_LOG("finished waiting: downtime") [] spawn f_fnc_downtimeMonitor; -[] spawn f_fnc_downtimeRespawnMessageMonitor; [] spawn f_fnc_blockSelfInteractWhileUnconscious; [] spawn f_fnc_blockUnconsciousEffectsWhileDowntimeActive; diff --git a/components/downtime/ui/deadTitle.hpp b/components/downtime/ui/deadTitle.hpp deleted file mode 100644 index 849b1ba2..00000000 --- a/components/downtime/ui/deadTitle.hpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "../ui_macros.hpp" - -class CAFE_DowntimeDead -{ - idd = 13174; - - movingEnable = false; - enableSimulation = true; - - fadein = 1; - duration = 4; - fadeout = 3; - - onLoad = "_this call f_fnc_downtimeDead_onLoad;"; - - class ControlsBackground - { - class YouAre: CAFE_DefaultText - { - idc = 1000; - style = ST_CENTER; - text = "You have"; - font = "PuristaBold"; - x = 7.5 * GUI_GRID_W + GUI_GRID_X; - y = 7 * GUI_GRID_H + GUI_GRID_Y; - w = 25 * GUI_GRID_W; - h = 3 * GUI_GRID_H; - sizeEx = 2 * GUI_GRID_H; - }; - - class Dead: CAFE_DefaultText - { - idc = 1001; - style = ST_CENTER; - text = " Died."; - font = "PuristaBold"; - colorText[] = {1,0.1,0.1,1}; - x = 7.5 * GUI_GRID_W + GUI_GRID_X; - y = 9 * GUI_GRID_H + GUI_GRID_Y; - w = 25 * GUI_GRID_W; - h = 3 * GUI_GRID_H; - sizeEx = 3 * GUI_GRID_H; - }; - - class Subtitle: CAFE_DefaultText - { - idc = IDC_DOWNTIMEDEAD_SUBTITLE; - style = ST_CENTER; - text = ""; - x = 7.5 * GUI_GRID_W + GUI_GRID_X; - y = 11.5 * GUI_GRID_H + GUI_GRID_Y; - w = 25 * GUI_GRID_W; - h = 3 * GUI_GRID_H; - sizeEx = 1 * GUI_GRID_H; - }; - - }; - -}; diff --git a/components/downtime/ui/respawnTitle.hpp b/components/downtime/ui/respawnTitle.hpp deleted file mode 100644 index b76ca7f8..00000000 --- a/components/downtime/ui/respawnTitle.hpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "../ui_macros.hpp" - -class CAFE_DowntimeRespawn -{ - idd = -1; - - movingEnable = false; - enableSimulation = true; - - fadein = 1; - duration = 20; - fadeout = 5; - - onLoad = "_this call f_fnc_downtime_respawnTitle_onLoad;"; - - class ControlsBackground - { - class YouCanRespawn: CAFE_DefaultText - { - idc = IDC_DOWNTIMERESPAWN_HEADER; - text = "You can now respawn."; - font = "PuristaBold"; - style = ST_CENTER; - x = 7 * GUI_GRID_W + GUI_GRID_X; - y = 6.5 * GUI_GRID_H + GUI_GRID_Y; - w = 26 * GUI_GRID_W; - h = 3 * GUI_GRID_H; - sizeEx = 2.4 * GUI_GRID_H; - }; - - class RespawnReason: CAFE_DefaultText - { - idc = IDC_DOWNTIMERESPAWN_REASON; - text = ""; - style = ST_CENTER; - x = 5 * GUI_GRID_W + GUI_GRID_X; - y = 10 * GUI_GRID_H + GUI_GRID_Y; - w = 30 * GUI_GRID_W; - h = 1 * GUI_GRID_H; - }; - - class HowToRespawn: CAFE_DefaultStructuredText - { - idc = IDC_DOWNTIMERESPAWN_INSTRUCTION; - text = "You may use the ""RESPAWN"" button in your menu to be included."; - x = 7 * GUI_GRID_W + GUI_GRID_X; - y = 11 * GUI_GRID_H + GUI_GRID_Y; - w = 26 * GUI_GRID_W; - h = 1 * GUI_GRID_H; - }; - - - class Disclaimer: CAFE_DefaultStructuredText - { - idc = IDC_DOWNTIMERESPAWN_DISCLAIMER; - text = "PLEASE NOTE: You are still unconscious. Think about whether someone is still trying to save you before using this option. It is considered bad manners to respawn unless you have been left behind or forgotten about."; - x = 8 * GUI_GRID_W + GUI_GRID_X; - y = 13 * GUI_GRID_H + GUI_GRID_Y; - w = 23.5 * GUI_GRID_W; - h = 4 * GUI_GRID_H; - }; - - }; - -}; diff --git a/components/downtime/ui/titles.hpp b/components/downtime/ui/titles.hpp index 2ea3aa3f..a1c6543b 100644 --- a/components/downtime/ui/titles.hpp +++ b/components/downtime/ui/titles.hpp @@ -1,4 +1,2 @@ #include "unconsciousTitle.hpp" -#include "deadTitle.hpp" -#include "respawnTitle.hpp" diff --git a/components/downtime/ui_functions/fn_downtimeDead_onLoad.sqf b/components/downtime/ui_functions/fn_downtimeDead_onLoad.sqf deleted file mode 100644 index 8103d3a3..00000000 --- a/components/downtime/ui_functions/fn_downtimeDead_onLoad.sqf +++ /dev/null @@ -1,32 +0,0 @@ -#include "../macros.hpp" - -params ["_display"]; - -_subtitle = _display displayCtrl IDC_DOWNTIMEDEAD_SUBTITLE; -_text = ""; -_side = side group player; - -_respawnsLeft = RESPAWN_WAVES(_side); - -if (_respawnsLeft <= 0) then -{ - _text = "No respawn waves remain."; -} -else -{ - _time = TIME_UNTIL_RESPAWN_READY(_side); - - if (_time > 5) then - { - _timeString = [_time] call f_fnc_formatTimeDuration; - - _text = format ["%1 until respawn is available.", _timeString]; - } - else - { - _text = "Respawn waves are available to leaders."; - }; - -}; - -_subtitle ctrlSetText _text; diff --git a/components/downtime/ui_functions/fn_downtime_respawnTitle_onLoad.sqf b/components/downtime/ui_functions/fn_downtime_respawnTitle_onLoad.sqf deleted file mode 100644 index 2ea0d88c..00000000 --- a/components/downtime/ui_functions/fn_downtime_respawnTitle_onLoad.sqf +++ /dev/null @@ -1,32 +0,0 @@ -#include "../macros.hpp" - -params ["_display"]; - -_subtitle = _display displayCtrl IDC_DOWNTIMERESPAWN_REASON; -_text = ""; -_side = side group player; - -_text = switch RESPAWN_TYPE(_side) do -{ - case (RESPAWN_TYPE_WAVES): - { - _waveInfo = GET_RESPAWN_WAVE(_side); - - if (count _waveInfo <= 0) exitWith {"A respawn wave has recently ended. This is a bug. Tell Bubbus."}; - - _waveStarted = _waveInfo select WAVEINFO_TIMESTARTED; - _waveLength = RESPAWN_WAVE_DURATION(_side); - _timeLeft = 0 max ((_waveStarted + _waveLength) - serverTime); - _asTimeStr = [_timeLeft] call f_fnc_formatTimeDuration; - - _template = "A respawn wave has been called (%1 left)."; - format [_template, _asTimeStr] - }; - - default - { - "(respawn type not detected)" - }; -}; - -_subtitle ctrlSetText _text; diff --git a/components/downtime/ui_macros.hpp b/components/downtime/ui_macros.hpp index 18d923b6..47c6ad49 100644 --- a/components/downtime/ui_macros.hpp +++ b/components/downtime/ui_macros.hpp @@ -1,7 +1,2 @@ #define IDC_DOWNTIMEDEAD_SUBTITLE 1002 - -#define IDC_DOWNTIMERESPAWN_HEADER 1000 -#define IDC_DOWNTIMERESPAWN_REASON 1002 -#define IDC_DOWNTIMERESPAWN_INSTRUCTION 1001 -#define IDC_DOWNTIMERESPAWN_DISCLAIMER 1100 diff --git a/components/gearScript/fn_assignGear.sqf b/components/gearScript/fn_assignGear.sqf index 1b8eeb17..57d2e149 100644 --- a/components/gearScript/fn_assignGear.sqf +++ b/components/gearScript/fn_assignGear.sqf @@ -2,15 +2,26 @@ RUN_AS_ASYNC(f_fnc_assignGear); +// ==================================================================================== + _unit = _this select 1; +_typeOfUnit = toLower (_this select 0); +_faction = toLower (faction _unit); + +if (count _this > 2) then +{ + _faction = toLower (_this select 2); +}; -if !(isServer) then +if (IS_PLAYER) then { waitUntil {local player}; }; LOCAL_ONLY(_unit); +DEBUG_FORMAT3_LOG("[GEARSCRIPT-2]: Entered gearscript for unit %1 (%2, %3).",(str _unit),_typeOfUnit,_faction) + // ==================================================================================== if !IS_TRUE(f_var_gearscript_loaded) then @@ -18,14 +29,17 @@ if !IS_TRUE(f_var_gearscript_loaded) then waitUntil { IS_TRUE(f_var_gearscript_loaded) }; }; -_runningAlready = _unit getVariable ["f_var_assignGear_running",false]; -if (_runningAlready) exitWith +isNil { - DEBUG_FORMAT1_LOG("[GEARSCRIPT-2]: Exited early because gearscript is running already (Unit %1)",(str _unit)) -}; + _runningAlready = _unit getVariable ["f_var_assignGear_running",false]; + if (_runningAlready) exitWith + { + DEBUG_FORMAT1_LOG("[GEARSCRIPT-2]: Exited early because gearscript is running already (Unit %1)",(str _unit)) + }; -_unit setVariable ["f_var_assignGear_running", true, true]; -_unit setVariable ["f_var_assignGear_done", false, true]; + _unit setVariable ["f_var_assignGear_running", true, true]; + _unit setVariable ["f_var_assignGear_done", false, true]; +}; // ==================================================================================== @@ -33,40 +47,28 @@ _unit setVariable ["f_var_assignGear_done", false, true]; if (time <= 1) then { // Immediately set the loadout to a completely blank loadout if the unit is a player. Prevents an awkward moment where the player is holding default gear. - if (isPlayer _unit) then - { + if (isPlayer _unit) exitWith + { + // Respawn compat - ensure these variables are set *immediately* so they can be picked up by the respawn template. + _unit setVariable ["f_var_assignGear", _typeOfUnit, true]; + _unit setVariable ["f_var_assignGear_Faction", _faction, true]; + _unit setUnitLoadout [[],[],[],["U_B_CombatUniform_mcam",[]],[],[],"","",[],["ItemMap","","","ItemCompass","ItemWatch",""]]; - // Wait until the mission has started before loading out any units. Prevents the mission failing to load if loadouts contain missing/misconfigured objects. - // BUB 2020-12-23 :: Playing with minimum time to apply loadout successfully. Had some visual glitches with "time > 0", probably arma network bug or w/e. - waitUntil { time > 3 }; - } - else - { - // If not a player, it isn't as critical that the loadout is applied ASAP. - waitUntil { sleep 3; time > 0 }; + // In this scenario, player gearscripting gets taken over by the respawn template "CAFE_Loadout". Just exit here. + _unit setVariable ["f_var_assignGear_done", true, true]; + _unit setVariable ["f_var_assignGear_running", false, true]; }; + + // If not a player, it isn't as critical that the loadout is applied ASAP. + waitUntil { sleep 3; time > 0 }; }; - // ==================================================================================== -_typeOfUnit = toLower (_this select 0); - -_faction = toLower (faction _unit); - -if (count _this > 2) then -{ - _faction = toLower (_this select 2); -}; - - DEBUG_FORMAT2_LOG("[GEARSCRIPT-2]: Attempting to apply '%1' loadout for faction '%2'.",_typeOfUnit,_faction) - -// ==================================================================================== - _unit setVariable ["f_var_assignGear", _typeOfUnit, true]; _unit setVariable ["f_var_assignGear_Faction", _faction, true]; @@ -88,7 +90,6 @@ if (_gearVariant == "") exitWith [_unit, _typeOfUnit, _gearVariant] call f_fnc_applyLoadout; - // ==================================================================================== _unit setVariable ["f_var_assignGear_done", true, true]; diff --git a/components/miscShared/fn_canPlayerOfSideRespawn.sqf b/components/miscShared/fn_canPlayerOfSideRespawn.sqf deleted file mode 100644 index 0a7cfdba..00000000 --- a/components/miscShared/fn_canPlayerOfSideRespawn.sqf +++ /dev/null @@ -1,23 +0,0 @@ -#include "../../respawn_macros.hpp" - -params ["_side"]; - -_canRespawn = switch (RESPAWN_TYPE(_side)) do -{ - case (RESPAWN_TYPE_WAVES): - { - (count GET_RESPAWN_WAVE(_side)) > 0 - }; - - case (RESPAWN_TYPE_NONE): - { - false - }; - - default - { - false - }; -}; - -_canRespawn diff --git a/components/miscShared/functions.hpp b/components/miscShared/functions.hpp index 0f8e454b..597dad19 100644 --- a/components/miscShared/functions.hpp +++ b/components/miscShared/functions.hpp @@ -25,7 +25,6 @@ class miscShared class getObjectUid{}; class addObjectsToAllZeuses{}; class addCustomSettings{}; - class canPlayerOfSideRespawn{}; class runHCAware{}; class edenScaleSupport{}; class inGameScaleSupport{}; diff --git a/components/respawn/cfgRespawnTemplates.hpp b/components/respawn/cfgRespawnTemplates.hpp index 83a6b2aa..9f86a2dc 100644 --- a/components/respawn/cfgRespawnTemplates.hpp +++ b/components/respawn/cfgRespawnTemplates.hpp @@ -3,7 +3,7 @@ class CfgRespawnTemplates class CAFE_Loadout { onPlayerRespawn = "components\respawn\loadout\onPlayerRespawn.sqf"; - isCall = 1; + isCall = 0; }; class CAFE_Squad @@ -12,4 +12,28 @@ class CfgRespawnTemplates onPlayerRespawn = "components\respawn\squad\onPlayerRespawn.sqf"; isCall = 1; }; -} \ No newline at end of file + + class CAFE_RespawnConfig_BLUFOR + { + respawnDelay = RESPAWN_DELAY_BLUFOR, + respawnOnStart = RESPAWN_AT_START_BLUFOR + }; + + class CAFE_RespawnConfig_OPFOR + { + respawnDelay = RESPAWN_DELAY_OPFOR, + respawnOnStart = RESPAWN_AT_START_OPFOR + }; + + class CAFE_RespawnConfig_INDFOR + { + respawnDelay = RESPAWN_DELAY_INDFOR, + respawnOnStart = RESPAWN_AT_START_INDFOR + }; + + class CAFE_RespawnConfig_CIVILIAN + { + respawnDelay = RESPAWN_DELAY_CIVILIAN, + respawnOnStart = RESPAWN_AT_START_CIVILIAN + }; +} diff --git a/components/respawn/loadout/onPlayerRespawn.sqf b/components/respawn/loadout/onPlayerRespawn.sqf index e67dc485..ee72ef03 100644 --- a/components/respawn/loadout/onPlayerRespawn.sqf +++ b/components/respawn/loadout/onPlayerRespawn.sqf @@ -1,9 +1,9 @@ #include "macros.hpp" /* - CAFE Loadout on-respawn script. + CAFE Loadout on-respawn script. - Make sure the player receives a gearscripted loadout upon respawn. + Make sure the player receives a gearscripted loadout upon respawn. */ params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"]; @@ -13,10 +13,19 @@ private _faction = _newUnit getVariable ["f_var_assignGear_Faction", nil]; if ((_loadout isEqualTo "default") and {!isNull _oldUnit}) then { - _loadout = _oldUnit getVariable ["f_var_assignGear", "default"]; - _faction = _oldUnit getVariable ["f_var_assignGear_Faction", nil]; + _loadout = _oldUnit getVariable ["f_var_assignGear", "default"]; + _faction = _oldUnit getVariable ["f_var_assignGear_Faction", nil]; }; -DEBUG_FORMAT3_CHAT("[RESPAWN-2]: Applying loadout %1 with faction %2 to %3", _loadout, _faction, _newUnit) +if !(isNil "_faction") then +{ + DEBUG_FORMAT3_CHAT("[RESPAWN-2]: Applying loadout %1 with faction %2 to %3", _loadout, _faction, _newUnit) + + waitUntil + { + !(_newUnit getVariable ["f_var_assignGear_running", false]) + }; + + [_loadout, _newUnit, _faction] call f_fnc_assignGear; +}; -[_loadout, _newUnit, _faction] call f_fnc_assignGear; diff --git a/configuration/debug.hpp b/configuration/debug.hpp index 4363d0fc..e2701310 100644 --- a/configuration/debug.hpp +++ b/configuration/debug.hpp @@ -1,2 +1,2 @@ // Enables debugging -// #define ENABLE_DEBUG +#define ENABLE_DEBUG diff --git a/configuration/respawn.hpp b/configuration/respawn.hpp new file mode 100644 index 00000000..60a49c72 --- /dev/null +++ b/configuration/respawn.hpp @@ -0,0 +1,31 @@ +#include "..\respawn_macros.hpp" + + +// BUB 2022-03-31 TODO: Re-introduce this functionality per-side. +// When a player respawns, do they automatically re-join their group? +//#define RESPAWN_IN_GROUP true + +// BUB 2022-03-31 TODO: Re-introduce this functionality, no per-side needed. +// When a player JIPs, do they get to teleport to a group of their choosing? +// #define ALLOW_TELEPORT_UPON_JIP + +// BUB 2022-03-31 TODO: Re-introduce this functionality per-side. +// When a player respawns, do they get to teleport to a group of their choosing? +// #define ALLOW_TELEPORT_UPON_RESPAWN + + +#define RESPAWN_MODES_BLUFOR {RESPAWN_DEFAULTS(BLUFOR), RESPAWN_WAVE, RESPAWN_TICKETS} +#define RESPAWN_DELAY_BLUFOR 30 +#define RESPAWN_AT_START_BLUFOR 1 + +#define RESPAWN_MODES_OPFOR {RESPAWN_DEFAULTS(OPFOR), RESPAWN_WAVE} +#define RESPAWN_DELAY_OPFOR 10 +#define RESPAWN_AT_START_OPFOR RESPAWN_AT_START_BLUFOR + +#define RESPAWN_MODES_INDFOR {RESPAWN_DEFAULTS(INDFOR), RESPAWN_WAVE} +#define RESPAWN_DELAY_INDFOR RESPAWN_DELAY_BLUFOR +#define RESPAWN_AT_START_INDFOR RESPAWN_AT_START_BLUFOR + +#define RESPAWN_MODES_CIVILIAN {RESPAWN_DEFAULTS(CIVILIAN)} +#define RESPAWN_DELAY_CIVILIAN 5 +#define RESPAWN_AT_START_CIVILIAN RESPAWN_AT_START_BLUFOR \ No newline at end of file diff --git a/configuration/respawn.sqf b/configuration/respawn.sqf deleted file mode 100644 index b11c4fe3..00000000 --- a/configuration/respawn.sqf +++ /dev/null @@ -1,17 +0,0 @@ -#include "..\respawn_macros.hpp" - - -// When a player respawns, do they automatically re-join their group? -f_var_respawnInGroup = true; - -// When a player JIPs, do they get to teleport to a group of their choosing? -f_var_JIPTeleport = true; - -// When a player respawns, do they get to teleport to a group of their choosing? -f_var_RespawnTeleport = false; - -// nothing to see here (yet :)) ) -SET_RESPAWN_TYPE(west,RESPAWN_TYPE_WAVES); -SET_RESPAWN_TYPE(east,RESPAWN_TYPE_WAVES); -SET_RESPAWN_TYPE(independent,RESPAWN_TYPE_WAVES); -SET_RESPAWN_TYPE(civilian,RESPAWN_TYPE_WAVES); diff --git a/configuration/respawnWaves.sqf b/configuration/respawnWaves.sqf index 745565b5..c35a63b9 100644 --- a/configuration/respawnWaves.sqf +++ b/configuration/respawnWaves.sqf @@ -1,76 +1,2 @@ #include "..\respawn_macros.hpp" -/* - - Respawn waves configuration. - - Available commands: - ------------------- - - SET_RESPAWN_MODE(SIDE,MODE) - Configure how players are respawned. Available modes: - - RESPAWN_MODE_DISABLED - Respawn waves are not available for this side. - RESPAWN_MODE_BASE - Players will respawn at a marker named "respawn_SIDE", or an object named "respawner_SIDE". Replace "SIDE" with "west", "east", "guer" or "civ". - RESPAWN_MODE_COMMANDER - Players will respawn at the location of whoever activated the wave. If applicable, the players will spawn in the activator's vehicle. - - SET_RESPAWN_WAVES(SIDE,WAVES) - Amount of usable respawn waves before no more players can be respawned for the given side. - - SET_RESPAWN_MESSAGE(SIDE,"message") - A message that will be visible to all players of the given side whenever a respawn wave is activated. - - SET_RESPAWN_WAVE_DURATION(SIDE,SECONDS) - The duration of a respawn wave - if any players on this side die during the wave, they will be instantly respawned. - - SET_RESPAWN_WAVE_COOLDOWN(SIDE,SECONDS) - The minimum duration between a side's respawn waves - this is counted between the end of the last wave and the start of the next wave. - - SET_RESPAWN_SQUAD_MODE(SIDE,MODE) - Configure how respawned players join squads. Available modes: - - RESPAWN_REJOIN_OLD_SQUAD - Respawned players will rejoin their old squad, even if it has been totally wiped out. - RESPAWN_JOIN_REINFORCEMENT_SQUAD - Respawned players will join a new reinforcement squad, as defined by SET_RESPAWN_WAVE_SQUADS. - - SET_RESPAWN_WAVE_SQUADS(SIDE,SQUADS) - Sets a list of squad names that reinforcements will be placed into. Each squad name will be used in list-order. - If squad names run out, all future reinforcements will be placed in a default reinforcement squad. - For squad members to rejoin their squads, they can either meet-up or use the JIP menu (ensure that 'f_var_RespawnTeleport = true;' inside respawn.sqf). - - SET_RESPAWN_WAVE_READY(SIDE,READY) - Sets whether the respawn wave starts ready-to-use or not. If you set this to false, respawn waves will not be usable. - This might have some niche uses but you should probably use SET_RESPAWN_MODE instead. - - COPY_RESPAWN_CONFIG(TO_SIDE,FROM_SIDE); - Use this command to copy respawn details from one side to another side. You will still need to manually place the "respawn_SIDE" marker or the "respawner_SIDE" object. - -*/ - - - -// BLUFOR config. -SET_RESPAWN_MODE(west,RESPAWN_MODE_BASE); -SET_RESPAWN_SQUAD_MODE(west,RESPAWN_REJOIN_OLD_SQUAD); -SET_RESPAWN_WAVES(west,5); -SET_RESPAWN_WAVE_DURATION(west,60); -SET_RESPAWN_WAVE_COOLDOWN(west,300); -SET_RESPAWN_WAVE_READY(west,true); - -// Important: Place anything with a comma inside it into a separate line. This is a technical limitation. -_squads = ["DELTA","ECHO","FOXTROT","GOLF","HOTEL"]; -SET_RESPAWN_WAVE_SQUADS(west,_squads); - -_message = "Reinforcements have arrived."; -SET_RESPAWN_MESSAGE(west,_message); - - - - -// OPFOR config. -COPY_RESPAWN_CONFIG(east,west); - -// INDFOR config. -COPY_RESPAWN_CONFIG(independent,west); - -// Civilian config. -COPY_RESPAWN_CONFIG(civilian,west); diff --git a/description.ext b/description.ext index 1f14a810..4f05c4d7 100644 --- a/description.ext +++ b/description.ext @@ -48,11 +48,13 @@ enableDebugConsole = 1; // CAFE - Respawn Settings respawn = "BASE"; -respawnDelay = 5; -respawnOnStart = 1; -respawnTemplates[] = {"MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad"}; respawnDialog = 1; +respawnTemplatesWest[] = RESPAWN_MODES_BLUFOR; +respawnTemplatesEast[] = RESPAWN_MODES_OPFOR; +respawnTemplatesGuer[] = RESPAWN_MODES_INDFOR; +respawnTemplatesCiv[] = RESPAWN_MODES_CIVILIAN; + // CAFE - Respawn system includes. #include "components\respawn\cfgRespawnTemplates.hpp" diff --git a/respawn_macros.hpp b/respawn_macros.hpp index f898b4e7..8ade1f37 100644 --- a/respawn_macros.hpp +++ b/respawn_macros.hpp @@ -1,76 +1,12 @@ +#define RESPAWN_WAVE "Wave" +#define RESPAWN_TICKETS "Tickets" -#define RESPAWN_TYPE_WAVES "RespawnWaves" -#define RESPAWN_TYPE_NONE "NoRespawns" +#define RESPAWN_MODE_TIMED {"MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES {"MenuPosition", "Spectator", "Wave", "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES {"MenuPosition", "Spectator", "Wave", "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_DISABLED 0 -#define RESPAWN_MODE_BASE 1 -#define RESPAWN_MODE_COMMANDER 2 +#define RESPAWN_DEFAULTS(SIDE) STRING(CONCAT(CAFE_RespawnConfig_,SIDE)), "MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad" -#define RESPAWN_REJOIN_OLD_SQUAD 0 -#define RESPAWN_JOIN_REINFORCEMENT_SQUAD 1 +#define RESPAWN_MODES(SIDE) CONCAT(RESPAWN_ARRAY_,SIDE) -#define ORIGINAL_SQUAD "" - -#define WAVEINFO_ISACTIVE 0 -#define WAVEINFO_SPAWNAT 1 -#define WAVEINFO_JOINGROUP 2 -#define WAVEINFO_TIMESTARTED 3 - -#define RESPAWN_TYPE(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,Type,RESPAWN_TYPE_NONE) -#define SET_RESPAWN_TYPE(SIDE,TYPE) SET_RESPAWN_WAVE_VAL(SIDE,Type,TYPE) - -#define RESPAWN_WAVE_VAR(SIDE,SUBVAR) (toLower format ["f_var_respawnWaves_%1_%2", SIDE, #SUBVAR]) -#define GET_RESPAWN_WAVE_VAL(SIDE,VALNAME,DEFAULT) (missionNamespace getVariable [RESPAWN_WAVE_VAR(SIDE,VALNAME), DEFAULT]) -#define SET_RESPAWN_WAVE_VAL(SIDE,VALNAME,VALUE) missionNamespace setVariable [RESPAWN_WAVE_VAR(SIDE,VALNAME), VALUE, true] - -#define RESPAWN_MODE(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,Mode,RESPAWN_MODE_DISABLED) -#define SET_RESPAWN_MODE(SIDE,MODE) SET_RESPAWN_WAVE_VAL(SIDE,Mode,MODE) - -#define RESPAWN_WAVES(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,Count,0) -#define SET_RESPAWN_WAVES(SIDE,WAVES) SET_RESPAWN_WAVE_VAL(SIDE,Count,WAVES) - -#define RESPAWN_ENTITY(SIDE) (missionNamespace getVariable [toLower format ["respawner_%1", SIDE], objNull]) -#define SET_RESPAWN_ENTITY(SIDE,ENT) missionNamespace setVariable [toLower format ["respawner_%1", SIDE], ENT] - -#define RESPAWN_MESSAGE(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,Message,"") -#define SET_RESPAWN_MESSAGE(SIDE,MESSAGE) SET_RESPAWN_WAVE_VAL(SIDE,Message,MESSAGE) - -#define RESPAWN_WAVE_DURATION(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,Duration,0) -#define SET_RESPAWN_WAVE_DURATION(SIDE,SECONDS) SET_RESPAWN_WAVE_VAL(SIDE,Duration,SECONDS) - -#define RESPAWN_WAVE_COOLDOWN(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,Cooldown,0) -#define SET_RESPAWN_WAVE_COOLDOWN(SIDE,SECONDS) SET_RESPAWN_WAVE_VAL(SIDE,Cooldown,SECONDS) - -#define RESPAWN_MARKER_POS(SIDE) (getMarkerPos (toLower format ["respawn_%1", SIDE])) - -#define RESPAWN_WAVE_READY(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,Ready,false) -#define SET_RESPAWN_WAVE_READY(SIDE,READY) SET_RESPAWN_WAVE_VAL(SIDE,Ready,READY) - -#define RESPAWN_SQUAD_MODE(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,RejoinSquad,RESPAWN_REJOIN_OLD_SQUAD) -#define SET_RESPAWN_SQUAD_MODE(SIDE,MODE) SET_RESPAWN_WAVE_VAL(SIDE,RejoinSquad,MODE) - -#define RESPAWN_WAVE_SQUADS(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,Squads,[]) -#define SET_RESPAWN_WAVE_SQUADS(SIDE,ARRAY) SET_RESPAWN_WAVE_VAL(SIDE,Squads,ARRAY) - -#define LAST_RESPAWN_TIME(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,LastRespawnTime,-9999) -#define SET_LAST_RESPAWN_TIME(SIDE,TIME) SET_RESPAWN_WAVE_VAL(SIDE,LastRespawnTime,TIME) - -#define SET_RESPAWN_WAVE(SIDE,WAVEARRAY) \ - missionNamespace setVariable [RESPAWN_WAVE_VAR(SIDE,ActiveWave), WAVEARRAY, true]; \ - SET_LAST_RESPAWN_TIME(SIDE,serverTime) - -#define GET_RESPAWN_WAVE(SIDE) GET_RESPAWN_WAVE_VAL(SIDE,ActiveWave,[]) -#define CLEAR_RESPAWN_WAVE(SIDE) missionNamespace setVariable [RESPAWN_WAVE_VAR(SIDE,ActiveWave), nil, true] - -#define TIME_UNTIL_RESPAWN_READY(SIDE) (RESPAWN_WAVE_DURATION(SIDE) + RESPAWN_WAVE_COOLDOWN(SIDE) + LAST_RESPAWN_TIME(SIDE) - serverTime) - - -#define COPY_RESPAWN_CONFIG(TO,FROM) \ - SET_RESPAWN_MODE(TO,RESPAWN_MODE(FROM)); \ - SET_RESPAWN_SQUAD_MODE(TO,RESPAWN_SQUAD_MODE(FROM)); \ - SET_RESPAWN_WAVES(TO,RESPAWN_WAVES(FROM)); \ - SET_RESPAWN_MESSAGE(TO,RESPAWN_MESSAGE(FROM)); \ - SET_RESPAWN_WAVE_DURATION(TO,RESPAWN_WAVE_DURATION(FROM)); \ - SET_RESPAWN_WAVE_COOLDOWN(TO,RESPAWN_WAVE_COOLDOWN(FROM)); \ - SET_RESPAWN_WAVE_READY(TO,RESPAWN_WAVE_READY(FROM)); \ - SET_RESPAWN_WAVE_SQUADS(TO,RESPAWN_WAVE_SQUADS(FROM)) +#define DEFAULT_RESPAWN_ARRAY {RESPAWN_DEFAULTS} \ No newline at end of file diff --git a/startup/components/globals/clientGlobals.sqf b/startup/components/globals/clientGlobals.sqf index fb731230..ca6ea37b 100644 --- a/startup/components/globals/clientGlobals.sqf +++ b/startup/components/globals/clientGlobals.sqf @@ -3,44 +3,6 @@ #include "macros.hpp" -// CAFE - Fireteam Member Markers -// Credits: Please see the CAFE online manual (https://github.com/CombinedArmsGaming/CAFE3/wiki) -//LOAD_GLOBALS(ftMemberMarkers) - LOAD_GLOBALS(squadMarkers) -// CAFE - Briefing -// Credits: Please see the CAFE online manual (https://github.com/CombinedArmsGaming/CAFE3/wiki) -//LOAD_GLOBALS(briefing) - -// CAFE - Radio Systems Support -// Credits: Please see the CAFE online manual (https://github.com/CombinedArmsGaming/CAFE3/wiki) -//LOAD_GLOBALS(radios) - -//LOAD_GLOBALS(miscClient) - LOAD_GLOBALS(miscShared) - -//LOAD_GLOBALS(respawnWaves) - -//LOAD_GLOBALS(zeus_ui) - -//LOAD_GLOBALS(downtime) - -//LOAD_GLOBALS(zenFunctions) - - -// Gravestones init -#ifdef ENABLE_GRAVESTONE_CORPSE_MANAGER - -//LOAD_GLOBALS(gravestones) - -#endif - - -// View distance editor -#ifdef ENABLE_VIEWDISTANCE_EDITOR - -//LOAD_GLOBALS(viewDistanceEditor) - -#endif diff --git a/startup/components/globals/serverGlobals.sqf b/startup/components/globals/serverGlobals.sqf index 20059de1..b41d71a1 100644 --- a/startup/components/globals/serverGlobals.sqf +++ b/startup/components/globals/serverGlobals.sqf @@ -3,30 +3,4 @@ #include "macros.hpp" -// CAFE - AI Caching -// Credits: Please see the CAFE online manual (https://github.com/CombinedArmsGaming/CAFE3/wiki) -//LOAD_GLOBALS(aiCache) - -// CAFE - Radio Systems Support -// Credits: Please see the CAFE online manual (https://github.com/CombinedArmsGaming/CAFE3/wiki) -//LOAD_GLOBALS(radios) - -//LOAD_GLOBALS(respawnWaves) - LOAD_GLOBALS(miscShared) - - -// Kill tracker init -#ifdef ENABLE_KILL_TRACKING - -//LOAD_GLOBALS(killTracker) - -#endif - - -// Gravestones init -#ifdef ENABLE_GRAVESTONE_CORPSE_MANAGER - -//LOAD_GLOBALS(gravestones) - -#endif diff --git a/startup/configuration/groups/clientConfigGroup.sqf b/startup/configuration/groups/clientConfigGroup.sqf index 95fb65ea..716e22b9 100644 --- a/startup/configuration/groups/clientConfigGroup.sqf +++ b/startup/configuration/groups/clientConfigGroup.sqf @@ -13,8 +13,5 @@ // NPC spawn scripts #include "..\..\..\configuration\spawnNpcs.sqf" -// Player respawn -#include "..\..\..\configuration\respawn.sqf" - // Squad markers #include "..\internals\squadMarkers.sqf" diff --git a/startup/configuration/internals/configMacros.hpp b/startup/configuration/internals/configMacros.hpp index ba321bff..4eb95142 100644 --- a/startup/configuration/internals/configMacros.hpp +++ b/startup/configuration/internals/configMacros.hpp @@ -15,3 +15,4 @@ #include "..\..\..\configuration\insignia.hpp" #include "..\..\..\configuration\objectScaling.hpp" #include "..\..\..\configuration\sogConfig.hpp" +#include "..\..\..\configuration\respawn.hpp" From da74fe966a6e182579f2c7b7652826dad612a8f3 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 9 Jun 2022 22:34:28 +0100 Subject: [PATCH 05/24] Now with 4 options: timed waves, personal timer, side tickets, personal tickets (ticket types stack so can have personal pool and then side-based 'overflow' pool). Respawn timer is variable-based so can be altered mid-mission. --- components/respawn/cfgRespawnTemplates.hpp | 39 ++-------- .../respawn/fn_getPlayerRespawnTime.sqf | 5 ++ components/respawn/functions.hpp | 1 + components/respawn/globals.sqf | 6 ++ components/respawn/init_component.sqf | 76 +++++++++++++++++++ .../respawn/loadout/respawnTemplates.hpp | 5 ++ components/respawn/squad/respawnTemplates.hpp | 6 ++ components/respawn/timed/macros.hpp | 1 + .../timed/onPlayerKilledOrRespawned.sqf | 12 +++ components/respawn/timed/respawnTemplates.hpp | 5 ++ components/respawn/wave/macros.hpp | 1 + .../wave/onPlayerKilledOrRespawned.sqf | 19 +++++ components/respawn/wave/respawnTemplates.hpp | 6 ++ configuration/respawn.hpp | 35 +++++---- description.ext | 13 ++-- respawn_macros.hpp | 14 ++-- startup/components/globals/clientGlobals.sqf | 2 + startup/components/globals/serverGlobals.sqf | 2 + .../components/groups/clientStartupGroup.sqf | 2 + .../components/groups/serverStartupGroup.sqf | 2 + 20 files changed, 190 insertions(+), 62 deletions(-) create mode 100644 components/respawn/fn_getPlayerRespawnTime.sqf create mode 100644 components/respawn/globals.sqf create mode 100644 components/respawn/init_component.sqf create mode 100644 components/respawn/loadout/respawnTemplates.hpp create mode 100644 components/respawn/squad/respawnTemplates.hpp create mode 100644 components/respawn/timed/macros.hpp create mode 100644 components/respawn/timed/onPlayerKilledOrRespawned.sqf create mode 100644 components/respawn/timed/respawnTemplates.hpp create mode 100644 components/respawn/wave/macros.hpp create mode 100644 components/respawn/wave/onPlayerKilledOrRespawned.sqf create mode 100644 components/respawn/wave/respawnTemplates.hpp diff --git a/components/respawn/cfgRespawnTemplates.hpp b/components/respawn/cfgRespawnTemplates.hpp index 9f86a2dc..6f5a15c8 100644 --- a/components/respawn/cfgRespawnTemplates.hpp +++ b/components/respawn/cfgRespawnTemplates.hpp @@ -1,39 +1,10 @@ class CfgRespawnTemplates { - class CAFE_Loadout - { - onPlayerRespawn = "components\respawn\loadout\onPlayerRespawn.sqf"; - isCall = 0; - }; + #include "loadout\respawnTemplates.hpp" + + #include "squad\respawnTemplates.hpp" - class CAFE_Squad - { - onPlayerKilled = "components\respawn\squad\onPlayerKilled.sqf"; - onPlayerRespawn = "components\respawn\squad\onPlayerRespawn.sqf"; - isCall = 1; - }; + #include "timed\respawnTemplates.hpp" - class CAFE_RespawnConfig_BLUFOR - { - respawnDelay = RESPAWN_DELAY_BLUFOR, - respawnOnStart = RESPAWN_AT_START_BLUFOR - }; - - class CAFE_RespawnConfig_OPFOR - { - respawnDelay = RESPAWN_DELAY_OPFOR, - respawnOnStart = RESPAWN_AT_START_OPFOR - }; - - class CAFE_RespawnConfig_INDFOR - { - respawnDelay = RESPAWN_DELAY_INDFOR, - respawnOnStart = RESPAWN_AT_START_INDFOR - }; - - class CAFE_RespawnConfig_CIVILIAN - { - respawnDelay = RESPAWN_DELAY_CIVILIAN, - respawnOnStart = RESPAWN_AT_START_CIVILIAN - }; + #include "wave\respawnTemplates.hpp" } diff --git a/components/respawn/fn_getPlayerRespawnTime.sqf b/components/respawn/fn_getPlayerRespawnTime.sqf new file mode 100644 index 00000000..5d01f351 --- /dev/null +++ b/components/respawn/fn_getPlayerRespawnTime.sqf @@ -0,0 +1,5 @@ +params ["_playerUnit", ["_fallbackDelay", 0, [0]]]; + +private _respawnVariableName = "f_var_respawnDelay_" + (playerSide call f_fnc_sideToString); + +missionNamespace getVariable [_respawnVariableName, _fallbackDelay]; \ No newline at end of file diff --git a/components/respawn/functions.hpp b/components/respawn/functions.hpp index e4f08acb..3237908b 100644 --- a/components/respawn/functions.hpp +++ b/components/respawn/functions.hpp @@ -1,4 +1,5 @@ class respawn { file = "components\respawn"; + class getPlayerRespawnTime{}; }; diff --git a/components/respawn/globals.sqf b/components/respawn/globals.sqf new file mode 100644 index 00000000..75b35bd3 --- /dev/null +++ b/components/respawn/globals.sqf @@ -0,0 +1,6 @@ +#include "macros.hpp" + +f_var_respawnDelay_blufor = RESPAWN_DELAY_BLUFOR; +f_var_respawnDelay_opfor = RESPAWN_DELAY_OPFOR; +f_var_respawnDelay_indfor = RESPAWN_DELAY_INDFOR; +f_var_respawnDelay_civ = RESPAWN_DELAY_CIVILIAN; \ No newline at end of file diff --git a/components/respawn/init_component.sqf b/components/respawn/init_component.sqf new file mode 100644 index 00000000..7492957a --- /dev/null +++ b/components/respawn/init_component.sqf @@ -0,0 +1,76 @@ +#include "macros.hpp" + +DEBUG_PRINT_LOG("initting respawn") + +if (isServer) then +{ + #ifdef RESPAWN_SIDE_TICKETS_BLUFOR + + [west, RESPAWN_SIDE_TICKETS_BLUFOR] call BIS_fnc_respawnTickets; + + #endif + + + #ifdef RESPAWN_SIDE_TICKETS_OPFOR + + [east, RESPAWN_SIDE_TICKETS_OPFOR] call BIS_fnc_respawnTickets; + + #endif + + + #ifdef RESPAWN_SIDE_TICKETS_INDFOR + + [independent, RESPAWN_SIDE_TICKETS_INDFOR] call BIS_fnc_respawnTickets; + + #endif + + + #ifdef RESPAWN_SIDE_TICKETS_CIVILIAN + + [civilian, RESPAWN_SIDE_TICKETS_CIVILIAN] call BIS_fnc_respawnTickets; + + #endif +}; + +if (hasInterface) then +{ + #ifdef RESPAWN_PLAYER_TICKETS_BLUFOR + + if (playerSide isEqualTo west) then + { + [west, RESPAWN_PLAYER_TICKETS_BLUFOR] call BIS_fnc_respawnTickets; + }; + + #endif + + + #ifdef RESPAWN_PLAYER_TICKETS_OPFOR + + if (playerSide isEqualTo east) then + { + [east, RESPAWN_PLAYER_TICKETS_OPFOR] call BIS_fnc_respawnTickets; + }; + + #endif + + + #ifdef RESPAWN_PLAYER_TICKETS_INDFOR + + if (playerSide isEqualTo independent) then + { + [independent, RESPAWN_PLAYER_TICKETS_INDFOR] call BIS_fnc_respawnTickets; + }; + + #endif + + + #ifdef RESPAWN_PLAYER_TICKETS_CIVILIAN + + if (playerSide isEqualTo civilian) then + { + [civilian, RESPAWN_PLAYER_TICKETS_CIVILIAN] call BIS_fnc_respawnTickets; + }; + + #endif + +}; diff --git a/components/respawn/loadout/respawnTemplates.hpp b/components/respawn/loadout/respawnTemplates.hpp new file mode 100644 index 00000000..1ae9f0ad --- /dev/null +++ b/components/respawn/loadout/respawnTemplates.hpp @@ -0,0 +1,5 @@ +class CAFE_Loadout +{ + onPlayerRespawn = "components\respawn\loadout\onPlayerRespawn.sqf"; + isCall = 0; +}; \ No newline at end of file diff --git a/components/respawn/squad/respawnTemplates.hpp b/components/respawn/squad/respawnTemplates.hpp new file mode 100644 index 00000000..6c3ec623 --- /dev/null +++ b/components/respawn/squad/respawnTemplates.hpp @@ -0,0 +1,6 @@ +class CAFE_Squad +{ + onPlayerKilled = "components\respawn\squad\onPlayerKilled.sqf"; + onPlayerRespawn = "components\respawn\squad\onPlayerRespawn.sqf"; + isCall = 1; +}; \ No newline at end of file diff --git a/components/respawn/timed/macros.hpp b/components/respawn/timed/macros.hpp new file mode 100644 index 00000000..5556564c --- /dev/null +++ b/components/respawn/timed/macros.hpp @@ -0,0 +1 @@ +#include "../macros.hpp" \ No newline at end of file diff --git a/components/respawn/timed/onPlayerKilledOrRespawned.sqf b/components/respawn/timed/onPlayerKilledOrRespawned.sqf new file mode 100644 index 00000000..66dead99 --- /dev/null +++ b/components/respawn/timed/onPlayerKilledOrRespawned.sqf @@ -0,0 +1,12 @@ +#include "macros.hpp" + +params [["_newUnit", objNull, [objNull]], "_oldUnit", "_respawn", "_respawnDelay"]; + +if (!isPlayer _newUnit && !isNull _newUnit) exitWith +{ + ["Attempting to use 'CAFE_Timed' on AI unit '%1' - can be used only on players.", _newUnit] call BIS_fnc_error; +}; + +_respawnDelay = [_newUnit, _respawnDelay] call f_fnc_getPlayerRespawnTime; + +setPlayerRespawnTime _respawnDelay; \ No newline at end of file diff --git a/components/respawn/timed/respawnTemplates.hpp b/components/respawn/timed/respawnTemplates.hpp new file mode 100644 index 00000000..5137024b --- /dev/null +++ b/components/respawn/timed/respawnTemplates.hpp @@ -0,0 +1,5 @@ +class CAFE_Timed +{ + onPlayerKilled = "components\respawn\timed\onPlayerKilledOrRespawned.sqf"; + onPlayerRespawn = "components\respawn\timed\onPlayerKilledOrRespawned.sqf"; +}; \ No newline at end of file diff --git a/components/respawn/wave/macros.hpp b/components/respawn/wave/macros.hpp new file mode 100644 index 00000000..5556564c --- /dev/null +++ b/components/respawn/wave/macros.hpp @@ -0,0 +1 @@ +#include "../macros.hpp" \ No newline at end of file diff --git a/components/respawn/wave/onPlayerKilledOrRespawned.sqf b/components/respawn/wave/onPlayerKilledOrRespawned.sqf new file mode 100644 index 00000000..f17f3777 --- /dev/null +++ b/components/respawn/wave/onPlayerKilledOrRespawned.sqf @@ -0,0 +1,19 @@ +#include "macros.hpp" + +params [["_newUnit", objNull, [objNull]], "_oldUnit", "_respawn", "_respawnDelay"]; + +if (!isPlayer _newUnit && !isNull _newUnit) exitWith +{ + ["Attempting to use 'CAFE_Wave' on AI unit '%1' - can be used only on players.", _newUnit] call BIS_fnc_error; +}; + +_respawnDelay = [_newUnit, _respawnDelay] call f_fnc_getPlayerRespawnTime; + +if (!alive _newUnit) then +{ + setPlayerRespawnTime (_respawnDelay + _respawnDelay - (serverTime % _respawnDelay)); +} +else +{ + setPlayerRespawnTime _respawnDelay; +}; \ No newline at end of file diff --git a/components/respawn/wave/respawnTemplates.hpp b/components/respawn/wave/respawnTemplates.hpp new file mode 100644 index 00000000..4a983987 --- /dev/null +++ b/components/respawn/wave/respawnTemplates.hpp @@ -0,0 +1,6 @@ +class CAFE_Wave +{ + onPlayerKilled = "components\respawn\wave\onPlayerKilledOrRespawned.sqf"; + onPlayerRespawn = "components\respawn\wave\onPlayerKilledOrRespawned.sqf"; + respawnTypes[] = {2,3}; +}; \ No newline at end of file diff --git a/configuration/respawn.hpp b/configuration/respawn.hpp index 60a49c72..b38e6603 100644 --- a/configuration/respawn.hpp +++ b/configuration/respawn.hpp @@ -13,19 +13,22 @@ // When a player respawns, do they get to teleport to a group of their choosing? // #define ALLOW_TELEPORT_UPON_RESPAWN - -#define RESPAWN_MODES_BLUFOR {RESPAWN_DEFAULTS(BLUFOR), RESPAWN_WAVE, RESPAWN_TICKETS} -#define RESPAWN_DELAY_BLUFOR 30 -#define RESPAWN_AT_START_BLUFOR 1 - -#define RESPAWN_MODES_OPFOR {RESPAWN_DEFAULTS(OPFOR), RESPAWN_WAVE} -#define RESPAWN_DELAY_OPFOR 10 -#define RESPAWN_AT_START_OPFOR RESPAWN_AT_START_BLUFOR - -#define RESPAWN_MODES_INDFOR {RESPAWN_DEFAULTS(INDFOR), RESPAWN_WAVE} -#define RESPAWN_DELAY_INDFOR RESPAWN_DELAY_BLUFOR -#define RESPAWN_AT_START_INDFOR RESPAWN_AT_START_BLUFOR - -#define RESPAWN_MODES_CIVILIAN {RESPAWN_DEFAULTS(CIVILIAN)} -#define RESPAWN_DELAY_CIVILIAN 5 -#define RESPAWN_AT_START_CIVILIAN RESPAWN_AT_START_BLUFOR \ No newline at end of file +#define RESPAWN_MODE_BLUFOR RESPAWN_MODE_TIMED +#define RESPAWN_DELAY_BLUFOR 30 +#define RESPAWN_SIDE_TICKETS_BLUFOR 30 +#define RESPAWN_PLAYER_TICKETS_BLUFOR 2 + +#define RESPAWN_MODE_OPFOR {RESPAWN_DEFAULTS, RESPAWN_TIMED_WAVE} +#define RESPAWN_DELAY_OPFOR 10 +#define RESPAWN_SIDE_TICKETS_OPFOR 30 +#define RESPAWN_PLAYER_TICKETS_OPFOR 2 + +#define RESPAWN_MODE_INDFOR {RESPAWN_DEFAULTS, RESPAWN_TIMED_WAVE} +#define RESPAWN_DELAY_INDFOR RESPAWN_DELAY_BLUFOR +#define RESPAWN_SIDE_TICKETS_INDFOR 30 +#define RESPAWN_PLAYER_TICKETS_INDFOR 2 + +#define RESPAWN_MODE_CIVILIAN {RESPAWN_DEFAULTS} +#define RESPAWN_DELAY_CIVILIAN 5 +#define RESPAWN_SIDE_TICKETS_CIVILIAN 30 +#define RESPAWN_PLAYER_TICKETS_CIVILIAN 2 \ No newline at end of file diff --git a/description.ext b/description.ext index 4f05c4d7..5cd9dc86 100644 --- a/description.ext +++ b/description.ext @@ -48,12 +48,15 @@ enableDebugConsole = 1; // CAFE - Respawn Settings respawn = "BASE"; -respawnDialog = 1; +respawnDialog = 0; -respawnTemplatesWest[] = RESPAWN_MODES_BLUFOR; -respawnTemplatesEast[] = RESPAWN_MODES_OPFOR; -respawnTemplatesGuer[] = RESPAWN_MODES_INDFOR; -respawnTemplatesCiv[] = RESPAWN_MODES_CIVILIAN; +respawnDelay = 10; +respawnOnStart = 0; + +respawnTemplatesWest[] = RESPAWN_MODE_BLUFOR; +respawnTemplatesEast[] = RESPAWN_MODE_OPFOR; +respawnTemplatesGuer[] = RESPAWN_MODE_INDFOR; +respawnTemplatesCiv[] = RESPAWN_MODE_CIVILIAN; // CAFE - Respawn system includes. diff --git a/respawn_macros.hpp b/respawn_macros.hpp index 8ade1f37..3f796f7d 100644 --- a/respawn_macros.hpp +++ b/respawn_macros.hpp @@ -1,12 +1,12 @@ -#define RESPAWN_WAVE "Wave" +#define RESPAWN_TIMED_WAVE "CAFE_Wave" #define RESPAWN_TICKETS "Tickets" +#define RESPAWN_TIMED "CAFE_Timed" -#define RESPAWN_MODE_TIMED {"MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TIMED_WAVES {"MenuPosition", "Spectator", "Wave", "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TIMED_WAVES {"MenuPosition", "Spectator", "Wave", "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED {"MenuPosition", "Spectator", RESPAWN_TIMED, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TICKETS {"MenuPosition", "Spectator", RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES_TICKETS {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_DEFAULTS(SIDE) STRING(CONCAT(CAFE_RespawnConfig_,SIDE)), "MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad" - -#define RESPAWN_MODES(SIDE) CONCAT(RESPAWN_ARRAY_,SIDE) +#define RESPAWN_DEFAULTS "MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad" #define DEFAULT_RESPAWN_ARRAY {RESPAWN_DEFAULTS} \ No newline at end of file diff --git a/startup/components/globals/clientGlobals.sqf b/startup/components/globals/clientGlobals.sqf index ca6ea37b..bac28cb6 100644 --- a/startup/components/globals/clientGlobals.sqf +++ b/startup/components/globals/clientGlobals.sqf @@ -6,3 +6,5 @@ LOAD_GLOBALS(squadMarkers) LOAD_GLOBALS(miscShared) + +LOAD_GLOBALS(respawn) \ No newline at end of file diff --git a/startup/components/globals/serverGlobals.sqf b/startup/components/globals/serverGlobals.sqf index b41d71a1..a72cd7b2 100644 --- a/startup/components/globals/serverGlobals.sqf +++ b/startup/components/globals/serverGlobals.sqf @@ -4,3 +4,5 @@ #include "macros.hpp" LOAD_GLOBALS(miscShared) + +LOAD_GLOBALS(respawn) diff --git a/startup/components/groups/clientStartupGroup.sqf b/startup/components/groups/clientStartupGroup.sqf index 78489c53..9ffc41e7 100644 --- a/startup/components/groups/clientStartupGroup.sqf +++ b/startup/components/groups/clientStartupGroup.sqf @@ -26,6 +26,8 @@ INIT_COMPONENT(downtime) INIT_COMPONENT(zenFunctions) +INIT_COMPONENT(respawn) + // Gravestones init #ifdef ENABLE_GRAVESTONE_CORPSE_MANAGER diff --git a/startup/components/groups/serverStartupGroup.sqf b/startup/components/groups/serverStartupGroup.sqf index c38a683a..5018c017 100644 --- a/startup/components/groups/serverStartupGroup.sqf +++ b/startup/components/groups/serverStartupGroup.sqf @@ -16,6 +16,8 @@ INIT_COMPONENT(radios) INIT_COMPONENT(miscShared) +INIT_COMPONENT(respawn) + // Kill tracker init #ifdef ENABLE_KILL_TRACKING From e6e541e8159324af3476c18a34f4672787a89630 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 9 Jun 2022 22:37:27 +0100 Subject: [PATCH 06/24] imagine no tab indents --- configuration/respawn.hpp | 32 ++++++++++++++++---------------- respawn_macros.hpp | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/configuration/respawn.hpp b/configuration/respawn.hpp index b38e6603..f6e7abd1 100644 --- a/configuration/respawn.hpp +++ b/configuration/respawn.hpp @@ -13,22 +13,22 @@ // When a player respawns, do they get to teleport to a group of their choosing? // #define ALLOW_TELEPORT_UPON_RESPAWN -#define RESPAWN_MODE_BLUFOR RESPAWN_MODE_TIMED -#define RESPAWN_DELAY_BLUFOR 30 -#define RESPAWN_SIDE_TICKETS_BLUFOR 30 -#define RESPAWN_PLAYER_TICKETS_BLUFOR 2 +#define RESPAWN_MODE_BLUFOR RESPAWN_MODE_TIMED +#define RESPAWN_DELAY_BLUFOR 30 +#define RESPAWN_SIDE_TICKETS_BLUFOR 30 +#define RESPAWN_PLAYER_TICKETS_BLUFOR 2 -#define RESPAWN_MODE_OPFOR {RESPAWN_DEFAULTS, RESPAWN_TIMED_WAVE} -#define RESPAWN_DELAY_OPFOR 10 -#define RESPAWN_SIDE_TICKETS_OPFOR 30 -#define RESPAWN_PLAYER_TICKETS_OPFOR 2 +#define RESPAWN_MODE_OPFOR {RESPAWN_DEFAULTS, RESPAWN_TIMED_WAVE} +#define RESPAWN_DELAY_OPFOR 10 +#define RESPAWN_SIDE_TICKETS_OPFOR 30 +#define RESPAWN_PLAYER_TICKETS_OPFOR 2 -#define RESPAWN_MODE_INDFOR {RESPAWN_DEFAULTS, RESPAWN_TIMED_WAVE} -#define RESPAWN_DELAY_INDFOR RESPAWN_DELAY_BLUFOR -#define RESPAWN_SIDE_TICKETS_INDFOR 30 -#define RESPAWN_PLAYER_TICKETS_INDFOR 2 +#define RESPAWN_MODE_INDFOR {RESPAWN_DEFAULTS, RESPAWN_TIMED_WAVE} +#define RESPAWN_DELAY_INDFOR RESPAWN_DELAY_BLUFOR +#define RESPAWN_SIDE_TICKETS_INDFOR 30 +#define RESPAWN_PLAYER_TICKETS_INDFOR 2 -#define RESPAWN_MODE_CIVILIAN {RESPAWN_DEFAULTS} -#define RESPAWN_DELAY_CIVILIAN 5 -#define RESPAWN_SIDE_TICKETS_CIVILIAN 30 -#define RESPAWN_PLAYER_TICKETS_CIVILIAN 2 \ No newline at end of file +#define RESPAWN_MODE_CIVILIAN {RESPAWN_DEFAULTS} +#define RESPAWN_DELAY_CIVILIAN 5 +#define RESPAWN_SIDE_TICKETS_CIVILIAN 30 +#define RESPAWN_PLAYER_TICKETS_CIVILIAN 2 \ No newline at end of file diff --git a/respawn_macros.hpp b/respawn_macros.hpp index 3f796f7d..bb1930af 100644 --- a/respawn_macros.hpp +++ b/respawn_macros.hpp @@ -2,10 +2,10 @@ #define RESPAWN_TICKETS "Tickets" #define RESPAWN_TIMED "CAFE_Timed" -#define RESPAWN_MODE_TIMED {"MenuPosition", "Spectator", RESPAWN_TIMED, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TIMED_WAVES {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TICKETS {"MenuPosition", "Spectator", RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TIMED_WAVES_TICKETS {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED {"MenuPosition", "Spectator", RESPAWN_TIMED, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TICKETS {"MenuPosition", "Spectator", RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES_TICKETS {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} #define RESPAWN_DEFAULTS "MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad" From c3e719f113737e8bf0023354638417f805853c6e Mon Sep 17 00:00:00 2001 From: Bubbus Date: Sun, 19 Jun 2022 19:48:58 +0100 Subject: [PATCH 07/24] Added legacy triggered-waves mode w/ UI and tickets compat. Fixed personal-tickets allowance. other lil bits --- .../fn_addSquadManagerActionsToClass.sqf | 20 ++ components/respawn/cfgRespawnTemplates.hpp | 2 + components/respawn/fn_addFreeTicket.sqf | 4 + ...nTime.sqf => fn_getPlayerRespawnDelay.sqf} | 0 components/respawn/fn_isRespawnModeActive.sqf | 6 + components/respawn/functions.hpp | 18 +- components/respawn/init_component.sqf | 96 ++++++++-- .../timed/onPlayerKilledOrRespawned.sqf | 2 +- .../fn_canTriggerRespawnWave.sqf | 8 + .../fn_getRespawnTimestampForTarget.sqf | 37 ++++ .../fn_getSideRespawnDelayForTarget.sqf | 24 +++ .../triggeredWave/fn_triggerRespawnWave.sqf | 37 ++++ .../fn_tryTriggerRespawnWave.sqf | 9 + components/respawn/triggeredWave/macros.hpp | 2 + .../respawn/triggeredWave/onPlayerKilled.sqf | 24 +++ .../triggeredWave/respawnTemplates.hpp | 5 + .../respawn/triggeredWave/ui/macros.hpp | 1 + .../triggeredWave/ui/triggeredWaveDialog.hpp | 127 +++++++++++++ .../fn_triggeredWaveDialog_populateDialog.sqf | 179 ++++++++++++++++++ .../triggeredWave/ui_functions/macros.hpp | 1 + .../respawn/triggeredWave/ui_macros.hpp | 6 + .../wave/onPlayerKilledOrRespawned.sqf | 2 +- configuration/respawn.hpp | 5 +- dialogs.hpp | 1 + macros.hpp | 1 + respawn_macros.hpp | 13 +- 26 files changed, 606 insertions(+), 24 deletions(-) create mode 100644 components/respawn/fn_addFreeTicket.sqf rename components/respawn/{fn_getPlayerRespawnTime.sqf => fn_getPlayerRespawnDelay.sqf} (100%) create mode 100644 components/respawn/fn_isRespawnModeActive.sqf create mode 100644 components/respawn/triggeredWave/fn_canTriggerRespawnWave.sqf create mode 100644 components/respawn/triggeredWave/fn_getRespawnTimestampForTarget.sqf create mode 100644 components/respawn/triggeredWave/fn_getSideRespawnDelayForTarget.sqf create mode 100644 components/respawn/triggeredWave/fn_triggerRespawnWave.sqf create mode 100644 components/respawn/triggeredWave/fn_tryTriggerRespawnWave.sqf create mode 100644 components/respawn/triggeredWave/macros.hpp create mode 100644 components/respawn/triggeredWave/onPlayerKilled.sqf create mode 100644 components/respawn/triggeredWave/respawnTemplates.hpp create mode 100644 components/respawn/triggeredWave/ui/macros.hpp create mode 100644 components/respawn/triggeredWave/ui/triggeredWaveDialog.hpp create mode 100644 components/respawn/triggeredWave/ui_functions/fn_triggeredWaveDialog_populateDialog.sqf create mode 100644 components/respawn/triggeredWave/ui_functions/macros.hpp create mode 100644 components/respawn/triggeredWave/ui_macros.hpp diff --git a/components/aceActions/fn_addSquadManagerActionsToClass.sqf b/components/aceActions/fn_addSquadManagerActionsToClass.sqf index c1257f23..17d8be59 100644 --- a/components/aceActions/fn_addSquadManagerActionsToClass.sqf +++ b/components/aceActions/fn_addSquadManagerActionsToClass.sqf @@ -27,6 +27,26 @@ _createSquadNode = _children = []; + // Respawn menu action + _action = + [ + "CAFE_RespawnMenu", + "Show Respawn Menu", + "\A3\ui_f\data\igui\cfg\simpleTasks\types\getin_ca.paa", + {createDialog "CAFE_TriggerRespawnWave_Dialog";}, + {_player getVariable ["f_var_canUseRespawnMenu", false]}, + {}, + [], + "", + 20, + [false,false,false,false,false], + {} + ]; + + _action call ace_interact_menu_fnc_createAction; + + _children pushBack [_action, [], _target]; + // Squad marker menu action _action = diff --git a/components/respawn/cfgRespawnTemplates.hpp b/components/respawn/cfgRespawnTemplates.hpp index 6f5a15c8..9d4f6300 100644 --- a/components/respawn/cfgRespawnTemplates.hpp +++ b/components/respawn/cfgRespawnTemplates.hpp @@ -7,4 +7,6 @@ class CfgRespawnTemplates #include "timed\respawnTemplates.hpp" #include "wave\respawnTemplates.hpp" + + #include "triggeredWave\respawnTemplates.hpp" } diff --git a/components/respawn/fn_addFreeTicket.sqf b/components/respawn/fn_addFreeTicket.sqf new file mode 100644 index 00000000..e68c4542 --- /dev/null +++ b/components/respawn/fn_addFreeTicket.sqf @@ -0,0 +1,4 @@ +if (!alive player) then +{ + [player, 1] call BIS_fnc_respawnTickets; +}; \ No newline at end of file diff --git a/components/respawn/fn_getPlayerRespawnTime.sqf b/components/respawn/fn_getPlayerRespawnDelay.sqf similarity index 100% rename from components/respawn/fn_getPlayerRespawnTime.sqf rename to components/respawn/fn_getPlayerRespawnDelay.sqf diff --git a/components/respawn/fn_isRespawnModeActive.sqf b/components/respawn/fn_isRespawnModeActive.sqf new file mode 100644 index 00000000..4f714fbc --- /dev/null +++ b/components/respawn/fn_isRespawnModeActive.sqf @@ -0,0 +1,6 @@ +params ["_respawnModeName", ["_side", playerSide]]; + +private _respawnTemplates = getArray (missionConfigFile >> ("respawnTemplates" + (str _side))); +private _respawnModePresent = (_respawnTemplates findIf {_x isEqualTo _respawnModeName}) >= 0; + +_respawnModePresent \ No newline at end of file diff --git a/components/respawn/functions.hpp b/components/respawn/functions.hpp index 3237908b..ebee7542 100644 --- a/components/respawn/functions.hpp +++ b/components/respawn/functions.hpp @@ -1,5 +1,21 @@ class respawn { file = "components\respawn"; - class getPlayerRespawnTime{}; + class addFreeTicket{}; + class getPlayerRespawnDelay{}; + class isRespawnModeActive{}; +}; +class respawn_triggeredWave +{ + file = "components\respawn\triggeredWave"; + class canTriggerRespawnWave{}; + class getRespawnTimestampForTarget{}; + class getSideRespawnDelayForTarget{}; + class triggerRespawnWave{}; + class tryTriggerRespawnWave{}; +}; +class respawn_triggeredWave_ui +{ + file = "components\respawn\triggeredWave\ui_functions"; + class triggeredWaveDialog_populateDialog{}; }; diff --git a/components/respawn/init_component.sqf b/components/respawn/init_component.sqf index 7492957a..9c3c781a 100644 --- a/components/respawn/init_component.sqf +++ b/components/respawn/init_component.sqf @@ -5,31 +5,53 @@ DEBUG_PRINT_LOG("initting respawn") if (isServer) then { #ifdef RESPAWN_SIDE_TICKETS_BLUFOR - [west, RESPAWN_SIDE_TICKETS_BLUFOR] call BIS_fnc_respawnTickets; - #endif - #ifdef RESPAWN_SIDE_TICKETS_OPFOR - [east, RESPAWN_SIDE_TICKETS_OPFOR] call BIS_fnc_respawnTickets; - - #endif - + #endif #ifdef RESPAWN_SIDE_TICKETS_INDFOR - [independent, RESPAWN_SIDE_TICKETS_INDFOR] call BIS_fnc_respawnTickets; + #endif + + #ifdef RESPAWN_SIDE_TICKETS_CIVILIAN + [civilian, RESPAWN_SIDE_TICKETS_CIVILIAN] call BIS_fnc_respawnTickets; + #endif + + #ifdef RESPAWN_DELAY_BLUFOR + f_var_respawnDelay_blufor = RESPAWN_DELAY_BLUFOR; + #else + f_var_respawnDelay_blufor = 0; #endif + #ifdef RESPAWN_DELAY_OPFOR + f_var_respawnDelay_opfor = RESPAWN_DELAY_OPFOR; + #else + f_var_respawnDelay_opfor = 0; + #endif - #ifdef RESPAWN_SIDE_TICKETS_CIVILIAN + #ifdef RESPAWN_DELAY_INDFOR + f_var_respawnDelay_indfor = RESPAWN_DELAY_INDFOR; + #else + f_var_respawnDelay_indfor = 0; + #endif + + #ifdef RESPAWN_DELAY_CIVILIAN + f_var_respawnDelay_civilian = RESPAWN_DELAY_CIVILIAN; + #else + f_var_respawnDelay_civilian = 0; + #endif - [civilian, RESPAWN_SIDE_TICKETS_CIVILIAN] call BIS_fnc_respawnTickets; + #ifdef RESPAWN_WAVE_DURATION + f_var_respawnDuration = RESPAWN_WAVE_DURATION; + #else + f_var_respawnDuration = 0; #endif + }; if (hasInterface) then @@ -38,7 +60,7 @@ if (hasInterface) then if (playerSide isEqualTo west) then { - [west, RESPAWN_PLAYER_TICKETS_BLUFOR] call BIS_fnc_respawnTickets; + [player, RESPAWN_PLAYER_TICKETS_BLUFOR] call BIS_fnc_respawnTickets; }; #endif @@ -48,7 +70,7 @@ if (hasInterface) then if (playerSide isEqualTo east) then { - [east, RESPAWN_PLAYER_TICKETS_OPFOR] call BIS_fnc_respawnTickets; + [player, RESPAWN_PLAYER_TICKETS_OPFOR] call BIS_fnc_respawnTickets; }; #endif @@ -58,7 +80,7 @@ if (hasInterface) then if (playerSide isEqualTo independent) then { - [independent, RESPAWN_PLAYER_TICKETS_INDFOR] call BIS_fnc_respawnTickets; + [player, RESPAWN_PLAYER_TICKETS_INDFOR] call BIS_fnc_respawnTickets; }; #endif @@ -68,9 +90,55 @@ if (hasInterface) then if (playerSide isEqualTo civilian) then { - [civilian, RESPAWN_PLAYER_TICKETS_CIVILIAN] call BIS_fnc_respawnTickets; + [player, RESPAWN_PLAYER_TICKETS_CIVILIAN] call BIS_fnc_respawnTickets; }; #endif + + // Keep updating player side in a var case selectPlayer or rating loss causes playerSide != side player. + f_fnc_updatePlayerSideVar = + { + player setVariable ["f_var_playerSide", playerSide, true]; + + [ + // Script + f_fnc_updatePlayerSideVar, + + // Arguments + [], + + // Delay (secs) + 5 + + ] call CBA_fnc_waitAndExecute; + }; + + [] call f_fnc_updatePlayerSideVar; + + + f_fnc_updateCanUseRespawnMenu = + { + private _canRespawn = + ((leader group player) isEqualTo player) or + {serverCommandAvailable '#kick'} or + {player getVariable ["f_var_isZeus", false]}; + + player setVariable ["f_var_canUseRespawnMenu", _canRespawn]; + + [ + // Script + f_fnc_updateCanUseRespawnMenu, + + // Arguments + [], + + // Delay (secs) + 5 + + ] call CBA_fnc_waitAndExecute; + }; + + [] call f_fnc_updateCanUseRespawnMenu; + }; diff --git a/components/respawn/timed/onPlayerKilledOrRespawned.sqf b/components/respawn/timed/onPlayerKilledOrRespawned.sqf index 66dead99..31a7bc20 100644 --- a/components/respawn/timed/onPlayerKilledOrRespawned.sqf +++ b/components/respawn/timed/onPlayerKilledOrRespawned.sqf @@ -7,6 +7,6 @@ if (!isPlayer _newUnit && !isNull _newUnit) exitWith ["Attempting to use 'CAFE_Timed' on AI unit '%1' - can be used only on players.", _newUnit] call BIS_fnc_error; }; -_respawnDelay = [_newUnit, _respawnDelay] call f_fnc_getPlayerRespawnTime; +_respawnDelay = [_newUnit, _respawnDelay] call f_fnc_getPlayerRespawnDelay; setPlayerRespawnTime _respawnDelay; \ No newline at end of file diff --git a/components/respawn/triggeredWave/fn_canTriggerRespawnWave.sqf b/components/respawn/triggeredWave/fn_canTriggerRespawnWave.sqf new file mode 100644 index 00000000..5503ff5a --- /dev/null +++ b/components/respawn/triggeredWave/fn_canTriggerRespawnWave.sqf @@ -0,0 +1,8 @@ +#include "macros.hpp" + +params ["_target"]; + +private _timestamp = [_target] call f_fnc_getRespawnTimestampForTarget; +private _sideRespawnDelay = [_target] call f_fnc_getSideRespawnDelayForTarget; + +(CBA_missionTime >= (_timestamp + _sideRespawnDelay)) \ No newline at end of file diff --git a/components/respawn/triggeredWave/fn_getRespawnTimestampForTarget.sqf b/components/respawn/triggeredWave/fn_getRespawnTimestampForTarget.sqf new file mode 100644 index 00000000..0bc9785e --- /dev/null +++ b/components/respawn/triggeredWave/fn_getRespawnTimestampForTarget.sqf @@ -0,0 +1,37 @@ +params ["_target"]; + +private _timestamps = []; + +switch (toLower typeName _target) do +{ + case "object": + { + private _playerTimestamp = _target getVariable ["f_var_respawnTimestamp", 0]; + _timestamps pushBack _playerTimestamp; + + private _groupTimestamp = (group _target) getVariable ["f_var_respawnTimestamp", 0]; + _timestamps pushBack _groupTimestamp; + + private _side = _target getVariable ["f_var_playerSide", side _target]; + private _sideStr = [_side] call f_fnc_sideToString; + private _sideTimestamp = missionNamespace getVariable ["f_var_respawnTimestamp_" + _sideStr, 0]; + _timestamps pushBack _sideTimestamp; + }; + case "group": + { + private _groupTimestamp = _target getVariable ["f_var_respawnTimestamp", 0]; + _timestamps pushBack _groupTimestamp; + + private _sideStr = [side _target] call f_fnc_sideToString; + private _sideTimestamp = missionNamespace getVariable ["f_var_respawnTimestamp_" + _sideStr, 0]; + _timestamps pushBack _sideTimestamp; + }; + case "side": + { + private _sideStr = [_target] call f_fnc_sideToString; + private _sideTimestamp = missionNamespace getVariable ["f_var_respawnTimestamp_" + _sideStr, 0]; + _timestamps pushBack _sideTimestamp; + }; +}; + +selectMax _timestamps \ No newline at end of file diff --git a/components/respawn/triggeredWave/fn_getSideRespawnDelayForTarget.sqf b/components/respawn/triggeredWave/fn_getSideRespawnDelayForTarget.sqf new file mode 100644 index 00000000..85c29a60 --- /dev/null +++ b/components/respawn/triggeredWave/fn_getSideRespawnDelayForTarget.sqf @@ -0,0 +1,24 @@ +#include "macros.hpp" + +params ["_target"]; + +private _side = switch (toLower typeName _target) do +{ + case "object": + { + _target getVariable ["f_var_playerSide", side _target] + }; + case "group": + { + side _target + }; + case "side": + { + _target + }; +}; + +private _sideStr = [_side] call f_fnc_sideToString; +private _sideRespawnDelay = missionNamespace getVariable ["f_var_respawnDelay_" + _sideStr, 0]; + +_sideRespawnDelay \ No newline at end of file diff --git a/components/respawn/triggeredWave/fn_triggerRespawnWave.sqf b/components/respawn/triggeredWave/fn_triggerRespawnWave.sqf new file mode 100644 index 00000000..de26e0f5 --- /dev/null +++ b/components/respawn/triggeredWave/fn_triggerRespawnWave.sqf @@ -0,0 +1,37 @@ +#include "macros.hpp" + +params ["_target", "_isFree"]; + +private _respawnTimestamp = CBA_missionTime + RESPAWN_WAVE_DURATION; +private _targetName = ""; + +if (_isFree) then +{ + [] remoteExec ["f_fnc_addFreeTicket", _target]; +}; + +switch (toLower typeName _target) do +{ + case "object": + { + _target setVariable ["f_var_respawnTimestamp", _respawnTimestamp, true]; + _targetName = name _target; + }; + case "group": + { + _target setVariable ["f_var_respawnTimestamp", _respawnTimestamp, true]; + _targetName = groupId _target; + }; + case "side": + { + private _sideStr = [_target] call f_fnc_sideToString; + missionNamespace setVariable ["f_var_respawnTimestamp_" + _sideStr, _respawnTimestamp, true]; + _targetName = toUpper _sideStr; + }; +}; + + +private _timeStr = [RESPAWN_WAVE_DURATION] call f_fnc_formatTimeDuration; +private _notifyString = format ["Respawn wave called for %1 (for the next %2)!", _targetName, _timeStr]; + +[_notifyString] remoteExecCall ["systemChat", _target]; \ No newline at end of file diff --git a/components/respawn/triggeredWave/fn_tryTriggerRespawnWave.sqf b/components/respawn/triggeredWave/fn_tryTriggerRespawnWave.sqf new file mode 100644 index 00000000..251d8c28 --- /dev/null +++ b/components/respawn/triggeredWave/fn_tryTriggerRespawnWave.sqf @@ -0,0 +1,9 @@ +#include "macros.hpp" + +params ["_target", "_isFree"]; + +if !([_target] call f_fnc_canTriggerRespawnWave) exitWith { false }; + +_this call f_fnc_triggerRespawnWave; + +true \ No newline at end of file diff --git a/components/respawn/triggeredWave/macros.hpp b/components/respawn/triggeredWave/macros.hpp new file mode 100644 index 00000000..9918c7f9 --- /dev/null +++ b/components/respawn/triggeredWave/macros.hpp @@ -0,0 +1,2 @@ +#include "../macros.hpp" +#include "ui_macros.hpp" \ No newline at end of file diff --git a/components/respawn/triggeredWave/onPlayerKilled.sqf b/components/respawn/triggeredWave/onPlayerKilled.sqf new file mode 100644 index 00000000..5f8a2aa1 --- /dev/null +++ b/components/respawn/triggeredWave/onPlayerKilled.sqf @@ -0,0 +1,24 @@ +#include "macros.hpp" + +params [["_newUnit", objNull, [objNull]], "_oldUnit", "_respawn", "_respawnDelay"]; + +if (!isPlayer _newUnit && !isNull _newUnit) exitWith +{ + ["Attempting to use 'CAFE_TriggeredWave' on AI unit '%1' - can be used only on players.", _newUnit] call BIS_fnc_error; +}; + +setPlayerRespawnTime 1e10; + +// Wait until wave is triggered or player is alive. Re-enable respawn for local player in either case. +[ + // Condition + { + (alive player) or {([player] call f_fnc_getRespawnTimestampForTarget) >= CBA_missionTime} + }, + + // Script + { + setPlayerRespawnTime 1; + } + +] call CBA_fnc_waitUntilAndExecute; \ No newline at end of file diff --git a/components/respawn/triggeredWave/respawnTemplates.hpp b/components/respawn/triggeredWave/respawnTemplates.hpp new file mode 100644 index 00000000..aab1862f --- /dev/null +++ b/components/respawn/triggeredWave/respawnTemplates.hpp @@ -0,0 +1,5 @@ +class CAFE_TriggeredWave +{ + onPlayerKilled = "components\respawn\triggeredWave\onPlayerKilled.sqf"; + respawnTypes[] = {2,3}; +}; \ No newline at end of file diff --git a/components/respawn/triggeredWave/ui/macros.hpp b/components/respawn/triggeredWave/ui/macros.hpp new file mode 100644 index 00000000..c3630e65 --- /dev/null +++ b/components/respawn/triggeredWave/ui/macros.hpp @@ -0,0 +1 @@ +#include "../macros.hpp" diff --git a/components/respawn/triggeredWave/ui/triggeredWaveDialog.hpp b/components/respawn/triggeredWave/ui/triggeredWaveDialog.hpp new file mode 100644 index 00000000..b2b80b20 --- /dev/null +++ b/components/respawn/triggeredWave/ui/triggeredWaveDialog.hpp @@ -0,0 +1,127 @@ +#include "../ui_macros.hpp" + +class CAFE_TriggerRespawnWave_Dialog +{ + idd = IDD_SQUADMARKER_DIALOG; + enableSimulation = 1; + enableDisplay = 1; + + onLoad = "_this call f_fnc_triggeredWaveDialog_populateDialog;"; + + class ControlsBackground + { + class RscText_1000: CAFE_DefaultText + { + idc = 1000; + x = 13 * GUI_GRID_W + GUI_GRID_X; + y = 4 * GUI_GRID_H + GUI_GRID_Y; + w = 14 * GUI_GRID_W; + h = 14.5 * GUI_GRID_H; + colorBackground[] = {0,0,0,0.5}; + }; + + class RscText_1006: CAFE_DefaultText + { + idc = 1006; + x = 13 * GUI_GRID_W + GUI_GRID_X; + y = 19 * GUI_GRID_H + GUI_GRID_Y; + w = 14 * GUI_GRID_W; + h = 2.5 * GUI_GRID_H; + colorBackground[] = {0,0,0,0.5}; + }; + + class RscText_1007: CAFE_DefaultText + { + idc = 1007; + text = "Experimental respawn wave dialog. Any feedback? Tell Bubbus."; + x = 13 * GUI_GRID_W + GUI_GRID_X; + y = 22 * GUI_GRID_H + GUI_GRID_Y; + w = 14 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + colorBackground[] = {0,0,0,0.5}; + sizeEx = 0.6 * GUI_GRID_H; + }; + + }; + + + class Controls + { + class CAFE_TriggeredWave_Title: CAFE_DefaultText + { + idc = 1001; + text = "Respawn Menu."; + x = 13.5 * GUI_GRID_W + GUI_GRID_X; + y = 4.5 * GUI_GRID_H + GUI_GRID_Y; + w = 8 * GUI_GRID_W; + h = 2 * GUI_GRID_H; + sizeEx = 1.3 * GUI_GRID_H; + }; + + class CAFE_TriggeredWave_TicketsLeftTitle: CAFE_DefaultText + { + idc = 1002; + text = "Tickets left:"; + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 5.5 * GUI_GRID_H + GUI_GRID_Y; + w = 4 * GUI_GRID_W; + h = 2.5 * GUI_GRID_H; + sizeEx = 0.7 * GUI_GRID_H; + }; + + class CAFE_TriggeredWave_TicketsLeftText: CAFE_DefaultText + { + idc = IDC_TRIGGEREDWAVE_DIALOG_TICKETSLEFT; + text = ""; + x = 17.5 * GUI_GRID_W + GUI_GRID_X; + y = 5.5 * GUI_GRID_H + GUI_GRID_Y; + w = 4 * GUI_GRID_W; + h = 2.5 * GUI_GRID_H; + sizeEx = 0.7 * GUI_GRID_H; + }; + + class RscText_1005: CAFE_DefaultText + { + idc = IDC_TRIGGEREDWAVE_DIALOG_PLAYERSTITLE; + text = "Waiting players:"; + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 6.5 * GUI_GRID_H + GUI_GRID_Y; + w = 11.5 * GUI_GRID_W; + h = 3 * GUI_GRID_H; + sizeEx = 0.8 * GUI_GRID_H; + }; + + class CAFE_TriggeredWave_PlayerList: CAFE_DefaultListBox + { + idc = IDC_TRIGGEREDWAVE_DIALOG_PLAYERLIST; + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 8.5 * GUI_GRID_H + GUI_GRID_Y; + w = 12 * GUI_GRID_W; + h = 9 * GUI_GRID_H; + }; + + class CAFE_TriggeredWave_RespawnButton: CAFE_DefaultButton + { + idc = IDC_TRIGGEREDWAVE_DIALOG_RESPAWNBUTTON; + text = "Respawn Players"; + x = 17.5 * GUI_GRID_W + GUI_GRID_X; + y = 19.5 * GUI_GRID_H + GUI_GRID_Y; + w = 9 * GUI_GRID_W; + h = 1.5 * GUI_GRID_H; + onButtonClick = "[playerSide] call f_fnc_tryTriggerRespawnWave"; + }; + + class CAFE_TriggeredWave_CloseButton: CAFE_DefaultButton + { + idc = 1601; + text = "Close"; + x = 13.5 * GUI_GRID_W + GUI_GRID_X; + y = 19.5 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1.5 * GUI_GRID_H; + onButtonClick = "closeDialog 1"; + }; + + }; + +}; diff --git a/components/respawn/triggeredWave/ui_functions/fn_triggeredWaveDialog_populateDialog.sqf b/components/respawn/triggeredWave/ui_functions/fn_triggeredWaveDialog_populateDialog.sqf new file mode 100644 index 00000000..b1dd735e --- /dev/null +++ b/components/respawn/triggeredWave/ui_functions/fn_triggeredWaveDialog_populateDialog.sqf @@ -0,0 +1,179 @@ +#include "macros.hpp" + +disableSerialization; + +params ["_display"]; + +private _ticketsEnabled = [RESPAWN_TICKETS] call f_fnc_isRespawnModeActive; + +if (_ticketsEnabled) then +{ + private _playersTitle = _display displayCtrl IDC_TRIGGEREDWAVE_DIALOG_PLAYERSTITLE; + + _playersTitle ctrlSetText "Players (+ personal tickets):"; +}; + + +f_fnc_triggeredWaveDialog_isPlayerRespawnable = +{ + private _playerSide = _x getVariable ["f_var_playerSide", side _x]; + (_playerSide isEqualTo playerSide) and {!alive _x} +}; + + +// Populate player list +f_fnc_triggeredWaveDialog_populatePlayerList = +{ + params ["_display", "_ticketsEnabled"]; + + private _playerList = _display displayCtrl IDC_TRIGGEREDWAVE_DIALOG_PLAYERLIST; + + lbClear _playerList; + + { + private _playerText = name _x; + + if (_ticketsEnabled) then + { + private _playerTickets = [_x] call BIS_fnc_respawnTickets; + + if (_playerTickets > 0) then + { + _playerText = format ["%1 (%2)", _playerText, _playerTickets]; + }; + }; + + _playerList lbAdd _playerText; + + } forEach (allPlayers select f_fnc_triggeredWaveDialog_isPlayerRespawnable); + +}; + + + +// Populate ticket count +f_fnc_triggeredWaveDialog_populateTicketCount = +{ + params ["_display", "_ticketsEnabled"]; + + private _ticketsText = _display displayCtrl IDC_TRIGGEREDWAVE_DIALOG_TICKETSLEFT; + + if !(_ticketsEnabled) exitWith + { + _ticketsText ctrlSetTextColor [0.7, 0.7, 0.7, 1]; + _ticketsText ctrlSetFont "RobotoCondensedLight"; + _ticketsText ctrlSetText "(disabled)"; + }; + + _ticketsText ctrlSetTextColor [1, 1, 1, 1]; + _ticketsText ctrlSetFont "RobotoCondensed"; + + private _ticketsForSide = [playerSide] call BIS_fnc_respawnTickets; + private _sideAsReadable = [playerSide] call f_fnc_sideToString; + private _ticketsAsText = format ["%1 (%2)", _ticketsForSide, toUpper _sideAsReadable]; + + _ticketsText ctrlSetText _ticketsAsText; + +}; + + + +// Manage the state and tooltip of the respawn button. +f_fnc_triggeredWaveDialog_manageRespawnButton = +{ + params ["_display", "_ticketsEnabled"]; + + private _triggeredRespawnEnabled = [RESPAWN_TRIGGERED_WAVE] call f_fnc_isRespawnModeActive; + private _respawnButton = _display displayCtrl IDC_TRIGGEREDWAVE_DIALOG_RESPAWNBUTTON; + + if !(_triggeredRespawnEnabled) exitWith + { + _respawnButton ctrlEnable false; + _respawnButton ctrlSetTooltip "Triggered waves are disabled. This dialog cannot be used."; + }; + + private _timestamp = [playerSide] call f_fnc_getRespawnTimestampForTarget; + private _sideRespawnDelay = [playerSide] call f_fnc_getSideRespawnDelayForTarget; + private _timerAllowsRespawn = (CBA_missionTime >= (_timestamp + _sideRespawnDelay)); + + private _tooltipText = ""; + private _buttonEnabled = false; + + if (_ticketsEnabled) then + { + private _ticketsForSide = [playerSide] call BIS_fnc_respawnTickets; + + if ((_ticketsForSide <= 0) and _timerAllowsRespawn) exitWith + { + _tooltipText = "Side tickets depleted. If players have personal tickets, they can still respawn."; + _buttonEnabled = true; + }; + }; + + if (_tooltipText isEqualTo "") then + { + if (_timerAllowsRespawn) then + { + _tooltipText = "A respawn wave is available to be called."; + _buttonEnabled = true; + } + else + { + private _respawnWaveActive = (CBA_missionTime < _timestamp); + + if (_respawnWaveActive) then + { + private _timeRemaining = (_timestamp - CBA_missionTime) max 0; + private _timeFormatted = [_timeRemaining] call f_fnc_formatTimeDuration; + + _tooltipText = format ["A respawn wave is active (%1 remaining).", _timeFormatted]; + _buttonEnabled = false; + } + else + { + private _timeRemaining = ((_timestamp + _sideRespawnDelay) - CBA_missionTime) max 0; + private _timeFormatted = [_timeRemaining] call f_fnc_formatTimeDuration; + + _tooltipText = format ["Respawn wave unavailable (wait another %1).", _timeFormatted]; + _buttonEnabled = false; + }; + }; + }; + + _respawnButton ctrlEnable _buttonEnabled; + _respawnButton ctrlSetTooltip _tooltipText; + +}; + + + +f_fnc_triggeredWaveDialog_refreshWaveDialog = +{ + params ["_display", "_ticketsEnabled"]; + + // Refresh wave dialog. + [ + // Script + { + if !(isNull (_this#0)) exitWith + { + _this call f_fnc_triggeredWaveDialog_populatePlayerList; + _this call f_fnc_triggeredWaveDialog_populateTicketCount; + _this call f_fnc_triggeredWaveDialog_manageRespawnButton; + _this call f_fnc_triggeredWaveDialog_refreshWaveDialog; + }; + }, + + // Arguments + _this, + + // Delay (secs) + 1 + + ] call CBA_fnc_waitAndExecute; +}; + +[_display, _ticketsEnabled] call f_fnc_triggeredWaveDialog_populatePlayerList; +[_display, _ticketsEnabled] call f_fnc_triggeredWaveDialog_populateTicketCount; +[_display, _ticketsEnabled] call f_fnc_triggeredWaveDialog_manageRespawnButton; +[_display, _ticketsEnabled] call f_fnc_triggeredWaveDialog_refreshWaveDialog; diff --git a/components/respawn/triggeredWave/ui_functions/macros.hpp b/components/respawn/triggeredWave/ui_functions/macros.hpp new file mode 100644 index 00000000..c3630e65 --- /dev/null +++ b/components/respawn/triggeredWave/ui_functions/macros.hpp @@ -0,0 +1 @@ +#include "../macros.hpp" diff --git a/components/respawn/triggeredWave/ui_macros.hpp b/components/respawn/triggeredWave/ui_macros.hpp new file mode 100644 index 00000000..29d8ea7a --- /dev/null +++ b/components/respawn/triggeredWave/ui_macros.hpp @@ -0,0 +1,6 @@ +#define IDD_TRIGGEREDWAVE_DIALOG 12144 + +#define IDC_TRIGGEREDWAVE_DIALOG_TICKETSLEFT 1003 +#define IDC_TRIGGEREDWAVE_DIALOG_PLAYERSTITLE 1005 +#define IDC_TRIGGEREDWAVE_DIALOG_PLAYERLIST 1500 +#define IDC_TRIGGEREDWAVE_DIALOG_RESPAWNBUTTON 1600 diff --git a/components/respawn/wave/onPlayerKilledOrRespawned.sqf b/components/respawn/wave/onPlayerKilledOrRespawned.sqf index f17f3777..7839816a 100644 --- a/components/respawn/wave/onPlayerKilledOrRespawned.sqf +++ b/components/respawn/wave/onPlayerKilledOrRespawned.sqf @@ -7,7 +7,7 @@ if (!isPlayer _newUnit && !isNull _newUnit) exitWith ["Attempting to use 'CAFE_Wave' on AI unit '%1' - can be used only on players.", _newUnit] call BIS_fnc_error; }; -_respawnDelay = [_newUnit, _respawnDelay] call f_fnc_getPlayerRespawnTime; +_respawnDelay = [_newUnit, _respawnDelay] call f_fnc_getPlayerRespawnDelay; if (!alive _newUnit) then { diff --git a/configuration/respawn.hpp b/configuration/respawn.hpp index f6e7abd1..211bba65 100644 --- a/configuration/respawn.hpp +++ b/configuration/respawn.hpp @@ -1,6 +1,5 @@ #include "..\respawn_macros.hpp" - // BUB 2022-03-31 TODO: Re-introduce this functionality per-side. // When a player respawns, do they automatically re-join their group? //#define RESPAWN_IN_GROUP true @@ -13,7 +12,9 @@ // When a player respawns, do they get to teleport to a group of their choosing? // #define ALLOW_TELEPORT_UPON_RESPAWN -#define RESPAWN_MODE_BLUFOR RESPAWN_MODE_TIMED +#define RESPAWN_WAVE_DURATION 60 + +#define RESPAWN_MODE_BLUFOR RESPAWN_MODE_TRIGGERED_WAVES_TICKETS #define RESPAWN_DELAY_BLUFOR 30 #define RESPAWN_SIDE_TICKETS_BLUFOR 30 #define RESPAWN_PLAYER_TICKETS_BLUFOR 2 diff --git a/dialogs.hpp b/dialogs.hpp index 8bb3eb3f..1da9036e 100644 --- a/dialogs.hpp +++ b/dialogs.hpp @@ -7,3 +7,4 @@ #include "components\squadMarkers\ui\squadMarkerDialog.hpp" #include "components\joinInProgress\ui\groupPickerDialog.hpp" #include "components\viewDistanceEditor\ui\viewDistanceEditor.hpp" +#include "components\respawn\triggeredWave\ui\triggeredWaveDialog.hpp" diff --git a/macros.hpp b/macros.hpp index 65066606..7fc3476f 100644 --- a/macros.hpp +++ b/macros.hpp @@ -56,6 +56,7 @@ #define IS_TRUE(VAR) ((!isNil #VAR) and {VAR}) #define EXISTS(VAR) ((!isNil #VAR) and {!(isNull VAR)}) +#define EQUALS(VAR, VALUE) (EXISTS(VAR) and {VAR isEqualTo VALUE}) #define SERVER_ONLY if (!isServer) exitWith {} #define CLIENT_ONLY if !IS_CLIENT exitWith {} diff --git a/respawn_macros.hpp b/respawn_macros.hpp index bb1930af..e5193974 100644 --- a/respawn_macros.hpp +++ b/respawn_macros.hpp @@ -1,11 +1,14 @@ #define RESPAWN_TIMED_WAVE "CAFE_Wave" -#define RESPAWN_TICKETS "Tickets" #define RESPAWN_TIMED "CAFE_Timed" +#define RESPAWN_TICKETS "TicketsSpawn" +#define RESPAWN_TRIGGERED_WAVE "CAFE_TriggeredWave" -#define RESPAWN_MODE_TIMED {"MenuPosition", "Spectator", RESPAWN_TIMED, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TIMED_WAVES {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TICKETS {"MenuPosition", "Spectator", RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TIMED_WAVES_TICKETS {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED {"MenuPosition", "Spectator", RESPAWN_TIMED, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TICKETS {"MenuPosition", "Spectator", RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES_TICKETS {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TRIGGERED_WAVES {"MenuPosition", "Spectator", RESPAWN_TRIGGERED_WAVE, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TRIGGERED_WAVES_TICKETS {"MenuPosition", "Spectator", RESPAWN_TRIGGERED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} #define RESPAWN_DEFAULTS "MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad" From 8fdf7ca39424e8df0916d96efe2b8e19dbaba188 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Wed, 10 Aug 2022 00:17:13 +0100 Subject: [PATCH 08/24] fixn and addn... [?] when player is in spectate before dying, mouse gets broken, oh no [x] make respawn ace-action invisible if not in triggered-waves mode [x] fix jip teleport ticket - broken in off position [>] locations framework thingy - in progress --- .../fn_addSquadManagerActionsToClass.sqf | 8 ++++- components/joinInProgress/init_component.sqf | 10 +++++++ .../respawn/fn_addToRespawnLocationsMap.sqf | 6 ++++ .../respawn/fn_getRespawnRegistration.sqf | 15 ++++++++++ .../respawn/fn_getRespawnRegistrations.sqf | 16 ++++++++++ .../respawn/fn_removeRespawnLocation.sqf | 30 +++++++++++++++++++ components/respawn/fn_setRespawnLocation.sqf | 17 +++++++++++ components/respawn/globals.sqf | 5 +++- components/respawn/init_component.sqf | 23 ++++++++++++++ configuration/respawn.hpp | 18 +++++------ configuration/respawnLocations.sqf | 11 +++++++ configuration/respawnWaves.sqf | 2 -- .../components/groups/clientStartupGroup.sqf | 2 ++ 13 files changed, 150 insertions(+), 13 deletions(-) create mode 100644 components/joinInProgress/init_component.sqf create mode 100644 components/respawn/fn_addToRespawnLocationsMap.sqf create mode 100644 components/respawn/fn_getRespawnRegistration.sqf create mode 100644 components/respawn/fn_getRespawnRegistrations.sqf create mode 100644 components/respawn/fn_removeRespawnLocation.sqf create mode 100644 components/respawn/fn_setRespawnLocation.sqf create mode 100644 configuration/respawnLocations.sqf delete mode 100644 configuration/respawnWaves.sqf diff --git a/components/aceActions/fn_addSquadManagerActionsToClass.sqf b/components/aceActions/fn_addSquadManagerActionsToClass.sqf index 17d8be59..eb96a772 100644 --- a/components/aceActions/fn_addSquadManagerActionsToClass.sqf +++ b/components/aceActions/fn_addSquadManagerActionsToClass.sqf @@ -1,4 +1,5 @@ #include "macros.hpp" +#include "..\..\respawn_macros.hpp" params ["_unit"]; @@ -27,6 +28,11 @@ _createSquadNode = _children = []; + private _shouldShowRespawnDialog = + { + (_player getVariable ["f_var_canUseRespawnMenu", false]) and {[RESPAWN_TRIGGERED_WAVE] call f_fnc_isRespawnModeActive} + }; + // Respawn menu action _action = [ @@ -34,7 +40,7 @@ _createSquadNode = "Show Respawn Menu", "\A3\ui_f\data\igui\cfg\simpleTasks\types\getin_ca.paa", {createDialog "CAFE_TriggerRespawnWave_Dialog";}, - {_player getVariable ["f_var_canUseRespawnMenu", false]}, + _shouldShowRespawnDialog, {}, [], "", diff --git a/components/joinInProgress/init_component.sqf b/components/joinInProgress/init_component.sqf new file mode 100644 index 00000000..1236b4aa --- /dev/null +++ b/components/joinInProgress/init_component.sqf @@ -0,0 +1,10 @@ +#include "macros.hpp" + +DEBUG_PRINT_LOG("initting joinInProgress") + +waitUntil {local player}; + +if (hasInterface and didJIP) then +{ + player setVariable ["f_var_mayTeleportToGroup", true, true]; +}; diff --git a/components/respawn/fn_addToRespawnLocationsMap.sqf b/components/respawn/fn_addToRespawnLocationsMap.sqf new file mode 100644 index 00000000..7a8a522b --- /dev/null +++ b/components/respawn/fn_addToRespawnLocationsMap.sqf @@ -0,0 +1,6 @@ +params ["_respawnEntry"]; + +private _key = _respawnEntry#0; + +private _keyList = f_var_respawnLocationsMap getOrDefault [_key, [], true]; +_keyList pushBack _respawnEntry; \ No newline at end of file diff --git a/components/respawn/fn_getRespawnRegistration.sqf b/components/respawn/fn_getRespawnRegistration.sqf new file mode 100644 index 00000000..ea221641 --- /dev/null +++ b/components/respawn/fn_getRespawnRegistration.sqf @@ -0,0 +1,15 @@ +#include "macros.hpp" + +// Convenience function to retrieve a respawn location array using the location and the target. +// If no respawn is registered for the location and the given target, an empty array is returned (even if there are other existing registrations for the location). + +SERVER_ONLY; + +params [["_location", nil, ["", objNull]], "_target"]; + +private _respawnsList = [_location] call f_fnc_getRespawnRegistrations; +private _respawnIndex = _respawnsList findIf {_x#2 isEqualTo _target}; + +if (_respawnIndex < 0) exitWith {[]}; + +(_respawnsList # _respawnIndex) + [_respawnIndex] \ No newline at end of file diff --git a/components/respawn/fn_getRespawnRegistrations.sqf b/components/respawn/fn_getRespawnRegistrations.sqf new file mode 100644 index 00000000..2d63ccde --- /dev/null +++ b/components/respawn/fn_getRespawnRegistrations.sqf @@ -0,0 +1,16 @@ +#include "macros.hpp" + +// Convenience function to retrieve all respawn arrays for a given location. + +SERVER_ONLY; + +params [["_location", nil, ["", objNull]]]; + +private _key = _location; + +if (typeName _key isEqualTo "OBJECT") then +{ + _key = [_key] call BIS_fnc_netId; +}; + +(f_var_respawnLocationsMap getOrDefault [_key, []]) \ No newline at end of file diff --git a/components/respawn/fn_removeRespawnLocation.sqf b/components/respawn/fn_removeRespawnLocation.sqf new file mode 100644 index 00000000..44b72c2b --- /dev/null +++ b/components/respawn/fn_removeRespawnLocation.sqf @@ -0,0 +1,30 @@ +#include "macros.hpp" + +// Convenience function to abstract away target unless needed, and also maintain respawn registry. + +SERVER_ONLY; + +params [["_location", nil, ["", objNull]], ["_target", nil]]; + +private _allRegistrations = [_location] call f_fnc_getRespawnRegistrations; + +if (isNil '_target') exitWith +{ + { + [_x#2, _x#3] call BIS_fnc_removeRespawnPosition; + + } forEach _allRegistrations; + + _allRegistrations resize 0; + + true +}; + +private _targetRegistration = [_location, _target] call f_fnc_getRespawnRegistration; +if (_targetRegistration isEqualTo []) exitWith {false}; + +[_targetRegistration#2, _targetRegistration#3] call BIS_fnc_removeRespawnPosition; + +_allRegistrations deleteAt (_targetRegistration#4); + +true \ No newline at end of file diff --git a/components/respawn/fn_setRespawnLocation.sqf b/components/respawn/fn_setRespawnLocation.sqf new file mode 100644 index 00000000..050e0d38 --- /dev/null +++ b/components/respawn/fn_setRespawnLocation.sqf @@ -0,0 +1,17 @@ +#include "macros.hpp" + +// Convenience function to abstract away target unless needed, and also maintain respawn registry. + +SERVER_ONLY; + +params [["_location", nil, ["", objNull]], ["_name", nil, [""]], ["_target", missionNamespace]]; + +private _respawnIdArray = [_target, _location, _name] call BIS_fnc_addRespawnPosition; + +private _id = _location; +if (typeName _id isEqualTo "OBJECT") then +{ + _id = [_object] call BIS_fnc_netId; +}; + +([_id, _location] + _respawnIdArray) call f_fnc_addToRespawnLocationsMap; \ No newline at end of file diff --git a/components/respawn/globals.sqf b/components/respawn/globals.sqf index 75b35bd3..1664a899 100644 --- a/components/respawn/globals.sqf +++ b/components/respawn/globals.sqf @@ -3,4 +3,7 @@ f_var_respawnDelay_blufor = RESPAWN_DELAY_BLUFOR; f_var_respawnDelay_opfor = RESPAWN_DELAY_OPFOR; f_var_respawnDelay_indfor = RESPAWN_DELAY_INDFOR; -f_var_respawnDelay_civ = RESPAWN_DELAY_CIVILIAN; \ No newline at end of file +f_var_respawnDelay_civ = RESPAWN_DELAY_CIVILIAN; + +// Format of entries should be "string location ID" : ["string location ID", , , ] +f_var_respawnLocationsMap = createHashMap; \ No newline at end of file diff --git a/components/respawn/init_component.sqf b/components/respawn/init_component.sqf index 9c3c781a..14fc2e34 100644 --- a/components/respawn/init_component.sqf +++ b/components/respawn/init_component.sqf @@ -141,4 +141,27 @@ if (hasInterface) then [] call f_fnc_updateCanUseRespawnMenu; + + // Try to fix issue where if a player dies during unconsciousness, all mouse + keyboard input gets locked up. + // Appears to be a timing issue - caused by downtime-spectator closing after player has died and entered respawn screen. + // Note: player is technically not alive until respawned, as opposed to old respawn behaviour. + // BUB 2022-08-09 TODO :: Try a more elegant solution by moving downtime system toward eventing instead of polling. + [ + "ace_killed", + { + [ + { + if ((_this#0) isEqualTo player) then + { + ["unconscious", false] call ace_common_fnc_setDisableUserInputStatus; + }; + }, + + _this, + 1 + + ] call CBA_fnc_waitAndExecute; + } + ] call CBA_fnc_addEventHandler; + }; diff --git a/configuration/respawn.hpp b/configuration/respawn.hpp index 211bba65..78929b93 100644 --- a/configuration/respawn.hpp +++ b/configuration/respawn.hpp @@ -19,17 +19,17 @@ #define RESPAWN_SIDE_TICKETS_BLUFOR 30 #define RESPAWN_PLAYER_TICKETS_BLUFOR 2 -#define RESPAWN_MODE_OPFOR {RESPAWN_DEFAULTS, RESPAWN_TIMED_WAVE} +#define RESPAWN_MODE_OPFOR RESPAWN_MODE_TIMED_WAVES_TICKETS #define RESPAWN_DELAY_OPFOR 10 -#define RESPAWN_SIDE_TICKETS_OPFOR 30 -#define RESPAWN_PLAYER_TICKETS_OPFOR 2 +#define RESPAWN_SIDE_TICKETS_OPFOR 10 +//#define RESPAWN_PLAYER_TICKETS_OPFOR 2 -#define RESPAWN_MODE_INDFOR {RESPAWN_DEFAULTS, RESPAWN_TIMED_WAVE} +#define RESPAWN_MODE_INDFOR RESPAWN_MODE_TIMED_WAVES #define RESPAWN_DELAY_INDFOR RESPAWN_DELAY_BLUFOR -#define RESPAWN_SIDE_TICKETS_INDFOR 30 -#define RESPAWN_PLAYER_TICKETS_INDFOR 2 +//#define RESPAWN_SIDE_TICKETS_INDFOR 30 +//#define RESPAWN_PLAYER_TICKETS_INDFOR 2 -#define RESPAWN_MODE_CIVILIAN {RESPAWN_DEFAULTS} +#define RESPAWN_MODE_CIVILIAN RESPAWN_MODE_TIMED #define RESPAWN_DELAY_CIVILIAN 5 -#define RESPAWN_SIDE_TICKETS_CIVILIAN 30 -#define RESPAWN_PLAYER_TICKETS_CIVILIAN 2 \ No newline at end of file +//#define RESPAWN_SIDE_TICKETS_CIVILIAN 30 +//#define RESPAWN_PLAYER_TICKETS_CIVILIAN 2 \ No newline at end of file diff --git a/configuration/respawnLocations.sqf b/configuration/respawnLocations.sqf new file mode 100644 index 00000000..2fd25f70 --- /dev/null +++ b/configuration/respawnLocations.sqf @@ -0,0 +1,11 @@ +#include "..\respawn_macros.hpp" + +/* + Respawn locations configuration file. + + Available configuration commands: + (All commands are also usable in the mission editor, in the "Init" field.) + + [, "Optional Name", ] call f_fnc_setRespawnObject; + - Sets an object as a respawn object. +*/ \ No newline at end of file diff --git a/configuration/respawnWaves.sqf b/configuration/respawnWaves.sqf deleted file mode 100644 index c35a63b9..00000000 --- a/configuration/respawnWaves.sqf +++ /dev/null @@ -1,2 +0,0 @@ -#include "..\respawn_macros.hpp" - diff --git a/startup/components/groups/clientStartupGroup.sqf b/startup/components/groups/clientStartupGroup.sqf index 9ffc41e7..e510f1ba 100644 --- a/startup/components/groups/clientStartupGroup.sqf +++ b/startup/components/groups/clientStartupGroup.sqf @@ -28,6 +28,8 @@ INIT_COMPONENT(zenFunctions) INIT_COMPONENT(respawn) +INIT_COMPONENT(joinInProgress) + // Gravestones init #ifdef ENABLE_GRAVESTONE_CORPSE_MANAGER From 55e94d3d64b0cd009bfee273d64926df88477718 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Wed, 10 Aug 2022 23:10:32 +0100 Subject: [PATCH 09/24] remaining bugs from initial test session (probly) fixed [x] when player tickets all gone, team tickets stay the same [x] first start - no respawn menu pls --- components/respawn/cfgRespawnTemplates.hpp | 8 +++++--- components/respawn/fixPlayerTickets/macros.hpp | 1 + .../onPlayerKilledOrRespawned.sqf | 15 +++++++++++++++ .../respawn/fixPlayerTickets/respawnTemplates.hpp | 6 ++++++ components/respawn/squad/onPlayerRespawn.sqf | 9 ++++++++- respawn_macros.hpp | 14 +++++++------- 6 files changed, 42 insertions(+), 11 deletions(-) create mode 100644 components/respawn/fixPlayerTickets/macros.hpp create mode 100644 components/respawn/fixPlayerTickets/onPlayerKilledOrRespawned.sqf create mode 100644 components/respawn/fixPlayerTickets/respawnTemplates.hpp diff --git a/components/respawn/cfgRespawnTemplates.hpp b/components/respawn/cfgRespawnTemplates.hpp index 9d4f6300..ca9ed7c3 100644 --- a/components/respawn/cfgRespawnTemplates.hpp +++ b/components/respawn/cfgRespawnTemplates.hpp @@ -1,12 +1,14 @@ class CfgRespawnTemplates { - #include "loadout\respawnTemplates.hpp" + #include "fixPlayerTickets\respawnTemplates.hpp" + #include "loadout\respawnTemplates.hpp" + #include "squad\respawnTemplates.hpp" #include "timed\respawnTemplates.hpp" - #include "wave\respawnTemplates.hpp" - #include "triggeredWave\respawnTemplates.hpp" + + #include "wave\respawnTemplates.hpp" } diff --git a/components/respawn/fixPlayerTickets/macros.hpp b/components/respawn/fixPlayerTickets/macros.hpp new file mode 100644 index 00000000..5556564c --- /dev/null +++ b/components/respawn/fixPlayerTickets/macros.hpp @@ -0,0 +1 @@ +#include "../macros.hpp" \ No newline at end of file diff --git a/components/respawn/fixPlayerTickets/onPlayerKilledOrRespawned.sqf b/components/respawn/fixPlayerTickets/onPlayerKilledOrRespawned.sqf new file mode 100644 index 00000000..798a3457 --- /dev/null +++ b/components/respawn/fixPlayerTickets/onPlayerKilledOrRespawned.sqf @@ -0,0 +1,15 @@ +#include "macros.hpp" + +params [["_newUnit", objNull, [objNull]], "_oldUnit", "_respawn", "_respawnDelay"]; + +if (!isPlayer _newUnit && !isNull _newUnit) exitWith +{ + ["Attempting to use 'CAFE_FixPlayerTickets' on AI unit '%1' - can be used only on players.", _newUnit] call BIS_fnc_error; +}; + +private _playerTickets = _newUnit getvariable "BIS_fnc_respawnTickets_value"; + +if ((!isNil "_playerTickets") and {_playerTickets isEqualTo 0}) then +{ + _newUnit setVariable ["BIS_fnc_respawnTickets_value", nil]; +}; \ No newline at end of file diff --git a/components/respawn/fixPlayerTickets/respawnTemplates.hpp b/components/respawn/fixPlayerTickets/respawnTemplates.hpp new file mode 100644 index 00000000..eade6f34 --- /dev/null +++ b/components/respawn/fixPlayerTickets/respawnTemplates.hpp @@ -0,0 +1,6 @@ +class CAFE_FixPlayerTickets +{ + onPlayerKilled = "components\respawn\fixPlayerTickets\onPlayerKilledOrRespawned.sqf"; + onPlayerRespawn = "components\respawn\fixPlayerTickets\onPlayerKilledOrRespawned.sqf"; + respawnTypes[] = {2,3}; +}; \ No newline at end of file diff --git a/components/respawn/squad/onPlayerRespawn.sqf b/components/respawn/squad/onPlayerRespawn.sqf index 0a055a07..8dd34285 100644 --- a/components/respawn/squad/onPlayerRespawn.sqf +++ b/components/respawn/squad/onPlayerRespawn.sqf @@ -8,4 +8,11 @@ params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"]; -createDialog "CAFE_GroupPicker_Dialog"; +// Players shouldn't see the dialog on first spawn, unless they JIPped in. +private _didFirstSpawn = missionNamespace getVariable ["f_var_squad_didFirstSpawn", false]; +missionNamespace setVariable ["f_var_squad_didFirstSpawn", true]; + +if ((!didJip) and _didFirstSpawn) exitWith +{ + createDialog "CAFE_GroupPicker_Dialog"; +}; \ No newline at end of file diff --git a/respawn_macros.hpp b/respawn_macros.hpp index e5193974..16ec7542 100644 --- a/respawn_macros.hpp +++ b/respawn_macros.hpp @@ -3,13 +3,13 @@ #define RESPAWN_TICKETS "TicketsSpawn" #define RESPAWN_TRIGGERED_WAVE "CAFE_TriggeredWave" -#define RESPAWN_MODE_TIMED {"MenuPosition", "Spectator", RESPAWN_TIMED, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TIMED_WAVES {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TICKETS {"MenuPosition", "Spectator", RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TIMED_WAVES_TICKETS {"MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TRIGGERED_WAVES {"MenuPosition", "Spectator", RESPAWN_TRIGGERED_WAVE, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TRIGGERED_WAVES_TICKETS {"MenuPosition", "Spectator", RESPAWN_TRIGGERED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TIMED, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TICKETS {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES_TICKETS {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TRIGGERED_WAVES {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TRIGGERED_WAVE, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TRIGGERED_WAVES_TICKETS {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TRIGGERED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_DEFAULTS "MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad" +#define RESPAWN_DEFAULTS "CAFE_FixPlayerTickets", "MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad" #define DEFAULT_RESPAWN_ARRAY {RESPAWN_DEFAULTS} \ No newline at end of file From bbbd08c5b426cd3e3e366b57a786567d3961e15e Mon Sep 17 00:00:00 2001 From: Bubbus Date: Fri, 12 Aug 2022 16:35:43 +0100 Subject: [PATCH 10/24] Added respawn manager system. Updated default mission file. --- .../respawn/fn_addToRespawnLocationsMap.sqf | 6 - components/respawn/fn_addToRespawnPollers.sqf | 25 ++ components/respawn/fn_getManagedRespawn.sqf | 7 + components/respawn/fn_getRespawnKey.sqf | 21 ++ .../respawn/fn_getRespawnRegistration.sqf | 15 - .../respawn/fn_getRespawnRegistrations.sqf | 16 - .../respawn/fn_removeManagedRespawn.sqf | 12 + .../respawn/fn_removeRespawnLocation.sqf | 30 -- components/respawn/fn_respawnManagerLoop.sqf | 94 ++++++ components/respawn/fn_setRespawnLocation.sqf | 28 +- .../respawn/fn_updateManagedSpawnpoint.sqf | 60 ++++ components/respawn/functions.hpp | 11 + components/respawn/globals.sqf | 4 +- components/respawn/init_component.sqf | 3 + configuration/respawnLocations.sqf | 33 +- mission.sqm | 291 ++++-------------- .../groups/serverConfigGroup.sqf | 3 + 17 files changed, 352 insertions(+), 307 deletions(-) delete mode 100644 components/respawn/fn_addToRespawnLocationsMap.sqf create mode 100644 components/respawn/fn_addToRespawnPollers.sqf create mode 100644 components/respawn/fn_getManagedRespawn.sqf create mode 100644 components/respawn/fn_getRespawnKey.sqf delete mode 100644 components/respawn/fn_getRespawnRegistration.sqf delete mode 100644 components/respawn/fn_getRespawnRegistrations.sqf create mode 100644 components/respawn/fn_removeManagedRespawn.sqf delete mode 100644 components/respawn/fn_removeRespawnLocation.sqf create mode 100644 components/respawn/fn_respawnManagerLoop.sqf create mode 100644 components/respawn/fn_updateManagedSpawnpoint.sqf diff --git a/components/respawn/fn_addToRespawnLocationsMap.sqf b/components/respawn/fn_addToRespawnLocationsMap.sqf deleted file mode 100644 index 7a8a522b..00000000 --- a/components/respawn/fn_addToRespawnLocationsMap.sqf +++ /dev/null @@ -1,6 +0,0 @@ -params ["_respawnEntry"]; - -private _key = _respawnEntry#0; - -private _keyList = f_var_respawnLocationsMap getOrDefault [_key, [], true]; -_keyList pushBack _respawnEntry; \ No newline at end of file diff --git a/components/respawn/fn_addToRespawnPollers.sqf b/components/respawn/fn_addToRespawnPollers.sqf new file mode 100644 index 00000000..e11463b0 --- /dev/null +++ b/components/respawn/fn_addToRespawnPollers.sqf @@ -0,0 +1,25 @@ +#include "macros.hpp" + +// Add a set of respawn pollers to the respawn manager. The given spawn parameters will be used according to the poller conditions. +// If the given spawn parameters are already being managed, the pollers will be replaced with the new ones. + +SERVER_ONLY; + +params ["_spawnParams", "_pollerArray"]; +_spawnParams params ["_target", "_location", "_name"]; + +private _key = [_location, _target] call f_fnc_getRespawnKey; +private _respawnEntry = f_var_respawnPollersMap get _key; + +if !(isNil "_respawnEntry") exitWith +{ + DEBUG_FORMAT1_LOG("[RESPAWN] Respawn key %1 already exists - replacing poll array.",_key) + _respawnEntry set [2, _pollerArray]; +}; + +// [bool exists, array respawnInfo] +private _state = [false, []]; +_respawnEntry = [_key, _spawnParams, _pollerArray, _state]; + +DEBUG_FORMAT1_LOG("[RESPAWN] Adding new managed respawn %1.",_key) +f_var_respawnPollersMap set [_key, _respawnEntry]; \ No newline at end of file diff --git a/components/respawn/fn_getManagedRespawn.sqf b/components/respawn/fn_getManagedRespawn.sqf new file mode 100644 index 00000000..cbd3c944 --- /dev/null +++ b/components/respawn/fn_getManagedRespawn.sqf @@ -0,0 +1,7 @@ +// Convenience function to retrieve a respawn manager array using the location and the target. +// If no respawn is registered for the location and the given target, an empty array is returned (even if there are other existing registrations for the location). + +params ["_location", "_target"]; + +private _key = [_location, _target] call f_fnc_getRespawnKey; +private _respawnEntry = f_var_respawnPollersMap getOrDefault [_key, []]; \ No newline at end of file diff --git a/components/respawn/fn_getRespawnKey.sqf b/components/respawn/fn_getRespawnKey.sqf new file mode 100644 index 00000000..29c236b3 --- /dev/null +++ b/components/respawn/fn_getRespawnKey.sqf @@ -0,0 +1,21 @@ +// Gets a unique key for a spawn location/target combo. + +params ["_location", "_target"]; + +private _locationId = switch (typeName _location) do +{ + case "OBJECT"; + case "GROUP": {_location call BIS_fnc_netId}; + case "STRING": {_location}; + default {str _location}; +}; + +private _targetId = switch (typeName _target) do +{ + case "OBJECT"; + case "GROUP": {_target call BIS_fnc_netId}; + case "STRING": {_target}; + default {str _target}; +}; + +(format ["%1@%2", _locationId, _targetId]) \ No newline at end of file diff --git a/components/respawn/fn_getRespawnRegistration.sqf b/components/respawn/fn_getRespawnRegistration.sqf deleted file mode 100644 index ea221641..00000000 --- a/components/respawn/fn_getRespawnRegistration.sqf +++ /dev/null @@ -1,15 +0,0 @@ -#include "macros.hpp" - -// Convenience function to retrieve a respawn location array using the location and the target. -// If no respawn is registered for the location and the given target, an empty array is returned (even if there are other existing registrations for the location). - -SERVER_ONLY; - -params [["_location", nil, ["", objNull]], "_target"]; - -private _respawnsList = [_location] call f_fnc_getRespawnRegistrations; -private _respawnIndex = _respawnsList findIf {_x#2 isEqualTo _target}; - -if (_respawnIndex < 0) exitWith {[]}; - -(_respawnsList # _respawnIndex) + [_respawnIndex] \ No newline at end of file diff --git a/components/respawn/fn_getRespawnRegistrations.sqf b/components/respawn/fn_getRespawnRegistrations.sqf deleted file mode 100644 index 2d63ccde..00000000 --- a/components/respawn/fn_getRespawnRegistrations.sqf +++ /dev/null @@ -1,16 +0,0 @@ -#include "macros.hpp" - -// Convenience function to retrieve all respawn arrays for a given location. - -SERVER_ONLY; - -params [["_location", nil, ["", objNull]]]; - -private _key = _location; - -if (typeName _key isEqualTo "OBJECT") then -{ - _key = [_key] call BIS_fnc_netId; -}; - -(f_var_respawnLocationsMap getOrDefault [_key, []]) \ No newline at end of file diff --git a/components/respawn/fn_removeManagedRespawn.sqf b/components/respawn/fn_removeManagedRespawn.sqf new file mode 100644 index 00000000..45aa2892 --- /dev/null +++ b/components/respawn/fn_removeManagedRespawn.sqf @@ -0,0 +1,12 @@ +#include "macros.hpp" + +// Forces a managed respawn to be removed and all polling to be stopped for that respawn. + +params ["_location", "_target"]; + +private _key = [_location, _target] call f_fnc_getRespawnKey; + +DEBUG_FORMAT1_LOG("[RESPAWN] Forcing removal of managed respawn %1.",_key) + +private _respawnEntry = f_var_respawnPollersMap getOrDefault [_key, ["",[]]]; +(_respawnEntry#1) set [0, objNull]; \ No newline at end of file diff --git a/components/respawn/fn_removeRespawnLocation.sqf b/components/respawn/fn_removeRespawnLocation.sqf deleted file mode 100644 index 44b72c2b..00000000 --- a/components/respawn/fn_removeRespawnLocation.sqf +++ /dev/null @@ -1,30 +0,0 @@ -#include "macros.hpp" - -// Convenience function to abstract away target unless needed, and also maintain respawn registry. - -SERVER_ONLY; - -params [["_location", nil, ["", objNull]], ["_target", nil]]; - -private _allRegistrations = [_location] call f_fnc_getRespawnRegistrations; - -if (isNil '_target') exitWith -{ - { - [_x#2, _x#3] call BIS_fnc_removeRespawnPosition; - - } forEach _allRegistrations; - - _allRegistrations resize 0; - - true -}; - -private _targetRegistration = [_location, _target] call f_fnc_getRespawnRegistration; -if (_targetRegistration isEqualTo []) exitWith {false}; - -[_targetRegistration#2, _targetRegistration#3] call BIS_fnc_removeRespawnPosition; - -_allRegistrations deleteAt (_targetRegistration#4); - -true \ No newline at end of file diff --git a/components/respawn/fn_respawnManagerLoop.sqf b/components/respawn/fn_respawnManagerLoop.sqf new file mode 100644 index 00000000..02196965 --- /dev/null +++ b/components/respawn/fn_respawnManagerLoop.sqf @@ -0,0 +1,94 @@ +#include "macros.hpp" + +// Checks each currently registered spawn point against its "isCreatedWhen" and "isRemovedWhen" poll functions. +// Automatically adopts spawnpoints created externally which match the _respawnParams. +// Prunes spawnpoint registrations when permanently removed via "isRemovedWhen" or when target / location is deleted. + + +// Keys to remove after manager run. +private _keysToRemove = []; + + +// Main manager body - handles state drift and polling. +{ + _x params ["_key", "_respawnParams", "_pollerArray", "_state"]; + _respawnParams params ["_target", "_location", "_name"]; + _pollerArray params ["_isCreatedWhen", "_isRemovedWhen", "_isRepeatable"]; + + DEBUG_FORMAT1_LOG("[RESPAWN] Visiting spawn key %1.",_key) + + + // Preamble: check if target/location have disappeared or if spawnpoint state has changed outwith the manager. + + if ((_target != _target) or {(typeName _location isNotEqualTo "ARRAY") and {_location != _location}}) then // "Non-failing" null check, needed due to mixed types. + { + DEBUG_FORMAT1_LOG("[RESPAWN] Target or location has disappeared for respawn - deregistering key %1",_key) + _keystoRemove pushBack _key; + continue; + }; + + private _updateResult = [_state, _state#1, _target, _location] call f_fnc_updateManagedSpawnpoint; + if ((_updateResult isEqualTo "removed") and (!_isRepeatable)) then + { + DEBUG_FORMAT1_LOG("[RESPAWN] Update result was removal and IsRepeatable is false - deregistering key %1",_key) + _keysToRemove pushBack _key; + continue; + }; + + + // Check poll functions for managed creation/removal. + + _state params ["_isCreated", "_spawnpointData"]; + + if (_isCreated and {[] call _isRemovedWhen}) then + { + DEBUG_FORMAT2_LOG("[RESPAWN] IsRemovedWhen returned true - removing spawnpoint [%1; %2]",_target,_location) + + _spawnpointData call BIS_fnc_removeRespawnPosition; + _state set [0, false]; + _state set [1, []]; + + if !(_isRepeatable) then + { + DEBUG_FORMAT1_LOG("[RESPAWN] IsRepeatable is false - deregistering key %1",_key) + _keysToRemove pushBack _key; + }; + }; + + if ((!_isCreated) and {[] call _isCreatedWhen}) then + { + DEBUG_FORMAT2_LOG("[RESPAWN] IsCreatedWhen returned true - creating spawnpoint [%1; %2]",_target,_location) + private _spawnpointData = _respawnParams call BIS_fnc_addRespawnPosition; + + _state set [0, true]; + _state set [1, _spawnpointData]; + }; + +} forEach (values f_var_respawnPollersMap); + + +// Clean up entries for targets/locations which have been deleted. +{ + // Attempt to remove the underlying spawnpoint first, in case it's still tracked by the BI system. + private _mapEntry = f_var_respawnPollersMap get _x; + private _spawnpointData = _mapEntry#3#1; + if (_spawnpointData isNotEqualTo []) then + { + private _target = _spawnpointData#0; + if (_target == _target) then // BI function will do the wrong thing if target is null (due to _targetOrig default value). + { + _spawnpointData call BIS_fnc_removeRespawnPosition; + }; + }; + + f_var_respawnPollersMap deleteAt _x; +} forEach _keysToRemove; + + +// Schedule manager to run every second - too much processing here for per-frame. +[ + f_fnc_respawnManagerLoop, + [], + 1 +] call CBA_fnc_waitAndExecute; + diff --git a/components/respawn/fn_setRespawnLocation.sqf b/components/respawn/fn_setRespawnLocation.sqf index 050e0d38..789395e7 100644 --- a/components/respawn/fn_setRespawnLocation.sqf +++ b/components/respawn/fn_setRespawnLocation.sqf @@ -1,17 +1,27 @@ #include "macros.hpp" // Convenience function to abstract away target unless needed, and also maintain respawn registry. +// Also allows definition of "isCreatedWhen" and "isRemovedWhen" poll functions. These control when the respawn point is created/deleted. +// "isRepeatable" allows "isCreatedWhen" to be re-used after "isRemovedWhen" is triggered. This allows a respawn point to disappear temporarily for user-specified reasons. SERVER_ONLY; -params [["_location", nil, ["", objNull]], ["_name", nil, [""]], ["_target", missionNamespace]]; +params +[ + ["_location", nil], + ["_name", nil, [""]], + ["_target", missionNamespace], + ["_isCreatedWhen", nil, [{}]], + ["_isRemovedWhen", nil, [{}]], + ["_isRepeatable", false, [false]] +]; -private _respawnIdArray = [_target, _location, _name] call BIS_fnc_addRespawnPosition; - -private _id = _location; -if (typeName _id isEqualTo "OBJECT") then +if !((isNil "_isCreatedWhen") or (isNil "_isRemovedWhen")) then { - _id = [_object] call BIS_fnc_netId; -}; - -([_id, _location] + _respawnIdArray) call f_fnc_addToRespawnLocationsMap; \ No newline at end of file + private _pollerArray = [_isCreatedWhen, _isRemovedWhen, _isRepeatable]; + [[_target, _location, _name], _pollerArray] call f_fnc_addToRespawnPollers; +} +else +{ + [_target, _location, _name] call BIS_fnc_addRespawnPosition; +}; \ No newline at end of file diff --git a/components/respawn/fn_updateManagedSpawnpoint.sqf b/components/respawn/fn_updateManagedSpawnpoint.sqf new file mode 100644 index 00000000..25410118 --- /dev/null +++ b/components/respawn/fn_updateManagedSpawnpoint.sqf @@ -0,0 +1,60 @@ +#include "macros.hpp" + +// Re-check existence of spawnpoint in case state has changed outwith the respawn manager's remit. + +params ["_state", "_spawnpointData", "_target", "_location"]; + +private _return = ""; + +// BI's respawn system does some tricks to store object locations/side targets. Sort that out. +private _varName = "BIS_fnc_getRespawnPositions_list"; +private _targetDataHolder = _target; +if ((typeName _target) isEqualTo "SIDE") then +{ + _varName = _varName + str _target; + _targetDataHolder = missionNamespace; +}; + +private _locationData = switch (typeName _location) do +{ + case "OBJECT": { _location call BIS_fnc_objectVar }; + default { _location }; +}; + +private _targetRespawns = _targetDataHolder getVariable [_varName, [-1,[],[],[],[]]]; + + +// Check if spawnpoint has been created, and adopt it if so. +if (_spawnpointData isEqualTo []) then +{ + private _locationIndex = (_targetRespawns#2) findIf {_x isEqualTo _locationData}; + + if (_locationIndex >= 0) then + { + DEBUG_FORMAT2_LOG("[RESPAWN] Adopting spawnpoint [%1; %2]",_target,_locationData) + + private _locationIdentifier = _targetRespawns#1#_locationIndex; + private _newSpawnpointData = [_target, _locationIdentifier]; + + _state set [0, true]; + _state set [1, _newSpawnpointData]; + _return = "added"; + }; +} +// Check if spawnpoint has been deleted, and update state if so. +else +{ + private _locationIdentifier = _spawnpointData#1; + private _locationIndex = (_targetRespawns#1) findIf {_x isEqualTo _locationIdentifier}; + + if (_locationIndex < 0) then + { + DEBUG_FORMAT2_LOG("[RESPAWN] Spawnpoint has been removed - untracking spawnpoint [%1; %2]",_target,_locationData) + + _state set [0, false]; + _state set [1, []]; + _return = "removed"; + }; +}; + +_return \ No newline at end of file diff --git a/components/respawn/functions.hpp b/components/respawn/functions.hpp index ebee7542..6e255b69 100644 --- a/components/respawn/functions.hpp +++ b/components/respawn/functions.hpp @@ -5,6 +5,17 @@ class respawn class getPlayerRespawnDelay{}; class isRespawnModeActive{}; }; +class respawn_locationSystem +{ + file = "components\respawn"; + class addToRespawnPollers{}; + class getManagedRespawn{}; + class getRespawnKey{}; + class removeManagedRespawn{}; + class respawnManagerLoop{}; + class setRespawnLocation{}; + class updateManagedSpawnpoint{}; +}; class respawn_triggeredWave { file = "components\respawn\triggeredWave"; diff --git a/components/respawn/globals.sqf b/components/respawn/globals.sqf index 1664a899..79da69ff 100644 --- a/components/respawn/globals.sqf +++ b/components/respawn/globals.sqf @@ -5,5 +5,5 @@ f_var_respawnDelay_opfor = RESPAWN_DELAY_OPFOR; f_var_respawnDelay_indfor = RESPAWN_DELAY_INDFOR; f_var_respawnDelay_civ = RESPAWN_DELAY_CIVILIAN; -// Format of entries should be "string location ID" : ["string location ID", , , ] -f_var_respawnLocationsMap = createHashMap; \ No newline at end of file +// Lookup of all respawn targets which the framework needs to run pollers on. Map will be automatically managed by the respawn manager. +f_var_respawnPollersMap = createHashMap; \ No newline at end of file diff --git a/components/respawn/init_component.sqf b/components/respawn/init_component.sqf index 14fc2e34..3bec3e8a 100644 --- a/components/respawn/init_component.sqf +++ b/components/respawn/init_component.sqf @@ -52,6 +52,9 @@ if (isServer) then f_var_respawnDuration = 0; #endif + + [] call f_fnc_respawnManagerLoop; + }; if (hasInterface) then diff --git a/configuration/respawnLocations.sqf b/configuration/respawnLocations.sqf index 2fd25f70..d389075b 100644 --- a/configuration/respawnLocations.sqf +++ b/configuration/respawnLocations.sqf @@ -2,10 +2,39 @@ /* Respawn locations configuration file. + + Be aware: because the framework uses the normal Arma Respawn system, you can use the "Respawn Position" module instead of this file. + This file is useful for setting up respawn points with advanced behaviour (using the framework's respawn features). + This file is also treated as a code file (unscheduled), so you can set up complex scenarios here if you know SQF. + + Also be aware: Arma Respawn will disable respawn points if the spawner object is killed or if enemies are too close (~100m). Available configuration commands: (All commands are also usable in the mission editor, in the "Init" field.) - [, "Optional Name", ] call f_fnc_setRespawnObject; + [, "Optional Name", , {Creation Criterion}, {Removal Criterion}, ] call f_fnc_setRespawnLocation; - Sets an object as a respawn object. -*/ \ No newline at end of file +*/ + +// Example: creates a respawn for everyone in every faction, 200m in the air. +// [[0,0,200], "Chaos Parachute Zone"] call f_fnc_setRespawnLocation; + + +// Example: creates a respawn for BLUFOR on their default logi truck. +// [logi_truck, "BLUFOR Logi Truck", west] call f_fnc_setRespawnLocation; + + +// Advanced example: creates a respawn for BLUFOR at the OPFOR spawn marker, which only appears when BLUFOR logi truck is killed. +// +// _isCreatedWhen = {!(alive logi_truck)}; +// _isRemovedWhen = {false}; // Is never removed. +// [respawn_east, "LOGI REVENGE SPAWNPOINT", west, _isCreatedWhen, _isRemovedWhen] call f_fnc_setRespawnLocation; + + +// Advanced example: creates a respawn for BLUFOR which only appears whenever the logi truck is close to it. +// +// _myRespawnPosition = [300, 300, 0]; // Map position (meters): east, north, height. +// _isCreatedWhen = { (logi_truck distance _myRespawnPosition) <= 50 }; +// _isRemovedWhen = { (logi_truck distance _myRespawnPosition) > 50 }; +// _isRepeatable = true; +// [respawn_east, "Logi close enough spawnpoint", west, _isCreatedWhen, _isRemovedWhen, _isRepeatable] call f_fnc_setRespawnLocation; \ No newline at end of file diff --git a/mission.sqm b/mission.sqm index 9beb2b65..79a54962 100644 --- a/mission.sqm +++ b/mission.sqm @@ -8,7 +8,7 @@ class EditorData toggles=513; class ItemIDProvider { - nextID=1493; + nextID=1494; }; class MarkerIDProvider { @@ -16,10 +16,10 @@ class EditorData }; class Camera { - pos[]={192.56636,56.192032,108.11068}; - dir[]={0.36540064,-0.35723498,0.85957289}; - up[]={0.13975573,0.93401456,0.3287631}; - aside[]={0.92029929,1.4901161e-008,-0.39121515}; + pos[]={240.14539,99.70607,88.864609}; + dir[]={0.022160936,-0.61081654,0.79146558}; + up[]={0.017095979,0.79177129,0.6105783}; + aside[]={0.99961078,9.7636075e-008,-0.027989274}; }; }; binarizationWanted=0; @@ -32,7 +32,6 @@ addons[]= "ace_cargo", "A3_Supplies_F_Orange_Ammoboxes", "AICommand", - "A3_Structures_F_Bootcamp_VR_Helpers", "A3_Characters_F", "3den_Objects", "A3_Supplies_F_AoW_Bags", @@ -47,7 +46,7 @@ class AddonsMetaData { class List { - items=16; + items=15; class Item0 { className="A3_Modules_F_Curator"; @@ -74,7 +73,7 @@ class AddonsMetaData className="ace_cargo"; name="ACE3 - Cargo"; author="ACE-Team"; - url="http://ace3mod.com/"; + url="https://ace3.acemod.org/"; }; class Item4 { @@ -89,70 +88,63 @@ class AddonsMetaData name="AICommand"; }; class Item6 - { - className="A3_Structures_F_Bootcamp"; - name="Arma 3 Bootcamp Update - Buildings and Structures"; - author="Bohemia Interactive"; - url="https://www.arma3.com"; - }; - class Item7 { className="A3_Characters_F"; name="Arma 3 Alpha - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item8 + class Item7 { className="3den_Objects"; name="3den_Objects"; }; - class Item9 + class Item8 { className="A3_Supplies_F_AoW"; name="Arma 3 Art of War - Ammoboxes and Supplies"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item10 + class Item9 { className="ace_explosives"; name="ACE3 - Explosives"; author="ACE-Team"; - url="http://ace3mod.com/"; + url="https://ace3.acemod.org/"; }; - class Item11 + class Item10 { className="A3_Soft_F_Gamma"; name="Arma 3 - Unarmored Land Vehicles"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item12 + class Item11 { className="A3_Soft_F_Exp"; name="Arma 3 Apex - Unarmored Land Vehicles"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item13 + class Item12 { className="Blastcore_MainCore"; name="Blastcore_MainCore"; }; - class Item14 + class Item13 { className="ace_refuel"; name="ACE3 - Refuel"; author="ACE-Team"; - url="http://ace3mod.com/"; + url="https://ace3.acemod.org/"; }; - class Item15 + class Item14 { className="ace_repair"; name="ACE3 - Repair"; author="ACE-Team"; - url="http://ace3mod.com/"; + url="https://ace3.acemod.org/"; }; }; }; @@ -8294,7 +8286,7 @@ class Mission }; class Entities { - items=54; + items=50; class Item0 { dataType="Logic"; @@ -9089,162 +9081,6 @@ class Mission type="AdvancedAICommand_Commanders"; }; class Item23 - { - dataType="Object"; - class PositionInfo - { - position[]={199.974,5.0005002,192.006}; - }; - side="Empty"; - flags=5; - class Attributes - { - name="respawner_west"; - }; - id=1347; - type="VR_Area_01_square_1x1_yellow_F"; - class CustomAttributes - { - class Attribute0 - { - property="ObjectTextureCustom0"; - expression="_this setObjectTextureGlobal [0,_value]"; - class Value - { - class data - { - class type - { - type[]= - { - "STRING" - }; - }; - value="#(argb,8,8,3)color(0,0.3,0.6,1,co)"; - }; - }; - }; - nAttributes=1; - }; - }; - class Item24 - { - dataType="Object"; - class PositionInfo - { - position[]={300.008,5.0005002,191.563}; - }; - side="Empty"; - flags=5; - class Attributes - { - name="respawner_east"; - }; - id=1348; - type="VR_Area_01_square_1x1_yellow_F"; - class CustomAttributes - { - class Attribute0 - { - property="ObjectTextureCustom0"; - expression="_this setObjectTextureGlobal [0,_value]"; - class Value - { - class data - { - class type - { - type[]= - { - "STRING" - }; - }; - value="#(argb,8,8,3)color(0.5,0,0,1,co)"; - }; - }; - }; - nAttributes=1; - }; - }; - class Item25 - { - dataType="Object"; - class PositionInfo - { - position[]={299.98801,5.0005002,293.979}; - }; - side="Empty"; - flags=5; - class Attributes - { - name="respawner_civ"; - }; - id=1349; - type="VR_Area_01_square_1x1_yellow_F"; - class CustomAttributes - { - class Attribute0 - { - property="ObjectTextureCustom0"; - expression="_this setObjectTextureGlobal [0,_value]"; - class Value - { - class data - { - class type - { - type[]= - { - "STRING" - }; - }; - value="#(argb,8,8,3)color(0.4,0,0.5,1,co)"; - }; - }; - }; - nAttributes=1; - }; - }; - class Item26 - { - dataType="Object"; - class PositionInfo - { - position[]={199.96899,5.0005002,293.98001}; - }; - side="Empty"; - flags=5; - class Attributes - { - name="respawner_guer"; - }; - id=1350; - type="VR_Area_01_square_1x1_yellow_F"; - class CustomAttributes - { - class Attribute0 - { - property="ObjectTextureCustom0"; - expression="_this setObjectTextureGlobal [0,_value]"; - class Value - { - class data - { - class type - { - type[]= - { - "STRING" - }; - }; - value="#(argb,8,8,3)color(0,0.5,0,1,co)"; - }; - }; - }; - nAttributes=1; - }; - }; - class Item27 { dataType="Logic"; class PositionInfo @@ -9257,7 +9093,7 @@ class Mission id=1352; type="HeadlessClient_F"; }; - class Item28 + class Item24 { dataType="Logic"; class PositionInfo @@ -9270,7 +9106,7 @@ class Mission id=1353; type="HeadlessClient_F"; }; - class Item29 + class Item25 { dataType="Logic"; class PositionInfo @@ -9283,7 +9119,7 @@ class Mission id=1354; type="HeadlessClient_F"; }; - class Item30 + class Item26 { dataType="Object"; class PositionInfo @@ -9371,7 +9207,7 @@ class Mission nAttributes=1; }; }; - class Item31 + class Item27 { dataType="Object"; class PositionInfo @@ -9387,7 +9223,7 @@ class Mission id=1381; type="B_AssaultPack_mcamo"; }; - class Item32 + class Item28 { dataType="Object"; class PositionInfo @@ -9404,7 +9240,7 @@ class Mission id=1382; type="B_AssaultPack_ocamo"; }; - class Item33 + class Item29 { dataType="Object"; class PositionInfo @@ -9420,7 +9256,7 @@ class Mission id=1383; type="B_AssaultPack_dgtl"; }; - class Item34 + class Item30 { dataType="Object"; class PositionInfo @@ -9436,7 +9272,7 @@ class Mission id=1385; type="B_CivilianBackpack_01_Everyday_IDAP_F"; }; - class Item35 + class Item31 { dataType="Comment"; class PositionInfo @@ -9447,7 +9283,7 @@ class Mission description="Gearscript in this framework is provided by ACE Arsenal. To add new loadouts, simply go into ACE Arsenal and make them. " \n "" \n "Once you've finished a loadout, press ""EXPORT"" and go to the ""loadouts"" configuration folder. You can paste the loadout code into any of the gear files to set up that unit." \n "" \n "When you paste the loadout, make sure you don't delete the semi-colon ("";"") at the end of each line." \n "" \n "Each Gearscript file also comes with helpful commands to add randomisation and set-up resupply crates. For help and examples, see the ""gear_blufor.sqf"" configuration file."; id=1394; }; - class Item36 + class Item32 { dataType="Comment"; class PositionInfo @@ -9458,7 +9294,7 @@ class Mission description="When any unit is deleted, they will be turned into a Gravestone. These can be any kind of container, but by default they are configured to be backpacks." \n "" \n "You can change the Gravestone that appears for BLUFOR by deleting the backpack here, and then naming a container to ""gravestone_blufor"". The same rule applies to other factions." \n "" \n "You can control the Gravestone system's rules by using the ""gravestones.hpp"" configuration file."; id=1392; }; - class Item37 + class Item33 { dataType="Comment"; class PositionInfo @@ -9469,7 +9305,7 @@ class Mission description="This framework provides a system for setting the identities of each side. For example, you can set the enemy to be ""tanoan"", ""greek"", and they will look and sound the part." \n "" \n "To see all available identites, see the ""identityGroups.sqf"" configuration file inside the ""identities"" folder." \n "" \n "To set-up identities for each side, see the ""identityAssignment.sqf"" configuration file."; id=1395; }; - class Item38 + class Item34 { dataType="Comment"; class PositionInfo @@ -9480,7 +9316,7 @@ class Mission description="When in-game, Loadout Lockers will let you choose loadouts for a specific faction. This one is set to give you BLUFOR loadouts." \n "" \n "You can make Loadout Lockers for other factions by copy-pasting this locker and changing ""blu_f"" inside the Init Field to ""opf_f"", ""ind_f"" or ""civ_f""."; id=1388; }; - class Item39 + class Item35 { dataType="Comment"; class PositionInfo @@ -9491,7 +9327,7 @@ class Mission description="Loot Crates contain random items, like in RPG games (Skyrim, Borderlands etc.)." \n "" \n "You can set-up loot-tables in the ""lootBox.sqf"" configuration file. This is currently considered an advanced feature because loot-tables are not simple to set up. If you have any issues, ask Bubbus for help."; id=1390; }; - class Item40 + class Item36 { dataType="Comment"; class PositionInfo @@ -9502,7 +9338,7 @@ class Mission description="The best way to make a new squad is to copy-paste one of the existing ones. This will keep their gearscript lines and role names intact." \n "" \n "It's also a good idea to create compositions for new squads, enemy patrols etc. This can massively speed up the creation of new missions."; id=1397; }; - class Item41 + class Item37 { dataType="Comment"; class PositionInfo @@ -9513,29 +9349,18 @@ class Mission description="This marker creates an auto-generated list of radio channels. It will show up in-game in the Map screen." \n "" \n "You can move this marker around to move the list. You can also scale this marker up and down to change the size of the list."; id=1389; }; - class Item42 - { - dataType="Comment"; - class PositionInfo - { - position[]={206.3414,5,199.92285}; - }; - title="Respawn Marker"; - description="If the Respawner Object has been deleted or the framework doesn't know where to spawn players, they will respawn at this marker." \n "" \n "Place it somewhere safe (inside a HQ for example)."; - id=1387; - }; - class Item43 + class Item38 { dataType="Comment"; class PositionInfo { - position[]={205.623,5,191.422}; + position[]={205.65401,5,201.24823}; }; - title="Respawner Objects"; - description="See the ""respawnWaves.sqf"" configuration file. " \n "" \n "If it is configured to Base Respawn (a.k.a. RESPAWN_MODE_BASE), then all dead players will respawn at this object." \n "" \n "In Zeus, you can move this object around to change where people spawn." \n "" \n "You can also set a vehicle, plane, or any player as a Respawner Object by using the in-game Zeus module."; + title="Respawns"; + description="CAFE now uses the default Arma Respawn system. You can create new respawn points with the ""Respawn Position"" module." \n "" \n "Arma will always create respawn positions at the ""respawn_west"" marker (etc). These can be removed if desired."; id=1386; }; - class Item44 + class Item39 { dataType="Comment"; class PositionInfo @@ -9546,7 +9371,7 @@ class Mission description="See the ""squadMarkers"" folder inside the configuration folder." \n "" \n "Squad markers are given to each squad inside that file. If you want to add new squads, you can set their Callsign in this editor, and then use that exact same Callsign in the ""squadMarkers_blufor.sqf"" file to set up their colour, icon and more. The same rule applies to different factions." \n "" \n "For more help, see the ""squadMarkers_blufor.sqf"" file for instructions and a default example."; id=1393; }; - class Item45 + class Item40 { dataType="Comment"; class PositionInfo @@ -9557,7 +9382,7 @@ class Mission description="You can delete all of these comments easily by finding the Comments folder in the panel on the left." \n "" \n "Click, Shift+Click, Delete."; id=1398; }; - class Item46 + class Item41 { dataType="Comment"; class PositionInfo @@ -9568,7 +9393,7 @@ class Mission description="This trigger is configured to ignore any Zeuses which fly into it, but any normal player who steps inside is still counted. " \n "" \n "You can copy-paste this trigger if you need more than one."; id=1391; }; - class Item47 + class Item42 { dataType="Group"; side="West"; @@ -10184,7 +10009,7 @@ class Mission class Attribute0 { property="groupID"; - expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; "; + expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; "; class Value { class data @@ -10222,7 +10047,7 @@ class Mission nAttributes=2; }; }; - class Item48 + class Item43 { dataType="Group"; side="West"; @@ -10737,7 +10562,7 @@ class Mission class Attribute0 { property="groupID"; - expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; "; + expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; "; class Value { class data @@ -10775,7 +10600,7 @@ class Mission nAttributes=2; }; }; - class Item49 + class Item44 { dataType="Group"; side="West"; @@ -11290,7 +11115,7 @@ class Mission class Attribute0 { property="groupID"; - expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; "; + expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; "; class Value { class data @@ -11328,7 +11153,7 @@ class Mission nAttributes=2; }; }; - class Item50 + class Item45 { dataType="Group"; side="West"; @@ -11843,7 +11668,7 @@ class Mission class Attribute0 { property="groupID"; - expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; "; + expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; "; class Value { class data @@ -11881,7 +11706,7 @@ class Mission nAttributes=2; }; }; - class Item51 + class Item46 { dataType="Group"; side="West"; @@ -12216,7 +12041,7 @@ class Mission class Attribute0 { property="groupID"; - expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; "; + expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; "; class Value { class data @@ -12254,7 +12079,7 @@ class Mission nAttributes=2; }; }; - class Item52 + class Item47 { dataType="Object"; class PositionInfo @@ -12266,6 +12091,7 @@ class Mission class Attributes { init="[this, ""example""] call f_fnc_setLogiVehicle;"; + name="logi_truck"; }; id=1485; type="B_Truck_01_fuel_F"; @@ -12293,7 +12119,7 @@ class Mission nAttributes=1; }; }; - class Item53 + class Item48 { dataType="Comment"; class PositionInfo @@ -12304,5 +12130,16 @@ class Mission description="This HEMTT is configured to allow an engineer in the command group to spawn new vehicles from it." \n "" \n "You can change the configuration and the permissions around it. See the ""logiVehicles.sqf"" file in the configuration folder for more information."; id=1486; }; + class Item49 + { + dataType="Comment"; + class PositionInfo + { + position[]={205.536,5,192.689}; + }; + title="Advanced respawns"; + description="CAFE offers a ""respawn manager"" system to let you choose when respawn points appear or disappear. Visit the ""respawnLocations.sqf"" file in the ""configuration"" folder to learn more." \n "" \n "(You can also do this in the editor with a ""Respawn Position"" module and a trigger.)"; + id=1493; + }; }; }; diff --git a/startup/configuration/groups/serverConfigGroup.sqf b/startup/configuration/groups/serverConfigGroup.sqf index ed2315ca..ab635406 100644 --- a/startup/configuration/groups/serverConfigGroup.sqf +++ b/startup/configuration/groups/serverConfigGroup.sqf @@ -12,3 +12,6 @@ // Squad markers #include "..\internals\squadMarkers.sqf" + +// Respawn locations +#include "..\..\..\configuration\respawnLocations.sqf" From df3d4df30446018b1c6a2faada48a6f5f417dacb Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 13 Oct 2022 23:36:52 +0100 Subject: [PATCH 11/24] Allowed players to spawn with triggered-waves when respawnOnStart = 1 Allow to define an initial respawn delay when respawnOnStart = 1 Refactored the startup sequence to ensure globals run before preInit config. --- components/respawn/macros.hpp | 3 ++- .../timed/onPlayerKilledOrRespawned.sqf | 11 ++++++++++ .../respawn/triggeredWave/onPlayerKilled.sqf | 11 ++++++++++ .../wave/onPlayerKilledOrRespawned.sqf | 11 ++++++++++ configuration/respawn.hpp | 3 +++ description.ext | 10 ++------- init.sqf | 4 ---- startup/startup_preInit.sqf | 22 +++++++++++++++++++ 8 files changed, 62 insertions(+), 13 deletions(-) create mode 100644 startup/startup_preInit.sqf diff --git a/components/respawn/macros.hpp b/components/respawn/macros.hpp index 51b97ccc..0f019b59 100644 --- a/components/respawn/macros.hpp +++ b/components/respawn/macros.hpp @@ -1 +1,2 @@ -#include "../../macros.hpp" \ No newline at end of file +#include "..\..\macros.hpp" +#include "..\..\configuration\respawn.hpp" \ No newline at end of file diff --git a/components/respawn/timed/onPlayerKilledOrRespawned.sqf b/components/respawn/timed/onPlayerKilledOrRespawned.sqf index 31a7bc20..8721cc92 100644 --- a/components/respawn/timed/onPlayerKilledOrRespawned.sqf +++ b/components/respawn/timed/onPlayerKilledOrRespawned.sqf @@ -7,6 +7,17 @@ if (!isPlayer _newUnit && !isNull _newUnit) exitWith ["Attempting to use 'CAFE_Timed' on AI unit '%1' - can be used only on players.", _newUnit] call BIS_fnc_error; }; +if ((isNil 'f_var_respawn_hadFirstSpawn') and + { + f_var_respawn_hadFirstSpawn = true; + private _isRespawnOnStart = getNumber (missionConfigFile >> "respawnOnStart"); + (_isRespawnOnStart == 1) + }) +exitWith +{ + setPlayerRespawnTime INITIAL_RESPAWN_DELAY; +}; + _respawnDelay = [_newUnit, _respawnDelay] call f_fnc_getPlayerRespawnDelay; setPlayerRespawnTime _respawnDelay; \ No newline at end of file diff --git a/components/respawn/triggeredWave/onPlayerKilled.sqf b/components/respawn/triggeredWave/onPlayerKilled.sqf index 5f8a2aa1..dd25ebb8 100644 --- a/components/respawn/triggeredWave/onPlayerKilled.sqf +++ b/components/respawn/triggeredWave/onPlayerKilled.sqf @@ -7,6 +7,17 @@ if (!isPlayer _newUnit && !isNull _newUnit) exitWith ["Attempting to use 'CAFE_TriggeredWave' on AI unit '%1' - can be used only on players.", _newUnit] call BIS_fnc_error; }; +if ((isNil 'f_var_respawn_hadFirstSpawn') and + { + f_var_respawn_hadFirstSpawn = true; + private _isRespawnOnStart = getNumber (missionConfigFile >> "respawnOnStart"); + (_isRespawnOnStart == 1) + }) +exitWith +{ + setPlayerRespawnTime INITIAL_RESPAWN_DELAY; +}; + setPlayerRespawnTime 1e10; // Wait until wave is triggered or player is alive. Re-enable respawn for local player in either case. diff --git a/components/respawn/wave/onPlayerKilledOrRespawned.sqf b/components/respawn/wave/onPlayerKilledOrRespawned.sqf index 7839816a..ec0c0630 100644 --- a/components/respawn/wave/onPlayerKilledOrRespawned.sqf +++ b/components/respawn/wave/onPlayerKilledOrRespawned.sqf @@ -7,6 +7,17 @@ if (!isPlayer _newUnit && !isNull _newUnit) exitWith ["Attempting to use 'CAFE_Wave' on AI unit '%1' - can be used only on players.", _newUnit] call BIS_fnc_error; }; +if ((isNil 'f_var_respawn_hadFirstSpawn') and + { + f_var_respawn_hadFirstSpawn = true; + private _isRespawnOnStart = getNumber (missionConfigFile >> "respawnOnStart"); + (_isRespawnOnStart == 1) + }) +exitWith +{ + setPlayerRespawnTime INITIAL_RESPAWN_DELAY; +}; + _respawnDelay = [_newUnit, _respawnDelay] call f_fnc_getPlayerRespawnDelay; if (!alive _newUnit) then diff --git a/configuration/respawn.hpp b/configuration/respawn.hpp index 78929b93..c3d68c13 100644 --- a/configuration/respawn.hpp +++ b/configuration/respawn.hpp @@ -14,6 +14,9 @@ #define RESPAWN_WAVE_DURATION 60 +// When 'respawnOnStart = 1' in the description.ext file, this is how long players will wait to spawn in when the mission starts. +#define INITIAL_RESPAWN_DELAY 5 + #define RESPAWN_MODE_BLUFOR RESPAWN_MODE_TRIGGERED_WAVES_TICKETS #define RESPAWN_DELAY_BLUFOR 30 #define RESPAWN_SIDE_TICKETS_BLUFOR 30 diff --git a/description.ext b/description.ext index 5cd9dc86..6ed9c82a 100644 --- a/description.ext +++ b/description.ext @@ -182,15 +182,9 @@ class CfgFunctions { class PreInit { - class clientConfigGroup + class startup_preInit { - file = "startup\configuration\groups\clientConfigGroup_preInit.sqf"; - preInit = 1; - }; - - class serverConfigGroup - { - file = "startup\configuration\groups\serverConfigGroup_preInit.sqf"; + file = "startup\startup_preInit.sqf"; preInit = 1; }; }; diff --git a/init.sqf b/init.sqf index 8f455a70..bcdc70a2 100644 --- a/init.sqf +++ b/init.sqf @@ -35,8 +35,6 @@ if (IS_CLIENT) then { DEBUG_PRINT_LOG("Using CLIENT groups.") - #include "startup\components\globals\clientGlobals.sqf" - #include "customStartup_client.sqf" #include "startup\configuration\groups\clientConfigGroup.sqf" @@ -53,8 +51,6 @@ if (isServer) then { DEBUG_PRINT_LOG("Using SERVER groups.") - #include "startup\components\globals\serverGlobals.sqf" - #include "customStartup_server.sqf" #include "startup\configuration\groups\serverConfigGroup.sqf" diff --git a/startup/startup_preInit.sqf b/startup/startup_preInit.sqf new file mode 100644 index 00000000..2ab280a4 --- /dev/null +++ b/startup/startup_preInit.sqf @@ -0,0 +1,22 @@ +// Ensure globals are run before preInit, so globals are available for preInit. +// Execution order is deliberate below, to give us leeway in case we develop a client preInit that relies on server globals somehow. + +if (hasInterface) then +{ + #include "components\globals\clientGlobals.sqf" +}; + +if (isServer) then +{ + #include "components\globals\serverGlobals.sqf" +}; + +if (hasInterface) then +{ + #include "configuration\groups\clientConfigGroup_preInit.sqf" +}; + +if (isServer) then +{ + #include "configuration\groups\serverConfigGroup_preInit.sqf" +}; \ No newline at end of file From 7927c980320c4fe991e913f35611e5d2719de773 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 13 Oct 2022 23:37:52 +0100 Subject: [PATCH 12/24] Attempt to fix players not getting the right languages upon spawning. --- components/radios/init_component.sqf | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/components/radios/init_component.sqf b/components/radios/init_component.sqf index 2e366874..115b9137 100644 --- a/components/radios/init_component.sqf +++ b/components/radios/init_component.sqf @@ -2,12 +2,6 @@ DEBUG_PRINT_LOG("RADIOS2: initting radios") -// jip check -if (IS_CLIENT) then -{ - WAIT_UNTIL_PLAYER_EXISTS(); -}; - // setup presets _presetSetup = [] call f_fnc_setupRadioPresets; @@ -26,6 +20,16 @@ if (IS_CLIENT) then f_radios_ready = true; + WAIT_UNTIL_PLAYER_EXISTS(); + + player addEventHandler ["Respawn", + { + params ["_unit", "_corpse"]; + [_unit] call f_fnc_clientSetLanguages; + }]; + + [player] call f_fnc_clientSetLanguages; + DEBUG_PRINT_LOG("RADIOS2: done with client init") }; From 2b36638c8af488aaec3d457f4b116baaae0ed9ca Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 13 Oct 2022 23:39:18 +0100 Subject: [PATCH 13/24] Hide default-named groups from the squad picker. Hide the "ZEUS" group from squad picker unless you are a zeus. Ensure a group is always picked when Confirm is pressed, unless there are no groups to pick from. --- .../ui_functions/fn_groupPickerDialog_populateDialog.sqf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/joinInProgress/ui_functions/fn_groupPickerDialog_populateDialog.sqf b/components/joinInProgress/ui_functions/fn_groupPickerDialog_populateDialog.sqf index 347e4087..6f963a38 100644 --- a/components/joinInProgress/ui_functions/fn_groupPickerDialog_populateDialog.sqf +++ b/components/joinInProgress/ui_functions/fn_groupPickerDialog_populateDialog.sqf @@ -25,7 +25,12 @@ _groupList = _display displayCtrl IDC_GROUPPICKER_SQUADLIST; _name = (groupId _x); _text = format ["%1 (%2)", _name, _members]; - if !(_name isEqualTo "Spectators") then + // If group is the spectators group, or a default-named non-important group, or the Zeus group, hide it from the menu. + if !( + (_name isEqualTo "Spectators") + or {_name regexMatch "[A-Z][a-z]+ \d\d?-\d\d?"} + or {(!(player getVariable ["f_var_isZeus", false])) and {(toLower _name) isEqualTo "zeus"}} + ) then { _idx = _groupList lbAdd _text; @@ -45,6 +50,8 @@ for "_i" from 0 to (lbSize _groupList) do _groupList lbSetCurSel _i; }; + _groupList lbSetCurSel 0; + }; From b7a151cc5503e213ea40ff1876997d0141b427c6 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Sat, 15 Oct 2022 19:53:49 +0100 Subject: [PATCH 14/24] Added "redeploy via flagpole" support. Corrected examples in respawnLocations config. --- .../respawn/fn_createRedeployObject.sqf | 60 +++++++++++++++++++ components/respawn/fn_doRedeployAction.sqf | 19 ++++++ components/respawn/functions.hpp | 6 ++ configuration/respawnLocations.sqf | 4 +- 4 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 components/respawn/fn_createRedeployObject.sqf create mode 100644 components/respawn/fn_doRedeployAction.sqf diff --git a/components/respawn/fn_createRedeployObject.sqf b/components/respawn/fn_createRedeployObject.sqf new file mode 100644 index 00000000..22c39157 --- /dev/null +++ b/components/respawn/fn_createRedeployObject.sqf @@ -0,0 +1,60 @@ +#include "macros.hpp" + +params [["_object", nil, [objNull]], ["_target", missionNamespace], ["_respawnName", "", [""]], ["_condition", "true", [""]]]; + +if (isNull _object) exitWith {}; + +if (isServer) then +{ + if (_respawnName isEqualTo "") then + { + _respawnName = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "displayName"); + }; + + [_target, _object, _respawnName] remoteExec ["BIS_fnc_addRespawnPosition", 2, true]; +}; + +CLIENT_ONLY; + +// BUB 2022-10-15 TODO :: Add side-exclusivity by manipulating _condition +// Ex: (_condition) and {playerSide isEqualTo _side} +// Will need some kind of case statement because 'str _side' doesn't work for this purpose. + + +// Wait until mission started to add action. Seems to require this. +[ + // Condition + { + time > 1 + }, + + // Script + { + params ["_object", "_target", "_respawnName", "_condition"]; + + _object addAction + [ + "Redeploy to new location", + { + [] call f_fnc_doRedeployAction; + }, + nil, // arguments + 2, // priority + true, // showWindow + true, // hideOnUse + "", // shortcut + _condition, // condition + 10, // radius + false // unconscious + ]; + }, + + // Arguments + _this, + + // Timeout (secs) + -1 + +] call CBA_fnc_waitUntilAndExecute; + + diff --git a/components/respawn/fn_doRedeployAction.sqf b/components/respawn/fn_doRedeployAction.sqf new file mode 100644 index 00000000..eb4ff3c2 --- /dev/null +++ b/components/respawn/fn_doRedeployAction.sqf @@ -0,0 +1,19 @@ +["open"] call BIS_fnc_showRespawnMenu; + +private _ctrlHeaderButton = uiNamespace getVariable "BIS_RscRespawnControlsMap_ctrlHeaderRespawnButton"; +_ctrlHeaderButton ctrlSetText "Redeploy to location"; +_ctrlHeaderButton ctrlCommit 0; + +_ctrlHeaderButton ctrlAddEventHandler ["ButtonClick", + { + params ["_button"]; + private _respawnSelector = uiNamespace getVariable "BIS_RscRespawnControlsMap_ctrlLocList"; + private _selectedRespawnIdx = lbCurSel _respawnSelector; + + private _posMetadata = ["get", _selectedRespawnIdx] call BIS_fnc_showRespawnMenuPositionMetadata; + _identity = (_posMetadata select 0) select 0; + + if !(isNil "_identity") then {[player,_identity] call BIS_fnc_moveToRespawnPosition}; + ["close"] call BIS_fnc_showRespawnMenu; + } +]; \ No newline at end of file diff --git a/components/respawn/functions.hpp b/components/respawn/functions.hpp index 6e255b69..0a7d1739 100644 --- a/components/respawn/functions.hpp +++ b/components/respawn/functions.hpp @@ -30,3 +30,9 @@ class respawn_triggeredWave_ui file = "components\respawn\triggeredWave\ui_functions"; class triggeredWaveDialog_populateDialog{}; }; +class respawn_redeployment +{ + file = "components\respawn"; + class createRedeployObject{}; + class doRedeployAction{}; +}; diff --git a/configuration/respawnLocations.sqf b/configuration/respawnLocations.sqf index d389075b..e1eaf8c9 100644 --- a/configuration/respawnLocations.sqf +++ b/configuration/respawnLocations.sqf @@ -28,7 +28,7 @@ // // _isCreatedWhen = {!(alive logi_truck)}; // _isRemovedWhen = {false}; // Is never removed. -// [respawn_east, "LOGI REVENGE SPAWNPOINT", west, _isCreatedWhen, _isRemovedWhen] call f_fnc_setRespawnLocation; +// ["respawn_east", "LOGI REVENGE SPAWNPOINT", west, _isCreatedWhen, _isRemovedWhen] call f_fnc_setRespawnLocation; // Advanced example: creates a respawn for BLUFOR which only appears whenever the logi truck is close to it. @@ -37,4 +37,4 @@ // _isCreatedWhen = { (logi_truck distance _myRespawnPosition) <= 50 }; // _isRemovedWhen = { (logi_truck distance _myRespawnPosition) > 50 }; // _isRepeatable = true; -// [respawn_east, "Logi close enough spawnpoint", west, _isCreatedWhen, _isRemovedWhen, _isRepeatable] call f_fnc_setRespawnLocation; \ No newline at end of file +// ["respawn_east", "Logi close enough spawnpoint", west, _isCreatedWhen, _isRemovedWhen, _isRepeatable] call f_fnc_setRespawnLocation; \ No newline at end of file From c2f122cd0641e8996b1b1d1d80e7924a3b66e2d9 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Tue, 15 Nov 2022 02:08:39 +0000 Subject: [PATCH 15/24] Doubled down on the respawn position module despite some flaws, until I can get the code-based alternative working again. Misc fixes. --- .../respawn/fn_createRedeployObject.sqf | 12 +- .../respawn/fn_moduleRespawnPosition.sqf | 185 + components/respawn/functions.hpp | 1 + components/respawn/init_component.sqf | 33 + configuration/respawnLocations.sqf | 40 - mission.sqm | 6205 ++++------------- .../groups/serverConfigGroup.sqf | 3 - 7 files changed, 1605 insertions(+), 4874 deletions(-) create mode 100644 components/respawn/fn_moduleRespawnPosition.sqf delete mode 100644 configuration/respawnLocations.sqf diff --git a/components/respawn/fn_createRedeployObject.sqf b/components/respawn/fn_createRedeployObject.sqf index 22c39157..bd63f1ed 100644 --- a/components/respawn/fn_createRedeployObject.sqf +++ b/components/respawn/fn_createRedeployObject.sqf @@ -2,6 +2,9 @@ params [["_object", nil, [objNull]], ["_target", missionNamespace], ["_respawnName", "", [""]], ["_condition", "true", [""]]]; +diag_log "WOWEE 1"; +diag_log str _this; + if (isNull _object) exitWith {}; if (isServer) then @@ -32,6 +35,9 @@ CLIENT_ONLY; { params ["_object", "_target", "_respawnName", "_condition"]; + diag_log "WOWEE 2"; + diag_log str _this; + _object addAction [ "Redeploy to new location", @@ -39,18 +45,18 @@ CLIENT_ONLY; [] call f_fnc_doRedeployAction; }, nil, // arguments - 2, // priority + 2, // priority true, // showWindow true, // hideOnUse "", // shortcut - _condition, // condition + _condition, // condition 10, // radius false // unconscious ]; }, // Arguments - _this, + [_object, _target, _respawnName, _condition], // Timeout (secs) -1 diff --git a/components/respawn/fn_moduleRespawnPosition.sqf b/components/respawn/fn_moduleRespawnPosition.sqf new file mode 100644 index 00000000..2d814b3a --- /dev/null +++ b/components/respawn/fn_moduleRespawnPosition.sqf @@ -0,0 +1,185 @@ +_logic = _this param [0,objnull,[objnull]]; +_activated = _this param [2,true,[true]]; + +systemChat "beep"; + +if (_activated) then { + + //--- Draw respan positions for players + true call bis_fnc_drawRespawnPositions; + if !(isserver) exitwith {}; + + //--- Server init + _typeID = 0; + _sideID = 0; + + _name = _logic getvariable ["Name",""]; + if (isnumber (configfile >> "cfgvehicles" >> typeof _logic >> "respawnSide")) then { + //--- Module with pre-define params + _sideID = getnumber (configfile >> "cfgvehicles" >> typeof _logic >> "respawnSide"); + _typeID = getnumber (configfile >> "cfgvehicles" >> typeof _logic >> "respawnType"); + } else { + //--- Module with adjustable params + _typeID = (_logic getvariable ["Type","0"]) call BIS_fnc_parseNumberSafe; + _sideID = (_logic getvariable ["Side","-1"]) call BIS_fnc_parseNumberSafe; + }; + _showNotification = (_logic getvariable ["ShowNotification","1"]) call BIS_fnc_parseNumberSafe; + + //--- Detect the leading side + if (_sideID < 0) then { + if (ismultiplayer) then { + _maxScore = -1; + { + _score = scoreside _x; + if (_score > _maxScore) then { + _maxScore = _score; + _sideID = _x call bis_fnc_sideID; + } else { + if (_score == _maxScore) then { + _sideID = -1; + }; + }; + } foreach [opfor,blufor,independent,civilian]; + } else { + _sideID = (player call bis_fnc_objectSide) call bis_fnc_sideID; + }; + }; + + if (_sideID in [0,1,2,3]) then { + private ["_side","_pos","_markerPrefix","_markerType","_respawnPositions","_respawnObjects","_type","_respawn"]; + _side = _sideID call bis_fnc_sideType; + _pos = position _logic; + _markerType = ["respawn_inf","respawn_unknown","respawn_motor","respawn_armor","respawn_air","respawn_plane","respawn_naval"] select _typeID; + _respawnPositions = []; + _respawnObjects = []; + + if (_typeID > 0) then { + private ["_markerSide"]; + _markerSide = ["east","west","guerrila","civilian"] select _sideID; + _respawn = "respawn_vehicle_" + _markerSide + str _pos; + createmarker [_respawn,_pos]; + _respawn setmarkerdir ((round direction _logic) * 360); + _respawn setmarkersize [1,1]; + _respawn setmarkercolor ([_side,true] call bis_fnc_sidecolor); + _respawn setmarkertype _markerType; + _logic setvariable ["marker",_respawn]; + //_respawn setmarkertext (_name call bis_fnc_localize); + _respawnPositions pushback _respawn; + _respawnObjects pushback objnull; + } else { + //--- Respawn in vehicle + { + if (typeName _x isEqualTo "OBJECT") then { + _respawn = [_side,_x,_name] call bis_fnc_addRespawnPosition; + _respawnPositions pushback _respawn; + _respawnObjects pushback _x; + }; + } foreach (synchronizedobjects _logic); + + private _markerName = _logic getVariable ["markerName", ""]; + if (_markerName isNotEqualTo "") then + { + systemChat "adding marker"; + _respawn = [_side,_markerName,_name] call bis_fnc_addRespawnPosition; + _respawnPositions pushback _respawn; + _respawnObjects pushback objnull; + }; + + //--- Respawn on position (when no vehicles are synced) + if (count _respawnPositions == 0) then { + _respawn = [_side,_logic,_name] call bis_fnc_addRespawnPosition; + _respawnPositions pushback _respawn; + _respawnObjects pushback objnull; + }; + }; + _logic setvariable ["respawn",_respawnPositions]; + + //--- Show notifications + _type = gettext (configfile >> "cfgmarkers" >> _markerType >> "name"); + { + if (_name == "") then { + private ["_namePos"]; + _name = ""; + _namePos = [0,0,0]; + _veh = _respawnObjects select _foreachindex; + if (!isnull _veh) then { + _name = gettext (configfile >> "cfgvehicles" >> (typeof _veh) >> "displayname"); + _namePos = position _veh; + } else { + _name = format [localize "str_a3_bis_fnc_respawnmenuposition_grid",mapgridposition _pos]; + _namePos = _pos; + }; + _name = _name + " - " + (_namePos call bis_fnc_locationdescription); + } else { + _name = _name call bis_fnc_localize; + }; + + if (_showNotification > 0) then + { + [["RespawnAdded",[_type,_name,_markerType call bis_fnc_textureMarker]],"BIS_fnc_showNotification",_side] call bis_fnc_mp; + }; + } foreach _respawnPositions; + + //--- Update markers and actual module positions + _list = missionnamespace getvariable ["BIS_fnc_moduleRespawnPosition_list",[]]; + _list pushback _logic; + missionnamespace setvariable ["BIS_fnc_moduleRespawnPosition_list",_list]; + if (isnil "BIS_fnc_moduleRespawnPosition_loop") then { + BIS_fnc_moduleRespawnPosition_loop = [] spawn { + scriptname "bis_fnc_moduleRespawnPosition: Loop"; + _listMarkers = []; + waituntil { + _list = missionnamespace getvariable ["BIS_fnc_moduleRespawnPosition_list",[]]; + _refresh = false; + { + if !(isnull _x) then { + //--- Update position + _pos = _x getvariable ["BIS_fnc_position_forced",[0,0,0]]; + if (position _x distance _pos > 0) then { + _pos = position _x; + _x setvariable ["BIS_fnc_position_forced",_pos,true]; //--- Force rewire for BIS_fnc_position + + _marker = _x getvariable ["marker",""]; + if (_marker != "") then { + _marker setmarkerpos _pos; + if !(_marker in _listMarkers) then {_listMarkers pushback _marker;}; + }; + }; + } else { + _refresh = true; + }; + sleep 0.1; + } foreach _list; + if (_refresh) then { + //--- Remove deleted modules from the list + _list = _list - [objnull]; + missionnamespace setvariable ["BIS_fnc_moduleRespawnPosition_list",_list]; + + //--- Remove markers of deleted modules + _listMarkersDelete = +_listMarkers; + { + _listMarkersDelete = _listMarkersDelete - [_x getvariable ["marker",""]]; + } foreach _list; + {deletemarker _x;} foreach _listMarkersDelete; + }; + count _list == 0 + }; + BIS_fnc_moduleRespawnPosition_loop = nil; + }; + }; + } else { + ["Respawn %1 not added, all sides have the same score.",_logic] call bis_fnc_logFormat; + }; +} else { + + //--- Remove + _respawnPositions = _logic getvariable ["respawn",[]]; + { + if (typename _x == typename []) then { + _x call bis_fnc_removeRespawnPosition; + } else { + deletemarker _x; + }; + } foreach _respawnPositions; + _logic setvariable ["respawn",nil]; +}; \ No newline at end of file diff --git a/components/respawn/functions.hpp b/components/respawn/functions.hpp index 0a7d1739..3ecd175b 100644 --- a/components/respawn/functions.hpp +++ b/components/respawn/functions.hpp @@ -4,6 +4,7 @@ class respawn class addFreeTicket{}; class getPlayerRespawnDelay{}; class isRespawnModeActive{}; + class moduleRespawnPosition{}; }; class respawn_locationSystem { diff --git a/components/respawn/init_component.sqf b/components/respawn/init_component.sqf index 3bec3e8a..931e33a8 100644 --- a/components/respawn/init_component.sqf +++ b/components/respawn/init_component.sqf @@ -167,4 +167,37 @@ if (hasInterface) then } ] call CBA_fnc_addEventHandler; + + // Work around an issue where a player can get locked into an unrecoverable state + // when they go back to the map respawn screen from the spectate respawn screen. + f_fnc_disableReturnFromSpectateScreen = + { + private _returnToMapButton = uiNamespace getVariable ["bis_rscrespawncontrolsspectate_ctrlbuttonspectate", controlNull]; + + if (!isNull _returnToMapButton) then + { + _returnToMapButton ctrlEnable false; + _returnToMapButton ctrlShow false; + }; + + // Wait until element needs modification again. + [ + { + private _returnToMapButton = uiNamespace getVariable ["bis_rscrespawncontrolsspectate_ctrlbuttonspectate", controlNull]; + (!isNull _returnToMapButton) and {(ctrlEnabled _returnToMapButton) or {ctrlShown _returnToMapButton}} + }, + f_fnc_disableReturnFromSpectateScreen, + [] + ] call CBA_fnc_waitUntilAndExecute; + }; + + // Wait until element has been created, then disable it. + [ + { + !isNull (uiNamespace getVariable ["bis_rscrespawncontrolsspectate_ctrlbuttonspectate", controlNull]); + }, + f_fnc_disableReturnFromSpectateScreen, + [] + ] call CBA_fnc_waitUntilAndExecute; + }; diff --git a/configuration/respawnLocations.sqf b/configuration/respawnLocations.sqf deleted file mode 100644 index e1eaf8c9..00000000 --- a/configuration/respawnLocations.sqf +++ /dev/null @@ -1,40 +0,0 @@ -#include "..\respawn_macros.hpp" - -/* - Respawn locations configuration file. - - Be aware: because the framework uses the normal Arma Respawn system, you can use the "Respawn Position" module instead of this file. - This file is useful for setting up respawn points with advanced behaviour (using the framework's respawn features). - This file is also treated as a code file (unscheduled), so you can set up complex scenarios here if you know SQF. - - Also be aware: Arma Respawn will disable respawn points if the spawner object is killed or if enemies are too close (~100m). - - Available configuration commands: - (All commands are also usable in the mission editor, in the "Init" field.) - - [, "Optional Name", , {Creation Criterion}, {Removal Criterion}, ] call f_fnc_setRespawnLocation; - - Sets an object as a respawn object. -*/ - -// Example: creates a respawn for everyone in every faction, 200m in the air. -// [[0,0,200], "Chaos Parachute Zone"] call f_fnc_setRespawnLocation; - - -// Example: creates a respawn for BLUFOR on their default logi truck. -// [logi_truck, "BLUFOR Logi Truck", west] call f_fnc_setRespawnLocation; - - -// Advanced example: creates a respawn for BLUFOR at the OPFOR spawn marker, which only appears when BLUFOR logi truck is killed. -// -// _isCreatedWhen = {!(alive logi_truck)}; -// _isRemovedWhen = {false}; // Is never removed. -// ["respawn_east", "LOGI REVENGE SPAWNPOINT", west, _isCreatedWhen, _isRemovedWhen] call f_fnc_setRespawnLocation; - - -// Advanced example: creates a respawn for BLUFOR which only appears whenever the logi truck is close to it. -// -// _myRespawnPosition = [300, 300, 0]; // Map position (meters): east, north, height. -// _isCreatedWhen = { (logi_truck distance _myRespawnPosition) <= 50 }; -// _isRemovedWhen = { (logi_truck distance _myRespawnPosition) > 50 }; -// _isRepeatable = true; -// ["respawn_east", "Logi close enough spawnpoint", west, _isCreatedWhen, _isRemovedWhen, _isRepeatable] call f_fnc_setRespawnLocation; \ No newline at end of file diff --git a/mission.sqm b/mission.sqm index 79a54962..5b61fb6b 100644 --- a/mission.sqm +++ b/mission.sqm @@ -6,24 +6,28 @@ class EditorData scaleGridStep=1; autoGroupingDist=10; toggles=513; + mods[]= + { + "WBK_Zombies_AdvancedEditorSettings" + }; class ItemIDProvider { - nextID=1494; + nextID=1559; }; class MarkerIDProvider { - nextID=5; + nextID=7; }; class Camera { - pos[]={240.14539,99.70607,88.864609}; - dir[]={0.022160936,-0.61081654,0.79146558}; - up[]={0.017095979,0.79177129,0.6105783}; - aside[]={0.99961078,9.7636075e-008,-0.027989274}; + pos[]={176.17284,83.197174,94.299255}; + dir[]={0.34651116,-0.44708556,0.82465678}; + up[]={0.17319427,0.89448386,0.4121837}; + aside[]={0.92192632,-1.7072307e-007,-0.38738352}; }; }; binarizationWanted=0; -sourceName="CAFE"; +sourceName="CAFERespawn"; addons[]= { "A3_Modules_F_Curator_Curator", @@ -32,6 +36,7 @@ addons[]= "ace_cargo", "A3_Supplies_F_Orange_Ammoboxes", "AICommand", + "A3_Structures_F_Bootcamp_VR_Helpers", "A3_Characters_F", "3den_Objects", "A3_Supplies_F_AoW_Bags", @@ -40,13 +45,15 @@ addons[]= "A3_Soft_F_Exp_Truck_01", "Blastcore_MainCore", "ace_refuel", - "ace_repair" + "ace_repair", + "A3_Structures_F_Mil_Flags", + "A3_Modules_F_Multiplayer" }; class AddonsMetaData { class List { - items=15; + items=18; class Item0 { className="A3_Modules_F_Curator"; @@ -88,64 +95,85 @@ class AddonsMetaData name="AICommand"; }; class Item6 + { + className="A3_Structures_F_Bootcamp"; + name="Arma 3 Bootcamp Update - Buildings and Structures"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; + class Item7 { className="A3_Characters_F"; name="Arma 3 Alpha - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item7 + class Item8 { className="3den_Objects"; name="3den_Objects"; }; - class Item8 + class Item9 { className="A3_Supplies_F_AoW"; name="Arma 3 Art of War - Ammoboxes and Supplies"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item9 + class Item10 { className="ace_explosives"; name="ACE3 - Explosives"; author="ACE-Team"; url="https://ace3.acemod.org/"; }; - class Item10 + class Item11 { className="A3_Soft_F_Gamma"; name="Arma 3 - Unarmored Land Vehicles"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item11 + class Item12 { className="A3_Soft_F_Exp"; name="Arma 3 Apex - Unarmored Land Vehicles"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item12 + class Item13 { className="Blastcore_MainCore"; name="Blastcore_MainCore"; }; - class Item13 + class Item14 { className="ace_refuel"; name="ACE3 - Refuel"; author="ACE-Team"; url="https://ace3.acemod.org/"; }; - class Item14 + class Item15 { className="ace_repair"; name="ACE3 - Repair"; author="ACE-Team"; url="https://ace3.acemod.org/"; }; + class Item16 + { + className="A3_Structures_F_Mil"; + name="Arma 3 - Military Buildings and Structures"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; + class Item17 + { + className="A3_Modules_F"; + name="Arma 3 Alpha - Scripted Modules"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; }; }; dlcs[]= @@ -177,13 +205,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=4; @@ -191,13 +213,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="#CBA_HASH#"; }; }; @@ -205,13 +221,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=135; @@ -219,13 +229,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="cf_bai_subskills_terrain_maximum_world_code"; }; }; @@ -233,13 +237,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_explosives_requirespecialist"; }; }; @@ -247,13 +245,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_explosives_punishnonspecialists"; }; }; @@ -261,13 +253,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_explosives_explodeondefuse"; }; }; @@ -275,13 +261,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_cookoff_ammocookoffduration"; }; }; @@ -289,13 +269,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_interact_menu_alwaysusecursorselfinteraction"; }; }; @@ -303,13 +277,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_bleedingcoefficient"; }; }; @@ -317,13 +285,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_paincoefficient"; }; }; @@ -331,13 +293,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_ivflowrate"; }; }; @@ -345,13 +301,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_rearm_level"; }; }; @@ -359,13 +309,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_rearm_supply"; }; }; @@ -373,13 +317,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_repair_repairdamagethreshold"; }; }; @@ -387,13 +325,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_repair_repairdamagethreshold_engineer"; }; }; @@ -401,13 +333,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_repair_fullrepairlocation"; }; }; @@ -415,13 +341,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_repair_engineersetting_fullrepair"; }; }; @@ -429,13 +349,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_repair_autoshutoffenginewhenstartingrepair"; }; }; @@ -443,13 +357,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_weather_enabled"; }; }; @@ -457,13 +365,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_weather_windsimulation"; }; }; @@ -471,13 +373,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_cargo_enable"; }; }; @@ -485,13 +381,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_cargo_loadtimecoefficient"; }; }; @@ -499,13 +389,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_cargo_paradroptimecoefficent"; }; }; @@ -513,13 +397,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_limping"; }; }; @@ -527,13 +405,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_fractures"; }; }; @@ -541,13 +413,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_spontaneouswakeupchance"; }; }; @@ -555,13 +421,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_spontaneouswakeupepinephrineboost"; }; }; @@ -569,13 +429,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_blood_maxbloodobjects"; }; }; @@ -583,13 +437,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_fataldamagesource"; }; }; @@ -597,13 +445,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_playerdamagethreshold"; }; }; @@ -611,13 +453,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_aidamagethreshold"; }; }; @@ -625,13 +461,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_statemachine_fatalinjuriesplayer"; }; }; @@ -639,13 +469,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_statemachine_fatalinjuriesai"; }; }; @@ -653,13 +477,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_statemachine_aiunconsciousness"; }; }; @@ -667,13 +485,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_statemachine_cardiacarresttime"; }; }; @@ -681,13 +493,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_advanceddiagnose"; }; }; @@ -695,13 +501,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_advancedmedication"; }; }; @@ -709,13 +509,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_cleartraumaafterbandage"; }; }; @@ -723,13 +517,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_allowsharedequipment"; }; }; @@ -737,13 +525,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_convertitems"; }; }; @@ -751,13 +533,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_medicepinephrine"; }; }; @@ -765,13 +541,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_locationepinephrine"; }; }; @@ -779,13 +549,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_medicpak"; }; }; @@ -793,13 +557,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_locationpak"; }; }; @@ -807,13 +565,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_medicsurgicalkit"; }; }; @@ -821,13 +573,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_locationsurgicalkit"; }; }; @@ -835,13 +581,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_allowselfstitch"; }; }; @@ -849,13 +589,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_allowselfiv"; }; }; @@ -863,13 +597,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_cprsuccesschance"; }; }; @@ -877,13 +605,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="acex_fortify_settinghint"; }; }; @@ -891,13 +613,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_adminfullaccess"; }; }; @@ -905,13 +621,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_csw_defaultassemblymode"; }; }; @@ -919,13 +629,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_csw_handleextramagazines"; }; }; @@ -933,13 +637,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_csw_ammohandling"; }; }; @@ -947,13 +645,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_csw_progressbartimecoefficent"; }; }; @@ -961,13 +653,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_csw_dragafterdeploy"; }; }; @@ -975,13 +661,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_advanced_fatigue_enabled"; }; }; @@ -989,13 +669,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="zen_common_autoaddobjects"; }; }; @@ -1003,13 +677,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_finger_enabled"; }; }; @@ -1017,13 +685,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_finger_maxrange"; }; }; @@ -1031,13 +693,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_finger_indicatorforself"; }; }; @@ -1045,13 +701,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_interaction_disablenegativerating"; }; }; @@ -1059,13 +709,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_magazinerepack_timeperammo"; }; }; @@ -1073,13 +717,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_magazinerepack_timepermagazine"; }; }; @@ -1087,13 +725,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_magazinerepack_timeperbeltlink"; }; }; @@ -1101,13 +733,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_respawn_removedeadbodiesdisconnected"; }; }; @@ -1115,13 +741,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="acex_sitting_enable"; }; }; @@ -1129,13 +749,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_zeus_autoaddobjects"; }; }; @@ -1143,13 +757,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="acex_headless_enabled"; }; }; @@ -1157,13 +765,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_map_mapshowcursorcoordinates"; }; }; @@ -1171,13 +773,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_map_defaultchannel"; }; }; @@ -1185,13 +781,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_nightvision_effectscaling"; }; }; @@ -1199,13 +789,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_nightvision_fogscaling"; }; }; @@ -1213,13 +797,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_nightvision_noisescaling"; }; }; @@ -1227,13 +805,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_nightvision_aimdownsightsblur"; }; }; @@ -1241,13 +813,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_nightvision_disablenvgswithsights"; }; }; @@ -1255,13 +821,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_pylons_enabledfromammotrucks"; }; }; @@ -1269,13 +829,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_pylons_enabledforzeus"; }; }; @@ -1283,13 +837,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_pylons_rearmnewpylons"; }; }; @@ -1297,13 +845,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_pylons_requireengineer"; }; }; @@ -1311,13 +853,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_pylons_requiretoolkit"; }; }; @@ -1325,13 +861,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_refuel_rate"; }; }; @@ -1339,13 +869,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_repair_engineersetting_repair"; }; }; @@ -1353,13 +877,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_repair_engineersetting_wheel"; }; }; @@ -1367,13 +885,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_fracturechance"; }; }; @@ -1381,13 +893,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_statemachine_cardiacarrestbleedoutenabled"; }; }; @@ -1395,13 +901,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_advancedbandages"; }; }; @@ -1409,13 +909,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_woundreopenchance"; }; }; @@ -1423,13 +917,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_locationsboosttraining"; }; }; @@ -1437,13 +925,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_treatmenttimeautoinjector"; }; }; @@ -1451,13 +933,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_treatmenttimetourniquet"; }; }; @@ -1465,13 +941,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_treatmenttimesplint"; }; }; @@ -1479,13 +949,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_treatmenttimebodybag"; }; }; @@ -1493,13 +957,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_consumepak"; }; }; @@ -1507,13 +965,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_allowselfpak"; }; }; @@ -1521,13 +973,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_timecoefficientpak"; }; }; @@ -1535,13 +981,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_consumesurgicalkit"; }; }; @@ -1549,13 +989,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_woundstitchtime"; }; }; @@ -1563,13 +997,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_mediciv"; }; }; @@ -1577,13 +1005,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_treatmenttimeiv"; }; }; @@ -1591,13 +1013,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_treatmenttimecpr"; }; }; @@ -1605,13 +1021,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_allowbodybagunconscious"; }; }; @@ -1619,13 +1029,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_holsterrequired"; }; }; @@ -1633,13 +1037,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_treatment_maxlitterobjects"; }; }; @@ -1647,13 +1045,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_zeus_cancreatezeus"; }; }; @@ -1661,13 +1053,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_adminlimitside"; }; }; @@ -1675,13 +1061,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_giveuavterminal"; }; }; @@ -1689,13 +1069,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_directactionrequirement"; }; }; @@ -1703,13 +1077,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_removesupportonvehicledeletion"; }; }; @@ -1717,13 +1085,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_deletevehicleonentityremoval"; }; }; @@ -1731,13 +1093,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_cleanupcrew"; }; }; @@ -1745,13 +1101,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_resetvehicleonrtb"; }; }; @@ -1759,13 +1109,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_restorecrewonrtb"; }; }; @@ -1773,13 +1117,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_milsimmodeartillery"; }; }; @@ -1787,13 +1125,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_milsimmodecas"; }; }; @@ -1801,13 +1133,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_milsimmodetransport"; }; }; @@ -1815,13 +1141,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="sss_setting_milsimmodelogistics"; }; }; @@ -1829,13 +1149,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="grad_trenches_functions_allowdigging"; }; }; @@ -1843,13 +1157,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="grad_trenches_functions_allowcamouflage"; }; }; @@ -1857,13 +1165,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="grad_trenches_functions_camouflagerequireentrenchmenttool"; }; }; @@ -1871,13 +1173,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="grad_trenches_functions_stopbuildingatfatiguemax"; }; }; @@ -1885,13 +1181,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="grad_trenches_functions_buildfatiguefactor"; }; }; @@ -1899,13 +1189,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_medical_ai_enabledfor"; }; }; @@ -1913,13 +1197,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_scopes_simplifiedzeroing"; }; }; @@ -1927,13 +1205,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_winddeflection_simulationinterval"; }; }; @@ -1941,13 +1213,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_hearing_enablecombatdeafness"; }; }; @@ -1955,13 +1221,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_hearing_enabledforzeusunits"; }; }; @@ -1969,13 +1229,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_hearing_autoaddearplugstounits"; }; }; @@ -1983,13 +1237,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_gforces_enabledfor"; }; }; @@ -1997,13 +1245,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_map_gestures_briefingmode"; }; }; @@ -2011,13 +1253,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_map_gestures_onlyshowfriendlys"; }; }; @@ -2025,13 +1261,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ace_refuel_hoselength"; }; }; @@ -2039,13 +1269,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="cafe_downtime_spectatorcameramodes"; }; }; @@ -2053,13 +1277,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="zhc_offload_enabled"; }; }; @@ -2067,13 +1285,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="zhc_offload_debugmode"; }; }; @@ -2081,13 +1293,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="zhc_stat_enablefpscounter"; }; }; @@ -2095,13 +1301,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="zhc_dynsim_override"; }; }; @@ -2112,13 +1312,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=135; @@ -2126,13 +1320,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2140,13 +1328,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="[[""pja310"",25],[""Panthera3"",25]]"; }; }; @@ -2154,13 +1336,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2171,13 +1347,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2185,13 +1355,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -2199,13 +1363,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2216,13 +1374,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2230,13 +1382,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -2244,13 +1390,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2261,13 +1401,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2275,13 +1409,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -2289,13 +1417,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2306,13 +1428,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2320,13 +1436,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.472689; }; }; @@ -2334,13 +1444,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2351,13 +1455,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2365,13 +1463,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -2379,13 +1471,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -2396,13 +1482,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2410,13 +1490,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.47524899; }; }; @@ -2424,13 +1498,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2441,13 +1509,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2455,13 +1517,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.46686199; }; }; @@ -2469,13 +1525,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2486,13 +1536,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2500,13 +1544,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=9.9800501; }; }; @@ -2514,13 +1552,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2531,13 +1563,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2545,13 +1571,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2559,13 +1579,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2576,13 +1590,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2590,13 +1598,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2604,13 +1606,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2621,13 +1617,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2635,13 +1625,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.74969101; }; }; @@ -2649,13 +1633,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2666,13 +1644,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2680,13 +1652,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.75081098; }; }; @@ -2694,13 +1660,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2711,13 +1671,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2725,13 +1679,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=3; }; }; @@ -2739,13 +1687,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2756,13 +1698,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2770,13 +1706,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2784,13 +1714,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2801,13 +1725,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2815,13 +1733,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -2829,13 +1741,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2846,13 +1752,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2860,13 +1760,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -2874,13 +1768,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2891,13 +1779,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2905,13 +1787,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -2919,13 +1795,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2936,13 +1806,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2950,13 +1814,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -2964,13 +1822,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -2981,13 +1833,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -2995,13 +1841,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.96236098; }; }; @@ -3009,13 +1849,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3026,13 +1860,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3040,13 +1868,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.070031904; }; }; @@ -3054,13 +1876,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3071,13 +1887,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3085,13 +1895,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3099,13 +1903,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3116,13 +1914,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3130,13 +1922,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3144,13 +1930,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3161,13 +1941,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3175,13 +1949,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3189,13 +1957,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3206,13 +1968,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3220,13 +1976,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=9.9927197; }; }; @@ -3234,13 +1984,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3251,13 +1995,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3265,13 +2003,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=100; }; }; @@ -3279,13 +2011,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3296,13 +2022,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3310,13 +2030,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -3324,13 +2038,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3341,13 +2049,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3355,13 +2057,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.5; }; }; @@ -3369,13 +2065,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3386,13 +2076,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3400,13 +2084,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3414,13 +2092,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3431,13 +2103,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3445,13 +2111,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3459,13 +2119,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3476,13 +2130,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3490,13 +2138,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -3504,13 +2146,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3521,13 +2157,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3535,13 +2165,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -3549,13 +2173,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3566,13 +2184,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3580,13 +2192,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=90; }; }; @@ -3594,13 +2200,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3611,13 +2211,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3625,13 +2219,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -3639,13 +2227,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3656,13 +2238,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3670,13 +2246,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -3684,13 +2254,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3701,13 +2265,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3715,13 +2273,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -3729,13 +2281,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3746,13 +2292,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3760,13 +2300,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3774,13 +2308,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3791,13 +2319,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3805,13 +2327,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -3819,13 +2335,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3836,13 +2346,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3850,13 +2354,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -3864,13 +2362,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3881,13 +2373,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3895,13 +2381,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -3909,13 +2389,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3926,13 +2400,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3940,13 +2408,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3954,13 +2416,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -3971,13 +2427,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -3985,13 +2435,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=3; }; }; @@ -3999,13 +2443,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4016,13 +2454,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4030,13 +2462,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4044,13 +2470,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4061,13 +2481,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4075,13 +2489,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -4089,13 +2497,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4106,27 +2508,15 @@ class CustomAttributes { class data { - class type + singleType="ARRAY"; + class value { - type[]= - { - "ARRAY" - }; - }; - class value - { - items=2; - class Item0 + items=2; + class Item0 { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4134,13 +2524,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4151,13 +2535,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4165,13 +2543,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4179,13 +2551,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4196,13 +2562,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4210,13 +2570,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4224,13 +2578,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4241,13 +2589,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4255,13 +2597,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4269,13 +2605,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4286,13 +2616,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4300,13 +2624,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -4314,13 +2632,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4331,13 +2643,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4345,13 +2651,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -4359,13 +2659,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4376,13 +2670,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4390,13 +2678,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -4404,13 +2686,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4421,13 +2697,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4435,13 +2705,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -4449,13 +2713,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4466,13 +2724,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4480,13 +2732,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.5; }; }; @@ -4494,13 +2740,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4511,13 +2751,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4525,13 +2759,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -4539,13 +2767,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4556,13 +2778,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4570,13 +2786,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -4584,13 +2794,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4601,13 +2805,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4615,13 +2813,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -4629,13 +2821,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4646,13 +2832,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4660,13 +2840,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -4674,13 +2848,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4691,13 +2859,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4705,13 +2867,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=10; }; }; @@ -4719,13 +2875,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4736,13 +2886,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4750,13 +2894,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -4764,13 +2902,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4781,13 +2913,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4795,13 +2921,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -4809,13 +2929,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4826,13 +2940,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4840,13 +2948,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4854,13 +2956,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4871,13 +2967,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4885,13 +2975,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4899,13 +2983,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4916,13 +2994,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4930,13 +3002,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=6.0324702; }; }; @@ -4944,13 +3010,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -4961,13 +3021,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -4975,13 +3029,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -4989,13 +3037,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5006,13 +3048,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5020,13 +3056,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -5034,13 +3064,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5051,13 +3075,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5065,13 +3083,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -5079,13 +3091,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5096,13 +3102,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5110,13 +3110,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -5124,13 +3118,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5141,13 +3129,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5155,13 +3137,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -5169,13 +3145,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5186,13 +3156,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5200,13 +3164,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5214,13 +3172,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5231,13 +3183,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5245,13 +3191,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5259,13 +3199,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5276,13 +3210,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5290,13 +3218,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.54338002; }; }; @@ -5304,13 +3226,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5321,13 +3237,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5335,13 +3245,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.34045899; }; }; @@ -5349,13 +3253,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5366,13 +3264,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5380,13 +3272,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -5394,13 +3280,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5411,13 +3291,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5425,13 +3299,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -5439,13 +3307,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5456,13 +3318,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5470,13 +3326,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -5484,13 +3334,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5501,13 +3345,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5515,13 +3353,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -5529,13 +3361,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5546,13 +3372,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5560,13 +3380,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -5574,13 +3388,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5591,13 +3399,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5605,13 +3407,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -5619,13 +3415,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5636,13 +3426,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5650,13 +3434,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -5664,13 +3442,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5681,13 +3453,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5695,13 +3461,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -5709,13 +3469,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5726,13 +3480,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5740,13 +3488,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5754,13 +3496,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5771,13 +3507,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5785,13 +3515,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -5799,13 +3523,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5816,13 +3534,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5830,13 +3542,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.80000001; }; }; @@ -5844,13 +3550,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5861,13 +3561,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5875,13 +3569,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -5889,13 +3577,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5906,13 +3588,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5920,13 +3596,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5934,13 +3604,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5951,13 +3615,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -5965,13 +3623,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.202923; }; }; @@ -5979,13 +3631,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -5996,13 +3642,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6010,13 +3650,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -6024,13 +3658,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6041,13 +3669,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6055,13 +3677,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=5; }; }; @@ -6069,13 +3685,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6086,13 +3696,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6100,13 +3704,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=4; }; }; @@ -6114,13 +3712,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6131,13 +3723,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6145,13 +3731,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=7; }; }; @@ -6159,13 +3739,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6176,13 +3750,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6190,13 +3758,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=10; }; }; @@ -6204,13 +3766,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6221,13 +3777,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6235,13 +3785,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -6249,13 +3793,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6266,13 +3804,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6280,13 +3812,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6294,13 +3820,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6311,13 +3831,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6325,13 +3839,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.569309; }; }; @@ -6339,13 +3847,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6356,13 +3858,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6370,13 +3866,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -6384,13 +3874,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6401,13 +3885,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6415,13 +3893,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=3; }; }; @@ -6429,13 +3901,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6446,13 +3912,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6460,13 +3920,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6474,13 +3928,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6491,13 +3939,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6505,13 +3947,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=9; }; }; @@ -6519,13 +3955,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6536,13 +3966,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6550,13 +3974,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=10; }; }; @@ -6564,13 +3982,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6581,13 +3993,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6595,13 +4001,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -6609,13 +4009,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6626,13 +4020,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6640,13 +4028,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -6654,13 +4036,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6671,13 +4047,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6685,13 +4055,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=100; }; }; @@ -6699,13 +4063,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6716,13 +4074,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6730,13 +4082,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -6744,13 +4090,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6761,13 +4101,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6775,13 +4109,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -6789,13 +4117,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6806,13 +4128,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6820,13 +4136,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -6834,13 +4144,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6851,13 +4155,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6865,13 +4163,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -6879,13 +4171,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6896,13 +4182,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -6910,13 +4190,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -6924,13 +4198,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6941,27 +4209,15 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; - class value + singleType="ARRAY"; + class value { items=2; class Item0 { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -6969,13 +4225,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -6986,13 +4236,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7000,13 +4244,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7014,13 +4252,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7031,13 +4263,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7045,13 +4271,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -7059,13 +4279,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7076,13 +4290,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7090,13 +4298,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -7104,13 +4306,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7121,13 +4317,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7135,13 +4325,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7149,13 +4333,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7166,13 +4344,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7180,13 +4352,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7194,13 +4360,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7211,13 +4371,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7225,13 +4379,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7239,13 +4387,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7256,13 +4398,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7270,13 +4406,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7284,13 +4414,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7301,13 +4425,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7315,13 +4433,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -7329,13 +4441,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7346,13 +4452,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7360,13 +4460,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -7374,13 +4468,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7391,13 +4479,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7405,13 +4487,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7419,13 +4495,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7436,13 +4506,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7450,13 +4514,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7464,13 +4522,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7481,13 +4533,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7495,13 +4541,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.97849; }; }; @@ -7509,13 +4549,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7526,13 +4560,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7540,13 +4568,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -7554,13 +4576,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7571,13 +4587,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7585,13 +4595,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -7599,13 +4603,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7616,13 +4614,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7630,13 +4622,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.10055923; }; }; @@ -7644,13 +4630,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7661,13 +4641,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7675,13 +4649,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7689,13 +4657,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7706,13 +4668,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7720,13 +4676,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7734,13 +4684,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7751,13 +4695,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7765,13 +4703,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7779,13 +4711,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7796,13 +4722,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7810,13 +4730,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -7824,13 +4738,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7841,13 +4749,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7855,13 +4757,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -7869,13 +4765,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7886,13 +4776,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7900,13 +4784,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -7914,13 +4792,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7931,13 +4803,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7945,13 +4811,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=20; }; }; @@ -7959,13 +4819,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -7976,13 +4830,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -7990,13 +4838,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="NoFreeCam"; }; }; @@ -8004,13 +4846,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -8021,13 +4857,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -8035,13 +4865,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -8049,13 +4873,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -8066,13 +4884,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -8080,13 +4892,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -8094,13 +4900,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -8111,13 +4911,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -8125,13 +4919,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -8139,13 +4927,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -8156,13 +4938,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -8170,13 +4946,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -8184,13 +4954,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -8205,13 +4969,7 @@ class CustomAttributes class data { nil=1; - class type - { - type[]= - { - "ANY" - }; - }; + singleType="ANY"; }; }; }; @@ -8226,13 +4984,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -8245,13 +4997,7 @@ class CustomAttributes { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -8286,7 +5032,7 @@ class Mission }; class Entities { - items=50; + items=65; class Item0 { dataType="Logic"; @@ -8307,13 +5053,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="zeus_ply"; }; }; @@ -8326,13 +5066,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -8345,13 +5079,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value=""; }; }; @@ -8364,13 +5092,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -8383,13 +5105,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=3; }; }; @@ -8417,13 +5133,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="#adminVoted"; }; }; @@ -8436,13 +5146,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -8455,13 +5159,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value=""; }; }; @@ -8474,13 +5172,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -8493,13 +5185,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=3; }; }; @@ -8582,13 +5268,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="[[[[],[]],[[],[]],[[],[]],[[],[]]],false]"; }; }; @@ -8639,13 +5319,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="[[[[],[]],[[],[]],[[],[]],[[],[]]],false]"; }; }; @@ -8696,13 +5370,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="[[[[],[]],[[],[]],[[],[]],[[],[]]],false]"; }; }; @@ -8753,13 +5421,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="[[[[],[]],[[],[]],[[],[]],[[],[]]],false]"; }; }; @@ -8787,13 +5449,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="zeus_ply_1"; }; }; @@ -8806,13 +5462,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -8825,13 +5475,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value=""; }; }; @@ -8844,13 +5488,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=1; }; }; @@ -8863,13 +5501,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=3; }; }; @@ -8923,13 +5555,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="[[[[],[]],[[],[]],[[],[]],[[],[]]],false]"; }; }; @@ -8962,13 +5588,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="[[[[],[]],[[],[]],[[],[]],[[],[]]],false]"; }; }; @@ -9001,13 +5621,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="[[[[],[]],[[],[]],[[],[]],[[],[]]],false]"; }; }; @@ -9040,13 +5654,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="[[[[],[]],[[],[]],[[],[]],[[],[]]],false]"; }; }; @@ -9082,36 +5690,168 @@ class Mission }; class Item23 { - dataType="Logic"; + dataType="Object"; class PositionInfo { - position[]={152.4017,5,264.73602}; + position[]={199.974,5.0005002,192.006}; }; - name="HC1"; - isPlayable=1; - description="HC1"; - id=1352; - type="HeadlessClient_F"; - }; - class Item24 - { - dataType="Logic"; - class PositionInfo + side="Empty"; + flags=5; + class Attributes { - position[]={152.29352,5,253.144}; + name="respawner_west"; + }; + id=1347; + type="VR_Area_01_square_1x1_yellow_F"; + class CustomAttributes + { + class Attribute0 + { + property="ObjectTextureCustom0"; + expression="_this setObjectTextureGlobal [0,_value]"; + class Value + { + class data + { + singleType="STRING"; + value="#(argb,8,8,3)color(0,0.3,0.6,1,co)"; + }; + }; + }; + nAttributes=1; }; - name="HC2"; - isPlayable=1; - description="HC2"; - id=1353; - type="HeadlessClient_F"; }; - class Item25 + class Item24 { - dataType="Logic"; + dataType="Object"; class PositionInfo { - position[]={152.23009,5,240.1955}; + position[]={300.008,5.0005002,191.563}; + }; + side="Empty"; + flags=5; + class Attributes + { + name="respawner_east"; + }; + id=1348; + type="VR_Area_01_square_1x1_yellow_F"; + class CustomAttributes + { + class Attribute0 + { + property="ObjectTextureCustom0"; + expression="_this setObjectTextureGlobal [0,_value]"; + class Value + { + class data + { + singleType="STRING"; + value="#(argb,8,8,3)color(0.5,0,0,1,co)"; + }; + }; + }; + nAttributes=1; + }; + }; + class Item25 + { + dataType="Object"; + class PositionInfo + { + position[]={299.98801,5.0005002,293.979}; + }; + side="Empty"; + flags=5; + class Attributes + { + name="respawner_civ"; + }; + id=1349; + type="VR_Area_01_square_1x1_yellow_F"; + class CustomAttributes + { + class Attribute0 + { + property="ObjectTextureCustom0"; + expression="_this setObjectTextureGlobal [0,_value]"; + class Value + { + class data + { + singleType="STRING"; + value="#(argb,8,8,3)color(0.4,0,0.5,1,co)"; + }; + }; + }; + nAttributes=1; + }; + }; + class Item26 + { + dataType="Object"; + class PositionInfo + { + position[]={199.96899,5.0005002,293.98001}; + }; + side="Empty"; + flags=5; + class Attributes + { + name="respawner_guer"; + }; + id=1350; + type="VR_Area_01_square_1x1_yellow_F"; + class CustomAttributes + { + class Attribute0 + { + property="ObjectTextureCustom0"; + expression="_this setObjectTextureGlobal [0,_value]"; + class Value + { + class data + { + singleType="STRING"; + value="#(argb,8,8,3)color(0,0.5,0,1,co)"; + }; + }; + }; + nAttributes=1; + }; + }; + class Item27 + { + dataType="Logic"; + class PositionInfo + { + position[]={152.4017,5,264.73602}; + }; + name="HC1"; + isPlayable=1; + description="HC1"; + id=1352; + type="HeadlessClient_F"; + }; + class Item28 + { + dataType="Logic"; + class PositionInfo + { + position[]={152.29352,5,253.144}; + }; + name="HC2"; + isPlayable=1; + description="HC2"; + id=1353; + type="HeadlessClient_F"; + }; + class Item29 + { + dataType="Logic"; + class PositionInfo + { + position[]={152.23009,5,240.1955}; }; name="HC3"; isPlayable=1; @@ -9119,7 +5859,7 @@ class Mission id=1354; type="HeadlessClient_F"; }; - class Item26 + class Item30 { dataType="Object"; class PositionInfo @@ -9145,13 +5885,7 @@ class Mission { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=2; @@ -9159,13 +5893,7 @@ class Mission { class data { - class type - { - type[]= - { - "ARRAY" - }; - }; + singleType="ARRAY"; class value { items=1; @@ -9173,13 +5901,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ACE_Banana"; }; }; @@ -9190,13 +5912,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0; }; }; @@ -9207,7 +5923,7 @@ class Mission nAttributes=1; }; }; - class Item27 + class Item31 { dataType="Object"; class PositionInfo @@ -9223,7 +5939,7 @@ class Mission id=1381; type="B_AssaultPack_mcamo"; }; - class Item28 + class Item32 { dataType="Object"; class PositionInfo @@ -9240,7 +5956,7 @@ class Mission id=1382; type="B_AssaultPack_ocamo"; }; - class Item29 + class Item33 { dataType="Object"; class PositionInfo @@ -9256,7 +5972,7 @@ class Mission id=1383; type="B_AssaultPack_dgtl"; }; - class Item30 + class Item34 { dataType="Object"; class PositionInfo @@ -9272,7 +5988,7 @@ class Mission id=1385; type="B_CivilianBackpack_01_Everyday_IDAP_F"; }; - class Item31 + class Item35 { dataType="Comment"; class PositionInfo @@ -9283,7 +5999,7 @@ class Mission description="Gearscript in this framework is provided by ACE Arsenal. To add new loadouts, simply go into ACE Arsenal and make them. " \n "" \n "Once you've finished a loadout, press ""EXPORT"" and go to the ""loadouts"" configuration folder. You can paste the loadout code into any of the gear files to set up that unit." \n "" \n "When you paste the loadout, make sure you don't delete the semi-colon ("";"") at the end of each line." \n "" \n "Each Gearscript file also comes with helpful commands to add randomisation and set-up resupply crates. For help and examples, see the ""gear_blufor.sqf"" configuration file."; id=1394; }; - class Item32 + class Item36 { dataType="Comment"; class PositionInfo @@ -9294,7 +6010,7 @@ class Mission description="When any unit is deleted, they will be turned into a Gravestone. These can be any kind of container, but by default they are configured to be backpacks." \n "" \n "You can change the Gravestone that appears for BLUFOR by deleting the backpack here, and then naming a container to ""gravestone_blufor"". The same rule applies to other factions." \n "" \n "You can control the Gravestone system's rules by using the ""gravestones.hpp"" configuration file."; id=1392; }; - class Item33 + class Item37 { dataType="Comment"; class PositionInfo @@ -9305,7 +6021,7 @@ class Mission description="This framework provides a system for setting the identities of each side. For example, you can set the enemy to be ""tanoan"", ""greek"", and they will look and sound the part." \n "" \n "To see all available identites, see the ""identityGroups.sqf"" configuration file inside the ""identities"" folder." \n "" \n "To set-up identities for each side, see the ""identityAssignment.sqf"" configuration file."; id=1395; }; - class Item34 + class Item38 { dataType="Comment"; class PositionInfo @@ -9316,7 +6032,7 @@ class Mission description="When in-game, Loadout Lockers will let you choose loadouts for a specific faction. This one is set to give you BLUFOR loadouts." \n "" \n "You can make Loadout Lockers for other factions by copy-pasting this locker and changing ""blu_f"" inside the Init Field to ""opf_f"", ""ind_f"" or ""civ_f""."; id=1388; }; - class Item35 + class Item39 { dataType="Comment"; class PositionInfo @@ -9327,7 +6043,7 @@ class Mission description="Loot Crates contain random items, like in RPG games (Skyrim, Borderlands etc.)." \n "" \n "You can set-up loot-tables in the ""lootBox.sqf"" configuration file. This is currently considered an advanced feature because loot-tables are not simple to set up. If you have any issues, ask Bubbus for help."; id=1390; }; - class Item36 + class Item40 { dataType="Comment"; class PositionInfo @@ -9338,7 +6054,7 @@ class Mission description="The best way to make a new squad is to copy-paste one of the existing ones. This will keep their gearscript lines and role names intact." \n "" \n "It's also a good idea to create compositions for new squads, enemy patrols etc. This can massively speed up the creation of new missions."; id=1397; }; - class Item37 + class Item41 { dataType="Comment"; class PositionInfo @@ -9349,18 +6065,29 @@ class Mission description="This marker creates an auto-generated list of radio channels. It will show up in-game in the Map screen." \n "" \n "You can move this marker around to move the list. You can also scale this marker up and down to change the size of the list."; id=1389; }; - class Item38 + class Item42 + { + dataType="Comment"; + class PositionInfo + { + position[]={206.3414,5,199.92285}; + }; + title="Respawn Framework"; + description="Check the ""respawn.hpp"" configuration file to set the respawn mode." \n "" \n "Players can respawn individually, in waves, using tickets etc."; + id=1387; + }; + class Item43 { dataType="Comment"; class PositionInfo { - position[]={205.65401,5,201.24823}; + position[]={207.93277,5,176.02776}; }; - title="Respawns"; - description="CAFE now uses the default Arma Respawn system. You can create new respawn points with the ""Respawn Position"" module." \n "" \n "Arma will always create respawn positions at the ""respawn_west"" marker (etc). These can be removed if desired."; + title="Respawner Objects"; + description="See the example respawn locations near this comment. " \n "" \n "You can set objects such as vehicles, players, markers etc as player respawn locations." \n "" \n "You can also make respawn points appear or disappear by linking them to triggers."; id=1386; }; - class Item39 + class Item44 { dataType="Comment"; class PositionInfo @@ -9371,7 +6098,7 @@ class Mission description="See the ""squadMarkers"" folder inside the configuration folder." \n "" \n "Squad markers are given to each squad inside that file. If you want to add new squads, you can set their Callsign in this editor, and then use that exact same Callsign in the ""squadMarkers_blufor.sqf"" file to set up their colour, icon and more. The same rule applies to different factions." \n "" \n "For more help, see the ""squadMarkers_blufor.sqf"" file for instructions and a default example."; id=1393; }; - class Item40 + class Item45 { dataType="Comment"; class PositionInfo @@ -9382,7 +6109,7 @@ class Mission description="You can delete all of these comments easily by finding the Comments folder in the panel on the left." \n "" \n "Click, Shift+Click, Delete."; id=1398; }; - class Item41 + class Item46 { dataType="Comment"; class PositionInfo @@ -9393,7 +6120,7 @@ class Mission description="This trigger is configured to ignore any Zeuses which fly into it, but any normal player who steps inside is still counted. " \n "" \n "You can copy-paste this trigger if you need more than one."; id=1391; }; - class Item42 + class Item47 { dataType="Group"; side="West"; @@ -9405,7 +6132,7 @@ class Mission dataType="Object"; class PositionInfo { - position[]={363.47101,5.0014391,259.69}; + position[]={363.1319,5.0014391,258.2887}; }; side="West"; flags=6; @@ -9428,13 +6155,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -9447,13 +6168,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male01ENG"; }; }; @@ -9466,13 +6181,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.02; }; }; @@ -9508,13 +6217,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -9527,13 +6230,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male08ENG"; }; }; @@ -9546,13 +6243,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.95999998; }; }; @@ -9588,13 +6279,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -9607,13 +6292,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male08ENG"; }; }; @@ -9626,13 +6305,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.03; }; }; @@ -9668,13 +6341,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -9687,13 +6354,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -9706,13 +6367,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male12ENG"; }; }; @@ -9725,13 +6380,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -9767,13 +6416,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -9786,13 +6429,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -9805,13 +6442,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male12ENG"; }; }; @@ -9824,13 +6455,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -9866,13 +6491,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -9885,13 +6504,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male08ENG"; }; }; @@ -9904,13 +6517,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.03; }; }; @@ -9946,13 +6553,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -9965,13 +6566,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male08ENG"; }; }; @@ -9984,13 +6579,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.03; }; }; @@ -10014,13 +6603,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="COMMAND"; }; }; @@ -10033,13 +6616,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10047,7 +6624,7 @@ class Mission nAttributes=2; }; }; - class Item43 + class Item48 { dataType="Group"; side="West"; @@ -10082,13 +6659,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10101,13 +6672,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male01ENG"; }; }; @@ -10120,13 +6685,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.02; }; }; @@ -10162,13 +6721,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10181,13 +6734,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -10200,13 +6747,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male12ENG"; }; }; @@ -10219,13 +6760,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -10261,13 +6796,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10280,13 +6809,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male08ENG"; }; }; @@ -10299,13 +6822,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.95999998; }; }; @@ -10340,13 +6857,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10359,13 +6870,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male02ENG"; }; }; @@ -10378,13 +6883,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.97000003; }; }; @@ -10419,13 +6918,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10438,13 +6931,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male03ENG"; }; }; @@ -10457,13 +6944,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.99000001; }; }; @@ -10499,13 +6980,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10518,13 +6993,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male08ENG"; }; }; @@ -10537,13 +7006,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.03; }; }; @@ -10567,13 +7030,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ALPHA"; }; }; @@ -10586,13 +7043,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10600,7 +7051,7 @@ class Mission nAttributes=2; }; }; - class Item44 + class Item49 { dataType="Group"; side="West"; @@ -10635,13 +7086,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10654,13 +7099,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male01ENG"; }; }; @@ -10673,13 +7112,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.02; }; }; @@ -10715,13 +7148,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10734,13 +7161,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -10753,13 +7174,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male12ENG"; }; }; @@ -10772,13 +7187,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -10814,13 +7223,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10833,13 +7236,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male08ENG"; }; }; @@ -10852,13 +7249,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.95999998; }; }; @@ -10893,13 +7284,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10912,13 +7297,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male02ENG"; }; }; @@ -10931,13 +7310,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.97000003; }; }; @@ -10972,13 +7345,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -10991,13 +7358,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male03ENG"; }; }; @@ -11010,13 +7371,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.99000001; }; }; @@ -11052,13 +7407,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11071,13 +7420,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male08ENG"; }; }; @@ -11090,13 +7433,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.03; }; }; @@ -11120,13 +7457,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="BRAVO"; }; }; @@ -11139,13 +7470,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11153,7 +7478,7 @@ class Mission nAttributes=2; }; }; - class Item45 + class Item50 { dataType="Group"; side="West"; @@ -11188,13 +7513,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11207,13 +7526,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male01ENG"; }; }; @@ -11226,13 +7539,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.02; }; }; @@ -11268,13 +7575,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11287,13 +7588,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -11306,13 +7601,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male12ENG"; }; }; @@ -11325,13 +7614,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1; }; }; @@ -11367,13 +7650,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11386,13 +7663,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male08ENG"; }; }; @@ -11405,13 +7676,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.95999998; }; }; @@ -11446,13 +7711,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11465,13 +7724,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male02ENG"; }; }; @@ -11484,13 +7737,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.97000003; }; }; @@ -11525,13 +7772,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11544,13 +7785,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male03ENG"; }; }; @@ -11563,13 +7798,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=0.99000001; }; }; @@ -11605,13 +7834,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11624,13 +7847,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male08ENG"; }; }; @@ -11643,13 +7860,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.03; }; }; @@ -11673,13 +7884,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="CHARLIE"; }; }; @@ -11692,13 +7897,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11706,7 +7905,7 @@ class Mission nAttributes=2; }; }; - class Item46 + class Item51 { dataType="Group"; side="West"; @@ -11744,13 +7943,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -11763,13 +7956,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11782,13 +7969,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.04; }; }; @@ -11801,13 +7982,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male01ENG"; }; }; @@ -11820,13 +7995,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -11839,13 +8008,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11858,13 +8021,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11902,13 +8059,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -11921,13 +8072,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -11940,13 +8085,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=1.04; }; }; @@ -11959,13 +8098,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="Male01ENG"; }; }; @@ -11978,13 +8111,7 @@ class Mission { class data { - class type - { - type[]= - { - "SCALAR" - }; - }; + singleType="SCALAR"; value=2; }; }; @@ -11997,13 +8124,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -12016,13 +8137,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -12046,13 +8161,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="ZEUS"; }; }; @@ -12065,13 +8174,7 @@ class Mission { class data { - class type - { - type[]= - { - "BOOL" - }; - }; + singleType="BOOL"; value=0; }; }; @@ -12079,7 +8182,7 @@ class Mission nAttributes=2; }; }; - class Item47 + class Item52 { dataType="Object"; class PositionInfo @@ -12105,13 +8208,7 @@ class Mission { class data { - class type - { - type[]= - { - "STRING" - }; - }; + singleType="STRING"; value="[[[[""FirstAidKit""],[10]],[[],[]],[[],[]],[[],[]]],false]"; }; }; @@ -12119,7 +8216,7 @@ class Mission nAttributes=1; }; }; - class Item48 + class Item53 { dataType="Comment"; class PositionInfo @@ -12130,16 +8227,468 @@ class Mission description="This HEMTT is configured to allow an engineer in the command group to spawn new vehicles from it." \n "" \n "You can change the configuration and the permissions around it. See the ""logiVehicles.sqf"" file in the configuration folder for more information."; id=1486; }; - class Item49 + class Item54 + { + dataType="Object"; + class PositionInfo + { + position[]={200.19876,8.9768047,200.23758}; + }; + side="Empty"; + flags=5; + class Attributes + { + init="[this] call f_fnc_createRedeployObject;"; + }; + id=1546; + type="Flag_NATO_F"; + }; + class Item55 + { + dataType="Logic"; + class PositionInfo + { + position[]={208.0135,5,184.16716}; + }; + id=1547; + type="ModuleRespawnPosition_F"; + class CustomAttributes + { + class Attribute0 + { + property="ModuleRespawnPosition_F_Marker"; + expression="_this setVariable ['Marker',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="2"; + }; + }; + }; + class Attribute1 + { + property="ModuleRespawnPosition_F_Name"; + expression="_this setVariable ['Name',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="Example BLUFOR Respawn"; + }; + }; + }; + class Attribute2 + { + property="ModuleRespawnPosition_F_Side"; + expression="_this setVariable ['Side',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute3 + { + property="ModuleRespawnPosition_F_ShowNotification"; + expression="_this setVariable ['ShowNotification',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute4 + { + property="ModuleRespawnPosition_F_Type"; + expression="_this setVariable ['Type',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="0"; + }; + }; + }; + nAttributes=5; + }; + }; + class Item56 + { + dataType="Logic"; + class PositionInfo + { + position[]={207.94449,5,167.98802}; + }; + id=1548; + type="ModuleRespawnPosition_F"; + class CustomAttributes + { + class Attribute0 + { + property="ModuleRespawnPosition_F_Marker"; + expression="_this setVariable ['Marker',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="2"; + }; + }; + }; + class Attribute1 + { + property="ModuleRespawnPosition_F_Name"; + expression="_this setVariable ['Name',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="Example Vehicle-based Respawn"; + }; + }; + }; + class Attribute2 + { + property="ModuleRespawnPosition_F_Side"; + expression="_this setVariable ['Side',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute3 + { + property="ModuleRespawnPosition_F_ShowNotification"; + expression="_this setVariable ['ShowNotification',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute4 + { + property="ModuleRespawnPosition_F_Type"; + expression="_this setVariable ['Type',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="0"; + }; + }; + }; + nAttributes=5; + }; + }; + class Item57 + { + dataType="Logic"; + class PositionInfo + { + position[]={215.936,5,175.91299}; + }; + id=1549; + type="ModuleRespawnPosition_F"; + class CustomAttributes + { + class Attribute0 + { + property="ModuleRespawnPosition_F_Marker"; + expression="_this setVariable ['Marker',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="2"; + }; + }; + }; + class Attribute1 + { + property="ModuleRespawnPosition_F_Name"; + expression="_this setVariable ['Name',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="Only appears when logi vic is dead."; + }; + }; + }; + class Attribute2 + { + property="ModuleRespawnPosition_F_Side"; + expression="_this setVariable ['Side',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute3 + { + property="ModuleRespawnPosition_F_ShowNotification"; + expression="_this setVariable ['ShowNotification',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute4 + { + property="ModuleRespawnPosition_F_Type"; + expression="_this setVariable ['Type',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="0"; + }; + }; + }; + nAttributes=5; + }; + }; + class Item58 + { + dataType="Trigger"; + position[]={215.89928,5,178.00525}; + class Attributes + { + condition="!alive logi_truck"; + sizeA=0; + sizeB=0; + }; + id=1550; + type="EmptyDetector"; + }; + class Item59 + { + dataType="Trigger"; + position[]={194.459,5,176.62601}; + class Attributes + { + onActivation="systemChat str thisList;" \n "[toggleableRespawnModule_1, nil, false] call f_fnc_moduleRespawnPosition;"; + onDeactivation="systemChat ""off"";" \n "[toggleableRespawnModule_1] call f_fnc_moduleRespawnPosition;"; + sizeA=5; + sizeB=5; + sizeC=5; + repeatable=1; + activationBy="ANY"; + isRectangle=1; + }; + id=1551; + type="EmptyDetectorArea10x10"; + }; + class Item60 + { + dataType="Logic"; + class PositionInfo + { + position[]={200.052,5,176.103}; + }; + name="toggleableRespawnModule_1"; + init="this setVariable [""markerName"", ""toggleableRespawnMarker_1""];"; + id=1552; + type="ModuleRespawnPosition_F"; + class CustomAttributes + { + class Attribute0 + { + property="ModuleRespawnPosition_F_Marker"; + expression="_this setVariable ['Marker',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="2"; + }; + }; + }; + class Attribute1 + { + property="ModuleRespawnPosition_F_Name"; + expression="_this setVariable ['Name',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="Only appears when nobody is near."; + }; + }; + }; + class Attribute2 + { + property="ModuleRespawnPosition_F_Side"; + expression="_this setVariable ['Side',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute3 + { + property="ModuleRespawnPosition_F_ShowNotification"; + expression="_this setVariable ['ShowNotification',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute4 + { + property="ModuleRespawnPosition_F_Type"; + expression="_this setVariable ['Type',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="0"; + }; + }; + }; + nAttributes=5; + }; + }; + class Item61 + { + dataType="Marker"; + position[]={194.59695,5,179.24211}; + name="toggleableRespawnMarker_1"; + type="Empty"; + id=1555; + }; + class Item62 + { + dataType="Object"; + class PositionInfo + { + position[]={194.44592,5.0005002,173.75635}; + }; + side="Empty"; + flags=5; + class Attributes + { + }; + id=1556; + type="VR_Area_01_square_1x1_grey_F"; + }; + class Item63 + { + dataType="Trigger"; + position[]={200.05464,5,176.48682}; + class Attributes + { + condition="false"; + sizeA=0; + sizeB=0; + }; + id=1557; + type="EmptyDetector"; + }; + class Item64 { dataType="Comment"; class PositionInfo { - position[]={205.536,5,192.689}; + position[]={194.47818,5,177.83252}; + }; + title="Toggleable respawn points."; + description="A special set-up is needed to make respawn points that can be disabled and re-enabled." \n "" \n "This is an advanced example. If you need a respawn point that doesn't need to be disabled later on, you can use the simpler ""Only appears when logi vic is dead"" example." \n "" \n "Be aware: respawn points count as ""Anybody"" for the purposes of activating triggers. Put the respawn point inside the trigger and see for yourself."; + id=1558; + }; + }; + class Connections + { + class LinkIDProvider + { + nextID=4; + }; + class Links + { + items=4; + class Item0 + { + linkID=0; + item0=1548; + item1=1485; + class CustomData + { + type="Sync"; + }; + }; + class Item1 + { + linkID=1; + item0=1549; + item1=1550; + class CustomData + { + type="Sync"; + }; + }; + class Item2 + { + linkID=2; + item0=1552; + item1=1556; + class CustomData + { + type="Sync"; + }; + }; + class Item3 + { + linkID=3; + item0=1557; + item1=1552; + class CustomData + { + type="Sync"; + }; }; - title="Advanced respawns"; - description="CAFE offers a ""respawn manager"" system to let you choose when respawn points appear or disappear. Visit the ""respawnLocations.sqf"" file in the ""configuration"" folder to learn more." \n "" \n "(You can also do this in the editor with a ""Respawn Position"" module and a trigger.)"; - id=1493; }; }; }; diff --git a/startup/configuration/groups/serverConfigGroup.sqf b/startup/configuration/groups/serverConfigGroup.sqf index ab635406..ed2315ca 100644 --- a/startup/configuration/groups/serverConfigGroup.sqf +++ b/startup/configuration/groups/serverConfigGroup.sqf @@ -12,6 +12,3 @@ // Squad markers #include "..\internals\squadMarkers.sqf" - -// Respawn locations -#include "..\..\..\configuration\respawnLocations.sqf" From 9f12aca087e5dff37a7d3e4c9df8a80ef4c2f54d Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 17 Nov 2022 22:03:43 +0000 Subject: [PATCH 16/24] Added weapon safety on respawn. disabling debug mode again woops --- components/respawn/cfgRespawnTemplates.hpp | 2 + components/respawn/weaponSafety/macros.hpp | 2 + .../respawn/weaponSafety/onPlayerRespawn.sqf | 113 ++++++++++++++++++ .../respawn/weaponSafety/respawnTemplates.hpp | 5 + configuration/debug.hpp | 2 +- respawn_macros.hpp | 18 +-- 6 files changed, 133 insertions(+), 9 deletions(-) create mode 100644 components/respawn/weaponSafety/macros.hpp create mode 100644 components/respawn/weaponSafety/onPlayerRespawn.sqf create mode 100644 components/respawn/weaponSafety/respawnTemplates.hpp diff --git a/components/respawn/cfgRespawnTemplates.hpp b/components/respawn/cfgRespawnTemplates.hpp index ca9ed7c3..256a807e 100644 --- a/components/respawn/cfgRespawnTemplates.hpp +++ b/components/respawn/cfgRespawnTemplates.hpp @@ -11,4 +11,6 @@ class CfgRespawnTemplates #include "triggeredWave\respawnTemplates.hpp" #include "wave\respawnTemplates.hpp" + + #include "weaponSafety\respawnTemplates.hpp" } diff --git a/components/respawn/weaponSafety/macros.hpp b/components/respawn/weaponSafety/macros.hpp new file mode 100644 index 00000000..844393a4 --- /dev/null +++ b/components/respawn/weaponSafety/macros.hpp @@ -0,0 +1,2 @@ +#include "../macros.hpp" +#include "../../../squadmarker_macros.hpp" \ No newline at end of file diff --git a/components/respawn/weaponSafety/onPlayerRespawn.sqf b/components/respawn/weaponSafety/onPlayerRespawn.sqf new file mode 100644 index 00000000..d5475422 --- /dev/null +++ b/components/respawn/weaponSafety/onPlayerRespawn.sqf @@ -0,0 +1,113 @@ +#include "macros.hpp" + +/* + CAFE weapon safety onRespawn script. + + Prevent weapon discharge upon spawn by putting weapon on safety. +*/ + +params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"]; + +private _usingRespawnUI = [RESPAWN_MENU] call f_fnc_isRespawnModeActive; + +if !(_usingRespawnUI) exitWith +{ + DEBUG_PRINT_CHAT("[RESPAWN-2]: Not using the respawn UI, skipping weaponSafety.") +}; + +DEBUG_FORMAT2_CHAT("[RESPAWN-2]: Instating safety for unit %1 until fully respawned.", _oldUnit, (group _oldUnit)) + +_newUnit setVariable ["f_var_spawn_weaponSafety", true]; + +f_fnc_spawn_disableWeaponSafetiesWithDelayWhenRespawnMenuClosed = +{ + // Wait until respawn screen is no longer displayed. + [ + { + !((missionNamespace getVariable ["BIS_RscRespawnControlsMap_shown", false]) or (missionNamespace getVariable ["BIS_RscRespawnControlsSpectate_shown", false])) + }, + + { + // Take all weapons off safety 1 sec later. + [ + { + private _unit = _this#0; + DEBUG_FORMAT1_CHAT("[SpawnWeaponSafety]: Safety off for unit %1",_unit) + + _unit setVariable ["f_var_spawn_weaponSafety", false]; + private _safedWeapons = _unit getVariable ["f_arr_safedWeaponMuzzles", []]; + + { + ([_unit] + _x) call ace_safemode_fnc_unlockSafety; + } foreach _safedWeapons; + }, + _this, + 1 + ] call CBA_fnc_waitAndExecute; + }, + _this + ] call CBA_fnc_waitUntilAndExecute; +}; + + +// Wait until respawn manu has been opened, then wait for it to close. +[ + { + (missionNamespace getVariable ["BIS_RscRespawnControlsMap_shown", false]) or (missionNamespace getVariable ["BIS_RscRespawnControlsSpectate_shown", false]) + }, + + f_fnc_spawn_disableWeaponSafetiesWithDelayWhenRespawnMenuClosed, + [_newUnit], + + // Timeout (secs) + 1, + f_fnc_spawn_disableWeaponSafetiesWithDelayWhenRespawnMenuClosed + +] call CBA_fnc_waitUntilAndExecute; + + +f_fnc_spawn_weaponsafety_pollMuzzlesLoop = +{ + // Wait until new muzzle, then put it on safety. + [ + { + params ["_unit", "_priorMuzzles"]; + + private _muzzleKey = format ["%1::%2", currentWeapon _unit, currentMuzzle _unit]; + private _safetyActive = _unit getVariable ["f_var_spawn_weaponSafety", false]; + + !(_safetyActive and {_muzzleKey in _priorMuzzles}) + }, + + { + params ["_unit", "_priorMuzzles"]; + + private _safetyActive = _unit getVariable ["f_var_spawn_weaponSafety", false]; + if !(_safetyActive) exitWith {}; + + private _weapon = currentWeapon _unit; + private _muzzle = currentMuzzle _unit; + + [_unit, _weapon, _muzzle] call ace_safemode_fnc_lockSafety; + + private _muzzleKey = format ["%1::%2", _weapon, _muzzle]; + _priorMuzzles pushBack _muzzleKey; + + (_unit getVariable "f_arr_safedWeaponMuzzles") pushBack [_weapon, _muzzle]; + + DEBUG_FORMAT1_CHAT("[SpawnWeaponSafety]: Safety on for %1",_muzzleKey) + + _this call f_fnc_spawn_weaponsafety_pollMuzzlesLoop; + }, + + _this + + ] call CBA_fnc_waitUntilAndExecute; +}; + +if ((_newUnit getVariable ["f_arr_safedWeaponMuzzles", []]) isEqualTo []) then +{ + _newUnit setVariable ["f_arr_safedWeaponMuzzles", []]; +}; + +[_newUnit, []] call f_fnc_spawn_weaponsafety_pollMuzzlesLoop; \ No newline at end of file diff --git a/components/respawn/weaponSafety/respawnTemplates.hpp b/components/respawn/weaponSafety/respawnTemplates.hpp new file mode 100644 index 00000000..0b944dec --- /dev/null +++ b/components/respawn/weaponSafety/respawnTemplates.hpp @@ -0,0 +1,5 @@ +class CAFE_WeaponSafety +{ + onPlayerRespawn = "components\respawn\weaponSafety\onPlayerRespawn.sqf"; + isCall = 1; +}; \ No newline at end of file diff --git a/configuration/debug.hpp b/configuration/debug.hpp index e2701310..4363d0fc 100644 --- a/configuration/debug.hpp +++ b/configuration/debug.hpp @@ -1,2 +1,2 @@ // Enables debugging -#define ENABLE_DEBUG +// #define ENABLE_DEBUG diff --git a/respawn_macros.hpp b/respawn_macros.hpp index 16ec7542..81a8a843 100644 --- a/respawn_macros.hpp +++ b/respawn_macros.hpp @@ -3,13 +3,15 @@ #define RESPAWN_TICKETS "TicketsSpawn" #define RESPAWN_TRIGGERED_WAVE "CAFE_TriggeredWave" -#define RESPAWN_MODE_TIMED {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TIMED, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TIMED_WAVES {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TICKETS {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TIMED_WAVES_TICKETS {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TIMED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TRIGGERED_WAVES {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TRIGGERED_WAVE, "CAFE_Loadout", "CAFE_Squad"} -#define RESPAWN_MODE_TRIGGERED_WAVES_TICKETS {"CAFE_FixPlayerTickets", "MenuPosition", "Spectator", RESPAWN_TRIGGERED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} - -#define RESPAWN_DEFAULTS "CAFE_FixPlayerTickets", "MenuPosition", "Spectator", "CAFE_Loadout", "CAFE_Squad" +#define RESPAWN_MENU "MenuPosition" + +#define RESPAWN_MODE_TIMED {"CAFE_FixPlayerTickets", RESPAWN_MENU, "CAFE_WeaponSafety", "Spectator", RESPAWN_TIMED, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES {"CAFE_FixPlayerTickets", RESPAWN_MENU, "CAFE_WeaponSafety", "Spectator", RESPAWN_TIMED_WAVE, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TICKETS {"CAFE_FixPlayerTickets", RESPAWN_MENU, "CAFE_WeaponSafety", "Spectator", RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TIMED_WAVES_TICKETS {"CAFE_FixPlayerTickets", RESPAWN_MENU, "CAFE_WeaponSafety", "Spectator", RESPAWN_TIMED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TRIGGERED_WAVES {"CAFE_FixPlayerTickets", RESPAWN_MENU, "CAFE_WeaponSafety", "Spectator", RESPAWN_TRIGGERED_WAVE, "CAFE_Loadout", "CAFE_Squad"} +#define RESPAWN_MODE_TRIGGERED_WAVES_TICKETS {"CAFE_FixPlayerTickets", RESPAWN_MENU, "CAFE_WeaponSafety", "Spectator", RESPAWN_TRIGGERED_WAVE, RESPAWN_TICKETS, "CAFE_Loadout", "CAFE_Squad"} + +#define RESPAWN_DEFAULTS "CAFE_FixPlayerTickets", RESPAWN_MENU, "CAFE_WeaponSafety", "Spectator", "CAFE_Loadout", "CAFE_Squad" #define DEFAULT_RESPAWN_ARRAY {RESPAWN_DEFAULTS} \ No newline at end of file From 2267c09061daec0004ddfc06d62b1f9d3e25ee84 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 17 Nov 2022 22:04:52 +0000 Subject: [PATCH 17/24] Moved spectator camera controls out from underneath respawn UI. --- .../respawn/fn_respawnSpectatorTweaks.sqf | 42 +++++++++++++++++++ components/respawn/functions.hpp | 2 +- description.ext | 5 +++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 components/respawn/fn_respawnSpectatorTweaks.sqf diff --git a/components/respawn/fn_respawnSpectatorTweaks.sqf b/components/respawn/fn_respawnSpectatorTweaks.sqf new file mode 100644 index 00000000..f6628e73 --- /dev/null +++ b/components/respawn/fn_respawnSpectatorTweaks.sqf @@ -0,0 +1,42 @@ +// Move camera controls to the top of the screen to avoid cursor blockage by respawn UI elements. + +params ["_display"]; + +uiNamespace setVariable ["f_display_egRespawn", _display]; + +// Get overall cam controls group, position just below the game time indicator. +private _cameraModesGroup = _display displayCtrl 52909; + + +// Movements are according to measurement formulae from the RscDisplayEGSpectator config. +private _backgroundX = 16 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2)) / 2); +_backgroundX = _backgroundX - (0 * (((safezoneW / safezoneH) min 1.2) / 40)); + +private _backgroundY = safezoneY - (0.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)); +_backgroundY = _backgroundY + (1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)); + +private _curPosition = ctrlPosition _cameraModesGroup; + +_cameraModesGroup ctrlSetPosition [_backgroundX, _backgroundY]; +_cameraModesGroup ctrlCommit 0; + + +// Resize the element background to line up with the game time indicator. +private _cameraModesBackground = _display displayCtrl 52610; +_cameraModesBackground ctrlSetPositionX 0; +_cameraModesBackground ctrlSetPositionW (8 * (((safezoneW / safezoneH) min 1.2) / 40)); +_cameraModesBackground ctrlCommit 0; + + +// Reposition the camera buttons to center them within the new background. +{ + private _curPos = (ctrlPosition _x) # 0; + _x ctrlSetPositionX (_curPos - (0.3 * (((safezoneW / safezoneH) min 1.2) / 40))); + _x ctrlCommit 0; + +} forEach +[ + _display displayCtrl 52810, + _display displayCtrl 52811, + _display displayCtrl 52809 +] \ No newline at end of file diff --git a/components/respawn/functions.hpp b/components/respawn/functions.hpp index 3ecd175b..9c6f2d0e 100644 --- a/components/respawn/functions.hpp +++ b/components/respawn/functions.hpp @@ -4,7 +4,7 @@ class respawn class addFreeTicket{}; class getPlayerRespawnDelay{}; class isRespawnModeActive{}; - class moduleRespawnPosition{}; + class respawnSpectatorTweaks{}; }; class respawn_locationSystem { diff --git a/description.ext b/description.ext index 6ed9c82a..69f650bf 100644 --- a/description.ext +++ b/description.ext @@ -475,4 +475,9 @@ class Extended_DisplayLoad_EventHandlers { clientDisplayLoad = "[] call f_fnc_openZeus;"; }; + + class RscDisplayEGSpectator + { + CAFE_Respawn_SpectatorTweaks = "_this call f_fnc_respawnSpectatorTweaks;"; + }; }; From 1f484d902e7e3fd6c98eeab8fea6e8418d6e5d14 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 17 Nov 2022 22:05:30 +0000 Subject: [PATCH 18/24] Force-on auto-respawn when in triggered-waves mode. --- .../respawn/triggeredWave/onPlayerKilled.sqf | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/components/respawn/triggeredWave/onPlayerKilled.sqf b/components/respawn/triggeredWave/onPlayerKilled.sqf index dd25ebb8..5de94647 100644 --- a/components/respawn/triggeredWave/onPlayerKilled.sqf +++ b/components/respawn/triggeredWave/onPlayerKilled.sqf @@ -32,4 +32,24 @@ setPlayerRespawnTime 1e10; setPlayerRespawnTime 1; } +] call CBA_fnc_waitUntilAndExecute; + + +// Wait until respawn-map or respawn-spectator screen is visible, then force on auto-respawn. +[ + { + (missionNamespace getVariable ["BIS_RscRespawnControlsMap_shown", false]) or {missionNamespace getVariable ["BIS_RscRespawnControlsSpectate_shown", false]} + }, + { + DEBUG_PRINT_CHAT("[TriggeredWaves]: Turning on auto-respawn") + uiNamespace setVariable ["BIS_RscRespawnControls_autorespawn", true]; + }, + [], + + // Set a timeout of 10s just in case we're in an odd configuration where the respawn menu isn't being used. + 10, + { + DEBUG_PRINT_CHAT("[TriggeredWaves]: Auto-respawn setter timed out.") + } + ] call CBA_fnc_waitUntilAndExecute; \ No newline at end of file From 8cdece90fb20de132820ca93f7907ca5daf074ab Mon Sep 17 00:00:00 2001 From: Bubbus Date: Thu, 17 Nov 2022 22:06:11 +0000 Subject: [PATCH 19/24] Added better respawn examples to mission.sqm Removed respawn location module override as not really needed. --- .../respawn/fn_moduleRespawnPosition.sqf | 185 ------- mission.sqm | 498 ++++++++++-------- 2 files changed, 273 insertions(+), 410 deletions(-) delete mode 100644 components/respawn/fn_moduleRespawnPosition.sqf diff --git a/components/respawn/fn_moduleRespawnPosition.sqf b/components/respawn/fn_moduleRespawnPosition.sqf deleted file mode 100644 index 2d814b3a..00000000 --- a/components/respawn/fn_moduleRespawnPosition.sqf +++ /dev/null @@ -1,185 +0,0 @@ -_logic = _this param [0,objnull,[objnull]]; -_activated = _this param [2,true,[true]]; - -systemChat "beep"; - -if (_activated) then { - - //--- Draw respan positions for players - true call bis_fnc_drawRespawnPositions; - if !(isserver) exitwith {}; - - //--- Server init - _typeID = 0; - _sideID = 0; - - _name = _logic getvariable ["Name",""]; - if (isnumber (configfile >> "cfgvehicles" >> typeof _logic >> "respawnSide")) then { - //--- Module with pre-define params - _sideID = getnumber (configfile >> "cfgvehicles" >> typeof _logic >> "respawnSide"); - _typeID = getnumber (configfile >> "cfgvehicles" >> typeof _logic >> "respawnType"); - } else { - //--- Module with adjustable params - _typeID = (_logic getvariable ["Type","0"]) call BIS_fnc_parseNumberSafe; - _sideID = (_logic getvariable ["Side","-1"]) call BIS_fnc_parseNumberSafe; - }; - _showNotification = (_logic getvariable ["ShowNotification","1"]) call BIS_fnc_parseNumberSafe; - - //--- Detect the leading side - if (_sideID < 0) then { - if (ismultiplayer) then { - _maxScore = -1; - { - _score = scoreside _x; - if (_score > _maxScore) then { - _maxScore = _score; - _sideID = _x call bis_fnc_sideID; - } else { - if (_score == _maxScore) then { - _sideID = -1; - }; - }; - } foreach [opfor,blufor,independent,civilian]; - } else { - _sideID = (player call bis_fnc_objectSide) call bis_fnc_sideID; - }; - }; - - if (_sideID in [0,1,2,3]) then { - private ["_side","_pos","_markerPrefix","_markerType","_respawnPositions","_respawnObjects","_type","_respawn"]; - _side = _sideID call bis_fnc_sideType; - _pos = position _logic; - _markerType = ["respawn_inf","respawn_unknown","respawn_motor","respawn_armor","respawn_air","respawn_plane","respawn_naval"] select _typeID; - _respawnPositions = []; - _respawnObjects = []; - - if (_typeID > 0) then { - private ["_markerSide"]; - _markerSide = ["east","west","guerrila","civilian"] select _sideID; - _respawn = "respawn_vehicle_" + _markerSide + str _pos; - createmarker [_respawn,_pos]; - _respawn setmarkerdir ((round direction _logic) * 360); - _respawn setmarkersize [1,1]; - _respawn setmarkercolor ([_side,true] call bis_fnc_sidecolor); - _respawn setmarkertype _markerType; - _logic setvariable ["marker",_respawn]; - //_respawn setmarkertext (_name call bis_fnc_localize); - _respawnPositions pushback _respawn; - _respawnObjects pushback objnull; - } else { - //--- Respawn in vehicle - { - if (typeName _x isEqualTo "OBJECT") then { - _respawn = [_side,_x,_name] call bis_fnc_addRespawnPosition; - _respawnPositions pushback _respawn; - _respawnObjects pushback _x; - }; - } foreach (synchronizedobjects _logic); - - private _markerName = _logic getVariable ["markerName", ""]; - if (_markerName isNotEqualTo "") then - { - systemChat "adding marker"; - _respawn = [_side,_markerName,_name] call bis_fnc_addRespawnPosition; - _respawnPositions pushback _respawn; - _respawnObjects pushback objnull; - }; - - //--- Respawn on position (when no vehicles are synced) - if (count _respawnPositions == 0) then { - _respawn = [_side,_logic,_name] call bis_fnc_addRespawnPosition; - _respawnPositions pushback _respawn; - _respawnObjects pushback objnull; - }; - }; - _logic setvariable ["respawn",_respawnPositions]; - - //--- Show notifications - _type = gettext (configfile >> "cfgmarkers" >> _markerType >> "name"); - { - if (_name == "") then { - private ["_namePos"]; - _name = ""; - _namePos = [0,0,0]; - _veh = _respawnObjects select _foreachindex; - if (!isnull _veh) then { - _name = gettext (configfile >> "cfgvehicles" >> (typeof _veh) >> "displayname"); - _namePos = position _veh; - } else { - _name = format [localize "str_a3_bis_fnc_respawnmenuposition_grid",mapgridposition _pos]; - _namePos = _pos; - }; - _name = _name + " - " + (_namePos call bis_fnc_locationdescription); - } else { - _name = _name call bis_fnc_localize; - }; - - if (_showNotification > 0) then - { - [["RespawnAdded",[_type,_name,_markerType call bis_fnc_textureMarker]],"BIS_fnc_showNotification",_side] call bis_fnc_mp; - }; - } foreach _respawnPositions; - - //--- Update markers and actual module positions - _list = missionnamespace getvariable ["BIS_fnc_moduleRespawnPosition_list",[]]; - _list pushback _logic; - missionnamespace setvariable ["BIS_fnc_moduleRespawnPosition_list",_list]; - if (isnil "BIS_fnc_moduleRespawnPosition_loop") then { - BIS_fnc_moduleRespawnPosition_loop = [] spawn { - scriptname "bis_fnc_moduleRespawnPosition: Loop"; - _listMarkers = []; - waituntil { - _list = missionnamespace getvariable ["BIS_fnc_moduleRespawnPosition_list",[]]; - _refresh = false; - { - if !(isnull _x) then { - //--- Update position - _pos = _x getvariable ["BIS_fnc_position_forced",[0,0,0]]; - if (position _x distance _pos > 0) then { - _pos = position _x; - _x setvariable ["BIS_fnc_position_forced",_pos,true]; //--- Force rewire for BIS_fnc_position - - _marker = _x getvariable ["marker",""]; - if (_marker != "") then { - _marker setmarkerpos _pos; - if !(_marker in _listMarkers) then {_listMarkers pushback _marker;}; - }; - }; - } else { - _refresh = true; - }; - sleep 0.1; - } foreach _list; - if (_refresh) then { - //--- Remove deleted modules from the list - _list = _list - [objnull]; - missionnamespace setvariable ["BIS_fnc_moduleRespawnPosition_list",_list]; - - //--- Remove markers of deleted modules - _listMarkersDelete = +_listMarkers; - { - _listMarkersDelete = _listMarkersDelete - [_x getvariable ["marker",""]]; - } foreach _list; - {deletemarker _x;} foreach _listMarkersDelete; - }; - count _list == 0 - }; - BIS_fnc_moduleRespawnPosition_loop = nil; - }; - }; - } else { - ["Respawn %1 not added, all sides have the same score.",_logic] call bis_fnc_logFormat; - }; -} else { - - //--- Remove - _respawnPositions = _logic getvariable ["respawn",[]]; - { - if (typename _x == typename []) then { - _x call bis_fnc_removeRespawnPosition; - } else { - deletemarker _x; - }; - } foreach _respawnPositions; - _logic setvariable ["respawn",nil]; -}; \ No newline at end of file diff --git a/mission.sqm b/mission.sqm index 5b61fb6b..afae44bb 100644 --- a/mission.sqm +++ b/mission.sqm @@ -12,7 +12,7 @@ class EditorData }; class ItemIDProvider { - nextID=1559; + nextID=1565; }; class MarkerIDProvider { @@ -20,10 +20,10 @@ class EditorData }; class Camera { - pos[]={176.17284,83.197174,94.299255}; - dir[]={0.34651116,-0.44708556,0.82465678}; - up[]={0.17319427,0.89448386,0.4121837}; - aside[]={0.92192632,-1.7072307e-007,-0.38738352}; + pos[]={178.00185,82.294258,80.690353}; + dir[]={0.47211882,-0.53882009,0.69769388}; + up[]={0.30197152,0.84242088,0.44625136}; + aside[]={0.82820106,-1.4901161e-008,-0.56043106}; }; }; binarizationWanted=0; @@ -36,7 +36,6 @@ addons[]= "ace_cargo", "A3_Supplies_F_Orange_Ammoboxes", "AICommand", - "A3_Structures_F_Bootcamp_VR_Helpers", "A3_Characters_F", "3den_Objects", "A3_Supplies_F_AoW_Bags", @@ -47,7 +46,8 @@ addons[]= "ace_refuel", "ace_repair", "A3_Structures_F_Mil_Flags", - "A3_Modules_F_Multiplayer" + "A3_Modules_F_Multiplayer", + "A3_Soft_F_Quadbike_01" }; class AddonsMetaData { @@ -95,85 +95,85 @@ class AddonsMetaData name="AICommand"; }; class Item6 - { - className="A3_Structures_F_Bootcamp"; - name="Arma 3 Bootcamp Update - Buildings and Structures"; - author="Bohemia Interactive"; - url="https://www.arma3.com"; - }; - class Item7 { className="A3_Characters_F"; name="Arma 3 Alpha - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item8 + class Item7 { className="3den_Objects"; name="3den_Objects"; }; - class Item9 + class Item8 { className="A3_Supplies_F_AoW"; name="Arma 3 Art of War - Ammoboxes and Supplies"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item10 + class Item9 { className="ace_explosives"; name="ACE3 - Explosives"; author="ACE-Team"; url="https://ace3.acemod.org/"; }; - class Item11 + class Item10 { className="A3_Soft_F_Gamma"; name="Arma 3 - Unarmored Land Vehicles"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item12 + class Item11 { className="A3_Soft_F_Exp"; name="Arma 3 Apex - Unarmored Land Vehicles"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item13 + class Item12 { className="Blastcore_MainCore"; name="Blastcore_MainCore"; }; - class Item14 + class Item13 { className="ace_refuel"; name="ACE3 - Refuel"; author="ACE-Team"; url="https://ace3.acemod.org/"; }; - class Item15 + class Item14 { className="ace_repair"; name="ACE3 - Repair"; author="ACE-Team"; url="https://ace3.acemod.org/"; }; - class Item16 + class Item15 { className="A3_Structures_F_Mil"; name="Arma 3 - Military Buildings and Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item17 + class Item16 { className="A3_Modules_F"; name="Arma 3 Alpha - Scripted Modules"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; + class Item17 + { + className="A3_Soft_F"; + name="Arma 3 Alpha - Unarmored Land Vehicles"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; }; }; dlcs[]= @@ -5032,7 +5032,7 @@ class Mission }; class Entities { - items=65; + items=63; class Item0 { dataType="Logic"; @@ -5689,138 +5689,6 @@ class Mission type="AdvancedAICommand_Commanders"; }; class Item23 - { - dataType="Object"; - class PositionInfo - { - position[]={199.974,5.0005002,192.006}; - }; - side="Empty"; - flags=5; - class Attributes - { - name="respawner_west"; - }; - id=1347; - type="VR_Area_01_square_1x1_yellow_F"; - class CustomAttributes - { - class Attribute0 - { - property="ObjectTextureCustom0"; - expression="_this setObjectTextureGlobal [0,_value]"; - class Value - { - class data - { - singleType="STRING"; - value="#(argb,8,8,3)color(0,0.3,0.6,1,co)"; - }; - }; - }; - nAttributes=1; - }; - }; - class Item24 - { - dataType="Object"; - class PositionInfo - { - position[]={300.008,5.0005002,191.563}; - }; - side="Empty"; - flags=5; - class Attributes - { - name="respawner_east"; - }; - id=1348; - type="VR_Area_01_square_1x1_yellow_F"; - class CustomAttributes - { - class Attribute0 - { - property="ObjectTextureCustom0"; - expression="_this setObjectTextureGlobal [0,_value]"; - class Value - { - class data - { - singleType="STRING"; - value="#(argb,8,8,3)color(0.5,0,0,1,co)"; - }; - }; - }; - nAttributes=1; - }; - }; - class Item25 - { - dataType="Object"; - class PositionInfo - { - position[]={299.98801,5.0005002,293.979}; - }; - side="Empty"; - flags=5; - class Attributes - { - name="respawner_civ"; - }; - id=1349; - type="VR_Area_01_square_1x1_yellow_F"; - class CustomAttributes - { - class Attribute0 - { - property="ObjectTextureCustom0"; - expression="_this setObjectTextureGlobal [0,_value]"; - class Value - { - class data - { - singleType="STRING"; - value="#(argb,8,8,3)color(0.4,0,0.5,1,co)"; - }; - }; - }; - nAttributes=1; - }; - }; - class Item26 - { - dataType="Object"; - class PositionInfo - { - position[]={199.96899,5.0005002,293.98001}; - }; - side="Empty"; - flags=5; - class Attributes - { - name="respawner_guer"; - }; - id=1350; - type="VR_Area_01_square_1x1_yellow_F"; - class CustomAttributes - { - class Attribute0 - { - property="ObjectTextureCustom0"; - expression="_this setObjectTextureGlobal [0,_value]"; - class Value - { - class data - { - singleType="STRING"; - value="#(argb,8,8,3)color(0,0.5,0,1,co)"; - }; - }; - }; - nAttributes=1; - }; - }; - class Item27 { dataType="Logic"; class PositionInfo @@ -5833,7 +5701,7 @@ class Mission id=1352; type="HeadlessClient_F"; }; - class Item28 + class Item24 { dataType="Logic"; class PositionInfo @@ -5846,7 +5714,7 @@ class Mission id=1353; type="HeadlessClient_F"; }; - class Item29 + class Item25 { dataType="Logic"; class PositionInfo @@ -5859,7 +5727,7 @@ class Mission id=1354; type="HeadlessClient_F"; }; - class Item30 + class Item26 { dataType="Object"; class PositionInfo @@ -5923,7 +5791,7 @@ class Mission nAttributes=1; }; }; - class Item31 + class Item27 { dataType="Object"; class PositionInfo @@ -5939,7 +5807,7 @@ class Mission id=1381; type="B_AssaultPack_mcamo"; }; - class Item32 + class Item28 { dataType="Object"; class PositionInfo @@ -5956,7 +5824,7 @@ class Mission id=1382; type="B_AssaultPack_ocamo"; }; - class Item33 + class Item29 { dataType="Object"; class PositionInfo @@ -5972,7 +5840,7 @@ class Mission id=1383; type="B_AssaultPack_dgtl"; }; - class Item34 + class Item30 { dataType="Object"; class PositionInfo @@ -5988,7 +5856,7 @@ class Mission id=1385; type="B_CivilianBackpack_01_Everyday_IDAP_F"; }; - class Item35 + class Item31 { dataType="Comment"; class PositionInfo @@ -5999,7 +5867,7 @@ class Mission description="Gearscript in this framework is provided by ACE Arsenal. To add new loadouts, simply go into ACE Arsenal and make them. " \n "" \n "Once you've finished a loadout, press ""EXPORT"" and go to the ""loadouts"" configuration folder. You can paste the loadout code into any of the gear files to set up that unit." \n "" \n "When you paste the loadout, make sure you don't delete the semi-colon ("";"") at the end of each line." \n "" \n "Each Gearscript file also comes with helpful commands to add randomisation and set-up resupply crates. For help and examples, see the ""gear_blufor.sqf"" configuration file."; id=1394; }; - class Item36 + class Item32 { dataType="Comment"; class PositionInfo @@ -6010,7 +5878,7 @@ class Mission description="When any unit is deleted, they will be turned into a Gravestone. These can be any kind of container, but by default they are configured to be backpacks." \n "" \n "You can change the Gravestone that appears for BLUFOR by deleting the backpack here, and then naming a container to ""gravestone_blufor"". The same rule applies to other factions." \n "" \n "You can control the Gravestone system's rules by using the ""gravestones.hpp"" configuration file."; id=1392; }; - class Item37 + class Item33 { dataType="Comment"; class PositionInfo @@ -6021,7 +5889,7 @@ class Mission description="This framework provides a system for setting the identities of each side. For example, you can set the enemy to be ""tanoan"", ""greek"", and they will look and sound the part." \n "" \n "To see all available identites, see the ""identityGroups.sqf"" configuration file inside the ""identities"" folder." \n "" \n "To set-up identities for each side, see the ""identityAssignment.sqf"" configuration file."; id=1395; }; - class Item38 + class Item34 { dataType="Comment"; class PositionInfo @@ -6032,7 +5900,7 @@ class Mission description="When in-game, Loadout Lockers will let you choose loadouts for a specific faction. This one is set to give you BLUFOR loadouts." \n "" \n "You can make Loadout Lockers for other factions by copy-pasting this locker and changing ""blu_f"" inside the Init Field to ""opf_f"", ""ind_f"" or ""civ_f""."; id=1388; }; - class Item39 + class Item35 { dataType="Comment"; class PositionInfo @@ -6043,7 +5911,7 @@ class Mission description="Loot Crates contain random items, like in RPG games (Skyrim, Borderlands etc.)." \n "" \n "You can set-up loot-tables in the ""lootBox.sqf"" configuration file. This is currently considered an advanced feature because loot-tables are not simple to set up. If you have any issues, ask Bubbus for help."; id=1390; }; - class Item40 + class Item36 { dataType="Comment"; class PositionInfo @@ -6054,7 +5922,7 @@ class Mission description="The best way to make a new squad is to copy-paste one of the existing ones. This will keep their gearscript lines and role names intact." \n "" \n "It's also a good idea to create compositions for new squads, enemy patrols etc. This can massively speed up the creation of new missions."; id=1397; }; - class Item41 + class Item37 { dataType="Comment"; class PositionInfo @@ -6065,7 +5933,7 @@ class Mission description="This marker creates an auto-generated list of radio channels. It will show up in-game in the Map screen." \n "" \n "You can move this marker around to move the list. You can also scale this marker up and down to change the size of the list."; id=1389; }; - class Item42 + class Item38 { dataType="Comment"; class PositionInfo @@ -6076,18 +5944,18 @@ class Mission description="Check the ""respawn.hpp"" configuration file to set the respawn mode." \n "" \n "Players can respawn individually, in waves, using tickets etc."; id=1387; }; - class Item43 + class Item39 { dataType="Comment"; class PositionInfo { - position[]={207.93277,5,176.02776}; + position[]={207.933,5,176.028}; }; title="Respawner Objects"; - description="See the example respawn locations near this comment. " \n "" \n "You can set objects such as vehicles, players, markers etc as player respawn locations." \n "" \n "You can also make respawn points appear or disappear by linking them to triggers."; + description="See the example respawn locations near this comment. " \n "" \n "You can set vehicles as player respawn locations by Syncing the respawn location to them. You can also use 'attachTo' with the respawn locations if needed." \n "" \n "You can also make respawn points appear or disappear by linking them to triggers."; id=1386; }; - class Item44 + class Item40 { dataType="Comment"; class PositionInfo @@ -6098,7 +5966,7 @@ class Mission description="See the ""squadMarkers"" folder inside the configuration folder." \n "" \n "Squad markers are given to each squad inside that file. If you want to add new squads, you can set their Callsign in this editor, and then use that exact same Callsign in the ""squadMarkers_blufor.sqf"" file to set up their colour, icon and more. The same rule applies to different factions." \n "" \n "For more help, see the ""squadMarkers_blufor.sqf"" file for instructions and a default example."; id=1393; }; - class Item45 + class Item41 { dataType="Comment"; class PositionInfo @@ -6109,7 +5977,7 @@ class Mission description="You can delete all of these comments easily by finding the Comments folder in the panel on the left." \n "" \n "Click, Shift+Click, Delete."; id=1398; }; - class Item46 + class Item42 { dataType="Comment"; class PositionInfo @@ -6120,7 +5988,7 @@ class Mission description="This trigger is configured to ignore any Zeuses which fly into it, but any normal player who steps inside is still counted. " \n "" \n "You can copy-paste this trigger if you need more than one."; id=1391; }; - class Item47 + class Item43 { dataType="Group"; side="West"; @@ -6624,7 +6492,7 @@ class Mission nAttributes=2; }; }; - class Item48 + class Item44 { dataType="Group"; side="West"; @@ -7051,7 +6919,7 @@ class Mission nAttributes=2; }; }; - class Item49 + class Item45 { dataType="Group"; side="West"; @@ -7478,7 +7346,7 @@ class Mission nAttributes=2; }; }; - class Item50 + class Item46 { dataType="Group"; side="West"; @@ -7905,7 +7773,7 @@ class Mission nAttributes=2; }; }; - class Item51 + class Item47 { dataType="Group"; side="West"; @@ -8182,7 +8050,7 @@ class Mission nAttributes=2; }; }; - class Item52 + class Item48 { dataType="Object"; class PositionInfo @@ -8216,7 +8084,7 @@ class Mission nAttributes=1; }; }; - class Item53 + class Item49 { dataType="Comment"; class PositionInfo @@ -8227,7 +8095,7 @@ class Mission description="This HEMTT is configured to allow an engineer in the command group to spawn new vehicles from it." \n "" \n "You can change the configuration and the permissions around it. See the ""logiVehicles.sqf"" file in the configuration folder for more information."; id=1486; }; - class Item54 + class Item50 { dataType="Object"; class PositionInfo @@ -8243,7 +8111,7 @@ class Mission id=1546; type="Flag_NATO_F"; }; - class Item55 + class Item51 { dataType="Logic"; class PositionInfo @@ -8322,12 +8190,12 @@ class Mission nAttributes=5; }; }; - class Item56 + class Item52 { dataType="Logic"; class PositionInfo { - position[]={207.94449,5,167.98802}; + position[]={207.98907,5,168.03354}; }; id=1548; type="ModuleRespawnPosition_F"; @@ -8401,7 +8269,7 @@ class Mission nAttributes=5; }; }; - class Item57 + class Item53 { dataType="Logic"; class PositionInfo @@ -8480,7 +8348,7 @@ class Mission nAttributes=5; }; }; - class Item58 + class Item54 { dataType="Trigger"; position[]={215.89928,5,178.00525}; @@ -8493,33 +8361,30 @@ class Mission id=1550; type="EmptyDetector"; }; - class Item59 + class Item55 { dataType="Trigger"; - position[]={194.459,5,176.62601}; + position[]={193.91266,5,176.10699}; class Attributes { - onActivation="systemChat str thisList;" \n "[toggleableRespawnModule_1, nil, false] call f_fnc_moduleRespawnPosition;"; - onDeactivation="systemChat ""off"";" \n "[toggleableRespawnModule_1] call f_fnc_moduleRespawnPosition;"; sizeA=5; sizeB=5; sizeC=5; repeatable=1; + activationType="NOT PRESENT"; activationBy="ANY"; isRectangle=1; }; id=1551; type="EmptyDetectorArea10x10"; }; - class Item60 + class Item56 { dataType="Logic"; class PositionInfo { - position[]={200.052,5,176.103}; + position[]={200.01427,5,176.05339}; }; - name="toggleableRespawnModule_1"; - init="this setVariable [""markerName"", ""toggleableRespawnMarker_1""];"; id=1552; type="ModuleRespawnPosition_F"; class CustomAttributes @@ -8592,7 +8457,7 @@ class Mission nAttributes=5; }; }; - class Item61 + class Item57 { dataType="Marker"; position[]={194.59695,5,179.24211}; @@ -8600,44 +8465,227 @@ class Mission type="Empty"; id=1555; }; - class Item62 + class Item58 { - dataType="Object"; + dataType="Comment"; class PositionInfo { - position[]={194.44592,5.0005002,173.75635}; + position[]={194.373,5,179.433}; }; - side="Empty"; - flags=5; + title="Toggleable respawn points."; + description="Sync the respawn location to a trigger! But be aware: respawn points count as ""Anybody"" for the purposes of activating triggers. Put the respawn point inside the trigger and see for yourself." \n "" \n "There is an example just beside this, showing how to filter out the respawn point. Look at the ""Condition"" field." \n "" \n "You don't need the ""Condition"" filter if you use anything other than ""Anybody"" activation. For example, ""Any player"" and ""BLUFOR"" do not have this issue."; + id=1558; + }; + class Item59 + { + dataType="Trigger"; + position[]={193.92677,5,164.0257}; class Attributes { + condition="(thisList findIf {side _x isNotEqualTo sideLogic}) < 0"; + sizeA=5; + sizeB=5; + sizeC=5; + repeatable=1; + activationType="NOT PRESENT"; + activationBy="ANY"; + isRectangle=1; }; - id=1556; - type="VR_Area_01_square_1x1_grey_F"; + id=1559; + type="EmptyDetectorArea10x10"; }; - class Item63 + class Item60 { - dataType="Trigger"; - position[]={200.05464,5,176.48682}; - class Attributes + dataType="Logic"; + class PositionInfo { - condition="false"; - sizeA=0; - sizeB=0; + position[]={194.01508,5,166.08011}; + }; + id=1560; + type="ModuleRespawnPosition_F"; + class CustomAttributes + { + class Attribute0 + { + property="ModuleRespawnPosition_F_Marker"; + expression="_this setVariable ['Marker',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="2"; + }; + }; + }; + class Attribute1 + { + property="ModuleRespawnPosition_F_Name"; + expression="_this setVariable ['Name',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="Nobody is near (ignoring the respawn point itself)."; + }; + }; + }; + class Attribute2 + { + property="ModuleRespawnPosition_F_Side"; + expression="_this setVariable ['Side',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute3 + { + property="ModuleRespawnPosition_F_ShowNotification"; + expression="_this setVariable ['ShowNotification',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute4 + { + property="ModuleRespawnPosition_F_Type"; + expression="_this setVariable ['Type',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="0"; + }; + }; + }; + nAttributes=5; }; - id=1557; - type="EmptyDetector"; }; - class Item64 + class Item61 { - dataType="Comment"; + dataType="Logic"; class PositionInfo { - position[]={194.47818,5,177.83252}; + position[]={208.093,65,155.95599}; + }; + init="this attachTo [parachuteQuadbike];"; + id=1563; + type="ModuleRespawnPosition_F"; + atlOffset=60; + class CustomAttributes + { + class Attribute0 + { + property="ModuleRespawnPosition_F_Marker"; + expression="_this setVariable ['Marker',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="2"; + }; + }; + }; + class Attribute1 + { + property="ModuleRespawnPosition_F_Name"; + expression="_this setVariable ['Name',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="Parachute wherever the quadbike goes!"; + }; + }; + }; + class Attribute2 + { + property="ModuleRespawnPosition_F_Side"; + expression="_this setVariable ['Side',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute3 + { + property="ModuleRespawnPosition_F_ShowNotification"; + expression="_this setVariable ['ShowNotification',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="1"; + }; + }; + }; + class Attribute4 + { + property="ModuleRespawnPosition_F_Type"; + expression="_this setVariable ['Type',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value="0"; + }; + }; + }; + nAttributes=5; + }; + }; + class Item62 + { + dataType="Object"; + class PositionInfo + { + position[]={208.061,6.6262865,155.98801}; + }; + side="Empty"; + flags=4; + class Attributes + { + name="parachuteQuadbike"; + }; + id=1564; + type="B_Quadbike_01_F"; + class CustomAttributes + { + class Attribute0 + { + property="ammoBox"; + expression="[_this,_value] call bis_fnc_initAmmoBox;"; + class Value + { + class data + { + singleType="STRING"; + value="[[[[""FirstAidKit""],[4]],[[],[]],[[],[]],[[],[]]],false]"; + }; + }; + }; + nAttributes=1; }; - title="Toggleable respawn points."; - description="A special set-up is needed to make respawn points that can be disabled and re-enabled." \n "" \n "This is an advanced example. If you need a respawn point that doesn't need to be disabled later on, you can use the simpler ""Only appears when logi vic is dead"" example." \n "" \n "Be aware: respawn points count as ""Anybody"" for the purposes of activating triggers. Put the respawn point inside the trigger and see for yourself."; - id=1558; }; }; class Connections @@ -8673,7 +8721,7 @@ class Mission { linkID=2; item0=1552; - item1=1556; + item1=1551; class CustomData { type="Sync"; @@ -8682,8 +8730,8 @@ class Mission class Item3 { linkID=3; - item0=1557; - item1=1552; + item0=1560; + item1=1559; class CustomData { type="Sync"; From 1340e3bb9ca3b52fb316966aa08b2b84ccb766f9 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Tue, 22 Nov 2022 14:23:59 +0000 Subject: [PATCH 20/24] Made BIS spectator respect ACE camera mode settings. --- .../respawn/fn_respawnSpectatorTweaks.sqf | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/components/respawn/fn_respawnSpectatorTweaks.sqf b/components/respawn/fn_respawnSpectatorTweaks.sqf index f6628e73..73920f99 100644 --- a/components/respawn/fn_respawnSpectatorTweaks.sqf +++ b/components/respawn/fn_respawnSpectatorTweaks.sqf @@ -28,15 +28,47 @@ _cameraModesBackground ctrlSetPositionW (8 * (((safezoneW / safezoneH) min 1.2) _cameraModesBackground ctrlCommit 0; +// Find which spectate modes are forbidden by ACE config. Apply this config to the default spectator also. +// The array below has been modified from the ACE settings as BIS spectate does not support disabling 1PP (#1) view. +private _aceOriginalModes = [[0,1,2], [1,2], [0,1], [1], [1,2]] select ace_spectator_restrictModes; +private _removeModes = [0,1,2] - _aceOriginalModes; + + // Reposition the camera buttons to center them within the new background. { private _curPos = (ctrlPosition _x) # 0; _x ctrlSetPositionX (_curPos - (0.3 * (((safezoneW / safezoneH) min 1.2) / 40))); + + if (_forEachIndex in _removeModes) then + { + _x ctrlSetTextColor [1,1,1,0.2]; + }; + _x ctrlCommit 0; } forEach [ - _display displayCtrl 52810, + _display displayCtrl 52809, _display displayCtrl 52811, - _display displayCtrl 52809 -] \ No newline at end of file + _display displayCtrl 52810 +]; + + +// Enforce spectate modes and set to 1PP mode if either of the others are disabled. +[ + { + private _allow3PPCam = !(2 in _this); + private _allowFreeCam = !(0 in _this); + + missionNamespace setVariable ["BIS_EGSpectator_allowFreeCamera", _allowFreeCam]; + missionNamespace setVariable ["BIS_EGSpectator_allow3PPCamera", _allow3PPCam]; + missionNamespace setVariable ["BIS_EGSpectator_showFocusInfo", false]; + + if !(_allow3PPCam and _allowFreeCam) then + { + ["SetFocus", [player]] call (uiNamespace getVariable ["RscDisplayEGSpectator_script", {}]); + ["SetCameraMode", ["fps"]] call BIS_fnc_EGSpectatorCamera; + }; + }, + _removeModes +] call CBA_fnc_execNextFrame; \ No newline at end of file From ceba6813fb7a69d822541cef28c681fc405ee3c6 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Wed, 30 Nov 2022 22:40:30 +0000 Subject: [PATCH 21/24] Added "close" button to redeploy screen. --- components/respawn/fn_doRedeployAction.sqf | 39 +++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/components/respawn/fn_doRedeployAction.sqf b/components/respawn/fn_doRedeployAction.sqf index eb4ff3c2..df52ed62 100644 --- a/components/respawn/fn_doRedeployAction.sqf +++ b/components/respawn/fn_doRedeployAction.sqf @@ -7,6 +7,7 @@ _ctrlHeaderButton ctrlCommit 0; _ctrlHeaderButton ctrlAddEventHandler ["ButtonClick", { params ["_button"]; + private _respawnSelector = uiNamespace getVariable "BIS_RscRespawnControlsMap_ctrlLocList"; private _selectedRespawnIdx = lbCurSel _respawnSelector; @@ -16,4 +17,40 @@ _ctrlHeaderButton ctrlAddEventHandler ["ButtonClick", if !(isNil "_identity") then {[player,_identity] call BIS_fnc_moveToRespawnPosition}; ["close"] call BIS_fnc_showRespawnMenu; } -]; \ No newline at end of file +]; + +private _display = uiNamespace getVariable "bis_rscrespawncontrolsmap_display"; +private _respawnHeader = uiNamespace getVariable "bis_rscrespawncontrolsmap_ctrlheaderbackground"; +private _closeButton = uiNamespace getVariable ["f_redeployMenu_closeButton", controlNull]; + +if (isNull _closeButton) then +{ + private _group = ctrlParentControlsGroup _respawnHeader; + _closeButton = _display ctrlCreate ["RscButton", 97531, _group]; + + _closeButton ctrlAddEventHandler + [ + "ButtonClick", + { + ["close"] call BIS_fnc_showRespawnMenu; + } + ]; + + private _headerPos = ctrlPosition _respawnHeader; + + private _posX = (_headerPos#0); + private _posY = (_headerPos#1) - 0.053; + private _sizeX = 0.15; + private _sizeY = 0.05; + + _closeButton ctrlSetPosition [_posX, _posY, _sizeX, _sizeY]; + _closeButton ctrlSetFont "PuristaLight"; + _closeButton ctrlSetText "EXIT"; + _closeButton ctrlSetShadow 0; + _closeButton ctrlSetBackgroundColor [0.5, 0, 0, 1]; + _closeButton ctrlSetActiveColor [0.9, 0.9, 0.9, 1]; + + _closeButton ctrlCommit 0; + + uiNamespace setVariable ["f_redeployMenu_closeButton", _closeButton]; +}; \ No newline at end of file From 3e817824aa55229aa392638ce4588c9860c9d09b Mon Sep 17 00:00:00 2001 From: Bubbus Date: Wed, 30 Nov 2022 22:41:26 +0000 Subject: [PATCH 22/24] Removed forced auto-respawn for triggered-waves. --- .../respawn/triggeredWave/onPlayerKilled.sqf | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/components/respawn/triggeredWave/onPlayerKilled.sqf b/components/respawn/triggeredWave/onPlayerKilled.sqf index 5de94647..dd25ebb8 100644 --- a/components/respawn/triggeredWave/onPlayerKilled.sqf +++ b/components/respawn/triggeredWave/onPlayerKilled.sqf @@ -32,24 +32,4 @@ setPlayerRespawnTime 1e10; setPlayerRespawnTime 1; } -] call CBA_fnc_waitUntilAndExecute; - - -// Wait until respawn-map or respawn-spectator screen is visible, then force on auto-respawn. -[ - { - (missionNamespace getVariable ["BIS_RscRespawnControlsMap_shown", false]) or {missionNamespace getVariable ["BIS_RscRespawnControlsSpectate_shown", false]} - }, - { - DEBUG_PRINT_CHAT("[TriggeredWaves]: Turning on auto-respawn") - uiNamespace setVariable ["BIS_RscRespawnControls_autorespawn", true]; - }, - [], - - // Set a timeout of 10s just in case we're in an odd configuration where the respawn menu isn't being used. - 10, - { - DEBUG_PRINT_CHAT("[TriggeredWaves]: Auto-respawn setter timed out.") - } - ] call CBA_fnc_waitUntilAndExecute; \ No newline at end of file From 602237aeba2ae7ef0efeaa88b731765622282430 Mon Sep 17 00:00:00 2001 From: Bubbus Date: Wed, 30 Nov 2022 22:41:58 +0000 Subject: [PATCH 23/24] Added "create respawn", "change tickets" and "allow immediate respawn" ZEN modules. --- components/respawn/functions.hpp | 8 +++ .../zen/fn_allowImmediateRespawnLocal.sqf | 8 +++ .../zen/fn_zen_allowImmediateRespawn.sqf | 37 +++++++++++++ .../respawn/zen/fn_zen_changeTickets.sqf | 39 ++++++++++++++ .../respawn/zen/fn_zen_createRespawnPoint.sqf | 53 +++++++++++++++++++ components/respawn/zen_modules.sqf | 14 +++++ components/zen_modules.sqf | 5 +- 7 files changed, 162 insertions(+), 2 deletions(-) create mode 100644 components/respawn/zen/fn_allowImmediateRespawnLocal.sqf create mode 100644 components/respawn/zen/fn_zen_allowImmediateRespawn.sqf create mode 100644 components/respawn/zen/fn_zen_changeTickets.sqf create mode 100644 components/respawn/zen/fn_zen_createRespawnPoint.sqf create mode 100644 components/respawn/zen_modules.sqf diff --git a/components/respawn/functions.hpp b/components/respawn/functions.hpp index 9c6f2d0e..c2794d06 100644 --- a/components/respawn/functions.hpp +++ b/components/respawn/functions.hpp @@ -37,3 +37,11 @@ class respawn_redeployment class createRedeployObject{}; class doRedeployAction{}; }; +class respawn_zen +{ + file = "components\respawn\zen"; + class allowImmediateRespawnLocal{}; + class zen_allowImmediateRespawn{}; + class zen_createRespawnPoint{}; + class zen_changeTickets{}; +}; diff --git a/components/respawn/zen/fn_allowImmediateRespawnLocal.sqf b/components/respawn/zen/fn_allowImmediateRespawnLocal.sqf new file mode 100644 index 00000000..d2a6ac94 --- /dev/null +++ b/components/respawn/zen/fn_allowImmediateRespawnLocal.sqf @@ -0,0 +1,8 @@ + +private _ticketsRemaining = [player, 0, true] call BIS_fnc_respawnTickets; +if (_ticketsRemaining <= 0) then +{ + [player, 1, false] call BIS_fnc_respawnTickets; +}; + +setPlayerRespawnTime 0; \ No newline at end of file diff --git a/components/respawn/zen/fn_zen_allowImmediateRespawn.sqf b/components/respawn/zen/fn_zen_allowImmediateRespawn.sqf new file mode 100644 index 00000000..d2048623 --- /dev/null +++ b/components/respawn/zen/fn_zen_allowImmediateRespawn.sqf @@ -0,0 +1,37 @@ +#include "../macros.hpp" + +params ["_position", "_object"]; + +private _headlessClients = entities "HeadlessClient_F"; +private _humanPlayers = allPlayers - _headlessClients; +private _deadPlayers = _humanPlayers select {!alive _x}; + +if (count _deadPlayers <= 0) exitWith +{ + systemChat "No players are currently dead."; +}; + +private _playerNames = _deadPlayers apply {name _x}; + +private _dialogContent = +[ + ["LIST", "Allow respawn of player", [_deadPlayers, _playerNames, 0, 10]] +]; + +private _onConfirm = +{ + params ["_values"]; + + private _toRespawn = _values # 0; + if (isNull _toRespawn) exitWith {}; + + systemChat format ["Allowing immediate respawn for %1.", name _toRespawn]; + + [] remoteExec ["f_fnc_allowImmediateRespawnLocal", _toRespawn]; +}; + +[ + "Allow immediate respawn", + _dialogContent, + _onConfirm +] call zen_dialog_fnc_create; \ No newline at end of file diff --git a/components/respawn/zen/fn_zen_changeTickets.sqf b/components/respawn/zen/fn_zen_changeTickets.sqf new file mode 100644 index 00000000..b5e444c2 --- /dev/null +++ b/components/respawn/zen/fn_zen_changeTickets.sqf @@ -0,0 +1,39 @@ +#include "../macros.hpp" + +params ["_position", "_object"]; + +private _dialogContent = +[ + ["OWNERS", "Add tickets to:", [[], [], [], 0]], + ["SLIDER", "Amount of tickets", [-25, 25, 0, 0]] +]; + +private _onConfirm = +{ + params ["_values"]; + + private _owners = _values # 0; + private _sides = _owners # 0; + private _groups = _owners # 1; + private _players = _owners # 2; + _owners = _sides + _groups + _players; + if (count _owners <= 0) exitWith {}; + + private _tickets = round (_values # 1); + if (_tickets == 0) exitWith {}; + + private _recipients = if (count _owners > 1) then {format ["%1 targets", count _owners]} else {str (_owners # 0)}; + private _verb = if (_tickets > 0) then {"Added"} else {"Removed"}; + private _adjunct = if (_tickets > 0) then {"to"} else {"from"}; + systemChat format ["%1 %2 respawn tickets %3 %4.", _verb, (abs _tickets), _adjunct, _recipients]; + + { + [_x, _tickets, false] remoteExec ["BIS_fnc_respawnTickets", 2]; + } foreach _owners; +}; + +[ + "Alter respawn tickets", + _dialogContent, + _onConfirm +] call zen_dialog_fnc_create; \ No newline at end of file diff --git a/components/respawn/zen/fn_zen_createRespawnPoint.sqf b/components/respawn/zen/fn_zen_createRespawnPoint.sqf new file mode 100644 index 00000000..b3cc962b --- /dev/null +++ b/components/respawn/zen/fn_zen_createRespawnPoint.sqf @@ -0,0 +1,53 @@ +#include "../macros.hpp" + +params ["_position", "_object"]; + +private _dialogContent = +[ + ["OWNERS", "Spawnpoint owner (CHOOSE ONE ONLY)", [[west], [], [], 0]], + ["EDIT", "Spawnpoint name", []] +]; + +if !(isNull _object) then +{ + private _name = if (_object isKindOf "CAManBase") then {name _object} else {getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "displayName")}; + _dialogContent pushBack ["CHECKBOX", format ["Attach spawnpoint to %1?", _name]]; +}; + +private _onConfirm = +{ + params ["_values", "_args"]; + _args params ["_position", "_object"]; + + private _owners = _values # 0; + private _sides = _owners # 0; + private _groups = _owners # 1; + private _players = _owners # 2; + _owners = _sides + _groups + _players; + if (count _owners <= 0) exitWith {}; + + private _name = _values param [1, ""]; + private _shouldAttach = _values param [2, false]; + + private _spawnPos = if ((!isNull _object) and _shouldAttach) then {_object} else {ASLToATL _position}; + private _posName = if ((!isNull _object) and _shouldAttach) then + { + if (_object isKindOf "CAManBase") then {name _object} else {getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "displayName")} + } + else + { + str ASLToATL _position + }; + + systemChat format ["Created spawnpoint '%3' for %1 at %2.", _owners#0, _posName, _name]; + + [_owners#0, _spawnPos, _name] remoteExec ["BIS_fnc_addRespawnPosition", 2]; +}; + +[ + "Create new spawnpoint", + _dialogContent, + _onConfirm, + {}, + _this +] call zen_dialog_fnc_create; \ No newline at end of file diff --git a/components/respawn/zen_modules.sqf b/components/respawn/zen_modules.sqf new file mode 100644 index 00000000..5ef62ece --- /dev/null +++ b/components/respawn/zen_modules.sqf @@ -0,0 +1,14 @@ +call +{ + private _category = "[CAFE3] Respawn"; + + private _makeRespawn = { _this call f_fnc_zen_createRespawnPoint }; + [_category, "Create Respawn Point", _makeRespawn] call zen_custom_modules_fnc_register; + + private _changeTickets = { _this call f_fnc_zen_changeTickets }; + [_category, "Change Respawn Tickets", _changeTickets] call zen_custom_modules_fnc_register; + + private _allowRespawn = { _this call f_fnc_zen_allowImmediateRespawn }; + [_category, "Allow Immediate Respawn for Player", _allowRespawn] call zen_custom_modules_fnc_register; + +}; diff --git a/components/zen_modules.sqf b/components/zen_modules.sqf index 80ad9ec1..51818c56 100644 --- a/components/zen_modules.sqf +++ b/components/zen_modules.sqf @@ -1,5 +1,6 @@ +#include "aiCache\zen_modules.sqf" #include "ceasefire\zen_modules.sqf" +#include "gearScript\zen_modules.sqf" #include "logiVehicle\zen_modules.sqf" #include "miscClient\zen_modules.sqf" -#include "aiCache\zen_modules.sqf" -#include "gearScript\zen_modules.sqf" +#include "respawn\zen_modules.sqf" From 6245df25c15c0287c319c46f3b1ed0396a5abb8d Mon Sep 17 00:00:00 2001 From: Bubbus Date: Sun, 11 Dec 2022 17:54:54 +0000 Subject: [PATCH 24/24] Feedback from testing: docs and jip/teleport toggle support. --- components/joinInProgress/init_component.sqf | 4 ++ components/respawn/squad/onPlayerRespawn.sqf | 6 +++ configuration/respawn.hpp | 45 ++++++++++++++------ 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/components/joinInProgress/init_component.sqf b/components/joinInProgress/init_component.sqf index 1236b4aa..9783f354 100644 --- a/components/joinInProgress/init_component.sqf +++ b/components/joinInProgress/init_component.sqf @@ -2,9 +2,13 @@ DEBUG_PRINT_LOG("initting joinInProgress") +#ifdef ALLOW_TELEPORT_UPON_JIP + waitUntil {local player}; if (hasInterface and didJIP) then { player setVariable ["f_var_mayTeleportToGroup", true, true]; }; + +#endif \ No newline at end of file diff --git a/components/respawn/squad/onPlayerRespawn.sqf b/components/respawn/squad/onPlayerRespawn.sqf index 8dd34285..6161e282 100644 --- a/components/respawn/squad/onPlayerRespawn.sqf +++ b/components/respawn/squad/onPlayerRespawn.sqf @@ -14,5 +14,11 @@ missionNamespace setVariable ["f_var_squad_didFirstSpawn", true]; if ((!didJip) and _didFirstSpawn) exitWith { + #ifdef ALLOW_TELEPORT_UPON_RESPAWN + + player setVariable ["f_var_mayTeleportToGroup", true, true]; + + #endif + createDialog "CAFE_GroupPicker_Dialog"; }; \ No newline at end of file diff --git a/configuration/respawn.hpp b/configuration/respawn.hpp index c3d68c13..74630af8 100644 --- a/configuration/respawn.hpp +++ b/configuration/respawn.hpp @@ -1,21 +1,38 @@ #include "..\respawn_macros.hpp" -// BUB 2022-03-31 TODO: Re-introduce this functionality per-side. -// When a player respawns, do they automatically re-join their group? -//#define RESPAWN_IN_GROUP true +/* + Respawn configuration. + + RESPAWN MODES: + Set a respawn mode for each side. They can be one of the following: + + RESPAWN_MODE_TIMED - A respawn timer for each player individually. + RESPAWN_MODE_TIMED_WAVES - A respawn timer for wave respawns. Players will respawn at the same time at the configured interval. + RESPAWN_MODE_TICKETS - Ticket-based respawn, from whatever tickets have been configured. + RESPAWN_MODE_TIMED_WAVES_TICKETS - Like RESPAWN_MODE_TIMED_WAVES but with tickets also. + RESPAWN_MODE_TRIGGERED_WAVES - The classic wave system, triggered by any group leader. + RESPAWN_MODE_TRIGGERED_WAVES_TICKETS - Like RESPAWN_MODE_TRIGGERED_WAVES, but with tickets also. + + The RESPAWN_DELAY for each side affects the modes above. They set wave delay, individual respawn delay etc. + + Tickets can be given to each side, and also to players of each side. When a player respawns, they will use their own personal tickets first before using any side tickets. + + Respawn locations can be created in the editor using the vanilla respawn system. To affect when a respawn location is enabled/disabled, connect it to a trigger. + Examples are placed in the default mission file. + +*/ -// BUB 2022-03-31 TODO: Re-introduce this functionality, no per-side needed. // When a player JIPs, do they get to teleport to a group of their choosing? -// #define ALLOW_TELEPORT_UPON_JIP +#define ALLOW_TELEPORT_UPON_JIP -// BUB 2022-03-31 TODO: Re-introduce this functionality per-side. // When a player respawns, do they get to teleport to a group of their choosing? // #define ALLOW_TELEPORT_UPON_RESPAWN -#define RESPAWN_WAVE_DURATION 60 +// This only takes effect for the TRIGGERED_WAVES respawn modes. Timed modes will use the RESPAWN_DELAY settings. +#define RESPAWN_WAVE_DURATION 60 // When 'respawnOnStart = 1' in the description.ext file, this is how long players will wait to spawn in when the mission starts. -#define INITIAL_RESPAWN_DELAY 5 +#define INITIAL_RESPAWN_DELAY 5 #define RESPAWN_MODE_BLUFOR RESPAWN_MODE_TRIGGERED_WAVES_TICKETS #define RESPAWN_DELAY_BLUFOR 30 @@ -25,14 +42,14 @@ #define RESPAWN_MODE_OPFOR RESPAWN_MODE_TIMED_WAVES_TICKETS #define RESPAWN_DELAY_OPFOR 10 #define RESPAWN_SIDE_TICKETS_OPFOR 10 -//#define RESPAWN_PLAYER_TICKETS_OPFOR 2 +//#define RESPAWN_PLAYER_TICKETS_OPFOR 2 -#define RESPAWN_MODE_INDFOR RESPAWN_MODE_TIMED_WAVES +#define RESPAWN_MODE_INDFOR RESPAWN_MODE_TIMED_WAVES_TICKETS #define RESPAWN_DELAY_INDFOR RESPAWN_DELAY_BLUFOR -//#define RESPAWN_SIDE_TICKETS_INDFOR 30 -//#define RESPAWN_PLAYER_TICKETS_INDFOR 2 +//#define RESPAWN_SIDE_TICKETS_INDFOR 30 +//#define RESPAWN_PLAYER_TICKETS_INDFOR 2 #define RESPAWN_MODE_CIVILIAN RESPAWN_MODE_TIMED #define RESPAWN_DELAY_CIVILIAN 5 -//#define RESPAWN_SIDE_TICKETS_CIVILIAN 30 -//#define RESPAWN_PLAYER_TICKETS_CIVILIAN 2 \ No newline at end of file +//#define RESPAWN_SIDE_TICKETS_CIVILIAN 30 +//#define RESPAWN_PLAYER_TICKETS_CIVILIAN 2 \ No newline at end of file