move mission into src
Build Mission PBO / pack (push) Failing after 20s
Build Mission PBO / deploy (push) Has been skipped

This commit is contained in:
MrFastwind
2026-06-14 01:53:24 +02:00
parent b5bd14928e
commit 5a7879bca8
479 changed files with 45 additions and 34 deletions
+51
View File
@@ -0,0 +1,51 @@
private [ "_minfobdist", "_minsectordist", "_distfob", "_clearedtobuildfob", "_distsector", "_clearedtobuildsector", "_idx" ];
if ( count GRLIB_all_fobs >= GRLIB_maximum_fobs ) exitWith {
hint format [ localize "STR_HINT_FOBS_EXCEEDED", GRLIB_maximum_fobs ];
};
_minfobdist = 1000;
_minsectordist = GRLIB_capture_size + GRLIB_fob_range;
_distfob = 1;
_clearedtobuildfob = true;
_distsector = 1;
_clearedtobuildsector = true;
FOB_build_in_progress = true;
publicVariable "FOB_build_in_progress";
_idx = 0;
while { (_idx < (count GRLIB_all_fobs)) && _clearedtobuildfob } do {
if ( player distance (GRLIB_all_fobs select _idx) < _minfobdist ) then {
_clearedtobuildfob = false;
_distfob = player distance (GRLIB_all_fobs select _idx);
};
_idx = _idx + 1;
};
_idx = 0;
if(_clearedtobuildfob) then {
while { (_idx < (count sectors_allSectors)) && _clearedtobuildsector } do {
if ( player distance (markerPos (sectors_allSectors select _idx)) < _minsectordist ) then {
_clearedtobuildsector = false;
_distsector = player distance (markerPos (sectors_allSectors select _idx));
};
_idx = _idx + 1;
};
};
if (!_clearedtobuildfob) then {
hint format [localize "STR_FOB_BUILDING_IMPOSSIBLE",floor _minfobdist,floor _distfob];
FOB_build_in_progress = false;
publicVariable "FOB_build_in_progress";
} else {
if ( !_clearedtobuildsector ) then {
hint format [localize "STR_FOB_BUILDING_IMPOSSIBLE_SECTOR",floor _minsectordist,floor _distsector];
FOB_build_in_progress = false;
publicVariable "FOB_build_in_progress";
} else {
buildtype = 99;
dobuild = 1;
deleteVehicle (_this select 0);
};
};