Skip to content

Commit

Permalink
fixed bug 2 and 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Dubjunk committed Jan 5, 2019
1 parent 69c01a8 commit f3088d3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_permission_checkVehiclePermission.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-12-21
Last Update: 2018-12-28
Last Update: 2019-01-05
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down Expand Up @@ -33,7 +33,7 @@ private _data = [];
private _permission = "";
private _classNames = [];

if (_role isEqualTo "cargo" || typeOf _vehicle isEqualTo KPLIB_preset_potatoF || typeOf _vehicle isEqualTo KPLIB_preset_addHeliF) exitWith {
if (_role isEqualTo "cargo" || typeOf _vehicle isEqualTo KPLIB_preset_potatoF || typeOf _vehicle isEqualTo KPLIB_preset_addHeliF || typeOf _vehicle isEqualTo KPLIB_preset_addBoatF) exitWith {
true
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_permission_preInit.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-12-07
Last Update: 2018-12-29
Last Update: 2019-01-05
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down Expand Up @@ -35,6 +35,9 @@ if (isServer) then {

};

// Process CBA Settings
[] call KPLIB_fnc_permission_settings;

/*
----- Module Globals -----
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
File: fn_permission_setupPermissionControls.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-12-17
Last Update: 2018-12-29
Last Update: 2019-01-05
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down Expand Up @@ -35,7 +35,7 @@ private _playerPermissions = [];
switch (_playerUID) do {
case "default": {
{
_permission = toLower (_x getVariable ["Data", ["", false]]) select 0;
_permission = toLower ((_x getVariable ["Data", ["", false]]) select 0);
_defaultPermission = KPLIB_permission_default select (KPLIB_permission_default findIf {
(_x select 0) isEqualTo _permission
}) select 1;
Expand All @@ -57,7 +57,7 @@ switch (_playerUID) do {
};
private _permissionState = false;
{
_permission = toLower (_x getVariable ["Data", ["", false]]) select 0;
_permission = toLower ((_x getVariable ["Data", ["", false]]) select 0);
_index = (_playerPermissions findIf {(_x select 0) isEqualTo _permission});
if (_index isEqualTo -1) then {
_permissionState = KPLIB_permission_default select (KPLIB_permission_default findIf {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_permission_syncClients.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-12-22
Last Update: 2018-12-29
Last Update: 2019-01-05
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down Expand Up @@ -48,5 +48,7 @@ if !(_types isEqualTo []) then {

if !(_types isEqualTo []) then {
KPLIB_permission_groups = +_groups;
publicVariable "KPLIB_permission_types";
publicVariable "KPLIB_permission_groups";
};

true
5 changes: 4 additions & 1 deletion Missionframework/modules/11_permission/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: 2018-12-07
Last Update: 2018-12-23
Last Update: 2019-01-05
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Expand Down Expand Up @@ -60,6 +60,9 @@ class permission {
// Saves module specific data for the save
class permission_saveData {};

// CBA Settings initialization for this module
class permission_settings {};

// Reads the player permissions and applies them to the dialog controls
class permission_setupPermissionControls {};

Expand Down

0 comments on commit f3088d3

Please sign in to comment.