Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arsenal Implementation #536

Merged
merged 39 commits into from
Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ea083f0
Implemented the basic structure for the new arsenal module
Dubjunk Nov 12, 2018
c2dc33d
moved fillArsenal function to the arsenal module and provided a postInit
Dubjunk Nov 12, 2018
f62745d
Added arsenal dialog basics
Dubjunk Nov 13, 2018
a9d170d
Added stringtable entries for the dialog
Dubjunk Nov 13, 2018
3224bf3
some tweaks
Dubjunk Nov 14, 2018
c1570b1
Some dialog adjustments
Dubjunk Nov 14, 2018
efeab17
added gear check to dialog
Dubjunk Nov 14, 2018
89414cd
added functions to open the dialog
Dubjunk Nov 14, 2018
61458c1
added the correct argument to the function call
Dubjunk Nov 14, 2018
a952253
implemented the functionality to load BI loadouts
Dubjunk Nov 14, 2018
5828d7b
Added CBA settings to the modue
Dubjunk Nov 14, 2018
6929d1c
Added preInit to initialize the settings
Dubjunk Nov 14, 2018
15da75b
arsenal param as ignored variable
Dubjunk Nov 14, 2018
6592e69
Stringtable additions for the settings
Dubjunk Nov 14, 2018
0e34530
implemented arsenal access from the dialog
Dubjunk Nov 14, 2018
ecd90f7
module functions update
Dubjunk Nov 14, 2018
cee2cf0
added EH for gear check
Dubjunk Nov 14, 2018
7a583fe
moved checkGear function to arsenal module
Dubjunk Nov 18, 2018
6151b30
added function to copy loadouts
Dubjunk Nov 19, 2018
dd9e206
replaced editbox with slider
Dubjunk Nov 19, 2018
ee57100
moved arsenal preset to arsenal settings
Dubjunk Nov 19, 2018
ec0abfb
some bugfixes and additions
Dubjunk Nov 19, 2018
d1baec2
Added function to define a default loadout
Dubjunk Nov 22, 2018
65aab0e
fixed some bugs for the new arsenal features
Dubjunk Nov 23, 2018
643fa8c
WiP new White/Blacklist system
Dubjunk Nov 24, 2018
66e91af
bugfix
Dubjunk Nov 24, 2018
4540851
Updated module ReadMe
Dubjunk Nov 24, 2018
6dfccd7
fixed some bugs with the BI arsenal
Dubjunk Nov 25, 2018
866282a
moved gearcheck to functions
Dubjunk Nov 25, 2018
978ec7c
added gear check on respawn
Dubjunk Nov 25, 2018
0064de7
added respawn gearCheck as eventHandler
Dubjunk Nov 25, 2018
77ae766
Merge branch 'v0.97S8' into v0.97S8-526
Dubjunk Nov 25, 2018
1c7eb5a
Update Missionframework/modules/06_arsenal/fnc/fn_arsenal_checkGear.sqf
Wyqer Nov 25, 2018
e88eb21
Update Missionframework/modules/06_arsenal/fnc/fn_arsenal_postInit.sqf
Wyqer Nov 25, 2018
6b02234
removed unused variables
Dubjunk Nov 25, 2018
3c43e02
suggestion mentioned by @Wyqer
Dubjunk Nov 25, 2018
cdad9e7
Merge branch 'v0.97S8-526' of https://github.com/KillahPotatoes/KP-Li…
Dubjunk Nov 25, 2018
06449ed
missing variable initialization
Dubjunk Nov 25, 2018
36f179a
added EH on ace arsenal opening
Dubjunk Nov 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
"KPLIB_param_sectorCap",
"KPLIB_param_sectorCapRange",
"KPLIB_param_stamina",
"KPLIB_param_arsenalType",
"KPLIB_param_copyDistance",
"KPLIB_plm_groups",
"KPR_fnc_getPlaytime",
"KPR_fnc_getRankName",
Expand Down
Binary file added Missionframework/KPGUI/res/icon_refresh.paa
Binary file not shown.
148 changes: 1 addition & 147 deletions Missionframework/KPLIB_config.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,159 +4,13 @@
File: KPLIB_config.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-10-16
Last Update: 2018-11-12
Last Update: 2018-11-24
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html

Description:
Contains all settings which are meant to be adjustable by players but aren't implemented in the mission settings.
*/

/*------------------------------------------------------------
--- BLACKLIST SETTINGS ---
Array for the general blacklist and for items which are blocked and shouldn't be blocked (mostly generated classnames).
Useless if you're using anything other than the "Blacklist Method" arsenal preset.
A whitelisted arsenal is always more performance friendly than 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.
------------------------------------------------------------*/

