Commit 7998c52d authored by Razer's avatar Razer
Browse files

Merge branch 'staging' into feature/DSClans

parents bac6088b c34daae7
[player,["Take",50]] remoteExec ["say3D",allPlayers];
\ No newline at end of file
[player,["Take",50]] remoteExec ["say3D",allPlayers];
params ["_unit","_container","_item"];
// Is backpack (Check duplicate)
if (isClass (configFile >> "CfgVehicles" >> _item)) then {
if (isNull (backpackContainer player)) exitWith {};
if (!isNull DS_var_OpenedContainer && {DS_var_OpenedContainer != _container}) then {
// DUPLICATE
systemChat "Duplicate found";
removeBackpackGlobal player; // This also removes the ability to take the backpack from vehicle. (Even if shown in it)
// TODO, create action to take the backpack again? (Dont remove the backpack from game)
};
};
......@@ -2,7 +2,7 @@ params [["_player", objNull],["_container", objNull]];
[player,["BagClose",50]] remoteExec ["say3D",allPlayers];
DS_var_OpenedContainer = [];
DS_var_OpenedContainer = objNull;
_cType = typeof(_container);
......
......@@ -8,9 +8,14 @@
* https://www.bistudio.com/community/licenses/arma-public-license-share-alike/
* https://www.bistudio.com/monetization/
*/
params[
["_marker","",[""]],
["_spawnType",-1,[-1]]
];
params["_marker","_spawnType"];
if (_marker isEqualTo "") exitWith {
[nil, ["water"]] call BIS_fnc_randomPos;
};
if(_spawnType == -1) then {diag_log "<Desolation>: ERROR: Spawn mode not set. Default will be used";_spawnType = 0};
......
......@@ -11,6 +11,8 @@
diag_log "<Desolation>: INFO: Finish spawn #1";
[player] remoteExec ["DB_fnc_registerCharacter",2];
waitUntil {!(isNull (findDisplay 46)) && isGameFocused};
// -_- Otherwise the code might not work as it should...
......
......@@ -22,13 +22,17 @@ _enable = (call compile (["EnableSpawnAreaSelection","DS"] call BASE_fnc_getCfgV
if!(_enable) exitWith {
_spawnRegions = [];
for "_i" from 0 to 20 do {
_region = (["Zone" + str(_i) + "Marker","DS"] call BASE_fnc_getCfgValue);
if !(isNil "_region") then {
_region = (["Zone" + str(_i) + "Marker","DS",""] call BASE_fnc_getCfgValue);
if !(_region isEqualTo "") then {
_spawnRegions pushback _region;
};
};
_spawnRegion = selectRandom _spawnRegions;
_spawnRegion = "";
if(count _spawnRegions > 0) then {
_spawnRegion = selectRandom _spawnRegions;
};
_spawnPos = [_spawnRegion,1] call DS_fnc_findSpawnPosition;
player setDir (random 360);
player setPosATL _spawnPos;
......
......@@ -14,26 +14,25 @@ params["_regionNum"];
diag_log "<Desolation>: INFO: On region select #1";
[player] remoteExec ["DB_fnc_registerCharacter",2];
// [[_marker,_text,_icon,_mode]];
private _settings = ((DS_var_SpawnSettings) select _regionNum);
private _marker = "";
private _mode = 1;
if !(isNil "DS_var_SpawnSettings") then {
private _settings = ((DS_var_SpawnSettings) select _regionNum);
private _marker = ((_settings) select 0);
private _mode = ((_settings) select 3);
if(_mode isEqualType []) then {
_mode = selectRandom _mode;
_marker = ((_settings) select 0);
_mode = ((_settings) select 3);
if(_mode isEqualType []) then {
_mode = selectRandom _mode;
};
};
// Spawn player at position
private _spawnPos = [_marker,_mode] call DS_fnc_findSpawnPosition;
player setDir (random 360);
player setpos _spawnPos;
waitUntil {player distance2D _spawnPos < 100}; //HALO jump support
diag_log "<Desolation>: INFO: On region select #2";
......
......@@ -25,6 +25,7 @@ set PackAddons=true
set PackMissions=true
set DeleteBakFiles=true
set CopyConfigFiles=true
set StoreLibredexLogs=true
set UseGit=false
......@@ -184,12 +185,21 @@ del /s /q /f "%ServerFolder%\mpmissions\*.bak"
:CopyConfigFiles
if %CopyConfigFiles% == false goto StartServer
if %CopyConfigFiles% == false goto storeLibredexLog
cls
echo Copying config files...
xcopy "%GitBranchFolder%\@DesolationServer\Config\*.*" "%ServerFolder%\@DesolationServer\Config" /q /y
:storeLibredexLog
if %StoreLibredexLogs% == false goto Start
cls
if not exist "%serverFolder%\LibredexLogs\" mkdir "%ServerFolder%\LibredexLogs"
if exist "%ServerFolder%\LibRedExLogFile.txt" (
copy /Y "%ServerFolder%\LibRedExLogFile.txt" "%ServerFolder%\LibredexLogs\LibRedExLogFile_%date:~-4%-%date:~6,2%-%date:~3,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%.txt"
:: TODO Add option to remove file automatically if log count > X (Add ability to define this)
)
:StartServer
cls
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment