-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
#include "script_component.hpp" | ||
[{!isNil "BIS_fnc_init" && {time > 0.1} && {!([] call BIS_fnc_isLoading)}},{ | ||
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups; | ||
|
||
{ | ||
[_x,[west,east,resistance]] call BIS_fnc_drawCuratorRespawnMarkers; | ||
[_x] call BIS_fnc_drawCuratorLocations; | ||
[player] call BIS_fnc_drawCuratorDeaths; | ||
} forEach allCurators; | ||
|
||
}] call CBA_fnc_waitUntilAndExecute; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,26 @@ | ||
#include "script_component.hpp" | ||
[{!isNil "BIS_fnc_init" && time > 0.1},{ | ||
|
||
private _startPoses = []; | ||
|
||
// Find suitable respawn positions | ||
for "_i" from 1 to 5 do { | ||
// https://community.bistudio.com/wiki/selectBestPlaces | ||
private _potentialStartPlaces = selectBestPlaces [ | ||
[worldSize / 2, worldSize / 2], // Position | ||
worldSize / 2, // Radius | ||
"meadow + 2*houses - sea", // Expression | ||
75, // Precision | ||
10 // sourcesCount | ||
]; | ||
|
||
MAP(_potentialStartPlaces,_x # 0); | ||
|
||
// Find 4 empty spaces near mentioned places | ||
{ | ||
private _pos = _x; | ||
if (count _startPoses < 4 && {_startPoses findIf {_x distance _pos < 150} == -1}) then { | ||
private _emptyPos = _x findEmptyPosition [0, 25]; | ||
if !(_emptyPos isEqualTo []) then { | ||
PUSH(_startPoses,_emptyPos); | ||
}; | ||
}; | ||
} forEach _potentialStartPlaces; | ||
}; | ||
|
||
if (count _startPoses < 4) exitWith { | ||
"SANDBOX: Unable to find safe places to spawn" remoteExec ["systemChat"]; | ||
ERROR("Unable to find safe places to spawn"); | ||
}; | ||
|
||
private _respawnTypes = [ | ||
"ModuleRespawnPositionEast_F", | ||
"ModuleRespawnPositionWest_F", | ||
"ModuleRespawnPositionGuer_F", | ||
"ModuleRespawnPositionCiv_F" | ||
]; | ||
|
||
private _respawnLogics = []; | ||
private _logicGroup = createGroup sideLogic; | ||
private _boxes = []; | ||
{ | ||
LOG_1("Creating initial respawn at position", _x); | ||
private _box = createVehicle ["Land_PaperBox_open_full_F", _x, [], 0, "NONE"]; | ||
PUSH(_boxes,_box); | ||
|
||
private _respawnPosition = _logicGroup createUnit [(_respawnTypes # _forEachIndex), _box, [], 0, "NONE"]; | ||
_respawnPosition setVariable ['BIS_fnc_initModules_disableAutoActivation', false, true]; | ||
|
||
PUSH(_respawnLogics,_respawnPosition); | ||
} forEach _startPoses; | ||
|
||
// Add Arsenals | ||
[_boxes,{{ | ||
if !(isNil "ACE_arsenal_fnc_openBox") then { | ||
_x addAction [ | ||
"<t size='2' font='RobotoCondensedBold'>ACE Arsenal</t>", | ||
{[player, player, true] call ACE_arsenal_fnc_openBox;}, | ||
0, 102, true, false | ||
]; | ||
}; | ||
_x addAction [ | ||
"<t size='2' font='RobotoCondensedBold'>TMF Loadouts</t>", | ||
{[] call TMF_assignGear_fnc_gearSelector}, | ||
0, 101, true, false | ||
]; | ||
_x addAction [ | ||
"<t size='2' font='RobotoCondensedBold'>Arsenal</t>", | ||
{0 = ["Open", true] spawn BIS_fnc_arsenal;}, | ||
0, 102, true, false | ||
]; | ||
} forEach _this}] remoteExecCall ["BIS_fnc_call", 0, true]; | ||
call COMPILE_FILE(initRespawns); | ||
|
||
// Add boxes and respawn logics to Curator | ||
{ | ||
_x addcuratoreditableobjects [_respawnLogics + _boxes]; | ||
} forEach allCurators; | ||
[ | ||
"ModuleCurator_F", | ||
"init", | ||
{ | ||
params ['_logic']; | ||
|
||
_logic addCuratorEditableObjects [GVAR(boxes) + GVAR(respawnLogics) + GVAR(lanterns)]; | ||
[_logic,[west,east,resistance]] call BIS_fnc_drawCuratorRespawnMarkers; | ||
[_logic] call BIS_fnc_drawCuratorLocations; | ||
{ | ||
[_x] call BIS_fnc_drawCuratorDeaths; | ||
} forEach ([] call CBA_fnc_players); | ||
}, | ||
true, | ||
[], | ||
true | ||
] call CBA_fnc_addClassEventHandler; | ||
|
||
["Initialize", [true]] call BIS_fnc_dynamicGroups; | ||
|
||
}] call CBA_fnc_waitUntilAndExecute; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#include "script_component.hpp" | ||
|
||
private _startPoses = []; | ||
|
||
private _respawnTypes = [ | ||
"ModuleRespawnPositionEast_F", | ||
"ModuleRespawnPositionWest_F", | ||
"ModuleRespawnPositionGuer_F"/*, | ||
"ModuleRespawnPositionCiv_F"*/ // Civ respawn disabled | ||
]; | ||
|
||
// Find suitable respawn positions | ||
for "_i" from 1 to 5 do { | ||
// https://community.bistudio.com/wiki/selectBestPlaces | ||
private _potentialStartPlaces = selectBestPlaces [ | ||
[worldSize / 2, worldSize / 2], // Position | ||
worldSize / 2, // Radius | ||
"meadow + 2*houses - sea", // Expression | ||
75, // Precision | ||
10 // sourcesCount | ||
]; | ||
|
||
MAP(_potentialStartPlaces,_x # 0); | ||
|
||
// Find 4 empty spaces near mentioned places | ||
{ | ||
private _pos = _x; | ||
if (count _startPoses < count _respawnTypes && {_startPoses findIf {_x distance _pos < 150} == -1}) then { | ||
private _emptyPos = _x findEmptyPosition [0, 25]; | ||
if !(_emptyPos isEqualTo []) then { | ||
PUSH(_startPoses,_emptyPos); | ||
}; | ||
}; | ||
} forEach _potentialStartPlaces; | ||
}; | ||
|
||
if (count _startPoses < count _respawnTypes) exitWith { | ||
"SANDBOX: Unable to find safe places to spawn" remoteExec ["systemChat"]; | ||
ERROR("Unable to find safe places to spawn"); | ||
}; | ||
|
||
private _respawnLogics = []; | ||
private _logicGroup = createGroup sideLogic; | ||
private _boxes = []; | ||
private _lanterns = []; | ||
{ | ||
LOG_1("Creating initial respawn at position", _x); | ||
private _box = createVehicle ["Land_PaperBox_open_full_F", _x, [], 0, "NONE"]; | ||
private _lantern = createVehicle ["Land_Camping_Light_F", _x, [], 0, "NONE"]; | ||
_lantern attachTo [_box, [-0.422119,0.346191,0.685676]]; | ||
_lantern setVectorDirAndUp [vectorDir _box, vectorUp _box]; | ||
PUSH(_boxes,_box); | ||
PUSH(_lanterns,_lantern); | ||
|
||
private _respawnPosition = _logicGroup createUnit [(_respawnTypes # _forEachIndex), _box, [], 0, "NONE"]; | ||
_respawnPosition setVariable ['BIS_fnc_initModules_disableAutoActivation', false, true]; | ||
|
||
PUSH(_respawnLogics,_respawnPosition); | ||
} forEach _startPoses; | ||
|
||
// Add Arsenals | ||
[_boxes,{{ | ||
if !(isNil "ACE_arsenal_fnc_openBox") then { | ||
_x addAction [ | ||
"<t size='2' font='RobotoCondensedBold'>ACE Arsenal</t>", | ||
{[player, player, true] call ACE_arsenal_fnc_openBox;}, | ||
0, 102, true, false | ||
]; | ||
}; | ||
_x addAction [ | ||
"<t size='2' font='RobotoCondensedBold'>TMF Loadouts</t>", | ||
{[] call TMF_assignGear_fnc_gearSelector}, | ||
0, 101, true, false | ||
]; | ||
_x addAction [ | ||
"<t size='2' font='RobotoCondensedBold'>Arsenal</t>", | ||
{0 = ["Open", true] spawn BIS_fnc_arsenal;}, | ||
0, 102, true, false | ||
]; | ||
} forEach _this}] remoteExecCall ["BIS_fnc_call", 0, true]; | ||
|
||
GVAR(boxes) = _boxes; | ||
GVAR(lanterns) = _lanterns; | ||
GVAR(respawnLogics) = _respawnLogics; | ||
publicVariable QGVAR(boxes); | ||
publicVariable QGVAR(respawnLogics); | ||
publicVariable QGVAR(lanterns); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
#include "script_component.hpp" | ||
cba_settings_hasSettingsFile = 1; | ||
class Extended_PostInit_EventHandlers { | ||
class arc_postInit { | ||
class GVAR(postInit) { | ||
serverInit = QUOTE(call COMPILE_FILE(XEH_serverPostInit)); | ||
clientInit = QUOTE(call COMPILE_FILE(XEH_clientPostInit)); | ||
}; | ||
}; | ||
|
||
author = "ARCOMM"; | ||
onLoadMission = "Welcome to the sandbox, may Zeus decide your fate."; | ||
|
||
respawn = 3; | ||
respawnDelay = 20; | ||
respawnVehicleDelay = 30; | ||
respawnTemplates[] = {"MenuPosition","Spectator","Tickets", "Counter"}; | ||
respawnTemplatesVirtual[] = {}; | ||
|
||
disabledAI = 1; | ||
joinUnassigned = 1; | ||
disabledAI = true; | ||
joinUnassigned = true; | ||
|
||
saving = 0; | ||
saving = false; | ||
|
||
class Params { | ||
#define DAYTIMEPERIOD_DEFAULT __EVAL(selectRandom [0,6,12,18]) | ||
#include "\a3\functions_f\Params\paramDaytimePeriod.hpp" | ||
#include "\a3\functions_f\Params\paramGuerFriendly.hpp" | ||
#define WEATHER_DEFAULT __EVAL(selectRandom [0,25,50,75,100]) | ||
#include "\a3\functions_f\Params\paramWeather.hpp" | ||
#include "\a3\Functions_F_MP_Mark\Params\paramTimeAcceleration.hpp" | ||
}; |