// Items which should be added as allowed Items. For items which get blacklisted, even if they are not in the KPLIB_arsenal_generalBlacklist array.
KPLIB_arsenal_addToWhitelist = [
"ItemRadioAcreFlagged",
"rhs_acc_ekp8_18b",
"rhs_acc_ekp8_18c",
"rhs_acc_ekp8_18d",
"rhsusf_acc_g33_T1_flip",
"rhsusf_acc_g33_xps3_flip",
"rhsusf_acc_g33_xps3_tan_flip",
"rhsusf_acc_anpeq15_bk_light_h",
"rhs_m136_mag",
"rhs_m136_hedp_mag",
"rhs_m136_hp_mag",
"rhs_weap_M136_used",
"rhs_m72a7_mag",
"BWA3_optic_ZO4x30_NSV",
"BWA3_optic_ZO4x30_IRV",
"BWA3_optic_ZO4x30_Single_NSV",
"BWA3_optic_ZO4x30_Single_IRV",
"BWA3_optic_EOTech_Mag_On",
"BWA3_optic_EOTech_Mag_Off",
"BWA3_optic_EOTech_tan_Mag_On",
"BWA3_optic_EOTech_tan_Mag_Off",
"BWA3_optic_20x50_NSV",
"BWA3_optic_24x72_NSV",
"BWA3_acc_VarioRay_flash",
"BWA3_acc_VarioRay_laser",
"BWA3_acc_LLM01_flash",
"BWA3_acc_LLM01_laser",
"BWA3_acc_LLM01_flash_underbarrel",
"BWA3_acc_LLM01_laser_underberrel",
"BWA3_acc_LLM01_laser_underbarrel",
"UK3CB_BAF_AT4_CS_AP_Mag",
"UK3CB_BAF_Javelin_Launcher",
"sma_spitfire_03_rds_low_ard_red",
"ACE_Chemlight_Shield_Orange",
"ACE_Chemlight_Shield_White",
"ACE_Chemlight_Shield_Blue",
"ACE_Chemlight_Shield_Yellow",
"ACE_Chemlight_Shield_Green",
"ACE_Chemlight_Shield_Red",
"ACE_ReserveParachute"
];
// Array of blacklisted item classnames.
KPLIB_arsenal_generalBlacklist = [
"I_HMG_01_weapon_F",
"B_HMG_01_weapon_F",
"O_HMG_01_weapon_F",
"I_HMG_01_A_weapon_F",
"B_HMG_01_A_weapon_F",
"O_HMG_01_A_weapon_F",
"I_HMG_01_high_weapon_F",
"B_HMG_01_high_weapon_F",
"O_HMG_01_high_weapon_F",
"I_GMG_01_weapon_F",
"B_GMG_01_weapon_F",
"O_GMG_01_weapon_F",
"I_GMG_01_A_weapon_F",
"B_GMG_01_A_weapon_F",
"O_GMG_01_A_weapon_F",
"I_GMG_01_high_weapon_F",
"B_GMG_01_high_weapon_F",
"O_GMG_01_high_weapon_F",
"I_Mortar_01_support_F",
"B_Mortar_01_support_F",
"O_Mortar_01_support_F",
"I_Mortar_01_weapon_F",
"B_Mortar_01_weapon_F",
"O_Mortar_01_weapon_F",
"I_HMG_01_support_F",
"B_HMG_01_support_F",
"O_HMG_01_support_F",
"I_HMG_01_support_high_F",
"B_HMG_01_support_high_F",
"O_HMG_01_support_high_F",
"I_AA_01_weapon_F",
"B_AA_01_weapon_F",
"O_AA_01_weapon_F",
"I_AT_01_weapon_F",
"B_AT_01_weapon_F",
"O_AT_01_weapon_F",
"I_UAV_01_backpack_F",
"B_UAV_01_backpack_F",
"O_UAV_01_backpack_F",
"I_UAV_06_backpack_F",
"B_UAV_06_backpack_F",
"O_UAV_06_backpack_F",
"I_UAV_06_medical_backpack_F",
"B_UAV_06_medical_backpack_F",
"O_UAV_06_medical_backpack_F",
"C_UAV_06_backpack_F",
"C_UAV_06_medical_backpack_F",
"C_IDAP_UAV_01_backpack_F",
"C_IDAP_UAV_06_backpack_F",
"C_IDAP_UAV_06_medical_backpack_F",
"C_IDAP_UAV_06_antimine_backpack_F",
"B_Respawn_Sleeping_bag_blue_F",
"B_Respawn_Sleeping_bag_brown_F",
"B_Respawn_TentDome_F",
"B_Respawn_Sleeping_bag_F",
"B_Respawn_TentA_F",
"RHS_M2_Gun_Bag",
"RHS_M2_Tripod_Bag",
"rhs_M252_Gun_Bag",
"rhs_M252_Bipod_Bag",
"RHS_M2_MiniTripod_Bag",
"RHS_Mk19_Gun_Bag",
"RHS_Mk19_Tripod_Bag",
"rhs_Tow_Gun_Bag",
"rhs_TOW_Tripod_Bag",
"RHS_Podnos_Bipod_Bag",
"RHS_Podnos_Gun_Bag",
"RHS_Metis_Gun_Bag",
"RHS_Metis_Tripod_Bag",
"RHS_Kornet_Gun_Bag",
"RHS_Kornet_Tripod_Bag",
"RHS_AGS30_Tripod_Bag",
"RHS_AGS30_Gun_Bag",
"RHS_DShkM_Gun_Bag",
"RHS_DShkM_TripodHigh_Bag",
"RHS_DShkM_TripodLow_Bag",
"RHS_Kord_Tripod_Bag",
"RHS_Kord_Gun_Bag",
"RHS_NSV_Tripod_Bag",
"RHS_NSV_Gun_Bag",
"RHS_SPG9_Gun_Bag",
"RHS_SPG9_Tripod_Bag",
"UK3CB_BAF_L16",
"UK3CB_BAF_L16_Tripod",
"UK3CB_BAF_M6",
"UK3CB_BAF_L111A1",
"UK3CB_BAF_L134A1",
"UK3CB_BAF_Tripod",
"optic_Nightstalker",
"optic_tws",
"optic_tws_mg"
];

