Skip to content

Commit

Permalink
Merge pull request #537 from KillahPotatoes/v0.97S8-520
Browse files Browse the repository at this point in the history
Small S8 tweaks and adjustments
  • Loading branch information
Wyqer authored Nov 27, 2018
2 parents a10443e + ffa1b13 commit 984d8c5
Show file tree
Hide file tree
Showing 39 changed files with 317 additions and 776 deletions.
9 changes: 7 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"KPLIB_eden_boxspawn",
"KPLIB_eden_startbase",
"KPLIB_eden_potatospawn",
"KPLIB_param_arsenalType",
"KPLIB_param_clearVehicleCargo",
"KPLIB_param_copyDistance",
"KPLIB_param_debug",
"KPLIB_param_fobRange",
"KPLIB_param_mobileRespawn",
Expand All @@ -33,8 +35,7 @@
"KPLIB_param_sectorCap",
"KPLIB_param_sectorCapRange",
"KPLIB_param_stamina",
"KPLIB_param_arsenalType",
"KPLIB_param_copyDistance",
"KPLIB_param_timeMulti",
"KPLIB_plm_groups",
"KPR_fnc_getPlaytime",
"KPR_fnc_getRankName",
Expand All @@ -44,6 +45,10 @@
"KPR_players",
"KPR_uniforms"
],
"sqflint.exclude": [
"Missionframework/modules/02_core/scripts/server/eventLoop.sqf",
"Missionframework/modules/02_core/scripts/server/sectorMonitor.sqf"
],
"psi-header.lang-config": [
{
"license": "Custom",
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
* Tweaked: Mission name now fits the [name standard](https://forums.bohemia.net/forums/topic/217676-mission-name-standard/).
* Tweaked: Versioning format from e.g. 0.97X to 0.97.X for a better separation.
* Tweaked: Sector garrisons are now persistent during activations and doesn't spawn fresh on each activation.
* Tweaked: Unit/Army Presets are now universally used as friendly or enemy preset.
* Tweaked: Unit/Army presets are now universally used as friendly or enemy preset.
* Tweaked: Changing presets is now possible without server restart.

## 0.963a (10th April 2018 as "legacy support" release)
* Added: Action to raise/lower object while building. Thanks to [darrell-aevum](https://github.com/darrell-aevum)
Expand Down
8 changes: 8 additions & 0 deletions Missionframework/modules/00_init/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,13 @@ This module uses no data or functions from other modules.

*Sorts sector markers and fills global sector arrays.*

* KPLIB_fnc_init_timeMultiApply

*Applies the chosen time multiplier.*

* KPLIB_fnc_init_wipe

*Completely wipes all data from the current campaign.*

### Scripts
No scripts will be started by this module
9 changes: 1 addition & 8 deletions Missionframework/modules/00_init/fnc/fn_init_load.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_init_load.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-03-29
Last Update: 2018-11-09
Last Update: 2018-11-27
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand All @@ -19,13 +19,6 @@

if (KPLIB_param_debug) then {diag_log format ["[KP LIBERATION] [%1] [SAVE] ----- Load function started -----", diag_tickTime];};

// Check for save wipe parameters
// TODO: This should be done via the admin menu
/*if (KPLIB_param_wipeSave1 > 0 && KPLIB_param_wipeSave2 > 0) then {
if (KPLIB_param_debug) then {diag_log "[KP LIBERATION] [SAVE] Wipe parameters enabled, wiping save data...";};
[] call KPLIB_fnc_init_wipe;
};*/

// Load whole save data
KPLIB_save_data = profileNamespace getVariable [KPLIB_save_key, nil];

Expand Down
2 changes: 1 addition & 1 deletion Missionframework/modules/00_init/fnc/fn_init_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_init_postInit.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-08-31
Last Update: 2018-11-12
Last Update: 2018-11-27
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down
15 changes: 14 additions & 1 deletion Missionframework/modules/00_init/fnc/fn_init_settings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_init_settings.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-11-09
Last Update: 2018-11-19
Last Update: 2018-11-27
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down Expand Up @@ -87,6 +87,19 @@
{}
] call CBA_Settings_fnc_init;

// KPLIB_param_timeMulti
// Time Multiplier.
// Default: 4x
[
"KPLIB_param_timeMulti",
"SLIDER",
[localize "STR_KPLIB_SETTINGS_GENERAL_TIMEMULTI", localize "STR_KPLIB_SETTINGS_GENERAL_TIMEMULTI_TT"],
localize "STR_KPLIB_SETTINGS_GENERAL",
[1, 24, 4, 0],
1,
{[] call KPLIB_fnc_init_timeMultiApply;}
] call CBA_Settings_fnc_init;


/*
----- PRESET SETTINGS -----
Expand Down
24 changes: 24 additions & 0 deletions Missionframework/modules/00_init/fnc/fn_init_timeMultiApply.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
KPLIB_fnc_init_timeMultiApply
File: fn_init_timeMultiApply.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-11-27
Last Update: 2018-11-27
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Applies the chosen time multiplier.
Parameter(s):
NONE
Returns:
Function reached the end [BOOL]
*/

if !(isServer) exitWith {};

setTimeMultiplier KPLIB_param_timeMulti;

true
7 changes: 6 additions & 1 deletion Missionframework/modules/00_init/fnc/fn_init_wipe.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_init_wipe.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-03-29
Last Update: 2018-11-09
Last Update: 2018-11-27
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand All @@ -17,6 +17,11 @@
Function reached the end [BOOL]
*/

// Interrupt all mission functionalities, especially the saving
KPLIB_campaignRunning = false;
publicVariable "KPLIB_campaignRunning";

// Delete saved data
profileNamespace setVariable [KPLIB_save_key, nil];
saveProfileNamespace;
diag_log "[KP LIBERATION] [IMPORTANT] Save wiped";
Expand Down
8 changes: 7 additions & 1 deletion Missionframework/modules/00_init/functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: functions.hpp
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-10-16
Last Update: 2018-11-12
Last Update: 2018-11-27
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down Expand Up @@ -68,4 +68,10 @@ class init {

// Sorts sector markers and fills global sector arrays
class init_sortSectors {};

// Applies the chosen time multiplier
class init_timeMultiApply {};

// Completely wipes all data from the current campaign
class init_wipe {};
};
8 changes: 0 additions & 8 deletions Missionframework/modules/02_core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ So this is the core gameplay where all other modules are inject their functional

*Check if win conditions are met.*

* KPLIB_fnc_core_cinematic

*The intro cinematic procedure.*

* KPLIB_fnc_core_createFobMarker

*Creates FOB marker.*
Expand All @@ -54,10 +50,6 @@ So this is the core gameplay where all other modules are inject their functional

*Handle vehicle spawn event.*

* KPLIB_fnc_core_intro

*Start the intro cinematic.*

* KPLIB_fnc_core_reviveInit

*Initialize BIS revive.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_core_changeSectorOwner.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-05-07
Last Update: 2018-11-09
Last Update: 2018-11-27
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand All @@ -25,9 +25,9 @@ params [

if (_toPlayerSide) then {
KPLIB_sectors_blufor pushBack _sectorToChange;
call KPLIB_fnc_core_checkWinCond;
[] call KPLIB_fnc_core_checkWinCond;
} else {
KPLIB_sectors_blufor = KPLIB_sectors_blufor - [_sectorToChange];
KPLIB_sectors_blufor deleteAt (KPLIB_sectors_blufor findIf {_x isEqualTo _sectorToChange});
};

publicVariable "KPLIB_sectors_blufor";
Expand Down
4 changes: 2 additions & 2 deletions Missionframework/modules/02_core/fnc/fn_core_checkWinCond.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_core_checkWinCond.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-05-10
Last Update: 2018-11-09
Last Update: 2018-11-27
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand All @@ -20,7 +20,7 @@
// In the next steps we'll implement a parameter for more win conditions. For now the "old one" will be used.
if (({_x in KPLIB_sectors_blufor} count KPLIB_sectors_metropolis) == count KPLIB_sectors_metropolis) then {
KPLIB_campaignRunning = false;
call KPLIB_fnc_init_wipe;
[] call KPLIB_fnc_init_wipe;
"KPLIB_win" call BIS_fnc_endMissionServer;
};

Expand Down
Loading

0 comments on commit 984d8c5

Please sign in to comment.