-
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #386
- Loading branch information
Showing
10 changed files
with
776 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
KP LIBERATION WHITELIST | ||
File: KPLIB_whitelist.sqf | ||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes | ||
Date: 2017-10-16 | ||
Last Update: 2018-01-05 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Contains arrays for specific functionalities etc. in which you can enter the SteamID64 of players who should be whitelisted. Only applies if whitelist parameter is enabled. | ||
Example: | ||
KPLIB_whitelist_commander = [ | ||
"76561198016642627", | ||
"76561198016642628", | ||
"76561198016642629" | ||
]; | ||
To know that information: https://steamid.io/ | ||
*/ | ||
|
||
// Commander (Platoon Leader) Slot Whitelist | ||
KPLIB_whitelist_commander = [ | ||
|
||
]; |
55 changes: 55 additions & 0 deletions
55
Missionframework/modules/01_core/fnc/fn_core_checkGear.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
KPLIB_fnc_core_checkGear | ||
File: fn_core_checkGear.sqf | ||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes | ||
Date: 2017-11-26 | ||
Last Update: 2018-01-05 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
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). | ||
Parameter(s): | ||
0: STRING - Backpack classname of the players backpack as he entered the arsenal / load a loadout. (Default "") | ||
Returns: | ||
BOOL | ||
*/ | ||
|
||
params [["_backpack", ""]]; | ||
|
||
private _return = true; | ||
private _playerItems = []; | ||
if ((headgear player) != "") then {_playerItems pushBack (headgear player);}; | ||
if ((goggles player) != "") then {_playerItems pushBack (goggles player);}; | ||
if ((uniform player) != "") then {_playerItems pushBack (uniform player);}; | ||
if ((vest player) != "") then {_playerItems pushBack (vest player);}; | ||
if (((backpack player) != "") && ((backpack player) != _backpack)) then {_playerItems pushBack (backpack player);}; | ||
{_playerItems pushBackUnique _x;} forEach (assignedItems player); | ||
{_playerItems pushBackUnique _x;} forEach (uniformItems player); | ||
{_playerItems pushBackUnique _x;} forEach (vestItems player); | ||
{_playerItems pushBackUnique _x;} forEach (backpackItems player); | ||
{_playerItems pushBackUnique _x;} forEach (weapons player); | ||
{if (_x != "") then {_playerItems pushBackUnique _x;}} forEach (primaryWeaponItems player); | ||
{if (_x != "") then {_playerItems pushBackUnique _x;}} forEach (secondaryWeaponItems player); | ||
{if (_x != "") then {_playerItems pushBackUnique _x;}} forEach (handgunItems player); | ||
|
||
if (({(_x in KPLIB_arsenal_whitelist) || ((_x find "ACRE") != -1) || ((_x find "tf_") != -1) || ((_x find "TFAR_") != -1)} count _playerItems) != count _playerItems) then { | ||
private _text = format ["[KP LIBERATION] [BLACKLIST] Found %1 at Player %2", (_playerItems - KPLIB_arsenal_whitelist), name player]; | ||
_text remoteExec ["diag_log",2]; | ||
private _badItems = ""; | ||
{if (((_x find "ACRE") == -1) && ((_x find "tf_") == -1) && ((_x find "TFAR_") == -1)) then {_badItems = _badItems + _x + "\n";};} forEach (_playerItems - KPLIB_arsenal_whitelist); | ||
hint format [localize "STR_HINT_BLACKLISTEDITEMFOUND", _badItems]; | ||
removeAllWeapons player; | ||
removeAllItems player; | ||
removeAllAssignedItems player; | ||
removeUniform player; | ||
removeVest player; | ||
removeBackpack player; | ||
removeHeadgear player; | ||
removeGoggles player; | ||
_return = false; | ||
}; | ||
|
||
_return |
29 changes: 29 additions & 0 deletions
29
Missionframework/modules/01_core/fnc/fn_core_getMobSpawns.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
KPLIB_fnc_core_getMobSpawns | ||
File: fn_core_getMobSpawns.sqf | ||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes | ||
Date: 2017-10-30 | ||
Last Update: 2018-01-05 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Returns an array with all mobile spawn objects. | ||
Parameter(s): | ||
NONE | ||
Returns: | ||
ARRAY | ||
*/ | ||
|
||
private _return = vehicles select { | ||
(typeOf _x == KPLIB_preset_respawnTruck || typeOf _x == KPLIB_preset_potato) && | ||
((_x distance KPLIB_eden_startbase) > 500) && | ||
!surfaceIsWater (getPos _x) && | ||
((getPos _x) select 2) < 5 && | ||
alive _x && | ||
speed _x < 5 | ||
}; | ||
|
||
_return |
28 changes: 28 additions & 0 deletions
28
Missionframework/modules/01_core/fnc/fn_core_getNearestSector.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
KPLIB_fnc_core_getNearestSector | ||
File: fn_core_getNearestSector.sqf | ||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes | ||
Date: 2017-11-26 | ||
Last Update: 2018-01-05 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Get the nearest capturable sector from the given position inside the given range. | ||
Parameter(s): | ||
0: NUMBER - Range to search for sectors. | ||
1: POSITION - Center position from where to start searching for sectors. (Default: Position of the player) | ||
Returns: | ||
STRING | ||
*/ | ||
|
||
params ["_range", ["_centerPos", getPos player]]; | ||
|
||
private _return = ""; | ||
private _foundSectors = KPLIB_sectors_all select {((markerPos _x) distance _centerPos) < _range}; | ||
private _sortedSectors = [_foundSectors, [_centerPos], {(markerPos _x) distance _input0}, "ASCEND"] call BIS_fnc_sortBy; | ||
if !(_sortedSectors isEqualTo []) then {_return = _sortedSectors select 0;}; | ||
|
||
_return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
KP LIBERATION MODULE FUNCTIONS | ||
File: functions.hpp | ||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes | ||
Date: 2017-10-28 | ||
Last Update: 2018-01-05 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Defines for all functions, which are brought by this module. | ||
*/ | ||
|
||
class core { | ||
file = "modules\01_core\fnc"; | ||
|
||
// Check player gear against blacklist | ||
class core_checkGear {}; | ||
|
||
// The intro cinematic procedure | ||
class core_cinematic {}; | ||
|
||
// Get all mobile respawn vehicles | ||
class core_getMobSpawns {}; | ||
|
||
// Get the nearest capturable sector | ||
class core_getNearestSector {}; | ||
|
||
// Start the intro cinematic | ||
class core_intro {}; | ||
|
||
// Opens the redeploy/spawn dialog | ||
class core_redeploy {}; | ||
|
||
// The spawn camera sequence | ||
class core_spawnCam {}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
KP LIBERATION MODULE GLOBALS | ||
File: globals.sqf | ||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes | ||
Date: 2017-10-28 | ||
Last Update: 2018-03-28 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Initializes the global variables which are brought by this module. | ||
*/ | ||
|
||
// Deploy button trigger for redeploy dialog | ||
KPLIB_dialog_deploy = 0; | ||
// Map scale trigger for redeploy dialog | ||
KPLIB_dialog_mapTrigger = 0; | ||
// Intro cinematic done | ||
KPLIB_intro_done = false; | ||
// Intro cinematic started | ||
KPLIB_intro_started = false; | ||
// Intro cinematic stopped | ||
KPLIB_intro_stopped = false; | ||
// Start game button state in intro cinematic | ||
KPLIB_intro_startGame = 0; | ||
// Tutorial button state in intro cinematic | ||
KPLIB_intro_tutorial = 0; | ||
// Last time a mobile respawn was done | ||
KPLIB_respawn_time = time; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
KP LIBERATION MODULE INITIALIZATION | ||
File: initModule.sqf | ||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes | ||
Date: 2017-10-28 | ||
Last Update: 2018-01-05 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
This module provides the very basic functions and mechanics for the general gameplay of the mission. | ||
Tasks of this module are: | ||
* Provide basic functions | ||
* Manage respawn / redeploy dialog | ||
* Show respawn, spawn and intro cinematics | ||
Dependencies: | ||
* 00_init | ||
*/ | ||
|
||
// Read the module globals | ||
call compile preprocessFileLineNumbers "modules\01_core\globals.sqf"; | ||
|
||
if (hasInterface) then { | ||
// Start the intro cinematic | ||
[] spawn KPLIB_fnc_core_intro; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
KP LIBERATION MODULE UI FILE | ||
File: KPLIB_ui.hpp | ||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes | ||
Date: 2017-10-28 | ||
Last Update: 2018-01-05 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Initializes the ui defines, dialogs and elements which are brought by this module. | ||
*/ | ||
|
||
#include "ui\KPLIB_introMenu.hpp" | ||
#include "ui\KPLIB_redeploy.hpp" | ||
#include "ui\KPLIB_titles.hpp" |
Oops, something went wrong.