Skip to content

Commit

Permalink
Merge pull request #555 from KillahPotatoes/v0.97S9-539
Browse files Browse the repository at this point in the history
Universal Preset Templates Adjustments
  • Loading branch information
veteran29 authored Dec 12, 2018
2 parents 2db5b63 + 8561032 commit 38993aa
Show file tree
Hide file tree
Showing 66 changed files with 2,702 additions and 2,538 deletions.
210 changes: 199 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,228 @@
"BIS_fnc_reviveInit",
"CBA_Settings_fnc_init",
"KPLIB_eden_boxspawn",
"KPLIB_eden_startbase",
"KPLIB_eden_potatospawn",
"KPLIB_eden_startbase",
"KPLIB_param_arsenalType",
"KPLIB_param_clearVehicleCargo",
"KPLIB_param_commanderZeusMode",
"KPLIB_param_copyDistance",
"KPLIB_param_debug",
"KPLIB_param_fobRange",
"KPLIB_param_limitedZeusCeiling",
"KPLIB_param_limitedZeusRadius",
"KPLIB_param_mobileRespawn",
"KPLIB_param_presetArsenal",
"KPLIB_param_presetF",
"KPLIB_param_presetC",
"KPLIB_param_presetE",
"KPLIB_param_presetF",
"KPLIB_param_presetR",
"KPLIB_param_presetC",
"KPLIB_param_reviveMode",
"KPLIB_param_reviveBleedOutDuration",
"KPLIB_param_reviveDuration",
"KPLIB_param_reviveRequiredTrait",
"KPLIB_param_reviveForceRespawnDuration",
"KPLIB_param_reviveMedicSpeedMultiplier",
"KPLIB_param_reviveMode",
"KPLIB_param_reviveRequiredItems",
"KPLIB_param_reviveRequiredTrait",
"KPLIB_param_reviveUnconsciousStateMode",
"KPLIB_param_reviveBleedOutDuration",
"KPLIB_param_reviveForceRespawnDuration",
"KPLIB_param_saveInterval",
"KPLIB_param_sectorActRange",
"KPLIB_param_sectorCap",
"KPLIB_param_sectorCapRange",
"KPLIB_param_stamina",
"KPLIB_param_commanderZeusMode",
"KPLIB_param_subCommanderZeusMode",
"KPLIB_param_limitedZeusRadius",
"KPLIB_param_limitedZeusCeiling",
"KPLIB_param_timeMulti",
"KPLIB_param_zeusFobIcons",
"KPLIB_param_zeusLocationIcons",
"KPLIB_param_timeMulti",
"KPLIB_plm_groups",
"KPLIB_preset_addBoatE",
"KPLIB_preset_addBoatF",
"KPLIB_preset_addHeliE",
"KPLIB_preset_addHeliF",
"KPLIB_preset_airBuildingE",
"KPLIB_preset_airBuildingF",
"KPLIB_preset_alphabetE",
"KPLIB_preset_alphabetF",
"KPLIB_preset_arsenalBoxE",
"KPLIB_preset_arsenalBoxF",
"KPLIB_preset_boatsE",
"KPLIB_preset_boatsF",
"KPLIB_preset_boatsPlE",
"KPLIB_preset_boatsPlF",
"KPLIB_preset_crateAmmoE",
"KPLIB_preset_crateAmmoF",
"KPLIB_preset_crateFuelE",
"KPLIB_preset_crateFuelF",
"KPLIB_preset_crateSupplyE",
"KPLIB_preset_crateSupplyF",
"KPLIB_preset_decoE",
"KPLIB_preset_decoF",
"KPLIB_preset_decoPlE",
"KPLIB_preset_decoPlF",
"KPLIB_preset_fobBoxE",
"KPLIB_preset_fobBoxF",
"KPLIB_preset_fobBuildingE",
"KPLIB_preset_fobBuildingF",
"KPLIB_preset_fobTruckE",
"KPLIB_preset_fobTruckF",
"KPLIB_preset_heliAttackE",
"KPLIB_preset_heliAttackF",
"KPLIB_preset_heliAttackPlE",
"KPLIB_preset_heliAttackPlF",
"KPLIB_preset_heliTransE",
"KPLIB_preset_heliTransF",
"KPLIB_preset_heliTransPlC",
"KPLIB_preset_heliTransPlE",
"KPLIB_preset_heliTransPlF",
"KPLIB_preset_jetsE",
"KPLIB_preset_jetsF",
"KPLIB_preset_jetsPlE",
"KPLIB_preset_jetsPlF",
"KPLIB_preset_lockedVehPlF",
"KPLIB_preset_logiBuildingE",
"KPLIB_preset_logiBuildingF",
"KPLIB_preset_logiTruckE",
"KPLIB_preset_logiTruckF",
"KPLIB_preset_logisticE",
"KPLIB_preset_logisticF",
"KPLIB_preset_logisticPlC",
"KPLIB_preset_logisticPlE",
"KPLIB_preset_logisticPlF",
"KPLIB_preset_mortarE",
"KPLIB_preset_mortarF",
"KPLIB_preset_nameE",
"KPLIB_preset_nameF",
"KPLIB_preset_planeTransE",
"KPLIB_preset_planeTransF",
"KPLIB_preset_planeTransPlC",
"KPLIB_preset_planeTransPlE",
"KPLIB_preset_planeTransPlF",
"KPLIB_preset_potatoE",
"KPLIB_preset_potatoF",
"KPLIB_preset_respawnTruckE",
"KPLIB_preset_respawnTruckF",
"KPLIB_preset_rsAntiAirE",
"KPLIB_preset_rsAntiAirF",
"KPLIB_preset_rsAntiTankE",
"KPLIB_preset_rsAntiTankF",
"KPLIB_preset_rsAutorifleManE",
"KPLIB_preset_rsAutorifleManF",
"KPLIB_preset_rsCrewmanHeliE",
"KPLIB_preset_rsCrewmanHeliF",
"KPLIB_preset_rsCrewmanVehE",
"KPLIB_preset_rsCrewmanVehF",
"KPLIB_preset_rsEngineerE",
"KPLIB_preset_rsEngineerF",
"KPLIB_preset_rsGrenadierE",
"KPLIB_preset_rsGrenadierF",
"KPLIB_preset_rsHeavyGunnerE",
"KPLIB_preset_rsHeavyGunnerF",
"KPLIB_preset_rsLightAtE",
"KPLIB_preset_rsLightAtF",
"KPLIB_preset_rsMarksmanE",
"KPLIB_preset_rsMarksmanF",
"KPLIB_preset_rsMedicE",
"KPLIB_preset_rsMedicF",
"KPLIB_preset_rsOfficerE",
"KPLIB_preset_rsOfficerF",
"KPLIB_preset_rsParatrooperE",
"KPLIB_preset_rsParatrooperF",
"KPLIB_preset_rsPilotHeliE",
"KPLIB_preset_rsPilotHeliF",
"KPLIB_preset_rsPilotJetE",
"KPLIB_preset_rsPilotJetF",
"KPLIB_preset_rsRiflemanE",
"KPLIB_preset_rsRiflemanF",
"KPLIB_preset_rsSharpshooterE",
"KPLIB_preset_rsSharpshooterF",
"KPLIB_preset_rsSquadLeaderE",
"KPLIB_preset_rsSquadLeaderF",
"KPLIB_preset_rsSurvivorE",
"KPLIB_preset_rsSurvivorF",
"KPLIB_preset_rsTeamLeaderE",
"KPLIB_preset_rsTeamLeaderF",
"KPLIB_preset_sfDiverE",
"KPLIB_preset_sfDiverF",
"KPLIB_preset_sfExplosiveE",
"KPLIB_preset_sfExplosiveF",
"KPLIB_preset_sfLightAtE",
"KPLIB_preset_sfLightAtF",
"KPLIB_preset_sfMarksmanE",
"KPLIB_preset_sfMarksmanF",
"KPLIB_preset_sfMedicE",
"KPLIB_preset_sfMedicF",
"KPLIB_preset_sfRiflemanE",
"KPLIB_preset_sfRiflemanF",
"KPLIB_preset_sfSharpshooterE",
"KPLIB_preset_sfSharpshooterF",
"KPLIB_preset_sfSniperE",
"KPLIB_preset_sfSniperF",
"KPLIB_preset_sfSpotterE",
"KPLIB_preset_sfSpotterF",
"KPLIB_preset_sfTeamLeaderE",
"KPLIB_preset_sfTeamLeaderF",
"KPLIB_preset_slotHeliE",
"KPLIB_preset_slotHeliF",
"KPLIB_preset_slotJetE",
"KPLIB_preset_slotJetF",
"KPLIB_preset_specOpsE",
"KPLIB_preset_specOpsF",
"KPLIB_preset_specOpsPlE",
"KPLIB_preset_specOpsPlF",
"KPLIB_preset_staticAaBigE",
"KPLIB_preset_staticAaBigF",
"KPLIB_preset_staticAaBigRadarE",
"KPLIB_preset_staticAaBigRadarF",
"KPLIB_preset_staticAaE",
"KPLIB_preset_staticAaF",
"KPLIB_preset_staticAtE",
"KPLIB_preset_staticAtF",
"KPLIB_preset_staticsE",
"KPLIB_preset_staticsF",
"KPLIB_preset_staticsPlE",
"KPLIB_preset_staticsPlF",
"KPLIB_preset_storageLargeE",
"KPLIB_preset_storageLargeF",
"KPLIB_preset_storageSmallE",
"KPLIB_preset_storageSmallF",
"KPLIB_preset_unitsE",
"KPLIB_preset_unitsF",
"KPLIB_preset_unitsPlC",
"KPLIB_preset_unitsPlE",
"KPLIB_preset_unitsPlF",
"KPLIB_preset_unitsPlR",
"KPLIB_preset_vehAntiAirE",
"KPLIB_preset_vehAntiAirF",
"KPLIB_preset_vehAntiAirPlE",
"KPLIB_preset_vehAntiAirPlF",
"KPLIB_preset_vehArtyE",
"KPLIB_preset_vehArtyF",
"KPLIB_preset_vehArtyPlE",
"KPLIB_preset_vehArtyPlF",
"KPLIB_preset_vehHeavyApcE",
"KPLIB_preset_vehHeavyApcF",
"KPLIB_preset_vehHeavyApcPlE",
"KPLIB_preset_vehHeavyApcPlF",
"KPLIB_preset_vehHeavyE",
"KPLIB_preset_vehHeavyF",
"KPLIB_preset_vehHeavyPlE",
"KPLIB_preset_vehHeavyPlF",
"KPLIB_preset_vehLightArmedE",
"KPLIB_preset_vehLightArmedF",
"KPLIB_preset_vehLightArmedPlE",
"KPLIB_preset_vehLightArmedPlF",
"KPLIB_preset_vehLightArmedPlR",
"KPLIB_preset_vehLightUnarmedE",
"KPLIB_preset_vehLightUnarmedF",
"KPLIB_preset_vehLightUnarmedPlC",
"KPLIB_preset_vehLightUnarmedPlE",
"KPLIB_preset_vehLightUnarmedPlF",
"KPLIB_preset_vehTransE",
"KPLIB_preset_vehTransF",
"KPLIB_preset_vehTransPlC",
"KPLIB_preset_vehTransPlE",
"KPLIB_preset_vehTransPlF",
"KPLIB_preset_vehTransPlR",
"KPR_fnc_getPlaytime",
"KPR_fnc_getRankName",
"KPR_fnc_getScore",
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changelog