/*------------------------------------------------------------
--- SAVE SETTINGS ---
Settings concerning the internal save system.
Expand Down
3 changes: 2 additions & 1 deletion Missionframework/KPLIB_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: KPLIB_functions.hpp
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-10-16
Last Update: 2018-11-10
Last Update: 2018-11-12
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html

Description:
Expand All @@ -19,6 +19,7 @@ class KPLIB {
#include "modules\03_respawn\functions.hpp"
#include "modules\04_build\functions.hpp"
#include "modules\05_garrison\functions.hpp"
#include "modules\06_arsenal\functions.hpp"
#include "modules\99_adm\functions.hpp"
#include "modules\99_plm\functions.hpp"
};
3 changes: 2 additions & 1 deletion Missionframework/KPLIB_ui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: KPLIB_ui.hpp
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-10-16
Last Update: 2018-11-10
Last Update: 2018-11-12
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html

Description:
Expand All @@ -16,5 +16,6 @@
#include "modules\02_core\ui.hpp"
#include "modules\03_respawn\ui.hpp"
#include "modules\04_build\ui.hpp"
#include "modules\06_arsenal\ui.hpp"
#include "modules\99_adm\ui.hpp"
#include "modules\99_plm\ui.hpp"
4 changes: 0 additions & 4 deletions Missionframework/modules/00_init/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ This module uses no data or functions from other modules.

*Creates locked vehicle markers.*

* KPLIB_fnc_init_fillArsenal

*Initializes the virtual arsenal.*

* KPLIB_fnc_init_filterMods

*Filters not available classnames out of a given array of classnames.*
Expand Down
119 changes: 0 additions & 119 deletions Missionframework/modules/00_init/fnc/fn_init_fillArsenal.sqf

This file was deleted.

3 changes: 0 additions & 3 deletions Missionframework/modules/00_init/fnc/fn_init_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ if (isServer) then {
// Load preset files
[] call KPLIB_fnc_init_loadPresets;

// Load arsenal
[] call KPLIB_fnc_init_fillArsenal;

// Sort the sector markers to category arrays
[] call KPLIB_fnc_init_sortSectors;

Expand Down
4 changes: 1 addition & 3 deletions Missionframework/modules/00_init/fnc/fn_init_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
File: fn_init_preInit.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2017-08-31
Last Update: 2018-11-12
Last Update: 2018-11-24
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html

Description:
Expand Down Expand Up @@ -50,8 +50,6 @@ if (isServer) then {
----- Module Globals -----
*/

// Array of all whitelisted arsenal items
KPLIB_arsenal_whitelist = [];
// Variable for ending the campaign
KPLIB_campaignRunning = true;
// Respawn position shortcut
Expand Down
Loading