Skip to content

Commit 9e19e33

Browse files
authored
Merge pull request #567 from KillahPotatoes/v0.97S10-533
Logistic module pt1
2 parents baa587e + 518f706 commit 9e19e33

28 files changed

+1721
-10
lines changed

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@
1414
"KPLIB_eden_boxspawn",
1515
"KPLIB_eden_potatospawn",
1616
"KPLIB_eden_startbase",
17+
"KPLIB_param_aceResupply",
18+
"KPLIB_param_ammoInfluence",
1719
"KPLIB_param_arsenalType",
1820
"KPLIB_param_clearVehicleCargo",
1921
"KPLIB_param_commanderZeusMode",
2022
"KPLIB_param_copyDistance",
2123
"KPLIB_param_crateVolume",
24+
"KPLIB_param_damageInfluence",
2225
"KPLIB_param_debug",
2326
"KPLIB_param_fobRange",
27+
"KPLIB_param_fuelInfluence",
2428
"KPLIB_param_limitedZeusCeiling",
2529
"KPLIB_param_limitedZeusRadius",
2630
"KPLIB_param_mobileRespawn",
@@ -29,6 +33,14 @@
2933
"KPLIB_param_presetE",
3034
"KPLIB_param_presetF",
3135
"KPLIB_param_presetR",
36+
"KPLIB_param_recycleFactor",
37+
"KPLIB_param_refundSupply",
38+
"KPLIB_param_refundAmmo",
39+
"KPLIB_param_refundFuel",
40+
"KPLIB_param_resupplyAmmoCost",
41+
"KPLIB_param_resupplyFuelCost",
42+
"KPLIB_param_resupplyGallCost",
43+
"KPLIB_param_resupplyMagCost",
3244
"KPLIB_param_reviveBleedOutDuration",
3345
"KPLIB_param_reviveDuration",
3446
"KPLIB_param_reviveForceRespawnDuration",

Missionframework/KPLIB_functions.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ class KPLIB {
2626
#include "modules\14_virtual\functions.hpp"
2727
#include "modules\15_build\functions.hpp"
2828
#include "modules\16_garrison\functions.hpp"
29+
#include "modules\23_logistic\functions.hpp"
2930
#include "modules\24_enemy\functions.hpp"
3031
};

Missionframework/KPLIB_ui.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: KPLIB_ui.hpp
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2017-10-16
7-
Last Update: 2018-12-14
7+
Last Update: 2019-01-16
88
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
99
1010
Description:
@@ -22,3 +22,4 @@
2222
#include "modules\13_plm\ui.hpp"
2323
#include "modules\14_virtual\ui.hpp"
2424
#include "modules\15_build\ui.hpp"
25+
#include "modules\23_logistic\ui.hpp"

Missionframework/modules/01_common/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ This module uses no data or functions from other modules.
3636

3737
*Gets path for className icon.*
3838

39+
* KPLIB_fnc_common_getPlayerFob
40+
41+
*Returns the FOB of the given player.*
42+
3943
* KPLIB_fnc_common_getPos
4044

4145
*getPos wrapper for ATL positions.*
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
KPLIB_fnc_common_getPlayerFob
3+
4+
File: fn_common_getPlayerFob.sqf
5+
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
6+
Date: 2019-02-24
7+
Last Update: 2019-02-24
8+
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
9+
10+
Description:
11+
Returns the FOB of the given player.
12+
13+
Parameter(s):
14+
_player - Player which should be checked [OBJECT, defaults player]
15+
16+
Returns:
17+
FOB of the player to check
18+
*/
19+
20+
params [
21+
["_player", player, [objNull]]
22+
];
23+
24+
(_player getVariable ["KPLIB_fob", ""])

Missionframework/modules/01_common/functions.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: functions.hpp
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2018-09-15
7-
Last Update: 2018-12-11
7+
Last Update: 2019-02-24
88
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
99
1010
Description:
@@ -41,6 +41,9 @@ class common {
4141
// Gets path for className icon
4242
class common_getIcon {};
4343

44+
// Returns the FOB of the given player
45+
class common_getPlayerFob {};
46+
4447
// getPos wrapper for ATL positions
4548
class common_getPos {};
4649

Missionframework/modules/12_arsenal/ui/KPLIB_arsenal.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: KPLIB_arsenal.hpp
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2018-11-12
7-
Last Update: 2018-12-14
7+
Last Update: 2019-02-24
88
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
99
1010
Description:
@@ -65,7 +65,7 @@ class KPLIB_arsenal {
6565
y = KP_GETCY(KP_Y_VAL_C,KP_HEIGHT_VAL_C,39,48);
6666
w = KP_GETW(KP_WIDTH_VAL_C,12);
6767
h = KP_GETH(KP_HEIGHT_VAL_C,24);
68-
tooltip = "$STR_KPLIB_DIALOG_ARSENAL_REFRESH_TT";
68+
tooltip = "$STR_KPLIB_REFRESH";
6969
action = "[] call KPLIB_fnc_arsenal_getNearPlayers";
7070
};
7171

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# KP Liberation Module Description
2+
3+
## Logistic Module
4+
5+
6+
### Dependencies
7+
* Init
8+
* Common
9+
10+
### Consumed events
11+
12+
13+
### Emitted events
14+
15+
16+
### Functions
17+
18+
19+
### Scripts
20+
No scripts will be started by this module
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
KPLIB_fnc_logistic_addActions
3+
4+
File: fn_logistic_addActions.sqf
5+
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
6+
Date: 2019-01-16
7+
Last Update: 2019-02-24
8+
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
9+
10+
Description:
11+
Adds all actions to the spawned logistic building.
12+
13+
Parameter(s):
14+
_object - Spawned object to take care of [OBJECT, defaults to objNull]
15+
16+
Returns:
17+
Function reached the end [BOOL]
18+
*/
19+
20+
params [
21+
["_object", objNull, [objNull]]
22+
];
23+
24+
if ((typeOf _object) isEqualTo KPLIB_logistic_building) then {
25+
// Add main menu dialog action to object
26+
[
27+
_object,
28+
"STR_KPLIB_ACTION_LOGISTIC",
29+
[{[] call KPLIB_fnc_logistic_openDialog;}, nil, -500, false, true, "", "", 4]
30+
] remoteExecCall ["KPLIB_fnc_common_addAction", 0, true];
31+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
KPLIB_fnc_logistic_addMenu
3+
4+
File: fn_logistic_addMenu.sqf
5+
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
6+
Date: 2019-01-17
7+
Last Update: 2019-02-24
8+
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
9+
10+
Description:
11+
Adds a new menu to the logistic main menu.
12+
13+
Parameter(s):
14+
_menu - Menu name [STRING, defaults to ""]
15+
_condition - Code which is executed on button click [CODE, defaults to {false}]
16+
_string - Menu name stringtable path [STRING, defaults to ""]
17+
18+
Returns:
19+
Function reached the end [BOOL]
20+
*/
21+
22+
params [
23+
["_menu", "", [""]],
24+
["_code", {false}, [{}]],
25+
["_string", "", [""]]
26+
];
27+
28+
// Read the registered menus
29+
private _menus = KPLIB_logistic_data getVariable ["menus", []];
30+
31+
// Append the new menu and save the variable
32+
_menus pushBack [_menu, _code, _string];
33+
KPLIB_logistic_data setVariable ["menus", _menus, true];
34+
35+
true

0 commit comments

Comments
 (0)