## 0.97.0 (in Development)
* **Fully rewritten the mission code from scratch.**
* **Fully rewritten the mission code from scratch.** (Details in the [Dev-Blogs](https://github.com/KillahPotatoes/KP-Liberation/issues?utf8=%E2%9C%93&q=label%3Adev-blog))
* Added: Functions library via CfgFunctions.
* Added: Admin dialog with various functionalities for server admins.
* Added: Free camera view for building.
Expand Down
7 changes: 6 additions & 1 deletion Missionframework/KPGUI/KPGUI_classes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: KPGUI_classes.hpp
Author: Wyqer - https://github.com/KillahPotatoes
Date: 2018-09-13
Last Update: 2018-11-10
Last Update: 2018-12-09
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down Expand Up @@ -214,6 +214,11 @@ class KPGUI_PRE_ActivePicture: KPGUI_PRE_ActiveText {
style = 48;
};

// Active Picture which keeps aspect ratio
class KPGUI_PRE_ActivePictureRatio: KPGUI_PRE_ActivePicture {
style = 48 + 2048;
};

// Picture which keeps aspect ratio
class KPGUI_PRE_PictureRatio: KPGUI_PRE_Picture {
style = 48 + 2048;
Expand Down
11 changes: 4 additions & 7 deletions Missionframework/modules/00_init/fnc/fn_init_checkClass.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_init_checkClass.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-10-16
Last Update: 2018-11-09
Last Update: 2018-12-08
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand All @@ -21,12 +21,9 @@ params [
["_toCheck", "", [""]]
];

private _return = false;

if (isClass (configFile >> "CfgVehicles" >> _toCheck)) then {
_return = true;
true
} else {
diag_log format ["[KP LIBERATION] [CHECKCLASS] %1 not found in CfgVehicles", _toCheck];
diag_log format ["[KP LIBERATION] [PRESET] %1 not available in current modset", _toCheck];
false
};

_return
11 changes: 6 additions & 5 deletions Missionframework/modules/00_init/fnc/fn_init_configGuard.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_init_configGuard.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-06-19
Last Update: 2018-11-18
Last Update: 2018-12-08
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand All @@ -29,10 +29,11 @@ KPLIB_validationNamespace setVariable ["config", false];
// Arsenal
if (KPLIB_param_presetArsenal > 0) then {KPLIB_validationNamespace setVariable ["arsenal", false];};
// Presets
KPLIB_validationNamespace setVariable ["blufor", false];
KPLIB_validationNamespace setVariable ["opfor", false];
KPLIB_validationNamespace setVariable ["civilians", false];
KPLIB_validationNamespace setVariable ["resistance", false];
KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedC", false];
KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedE", false];
KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedF", false];
KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedR", false];
KPLIB_validationNamespace setVariable ["KPLIB_preset_checkedSingles", true];

// Delay all checks until all initializations are done
[] spawn {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_init_createLockedVehMarkers.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-05-08
Last Update: 2018-11-09
Last Update: 2018-12-08
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down Expand Up @@ -32,7 +32,7 @@ private _cfg = configFile >> "CfgVehicles";
_marker setMarkerText (getText (_cfg >> _vehicle >> "displayName"));
_marker setMarkerShape "ICON";
_marker setMarkerType "mil_pickup";
_marker setMarkerColor KPLIB_preset_colorEnemy;
_marker setMarkerColor KPLIB_preset_colorE;

// Storing of the created locked vehicle marker with relation to the base marker.
KPLIB_sectors_lockedVehMarkers pushBack [_marker, _base];
Expand Down
14 changes: 7 additions & 7 deletions Missionframework/modules/00_init/fnc/fn_init_loadData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_init_loadData.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-10-16
Last Update: 2018-11-09
Last Update: 2018-12-09
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down Expand Up @@ -33,8 +33,8 @@ if (_moduleData isEqualTo []) then {
private _assignedBases = [];
private _nextVehicle = "";
private _nextBase = "";
while {((count _assignedVehicles) < (count KPLIB_preset_lockedVeh)) && ((count _assignedBases) < (count KPLIB_sectors_military))} do {
_nextVehicle = selectRandom (KPLIB_preset_lockedVeh select {!(_x in _assignedVehicles)});
while {((count _assignedVehicles) < (count KPLIB_preset_lockedVehPlF)) && ((count _assignedBases) < (count KPLIB_sectors_military))} do {
_nextVehicle = selectRandom (KPLIB_preset_lockedVehPlF select {!(_x in _assignedVehicles)});
_nextBase = selectRandom (KPLIB_sectors_military select {!(_x in _assignedBases)});
_assignedVehicles pushBack _nextVehicle;
_assignedBases pushBack _nextBase;
Expand All @@ -56,12 +56,12 @@ if (_moduleData isEqualTo []) then {

// Check for deleted military sectors or deleted classnames in the locked vehicles array
KPLIB_sectors_lockedVeh = _moduleData select 1;
KPLIB_sectors_lockedVeh = KPLIB_sectors_lockedVeh select {(_x select 0) in KPLIB_preset_lockedVeh};
KPLIB_sectors_lockedVeh = KPLIB_sectors_lockedVeh select {(_x select 0) in KPLIB_preset_lockedVehPlF};
KPLIB_sectors_lockedVeh = KPLIB_sectors_lockedVeh select {(_x select 1) in KPLIB_sectors_military};

// Check for additions in the locked vehicles array
private _lockedVehCount = count KPLIB_sectors_lockedVeh;
if ((_lockedVehCount < (count KPLIB_sectors_military)) && (_lockedVehCount < (count KPLIB_preset_lockedVeh))) then {
if ((_lockedVehCount < (count KPLIB_sectors_military)) && (_lockedVehCount < (count KPLIB_preset_lockedVehPlF))) then {
diag_log "[KP LIBERATION] [IMPORTANT] Additional military sectors or unlock vehicles detected and assigned.";
private _assignedVehicles = [];
private _assignedBases = [];
Expand All @@ -73,8 +73,8 @@ if (_moduleData isEqualTo []) then {
_assignedBases pushBack (_x select 1);
} forEach KPLIB_sectors_lockedVeh;

while {((count _assignedVehicles) < (count KPLIB_preset_lockedVeh)) && ((count _assignedBases) < (count KPLIB_sectors_military))} do {
_nextVehicle = selectRandom (KPLIB_preset_lockedVeh select {!(_x in _assignedVehicles)});
while {((count _assignedVehicles) < (count KPLIB_preset_lockedVehPlF)) && ((count _assignedBases) < (count KPLIB_sectors_military))} do {
_nextVehicle = selectRandom (KPLIB_preset_lockedVehPlF select {!(_x in _assignedVehicles)});
_nextBase = selectRandom (KPLIB_sectors_military select {!(_x in _assignedBases)});
_assignedVehicles pushBack _nextVehicle;
_assignedBases pushBack _nextBase;
Expand Down
Loading

0 comments on commit 38993aa

Please sign in to comment.