Compare commits

...

137 Commits

Author SHA1 Message Date
Wyqer f228b0cb0d
Another typo 2019-12-11 20:31:36 +01:00
Wyqer e18599a6f7
Fixed two typos 2019-12-11 17:18:44 +01:00
Wyqer 6b800e4d75
Removed rearmVehicle and setFuel functions 2019-12-10 18:02:22 +01:00
Wyqer a85d0fad56
fn_protectObject.sqf 2019-12-08 09:35:03 +01:00
Wyqer 93d942c4bb
fn_potatoScan 2019-12-07 23:00:19 +01:00
Wyqer bb38079cec
fn_isRadio 2019-12-07 22:04:19 +01:00
Wyqer 73de07c32c
fn_isClassUAV 2019-12-07 21:58:18 +01:00
Wyqer cc149d0d0d
fn_isBigtownActive 2019-12-07 21:16:40 +01:00
Wyqer ea35b29dca
fn_getUnitsCount 2019-12-07 11:22:40 +01:00
Wyqer fd215c17fa
fn_getUnitPositionId 2019-12-07 11:08:47 +01:00
Wyqer 0407c62377
fn_getSectorRange 2019-12-07 10:45:24 +01:00
Wyqer 8e2ac32de9
fn_getSectorOwnership 2019-12-07 00:12:33 +01:00
Wyqer d4fdbc7de6
fn_getLocationName 2019-12-06 23:36:32 +01:00
Wyqer 46325899e0
fn_getMilitaryId
From 0.615006 ms down to 0.0162 ms with `7580` as given parameter.
2019-12-06 23:19:53 +01:00
Wyqer 90a73acb50
fn_getSaveableParam 2019-12-06 21:49:14 +01:00
Wyqer e031142cdf
fn_getResistanceTier 2019-12-06 21:46:23 +01:00
Wyqer 1a939d9389
Adjustments for fn_getNearestBluforObjective 2019-12-06 15:48:38 +01:00
Wyqer 4c2eb06953
fn_getOpforCap 2019-12-06 15:48:00 +01:00
Wyqer b4800a14af
fn_getNearestViVTransport 2019-12-06 15:47:51 +01:00
Wyqer 5390443521
fn_getNearestTower 2019-12-06 15:47:31 +01:00
Wyqer 40df8a5e6b
fn_getNearestSector 2019-12-06 15:47:22 +01:00
Wyqer 40c89ccfb4
fn_getNearestBluforObjective 2019-12-06 15:46:54 +01:00
Wyqer c68b7e9eb1
fn_getNearestFob 2019-12-05 23:01:39 +01:00
Wyqer d4088ae9e5
fn_getNearbyPlayers 2019-12-05 22:43:04 +01:00
Wyqer b70e3505d5
fn_getMobileRespawns 2019-12-05 22:37:32 +01:00
Wyqer fec002f37b
fn_getLocalCap 2019-12-05 22:22:14 +01:00
Wyqer b257d4a197
enforce_whitelist 2019-12-05 22:17:55 +01:00
Wyqer 252c3cb38a
Changed indentation 2019-12-05 18:32:56 +01:00
Wyqer 176d8f1447
Removed KPLIB_fnc_isAdmin 2019-12-05 18:31:31 +01:00
Wyqer 2ccae67bcf
Removed unused offload_diag and calculation 2019-12-05 18:11:49 +01:00
Wyqer a0cee3b586
fn_getLessLoadedHC 2019-12-05 18:07:16 +01:00
Wyqer c68db8a058
fn_getGroupType 2019-12-05 16:57:38 +01:00
Wyqer c369c59564
fn_setFobMass 2019-12-05 16:36:49 +01:00
Wyqer 21a3a4deb7
fn_getForceRatio to fn_getBluforRatio 2019-12-05 16:36:42 +01:00
Wyqer 2d0a300177
fn_fillStorage 2019-12-05 16:36:17 +01:00
Wyqer 1d94daa16a
fn_crGlobalMsg 2019-12-05 16:36:04 +01:00
Wyqer d8ea2adebf
fn_crGetMulti 2019-12-05 16:35:53 +01:00
Wyqer dca429b464
fn_createClearance 2019-12-05 16:35:44 +01:00
Wyqer 557b5fa8d8
fn_crAddAceAction 2019-12-05 16:35:33 +01:00
Wyqer 92dafe05b9
Removed fn_setMass 2019-12-05 16:35:14 +01:00
Wyqer fcea4477f4
Smaller tweaks 2019-12-05 16:33:47 +01:00
Wyqer c99b25ef2f
Replaced old function calls in client build scripts 2019-12-04 19:13:59 +01:00
Wyqer d00a2709a3
Refactor createCrate 2019-12-03 22:33:56 +01:00
Wyqer 68f8c5205a
Refactor checkCrateValue 2019-12-03 22:27:39 +01:00
Wyqer 00656a53d4
Started with param validation and BIS_fnc_error 2019-12-03 22:27:05 +01:00
Wyqer 7849e93627
Fixed some oversights 2019-12-03 22:17:06 +01:00
Wyqer 447df281e9
Refactor getFobName 2019-12-03 16:56:39 +01:00
Wyqer 54188c3adc
Refactor getAdaptiveVehicle 2019-12-03 16:56:30 +01:00
Wyqer 49b4831c35
Last batch of converted functions as TODOs
Mostly all of them needs proper function headers.
Also most likely a complete overhaul/refactor to simplify the functions.
2019-12-03 16:55:45 +01:00
Wyqer e0d78e7a93
CfgFunction Copy/Paste as TODOs 2019-11-25 18:34:21 +01:00
Wyqer 34594ddf9e
Removed much redundant old code in getCommander 2019-11-25 16:37:22 +01:00
Wyqer a9b8319e68
CfgFunctions Part 1 2019-11-25 16:17:45 +01:00
Wyqer 555b2802de
Added terrain config name `pja310` to readme 2019-11-24 09:21:46 +01:00
Christian 7a2ab40b52
Merge pull request #709 from KillahPotatoes/v0.96.7-more_tweaks
V0.96.7 battlegroup tweaks
2019-11-24 09:17:56 +01:00
Wyqer e15001cc7a
`getpos` to `getPos` in battlegroup_ai 2019-11-24 09:12:17 +01:00
Christian bc5d9008c8
Merge pull request #711 from KillahPotatoes/0.96.7-update-changelog
Add RHS transport config fixes to change-log
2019-11-23 22:15:38 +01:00
Filip Maciejewski 5a4b31452d
Add RHS transport config fixes to change-log 2019-11-23 21:44:00 +01:00
Filip Maciejewski eda1efa426
Merge pull request #710 from FatRefrigerator/v.0.96.7
Fixes for RHS transport configs
2019-11-23 21:40:55 +01:00
FatRefrigerator 6fe4f99935 Fixes for RHS transport configs`
Fixes for CH53 and C130J transport configs for the Nov 20, 2019 update
2019-11-22 22:59:19 -08:00
Wyqer 3affa39a46
Missed adding turkish translation update 2019-11-22 23:30:41 +01:00
Wyqer 2d3c7d8691
Update README.md 2019-11-22 23:21:22 +01:00
Wyqer d3e6ef7841
destination pos for paratroopers in battlegroup 2019-11-22 23:17:58 +01:00
Wyqer 6e7405e4a9
unload distance down to 500 2019-11-22 22:50:31 +01:00
Wyqer 150513683a
Update README.md 2019-11-22 22:12:57 +01:00
Wyqer ff2b52b778
Transporthelis in battlegroups drop paratroopers 2019-11-22 22:05:41 +01:00
Wyqer 153b41d2e0
Spawn transported troops closer to target
closes #622
2019-11-22 22:04:22 +01:00
Wyqer 3d6ec00155
Format tweaks to troup_transport 2019-11-22 22:02:42 +01:00
Wyqer f19f9f3c99
Format tweaks to battlegroup_ai 2019-11-22 21:25:19 +01:00
Wyqer 0261bd1060
Indentation to space in battlegroup_ai 2019-11-22 21:01:52 +01:00
Wyqer 2d8c30deff
Indentation to spaces in troup_transport 2019-11-22 20:58:16 +01:00
Wyqer c91255da11
Format tweaks to spawn_battlegroup 2019-11-22 20:57:30 +01:00
Wyqer d9320b96e2
Format tweaks to random_battlegroup 2019-11-22 20:50:01 +01:00
Wyqer 4f69f32e9b
Indentation to space in random_battlegroups 2019-11-22 20:45:32 +01:00
Wyqer 7f473430f7
indentation to space in spawn_battlegroup 2019-11-22 20:35:57 +01:00
Christian 87db8f8367
Merge pull request #708 from KillahPotatoes/v0.96.7-Wyqer2
V0.96.7 wyqer2
2019-11-22 20:30:30 +01:00
Wyqer 67d2652369
`()` needed instead of `{}` 2019-11-21 18:53:13 +01:00
Wyqer 40fd1af4ef
Automatic OS detection for server restart 2019-11-21 17:35:11 +01:00
Wyqer 1a2c24fc45
Readme update 2019-11-21 16:24:27 +01:00
Wyqer c4cb9a4f1f
Parameter value output in server rpt 2019-11-21 16:24:22 +01:00
Wyqer 486732e490
Default blacklist just with static backpacks and tents 2019-11-21 16:23:47 +01:00
Christian d719097beb
Merge pull request #706 from KillahPotatoes/v0.96.7-Wyqer
Small additions for 0.96.7
2019-11-20 22:56:37 +01:00
Wyqer 42a47a9243
Steam UID whitelist for commander actions
Closes #661
2019-11-14 00:09:17 +01:00
Wyqer d3793232cf
Correctly hide error message in sector build
Closes #671
2019-11-13 22:50:09 +01:00
Wyqer 8be9a575e9
save interval as config setting
Closes #692
2019-11-13 22:41:40 +01:00
Christian 9b18557353
Merge pull request #700 from Eogos/v0.96.7-USAF
V0.96.7 USAF preset intergration
2019-11-06 08:22:02 +01:00
Christian 2815e8a2f4
Update README.md 2019-11-06 08:20:20 +01:00
Christian 6e593c8e9d
Merge pull request #701 from Eogos/v0.96.7-CUP-USMC-Fix
Small fix for CUP USMC Woodland Preset
2019-11-06 08:18:34 +01:00
Eogos 2a7954750c fixed USMC Woodland preset having the wrong boat
Changes:
- USMC Woodland preset had the wrong boat compared to Desert version
2019-10-31 20:22:22 -04:00
Eogos f3fead3d42 updated changelog 2019-10-31 20:16:13 -04:00
Eogos 0ce37485f1 added attachTo data for USAF vehicles and adjusted some planes prices
Changes:
- Added attachTo data so USAF C-17, C-130, and CUP C-130 can use Liberation's cargo system
- Adjusted ammo cost for aircraft with pylons vs without
2019-10-31 20:06:44 -04:00
Eogos 527d216a0a added USAF mod vehicles to US themed presets 2019-10-29 20:08:22 -04:00
Filip Maciejewski 3162afb14d
Merge pull request #697 from Eogos/v0.96.7-CUPdate
CUPdate for October 2019
2019-10-25 01:01:09 +02:00
Eogos a225b8943c
Merge branch 'v.0.96.7' into v0.96.7-CUPdate 2019-10-24 13:04:21 -04:00
Eogos 64fb4ee1cd changed Igla AA Pod price
Changes:
- Increased Igla AA Pod static to cost 200 ammo rather than 150
2019-10-24 11:23:02 -04:00
Filip Maciejewski c78cf4b6ef Update changelog 2019-10-23 11:14:17 +02:00
Filip Maciejewski d8a0fa189b Update changelog 2019-10-23 11:13:30 +02:00
Filip Maciejewski 0979da1e4d Ignore objNull when checking attached objects in recycle manager 2019-10-23 11:10:00 +02:00
Filip Maciejewski d8fee01026
Merge pull request #689 from KillahPotatoes/v0.96.7-save-mines
v0.96.7 - Save mines placed around FOBs
2019-10-22 21:14:46 +02:00
Filip Maciejewski 764d24c1f9 Reveal only mines that were known before save 2019-10-22 21:14:11 +02:00
Filip Maciejewski 40cb0084cc
Merge pull request #698 from 654wak654/tr-translations
Update Turkish Translations Part 1
2019-10-22 21:05:50 +02:00
Filip Maciejewski 029ca722d9
Merge pull request #686 from KillahPotatoes/v0.96.7-object-inits
v0.96.7 - Hotfix - Object inits improvements
2019-10-22 20:54:32 +02:00
Eogos 75fafef376 updated CUP ACR preset and removed Titan turrets from CUP BAF preset
Changes:
- Added BRDM (HQ), RM-70, and Humvee Ambulance to ACR factions
- Removed static Titan AT/AA turrets from BAF presets
2019-10-19 15:21:35 -04:00
Ozan Eğitmen fe3a82792c Part 1 2019-10-18 11:00:44 +03:00
Eogos 4c1e48832f Updated README.md 2019-10-17 16:21:54 -04:00
Eogos 6c628e4db7 October 2019 CUP stable build update
Changes:
- Added boats to USMC and BAF Woodland presets
- Added MEV helicopters and Ambulances to BAF Woodland, CDF, US Army, and USMC presets
- Added Igla AA Pod to CDF preset
2019-10-17 16:16:02 -04:00
Eogos 4531184404 Fixed arsenal box price in BLUFOR CUP Presets
Changes:
- Arsenal box in all BLUFOR CUP presets except for ACR were free.
2019-10-17 11:58:27 -04:00
Filip Maciejewski 063b6c3db0
Merge pull request #690 from KillahPotatoes/v0.96.7-build-tool-commit-hash
v0.96.7 - Add version hash to PR built PBOs
2019-10-17 09:41:23 +02:00
Filip Maciejewski e1a9acffae
Fix is nil check in F_addObjectInit.sqf 2019-10-16 18:14:26 +02:00
Filip Maciejewski 5cc2846c20 Fix version replacement 2019-10-16 17:00:15 +02:00
Filip Maciejewski e72a4d127b Add hash to version not version in mission name, mark as dev 2019-10-16 11:01:47 +02:00
Wyqer c786da322c
Todo tree settings update 2019-10-14 20:35:41 +02:00
Wyqer c7d2a871b1
Added vs code workspace settings 2019-10-14 20:06:46 +02:00
Filip Maciejewski 23282845b0 Add caching to objectInits 2019-10-11 11:38:00 +02:00
Filip Maciejewski 5fdc36877f
Fix hash not being applied to version number 2019-10-11 00:25:35 +02:00
Filip Maciejewski de359ef575
Fix typo 2019-10-11 00:10:25 +02:00
Filip Maciejewski 05a4d38e33
Unit creation in F_createManagedUnit in unscheduled 2019-10-11 00:08:13 +02:00
Filip Maciejewski 3b13e0a6a5
Add version hash to PR built PBOs 2019-10-10 23:26:23 +02:00
Filip Maciejewski 48a6dae8a7
Fix saved mines array structure 2019-10-09 20:56:34 +02:00
Filip Maciejewski 197f1b64d5
Create Ammo mines via createVehicle 2019-10-09 20:47:36 +02:00
Filip Maciejewski 62538b1d0f
Remove duplicate semicolons from save_manger.sqf 2019-10-09 20:25:03 +02:00
Filip Maciejewski a2efefea40
Fix syntax error in mine saving 2019-10-09 20:24:22 +02:00
Filip Maciejewski 5a7d47e23a
Fix F_createManagedUnit changing side of target group 2019-10-09 20:04:49 +02:00
Filip Maciejewski 17ae30bfc4 Reveal saved mines to player side 2019-10-08 11:32:28 +02:00
Filip Maciejewski d921748c8d Save mines around FOBs 2019-10-08 11:30:21 +02:00
Filip Maciejewski 979105a05e
Simplify vanilla Helipads class list for objectInits 2019-10-07 22:30:25 +02:00
Filip Maciejewski dcc80d2fbf
Add support for inheritance in KP_objectInits, improve example 2019-10-07 22:00:18 +02:00
Filip Maciejewski f971b74829
Add missing comma and missing argument 2019-10-07 21:53:17 +02:00
Filip Maciejewski 4f36159e9f Fix accidental copy paste in F_createManagedUnit 2019-10-07 20:34:09 +02:00
Filip Maciejewski 754732b1c7 Replace rest of createUnit with F_createManagedUnit 2019-10-07 20:33:54 +02:00
Filip Maciejewski 3aa06587ad Replace more of createUnit with F_createManagedUnit 2019-10-05 14:45:33 +02:00
Filip Maciejewski f2bd5ae71a Replace createUnit with F_createManagedUnit
TODO replace rest of them
2019-10-04 11:51:19 +02:00
Filip Maciejewski 6a0db6c5eb Add F_createManagedUnit function 2019-10-04 11:46:46 +02:00
Filip Maciejewski be4a8adeac Call object inits on spawned crates 2019-10-04 11:46:29 +02:00
Filip Maciejewski ed045c9344
Merge pull request #681 from KillahPotatoes/v0.96.7-mobile-respawn-fix
v0.96.7 - Fix mobile respawn flickering
2019-10-04 11:03:28 +02:00
Filip Maciejewski a2bdcee716
Merge branch 'master' into v.0.96.7 2019-10-03 21:23:36 +02:00
Filip Maciejewski b76f6e0ef7
Fix mobile respawn flickering 2019-10-01 03:51:43 +02:00
Filip Maciejewski ee00bcd730
Add v0.96.7 hotfix entry to changelog 2019-10-01 03:47:22 +02:00
250 changed files with 4448 additions and 3243 deletions

65
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,65 @@
{
"sqf.enableCBA": true,
"sqf.enableACE3": true,
"files.associations": {
"*.hpp": "sqf"
},
"sqflint.ignoredVariables": [
"_input0",
"_thisArgs",
"_thisId",
"_thisType"
],
"psi-header.lang-config": [
{
"license": "Custom",
"language": "sqf",
"rootDirFileName": "description.ext",
"begin": "/*",
"prefix": " ",
"end": "*/",
"forceToTop": true
}
],
"psi-header.changes-tracking": {
"isActive": true,
"include": ["sqf"],
"modDate": "Last Update:",
"modDateFormat": "YYYY-MM-DD",
"autoHeader": "manualSave"
},
"psi-header.license-text": [
"MIT License - http://www.opensource.org/licenses/MIT"
],
"psi-header.templates": [
{
"language": "sqf",
"template": [
"File: <<filename>>",
"Author: KP Liberation Dev Team - https://github.com/KillahPotatoes",
"Date: <<filecreated('YYYY-MM-DD')>>",
"Last Update:",
"License: MIT License - http://www.opensource.org/licenses/MIT",
"",
"Description:",
" No description added yet.",
"",
"Parameter(s):",
" _localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]",
"",
"Returns:",
" Function reached the end [BOOL]"
]
}
],
"todo-tree.highlights.defaultHighlight": {
"type": "tag",
"foreground": "yellow",
"background": "red",
"opacity": 50,
"iconColour": "green"
},
"todo-tree.general.statusBar": "tags",
"todo-tree.tree.showCountsInTree": true,
"todo-tree.tree.flat": true
}

View File

@ -0,0 +1,73 @@
class KPLIB
{
class functions
{
file = "functions";
class addObjectInit {};
class allowCrewInImmobile {};
class checkClass {};
class checkCrateValue {};
class checkGear {};
class cleanOpforVehicle {};
class crAddAceAction {};
class crateFromStorage {};
class crateToStorage {};
class createClearance {};
class createCrate {};
class createManagedUnit {};
class crGetMulti {};
class crGlobalMsg {};
class fillStorage {};
class forceBluforCrew {};
class getAdaptiveVehicle {};
class getBluforRatio {};
class getCommander {};
class getFobName {};
class getGroupType {};
class getLessLoadedHC {};
class getLoadout {};
class getLocalCap {};
class getLocationName {};
class getMilitaryId {};
class getMobileRespawns {};
class getNearbyPlayers {};
class getNearestBluforObjective {};
class getNearestFob {};
class getNearestSector {};
class getNearestTower {};
class getNearestViVTransport {};
class getOpforCap {};
class getOpforFactor {};
class getOpforSpawnPoint {};
class getPlayerCount {};
class getResistanceTier {};
class getSaveableParam {};
class getSectorOwnership {};
class getSectorRange {};
class getSquadComp {};
class getUnitPositionId {};
class getUnitsCount {};
class getVirtualCargo {};
class getWeaponComponents {};
class hasPermission {};
class isBigtownActive {};
class isClassUAV {};
class isRadio {};
class potatoScan {};
class protectObject {};
class removeWeaponCargo {};
class secondsToTimer {};
class setFobMass {};
class setLoadableViV {};
class setLoadout {};
class sortStorage {};
class spawnBuildingSquad {};
class spawnCivilians {};
class spawnGuerillaGroup {};
class spawnMilitaryPostSquad {};
class spawnMilitiaCrew {};
class spawnRegularSquad {};
class spawnVehicle {};
class swapInventory {};
};
};

View File

@ -108,7 +108,7 @@ waitUntil { !isNil "GRLIB_nametag_units" };
if ( _nextunit getVariable [ "FAR_isUnconscious", 0 ] == 1 ) then {
_drawicon = wounded_icon;
} else {
if ( _nextunit == [] call F_getCommander ) then {
if ( _nextunit == [] call KPLIB_fnc_getCommander ) then {
_drawicon = commander_icon;
} else {
if ( _nextunit == (leader group _nextunit) && (count (units group _nextunit) > 1 ) ) then {
@ -136,4 +136,4 @@ waitUntil { !isNil "GRLIB_nametag_units" };
} foreach GRLIB_nametag_units;
};
}] call BIS_fnc_addStackedEventHandler;
}] call BIS_fnc_addStackedEventHandler;

View File

@ -120,7 +120,7 @@ while { true } do {
_marker setMarkerColorLocal _color;
};
_marker setMarkerTextLocal format [ "%1", ( [ _nextai ] call F_getUnitPositionId )];
_marker setMarkerTextLocal format [ "%1", ( [ _nextai ] call KPLIB_fnc_getUnitPositionId )];
} foreach _marked_squadmates;
{
@ -141,7 +141,7 @@ while { true } do {
if (isPlayer _x) then {
_vehiclename = _vehiclename + (name _x);
} else {
_vehiclename = _vehiclename + ( format [ "%1", [ _x ] call F_getUnitPositionId ] );
_vehiclename = _vehiclename + ( format [ "%1", [ _x ] call KPLIB_fnc_getUnitPositionId ] );
};
if( (_datcrew find _x) != ((count _datcrew) - 1) ) then {
@ -187,4 +187,4 @@ while { true } do {
_nextunit setVariable [ "spotmarker", "" ];
};
} forEach (allUnits + vehicles);
};
};

View File

@ -4,7 +4,7 @@ respawnButton = 1;
disabledAI = true;
enableDebugConsole = 1;
allowFunctionsLog = 0;
allowFunctionsLog = 1;
unsafeCVL = 1;
briefingName = $STR_MISSION_TITLE;
@ -32,13 +32,17 @@ minPlayerDistance = 1000;
#include "ui\liberation_notifications.hpp"
#include "ui\mission_params.hpp"
class CfgFunctions {
#include "CfgFunctions.hpp"
};
class CfgDebriefing
{
class End1
{
title = $STR_SORRY;
subtitle = "";
description = $STR_COMMANDER_NOT_AUTHORIZED;
pictureBackground = "";
};
class End1
{
title = $STR_SORRY;
subtitle = "";
description = $STR_COMMANDER_NOT_AUTHORIZED;
pictureBackground = "";
};
};

View File

@ -0,0 +1,53 @@
/*
File: fn_addObjectInit.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-05-08
Last Update: 2019-12-04
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Applies code from kp_objectInits.sqf to given object. Returns true if some code was applied, false if object has no KPLIB init code.
Parameter(s):
_object - Object which should get init code applied, if there is any defined [OBJECT, defaults to objNull]
Returns:
Function reached the end [BOOL]
*/
params [
["_object", objNull, [objNull]]
];
if (isNull _object) exitWith {["Null object given"] call BIS_fnc_error; false};
private _elements = KPLIB_objectInitsCache getVariable typeOf _object;
// Find and cache matching objectInits
if (isNil "_elements") then {
_elements = KPLIB_objectInits select {
_x params ["_classes", "", ["_inheritance", false]];
if (_inheritance) then {
{
if (_object isKindOf _x) exitWith {true};
false
} forEach _classes // return
} else {
// return
(toLower (typeOf _object)) in (_classes apply {toLower _x})
};
};
KPLIB_objectInitsCache setVariable [typeOf _object, _elements];
};
if (_elements isEqualTo []) exitWith {
false
};
{
_object call (_x select 1);
} forEach _elements;
true

View File

@ -0,0 +1,27 @@
/*
File: fn_allowCrewInImmobile.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-09-05
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Allows crew in immobile vehicle depending on AllowEnemiesInImmobile parameters.
Parameter(s):
_vehicle - Vehicle which should allow immobile crew [OBJECT, defaults to objNull]
Returns:
Function reached the end [BOOL]
*/
params [
["_vehicle", objNull, [objNull]]
];
if (isNull _vehicle) exitWith {["Null object given"] call BIS_fnc_error; false};
// KP_liberation_allowEnemiesInImmobile (0-50-100)
_vehicle allowCrewInImmobile (random 100 < KP_liberation_allowEnemiesInImmobile);
true

View File

@ -0,0 +1,29 @@
/*
File: fn_checkClass.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Checks if given classname is available in currently loaded modset.
Parameter(s):
_classname - Classname of class to check [STRING, defaults to ""]
Returns:
Classname in config [BOOL]
*/
params [
["_classname", "", [""]]
];
if (_classname isEqualTo "") exitWith {["Empty string given"] call BIS_fnc_error; false};
if (isClass (configFile >> "CfgVehicles" >> _classname)) then {
true
} else {
if (isServer) then {diag_log format ["[KP LIBERATION] [PRESETS] %1 not found in CfgVehicles", _classname];};
false
};

View File

@ -0,0 +1,33 @@
/*
File: fn_checkCrateValue.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-05-26
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Checks content of given crate and displays a hint about it.
Additionally it makes sure that ropeAttach is enabled on the crate.
Parameter(s):
_crate - Crate to check [OBJECT, defaults to objNull]
Returns:
Function reached the end [BOOL]
*/
if (isDedicated) exitWith {};
params [
["_crate", objNull, [objNull]]
];
if (isNull _crate) exitWith {["Null object given"] call BIS_fnc_error; false};
hint format [localize "STR_ACTION_CRATE_VALUE_HINT", _crate getVariable ["KP_liberation_crate_value", 0]];
if !(ropeAttachEnabled _crate) then {
[_crate, true] remoteExec ["enableRopeAttach"];
};
true

View File

@ -1,21 +1,21 @@
/*
F_checkGear
File: F_kp_checkGear.sqf
Author: Wyqer - https://github.com/Wyqer
File: fn_checkGear.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-11-22
Last Update: 2019-07-23
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Checks the players gear for blacklisted items and report these items. Also returns if the player check was fine (true) or if he had bad items (false).
Checks the players gear for blacklisted items and report these items.
Also returns if the player check was fine (true) or if he had bad items (false).
Parameter(s):
0: STRING - Backpack classname of the players backpack as he entered the arsenal / load a loadout. (Default "")
_backpack - Backpack classname of the players backpack as he entered the arsenal / load a loadout [STRING, defaults to ""]
Returns:
BOOL
Player checked without findings [BOOL]
*/
// TODO
params [["_backpack", ""]];
private _return = true;
@ -51,7 +51,7 @@ _playerItems = _playerItems apply {toLower _x};
_removedItems pushBack _x;
player unassignItem _x;
player removeItems _x;
} forEach (((_playerItems arrayIntersect _playerItems) - KP_liberation_allowed_items) select {!([_x] call F_isRadio)});
} forEach (((_playerItems arrayIntersect _playerItems) - KP_liberation_allowed_items) select {!([_x] call KPLIB_fnc_isRadio)});
private _playerMagazines = ((getMagazineCargo (uniformContainer player)) select 0);
_playerMagazines append ((getMagazineCargo (vestContainer player)) select 0);
@ -62,9 +62,9 @@ _playerMagazines = _playerMagazines apply {toLower _x};
player removeMagazines _x;
} forEach ((_playerMagazines arrayIntersect _playerMagazines) - KP_liberation_allowed_items);
_removedItems append ([uniformContainer player] call F_removeWeaponCargo);
_removedItems append ([vestContainer player] call F_removeWeaponCargo);
_removedItems append ([backpackContainer player] call F_removeWeaponCargo);
_removedItems append ([uniformContainer player] call KPLIB_fnc_removeWeaponCargo);
_removedItems append ([vestContainer player] call KPLIB_fnc_removeWeaponCargo);
_removedItems append ([backpackContainer player] call KPLIB_fnc_removeWeaponCargo);
private _weapons = weapons player;
_weapons = _weapons apply {toLower _x};

View File

@ -0,0 +1,28 @@
/*
File: fn_cleanOpforVehicle.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-11-25
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Deletes given vehicle, if not an opfor vehicle captured by players.
Parameter(s):
_veh - Vehicle to delete if not captured [OBJECT, defaults to objNull]
Returns:
Function reached the end [BOOL]
*/
params [
["_veh", objNull, [objNull]]
];
if (isNull _veh) exitWith {["Null object given"] call BIS_fnc_error; false};
if (_veh getVariable ["GRLIB_captured", false]) then {
deleteVehicle _veh;
};
true

View File

@ -0,0 +1,50 @@
/*
File: fn_crAddAceAction.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-04
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Adds action for healing with ACE field dressing to a given object.
Parameter(s):
_civ - Civilian to add the healing action to [OBJECT, defaults to objNull]
Returns:
Function reached the end [BOOL]
*/
params [
["_civ", objNull, [objNull]]
];
if (isNull _civ) exitWith {["Null object given"] call BIS_fnc_error; false};
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] ace_action called on: %1", debug_source];_text remoteExec ["diag_log",2];};
_civ addAction [
"<t color='#FF0000'>" + localize "STR_CR_ACE_ACTION" + "</t>",
{
private _target = _this select 0;
private _caller = _this select 1;
if ("ACE_fieldDressing" in (vestItems player + uniformItems player + backpackItems player)) then {
_caller removeItem "ACE_fieldDressing";
_target setDamage 0;
} else {
hint localize "STR_CR_ACE_ACTION_FAIL";
sleep 3;
hintSilent "";
};
},
nil,
1.5,
true,
true,
"",
"(damage _target) >= 0.5",
3
];
true

View File

@ -0,0 +1,18 @@
/*
File: fn_crGetMulti.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-10-08
Last Update: 2019-12-04
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Returns the current multiplier of the civilian reputation.
Parameter(s):
NONE
Returns:
Reputation multiplier [NUMBER]
*/
3 min (floor (abs (KP_liberation_civ_rep / 25)))

View File

@ -0,0 +1,36 @@
/*
File: fn_crGlobalMsg.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-04
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
No description added yet.
Parameter(s):
_msgType - Type of message to display [NUMBER, defaults to -1]
_data - Data which is needed in the selected msgType [ARRAY, defaults to []]
Returns:
Function reached the end [BOOL]
*/
params [
["_msgType", -1, [0]],
["_data", [], []]
];
if (KP_liberation_civrep_debug > 0) then {private _text = format ["[KP LIBERATION] [CIVREP] globalMsg called on: %1 - Parameters: [%2, %3]", debug_source, _msgType, _data];_text remoteExec ["diag_log",2];};
switch (_msgType) do {
case 0: {systemChat localize "STR_CR_VEHICLEMSG";};
case 1: {systemChat (format [localize "STR_CR_BUILDINGMSG", (_data select 0)]);};
case 2: {systemChat (format [localize "STR_CR_KILLMSG", (_data select 0)]);};
case 3: {systemChat (format [localize "STR_CR_RESISTANCE_KILLMSG", (_data select 0)]);};
case 4: {systemChat (format [localize "STR_CR_HEALMSG", (_data select 0)]);};
case 5: {["lib_asymm_guerilla_incoming", _data] call BIS_fnc_showNotification;};
default {private _text = format ["[KP LIBERATION] [ERROR] [CIVREP] globalMsg without valid msgType"];_text remoteExec ["diag_log",2];};
};
true

View File

@ -0,0 +1,81 @@
/*
File: fn_crateFromStorage.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-03-27
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Unloads given crate type from storage area.
Parameter(s):
_cratetype - Crate type [STRING, defaults to ""]
_storage - Storage [OBJECT, defaults to objNull]
_update - Update sector resources [BOOL, defaults to false]
Returns:
Function reached the end [BOOL]
*/
// TODO
params ["_cratetype", "_storage", ["_update",false]];
private ["_storage_positions","_unload_distance","_unload_pos","_i","_unloaded","_stored_crates","_height"];
switch (typeOf _storage) do {
case KP_liberation_small_storage_building: {_storage_positions = KP_liberation_small_storage_positions; _unload_distance = 4;};
case KP_liberation_large_storage_building: {_storage_positions = KP_liberation_large_storage_positions; _unload_distance = 6.5;};
default {_storage_positions = KP_liberation_large_storage_positions; _unload_distance = 6.5;};
};
_i = 0;
_unload_pos = _storage getPos [_unload_distance, (getDir _storage) - 180];
while {!((nearestObjects [_unload_pos,KP_liberation_crates,1]) isEqualTo [])} do {
_i = _i + 1;
_unload_pos = _storage getPos [_unload_distance + _i * 1.8, (getDir _storage) - 180];
};
sleep 0.5;
_unloaded = false;
_stored_crates = attachedObjects _storage;
reverse _stored_crates;
{
if (typeOf _x == _cratetype) then {
detach _x;
clearWeaponCargoGlobal _x;
clearMagazineCargoGlobal _x;
clearBackpackCargoGlobal _x;
clearItemCargoGlobal _x;
_x setPos _unload_pos;
[_x, true] remoteExec ["enableRopeAttach"];
if(KP_liberation_ace) then {[_x, true, [0, 1.5, 0], 0] remoteExec ["ace_dragging_fnc_setCarryable"];};
_unloaded = true;
};
if (_unloaded) exitWith {
_i = 0;
{
_height = 0.6;
switch (typeOf _x) do {
case KP_liberation_supply_crate: {_height = 0.4;};
case KP_liberation_ammo_crate: {_height = 0.6;};
case KP_liberation_fuel_crate: {_height = 0.3;};
default {_height = 0.6;};
};
detach _x;
_x attachTo [_storage, [(_storage_positions select _i) select 0, (_storage_positions select _i) select 1, _height]];
_i = _i + 1;
} forEach attachedObjects _storage;
};
} forEach _stored_crates;
if (_update) then {
if ((_storage getVariable ["KP_liberation_storage_type",-1]) == 1) then {
remoteExec ["check_sector_ress_remote_call",2];
};
};
true

View File

@ -0,0 +1,63 @@
/*
File: fn_crateToStorage.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-03-27
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Attach given crate at storage area.
Parameter(s):
_crate - Crate [OBJECT, defaults to objNull]
_storage - Storage [OBJECT, defaults to objNull]
_update - Update sector resources [BOOL, defaults to false]
Returns:
Function reached the end [BOOL]
*/
// TODO
params ["_crate", ["_storage",nil], ["_update",false]];
if (!isNil "_storage") then {
private _storage_positions = KP_liberation_large_storage_positions;
switch (typeOf _storage) do {
case KP_liberation_small_storage_building: {_storage_positions = KP_liberation_small_storage_positions;};
case KP_liberation_large_storage_building: {_storage_positions = KP_liberation_large_storage_positions;};
default {_storage_positions = KP_liberation_large_storage_positions;};
};
private _height = 0.6;
switch (typeOf _crate) do {
case KP_liberation_supply_crate: {_height = 0.4;};
case KP_liberation_ammo_crate: {_height = 0.6;};
case KP_liberation_fuel_crate: {_height = 0.3;};
default {_height = 0.6;};
};
clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
clearBackpackCargoGlobal _crate;
clearItemCargoGlobal _crate;
private _crates_count = count (attachedObjects _storage);
if (_crates_count >= (count _storage_positions)) exitWith {if (!isDedicated) then {hint localize "STR_BOX_CANTSTORE";};};
_crate attachTo [_storage, [(_storage_positions select _crates_count) select 0, (_storage_positions select _crates_count) select 1, _height]];
[_crate, false] remoteExec ["enableRopeAttach"];
if(KP_liberation_ace) then {[_crate, false, [0, 1.5, 0], 0] remoteExec ["ace_dragging_fnc_setCarryable"];};
if (_update) then {
if ((_storage getVariable ["KP_liberation_storage_type",-1]) == 1) then {
remoteExec ["check_sector_ress_remote_call",2];
};
};
} else {
if (!isDedicated) then {
hint localize "STR_BOX_CANTSTORE";
};
};
true

View File

@ -0,0 +1,42 @@
/*
File: fn_createClearance.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-04
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Adds a terrain objects clearance around given position with given radius.
If the save switch is set to true, the clearance will be saved during the campaign.
Parameter(s):
_centerPos - Position for the clearance [POSITION, defaults to [0, 0, 0]]
_radius - Radius of the clearance around the center [NUMBER, defaults to 0]
_save - Switch to decide if the clearance should be persistent [BOOL, defaults to false]
Returns:
Function reached the end [BOOL]
*/
if (!isServer) exitWith {false};
params [
["_centerPos", [0, 0, 0], [[]], [3]],
["_radius", 0, [0]],
["_save", false, [false]]
];
if (save_is_loaded && {(KP_liberation_clearances findIf {(_x select 0) isEqualTo _centerPos}) != -1}) exitWith {false};
{
_x switchLight "OFF";
_x hideObjectGlobal true;
_x allowDamage false;
} forEach (nearestTerrainObjects [_centerPos, [], _radius, false, true]);
if (_save) then {
KP_liberation_clearances pushBackUnique [_centerPos, _radius];
publicVariable "KP_liberation_clearances";
};
true

View File

@ -0,0 +1,47 @@
/*
File: fn_createCrate.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-10-11
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Spawns a resource crate of given type and with given amount at given position.
Parameter(s):
_resource - Type of resource [STRING, defaults to ""]
_amount - Resource amount [NUMBER, defaults to 100]
_pos - Position where to spawn the crate [POSITION, defaults to getPos player]
Returns:
Created crate [OBJECT]
*/
params [
["_resource", KP_liberation_supply_crate, [""]],
["_amount", 100, [0]],
["_pos", getPos player, [[]], [2, 3]]
];
// Check if resource is valid
if !(_resource in KP_liberation_crates) exitWith {
["Invalid resource param given: %1", _resource] call BIS_fnc_error;
objNull
};
// Create crate
private _crate = _resource createVehicle _pos;
_crate setMass 500;
_crate setVariable ["KP_liberation_crate_value", _amount, true];
clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
clearBackpackCargoGlobal _crate;
clearItemCargoGlobal _crate;
// Add ACE carry functionality
if (KP_liberation_ace) then {[_crate, true, [0, 1.5, 0], 0] remoteExec ["ace_dragging_fnc_setCarryable"];};
// Process KP object init
[_crate] call KPLIB_fnc_addObjectInit;
_crate

View File

@ -0,0 +1,48 @@
/*
File: fn_createManagedUnit.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-10-04
Last Update: 2019-12-04
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Creates unit managed by kill tracker.
Parameter(s):
_type - Type of unit [STRING, defaults to ""]
_spawnPos - Where to spawn [ARRAY|OBJECT|GROUP, defaults to [0, 0, 0]]
_group - Group to add the unit to [GROUP, defaults to grpNull]
_rank - Unit rank [STRING, defaults to "PRIVATE"]
_placement - Placement radius [NUMBER, defaults to 0]
Returns:
Created unit [OBJECT]
*/
params [
["_type", "", [""]],
["_spawnPos", [0, 0, 0], [[], objNull, grpNull], [2, 3]],
["_group", grpNull, [grpNull]],
["_rank", "PRIVATE", [""]],
["_placement", 0, [0]]
];
private ["_unit"];
isNil {
// Create temp group, as we need to let the unit join the "correct side group".
// If we use the "correct side group" for the createUnit, the group would switch to the side of the unit written in the config.
private _groupTemp = createGroup [CIVILIAN, true];
_unit = _groupTemp createUnit [_type, _spawnPos, [], _placement, "FORM"];
_unit addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
_unit setRank _rank;
// Join to target group to preserve Side
[_unit] joinSilent _group;
deleteGroup _groupTemp;
// Process KP object init
[_unit] call KPLIB_fnc_addObjectInit;
};
_unit

View File

@ -0,0 +1,56 @@
/*
File: fn_fillStorage.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-04
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Fills given storage with given amounts of resources.
Parameter(s):
_supply - Amount of supply resource [NUMBER, defaults to 0]
_ammo - Amount of ammo resource [NUMBER, defaults to 0]
_fuel - Amount of fuel resource [NUMBER, defaults to 0]
_storage - Storage object to fill [OBJECT, defaults to objNull]
_delay - Enable a small delay between crate create and attach to storage [BOOL, defaults to false]
Returns:
Function reached the end [BOOL]
*/
params [
["_supply", 0, [0]],
["_ammo", 0, [0]],
["_fuel", 0, [0]],
["_storage", objNull, [objNull]],
["_delay", false, [false]]
];
if (isNull _storage) exitWith {["Null object given"] call BIS_fnc_error; false};
// Make sure it's scheduled, if delay is enabled
if (_delay && {!canSuspend}) exitWith {_this spawn KPLIB_fnc_fillStorage};
private _amount = 0;
private _crate = objNull;
private _pos = getPos _storage;
{
while {_x > 0} do {
_amount = 100 min _x;
_x = _x - _amount;
_crate = [
[KP_liberation_supply_crate, KP_liberation_ammo_crate, KP_liberation_fuel_crate] select _forEachIndex,
_amount,
_pos
] call KPLIB_fnc_createCrate;
if (_delay) then {sleep 0.1;};
[_crate, _storage] call KPLIB_fnc_crateToStorage;
};
} forEach [_supply, _ammo, _fuel];
true

View File

@ -0,0 +1,49 @@
/*
File: fn_forceBluforCrew.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-12-04
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Creates vehicle crew from vehicle config.
If the crew isn't the same side as the players, it'll create a player side crew.
Parameter(s):
_veh - Vehicle to add the blufor crew to [OBJECT, defaults to objNull]
Returns:
Function reached the end [BOOL]
*/
params [
["_veh", objNull, [objNull]]
];
if (isNull _veh) exitWith {["Null object given"] call BIS_fnc_error; false};
// Create regular config crew
private _grp = createVehicleCrew _veh;
// If the config crew isn't the correct side, replace it with the crew classnames from the preset
if ((side _grp) != GRLIB_side_friendly) then {
{deleteVehicle _x} forEach (units _grp);
_grp = createGroup [GRLIB_side_friendly, true];
while {count units _grp < 3} do {
[crewman_classname, getPos _veh, _grp] call KPLIB_fnc_createManagedUnit;
};
((units _grp) select 0) moveInDriver _veh;
((units _grp) select 1) moveInGunner _veh;
((units _grp) select 2) moveInCommander _veh;
// Delete crew which isn't in the vehicle due to e.g. no commander seat
{
if (isNull objectParent _x) then {deleteVehicle _x};
} forEach (units _grp);
};
// Set the crew to safe behaviour
_grp setBehaviour "SAFE";
true

View File

@ -0,0 +1,18 @@
/*
File: fn_getAdaptiveVehicle.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-11-26
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Provides a vehicle classname depending on the combat readiness.
Parameter(s):
NONE
Returns:
Vehicle classname [STRING]
*/
selectRandom ([opfor_vehicles, opfor_vehicles_low_intensity] select (combat_readiness < 40))

View File

@ -0,0 +1,32 @@
/*
File: fn_getBluforRatio.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-12-05
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the ratio of blufor units in the given sector to the total number of units.
Parameter(s):
_sector - Sector to get the blufor / opfor ratio from [STRING, defaults to ""]
Returns:
Blufor ratio [NUMBER]
*/
params [
["_sector", "", [""]]
];
if (_sector isEqualTo "") exitWith {["Empty string given"] call BIS_fnc_error; -1};
private _range = [GRLIB_capture_size, GRLIB_capture_size * 1.4] select (_sector in sectors_bigtown);
private _red = [(markerPos _sector), _range, GRLIB_side_enemy] call KPLIB_fnc_getUnitsCount;
private _blue = [(markerPos _sector), _range, GRLIB_side_friendly] call KPLIB_fnc_getUnitsCount;
if (_blue > 0 || _red > 0) then {
_blue / (_blue + _red)
} else {
[0, 1] select (_sector in blufor_sectors)
};

View File

@ -0,0 +1,18 @@
/*
File: fn_getCommander.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-11-25
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Returns the actual commander object.
Parameter(s):
NONE
Returns:
Commander [OBJECT]
*/
missionNamespace getVariable ["commandant", objNull]

View File

@ -0,0 +1,24 @@
/*
File: fn_getFobName.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-11-26
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the FOB name in accordance to the military alphabet set in init presets.
Parameter(s):
_fob - Position of FOB to get the name from [POSITION, defaults to [0, 0, 0]]
Returns:
FOB name [STRING]
*/
params [
["_fob", [0, 0, 0], [[]], [2, 3]]
];
private _i = GRLIB_all_fobs findIf {(_x distance2d _fob) < 100};
[military_alphabet select _i, ""] select (_i isEqualTo -1)

View File

@ -0,0 +1,50 @@
/*
File: fn_getGroupType.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-12-05
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the type of a given group.
Can be infantry, light, heavy, air, support, static or UAV.
Parameter(s):
_grp - Group to get the type from [GROUP, defaults to grpNull]
Returns:
Group type [STRING]
*/
params [
["_grp", grpNull, [grpNull]]
];
if (isNull _grp) exitWith {["Null group given"] call BIS_fnc_error; ""};
private _grpType = "infantry";
private _vehType = "";
// Get vehicle type, if at least one group member is in a crew seat
private _parent = objNull;
{
_parent = objectParent _x;
if (!(isNull _parent) && {_x in [driver _parent, gunner _parent, commander _parent]}) exitWith {
_vehType = typeOf (objectParent _x);
};
} forEach (units _grp);
// Exit with infantry, if not as crew in objectParent
if (_vehType isEqualTo "") exitWith {_grpType};
// Otherwise continue to get the type of the vehicle
[] call {
if (_vehType in (light_vehicles apply {_x select 0})) exitWith {_grpType = "light";};
if (_vehType in (air_vehicles apply {_x select 0})) exitWith {_grpType = "air";};
if (_vehType in (heavy_vehicles apply {_x select 0})) exitWith {_grpType = "heavy";};
if (_vehType in (support_vehicles apply {_x select 0})) exitWith {_grpType = "support";};
if (_vehType in (static_vehicles apply {_x select 0})) exitWith {_grpType = "static";};
if ([_vehType] call KPLIB_fnc_isClassUAV) exitWith {_grpType = "uav";};
};
_grpType

View File

@ -0,0 +1,31 @@
/*
File: fn_getLessLoadedHC.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-05
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Returns the HC with the current less load.
Parameter(s):
NONE
Returns:
Less loaded HC [OBJECT]
*/
private _hcArray = [];
private _hc = objNull;
{
_hc = _x;
_hcArray pushBack [count (allUnits select {(owner _x) isEqualTo (owner _hc)}), _hc];
} forEach (entities "HeadlessClient_F");
if !(_hcArray isEqualTo []) then {
_hcArray sort true;
(_hcArray select 0) select 1
} else {
objNull
};

View File

@ -0,0 +1,297 @@
/*
File: fn_getLoadout.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-11-25
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
No description added yet.
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
/*
AUTHOR: aeroson
NAME: get_loadout.sqf
VERSION: 3.4
DOWNLOAD & PARTICIPATE:
https://github.com/aeroson/a3-loadout
http://forums.bistudio.com/showthread.php?148577-GET-SET-Loadout-(saves-and-loads-pretty-much-everything)
DESCRIPTION:
I guarantee backwards compatibility.
These scripts allows you set/get (load/save)all of the unit's gear, including:
uniform, vest, backpack, contents of it, all quiped items, all three weapons with their attachments, currently loaded magazines and number of ammo in magazines.
All this while preserving order of items.
Useful for saving/loading loadouts.
Ideal for revive scripts where you have to set exactly the same loadout to newly created unit.
Uses workaround with placeholders to add vest/backpack items, so items stay where you put them.
PARAMETER(S):
0 : target unit
1 : (optional) array of options, default [] :
"ammo" will save ammo count of partially emptied magazines
"repetitive" intended for repetitive use, will not use selectWeapon, means no visible effect on solder, but will not save magazines of assigned items such as laser designator batteries
RETURNS:
Array : array of strings/arrays containing target unit's loadout, to be used by fnc_set_loadout.sqf
addAction support:
Saves player's loadout into global var loadout
*/
private ["_target","_options","_saveMagsAmmo","_isRepetitive","_isOnFoot","_currentWeapon","_currentMode","_isFlashlightOn","_isIRLaserOn","_magazinesAmmo","_loadedMagazines","_saveWeaponMagazines","_getMagsAmmo","_backPackItems","_assignedItems","_data"];
_options = [];
// addAction support
if(count _this < 4) then {
#define PARAM_START private ["_PARAM_INDEX"]; _PARAM_INDEX=0;
#define PARAM_REQ(A) if (count _this <= _PARAM_INDEX) exitWith { systemChat format["required param '%1' not supplied in file:'%2' at line:%3", #A ,__FILE__,__LINE__]; }; A = _this select _PARAM_INDEX; _PARAM_INDEX=_PARAM_INDEX+1;
#define PARAM(A,B) A = B; if (count _this > _PARAM_INDEX) then { A = _this select _PARAM_INDEX; }; _PARAM_INDEX=_PARAM_INDEX+1;
PARAM_START
PARAM_REQ(_target)
PARAM(_options,[])
} else {
_target = player;
};
_saveMagsAmmo = "ammo" in _options;
_isRepetitive = "repetitive" in _options;
_isOnFoot = vehicle _target == _target;
_currentWeapon = "";
_currentMode = "";
_isFlashlightOn = false;
_isIRLaserOn = false;
_magazinesAmmo = magazinesAmmoFull _target;
// save weapon mode and muzzle
if(_isOnFoot) then {
_currentWeapon = currentMuzzle _target;
_currentMode = currentWeaponMode _target;
_isFlashlightOn = _target isFlashlightOn _currentWeapon;
_isIRLaserOn = _target isIRLaserOn _currentWeapon;
} else {
_currentWeapon = currentWeapon _target;
};
_loadedMagazines=[];
// universal weapon saving
_saveWeaponMagazines = {
private ["_weapon","_magazines","_muzzles","_saveMagazine"];
_weapon = _this select 0;
_magazines = [];
_saveMagazine = { // find, save and eat mag for _weapon
private ["_weapon","_magazine","_ammo"];
_weapon = _this select 0;
_magazine = "";
_ammo = 0;
{
if((_x select 4)==_weapon) then {
_magazine = _x select 0;
_ammo = _x select 1;
_x = -1;
};
} forEach _magazinesAmmo;
_magazinesAmmo = _magazinesAmmo - [-1];
if(_magazine!="") then {
if(_saveMagsAmmo) then {
_magazines set [count _magazines, [_magazine, _ammo]];
} else {
_magazines set [count _magazines, _magazine];
};
};
};
if(_weapon != "") then {
[_weapon] call _saveMagazine;
_muzzles = configFile>>"CfgWeapons">>_weapon>>"muzzles";
if(isArray(_muzzles)) then {
{ // add one mag for each muzzle
if (_x != "this") then {
[_x] call _saveMagazine;
};
} forEach getArray(_muzzles);
};
};
_loadedMagazines set [count _loadedMagazines, _magazines];
};
// save loaded mags for each weapon separetely, since some weapons can use same magazines
[primaryWeapon _target] call _saveWeaponMagazines;
[handgunWeapon _target] call _saveWeaponMagazines;
[secondaryWeapon _target] call _saveWeaponMagazines;
_getMagsAmmo = { // default function with _saveMagsAmmo == false
_this select 0;
};
if(_saveMagsAmmo) then {
// check if input array contains magazine, if it does, find it add ammo count
_getMagsAmmo = {
private ["_items","_location","_item","_itemIndex"];
_items = _this select 0;
_location = _this select 1;
{
_item = _x;
_itemIndex = _forEachIndex;
{
if((_x select 4)==_location && (_x select 0)==_item) then {
_items set[_itemIndex, [_item, _x select 1]];
_x = -1;
};
} forEach _magazinesAmmo;
_magazinesAmmo = _magazinesAmmo - [-1];
} forEach _items;
_items;
};
};
// get backpack items
_cargo = getbackpackcargo (unitbackpack _target);
_backpacks = [];
{
for "_i" from 1 to ((_cargo select 1) select _foreachindex) do {
_backpacks set [count _backpacks, _x];
};
} foreach (_cargo select 0);
_backPackItems = (backpackitems _target) + _backpacks;
// get assigned items, headgear and goggles is not part of assignedItems
_assignedItems = assignedItems _target;
_headgear = headgear _target;
_goggles = goggles _target;
if((_headgear != "") && !(_headgear in _assignedItems)) then {
_assignedItems set [count _assignedItems, _headgear];
};
if((_goggles != "") && !(_goggles in _assignedItems)) then {
_assignedItems set [count _assignedItems, _goggles];
};
/*
// use this once magazinesAmmoFull is fixed and shows magazines of assignedItems
// get magazines of everything else except weapons, most likely assigned items
// only ["Uniform","Vest","Backpack"] locations remain, weapon locations have already been eaten
_magazines = [];
{
if(_x select 2) then {
if(_saveMagsAmmo) then {
_magazines set[count _magazines, [_x select 0, _x select 1]];
} else {
_magazines set[count _magazines, _x select 0];
};
_x = -1;
};
} forEach _magazinesAmmo;
_magazinesAmmo = _magazinesAmmo - [-1];
_loadedMagazines set [3, _magazines];
*/
// old method using selectWeapon, cycles and tries to selectWeapon all assigned items
if(!_isRepetitive) then {
private ["_weaponHasChanged"];
_weaponHasChanged = false;
// get magazines of all assigned items
_magazines = [];
{
_target selectWeapon _x;
if(currentWeapon _target==_x) then {
_weaponHasChanged = true;
_magazine = currentMagazine _target;
if(_magazine != "") then {
if(_saveMagsAmmo) then {
_magazines set[count _magazines, [_magazine, _target ammo _x]];
} else {
_magazines set[count _magazines, _magazine];
};
};
};
} forEach _assignedItems;
_loadedMagazines set [3, _magazines];
// select back originaly selected weapon and mode, only if weapon has changed
if(_weaponHasChanged) then {
if(_isOnFoot) then {
if(_currentWeapon != "" && _currentMode != "") then {
_muzzles = 0;
while{ (_currentWeapon != currentMuzzle _target || _currentMode != currentWeaponMode _target ) && _muzzles < 200 } do {
_target action ["SWITCHWEAPON", _target, _target, _muzzles];
_muzzles = _muzzles + 1;
};
if(_isFlashlightOn) then {
_target action ["GunLightOn"];
} else {
_target action ["GunLightOff"];
};
if(_isIRLaserOn) then {
_target action ["IRLaserOn"];
} else {
_target action ["IRLaserOff"];
};
};
} else {
_currentMode = "";
};
if(_currentMode == "") then {
if(_currentWeapon=="") then {
_target action ["SWITCHWEAPON", _target, _target, 0];
} else {
_target selectWeapon _currentWeapon;
};
};
};
};
_data = [
_assignedItems, //0 []
primaryWeapon _target, //1 ""
primaryWeaponItems _target, //2 []
handgunWeapon _target, //3 ""
handgunItems _target, //4 []
secondaryWeapon _target, //5 ""
secondaryWeaponItems _target, //6 []
uniform _target, //7 ""
[uniformItems _target, "Uniform"] call _getMagsAmmo, //8 ["magazine without ammo count",["magazine with ammo count",30], ....]
vest _target, //9 ""
[vestItems _target, "Vest"] call _getMagsAmmo, //10
backpack _target, //11 ""
[_backPackItems, "Backpack"] call _getMagsAmmo, //12
_loadedMagazines, //13 (optional) [[primary mags],[handgun mags],[secondary mags],[other mags]]
_currentWeapon, //14 (optional) ""
_currentMode //15 (optional) ""
];
// addAction support
if(count _this < 4) then {
_data;
} else {
loadout = _data;
//playSound3D ["A3\Sounds_F\sfx\ZoomOut.wav", _target];
};

View File

@ -0,0 +1,18 @@
/*
File: fn_getLocalCap.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-05
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the current blufor unit cap.
Parameter(s):
NONE
Returns:
Blufor unit cap [NUMBER]
*/
(round (infantry_cap / 2)) min GRLIB_blufor_cap

View File

@ -0,0 +1,28 @@
/*
File: fn_getLocationName.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-12-06
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the name of the nearest FOB/sector from given position.
Parameter(s):
_pos - Position to get the location name from [POSITION, defaults to [0, 0, 0]]
Returns:
Location name [STRING]
*/
params [
["_pos", [0, 0, 0], [[]], [2, 3]]
];
private _name = [_pos] call KPLIB_fnc_getFobName;
if (_name isEqualTo "") then {
markerText ([50, _pos] call KPLIB_fnc_getNearestSector)
} else {
["FOB", _name] joinString " "
};

View File

@ -0,0 +1,37 @@
/*
File: fn_getMilitaryId.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-09-14
Last Update: 2019-12-06
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Converts a number to an ID string.
Parameter(s):
_number - ID number to convert (starts with 0 as first character) [NUMBER, defaults to -1]
Returns:
Military ID [STRING]
*/
params [
["_number", -1, [0]]
];
if (_number isEqualTo -1) exitWith {["No valid number given"] call BIS_fnc_error; ""};
_number = _number + 1;
private _return = [];
private _alphabetCount = count military_alphabet;
private _remain = 0;
while {_number > 0} do {
_remain = _number % _alphabetCount;
_number = floor (_number / _alphabetCount);
_return append [_remain - 1];
};
reverse _return;
(_return apply {military_alphabet select _x}) joinString " "

View File

@ -0,0 +1,27 @@
/*
File: fn_getMobileRespawns.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-12-05
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets all mobile respawn vehicles sorted by their positions X value.
Parameter(s):
NONE
Returns:
Mobile respawns [ARRAY]
*/
private _respawn_trucks = vehicles select {
(typeOf _x) in [Respawn_truck_typename, huron_typename] &&
{alive _x} &&
{_x distance2d startbase > 500} &&
{abs (speed _x) < 5} &&
{(isTouchingGround _x || {5 > ((getPos _x) select 2)})} &&
{!surfaceIsWater (getPos _x)}
};
[_respawn_trucks, [], {(getPos _x) select 0}, 'ASCEND'] call BIS_fnc_sortBy

View File

@ -0,0 +1,24 @@
/*
File: fn_getNearbyPlayers.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-12-05
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets all alive players inside given radius to given position.
Parameter(s):
_pos - Center position to search from [POSITION, defaults to [0, 0, 0]]
_radius - Radius from center position to search from [NUMBER, defaults to 100]
Returns:
Nearby alive players [ARRAY]
*/
params [
["_pos", [0, 0, 0], [[2, 3]]],
["_radius", 100, [0]]
];
allPlayers select {alive _x && {(_x distance2d _pos) < _radius}}

View File

@ -0,0 +1,28 @@
/*
File: fn_getNearestBluforObjective.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-11
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the position of the nearest blufor sector/fob from given position.
Parameter(s):
_pos - Position to check for nearest blufor sector/fob [POSITION, defaults to [0, 0, 0]]
Returns:
Nearest blufor sector/fob position [POSITION]
*/
params [
["_pos", [0, 0, 0], [[]], [2, 3]]
];
if (GRLIB_all_fobs isEqualTo [] && blufor_sectors isEqualTo []) exitWith {[]};
private _objectives = GRLIB_all_fobs + (blufor_sectors apply {markerPos _x});
_objectives = _objectives apply {[_x distance2d _pos, _x]};
_objectives sort true;
(_objectives select 0) select 1

View File

@ -0,0 +1,28 @@
/*
File: fn_getNearestFob.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-05
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the nearest FOB position to given position.
Parameter(s):
_pos - Position to find the nearest FOB from [POSITION, defaults to getPos player]
Returns:
Nearest FOB position [POSITION]
*/
params [
["_pos", getPos player, [[]], [2, 3]]
];
if !(GRLIB_all_fobs isEqualTo []) then {
private _fobs = GRLIB_all_fobs apply {[_pos distance2d _x, _x]};
_fobs sort true;
(_fobs select 0) select 1
} else {
[]
};

View File

@ -0,0 +1,31 @@
/*
File: fn_getNearestSector.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-11
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the marker of the nearest sector from given position inside given radius.
Parameter(s):
_radius - Radius in which to look for the nearest sector [NUMBER, defaults to 1000]
_pos - Position to look from for the nearest sector [POSITION, defaults to getPos player]
Returns:
Marker of nearest sector [STRING]
*/
params [
["_radius", 1000, [0]],
["_pos", getPos player, [[]], [2, 3]]
];
private _sectors = sectors_allSectors select {((markerPos _x) distance2d _pos) < _radius};
if (_sectors isEqualTo []) exitWith {""};
_sectors = _sectors apply {[(markerPos _x) distance2d _pos, _x]};
_sectors sort true;
(_sectors select 0) select 1

View File

@ -0,0 +1,30 @@
/*
File: fn_getNearestTower.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-06
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets nearest radio tower marker occupied by given side inside given radius from given position.
Parameter(s):
_pos - Position from which to look for the nearest radio tower [POSITION, defaults to [0, 0, 0]]
_side - Side of owner for nearest radio tower [SIDE, defaults to GRLIB_side_enemy]
_radius - Radius in which to look for the nearest radio tower [NUMBER, defaults to 1000]
Returns:
Marker of nearest radio tower [STRING]
*/
params [
["_pos", [0, 0, 0], [[]], [2, 3]],
["_side", GRLIB_side_enemy, [sideEmpty]],
["_radius", 1000, [0]]
];
private _towers = [sectors_tower select {_x in blufor_sectors}, sectors_tower - blufor_sectors] select (_side == GRLIB_side_enemy);
_towers = (_towers apply {[(markerPos _x) distance2d _pos, _x]}) select {(_x select 0) <= _radius};
_towers sort true;
(_towers select 0) select 1

View File

@ -0,0 +1,24 @@
/*
File: fn_getNearestViVTransport.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-05-08
Last Update: 2019-12-06
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets nearest object that can transport given object via ViV.
Parameter(s):
_object - Object to get a transport vehicle for [OBJECT, defaults to objNull]
_radius - Radius to look for a transport vehicle [NUMBER, defaults to 15]
Returns:
Closest transport or objNull [OBJECT]
*/
params [
["_object", objNull, [objNull]],
["_radius", 15, [0]]
];
((nearestObjects [_object, ["AllVehicles"], _radius]) select {(_x canVehicleCargo _object) select 0}) param [0, objNull]

View File

@ -0,0 +1,18 @@
/*
File: fn_getOpforCap.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-06
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets current amount of total opfor units.
Parameter(s):
NONE
Returns:
Total opfor units [NUMBER]
*/
GRLIB_side_enemy countSide allUnits

View File

@ -0,0 +1,22 @@
/*
File: fn_getOpforFactor.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-11-25
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Returns the opfor factor to scale down enemy forces, if "adapt to player count" mission param is enabled.
Parameter(s):
NONE
Returns:
Opfor factor [NUMBER]
*/
if !(GRLIB_adaptive_opfor) exitWith {1};
private _bluforcount = (0.2 * (GRLIB_side_friendly countSide allUnits)) + ([] call KPLIB_fnc_getPlayerCount);
(0.5 + (_bluforcount / 25.0)) min 1

View File

@ -0,0 +1,108 @@
/*
File: fn_getOpforSpawnPoint.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets a random opfor spawn point marker name respecting following conditions:
* Wasn't used already in the current session (server restart to server restart)
* Distance to blufor FOBs and sectors is more than given min distance
* Distance to blufor FOBs and sectors is less than given max distance
* Distance to an opfor sector is less than 2000m (to avoid strange spawn in blufor territory)
* If nearest is set to true, the valid spawn point which is nearest to any blufor sector/FOB is returned
* If a position is given, the closest valid spawn point to that position is returned
Parameter(s):
_min - Minimum distance to any blufor sector or FOB [NUMBER, defaults to 2000]
_max - Maximum distance to any blufor sector or FOB [NUMBER, defaults to 20000]
_nearest - Provide the nearest spawn point of valid points [BOOL, defaults to false]
_pos - Position if the nearest spawn point to this should be selected [POSITION, defaults to [0, 0, 0]]
Returns:
Opfor spawn point [STRING]
*/
params [
["_min", 2000, [0]],
["_max", 20000, [0]],
["_nearest", false, [false]],
["_pos", [0, 0, 0], [[]], [2, 3]]
];
private _possibleSpawns = [];
// Only check for opfor spawn points which aren't used already in the current session
private _spawnsToCheck = sectors_opfor;
if (!isNil "used_positions") then {
_spawnsToCheck = sectors_opfor - used_positions;
};
private ["_valid", "_current", "_distances"];
{
_valid = true;
_current = _x;
// Shouldn't be too close to the current/last position of a secondary mission
if (!isNil "secondary_objective_position" && _valid) then {
if !(secondary_objective_position isEqualTo []) then {
_valid = !(((markerPos _current) distance2d secondary_objective_position) < 500);
};
};
if (_valid) then {
// Fetch distances to FOBs
_distances = (GRLIB_all_fobs apply {(markerPos _current) distance2d _x}) select {_x < _max};
// Fetch distances to blufor sectors
_distances append ((blufor_sectors apply {(markerPos _current) distance2d (markerPos _x)}) select {_x < _max});
// Invalid, if all sectors and FOBs are further away than given max distance
if (_distances isEqualTo []) then {
_valid = false;
} else {
// Invalid, if one sector or FOB is closer than min distance
_distances sort true;
if ((_distances select 0) < _min) then {
_valid = false;
};
};
};
// Make sure that there is an opfor sector in sensible range to spawn
if (_valid) then {
if ((sectors_allSectors - blufor_sectors) findIf {((markerPos _current) distance2D (markerPos _x)) < 2000} < 0) then {
_valid = false;
};
};
// Make sure that there is no blufor unit inside min dist to spawn
if (_valid) then {
if (([markerpos _current, _min, GRLIB_side_friendly] call KPLIB_fnc_getUnitsCount) > 0) then {
_valid = false;
};
};
// Add distance and marker name to possible spawn, if still valid
if (_valid) then {
_possibleSpawns pushBack [_distances select 0, _current];
};
} forEach _spawnsToCheck;
// Return empty string, if no possible spawn point was found
if (_possibleSpawns isEqualTo []) exitWith {diag_log "[KP LIBERATION] [WARNING] No opfor spawn point found"; ""};
// Return nearest spawn point to a blufor sector/FOB, if selected via parameter
if (_nearest) exitWith {
_possibleSpawns sort true;
(_possibeSpawns select 0) select 1
};
// Return nearest spawn point to given position, if provided
if !(_pos isEqualTo [0, 0, 0]) exitWith {
([_possibleSpawns apply {_x select 1}, [_pos] , {_input0 distance (markerPos _x)} , "ASCEND"] call BIS_fnc_sortBy) select 0
};
// Return random spawn point
(selectRandom _possibleSpawns) select 1

View File

@ -0,0 +1,18 @@
/*
File: fn_getPlayerCount.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-11-25
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Returns the number of connected players without counting headless clients.
Parameter(s):
NONE
Returns:
Amount of players [NUMBER]
*/
count (allPlayers - entities "HeadlessClient_F")

View File

@ -0,0 +1,22 @@
/*
File: fn_getResistanceTier.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-10-08
Last Update: 2019-12-06
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Returns the current tier level of the resistance forces.
Parameter(s):
NONE
Returns:
Tier level [NUMBER]
*/
switch (true) do {
case (KP_liberation_guerilla_strength >= KP_liberation_resistance_tier3): {3};
case (KP_liberation_guerilla_strength >= KP_liberation_resistance_tier2): {2};
default {1};
};

View File

@ -0,0 +1,93 @@
/*
File: fn_getSaveableParam.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-01-27
Last Update: 2019-12-06
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Saves/loads/fetches mission parameter from profileNamespace depending on "_action" argument.
If no action provided value from "KP_load_params" variable is used.
On SP enviroment saving/loading is disabled.
Parameter(s):
_paramName - Name of parameter [STRING, defaults to ""]
_defaultValue - Default value if parameter not found or no saved value [NUMBER, defaults to 0]
_action - Should save(0)/load(1) from profile namespace or get(2) from selected param value [NUMBER, defaults to nil]
Returns:
Parameter value [BOOL]
*/
params [
["_paramName", "", [""]],
["_defaultValue", 0, [0]],
["_action", nil, [0]]
];
private _saveKey = "KP_LIBERATION_" + (toUpper worldName) + "_SAVE_PARAMS";
private _value = nil;
// Use lobby value if no action specified
if(isNil "_action") then {_action = KP_load_params;};
// We propably shoud not load parameters on SP environment
if(!isMultiplayer) then {_action = 2};
switch (_action) do {
// Save to profileNamespace
case 0: {
_value = [_paramName, _defaultValue] call bis_fnc_getParamValue;
private _savedParams = profileNamespace getVariable _saveKey;
if(isNil "_savedParams") then {
if (KP_liberation_savegame_debug > 0) then {diag_log "[KP LIBERATION] [PARAM] Param save data is corrupted, creating new.";};
// Create new "associative" array
_savedParams = [[_paramName, _value]];
} else {
private _singleParam = (_savedParams select {(_x select 0) == _paramName}) select 0;
if(isNil "_singleParam") then {
if (KP_liberation_savegame_debug > 0) then {diag_log format ["[KP LIBERATION] [PARAM] Saving value: %1 for param: %2,", _value, _paramName];};
_savedParams pushBack [_paramName, _value];
} else {
if (KP_liberation_savegame_debug > 0) then {diag_log format ["[KP LIBERATION] [PARAM] Overwriting value: %1 with: %2 for param: %3,", (_singleParam select 1), _value, _paramName];};
// _singleparam is an reference to array in _savedParams, we can use "set"
_singleParam set [1, _value];
};
};
// Save params to profile namespace
profileNamespace setVariable [_saveKey, _savedParams];
saveProfileNamespace;
};
// Load from profileNamespace
case 1: {
private _savedParams = profileNamespace getVariable _saveKey;
if(isNil "_savedParams") then {
if (KP_liberation_savegame_debug > 0) then {diag_log "[KP LIBERATION] [PARAM] Param save data is corrupted, can't load!";};
// Fix param save data
profileNamespace setVariable [_saveKey, []];
if (KP_liberation_savegame_debug > 0) then {diag_log format ["[KP LIBERATION] [PARAM] No saved value for param: %1, fetching value.", _paramName];};
_value = [_paramName, _defaultValue] call bis_fnc_getParamValue;
} else {
private _singleParam = (_savedParams select {(_x select 0) == _paramName}) select 0;
if(isNil "_singleParam") then {
if (KP_liberation_savegame_debug > 0) then {diag_log format ["[KP LIBERATION] [PARAM] No saved value for param: %1, fetching value.", _paramName];};
_value = [_paramName, _defaultValue] call bis_fnc_getParamValue;
} else {
if (KP_liberation_savegame_debug > 0) then {diag_log format ["[KP LIBERATION] [PARAM] Found value: %1 for param: %2,", (_singleParam select 1), _paramName];};
_value = _singleParam select 1;
};
};
};
// Get param
default {
if (KP_liberation_savegame_debug > 0) then {diag_log "[KP LIBERATION] [PARAM] Fetch selected value for param";};
_value = [_paramName, _defaultValue] call bis_fnc_getParamValue;
};
};
// Return param value
_value;

View File

@ -0,0 +1,37 @@
/*
File: fn_getSectorOwnership.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-07
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the side of the owner of a given position with given radius.
Parameter(s):
_pos - Position to get owner [POSITION, defaults to [0, 0, 0]]
_radius - Radius to count units [NUMBER, defaults to GRLIB_capture_size]
Returns:
Owner of the position [SIDE]
*/
params [
["_pos", [0, 0, 0], [[]], [2, 3]],
["_radius", GRLIB_capture_size, [0]]
];
private _capCount = 3;
private _capRatio = 0.85;
private _capRatioMin = 0.51;
private _blufor = [_pos, _radius, GRLIB_side_friendly] call KPLIB_fnc_getUnitsCount;
private _opfor = [_pos, _radius, GRLIB_side_enemy] call KPLIB_fnc_getUnitsCount;
private _ratio = 0;
if (_blufor + _opfor != 0) then {
_ratio = _blufor / (_blufor + _opfor);
};
if (_blufor > 0 && {(_opfor <= _capCount && _ratio > _capRatioMin) || _ratio > _capRatio}) exitWith {GRLIB_side_friendly};
if (_blufor == 0 && _opfor > _capCount) exitWith {GRLIB_side_enemy};
if (_blufor == 0 && _opfor <= _capCount) exitWith {GRLIB_side_civilian};

View File

@ -0,0 +1,25 @@
/*
File: fn_getSectorRange.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-12-07
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the sector size with taking the given amount of units into account.
Parameter(s):
_unitCount - Number of units to take into account [NUMBER, defaults to 0]
Returns:
Calculated sector size [NUMBER]
*/
params [
["_unitCount", 0, [0]]
];
if (_unitCount < (GRLIB_sector_cap / 2)) exitWith {GRLIB_sector_size};
if (_unitCount <= GRLIB_sector_cap) exitWith {GRLIB_sector_size - (GRLIB_sector_size * 0.5 * ((_unitCount / GRLIB_sector_cap) - 0.5))};
GRLIB_sector_size * 0.75

View File

@ -0,0 +1,58 @@
/*
File: fn_getSquadComp.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-11-25
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Provides an infantry squad composition of classnames in accordance to the current weights to adapt to the players playstyle.
Parameter(s):
_type - Type of infantry. Army or militia [STRING, defaults to "army"]
Returns:
Array of infantry classnames [ARRAY]
*/
params [
["_type", "army", [""]]
];
private _squadcomp = [];
if (_type == "army") then {
private _selected = false;
private _randomchance = 0;
_squadcomp = opfor_squad_8_standard;
if (armor_weight > 40 && !_selected) then {
_randomchance = (armor_weight - 35) * 1.4;
if ((random 100) < _randomchance) then {
_selected = true;
_squadcomp = opfor_squad_8_tankkillers;
};
};
if (air_weight > 40 && !_selected) then {
_randomchance = (air_weight - 35) * 1.4;
if ((random 100) < _randomchance) then {
_selected = true;
_squadcomp = opfor_squad_8_airkillers;
};
};
if (infantry_weight > 40 && !_selected) then {
_randomchance = (infantry_weight - 35) * 1.4;
if ((random 100) < _randomchance) then {
_selected = true;
_squadcomp = opfor_squad_8_infkillers;
};
};
} else {
private _multiplier = 1;
if (GRLIB_unitcap < 1) then {_multiplier = GRLIB_unitcap;};
while {count _squadcomp < (10 * _multiplier)} do {_squadcomp pushback (selectRandom militia_squad)};
};
_squadcomp

View File

@ -0,0 +1,29 @@
/*
File: fn_getUnitPositionId.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-07
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the position ID of given unit with vehicleVarName bypassing.
Parameter(s):
_unit - Unit to get the position ID from [OBJECT, defaults to objNull]
Returns:
Position ID [NUMBER]
*/
params [
["_unit", objNull, [objNull]]
];
if (isNull _unit) exitWith {["Null object given"] call BIS_fnc_error; -1};
private _vvn = vehicleVarName _unit;
_unit setVehicleVarName "";
private _str = str _unit;
_unit setVehicleVarName _vvn;
parseNumber (_str select [(_str find ":") + 1])

View File

@ -0,0 +1,31 @@
/*
File: fn_getUnitsCount.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-07
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the amount of units of given side inside given radius of given position.
Parameter(s):
_pos - Description [POSITION, defaults to [0, 0, 0]
_radius - Description [NUMBER, defaults to 100]
_side - Description [SIDE, defaults to GRLIB_side_friendly]
Returns:
Amount of units [NUMBER]
*/
params [
["_pos", [0, 0, 0], [[]], [2, 3]],
["_radius", 100, [0]],
["_side", GRLIB_side_friendly, [sideEmpty]]
];
private _amount = _side countSide ((_pos nearEntities ["Man", _radius]) select {!(captive _x) && ((getpos _x) select 2 < 100)});
{
_amount = _amount + (_side countSide (crew _x));
} forEach ((_pos nearEntities [["Car", "Tank", "Air"], _radius]) select {((getpos _x) select 2 < 750) && count (crew _x) > 0});
_amount

View File

@ -1,7 +1,20 @@
// LARs_fnc_addAllVirtualCargo.sqf
// Original code by Larrow - https://forums.bistudio.com/profile/770615-larrow/
// See: https://forums.bistudio.com/forums/topic/182817-how-to-limit-weapons-in-the-arsenal-of-a-box/?do=findComment&comment=2907944
/*
File: fn_getVirtualCargo.sqf
Author: Larrow - https://forums.bistudio.com/profile/770615-larrow/
Date: 2015-08-31
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
See: https://forums.bistudio.com/forums/topic/182817-how-to-limit-weapons-in-the-arsenal-of-a-box/?do=findComment&comment=2907944
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
private ["_virtualCargo", "_virtualWeapons", "_virtualMagazines", "_virtualItems", "_virtualBackpacks"];
_virtualCargo = [];

View File

@ -1,24 +1,23 @@
/*
F_getWeaponComponents
File: fn_getWeaponComponents.sqf
Author: Zharf - https://github.com/zharf
Date: 2019-06-21
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
File: F_kp_getWeaponComponents.sqf
Author: Zharf, based on CBA_fnc_weaponComponents by commy2
Date: 2019-06-21
Last Update: 2019-06-21
Description:
Snatched from CBA since we don't depend on it yet.
Reports class name of base weapon without attachments and all attachments belonging to a pre equipped weapon.
Base weapon and attachments are reported in lower case capitalization.
Fixed version of BIS_fnc_weaponComponents..
Description:
Snatched from CBA since we don't depend on it yet.
Reports class name of base weapon without attachments and all attachments belonging to a pre equipped weapon.
Base weapon and attachments are reported in lower case capitalization.
Fixed version of BIS_fnc_weaponComponents.
Parameter(s):
_weapon - A weapons class name with attachments build in [STRING, defaults to ""]
Parameter(s):
0: STRING - a weapons class name with attachments build in
Returns:
ARRAY
Returns:
Weapon components [ARRAY]
*/
// TODO
params [["_weapon", "", [""]]];
private _config = configFile >> "CfgWeapons" >> _weapon;

View File

@ -0,0 +1,37 @@
/*
File: fn_hasPermission.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-11-25
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Checks if local player has the given permission granted.
Parameter(s):
_permission - Permission to check [NUMBER, defaults to -1]
Returns:
Has permission granted [BOOL]
*/
params [
["_permission", -1, [0]]
];
if (_permission isEqualTo -1) exitWith {["No permission number given"] call BIS_fnc_error; false};
if (!GRLIB_permissions_param) exitWith {true};
if (isNil "GRLIB_last_permission_check_time") then {GRLIB_last_permission_check_time = -1000;};
if (isNil "GRLIB_permissions_cache") then {GRLIB_permissions_cache = [];};
if (time > GRLIB_last_permission_check_time + 10) then {
GRLIB_last_permission_check_time = time;
GRLIB_permissions_cache = (GRLIB_permissions select {(_x select 0) isEqualTo (getPlayerUID player)}) select 2;
};
if (count GRLIB_permissions_cache > _permission) then {
GRLIB_permissions_cache select _permission
} else {
false
};

View File

@ -0,0 +1,18 @@
/*
File: fn_isBigtownActive.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-11
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Checks if a bigtown (capital) is currently activated.
Parameter(s):
NONE
Returns:
Bigtown currently activated [BOOL]
*/
(active_sectors findIf {_x in sectors_bigtown}) != -1

View File

@ -0,0 +1,24 @@
/*
File: fn_isClassUAV.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-11-17
Last Update: 2019-12-07
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Returns if given vehicle class is an UAV.
Parameter(s):
_class - Class of object which will be checked if it is an UAV [STRING, defaults to ""]
Returns:
Class is UAV [BOOL]
*/
params [
["_class", "", [""]]
];
if (_class isEqualTo "") exitWith {["Empty string given"] call BIS_fnc_error; false};
(getNumber (configFile >> "CfgVehicles" >> _class >> "isUav")) == 1

View File

@ -0,0 +1,32 @@
/*
File: fn_isRadio.sqf
Author: Zharf - https://github.com/zharf
Date: 2019-07-07
Last Update: 2019-12-07
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Returns whether the classname is a TFAR/ACRE radio or not.
Parameter(s):
_class - Description [STRING, defaults to ""]
Returns:
Item is a radio [BOOL]
*/
params [
["_class", "", [""]]
];
if (_class isEqualTo "") exitWith {["Empty string given"] call BIS_fnc_error; false};
if ((isClass (configFile >> "CfgPatches" >> "tfar_core")) || (isClass (configFile >> "CfgPatches" >> "task_force_radio"))) exitWith {
[_class] call TFAR_fnc_isRadio
};
if (isClass (configFile >> "CfgPatches" >> "acre_api")) exitWith {
[_class] call acre_api_fnc_isRadio
};
false

View File

@ -0,0 +1,23 @@
/*
File: fn_potatoScan.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-07
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Returns the current Potato 01, if alive.
Parameter(s):
NONE
Returns:
Potato 01 [OBJECT]
*/
private _potatoes = vehicles select {typeof _x == huron_typename && alive _x};
if !(_potatoes isEqualTo []) then {
_potatoes select 0
} else {
objNull
};

View File

@ -0,0 +1,29 @@
/*
File: fn_protectObject.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-08
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Given object will get damage and simulation enabled/disabled.
Parameter(s):
_obj - Object to (un)protect [OBJECT, defaults to objNull]
_enable - Enable/Disable [BOOL, defaults to true]
Returns:
Function reached the end [BOOL]
*/
params [
["_obj", objNull, [objNull]],
["_enable", true, [false]]
];
if (isNull _obj) exitWith {["Null object given"] call BIS_fnc_error; false};
_obj allowDamage _enable;
_obj enableSimulation _enable;
true

View File

@ -1,24 +1,23 @@
/*
F_removeWeaponCargo
File: fn_removeWeaponCargo.sqf
Author: Zharf - https://github.com/zharf
Date: 2019-06-21
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
File: F_kp_removeWeaponCargo.sqf
Author: Zharf, based on CBA_fnc_removeWeaponCargo by Jonpas
Date: 2019-06-21
Last Update: 2019-06-21
Description:
Removes weapons not found in KP_liberation_allowed_items from a cargo space.
Description:
Removes weapons not found in KP_liberation_allowed_items from a cargo space
Warning: All weapon attachments/magazines in container will become detached.
Warning: Preset weapons without non-preset parents will get their attachments readded (engine limitation).
Warning: All weapon attachments/magazines in container will become detached.
Warning: Preset weapons without non-preset parents will get their attachments readded (engine limitation).
Parameter(s):
_container - Object with cargo [OBJECT, defaults to objNull]
Parameter(s):
0: OBJECT - Object with cargo
Returns:
ARRAY
Returns:
Removed items [ARRAY]
*/
// TODO
params [["_container", objNull, [objNull]]];
if (isNull _container) exitWith {
[]
@ -38,7 +37,7 @@ clearWeaponCargoGlobal _container;
};
// Some weapons don't have non-preset parents
_components = _weapon call F_getWeaponComponents;
_components = _weapon call KPLIB_fnc_getWeaponComponents;
private _weaponNonPreset = _components select 0;
if (_weaponNonPreset == "") then {
@ -106,4 +105,3 @@ clearWeaponCargoGlobal _container;
} forEach _weaponsItemsCargo;
_removed;

View File

@ -0,0 +1,31 @@
/*
File: fn_secondsToTimer.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
No description added yet.
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
params [ "_timer" ];
private [ "_minutes", "_seconds", "_minutes_zero", "_seconds_zero", "_retstr" ];
_minutes = floor (_timer / 60);
_seconds = _timer % 60;
_minutes_zero = '';
_seconds_zero = '';
if ( _minutes < 10 ) then { _minutes_zero = '0'; };
if ( _seconds < 10 ) then { _seconds_zero = '0'; };
_retstr = format [ '%1%2:%3%4',_minutes_zero,_minutes,_seconds_zero,_seconds ];
_retstr

View File

@ -0,0 +1,35 @@
/*
File: fn_setFobMass.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-12-02
Last Update: 2019-12-04
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Sets mass of FOB box to Max slingload weight of "huron_typename" lowered by 100.
If max slingload mass is lower than 1000 its set to 1000.
If it is higher than 3000 it's set to 3000.
Parameter(s):
_box - FOB Box on which mass will be set [OBJECT, defaults to objNull]
Returns:
Function reached the end [BOOL]
*/
params [
["_box", objNull, [objNull]]
];
if (isNull _object) exitWith {["Null object given"] call BIS_fnc_error; false};
private _boxMass = getNumber(configFile >> "CfgVehicles" >> huron_typename >> "slingLoadMaxCargoMass") - 100;
_boxMass = 1000 max (_boxMass min 3000);
if (local _box) then {
_box setMass _boxMass;
} else {
[_box, _boxMass] remoteExec ["setMass", _box];
};
true

View File

@ -0,0 +1,71 @@
/*
File: fn_setLoadableViV.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-05-08
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Adds ViV load/unload actions to object.
Parameter(s):
_object - Object to add actions to [OBJECT, defaults to objNull]
Returns:
Function reached the end [BOOL]
*/
// TODO
params [["_object", objNull, [objNull]]];
private _loadFnc = {
params ["_target"];
(_target call KPLIB_fnc_getNearestViVTransport) setVehicleCargo _target;
};
// Add "Load" action
_object addAction [
"<t color='#FFFF00'>" + localize "STR_ACTION_LOAD_VIV" + "</t>",
_loadFnc,
nil,
-991,
false,
true,
"",
"(isNull objectParent player) && {!isNull (_target call KPLIB_fnc_getNearestViVTransport)}",
10
];
// Add "No transports nearby action"
_object addAction [
"<t color='#FF0000'>" + localize "STR_ACTION_NOTRANSPORT_VIV" + "</t>",
{},
nil,
-991,
false,
true,
"",
"(isNull objectParent player) && {isNull (_target call KPLIB_fnc_getNearestViVTransport)} && {isNull isVehicleCargo _target}",
10
];
private _unloadFnc = {
params ["_target"];
objNull setVehicleCargo _target;
};
// Add "Unload" action
_object addAction [
"<t color='#FFFF00'>" + localize "STR_ACTION_UNLOAD_VIV" + "</t>",
_unloadFnc,
nil,
-991,
false,
true,
"",
"(isNull objectParent player) && {!isNull isVehicleCargo _target}",
10
];
true

View File

@ -0,0 +1,342 @@
/*
File: fn_setLoadout.sqf
Author: aeroson - https://github.com/aeroson
Date: 2014-03-25
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
I guarantee backwards compatibility.
These scripts allows you set/get (load/save)all of the unit's gear, including:
uniform, vest, backpack, contents of it, all quiped items, all three weapons with their attachments, currently loaded magazines and number of ammo in magazines.
All this while preserving order of items.
Useful for saving/loading loadouts.
Ideal for revive scripts where you have to set exactly the same loadout to newly created unit.
Uses workaround with placeholders to add vest/backpack items, so items stay where you put them.
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
private ["_target","_options","_loadMagsAmmo","_data","_loadedMagazines","_placeholderCount","_loadBeforeAdd","_add","_outfit","_addWeapon","_addPrimary","_addHandgun","_addSecondary","_addOrder","_currentWeapon","_currentMode"];
_options = [];
// addAction support
if(count _this < 4) then {
#define PARAM_START private ["_PARAM_INDEX"]; _PARAM_INDEX=0;
#define PARAM_REQ(A) if (count _this <= _PARAM_INDEX) exitWith { systemChat format["required param '%1' not supplied in file:'%2' at line:%3", #A ,__FILE__,__LINE__]; }; A = _this select _PARAM_INDEX; _PARAM_INDEX=_PARAM_INDEX+1;
#define PARAM(A,B) A = B; if (count _this > _PARAM_INDEX) then { A = _this select _PARAM_INDEX; }; _PARAM_INDEX=_PARAM_INDEX+1;
PARAM_START
PARAM_REQ(_target)
PARAM_REQ(_data)
PARAM(_options,[])
} else {
_target = player;
_data = loadout;
//playSound3D ["A3\Sounds_F\sfx\ZoomIn.wav", _target];
};
if(isNil{_data}) exitWith {
systemChat "you are trying to set/load empty loadout";
};
if(count _data < 13) exitWith {
systemChat "you are trying to set/load corrupted loadout";
};
#define QUOTE(A) #A
#define EL(A,B) ((A) select (B))
#define _THIS(A) EL(_this,A)
// placeholders
#define PLACEHOLDER_BACKPACK QUOTE(B_Kitbag_mcamo) // any backpack with capacity>0
#define PLACEHOLDER_ITEM QUOTE(ItemWatch) // addItem placeholder should be smallest item possible
_loadMagsAmmo = "ammo" in _options;
_loadedMagazines = [];
if(count _data > 13) then {
if(typeName(_data select 13)=="ARRAY") then {
_loadedMagazines = _data select 13;
};
};
_currentWeapon = "";
if(count _data > 14) then {
_currentWeapon = _data select 14;
};
_currentMode = "";
if(count _data > 15) then {
_currentMode = _data select 15;
};
_placeholderCount = 0;
// basic add function intended for use with uniform and vest
_add = {
private ["_target","_item","_callback"];
_target = _this select 0;
_item = _this select 1;
_callback = _this select 2;
if(typename _item == "ARRAY") then {
if(_item select 0 != "") then {
if(_loadMagsAmmo) then {
_target addMagazine _item;
} else {
(_item select 0) call _callback;
};
};
} else {
if(_item != "") then {
_item call _callback;
};
};
};
// remove clothes to prevent incorrect mag loading
removeUniform _target;
removeVest _target;
removeBackpack _target;
_outfit = PLACEHOLDER_BACKPACK; // we need to add items somewhere before we can assign them
_target addBackpack _outfit;
clearAllItemsFromBackpack _target;
removeAllAssignedItems _target;
removeHeadgear _target;
removeGoggles _target;
// add loaded magazines of assigned items
if(count _loadedMagazines>=3) then {
{
[_target, _x, { _target addItemToBackpack _x }] call _add;
} forEach (_loadedMagazines select 3);
};
// add assigned items
{
[_target, _x, { _target addItemToBackpack _x }] call _add;
_target assignItem _x;
} forEach (_data select 0);
clearAllItemsFromBackpack _target;
// get assigned items, headgear and goggles is not part of assignedItems
private ["_assignedItems","_headgear","_goggles"];
_assignedItems = assignedItems _target;
_headgear = headgear _target;
_goggles = goggles _target;
if((_headgear != "") && !(_headgear in _assignedItems)) then {
_assignedItems set [count _assignedItems, _headgear];
};
if((_goggles != "") && !(_goggles in _assignedItems)) then {
_assignedItems set [count _assignedItems, _goggles];
};
// add asigned items that could not be added with assign item
// asuming each assigned item can be put only into one slot
{
if(!(_x in _assignedItems)) then {
_target addWeapon _x;
}
} forEach (_data select 0);
// universal add weapon to hands
_addWeapon = {
private ["_weapon","_magazines","_muzzles"];
clearAllItemsFromBackpack _target;
_target removeWeapon ([] call _THIS(0));
_weapon = _data select _THIS(1);
if(_weapon != "") then {
if(isClass(configFile>>"CfgWeapons">>_weapon)) then {
if (_currentWeapon == "") then {
_currentWeapon = _weapon;
};
if(count _loadedMagazines > 0) then {
_magazines = _loadedMagazines select _THIS(5); // get loaded magazines from saved loadout
if(typename _magazines != "ARRAY") then { // backwards compatibility, make sure _magazines is array
if(_magazines=="") then {
_magazines = [];
} else {
_magazines = [_magazines];
};
};
} else {
_magazines = [getArray(configFile>>"CfgWeapons">>_weapon>>"magazines") select 0]; // generate weapon magazine
_muzzles = configFile>>"CfgWeapons">>_weapon>>"muzzles";
if(isArray(_muzzles)) then { // generate magazine for each muzzle
{
if (_x != "this") then {
_magazines set [count _magazines, toLower(getArray(configFile>>"CfgWeapons">>_weapon>>_x>>"magazines") select 0)];
};
} forEach getArray(_muzzles);
};
};
{
[_target, _x, { _target addItemToBackpack _x }] call _add;
} forEach _magazines; // add magazines
_target addWeapon _weapon;
{
if(_x!="" && !(_x in ([] call _THIS(3)))) then {
_x call _THIS(4);
};
} forEach (_data select (1+_THIS(1))); // add weapon items
} else {
systemchat format["%1 %2 doesn't exist",_THIS(2),_weapon];
if (_currentWeapon == _weapon) then {
_currentWeapon = "";
_currentMode = "";
};
};
};
};
// add primary weapon, add primary weapon loaded magazine, add primary weapon items
_addPrimary = {
[
{ primaryWeapon _target }, // 0 // get current weapon
1, // 1 //weapon classname index in _data
"primary", // 2 // weapon debug type
{ primaryWeaponItems _target }, // 3 // weapon items
{ _target addPrimaryWeaponItem _this }, // 4 // add weapon item
0 // 5 // index in _loadedMagazines
] call _addWeapon;
};
// add handgun weapon, add handgun weapon loaded magazine, add handgun weapon items
_addHandgun = {
[
{ handgunWeapon _target }, // 0 // get current weapon
3, // 1 //weapon classname index in _data
"handgun", // 2 // weapon debug type
{ handgunItems _target }, // 3 // weapon items
{ _target addHandgunItem _this }, // 4 // add weapon item
1 // 5 // index in _loadedMagazines
] call _addWeapon;
};
// add secondary weapon, add secondary weapon loaded magazine, add secondary weapon items
_addSecondary = {
[
{ secondaryWeapon _target }, // 0 // get current weapon
5, // 1 //weapon classname index in _data in _data
"secondary", // 2 // weapon debug type
{ secondaryWeaponItems _target }, // 3 // weapon items
{ _target addSecondaryWeaponItem _this }, // 4 // add weapon item
2 // 5 // index in _loadedMagazines
] call _addWeapon;
};
// first added weapon is selected weapon, order add functions to firstly add currently selected weapon
_addOrder=[_addPrimary,_addHandgun,_addSecondary];
if(_currentWeapon!="") then {
_addOrder = switch _currentWeapon do {
case (_data select 3): {[_addHandgun,_addPrimary,_addSecondary]};
case (_data select 5): {[_addSecondary,_addPrimary,_addHandgun]};
default {_addOrder};
};
};
{
[] call _x;
} forEach _addOrder;
// select weapon and firing mode
if(vehicle _target == _target && _currentWeapon != "" && _currentMode != "") then {
_muzzles = 0;
while { (_currentWeapon != currentMuzzle _target || _currentMode != currentWeaponMode _target ) && _muzzles < 100 } do {
_target action ["SWITCHWEAPON", _target, _target, _muzzles];
_muzzles = _muzzles + 1;
};
if(_muzzles >= 100) then {
systemchat format["mode %1 for %2 doesn't exist", _currentMode, _currentWeapon];
_currentMode = "";
};
} else {
_currentMode = "";
};
if(_currentMode == "" && _currentWeapon != "") then {
_target selectWeapon _currentWeapon;
};
clearAllItemsFromBackpack _target;
// add uniform, add uniform items and fill uniform with item placeholders
_outfit = _data select 7;
if(_outfit != "") then {
if(isClass(configFile>>"CfgWeapons">>_outfit)) then {
_target forceAddUniform _outfit;
_target addItem PLACEHOLDER_ITEM;
if(loadUniform _target > 0) then {
_placeholderCount = _placeholderCount + 1;
{
[_target, _x, { _target addItemToUniform _x }] call _add;
} forEach (_data select 8);
while{true} do {
_loadBeforeAdd = loadUniform _target;
_target addItem PLACEHOLDER_ITEM;
if(loadUniform _target == _loadBeforeAdd) exitWith {};
_placeholderCount = _placeholderCount + 1;
};
};
} else {
systemchat format["uniform %1 doesn't exist",_outfit];
};
};
// add vest, add vest items and fill vest with item placeholders
_outfit = _data select 9;
if(_outfit != "") then {
if(isClass(configFile>>"CfgWeapons">>_outfit)) then {
_target addVest _outfit;
_target addItem PLACEHOLDER_ITEM;
if(loadVest _target > 0) then {
_placeholderCount = _placeholderCount + 1;
{
[_target, _x, { _target addItemToVest _x }] call _add;
} forEach (_data select 10);
while{true} do {
_loadBeforeAdd = loadVest _target;
_target addItem PLACEHOLDER_ITEM;
if(loadVest _target == _loadBeforeAdd) exitWith {};
_placeholderCount = _placeholderCount + 1;
};
};
} else {
systemchat format["vest %1 doesn't exist",_outfit];
};
};
// add backpack and add backpack items
removeBackpack _target;
_outfit = _data select 11;
if(_outfit != "") then {
if(getNumber(configFile>>"CfgVehicles">>_outfit>>"isbackpack")==1) then {
_target addBackpack _outfit;
clearAllItemsFromBackpack _target;
_target addItem PLACEHOLDER_ITEM;
_placeholderCount = _placeholderCount + 1;
if(loadBackpack _target > 0) then {
{
[_target, _x, { _target addItemToBackpack _x }] call _add;
} forEach (_data select 12);
};
} else {
systemchat format["backpack %1 doesn't exist",_outfit];
};
};
// remove item placeholders
for "_i" from 1 to _placeholderCount do {
_target removeItem PLACEHOLDER_ITEM;
};
// make loadout visible fix?
if(vehicle _target == _target) then {
//_target switchMove (getArray(configFile>>"CfgMovesMaleSdr">>"States">>animationState player>>"ConnectTo") select 0);
_target setPosATL (getPosATL _target);
};

View File

@ -0,0 +1,41 @@
/*
File: fn_sortStorage.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-06-09
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Stack and sort the resources inside a storage area.
Parameter(s):
_storage - Storage to sort [OBJECT, defaults to objNull]
Returns:
Function reached the end [BOOL]
*/
// TODO
params ["_storage"];
private _pos = getPos _storage;
private _supply = 0;
private _ammo = 0;
private _fuel = 0;
{
switch ((typeOf _x)) do {
case KP_liberation_supply_crate: {_supply = _supply + (_x getVariable ["KP_liberation_crate_value",0]);};
case KP_liberation_ammo_crate: {_ammo = _ammo + (_x getVariable ["KP_liberation_crate_value",0]);};
case KP_liberation_fuel_crate: {_fuel = _fuel + (_x getVariable ["KP_liberation_crate_value",0]);};
default {diag_log format ["[KP LIBERATION] [ERROR] Invalid object (%1) at storage area", (typeOf _x)];};
};
detach _x;
deleteVehicle _x;
} forEach (attachedObjects _storage);
sleep 0.5;
[_supply, _ammo, _fuel, _storage, true] spawn KPLIB_fnc_fillStorage;
true

View File

@ -0,0 +1,63 @@
/*
File: fn_spawnBuildingSquad.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
No description added yet.
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
params ["_infsquad", "_building_ai_max", "_buildingpositions", "_sectorpos", ["_sector", ""]];
private _everythingspawned = [];
private _infsquad_classnames = [];
if (_infsquad == "militia") then {
_infsquad_classnames = militia_squad;
} else {
_infsquad_classnames = ([] call KPLIB_fnc_getSquadComp);
};
if (_building_ai_max > floor ((count _buildingpositions) * GRLIB_defended_buildingpos_part)) then {_building_ai_max = floor ((count _buildingpositions) * GRLIB_defended_buildingpos_part)};
private _squadtospawn = [];
while {(count _squadtospawn) < _building_ai_max} do {_squadtospawn pushback (selectRandom _infsquad_classnames);};
private _position_indexes = [];
private _position_count = count _buildingpositions;
while {count _position_indexes < count _squadtospawn} do {
private _nextposit = floor (random _position_count);
if !(_nextposit in _position_indexes) then {
_position_indexes pushback _nextposit;
};
};
private _grp = createGroup [GRLIB_side_enemy, true];
private _idxposit = 0;
{
private _nextunit = [_x, _sectorpos, _grp] call KPLIB_fnc_createManagedUnit;
_nextunit setdir (random 360);
_nextunit setpos (_buildingpositions select (_position_indexes select _idxposit));
[_nextunit, _sector] spawn building_defence_ai;
_idxposit = _idxposit + 1;
if (count units _grp > 10) then {
_everythingspawned = _everythingspawned + (units _grp);
_grp = createGroup [GRLIB_side_enemy, true];
};
} forEach _squadtospawn;
if (!(isNull _grp)) then {
_everythingspawned = _everythingspawned + (units _grp);
};
_everythingspawned

View File

@ -0,0 +1,43 @@
/*
File: fn_spawnCivilians.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
No description added yet.
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
params ["_sector"];
private _createdcivs = [];
private _sectorpos = getMarkerPos _sector;
private _idx = 0;
private _nbcivs = round ((3 + (floor (random 7))) * GRLIB_civilian_activity);
private _spread = 1;
if (_sector in sectors_bigtown) then {
_nbcivs = _nbcivs + 10;
_spread = 2.5;
};
_nbcivs = _nbcivs * (sqrt (GRLIB_unitcap));
while {_idx < _nbcivs} do {
private _spawnpos = [(((_sectorpos select 0) + (75 * _spread)) - (random (150 * _spread))),(((_sectorpos select 1) + (75 * _spread)) - (random (150 * _spread))),0];
private _grp = createGroup [GRLIB_side_civilian, true];
private _nextciv = [selectRandom civilians, _spawnpos, _grp] call KPLIB_fnc_createManagedUnit;
_createdcivs pushBack _nextciv;
[_grp] call add_civ_waypoints;
_idx = _idx + 1;
};
_createdcivs

View File

@ -0,0 +1,70 @@
/*
File: fn_spawnGuerillaGroup.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-10-08
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Spawns a group of guerilla units with random gear depending on guerilla strength.
Parameter(s):
_pos - Position where to spawn the group [POSITION, defaults to [0, 0, 0]]
_amount - Amount of units for the group. 0 for automatic calculation [NUMBER, defaults to 0]
Returns:
Spawned group [GROUP]
*/
// TODO
params [["_pos", [0, 0, 0]], ["_amount", 0]];
private _grp = createGroup [GRLIB_side_resistance, true];
private _tier = [] call KPLIB_fnc_getResistanceTier;
private _cr_multi = [] call KPLIB_fnc_crGetMulti;
if (_amount == 0) then {_amount = (6 + (round (random _cr_multi)) + (round (random _tier)));};
private _weapons = missionNamespace getVariable ("KP_liberation_guerilla_weapons_" + str _tier);
private _uniforms = missionNamespace getVariable ("KP_liberation_guerilla_uniforms_" + str _tier);
private _vests = missionNamespace getVariable ("KP_liberation_guerilla_vests_" + str _tier);
private _headgear = missionNamespace getVariable ("KP_liberation_guerilla_headgear_" + str _tier);
while {(count (units _grp) < _amount)} do {
private _unit = [selectRandom KP_liberation_guerilla_units, _pos, _grp, "PRIVATE", 5] call KPLIB_fnc_createManagedUnit;
private _weapon = selectRandom _weapons;
removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;
_unit forceAddUniform (selectRandom _uniforms);
_unit addItemToUniform "FirstAidKit";
_unit addItemToUniform "MiniGrenade";
_unit addVest (selectRandom _vests);
for "_i" from 1 to (_weapon select 2) do {_unit addItemToVest (_weapon select 1);};
_unit addHeadgear (selectRandom _headgear);
if (_tier > 1) then {
_unit addGoggles (selectRandom KP_liberation_guerilla_facegear);
};
_unit addWeapon (_weapon select 0);
_unit addPrimaryWeaponItem (_weapon select 3);
_unit addPrimaryWeaponItem (_weapon select 4);
_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit linkItem "ItemWatch";
_unit linkItem "ItemRadio";
if ((_tier > 1) && ((random 100) <= KP_liberation_resistance_at_chance)) then {
_unit addBackpack "B_FieldPack_cbr";
for "_i" from 1 to 3 do {_unit addItemToBackpack "RPG7_F";};
_unit addWeapon "launch_RPG7_F";
};
};
_grp

View File

@ -0,0 +1,63 @@
/*
File: fn_spawnMilitaryPostSquad.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
No description added yet.
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
params ["_squadpos"];
private _spawned_units_local = [];
private _allposts = (nearestObjects [_squadpos, ["Land_Cargo_Patrol_V1_F","Land_Cargo_Patrol_V2_F","Land_Cargo_Patrol_V3_F","Land_Cargo_Patrol_V4_F"], GRLIB_capture_size]) select {alive _x};
if (count _allposts > 0) then {
private _grp = createGroup [GRLIB_side_enemy, true];
{
private _building_positions = [_x] call BIS_fnc_buildingPositions;
private _unitclasspost = opfor_marksman;
if (random 100 > 60) then {
_unitclasspost = opfor_machinegunner;
};
private _nextunit_post = [_unitclasspost, _squadpos, _grp] call KPLIB_fnc_createManagedUnit;
_nextunit_post setdir (180 + (getdir _x));
_nextunit_post setpos (_building_positions select 1);
} forEach _allposts;
private _totalx = 0;
private _totaly = 0;
{
[_x] spawn building_defence_ai;
_x setUnitPos 'UP';
_spawned_units_local pushback _x;
_totalx = _totalx + ((getpos _x) select 0);
_totaly = _totaly + ((getpos _x) select 1);
} forEach (units _grp);
private _avgx = _totalx / (count (units _grp));
private _avgy = _totaly / (count (units _grp));
{
private _vd = (getPosASL _x) vectorDiff [_avgx, _avgy, (getPosASL _x) select 2];
private _newdir = (_vd select 0) atan2 (_vd select 1);
if (_newdir < 0) then {_dir = 360 + _newdir};
_x setdir (_newdir);
} forEach (units _grp);
};
_spawned_units_local

View File

@ -0,0 +1,32 @@
/*
File: fn_spawnMilitiaCrew.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
No description added yet.
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
params ["_vehicle"];
private _grp = createGroup [GRLIB_side_enemy, true];
private _vehcrew = [];
while {count units _grp < 3} do {
[selectRandom militia_squad, getPos _vehicle, _grp] call KPLIB_fnc_createManagedUnit;
};
((units _grp) select 0) moveInDriver _vehicle;
((units _grp) select 1) moveInGunner _vehicle;
((units _grp) select 2) moveInCommander _vehicle;
{
if (vehicle _x == _x) then {
deleteVehicle _x;
};
} foreach (units _grp);

View File

@ -0,0 +1,38 @@
/*
File: fn_spawnRegularSquad.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
No description added yet.
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
params [ "_sector", "_squadies_to_spawn" ];
private _sectorpos = (getMarkerPos _sector) getPos [random 100, random 360];
private _spawnpos = zeropos;
while {_spawnpos distance zeropos < 1000} do {
_spawnpos = (_sectorpos getPos [random 50, random 360]) findEmptyPosition [5, 100, "B_Heli_Light_01_F"];
if (count _spawnpos == 0) then {_spawnpos = zeropos;};
};
private _corrected_amount = round ((count _squadies_to_spawn) * ([] call KPLIB_fnc_getOpforFactor));
private _grp = createGroup [GRLIB_side_enemy, true];
{
if ((count (units _grp)) < _corrected_amount) then {
[_x, _spawnpos, _grp] call KPLIB_fnc_createManagedUnit;
};
sleep 0.1;
} forEach _squadies_to_spawn;
_grp;

View File

@ -0,0 +1,77 @@
/*
File: fn_spawnVehicle.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
No description added yet.
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
params [
"_sectorpos",
"_classname",
[ "_precise_position", false ],
[ "_random_rotate", true ]
];
private _newvehicle = objNull;
private _spawnpos = zeropos;
private _grp = grpNull;
if ( _precise_position ) then {
_spawnpos = [] + _sectorpos;
} else {
while { _spawnpos distance zeropos < 1000 } do {
_spawnpos = (_sectorpos getPos [random 150, random 360]) findEmptyPosition [10, 100, 'B_Heli_Transport_01_F'];
if ( count _spawnpos == 0 ) then { _spawnpos = zeropos; };
};
};
_newvehicle = objNull;
if ( _classname in opfor_choppers ) then {
_newvehicle = createVehicle [_classname, _spawnpos, [], 0, 'FLY'];
_newvehicle flyInHeight (100 + (random 200));
} else {
_newvehicle = _classname createVehicle _spawnpos;
[_newvehicle] call KPLIB_fnc_allowCrewInImmobile;
_newvehicle setpos _spawnpos;
};
_newvehicle allowdamage false;
if(KP_liberation_clear_cargo) then {
clearWeaponCargoGlobal _newvehicle;
clearMagazineCargoGlobal _newvehicle;
clearItemCargoGlobal _newvehicle;
clearBackpackCargoGlobal _newvehicle;
};
if ( _classname in militia_vehicles ) then {
[ _newvehicle ] call KPLIB_fnc_spawnMilitiaCrew;
} else {
_grp = createGroup [GRLIB_side_enemy, true];
createVehicleCrew _newvehicle;
(crew _newvehicle) joinSilent _grp;
sleep 0.1;
{ _x addMPEventHandler ['MPKilled', {_this spawn kill_manager}]; } foreach (crew _newvehicle);
};
_newvehicle addMPEventHandler ['MPKilled', {_this spawn kill_manager}];
if ( _random_rotate ) then {
_newvehicle setdir (random 360);
};
_newvehicle setVectorUp surfaceNormal position _newvehicle;
sleep 0.1;
_newvehicle allowdamage true;
_newvehicle setdamage 0;
_newvehicle

View File

@ -0,0 +1,22 @@
/*
File: fn_swapInventory.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
No description added yet.
Parameter(s):
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
Returns:
Function reached the end [BOOL]
*/
// TODO
params [ "_unit1", "_unit2" ];
private [ "_loadout" ];
_loadout = [_unit1, ["repetitive"]] call KPLIB_fnc_getLoadout;
[ _unit2, _loadout ] call KPLIB_fnc_setLoadout;

View File

@ -2,12 +2,12 @@ enableSaving [ false, false ];
if (isDedicated) then {debug_source = "Server";} else {debug_source = name player;};
[] call compileFinal preprocessFileLineNumbers "scripts\shared\liberation_functions.sqf";
[] call compileFinal preprocessFileLineNumbers "scripts\shared\init_sectors.sqf";
if (!isServer) then {waitUntil {!isNil "KP_serverParamsFetched"};};
[] call compileFinal preprocessFileLineNumbers "scripts\shared\fetch_params.sqf";
[] call compileFinal preprocessFileLineNumbers "kp_liberation_config.sqf";
[] call compileFinal preprocessFileLineNumbers "presets\init_presets.sqf";
KPLIB_objectInitsCache = createSimpleObject ["a3\weapons_f\empty.p3d", [-7580, -7580, 0], true];
[] call compileFinal preprocessFileLineNumbers "kp_objectInits.sqf";
[] execVM "GREUH\scripts\GREUH_activate.sqf";

View File

@ -15,6 +15,13 @@ KP_liberation_medical_vehicles = [
"CUP_B_LR_Ambulance_CZ_W",
"CUP_B_LR_Ambulance_GB_D",
"CUP_B_LR_Ambulance_GB_W",
"CUP_B_FV432_GB_Ambulance",
"CUP_B_S1203_Ambulance_CDF",
"CUP_B_UH1Y_MEV_USMC",
"CUP_B_UH60M_Unarmed_FFV_MEV_US",
"CUP_B_BMP2_AMB_CZ",
"CUP_B_BMP2_AMB_CZ_Des",
"CUP_B_HMMWV_Ambulance_ACR",
"gm_gc_army_ural375d_medic_win",
"gm_gc_army_ural375d_medic",
"gm_ge_army_u1300l_medic_win_rc",
@ -166,6 +173,8 @@ KP_liberation_fuel_max = 45;
Name of the savegame namespace inside of the [ServerProfileName].vars.Arma3Profile file. */
GRLIB_save_key = "KP_LIBERATION_" + (toUpper worldName) + "_SAVEGAME";
KP_liberation_save_interval = 20; // Interval in seconds for automatic save.
GRLIB_side_friendly = WEST; // Friendly side.
GRLIB_side_enemy = EAST; // Enemy side.
GRLIB_side_resistance = RESISTANCE; // Resistance side.
@ -230,6 +239,18 @@ KP_liberation_battlegroup_clearance = [
"song_bin_tanh"
];
/* Slot independent commander action access.
The Steam UIDs entered in this array will allow corresponding players to access the commander actions (rights, production, etc.),
even if they are not in the commander slot. */
KP_liberation_commander_actions = [
/*
Example:
"1324678",
"5468711",
"2156347"
*/
];
/* - Default arsenal blacklist method.
Useless if you're using anything other than "kp_liberation_arsenal = 0;" above. A whitelisted arsenal is always more performance friendly then a blacklisted arsenal.
REMEMBER: All static turret and UAV bags should be defined here, to stop players from exploiting free resources via the virtual arsenal. */
@ -314,9 +335,6 @@ blacklisted_from_arsenal = [
"O_UAV_06_medical_backpack_F",
"O_UGV_02_Demining_backpack_F",
"O_UGV_02_Science_backpack_F",
"optic_Nightstalker",
"optic_tws_mg",
"optic_tws",
"RHS_AGS30_Gun_Bag",
"RHS_AGS30_Tripod_Bag",
"RHS_DShkM_Gun_Bag",
@ -499,6 +517,7 @@ box_transport_config = [
["C_Van_02_service_F", -5, [0,0.5,0], [0,-1.75,0]],
["C_Van_02_transport_F", -5, [0,-1.75,0]],
["C_Van_02_vehicle_F", -5, [0,0.5,0], [0,-1.75,0]],
["CUP_B_C130J_Cargo_USMC",-10,[0,0.6,-3.76],[0,-0.9,-3.76],[0,-2.5,-3.76],[0,-4.2,-3.76],[0,2.2,-3.76],[0,3.8,-3.76],[0,5.5,-3.76]],
["CUP_B_CH47F_GB", -8, [0,-3.535,-1.9], [0,-1.819,-1.9], [0,0.98,-1.9], [0,3.037,-1.9]],
["CUP_B_CH47F_USA", -8, [0,-3.535,-1.9], [0,-1.819,-1.9], [0,0.98,-1.9], [0,3.037,-1.9]],
["CUP_B_CH53E_USMC", -8, [0,7.566,-3], [0,5.749,-3], [0,3.847,-3], [0,2,-3], [0,0.338,-3]],
@ -571,7 +590,7 @@ box_transport_config = [
["O_T_Truck_03_transport_ghex_F", -6.5, [0,-0.8,0.4], [0,-2.4,0.4], [0,-4.0,0.4]],
["O_Truck_03_covered_F", -6.5, [0,-0.8,0.4], [0,-2.4,0.4], [0,-4.0,0.4]],
["O_Truck_03_transport_F", -6.5, [0,-0.8,0.4], [0,-2.4,0.4], [0,-4.0,0.4]],
["RHS_C130J", -9.5, [-0.8,4.5,1.9], [0.8,4.5,1.9], [-0.8,4.5,3.1], [0.8,4.5,3.1], [-0.8,3.0,1.9], [0.8,3.0,1.9], [-0.8,3.0,3.1], [0.8,3.0,3.1], [-0.8,2.0,1.9], [0.8,2.0,1.9], [-0.8,2.0,3.1], [0.8,2.0,3.1], [-0.8,1.0,1.9], [0.8,1.0,1.9], [-0.8,1.0,3.1], [0.8,1.0,3.1], [-0.8,0.0,1.9], [0.8,0.0,1.9], [-0.8,0.0,3.1], [0.8,0.0,3.1], [-0.8,-1.0,1.9], [0.8,-1.0,1.9], [-0.8,-1.0,3.1], [0.8,-1.0,3.1]],
["RHS_C130J", -9.5, [-0.8,8.0,-4.0], [0.8,8.0,-4.0], [-0.8,8.0,-2.8], [0.8,8.0,-2.8], [-0.8,6.5,-4.0], [0.8,6.5,-4.0], [-0.8,6.5,-2.8], [0.8,6.5,-2.8], [-0.8,5.0,-4.0], [0.8,5.0,-4.0], [-0.8,5.0,-2.8], [0.8,5.0,-2.8], [-0.8,3.5,-4.0], [0.8,3.5,-4.0], [-0.8,3.5,-2.8], [0.8,3.5,-2.8], [-0.8,2.0,-4.0], [0.8,2.0,-4.0], [-0.8,2.0,-2.8], [0.8,2.0,-2.8], [-0.8,0.5,-4.0], [0.8,0.5,-4.0], [-0.8,0.5,-2.8], [0.8,0.5,-2.8]],
["RHS_CH_47F_10", -8, [0,2.2,-1.7], [0,0.5,-1.7], [0,-1.2,-1.7]],
["RHS_CH_47F_light", -8, [0,2.2,-1.7], [0,0.5,-1.7], [0,-1.2,-1.7]],
["RHS_CH_47F", -8, [0,2.2,-1.7], [0,0.5,-1.7], [0,-1.2,-1.7]],
@ -587,8 +606,8 @@ box_transport_config = [
["RHS_Ural_Open_MSV_01", -6.5, [0,-0.2,0.55], [0,-1.4,0.55], [0,-2.55,0.55]],
["RHS_Ural_Open_VDV_01", -6.5, [0,-0.2,0.55], [0,-1.4,0.55], [0,-2.55,0.55]],
["RHS_Ural_VDV_01", -6.5, [0,-0.2,0.55], [0,-1.4,0.55], [0,-2.55,0.55]],
["rhsusf_CH53E_USMC_D", -11.0, [0,2.5,1.4], [0,2.5,2.6], [0,1.0,1.4], [0,1.0,2.6], [0,-0.5,1.4], [0,-0.5,2.6], [0,-0.5,1.4], [0,-0.5,2.6], [0,-2.0,1.4], [0,-2.5,2.6], [0,-3.5,1.4], [0,-3.5,2.6]],
["rhsusf_CH53E_USMC", -11.0, [0,2.5,1.4], [0,2.5,2.6], [0,1.0,1.4], [0,1.0,2.6], [0,-0.5,1.4], [0,-0.5,2.6], [0,-0.5,1.4], [0,-0.5,2.6], [0,-2.0,1.4], [0,-2.5,2.6], [0,-3.5,1.4], [0,-3.5,2.6]],
["rhsusf_CH53E_USMC_D", -11.0, [0,7,-3.2], [0,7,-2.0], [0,5.5,-3.2], [0,5.5,-2.0], [0,4,-3.2], [0,4,-2.0], [0,2.5,-3.2], [0,2.5,-2.0], [0,1.0,-3.2], [0,1.0,-2.0], [0,-0.5,-3.2], [0,-0.5,-2.0]],
["rhsusf_CH53E_USMC", -11.0, [0,7,-3.2], [0,7,-2.0], [0,5.5,-3.2], [0,5.5,-2.0], [0,4,-3.2], [0,4,-2.0], [0,2.5,-3.2], [0,2.5,-2.0], [0,1.0,-3.2], [0,1.0,-2.0], [0,-0.5,-3.2], [0,-0.5,-2.0]],
["rhsusf_M1078A1P2_B_D_flatbed_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1078A1P2_B_D_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
["rhsusf_M1078A1P2_B_M2_D_flatbed_fmtv_usarmy", -5.0, [0,-0.2,0.45], [0,-1.9,0.45]],
@ -631,6 +650,9 @@ box_transport_config = [
["UK3CB_BAF_Merlin_HC4_18_GPMG_Arctic", -7.5, [0.25,3.7,-1.5], [0.25,1.6,-1.5], [0.25,-0.4,-1.5]],
["UK3CB_BAF_Merlin_HC4_32_Arctic", -7.5, [0.25,3.7,-1.5], [0.25,1.6,-1.5], [0.25,-0.4,-1.5]],
["UK3CB_BAF_Merlin_HC4_CSAR_Arctic", -7.5, [0.25,3.7,-1.5], [0.25,1.6,-1.5], [0.25,-0.4,-1.5]],
["USAF_C17",-10,[-1.2,14.4,-0.43],[-1.2,12.8,-0.43],[-1.2,11.1,-0.43],[-1.2,9.5,-0.43],[-1.2,7.9,-0.43],[-1.2,6.3,-0.43],[-1.2,4.6,-0.43],[-1.2,3,-0.43],[-1.2,1.4,-0.43],[-1.2,-0.1,-0.43],[-1.2,-1.8,-0.43],[1.2,14.4,-0.43],[1.2,12.8,-0.43],[1.2,11.2,-0.43],[1.2,9.6,-0.43],[1.2,7.9,-0.43],[1.2,6.3,-0.43],[1.2,4.7,-0.43],[1.2,3.1,-0.43],[1.2,1.5,-0.43],[1.2,0,-0.43],[1.2,-1.7,-0.43],[-1.2,14.5,1.22],[-1.2,12.8,1.22],[-1.2,11.2,1.2],[-1.2,9.5,1.22],[-1.2,7.9,1.22],[-1.2,6.3,1.22],[-1.2,4.7,1.22],[-1.2,3,1.22],[-1.2,1.4,1.22],[-1.2,-0.1,1.22],[-1.2,-1.7,1.22],[1.2,14.5,1.22],[1.2,12.8,1.22],[1.2,11.2,1.22],[1.2,9.6,1.22],[1.2,8,1.22],[1.2,6.3,1.22],[1.2,4.7,1.22],[1.2,3.1,1.22],[1.2,1.5,1.22],[1.2,0,1.22],[1.2,-1.6,1.22]],
["USAF_C130J",-10,[0,3.6,2.08],[0,2,2.08],[0,0.3,2.08],[0,-1.3,2.08]],
["USAF_C130J_Cargo",-10,[0,3.6,2.08],[0,2,2.08],[0,0.3,2.08],[0,-1.3,2.08],[0,5.3,2.08],[0,7,2.08]],
["uns_M35A2_Open", -5, [0,-0.6,0.1], [0,-2.3,0.1]],
["uns_M35A2", -5, [0,-0.6,0.1], [0,-2.3,0.1]],
["uns_m37b1", -5, [0,-1.8,0.15]],
@ -814,6 +836,10 @@ boats_names = [
"O_Boat_Transport_01_F",
"O_T_Boat_Armed_01_hmg_F",
"O_T_Boat_Transport_01_F",
"CUP_B_MK10_GB",
"CUP_B_RHIB_USMC",
"CUP_B_RHIB2Turret_USMC",
"CUP_B_LCU1600_USMC",
"rhsusf_mkvsoc",
"sfp_gruppbat",
"sfp_rbb_norrkoping",
@ -894,4 +920,3 @@ GRLIB_blufor_cap = (GRLIB_blufor_cap * GRLIB_unitcap) min 100;
GRLIB_sector_cap = GRLIB_sector_cap * GRLIB_unitcap;
GRLIB_battlegroup_cap = GRLIB_battlegroup_cap * GRLIB_unitcap;
GRLIB_patrol_cap = GRLIB_patrol_cap * GRLIB_unitcap;
GRLIB_offload_diag = false;

View File

@ -1,16 +1,26 @@
/* - Specific object init codes depending on classnames.
Format = [Array of classnames as strings, Code to apply]
_this is the reference to the object with the classname */
/*
Specific object init codes depending on classnames.
Format = [Array of classnames as strings <ARRAY>, Code to apply <CODE>, Allow inheritance <BOOL>]
_this is the reference to the object with the classname
Example:
KPLIB_objectInits = [
[["O_soldierU_F"], {systemChat "CSAT urban soldier was spawned!"}],
[["CAManBase"], {systemChat format ["Some human named '%1' was spawned!", name _this]}, true]
];
];
*/
KPLIB_objectInits = [
// Set KP logo on white flag
[["Flag_White_F"], {_this setFlagTexture "res\flag_kp_co.paa";}],
// Add helipads to zeus, as they can't be recycled after built
[["Land_HelipadSquare_F", "Land_HelipadCircle_F", "Land_HelipadRescue_F", "LAND_uns_Heli_pad", "Helipad", "LAND_uns_evac_pad", "LAND_uns_Heli_H"], {{[_x, [[_this], true]] remoteExecCall ["addCuratorEditableObjects", 2]} forEach allCurators;}],
[["Helipad_base_F", "LAND_uns_Heli_pad", "Helipad", "LAND_uns_evac_pad", "LAND_uns_Heli_H"], {{[_x, [[_this], true]] remoteExecCall ["addCuratorEditableObjects", 2]} forEach allCurators;}, true],
// Add ViV action to FOB box
[[FOB_box_typename], {_this call F_setFobMass; [_this] remoteExecCall ["F_setLoadableViV", 0, _this];}],
[[FOB_box_typename], {[_this] call KPLIB_fnc_setFobMass; [_this] remoteExecCall ["KPLIB_fnc_setLoadableViV", 0, _this];}],
// Add storage type variable to built storage areas (only for FOB built/loaded ones)
[[KP_liberation_small_storage_building, KP_liberation_large_storage_building], {_this setVariable ["KP_liberation_storage_type", 0, true];}],

View File

@ -12,5 +12,5 @@ if ( isNil "GRLIB_respawn_loadout" ) then {
player linkItem "ItemRadio";
} else {
sleep 4;
[ player, GRLIB_respawn_loadout ] call F_setLoadout;
[ player, GRLIB_respawn_loadout ] call KPLIB_fnc_setLoadout;
};

View File

@ -79,6 +79,7 @@ light_vehicles = [
["CUP_B_LR_Transport_CZ_D",200,0,50], // Land Rover 110 (Transport) Desert
["CUP_B_LR_MG_CZ_D",200,40,50], // Land Rover 110 (M2) Desert
["CUP_B_LR_Special_CZ_D",250,100,50], // Land Rover 110 (Special) Desert
["CUP_B_HMMWV_Ambulance_ACR",225,0,50], // HMMWV (Ambulance)
["CUP_B_HMMWV_DSHKM_GPK_ACR",225,60,50], // HMMWV M1114 DSHKM
["CUP_B_HMMWV_M2_GPK_ACR",225,60,50], // HMMWV M1114 M2
["CUP_B_HMMWV_AGS_GPK_ACR",225,80,50], // HMMWV M1114 AGS
@ -91,10 +92,12 @@ light_vehicles = [
];
heavy_vehicles = [
["CUP_B_BRDM2_HQ_CZ_Des",200,25,200], // BRDM-2 (HQ) (Desert)
["CUP_B_BRDM2_CZ_Des",200,200,200], // BRDM-2 (Desert)
["I_APC_Wheeled_03_cannon_F",500,400,300], // Pandur II
["CUP_I_BMP1_TK_GUE",300,300,200], // BVP-1
["CUP_B_BMP2_CZ_Des",400,350,200], // BVP-2
["CUP_B_BMP2_AMB_CZ_Des",350,0,200], // BVP-2 Ambulance
["B_APC_Tracked_01_AA_F",500,450,400], // IFV-6a Cheetah
["CUP_O_T72_RU",600,500,400], // T-72
["CUP_B_T72_CZ",800,500,450] // T-72M4CZ

View File

@ -88,10 +88,13 @@ light_vehicles = [
];
heavy_vehicles = [
["CUP_B_BRDM2_HQ_CZ",200,25,200], // BRDM-2 (HQ)
["CUP_B_BRDM2_CZ",200,200,200], // BRDM-2
["CUP_B_RM70_CZ",300,750,175], // RM-70
["I_APC_Wheeled_03_cannon_F",500,400,300], // Pandur II
["CUP_I_BMP1_TK_GUE",300,300,200], // BVP-1
["CUP_B_BMP2_CZ",400,350,200], // BVP-2
["CUP_B_BMP2_AMB_CZ",350,0,200], // BVP-2 Ambulance
["B_APC_Tracked_01_AA_F",500,450,400], // IFV-6a Cheetah
["CUP_O_T72_RU",600,500,400], // T72
["CUP_B_T72_CZ",800,500,450] // T-72M4CZ
@ -316,6 +319,7 @@ elite_vehicles = [
"CUP_B_Dingo_GL_CZ_Wdl", // Dingo 2 (GL) (Woodland)
"QIN_Titus_WDL", // Nexter Titus
"QIN_Titus_arx20_WDL", // Nexter Titus ARX20
"CUP_B_RM70_CZ", // RM-70
"I_APC_Wheeled_03_cannon_F", // Pandur II
"CUP_B_BMP2_CZ", // BVP-2
"B_APC_Tracked_01_AA_F", // IFV-6a Cheetah

View File

@ -117,8 +117,6 @@ air_vehicles = [
static_vehicles = [
["CUP_B_L111A1_BAF_DDPM",25,40,0], // L111A1 Machine Gun
["CUP_B_L111A1_MiniTripod_BAF_DDPM",25,40,0], // L111A1 Minitripod
["B_static_AT_F",50,100,0], // Static Titan Launcher (AT)
["B_static_AA_F",50,100,0], // Static Titan Launcher (AA)
["CUP_WV_B_CRAM",500,500,0], // C-RAM
["CUP_WV_B_SS_Launcher",750,500,0], // Mk-29 GMLS
["CUP_WV_B_RAM_Launcher",750,750,0], // Mk-49 GMLS
@ -206,7 +204,7 @@ buildings = [
];
support_vehicles = [
[Arsenal_typename,0,0,0],
[Arsenal_typename,100,200,0],
[Respawn_truck_typename,200,0,100],
[FOB_box_typename,300,500,0],
[FOB_truck_typename,300,500,75],

View File

@ -18,7 +18,7 @@ FOB_typename = "Land_Cargo_HQ_V3_F"; // This
FOB_box_typename = "B_Slingload_01_Cargo_F"; // This is the FOB as a container.
FOB_truck_typename = "CUP_B_MTVR_Repair_USA"; // This is the FOB as a vehicle.
Arsenal_typename = "B_supplyCrate_F"; // This is the virtual arsenal as portable supply crates.
Respawn_truck_typename = "CUP_B_LR_Ambulance_GB_W"; // This is the mobile respawn (and medical) truck.
Respawn_truck_typename = "CUP_B_FV432_GB_Ambulance"; // This is the mobile respawn (and medical) truck.
huron_typename = "CUP_B_CH47F_GB"; // This is Spartan 01, a multipurpose mobile respawn as a helicopter.
crewman_classname = "CUP_B_BAF_Soldier_Crew_DPM"; // This defines the crew for vehicles.
pilot_classname = "CUP_B_BAF_Soldier_Helipilot_DPM"; // This defines the pilot for helicopters.
@ -76,6 +76,7 @@ infantry_units = [
light_vehicles = [
["CUP_B_LR_Transport_GB_W",75,0,50], // Land Rover 110 (Transport) Woodland
["CUP_B_LR_Ambulance_GB_W",75,0,50], // Land Rover 110 (Ambulance) Woodland
["CUP_B_LR_MG_GB_W",75,50,50], // Land Rover 110 (M2) Woodland
["CUP_B_LR_Special_M2_GB_W",100,80,50], // Land Rover 110 (M2 Special) Woodland
["CUP_B_LR_Special_GMG_GB_W",100,100,50], // Land Rover 110 (GMG Special) Woodland
@ -93,6 +94,7 @@ light_vehicles = [
heavy_vehicles = [
["CUP_B_FV432_Bulldog_GB_W",300,100,150], // FV432 Bulldog M240 [Woodland]
["CUP_B_FV432_Bulldog_GB_W_RWS",300,250,150], // FV432 Bulldog M2 RWS [Woodland]
["CUP_B_FV432_Mortar",350,500,150], // FV432 Mortar
["CUP_B_MCV80_GB_W",300,450,275], // MCV-80 Warrior (Woodland)
["CUP_B_MCV80_GB_W_SLAT",400,450,275], // MCV-80 Warrior (SLAT - Woodland)
["CUP_B_FV510_GB_W",350,550,275], // FV510 Warrior (Woodland)
@ -117,8 +119,6 @@ air_vehicles = [
static_vehicles = [
["CUP_B_L111A1_BAF_DPM",25,40,0], // L111A1 Machine Gun
["CUP_B_L111A1_MiniTripod_BAF_DPM",25,40,0], // L111A1 Minitripod
["B_static_AT_F",50,100,0], // Static Titan Launcher (AT)
["B_static_AA_F",50,100,0], // Static Titan Launcher (AA)
["CUP_WV_B_CRAM",500,500,0], // C-RAM
["CUP_WV_B_SS_Launcher",750,500,0], // Mk-29 GMLS
["CUP_WV_B_RAM_Launcher",750,750,0], // Mk-49 GMLS
@ -206,7 +206,7 @@ buildings = [
];
support_vehicles = [
[Arsenal_typename,0,0,0],
[Arsenal_typename,100,200,0],
[Respawn_truck_typename,200,0,100],
[FOB_box_typename,300,500,0],
[FOB_truck_typename,300,500,75],
@ -222,6 +222,7 @@ support_vehicles = [
["ACE_Box_82mm_Mo_Illum",50,10,0],
["ACE_Wheel",10,0,0],
["ACE_Track",10,0,0],
["CUP_B_MK10_GB",100,0,50], // LCU Mk.10
["CUP_B_TowingTractor_GB",50,0,25], // Towing Tractor
["CUP_B_MTVR_Repair_USMC",425,0,75], // MTVR Repair
["CUP_B_MTVR_Refuel_USMC",125,0,375], // MTVR Refuel
@ -324,6 +325,7 @@ blufor_squad_para = [
*/
elite_vehicles = [
"CUP_B_MCV80_GB_W_SLAT", // MCV-80 Warrior (SLAT - Woodland)
"CUP_B_FV432_Mortar", // FV432 Mortar
"CUP_B_FV510_GB_W", // FV510 Warrior (Woodland)
"CUP_B_FV510_GB_W_SLAT", // FV510 Warrior (SLAT - Woodland)
"CUP_B_Challenger2_Woodland_BAF", // FV4034 Challenger 2 (Woodland)

View File

@ -69,6 +69,7 @@ infantry_units = [
];
light_vehicles = [
["CUP_B_S1203_Ambulance_CDF",75,0,50], // Škoda S1203 (Ambulance)
["CUP_B_UAZ_Unarmed_CDF",75,0,50], // UAZ
["CUP_B_UAZ_MG_CDF",100,60,50], // UAZ (DShKM)
["CUP_B_UAZ_AGS30_CDF",100,80,50], // UAZ (AGS-30)
@ -106,6 +107,7 @@ static_vehicles = [
["CUP_B_DSHkM_MiniTripod_CDF",25,40,0], // DShKM Minitripod
["CUP_B_AGS_CDF",25,60,0], // AGS-30
["CUP_B_SPG9_CDF",50,100,0], // SPG-9
["CUP_B_Igla_AA_pod_CDF",100,200,0], // Igla AA Pod
["CUP_B_ZU23_CDF",100,300,0], // ZU-23
["B_Mortar_01_F",80,150,0], // Mk6 Mortar
["CUP_B_2b14_82mm_CDF",80,150,0], // Podnos 2B14
@ -193,7 +195,7 @@ buildings = [
];
support_vehicles = [
[Arsenal_typename,0,0,0],
[Arsenal_typename,100,200,0],
[Respawn_truck_typename,200,0,100],
[FOB_box_typename,300,500,0],
[FOB_truck_typename,300,500,75],

View File

@ -5,7 +5,9 @@
- CUP Units
Optional Mods:
- None
- USAF Main Pack
- USAF Fighters Pack
- USAF Utility Pack
*/
/*
@ -98,16 +100,30 @@ heavy_vehicles = [
];
air_vehicles = [
["CUP_B_AH6M_USA",200,100,100], // AH-6M
["CUP_B_UH60M_Unarmed_FFV_MEV_US",300,0,200], // UH-60M MEDVAC (Unarmed/FFV)
["CUP_B_UH60M_US",300,25,200], // UH-60M
["CUP_B_UH60M_FFV_US",300,50,200], // UH-60M (FFV)
["USAF_C130J",200,0,250], // C-130J Super Hercules
["USAF_C130J_Cargo",200,0,250], // C-130J Super Hercules (Cargo)
["USAF_C17",500,0,400], // C-17 Globemaster III
["usaf_kc135",600,0,2500], // KC-135 Stratotanker
["CUP_B_AH6M_USA",200,100,100], // AH-6M
["CUP_B_MH60L_DAP_2x_US",400,250,225], // MH-60L DAP (2 Stores)
["CUP_B_MH60L_DAP_4x_US",400,500,225], // MH-60L DAP (4 Stores)
["CUP_B_AH64_DL_USA",500,600,300], // AH-64
["CUP_B_AH64D_DL_USA",700,600,200], // AH-64D
["CUP_B_AH6X_USA",300,0,100], // AH-6X Littlebird ULB
["USAF_RQ4A",500,0,200], // RQ-4A Global Hawk
["USAF_MQ9",500,750,200], // MQ-9 Reaper
["CUP_B_A10_DYN_USA",1000,800,400], // A-10A Thunderbolt II
["CUP_B_MH47E_USA",250,100,200] // MH-47E
["USAF_A10",1500,1000,400], // A-10C Thunderbolt II
["USAF_F22",1800,2000,500], // F-22A Raptor
["USAF_F22_EWP_AA",1800,2100,500], // F-22A Raptor (EWP-AA)
["USAF_F22_EWP_AG",1800,2100,500], // F-22A Raptor (EWP-AG)
["USAF_F22_Heavy",1800,2250,500], // F-22A Raptor (Heavy)
["USAF_F35A_STEALTH",2250,2000,750], // F-35A Lightning II
["USAF_F35A",2250,2250,750], // F-35A Lightning II (Heavy)
["CUP_B_AH6X_USA",300,0,100] // AH-6X Littlebird ULB
];
static_vehicles = [
@ -202,7 +218,7 @@ buildings = [
];
support_vehicles = [
[Arsenal_typename,0,0,0],
[Arsenal_typename,100,200,0],
[Respawn_truck_typename,200,0,100],
[FOB_box_typename,300,500,0],
[FOB_truck_typename,300,500,75],
@ -218,6 +234,19 @@ support_vehicles = [
["ACE_Box_82mm_Mo_Illum",50,10,0],
["ACE_Wheel",10,0,0],
["ACE_Track",10,0,0],
["USAF_missileCart_W_AGM114",50,150,0], // Missile Cart (AGM-114)
["USAF_missileCart_AGMMix",50,150,0], // Missile Cart (AGM-65 Mix)
["USAF_missileCart_AGM1",50,150,0], // Missile Cart (AGM-65D)
["USAF_missileCart_AGM2",50,150,0], // Missile Cart (AGM-65E)
["USAF_missileCart_AGM3",50,150,0], // Missile Cart (AGM-65K)
["USAF_missileCart_AA1",50,150,0], // Missile Cart (AIM-9M/AIM-120)
["USAF_missileCart_AA2",50,150,0], // Missile Cart (AIM-9X/AIM-120)
["USAF_missileCart_GBU12_green",50,150,0], // Missile Cart (GBU12 Green)
["USAF_missileCart_GBU12_maritime",50,150,0], // Missile Cart (GBU12 Maritime)
["USAF_missileCart_GBU12",50,150,0], // Missile Cart (GBU12)
["USAF_missileCart_Gbu31",50,150,0], // Missile Cart (GBU31)
["USAF_missileCart_GBU39",50,150,0], // Missile Cart (GBU39)
["USAF_missileCart_Mk82",50,150,0], // Missile Cart (Mk82)
["CUP_B_TowingTractor_USA",50,0,75], // Towing Tractor
["CUP_B_MTVR_Repair_USA",425,0,75], // MTVR Repair
["CUP_B_MTVR_Refuel_USA",125,0,375], // MTVR Refuel
@ -323,6 +352,14 @@ elite_vehicles = [
"CUP_WV_B_SS_Launcher", // Mk-29 GMLS
"CUP_WV_B_RAM_Launcher", // Mk-49 GMLS
"CUP_B_A10_DYN_USA", // A-10A Thunderbolt II
"USAF_MQ9", // MQ-9 Reaper
"USAF_A10", // A-10C Thunderbolt II
"USAF_F22", // F-22A Raptor
"USAF_F22_EWP_AA", // F-22A Raptor (EWP-AA)
"USAF_F22_EWP_AG", // F-22A Raptor (EWP-AG)
"USAF_F22_Heavy", // F-22A Raptor (Heavy)
"USAF_F35A_STEALTH", // F-35A Lightning II
"USAF_F35A", // F-35A Lightning II (Heavy)
"CUP_B_AH64D_DL_USA", // AH-64D
"CUP_B_MH60L_DAP_2x_US", // MH-60L DAP (2 Stores)
"CUP_B_MH60L_DAP_4x_US", // MH-60L DAP (4 Stores)

View File

@ -5,7 +5,9 @@
- CUP Units
Optional Mods:
- None
- USAF Main Pack
- USAF Fighters Pack
- USAF Utility Pack
*/
/*
@ -99,17 +101,31 @@ heavy_vehicles = [
];
air_vehicles = [
["CUP_B_AH6M_USA",200,100,100], // AH-6M
["CUP_B_UH60M_Unarmed_FFV_MEV_US",300,0,200], // UH-60M MEDVAC (Unarmed/FFV)
["CUP_B_UH60M_US",300,25,200], // UH-60M
["CUP_B_UH60M_FFV_US",300,50,200], // UH-60M (FFV)
["USAF_C130J",200,0,250], // C-130J Super Hercules
["USAF_C130J_Cargo",200,0,250], // C-130J Super Hercules (Cargo)
["USAF_C17",500,0,400], // C-17 Globemaster III
["usaf_kc135",600,0,2500], // KC-135 Stratotanker
["CUP_B_AH6M_USA",200,100,100], // AH-6M
["CUP_B_MH60L_DAP_2x_US",400,250,225], // MH-60L DAP (2 Stores)
["CUP_B_MH60L_DAP_4x_US",400,500,225], // MH-60L DAP (4 Stores)
["CUP_B_AH64_DL_USA",500,600,300], // AH-64
["CUP_B_AH64D_DL_USA",700,600,200], // AH-64D
["CUP_B_AH6X_USA",300,0,100], // AH-6X Littlebird ULB
["CUP_B_A10_DYN_USA",1000,800,400], // A-10A Thunderbolt II
["USAF_RQ4A",500,0,200], // RQ-4A Global Hawk
["USAF_MQ9",500,750,200], // MQ-9 Reaper
["CUP_B_AC47_Spooky_USA",600,300,400], // AC-47D Spooky
["CUP_B_MH47E_USA",250,100,200] // MH-47E
["CUP_B_A10_DYN_USA",1000,800,400], // A-10A Thunderbolt II
["USAF_A10",1500,1000,400], // A-10C Thunderbolt II
["USAF_F22",1800,2000,500], // F-22A Raptor
["USAF_F22_EWP_AA",1800,2100,500], // F-22A Raptor (EWP-AA)
["USAF_F22_EWP_AG",1800,2100,500], // F-22A Raptor (EWP-AG)
["USAF_F22_Heavy",1800,2250,500], // F-22A Raptor (Heavy)
["USAF_F35A_STEALTH",2250,2000,750], // F-35A Lightning II
["USAF_F35A",2250,2250,750], // F-35A Lightning II (Heavy)
["CUP_B_AH6X_USA",300,0,100] // AH-6X Littlebird ULB
];
static_vehicles = [
@ -204,7 +220,7 @@ buildings = [
];
support_vehicles = [
[Arsenal_typename,0,0,0],
[Arsenal_typename,100,200,0],
[Respawn_truck_typename,200,0,100],
[FOB_box_typename,300,500,0],
[FOB_truck_typename,300,500,75],
@ -220,6 +236,19 @@ support_vehicles = [
["ACE_Box_82mm_Mo_Illum",50,10,0],
["ACE_Wheel",10,0,0],
["ACE_Track",10,0,0],
["USAF_missileCart_W_AGM114",50,150,0], // Missile Cart (AGM-114)
["USAF_missileCart_AGMMix",50,150,0], // Missile Cart (AGM-65 Mix)
["USAF_missileCart_AGM1",50,150,0], // Missile Cart (AGM-65D)
["USAF_missileCart_AGM2",50,150,0], // Missile Cart (AGM-65E)
["USAF_missileCart_AGM3",50,150,0], // Missile Cart (AGM-65K)
["USAF_missileCart_AA1",50,150,0], // Missile Cart (AIM-9M/AIM-120)
["USAF_missileCart_AA2",50,150,0], // Missile Cart (AIM-9X/AIM-120)
["USAF_missileCart_GBU12_green",50,150,0], // Missile Cart (GBU12 Green)
["USAF_missileCart_GBU12_maritime",50,150,0], // Missile Cart (GBU12 Maritime)
["USAF_missileCart_GBU12",50,150,0], // Missile Cart (GBU12)
["USAF_missileCart_Gbu31",50,150,0], // Missile Cart (GBU31)
["USAF_missileCart_GBU39",50,150,0], // Missile Cart (GBU39)
["USAF_missileCart_Mk82",50,150,0], // Missile Cart (Mk82)
["CUP_B_TowingTractor_USA",50,0,75], // Towing Tractor
["CUP_B_MTVR_Repair_USMC",425,0,75], // MTVR Repair
["CUP_B_MTVR_Refuel_USMC",125,0,375], // MTVR Refuel
@ -325,6 +354,14 @@ elite_vehicles = [
"CUP_WV_B_SS_Launcher", // Mk-29 GMLS
"CUP_WV_B_RAM_Launcher", // Mk-49 GMLS
"CUP_B_A10_DYN_USA", // A-10A Thunderbolt II
"USAF_MQ9", // MQ-9 Reaper
"USAF_A10", // A-10C Thunderbolt II
"USAF_F22", // F-22A Raptor
"USAF_F22_EWP_AA", // F-22A Raptor (EWP-AA)
"USAF_F22_EWP_AG", // F-22A Raptor (EWP-AG)
"USAF_F22_Heavy", // F-22A Raptor (Heavy)
"USAF_F35A_STEALTH", // F-35A Lightning II
"USAF_F35A", // F-35A Lightning II (Heavy)
"CUP_B_AH64D_DL_USA", // AH-64D
"CUP_B_MH60L_DAP_2x_US", // MH-60L DAP (2 Stores)
"CUP_B_MH60L_DAP_4x_US", // MH-60L DAP (4 Stores)

View File

@ -5,7 +5,9 @@
- CUP Units
Optional Mods:
- None
- USAF Main Pack
- USAF Fighters Pack
- USAF Utility Pack
*/
/*
@ -23,7 +25,7 @@ huron_typename = "CUP_B_CH53E_USMC"; // This
crewman_classname = "CUP_B_USMC_Crewman_FROG_DES"; // This defines the crew for vehicles.
pilot_classname = "CUP_B_USMC_Pilot"; // This defines the pilot for helicopters.
KP_liberation_little_bird_classname = "CUP_B_UH1Y_UNA_USMC"; // These are the little birds which spawn on the Freedom or at Chimera base.
KP_liberation_boat_classname = "CUP_B_RHIB2Turret_USMC"; // These are the boats which spawn at the stern of the Freedom.
KP_liberation_boat_classname = "CUP_B_Zodiac_USMC"; // These are the boats which spawn at the stern of the Freedom.
KP_liberation_truck_classname = "CUP_B_MTVR_USA"; // These are the trucks which are used in the logistic convoy system.
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
@ -77,7 +79,9 @@ light_vehicles = [
["CUP_B_RG31_M2_OD_USA",100,50,50], // RG-31 M2
["CUP_B_RG31E_M2_OD_USA",100,50,50], // RG-31 Mk5E M2
["CUP_B_RG31_Mk19_OD_USA",100,80,50], // RG-31 Mk.19
["CUP_B_MTVR_USA",125,0,75] // MTVR
["CUP_B_MTVR_USA",125,0,75], // MTVR
["CUP_B_RHIB_USMC",150,100,100], // RHIB
["CUP_B_RHIB2Turret_USMC",250,200,100] // RHIB (Mk19)
];
heavy_vehicles = [
@ -94,15 +98,28 @@ heavy_vehicles = [
];
air_vehicles = [
["CUP_B_UH1Y_MEV_USMC",200,0,100], // UH-1Y Venom (MEDVAC)
["CUP_B_UH1Y_Gunship_Dynamic_USMC",200,100,100], // UH-1Y Venom (Gunship)
["CUP_B_MH60S_FFV_USMC",250,25,200], // MH-60S Seahawk (FFV)
["CUP_B_UH60S_USN",250,50,200], // MH-60S Seahawk (M3M)
["CUP_B_C130J_USMC",200,0,250], // C-130J
["CUP_B_C130J_Cargo_USMC",200,0,250], // C-130J (VIV)
["USAF_C17",500,0,400], // C-17 Globemaster III
["usaf_kc135",600,0,2500], // KC-135 Stratotanker
["CUP_B_AH1Z_Dynamic_USMC",500,500,200], // AH-1Z
["CUP_B_MH60L_DAP_2x_USN",450,400,250], // MH-60S Knighthawk (ESSS x2)
["USAF_RQ4A",500,0,200], // RQ-4A Global Hawk
["CUP_B_USMC_DYN_MQ9",500,500,200], // MQ-9 Reaper
["CUP_B_AV8B_DYN_USMC",1000,800,400], // AV-8B Harrier II
["CUP_B_F35B_Stealth_USMC",1000,1200,400], // F-35B Lightning II (Stealth)
["CUP_B_F35B_USMC",1500,1750,450], // F-35B Lightning II
["USAF_A10",1500,1000,400], // A-10C Thunderbolt II
["USAF_F22",1800,2000,500], // F-22A Raptor
["USAF_F22_EWP_AA",1800,2100,500], // F-22A Raptor (EWP-AA)
["USAF_F22_EWP_AG",1800,2100,500], // F-22A Raptor (EWP-AG)
["USAF_F22_Heavy",1800,2250,500], // F-22A Raptor (Heavy)
["USAF_F35A_STEALTH",2250,2000,750], // F-35A Lightning II
["USAF_F35A",2250,2250,750], // F-35A Lightning II (Heavy)
["CUP_B_F35B_Stealth_USMC",2500,2000,750], // F-35B Lightning II (Stealth)
["CUP_B_F35B_USMC",2500,2250,750], // F-35B Lightning II
["CUP_B_MV22_USMC_RAMPGUN",750,100,500], // MV-22B Osprey (Ramp Gun)
["CUP_B_MV22_USMC",750,0,500], // MV-22B Osprey
["CUP_B_MV22_VIV_USMC",750,0,500] // MV-22B Osprey (VIV)
@ -200,7 +217,7 @@ buildings = [
];
support_vehicles = [
[Arsenal_typename,0,0,0],
[Arsenal_typename,100,200,0],
[Respawn_truck_typename,200,0,100],
[FOB_box_typename,300,500,0],
[FOB_truck_typename,300,500,75],
@ -216,6 +233,20 @@ support_vehicles = [
["ACE_Box_82mm_Mo_Illum",50,10,0],
["ACE_Wheel",10,0,0],
["ACE_Track",10,0,0],
["USAF_missileCart_W_AGM114",50,150,0], // Missile Cart (AGM-114)
["USAF_missileCart_AGMMix",50,150,0], // Missile Cart (AGM-65 Mix)
["USAF_missileCart_AGM1",50,150,0], // Missile Cart (AGM-65D)
["USAF_missileCart_AGM2",50,150,0], // Missile Cart (AGM-65E)
["USAF_missileCart_AGM3",50,150,0], // Missile Cart (AGM-65K)
["USAF_missileCart_AA1",50,150,0], // Missile Cart (AIM-9M/AIM-120)
["USAF_missileCart_AA2",50,150,0], // Missile Cart (AIM-9X/AIM-120)
["USAF_missileCart_GBU12_green",50,150,0], // Missile Cart (GBU12 Green)
["USAF_missileCart_GBU12_maritime",50,150,0], // Missile Cart (GBU12 Maritime)
["USAF_missileCart_GBU12",50,150,0], // Missile Cart (GBU12)
["USAF_missileCart_Gbu31",50,150,0], // Missile Cart (GBU31)
["USAF_missileCart_GBU39",50,150,0], // Missile Cart (GBU39)
["USAF_missileCart_Mk82",50,150,0], // Missile Cart (Mk82)
["CUP_B_LCU1600_USMC",250,0,175], // LCU-1610
["CUP_B_TowingTractor_USMC",50,0,75], // Towing Tractor
["CUP_B_MTVR_Repair_USA",425,0,75], // MTVR Repair
["CUP_B_MTVR_Refuel_USA",125,0,375], // MTVR Refuel
@ -323,6 +354,13 @@ elite_vehicles = [
"CUP_WV_B_RAM_Launcher", // Mk-49 GMLS
"CUP_B_F35B_Stealth_USMC", // F-35B Lightning II (Stealth)
"CUP_B_AV8B_DYN_USMC", // AV-8B Harrier II
"USAF_A10", // A-10C Thunderbolt II
"USAF_F22", // F-22A Raptor
"USAF_F22_EWP_AA", // F-22A Raptor (EWP-AA)
"USAF_F22_EWP_AG", // F-22A Raptor (EWP-AG)
"USAF_F22_Heavy", // F-22A Raptor (Heavy)
"USAF_F35A_STEALTH", // F-35A Lightning II
"USAF_F35A", // F-35A Lightning II (Heavy)
"CUP_B_AH1Z_Dynamic_USMC", // AH-1Z
"CUP_B_MH60L_DAP_2x_USN", // MH-60S Knighthawk (ESSS x2)
"CUP_B_M1A1_DES_USMC", // M1A1 Abrams (Desert)

View File

@ -5,7 +5,9 @@
- CUP Units
Optional Mods:
- None
- USAF Main Pack
- USAF Fighters Pack
- USAF Utility Pack
*/
/*
@ -23,7 +25,7 @@ huron_typename = "CUP_B_CH53E_USMC"; // This
crewman_classname = "CUP_B_USMC_Crewman_FROG_WDL"; // This defines the crew for vehicles.
pilot_classname = "CUP_B_USMC_Pilot"; // This defines the pilot for helicopters.
KP_liberation_little_bird_classname = "CUP_B_UH1Y_UNA_USMC"; // These are the little birds which spawn on the Freedom or at Chimera base.
KP_liberation_boat_classname = "CUP_B_RHIB2Turret_USMC"; // These are the boats which spawn at the stern of the Freedom.
KP_liberation_boat_classname = "CUP_B_Zodiac_USMC"; // These are the boats which spawn at the stern of the Freedom.
KP_liberation_truck_classname = "CUP_B_MTVR_USMC"; // These are the trucks which are used in the logistic convoy system.
KP_liberation_small_storage_building = "ContainmentArea_02_sand_F"; // A small storage area for resources.
KP_liberation_large_storage_building = "ContainmentArea_01_sand_F"; // A large storage area for resources.
@ -78,7 +80,9 @@ light_vehicles = [
["CUP_B_RG31_M2_OD_USMC",100,50,50], // RG-31 M2
["CUP_B_RG31E_M2_OD_USMC",100,50,50], // RG-31 Mk5E M2
["CUP_B_RG31_Mk19_OD_USMC",100,80,50], // RG-31 Mk.19
["CUP_B_MTVR_USMC",125,0,75] // MTVR
["CUP_B_MTVR_USMC",125,0,75], // MTVR
["CUP_B_RHIB_USMC",150,100,100], // RHIB
["CUP_B_RHIB2Turret_USMC",250,200,100] // RHIB (Mk19)
];
heavy_vehicles = [
@ -95,15 +99,28 @@ heavy_vehicles = [
];
air_vehicles = [
["CUP_B_UH1Y_MEV_USMC",200,0,100], // UH-1Y Venom (MEDVAC)
["CUP_B_UH1Y_Gunship_Dynamic_USMC",200,100,100], // UH-1Y Venom (Gunship)
["CUP_B_MH60S_FFV_USMC",250,25,200], // MH-60S Seahawk (FFV)
["CUP_B_UH60S_USN",250,50,200], // MH-60S Seahawk (M3M)
["USAF_C130J",200,0,250], // C-130J Super Hercules
["USAF_C130J_Cargo",200,0,250], // C-130J Super Hercules (Cargo)
["USAF_C17",500,0,400], // C-17 Globemaster III
["usaf_kc135",600,0,2500], // KC-135 Stratotanker
["CUP_B_AH1Z_Dynamic_USMC",500,500,200], // AH-1Z
["CUP_B_MH60L_DAP_2x_USN",450,400,250], // MH-60S Knighthawk (ESSS x2)
["USAF_RQ4A",500,0,200], // RQ-4A Global Hawk
["CUP_B_USMC_DYN_MQ9",500,500,200], // MQ-9 Reaper
["CUP_B_AV8B_DYN_USMC",1000,800,400], // AV-8B Harrier II
["CUP_B_F35B_Stealth_USMC",1000,1200,400], // F-35B Lightning II (Stealth)
["CUP_B_F35B_USMC",1500,1750,450], // F-35B Lightning II
["USAF_A10",1500,1000,400], // A-10C Thunderbolt II
["USAF_F22",1800,2000,500], // F-22A Raptor
["USAF_F22_EWP_AA",1800,2100,500], // F-22A Raptor (EWP-AA)
["USAF_F22_EWP_AG",1800,2100,500], // F-22A Raptor (EWP-AG)
["USAF_F22_Heavy",1800,2250,500], // F-22A Raptor (Heavy)
["USAF_F35A_STEALTH",2250,2000,750], // F-35A Lightning II
["USAF_F35A",2250,2250,750], // F-35A Lightning II (Heavy)
["CUP_B_F35B_Stealth_USMC",2500,2000,750], // F-35B Lightning II (Stealth)
["CUP_B_F35B_USMC",2500,2250,750], // F-35B Lightning II
["CUP_B_MV22_USMC_RAMPGUN",750,100,500], // MV-22B Osprey (Ramp Gun)
["CUP_B_MV22_USMC",750,0,500], // MV-22B Osprey
["CUP_B_MV22_VIV_USMC",750,0,500] // MV-22B Osprey (VIV)
@ -201,7 +218,7 @@ buildings = [
];
support_vehicles = [
[Arsenal_typename,0,0,0],
[Arsenal_typename,100,200,0],
[Respawn_truck_typename,200,0,100],
[FOB_box_typename,300,500,0],
[FOB_truck_typename,300,500,75],
@ -217,6 +234,20 @@ support_vehicles = [
["ACE_Box_82mm_Mo_Illum",50,10,0],
["ACE_Wheel",10,0,0],
["ACE_Track",10,0,0],
["USAF_missileCart_W_AGM114",50,150,0], // Missile Cart (AGM-114)
["USAF_missileCart_AGMMix",50,150,0], // Missile Cart (AGM-65 Mix)
["USAF_missileCart_AGM1",50,150,0], // Missile Cart (AGM-65D)
["USAF_missileCart_AGM2",50,150,0], // Missile Cart (AGM-65E)
["USAF_missileCart_AGM3",50,150,0], // Missile Cart (AGM-65K)
["USAF_missileCart_AA1",50,150,0], // Missile Cart (AIM-9M/AIM-120)
["USAF_missileCart_AA2",50,150,0], // Missile Cart (AIM-9X/AIM-120)
["USAF_missileCart_GBU12_green",50,150,0], // Missile Cart (GBU12 Green)
["USAF_missileCart_GBU12_maritime",50,150,0], // Missile Cart (GBU12 Maritime)
["USAF_missileCart_GBU12",50,150,0], // Missile Cart (GBU12)
["USAF_missileCart_Gbu31",50,150,0], // Missile Cart (GBU31)
["USAF_missileCart_GBU39",50,150,0], // Missile Cart (GBU39)
["USAF_missileCart_Mk82",50,150,0], // Missile Cart (Mk82)
["CUP_B_LCU1600_USMC",250,0,175], // LCU-1610
["CUP_B_TowingTractor_USMC",50,0,75], // Towing Tractor
["CUP_B_MTVR_Repair_USMC",425,0,75], // MTVR Repair
["CUP_B_MTVR_Refuel_USMC",125,0,375], // MTVR Refuel
@ -324,6 +355,13 @@ elite_vehicles = [
"CUP_WV_B_RAM_Launcher", // Mk-49 GMLS
"CUP_B_F35B_Stealth_USMC", // F-35B Lightning II (Stealth)
"CUP_B_AV8B_DYN_USMC", // AV-8B Harrier II
"USAF_A10", // A-10C Thunderbolt II
"USAF_F22", // F-22A Raptor
"USAF_F22_EWP_AA", // F-22A Raptor (EWP-AA)
"USAF_F22_EWP_AG", // F-22A Raptor (EWP-AG)
"USAF_F22_Heavy", // F-22A Raptor (Heavy)
"USAF_F35A_STEALTH", // F-35A Lightning II
"USAF_F35A", // F-35A Lightning II (Heavy)
"CUP_B_AH1Z_Dynamic_USMC", // AH-1Z
"CUP_B_MH60L_DAP_2x_USN", // MH-60S Knighthawk (ESSS x2)
"CUP_B_M1A1_Woodland_USMC", // M1A1 Abrams (Woodland)

View File

@ -9,6 +9,9 @@
- F/A-18
- CUP Weapons
- CUP Vehicles
- USAF Main Pack
- USAF Fighters Pack
- USAF Utility Pack
*/
/*
@ -169,18 +172,31 @@ air_vehicles = [
["rhsusf_CH53E_USMC",300,0,175], // CH-53E Super Stallion
["rhsusf_CH53E_USMC_GAU21",300,100,175], // CH-53E Super Stallion (GAU-21)
["B_Heli_Transport_03_F",300,80,175], // CH-67 Huron (Armed)
["USAF_C130J",200,0,250], // C-130J Super Hercules
["USAF_C130J_Cargo",200,0,250], // C-130J Super Hercules (Cargo)
["USAF_C17",500,0,400], // C-17 Globemaster III
["usaf_kc135",600,0,2500], // KC-135 Stratotanker
["B_UAV_02_dynamicLoadout_F",400,300,200], // MQ-4A Greyhawk
["B_T_UAV_03_dynamicLoadout_F",450,500,250], // MQ-12 Falcon
["B_UAV_05_F",500,500,200], // UCAV Sentinel
["USAF_RQ4A",500,0,200], // RQ-4A Global Hawk
["USAF_MQ9",500,750,200], // MQ-9 Reaper
["I_Plane_Fighter_03_dynamicLoadout_F",500,400,350], // A-143 Buzzard (AA)
["B_Plane_CAS_01_dynamicLoadout_F",1000,800,400], // A-164 Wipeout (CAS)
["RHS_A10",1000,1000,400], // A-10A (CAS)
["USAF_A10",1500,1000,400], // A-10C Thunderbolt II
["I_Plane_Fighter_04_F",1000,1200,400], // A-149 Gryphon
["FIR_F15C",1250,1250,450], // F-15C Eagle
["FIR_F15D",1250,1250,450], // F-15D Eagle
["FIR_F15E",1250,1500,450], // F-15E Strike Eagle
["JS_JC_FA18E",1500,1750,450], // F/A-18 E Super Hornet
["JS_JC_FA18F",1500,1750,450], // F/A-18 F Super Hornet
["USAF_F22",1800,2000,500], // F-22A Raptor
["USAF_F22_EWP_AA",1800,2100,500], // F-22A Raptor (EWP-AA)
["USAF_F22_EWP_AG",1800,2100,500], // F-22A Raptor (EWP-AG)
["USAF_F22_Heavy",1800,2250,500], // F-22A Raptor (Heavy)
["USAF_F35A_STEALTH",2250,2000,750], // F-35A Lightning II
["USAF_F35A",2250,2250,750], // F-35A Lightning II (Heavy)
["B_Plane_Fighter_01_F",1500,1750,450], // F/A-181 Black Wasp II
["B_Plane_Fighter_01_Stealth_F",1500,1750,450], // F/A-181 Black Wasp II (Stealth)
["B_T_VTOL_01_armed_F",750,1500,500], // V-44 X Blackfish (Armed)
@ -298,6 +314,19 @@ support_vehicles = [
["ACE_Box_82mm_Mo_Illum",50,10,0],
["ACE_Wheel",10,0,0],
["ACE_Track",10,0,0],
["USAF_missileCart_W_AGM114",50,150,0], // Missile Cart (AGM-114)
["USAF_missileCart_AGMMix",50,150,0], // Missile Cart (AGM-65 Mix)
["USAF_missileCart_AGM1",50,150,0], // Missile Cart (AGM-65D)
["USAF_missileCart_AGM2",50,150,0], // Missile Cart (AGM-65E)
["USAF_missileCart_AGM3",50,150,0], // Missile Cart (AGM-65K)
["USAF_missileCart_AA1",50,150,0], // Missile Cart (AIM-9M/AIM-120)
["USAF_missileCart_AA2",50,150,0], // Missile Cart (AIM-9X/AIM-120)
["USAF_missileCart_GBU12_green",50,150,0], // Missile Cart (GBU12 Green)
["USAF_missileCart_GBU12_maritime",50,150,0], // Missile Cart (GBU12 Maritime)
["USAF_missileCart_GBU12",50,150,0], // Missile Cart (GBU12)
["USAF_missileCart_Gbu31",50,150,0], // Missile Cart (GBU31)
["USAF_missileCart_GBU39",50,150,0], // Missile Cart (GBU39)
["USAF_missileCart_Mk82",50,150,0], // Missile Cart (Mk82)
["CUP_B_TowingTractor_NATO",50,0,25], // Towing Tractor
["B_T_APC_Tracked_01_CRV_F",500,250,350], // CRV-6e Bobcat
["B_T_Truck_01_Repair_F",325,0,75], // HEMTT Repair
@ -421,6 +450,14 @@ elite_vehicles = [
"B_Plane_CAS_01_dynamicLoadout_F", // A-164 Wipeout (CAS)
"I_Plane_Fighter_04_F", // A-149 Gryphon
"RHS_A10", // A-10A (CAS)
"USAF_MQ9", // MQ-9 Reaper
"USAF_A10", // A-10C Thunderbolt II
"USAF_F22", // F-22A Raptor
"USAF_F22_EWP_AA", // F-22A Raptor (EWP-AA)
"USAF_F22_EWP_AG", // F-22A Raptor (EWP-AG)
"USAF_F22_Heavy", // F-22A Raptor (Heavy)
"USAF_F35A_STEALTH", // F-35A Lightning II
"USAF_F35A", // F-35A Lightning II (Heavy)
"FIR_F15C", // F-15C Eagle
"FIR_F15D", // F-15D Eagle
"FIR_F15E", // F-15E Strike Eagle

View File

@ -9,6 +9,9 @@
- F/A-18
- CUP Weapons
- CUP Vehicles
- USAF Main Pack
- USAF Fighters Pack
- USAF Utility Pack
*/
/*
@ -175,18 +178,31 @@ air_vehicles = [
["rhsusf_CH53E_USMC",300,0,175], // CH-53E Super Stallion
["rhsusf_CH53E_USMC_GAU21_D",300,100,175], // CH-53E Super Stallion (GAU-21)
["B_Heli_Transport_03_F",300,80,175], // CH-67 Huron (Armed)
["USAF_C130J",200,0,250], // C-130J Super Hercules
["USAF_C130J_Cargo",200,0,250], // C-130J Super Hercules (Cargo)
["USAF_C17",500,0,400], // C-17 Globemaster III
["usaf_kc135",600,0,2500], // KC-135 Stratotanker
["B_UAV_02_dynamicLoadout_F",400,400,200], // MQ-4A Greyhawk
["B_T_UAV_03_dynamicLoadout_F",450,500,250], // MQ-12 Falcon
["B_UAV_05_F",500,500,200], // UCAV Sentinel
["USAF_RQ4A",500,0,200], // RQ-4A Global Hawk
["USAF_MQ9",500,750,200], // MQ-9 Reaper
["I_Plane_Fighter_03_dynamicLoadout_F",500,400,350], // A-143 Buzzard
["B_Plane_CAS_01_dynamicLoadout_F",1000,800,400], // A-164 Wipeout (CAS)
["RHS_A10",1000,1000,400], // A-10A (CAS)
["USAF_A10",1500,1000,400], // A-10C Thunderbolt II
["I_Plane_Fighter_04_F",1000,1200,400], // A-149 Gryphon
["FIR_F15C",1250,1250,450], // F-15C Eagle
["FIR_F15D",1250,1250,450], // F-15D Eagle
["FIR_F15E",1250,1500,450], // F-15E Strike Eagle
["JS_JC_FA18E",1500,1750,450], // F/A-18 E Super Hornet
["JS_JC_FA18F",1500,1750,450], // F/A-18 F Super Hornet
["USAF_F22",1800,2000,500], // F-22A Raptor
["USAF_F22_EWP_AA",1800,2100,500], // F-22A Raptor (EWP-AA)
["USAF_F22_EWP_AG",1800,2100,500], // F-22A Raptor (EWP-AG)
["USAF_F22_Heavy",1800,2250,500], // F-22A Raptor (Heavy)
["USAF_F35A_STEALTH",2250,2000,750], // F-35A Lightning II
["USAF_F35A",2250,2250,750], // F-35A Lightning II (Heavy)
["B_Plane_Fighter_01_F",1500,1750,450], // F/A-181 Black Wasp II
["B_Plane_Fighter_01_Stealth_F",1500,1750,450], // F/A-181 Black Wasp II (Stealth)
["B_T_VTOL_01_armed_F",750,1500,500], // V-44 X Blackfish (Armed)
@ -304,6 +320,19 @@ support_vehicles = [
["ACE_Box_82mm_Mo_Illum",50,10,0],
["ACE_Wheel",10,0,0],
["ACE_Track",10,0,0],
["USAF_missileCart_W_AGM114",50,150,0], // Missile Cart (AGM-114)
["USAF_missileCart_AGMMix",50,150,0], // Missile Cart (AGM-65 Mix)
["USAF_missileCart_AGM1",50,150,0], // Missile Cart (AGM-65D)
["USAF_missileCart_AGM2",50,150,0], // Missile Cart (AGM-65E)
["USAF_missileCart_AGM3",50,150,0], // Missile Cart (AGM-65K)
["USAF_missileCart_AA1",50,150,0], // Missile Cart (AIM-9M/AIM-120)
["USAF_missileCart_AA2",50,150,0], // Missile Cart (AIM-9X/AIM-120)
["USAF_missileCart_GBU12_green",50,150,0], // Missile Cart (GBU12 Green)
["USAF_missileCart_GBU12_maritime",50,150,0], // Missile Cart (GBU12 Maritime)
["USAF_missileCart_GBU12",50,150,0], // Missile Cart (GBU12)
["USAF_missileCart_Gbu31",50,150,0], // Missile Cart (GBU31)
["USAF_missileCart_GBU39",50,150,0], // Missile Cart (GBU39)
["USAF_missileCart_Mk82",50,150,0], // Missile Cart (Mk82)
["CUP_B_TowingTractor_NATO",50,0,25], // Towing Tractor
["B_APC_Tracked_01_CRV_F",500,250,350], // CRV-6e Bobcat
["B_Truck_01_Repair_F",325,0,75], // HEMTT Repair
@ -426,6 +455,14 @@ elite_vehicles = [
"B_Plane_CAS_01_dynamicLoadout_F", // A-164 Wipeout (CAS)
"I_Plane_Fighter_04_F", // A-149 Gryphon
"RHS_A10", // A-10A (CAS)
"USAF_MQ9", // MQ-9 Reaper
"USAF_A10", // A-10C Thunderbolt II
"USAF_F22", // F-22A Raptor
"USAF_F22_EWP_AA", // F-22A Raptor (EWP-AA)
"USAF_F22_EWP_AG", // F-22A Raptor (EWP-AG)
"USAF_F22_Heavy", // F-22A Raptor (Heavy)
"USAF_F35A_STEALTH", // F-35A Lightning II
"USAF_F35A", // F-35A Lightning II (Heavy)
"FIR_F15C", // F-15C Eagle
"FIR_F15D", // F-15D Eagle
"FIR_F15E", // F-15E Strike Eagle

View File

@ -5,6 +5,9 @@
Optional Mods:
- F-15C
- F/A-18
- USAF Main Pack
- USAF Fighters Pack
- USAF Utility Pack
*/
/*
@ -136,15 +139,28 @@ air_vehicles = [
["RHS_CH_47F_10",275,80,175], // CH-47 Chinook (Armed)
["rhsusf_CH53E_USMC_D",300,0,175], // CH-53E Super Stallion
["rhsusf_CH53E_USMC_GAU21_D",300,100,175], // CH-53E Super Stallion (GAU-21)
["USAF_C130J",200,0,250], // C-130J Super Hercules
["USAF_C130J_Cargo",200,0,250], // C-130J Super Hercules (Cargo)
["USAF_C17",500,0,400], // C-17 Globemaster III
["usaf_kc135",600,0,2500], // KC-135 Stratotanker
["B_UAV_02_dynamicLoadout_F",400,300,200], // MQ-4A Greyhawk
["B_T_UAV_03_dynamicLoadout_F",450,500,250], // MQ-12 Falcon
["B_UAV_05_F",500,500,200], // UCAV Sentinel
["USAF_RQ4A",500,0,200], // RQ-4A Global Hawk
["USAF_MQ9",500,750,200], // MQ-9 Reaper
["RHS_A10",1000,1000,400], // A-10A (CAS)
["USAF_A10",1500,1000,400], // A-10C Thunderbolt II
["FIR_F15C",1250,1250,450], // F-15C Eagle
["FIR_F15D",1250,1250,450], // F-15D Eagle
["FIR_F15E",1250,1500,450], // F-15E Strike Eagle
["JS_JC_FA18E",1500,1750,450], // F/A-18 E Super Hornet
["JS_JC_FA18F",1500,1750,450], // F/A-18 F Super Hornet
["USAF_F22",1800,2000,500], // F-22A Raptor
["USAF_F22_EWP_AA",1800,2100,500], // F-22A Raptor (EWP-AA)
["USAF_F22_EWP_AG",1800,2100,500], // F-22A Raptor (EWP-AG)
["USAF_F22_Heavy",1800,2250,500], // F-22A Raptor (Heavy)
["USAF_F35A_STEALTH",2250,2000,750], // F-35A Lightning II
["USAF_F35A",2250,2250,750], // F-35A Lightning II (Heavy)
["B_Plane_Fighter_01_F",1500,1750,450], // F/A-181 Black Wasp II
["B_Plane_Fighter_01_Stealth_F",1500,1750,450], // F/A-181 Black Wasp II (Stealth)
["B_T_VTOL_01_armed_F",750,1500,500], // V-44 X Blackfish (Armed)
@ -259,6 +275,19 @@ support_vehicles = [
["ACE_Box_82mm_Mo_Illum",50,10,0],
["ACE_Wheel",10,0,0],
["ACE_Track",10,0,0],
["USAF_missileCart_W_AGM114",50,150,0], // Missile Cart (AGM-114)
["USAF_missileCart_AGMMix",50,150,0], // Missile Cart (AGM-65 Mix)
["USAF_missileCart_AGM1",50,150,0], // Missile Cart (AGM-65D)
["USAF_missileCart_AGM2",50,150,0], // Missile Cart (AGM-65E)
["USAF_missileCart_AGM3",50,150,0], // Missile Cart (AGM-65K)
["USAF_missileCart_AA1",50,150,0], // Missile Cart (AIM-9M/AIM-120)
["USAF_missileCart_AA2",50,150,0], // Missile Cart (AIM-9X/AIM-120)
["USAF_missileCart_GBU12_green",50,150,0], // Missile Cart (GBU12 Green)
["USAF_missileCart_GBU12_maritime",50,150,0], // Missile Cart (GBU12 Maritime)
["USAF_missileCart_GBU12",50,150,0], // Missile Cart (GBU12)
["USAF_missileCart_Gbu31",50,150,0], // Missile Cart (GBU31)
["USAF_missileCart_GBU39",50,150,0], // Missile Cart (GBU39)
["USAF_missileCart_Mk82",50,150,0], // Missile Cart (Mk82)
["B_APC_Tracked_01_CRV_F",500,250,350], // CRV-6e Bobcat
["rhsusf_M1239_M2_Deploy_socom_d",450,200,300], // M1239 AUV (Deploy, M2)
["rhsusf_M1239_MK19_Deploy_socom_d",450,250,300], // M1239 AUV (Deploy, Mk19)
@ -371,6 +400,14 @@ elite_vehicles = [
"B_UAV_02_dynamicLoadout_F", // MQ-4A Greyhawk
"B_T_UAV_03_dynamicLoadout_F", // MQ-12 Falcon
"B_UAV_05_F", // UCAV Sentinel
"USAF_MQ9", // MQ-9 Reaper
"USAF_A10", // A-10C Thunderbolt II
"USAF_F22", // F-22A Raptor
"USAF_F22_EWP_AA", // F-22A Raptor (EWP-AA)
"USAF_F22_EWP_AG", // F-22A Raptor (EWP-AG)
"USAF_F22_Heavy", // F-22A Raptor (Heavy)
"USAF_F35A_STEALTH", // F-35A Lightning II
"USAF_F35A", // F-35A Lightning II (Heavy)
"RHS_A10", // A-10A (CAS)
"FIR_F15C", // F-15C Eagle
"FIR_F15D", // F-15D Eagle

View File

@ -5,6 +5,9 @@
Optional Mods:
- F-15C
- F/A-18
- USAF Main Pack
- USAF Fighters Pack
- USAF Utility Pack
*/
/*
@ -129,15 +132,28 @@ air_vehicles = [
["RHS_CH_47F_10",275,80,175], // CH-47 Chinook (Armed)
["rhsusf_CH53E_USMC",300,0,175], // CH-53E Super Stallion
["rhsusf_CH53E_USMC_GAU21",300,100,175], // CH-53E Super Stallion (GAU-21)
["USAF_C130J",200,0,250], // C-130J Super Hercules
["USAF_C130J_Cargo",200,0,250], // C-130J Super Hercules (Cargo)
["USAF_C17",500,0,400], // C-17 Globemaster III
["usaf_kc135",600,0,2500], // KC-135 Stratotanker
["B_UAV_02_dynamicLoadout_F",400,300,200], // MQ-4A Greyhawk
["B_T_UAV_03_dynamicLoadout_F",450,500,250], // MQ-12 Falcon
["B_UAV_05_F",500,500,200], // UCAV Sentinel
["USAF_RQ4A",500,0,200], // RQ-4A Global Hawk
["USAF_MQ9",500,750,200], // MQ-9 Reaper
["RHS_A10",1000,1000,400], // A-10A (CAS)
["USAF_A10",1500,1000,400], // A-10C Thunderbolt II
["FIR_F15C",1250,1250,450], // F-15C Eagle
["FIR_F15D",1250,1250,450], // F-15D Eagle
["FIR_F15E",1250,1500,450], // F-15E Strike Eagle
["JS_JC_FA18E",1500,1750,450], // F/A-18 E Super Hornet
["JS_JC_FA18F",1500,1750,450], // F/A-18 F Super Hornet
["USAF_F22",1800,2000,500], // F-22A Raptor
["USAF_F22_EWP_AA",1800,2100,500], // F-22A Raptor (EWP-AA)
["USAF_F22_EWP_AG",1800,2100,500], // F-22A Raptor (EWP-AG)
["USAF_F22_Heavy",1800,2250,500], // F-22A Raptor (Heavy)
["USAF_F35A_STEALTH",2250,2000,750], // F-35A Lightning II
["USAF_F35A",2250,2250,750], // F-35A Lightning II (Heavy)
["B_Plane_Fighter_01_F",1500,1750,450], // F/A-181 Black Wasp II
["B_Plane_Fighter_01_Stealth_F",1500,1750,450], // F/A-181 Black Wasp II (Stealth)
["B_T_VTOL_01_armed_F",750,1500,500], // V-44 X Blackfish (Armed)
@ -252,6 +268,19 @@ support_vehicles = [
["ACE_Box_82mm_Mo_Illum",50,10,0],
["ACE_Wheel",10,0,0],
["ACE_Track",10,0,0],
["USAF_missileCart_W_AGM114",50,150,0], // Missile Cart (AGM-114)
["USAF_missileCart_AGMMix",50,150,0], // Missile Cart (AGM-65 Mix)
["USAF_missileCart_AGM1",50,150,0], // Missile Cart (AGM-65D)
["USAF_missileCart_AGM2",50,150,0], // Missile Cart (AGM-65E)
["USAF_missileCart_AGM3",50,150,0], // Missile Cart (AGM-65K)
["USAF_missileCart_AA1",50,150,0], // Missile Cart (AIM-9M/AIM-120)
["USAF_missileCart_AA2",50,150,0], // Missile Cart (AIM-9X/AIM-120)
["USAF_missileCart_GBU12_green",50,150,0], // Missile Cart (GBU12 Green)
["USAF_missileCart_GBU12_maritime",50,150,0], // Missile Cart (GBU12 Maritime)
["USAF_missileCart_GBU12",50,150,0], // Missile Cart (GBU12)
["USAF_missileCart_Gbu31",50,150,0], // Missile Cart (GBU31)
["USAF_missileCart_GBU39",50,150,0], // Missile Cart (GBU39)
["USAF_missileCart_Mk82",50,150,0], // Missile Cart (Mk82)
["B_APC_Tracked_01_CRV_F",500,250,350], // CRV-6e Bobcat
["rhsusf_M977A4_REPAIR_BKIT_usarmy_wd",325,0,75], // M977A4 Repair
["rhsusf_M978A4_BKIT_usarmy_wd",125,0,275], // M978A4 Fuel
@ -361,6 +390,14 @@ elite_vehicles = [
"B_UAV_02_dynamicLoadout_F", // MQ-4A Greyhawk
"B_T_UAV_03_dynamicLoadout_F", // MQ-12 Falcon
"B_UAV_05_F", // UCAV Sentinel
"USAF_MQ9", // MQ-9 Reaper
"USAF_A10", // A-10C Thunderbolt II
"USAF_F22", // F-22A Raptor
"USAF_F22_EWP_AA", // F-22A Raptor (EWP-AA)
"USAF_F22_EWP_AG", // F-22A Raptor (EWP-AG)
"USAF_F22_Heavy", // F-22A Raptor (Heavy)
"USAF_F35A_STEALTH", // F-35A Lightning II
"USAF_F35A", // F-35A Lightning II (Heavy)
"RHS_A10", // A-10A (CAS)
"FIR_F15C", // F-15C Eagle
"FIR_F15D", // F-15D Eagle

View File

@ -1,3 +1,9 @@
if (isServer) then {
diag_log format ["[KP LIBERATION] [PRESETS] ----- Server starts preset initialization - time: %1", diag_ticktime];
diag_log "[KP LIBERATION] [PRESETS] Not found vehicles listed below are not an issue in general. It just sorts out vehicles from not loaded mods.";
diag_log "[KP LIBERATION] [PRESETS] Only if you e.g. use a CUP preset and you get messages about missing CUP classes, then check your loaded mods.";
};
switch (KP_liberation_preset_blufor) do {
case 1: {[] call compileFinal preprocessFileLineNumbers "presets\blufor\apex.sqf";};
case 2: {[] call compileFinal preprocessFileLineNumbers "presets\blufor\3cbBAF_mtp.sqf";};
@ -140,12 +146,12 @@ GRLIB_ignore_colisions_when_building = [
/* !!! DO NOT EDIT BELOW !!! */
// Preset arrays
infantry_units = [infantry_units] call F_filterMods;
light_vehicles = [light_vehicles] call F_filterMods;
heavy_vehicles = [heavy_vehicles] call F_filterMods;
air_vehicles = [air_vehicles] call F_filterMods;
support_vehicles = [support_vehicles] call F_filterMods;
static_vehicles = [static_vehicles] call F_filterMods;
infantry_units = infantry_units select {[( _x select 0)] call KPLIB_fnc_checkClass};
light_vehicles = light_vehicles select {[( _x select 0)] call KPLIB_fnc_checkClass};
heavy_vehicles = heavy_vehicles select {[( _x select 0)] call KPLIB_fnc_checkClass};
air_vehicles = air_vehicles select {[( _x select 0)] call KPLIB_fnc_checkClass};
support_vehicles = support_vehicles select {[( _x select 0)] call KPLIB_fnc_checkClass};
static_vehicles = static_vehicles select {[( _x select 0)] call KPLIB_fnc_checkClass};
// Preset classes arrays
light_vehicles_classes = light_vehicles apply {toLower (_x select 0)};
heavy_vehicles_classes = heavy_vehicles apply {toLower (_x select 0)};
@ -160,23 +166,23 @@ air_vehicles_classes = air_vehicles apply {toLower (_x select 0)};
};
} forEach support_vehicles + [huron_typename];
buildings = [buildings] call F_filterMods;
buildings = buildings select {[( _x select 0)] call KPLIB_fnc_checkClass};
build_lists = [[],infantry_units,light_vehicles,heavy_vehicles,air_vehicles,static_vehicles,buildings,support_vehicles,squads];
KP_liberation_storage_buildings = [KP_liberation_small_storage_building,KP_liberation_large_storage_building];
KP_liberation_crates = [KP_liberation_supply_crate,KP_liberation_ammo_crate,KP_liberation_fuel_crate];
KP_liberation_upgrade_buildings = [KP_liberation_recycle_building,KP_liberation_air_vehicle_building,KP_liberation_heli_slot_building,KP_liberation_plane_slot_building];
KP_liberation_air_slots = [KP_liberation_heli_slot_building,KP_liberation_plane_slot_building];
militia_squad = militia_squad select {[_x] call F_checkClass};
militia_vehicles = militia_vehicles select {[_x] call F_checkClass};
opfor_vehicles = opfor_vehicles select {[_x] call F_checkClass};
opfor_vehicles_low_intensity = opfor_vehicles_low_intensity select {[_x] call F_checkClass};
opfor_battlegroup_vehicles = opfor_battlegroup_vehicles select {[_x] call F_checkClass};
opfor_battlegroup_vehicles_low_intensity = opfor_battlegroup_vehicles_low_intensity select {[_x] call F_checkClass};
opfor_troup_transports = opfor_troup_transports select {[_x] call F_checkClass};
opfor_choppers = opfor_choppers select {[_x] call F_checkClass};
opfor_air = opfor_air select {[_x] call F_checkClass};
civilians = civilians select {[_x] call F_checkClass};
civilian_vehicles = civilian_vehicles select {[_x] call F_checkClass};
militia_squad = militia_squad select {[_x] call KPLIB_fnc_checkClass};
militia_vehicles = militia_vehicles select {[_x] call KPLIB_fnc_checkClass};
opfor_vehicles = opfor_vehicles select {[_x] call KPLIB_fnc_checkClass};
opfor_vehicles_low_intensity = opfor_vehicles_low_intensity select {[_x] call KPLIB_fnc_checkClass};
opfor_battlegroup_vehicles = opfor_battlegroup_vehicles select {[_x] call KPLIB_fnc_checkClass};
opfor_battlegroup_vehicles_low_intensity = opfor_battlegroup_vehicles_low_intensity select {[_x] call KPLIB_fnc_checkClass};
opfor_troup_transports = opfor_troup_transports select {[_x] call KPLIB_fnc_checkClass};
opfor_choppers = opfor_choppers select {[_x] call KPLIB_fnc_checkClass};
opfor_air = opfor_air select {[_x] call KPLIB_fnc_checkClass};
civilians = civilians select {[_x] call KPLIB_fnc_checkClass};
civilian_vehicles = civilian_vehicles select {[_x] call KPLIB_fnc_checkClass};
military_alphabet = ["Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike","November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-Ray","Yankee","Zulu"];
land_vehicles_classnames = (opfor_vehicles + militia_vehicles);
opfor_squad_8_standard = [opfor_squad_leader,opfor_team_leader,opfor_machinegunner,opfor_heavygunner,opfor_medic,opfor_marksman,opfor_grenadier,opfor_rpg];
@ -191,7 +197,7 @@ all_hostile_classnames = (land_vehicles_classnames + opfor_air + opfor_choppers
air_vehicles_classnames = [] + opfor_choppers;
KP_liberation_friendly_air_classnames = [];
{air_vehicles_classnames pushback (_x select 0); KP_liberation_friendly_air_classnames pushback (_x select 0);} foreach air_vehicles;
KP_liberation_friendly_air_classnames = KP_liberation_friendly_air_classnames select {!(_x call F_isClassUAV)};
KP_liberation_friendly_air_classnames = KP_liberation_friendly_air_classnames select {!(_x call KPLIB_fnc_isClassUAV)};
KP_liberation_static_classnames = [];
{KP_liberation_static_classnames pushback (_x select 0);} forEach static_vehicles;
ai_resupply_sources = ai_resupply_sources + [Respawn_truck_typename, huron_typename, Arsenal_typename];
@ -200,10 +206,12 @@ zeropos = [0,0,0];
squads_names = [localize "STR_LIGHT_RIFLE_SQUAD", localize "STR_RIFLE_SQUAD", localize "STR_AT_SQUAD", localize "STR_AA_SQUAD", localize "STR_RECON_SQUAD", localize "STR_PARA_SQUAD"];
ammobox_transports_typenames = [];
{ammobox_transports_typenames pushback (_x select 0)} foreach box_transport_config;
ammobox_transports_typenames = ammobox_transports_typenames select {[_x] call F_checkClass};
elite_vehicles = elite_vehicles select {[_x] call F_checkClass};
ammobox_transports_typenames = ammobox_transports_typenames select {[_x] call KPLIB_fnc_checkClass};
elite_vehicles = elite_vehicles select {[_x] call KPLIB_fnc_checkClass};
opfor_infantry = [opfor_sentry,opfor_rifleman,opfor_grenadier,opfor_squad_leader,opfor_team_leader,opfor_marksman,opfor_machinegunner,opfor_heavygunner,opfor_medic,opfor_rpg,opfor_at,opfor_aa,opfor_officer,opfor_sharpshooter,opfor_sniper,opfor_engineer];
GRLIB_intel_file = "Land_File1_F";
GRLIB_intel_laptop = "Land_Laptop_device_F";
GRLIB_sar_wreck = "Land_Wreck_Heli_Attack_01_F";
GRLIB_sar_fire = "test_EmptyObjectForFireBig";
if (isServer) then {diag_log format ["[KP LIBERATION] [PRESETS] ----- Server finished preset initialization - time: %1", diag_ticktime];};

View File

@ -33,12 +33,19 @@ waitUntil {!isNil "one_eco_done"};
waitUntil {one_synchro_done};
waitUntil {one_eco_done};
private _nearfob = [] call KPLIB_fnc_getNearestFob;
private _fobdistance = 9999;
private _nearest_sector = [GRLIB_fob_range] call KPLIB_fnc_getNearestSector;
private _prod_sector = [];
private _directAccess = (getPlayerUID player) in KP_liberation_commander_actions || {player == ([] call KPLIB_fnc_getCommander)} || {serverCommandAvailable "#kick"};
while {true} do {
private _nearfob = [] call F_getNearestFob;
private _fobdistance = 9999;
private _nearest_sector = [GRLIB_fob_range] call F_getNearestSector;
private _prod_sector = [];
_nearfob = [] call KPLIB_fnc_getNearestFob;
_fobdistance = 9999;
_nearest_sector = [GRLIB_fob_range] call KPLIB_fnc_getNearestSector;
_prod_sector = [];
{
if ((_x select 1) == _nearest_sector) exitWith {_prod_sector = _x};
} forEach KP_liberation_production;
@ -123,7 +130,7 @@ while {true} do {
};
};
if (_fobdistance < _distfob && alive player && vehicle player == player && (([ player, 3] call F_fetchPermission) || (player == ([] call F_getCommander) || [] call F_isAdmin))) then {
if (_fobdistance < _distfob && alive player && vehicle player == player && (([3] call KPLIB_fnc_hasPermission) || _directAccess)) then {
if (_idact_build == -1) then {
_idact_build = player addAction ["<t color='#FFFF00'>" + localize "STR_BUILD_ACTION" + "</t> <img size='2' image='res\ui_build.paa'/>","scripts\client\build\open_build_menu.sqf","",-985,false,true,"","build_confirmed == 0"];
};
@ -134,7 +141,7 @@ while {true} do {
};
};
if ((count _nearfobbox != 0) && (alive player) && (vehicle player == player) && !(surfaceIsWater getpos player) && ((player distance startbase) > 1000) && (([player, 3] call F_fetchPermission) || (player == ([] call F_getCommander) || [] call F_isAdmin)) && !FOB_build_in_progress) then {
if ((count _nearfobbox != 0) && (alive player) && (vehicle player == player) && !(surfaceIsWater getpos player) && ((player distance startbase) > 1000) && (([3] call KPLIB_fnc_hasPermission) || _directAccess) && !FOB_build_in_progress) then {
if (_idact_buildfob == -1) then {
_idact_buildfob = player addAction ["<t color='#FFFF00'>" + localize "STR_FOB_ACTION" + "</t> <img size='2' image='res\ui_deployfob.paa'/>","scripts\client\build\do_build_fob.sqf","",-990,false,true,"","build_confirmed == 0"];
};
@ -145,7 +152,7 @@ while {true} do {
};
};
if (_fobdistance < _distredeploy && alive player && vehicle player == player && (player == ([] call F_getCommander) || [] call F_isAdmin)) then {
if (_fobdistance < _distredeploy && alive player && vehicle player == player && _directAccess) then {
if (_idact_repackage == -1) then {
_idact_repackage = player addAction ["<t color='#FFFF00'>" + localize "STR_FOB_REPACKAGE" + "</t> <img size='2' image='res\ui_deployfob.paa'/>","scripts\client\actions\do_repackage_fob.sqf","",-991,false,true,"","build_confirmed == 0"];
};
@ -156,7 +163,7 @@ while {true} do {
};
};
if ((count GRLIB_all_fobs > 0) && (GRLIB_endgame == 0) && (_fobdistance < _distredeploy || (player distance startbase) < 200) && alive player && vehicle player == player && (([player, 5] call F_fetchPermission) || (player == ([] call F_getCommander) || [] call F_isAdmin))) then {
if ((count GRLIB_all_fobs > 0) && (GRLIB_endgame == 0) && (_fobdistance < _distredeploy || (player distance startbase) < 200) && alive player && vehicle player == player && (([5] call KPLIB_fnc_hasPermission) || _directAccess)) then {
if (_idact_secondary == -1) then {
_idact_secondary = player addAction ["<t color='#FFFF00'>" + localize "STR_SECONDARY_OBJECTIVES" + "</t>","scripts\client\ui\secondary_ui.sqf","",-992,false,true,"","build_confirmed == 0"];
};
@ -168,7 +175,7 @@ while {true} do {
};
if ((count _prod_sector) == 12) then {
if (alive player && vehicle player == player && ([player, 3] call F_fetchPermission) && ((count (_prod_sector select 3)) == 0)) then {
if (alive player && vehicle player == player && ([3] call KPLIB_fnc_hasPermission || _directAccess) && ((count (_prod_sector select 3)) == 0)) then {
if (_idact_sectorstorage == -1) then {
_idact_sectorstorage = player addAction ["<t color='#FFFF00'>" + localize "STR_SECSTORAGEBUILD_ACTION" + "</t>","scripts\client\build\do_sector_build.sqf",[KP_liberation_small_storage_building, _prod_sector],-993,false,true,"","build_confirmed == 0"];
};
@ -178,7 +185,7 @@ while {true} do {
_idact_sectorstorage = -1;
};
};
if (alive player && vehicle player == player && ([player, 3] call F_fetchPermission) && ((count (_prod_sector select 3)) == 3) && !(_prod_sector select 4)) then {
if (alive player && vehicle player == player && ([3] call KPLIB_fnc_hasPermission || _directAccess) && ((count (_prod_sector select 3)) == 3) && !(_prod_sector select 4)) then {
if (_idact_supplyfacility == -1) then {
_idact_supplyfacility = player addAction ["<t color='#FFFF00'>" + localize "STR_SECSUPPLYBUILD_ACTION" + "</t>","scripts\client\build\do_sector_build.sqf",["supply", _prod_sector],-994,false,true,"","build_confirmed == 0"];
};
@ -188,7 +195,7 @@ while {true} do {
_idact_supplyfacility = -1;
};
};
if (alive player && vehicle player == player && ([player, 3] call F_fetchPermission) && ((count (_prod_sector select 3)) == 3) && !(_prod_sector select 5)) then {
if (alive player && vehicle player == player && ([3] call KPLIB_fnc_hasPermission || _directAccess) && ((count (_prod_sector select 3)) == 3) && !(_prod_sector select 5)) then {
if (_idact_ammofacility == -1) then {
_idact_ammofacility = player addAction ["<t color='#FFFF00'>" + localize "STR_SECAMMOBUILD_ACTION" + "</t>","scripts\client\build\do_sector_build.sqf",["ammo", _prod_sector],-995,false,true,"","build_confirmed == 0"];
};
@ -198,7 +205,7 @@ while {true} do {
_idact_ammofacility = -1;
};
};
if (alive player && vehicle player == player && ([player, 3] call F_fetchPermission) && ((count (_prod_sector select 3)) == 3) && !(_prod_sector select 6)) then {
if (alive player && vehicle player == player && ([3] call KPLIB_fnc_hasPermission || _directAccess) && ((count (_prod_sector select 3)) == 3) && !(_prod_sector select 6)) then {
if (_idact_fuelfacility == -1) then {
_idact_fuelfacility = player addAction ["<t color='#FFFF00'>" + localize "STR_SECFUELBUILD_ACTION" + "</t>","scripts\client\build\do_sector_build.sqf",["fuel", _prod_sector],-996,false,true,"","build_confirmed == 0"];
};
@ -238,7 +245,7 @@ while {true} do {
};
};
if (((_fobdistance < _distfob) || ((count _prod_sector) == 12)) && (player == ([] call F_getCommander) || [] call F_isAdmin) && alive player && vehicle player == player && ((count KP_liberation_production) > 0)) then {
if (((_fobdistance < _distfob) || ((count _prod_sector) == 12)) && _directAccess && alive player && vehicle player == player && ((count KP_liberation_production) > 0)) then {
if (_idact_production == -1) then {
_idact_production = player addAction ["<t color='#FF8000'>" + localize "STR_PRODUCTION_ACTION" + "</t>","scripts\client\commander\open_production.sqf","",-998,false,true,"","build_confirmed == 0"];
};
@ -250,7 +257,7 @@ while {true} do {
};
if (KP_liberation_ailogistics) then {
if ((_fobdistance < _distfob) && (player == ([] call F_getCommander) || [] call F_isAdmin) && alive player && vehicle player == player && (((count GRLIB_all_fobs) + (count KP_liberation_production)) > 1)) then {
if ((_fobdistance < _distfob) && _directAccess && alive player && vehicle player == player && (((count GRLIB_all_fobs) + (count KP_liberation_production)) > 1)) then {
if (_idact_logistic == -1) then {
_idact_logistic = player addAction ["<t color='#FF8000'>" + localize "STR_LOGISTIC_ACTION" + "</t>","scripts\client\commander\open_logistic.sqf","",-999,false,true,"","build_confirmed == 0"];
};
@ -262,7 +269,7 @@ while {true} do {
};
};
if ((player == ([] call F_getCommander) || [] call F_isAdmin) && alive player && vehicle player == player && GRLIB_permissions_param) then {
if (_directAccess && alive player && vehicle player == player && GRLIB_permissions_param) then {
if (_idact_commander == -1) then {
_idact_commander = player addAction ["<t color='#FF8000'>" + localize "STR_COMMANDER_ACTION" + "</t> <img size='2' image='\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa'/>","scripts\client\commander\open_permissions.sqf","",-1001,false,true,"","build_confirmed == 0"];
};
@ -284,11 +291,11 @@ while {true} do {
};
};
if (_fobdistance < _distfob && alive player && vehicle player == player && (player == ([] call F_getCommander) || [] call F_isAdmin)) then {
if (_fobdistance < _distfob && alive player && vehicle player == player && _directAccess) then {
if (_idact_clearance == -1) then {
_idact_clearance = player addAction [
"<t color='#FFFF00'>" + localize "STR_CLEARANCE_ACTION" + "</t>",
{[_this select 3 select 0, _this select 3 select 1, true] remoteExecCall ["F_createClearance", 2];},
{[_this select 3 select 0, _this select 3 select 1, true] remoteExecCall ["KPLIB_fnc_createClearance", 2];},
[_nearFob, GRLIB_fob_range * 0.9], -1003, false, true, "", "build_confirmed == 0"
];
};

View File

@ -84,7 +84,7 @@ if (_vehtorecycle getVariable ["KP_liberation_preplaced", false]) exitWith {hint
if ( dorecycle == 1 && !(isnull _vehtorecycle) && alive _vehtorecycle) then {
_nearfob = [] call F_getNearestFob;
_nearfob = [] call KPLIB_fnc_getNearestFob;
if (!(KP_liberation_recycle_building_near) && ((_price_s + _price_a + _price_f) > 0)) exitWith {hint localize "STR_NORECBUILDING_ERROR";};

View File

@ -13,7 +13,7 @@ if ( dorepackage > 0 ) then {
closeDialog 0;
waitUntil { !dialog };
_fob = [] call F_getNearestFob;
_fob = [] call KPLIB_fnc_getNearestFob;
if (count _fob > 0) then {
GRLIB_all_fobs = GRLIB_all_fobs - [_fob];
@ -34,9 +34,9 @@ if ( dorepackage > 0 ) then {
if ( dorepackage == 1 ) then {
_fobbox = FOB_box_typename createVehicle _spawnpos;
_fobbox call F_setFobMass;
[_fobbox] call KPLIB_fnc_setFobMass;
// Add ViV actions to FOB Box
[_fobBox] remoteExecCall ["F_setLoadableViV", 0, _fobBox];
[_fobBox] remoteExecCall ["KPLIB_fnc_setLoadableViV", 0, _fobBox];
};
if ( dorepackage == 2 ) then {

View File

@ -4,7 +4,7 @@ _actionned_intel_items = [];
while { true } do {
if ( [ player, 5 ] call F_fetchPermission ) then {
if ([5] call KPLIB_fnc_hasPermission) then {
_near_people = (getPosATL player) nearEntities [["Man"], 5];
_near_intel = (getPosATL player) nearEntities [[GRLIB_intel_laptop, GRLIB_intel_file], 5];

View File

@ -80,10 +80,8 @@ while { dialog && (alive player) && edit_loadout == 0 } do {
[player, [profileNamespace, _loaded_loadout]] call BIS_fnc_loadInventory;
};
[player] call F_correctLaserBatteries;
if (KP_liberation_arsenalUsePreset) then {
if ([_backpack] call F_checkGear) then {
if ([_backpack] call KPLIB_fnc_checkGear) then {
hint format [ localize "STR_HINT_LOADOUT_LOADED", _loaded_loadout param [0]];
};
} else {
@ -97,7 +95,7 @@ while { dialog && (alive player) && edit_loadout == 0 } do {
};
if ( respawn_loadout > 0 ) then {
GRLIB_respawn_loadout = [ player, ["repetitive"] ] call F_getLoadout;
GRLIB_respawn_loadout = [ player, ["repetitive"] ] call KPLIB_fnc_getLoadout;
hint localize "STR_MAKE_RESPAWN_LOADOUT_HINT";
respawn_loadout = 0;
};
@ -105,7 +103,7 @@ while { dialog && (alive player) && edit_loadout == 0 } do {
if ( load_from_player >= 0 ) then {
private _playerselected = ( _loadplayers select load_from_player ) select 1;
if ( alive _playerselected ) then {
[ player, [ _playerselected, ["repetitive"] ] call F_getLoadout ] call F_setLoadout;
[player, [_playerselected, ["repetitive"]] call KPLIB_fnc_getLoadout] call KPLIB_fnc_setLoadout;
hint format [ localize "STR_LOAD_PLAYER_LOADOUT_HINT", name _playerselected ];
};
load_from_player = -1;
@ -127,6 +125,6 @@ if ( edit_loadout > 0 ) then {
uiSleep 5;
private _arsenalDisplay = ["RSCDisplayArsenal", "ace_arsenal_display"] select (KP_liberation_ace && KP_liberation_arsenal_type);
waitUntil {sleep 1; isNull (uinamespace getvariable [_arsenalDisplay, displayNull])};
[_backpack] call F_checkGear;
[_backpack] call KPLIB_fnc_checkGear;
};
};

View File

@ -19,9 +19,9 @@ waitUntil {sleep 1; !isNil "GRLIB_all_fobs"};
while {true} do {
waitUntil {sleep 1; count GRLIB_all_fobs > 0};
waitUntil {sleep 2; (player distance ([] call F_getNearestFob)) < GRLIB_fob_range};
waitUntil {sleep 2; (player distance ([] call KPLIB_fnc_getNearestFob)) < GRLIB_fob_range};
if ([player, 4] call F_fetchPermission) then {
if ([4] call KPLIB_fnc_hasPermission) then {
private _detected_vehicles = (getPos player) nearObjects veh_action_detect_distance select {
(((typeof _x in _recycleable_classnames ) && (({alive _x} count (crew _x)) == 0 || (unitIsUAV _x)) && ((locked _x == 0 || locked _x == 1))) ||
((typeOf _x) in _building_classnames) ||
@ -29,9 +29,14 @@ while {true} do {
((typeOf _x) in KP_liberation_upgrade_buildings) ||
((typeOf _x) in KP_liberation_ace_crates)) &&
(alive _x) &&
((count(attachedObjects _x) == 0) || ((typeOf _x) == "rhsusf_mkvsoc")) &&
(
// ignore null objects left by Advanced Towing
// see https://github.com/sethduda/AdvancedTowing/pull/46
(((attachedObjects _x) select {!isNull _X}) isEqualTo [])
|| ((typeOf _x) == "rhsusf_mkvsoc")
) &&
(_x distance startbase > 1000) &&
(_x distance ( [] call F_getNearestFob) < GRLIB_fob_range) &&
(_x distance ( [] call KPLIB_fnc_getNearestFob) < GRLIB_fob_range) &&
(getObjectType _x >= 8)
};

View File

@ -5,7 +5,7 @@ veh_action_distance = 10;
while { true } do {
if ( [ player, 5 ] call F_fetchPermission ) then {
if ([5] call KPLIB_fnc_hasPermission) then {
_detected_vehicles = ((getpos player) nearEntities [["Tank","APC","IFV","Car"], veh_action_distance]) select {
(count crew _x) == 0 &&

View File

@ -12,7 +12,7 @@ _managed_areas = [];
while {true} do {
if ([player, 5] call F_fetchPermission) then {
if ([5] call KPLIB_fnc_hasPermission) then {
_nearammoboxes = ((getpos player) nearEntities [KP_liberation_crates,10]);
_neartransporttrucks = ((getpos player) nearEntities [ammobox_transports_typenames,10]);
@ -54,8 +54,8 @@ while {true} do {
_next_box = _x;
if (!(_next_box in _managed_boxes) && ( isNull attachedTo _next_box )) then {
_b_action_id1 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_LOAD_BOX" + "</t>","scripts\client\ammoboxes\do_load_box_action.sqf","",-501,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_b_action_id2 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_STORE_CRATE" + "</t>",{[(_this select 0), (nearestObjects [player,KP_liberation_storage_buildings,20]) select 0,true] call F_crateToStorage;},"",-502,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_b_action_id3 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_VALUE" + "</t>",{[_this select 0] call F_crateCheckValue;uiSleep 3; hint "";},"",-503,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_b_action_id2 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_STORE_CRATE" + "</t>",{[(_this select 0), (nearestObjects [player,KP_liberation_storage_buildings,20]) select 0,true] call KPLIB_fnc_crateToStorage;},"",-502,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_b_action_id3 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_VALUE" + "</t>",{[_this select 0] call KPLIB_fnc_checkCrateValue;uiSleep 3; hint "";},"",-503,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_b_action_id4 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_PUSH" + "</t>",{(_this select 0) setPos ((_this select 0) getPos [1, (player getDir (_this select 0))]);},"",-504,true,false,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
_next_box setVariable ["GRLIB_ammo_box_action", _b_action_id1, false];
_next_box setVariable ["KP_crate_store_action", _b_action_id2, false];
@ -77,7 +77,7 @@ while {true} do {
_next_box removeAction (_next_box getVariable ["KP_crate_push_action", -1]);
}
} foreach _managed_boxes;
_checked_areas = [];
{
@ -85,13 +85,13 @@ while {true} do {
_area_load = count (attachedObjects _x);
if (!(_next_area in _managed_areas) && (_area_load > 0)) then {
_action_id = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_SUPPLY" + "</t>",{[KP_liberation_supply_crate, (_this select 0), true] spawn F_crateFromStorage;},"",-504,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_action_id = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_SUPPLY" + "</t>",{[KP_liberation_supply_crate, (_this select 0), true] spawn KPLIB_fnc_crateFromStorage;},"",-504,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_next_area setVariable ["KP_supply_unstore_action", _action_id, false];
_action_id2 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_AMMO" + "</t>",{[KP_liberation_ammo_crate, (_this select 0), true] spawn F_crateFromStorage;},"",-505,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_action_id2 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_AMMO" + "</t>",{[KP_liberation_ammo_crate, (_this select 0), true] spawn KPLIB_fnc_crateFromStorage;},"",-505,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_next_area setVariable ["KP_ammo_unstore_action", _action_id2, false];
_action_id3 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_FUEL" + "</t>",{[KP_liberation_fuel_crate, (_this select 0), true] spawn F_crateFromStorage;},"",-506,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_action_id3 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_UNSTORE_FUEL" + "</t>",{[KP_liberation_fuel_crate, (_this select 0), true] spawn KPLIB_fnc_crateFromStorage;},"",-506,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_next_area setVariable ["KP_fuel_unstore_action", _action_id3, false];
_action_id4 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_SORT_STORAGE" + "</t>",{[(_this select 0)] spawn F_sortStorage;},"",-507,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_action_id4 = _next_area addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_SORT_STORAGE" + "</t>",{[(_this select 0)] spawn KPLIB_fnc_sortStorage;},"",-507,true,true,"","build_confirmed == 0 && (_this distance _target < 12) && (vehicle player == player)"];
_next_area setVariable ["KP_storage_sort_action", _action_id4, false];
_managed_areas pushback _next_area;
};

View File

@ -9,11 +9,11 @@ _offset = 0;
if ( _truck_to_unload getVariable ["GRLIB_ammo_truck_load", 0] > 0 ) then {
_truck_to_unload setVariable ["GRLIB_ammo_truck_load", 0, true];
[_truck_to_unload, false] remoteExec ["F_objectProtection"];
[_truck_to_unload, false] remoteExec ["KPLIB_fnc_protectObject"];
{
_next_box = _x;
[_next_box, false] remoteExec ["F_objectProtection"];
[_next_box, false] remoteExec ["KPLIB_fnc_protectObject"];
sleep 0.5;
detach _next_box;
_next_box setpos (_truck_to_unload getpos [_offset, getdir _truck_to_unload]);
@ -22,15 +22,15 @@ if ( _truck_to_unload getVariable ["GRLIB_ammo_truck_load", 0] > 0 ) then {
_next_box setDamage 0;
_offset = _offset - 2.2;
sleep 0.5;
[_next_box, true] remoteExec ["F_objectProtection"];
[_next_box] remoteExec ["KPLIB_fnc_protectObject"];
[_next_box, true] remoteExec ["enableRopeAttach"];
} foreach ( attachedObjects _truck_to_unload);
sleep 0.5;
[_truck_to_unload, true] remoteExec ["F_objectProtection"];
[_truck_to_unload] remoteExec ["KPLIB_fnc_protectObject"];
hint localize "STR_BOX_UNLOADED";
uiSleep 2;
hint "";
};
};

View File

@ -6,7 +6,7 @@ if (KP_liberation_asymmetric_debug > 0) then {private _text = format ["[KP LIBER
switch (_notif_id) do {
case 0: {
["lib_asymm_convoy_ambush", [markertext ([10000, _pos] call F_getNearestSector)]] call BIS_fnc_showNotification;
["lib_asymm_convoy_ambush", [markertext ([10000, _pos] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;
private _ambush_marker = createMarkerLocal ["asymm_ambushmarker", _pos];
_ambush_marker setMarkerDirLocal (random 360);
_ambush_marker setMarkerColorLocal "ColorIndependent";

View File

@ -36,7 +36,7 @@ while { true } do {
_price_a = ((build_lists select buildtype) select buildindex) select 2;
_price_f = ((build_lists select buildtype) select buildindex) select 3;
_nearfob = [] call F_getNearestFob;
_nearfob = [] call KPLIB_fnc_getNearestFob;
_storage_areas = (_nearfob nearobjects (GRLIB_fob_range * 2)) select {(_x getVariable ["KP_liberation_storage_type",-1]) == 0};
[_price_s, _price_a, _price_f, _classname, buildtype, _storage_areas] remoteExec ["build_remote_call",2];
@ -73,7 +73,7 @@ while { true } do {
} else {
_posfob = getpos player;
if (buildtype != 99) then {
_posfob = [] call F_getNearestFob;
_posfob = [] call KPLIB_fnc_getNearestFob;
};
_idactcancel = -1;
@ -259,7 +259,7 @@ while { true } do {
_price_a = ((build_lists select buildtype) select buildindex) select 2;
_price_f = ((build_lists select buildtype) select buildindex) select 3;
_nearfob = [] call F_getNearestFob;
_nearfob = [] call KPLIB_fnc_getNearestFob;
_storage_areas = (_nearfob nearobjects (GRLIB_fob_range * 2)) select {(_x getVariable ["KP_liberation_storage_type",-1]) == 0};
_supplyCrates = ceil (_price_s / 100);
@ -323,10 +323,10 @@ while { true } do {
};*/
if ( (unitIsUAV _vehicle) || manned ) then {
[ _vehicle ] call F_forceBluforCrew;
[ _vehicle ] call KPLIB_fnc_forceBluforCrew;
};
[_vehicle] call F_addObjectInit;
[_vehicle] call KPLIB_fnc_addObjectInit;
sleep 0.3;
_vehicle allowDamage true;

Some files were not shown because too many files have changed in this diff Show More