Skip to content

Commit 5e0b118

Browse files
Merge branch 'v0.96.8' into v0.96.8-cratefiller_integration
2 parents ab6a63d + 38a220e commit 5e0b118

File tree

115 files changed

+10981
-5202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+10981
-5202
lines changed

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@master
1414

15-
- uses: docker://node:10-alpine
15+
- uses: docker://node:20-alpine
1616
name: Setup Node
1717

1818
- name: Install dependencies
19-
working-directory: _tools
19+
working-directory: _tools/build-tool
2020
run: npm install
2121

2222
- name: Assemble and pack
23-
working-directory: _tools
23+
working-directory: _tools/build-tool
2424
run: npx gulp
2525

2626
- uses: actions/upload-artifact@master
2727
with:
2828
name: PBO-Files
29-
path: _tools/build/pbo
29+
path: build/pbo
3030

.gitignore

+4-48
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,11 @@
1-
# Windows image file caches
2-
Thumbs.db
3-
ehthumbs.db
1+
# dev mission.sqm
2+
/Missionframework/mission.sqm
43

5-
# Folder config file
6-
Desktop.ini
7-
8-
# Recycle Bin used on file shares
9-
$RECYCLE.BIN/
10-
11-
# Windows Installer files
12-
*.cab
13-
*.msi
14-
*.msm
15-
*.msp
16-
17-
# Windows shortcuts
18-
*.lnk
19-
20-
# =========================
21-
# Operating System Files
22-
# =========================
23-
24-
# OSX
25-
# =========================
26-
27-
.DS_Store
28-
.AppleDouble
29-
.LSOverride
30-
31-
# Thumbnails
32-
._*
33-
34-
# Files that might appear in the root of a volume
35-
.DocumentRevisions-V100
36-
.fseventsd
37-
.Spotlight-V100
38-
.TemporaryItems
39-
.Trashes
40-
.VolumeIcon.icns
41-
42-
# Directories potentially created on remote AFP share
43-
.AppleDB
44-
.AppleDesktop
45-
Network Trash Folder
46-
Temporary Items
47-
.apdisk
4+
# Tools local configs
5+
/_tools/config.ps1
486

497
# Build directory
508
/build/
51-
/_tools/build/
52-
/_tools/node_modules/
539

5410
# KP-Steam
5511
steam_appid.txt

.vscode/tasks.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Launch game",
8+
"type": "shell",
9+
"command": "powershell -c '. ${workspaceFolder}/_tools/vscode/Run-Game.ps1'",
10+
"problemMatcher": [],
11+
"group": {
12+
"kind": "build"
13+
}
14+
},
15+
{
16+
"label": "Setup",
17+
"type": "shell",
18+
"command": "powershell -c '. ${workspaceFolder}/_tools/vscode/Invoke-Setup.ps1'",
19+
"problemMatcher": []
20+
}
21+
]
22+
}

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,22 @@
33
## 0.96.8 (TBD)
44
* Added: Czech translation. Thanks to [MJVEVERUSKA](https://github.com/MJVEVERUSKA)
55
* Added: KP cratefiller available at the logistic station.
6-
* Tweaked: Splitted the config file in seperate files, as it was getting quite big.
6+
* Added: Ability to carry ressource crates.
7+
* Added: Scripts/configs to setup and run development environment from VSCode tasks
8+
* Updated: Italian localization. Thanks to [k4s0](https://github.com/k4s0)
9+
* Tweaked: Splitted the config file in separate files, as it was getting quite big.
710
* Tweaked: Unified the prefix of all variables to `KPLIB_`.
811
* Tweaked: Arsenal presets are now in the presets folder.
912
* Tweaked: Blacklist and arsenal extension are now own files in presets/arsenal.
1013
* Tweaked: Renamed blufor/opfor to players/enemies, to possibly avoid further confusion with using an opfor faction for a player preset.
1114
* Tweaked: Parameter value variables are having a `param` prefix now.
1215
* Tweaked: Comments/structure of the config file. Also added some category prefix sorting to some config variables.
1316
* Tweaked: GM East enemy preset, lower the chance for unarmed BRDM.
17+
* Tweaked: Moved mission build tool into subdirectory
1418
* Fixed: Description.ext stated 34 players while there are also 3 additional HC slots, so 37 in total.
1519
* Fixed: Sector monitor got stuck after sector cap was reached until restarting the server.
1620
* Fixed: FOB truck got mass set, but should've just apply to FOB boxes.
21+
* Fixed: Chernarus Winter (and summer) weren't recognized for ignored buildings list for civ rep loss.
1722

1823
## 0.96.7a (2020-09-12)
1924
* Added: Contact DLC static weapon backpacks to default blacklist.

Missionbasefiles/kp_liberation.pja310/mission.sqm

+1-1
Original file line numberDiff line numberDiff line change
@@ -3827,7 +3827,7 @@ class Mission
38273827
dataType="Marker";
38283828
position[]={6960.8052,0,11203.651};
38293829
name="capture_45";
3830-
text="Applejakerie Village";
3830+
text="Ajak's Village";
38313831
type="n_art";
38323832
colorName="ColorEAST";
38333833
id=714;

Missionframework/KPLIB_config.sqf

+6
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,9 @@ KPLIB_surrender_chance = 80;
360360
KPLIB_battlegroup_clearance = [
361361
"song_bin_tanh"
362362
];
363+
364+
// Delay after death for wrecks and corpses to be deleted
365+
KPLIB_cleanup_delay = 1200;
366+
367+
// Fill magazines on loading loadout?
368+
KP_liberation_fill_mags = true;

Missionframework/functions/fn_addActionsPlayer.sqf

+30-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
File: fn_addActionsPlayer.sqf
33
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
44
Date: 2020-04-13
5-
Last Update: 2020-09-12
5+
Last Update: 2023-10-28
66
License: MIT License - http://www.opensource.org/licenses/MIT
77
88
Description:
@@ -370,4 +370,33 @@ _player addAction [
370370
"
371371
];
372372

373+
// Drop crate
374+
_player addAction [
375+
["<t color='#FFFF00'>", localize "STR_ACTION_CRATE_DROP", "</t>"] joinString "",
376+
{
377+
params ["_player"];
378+
private _crate = _player getVariable ["KPLIB_carriedObject", objNull];
379+
380+
// prevent players from putting crates inside vehicles
381+
private _crateSize = sizeOf typeOf _crate * 1.5;
382+
private _nearObjects = (_crate nearEntities [["Man", "Air", "Car", "Tank"], _crateSize]) - [_crate, _player];
383+
if (_nearObjects isNotEqualTo []) exitWith {
384+
hint format [localize "STR_PLACEMENT_IMPOSSIBLE", count _nearObjects, _crateSize toFixed 0];
385+
};
386+
387+
_player setVariable ["KPLIB_carriedObject", nil];
388+
detach _crate;
389+
_crate awake true;
390+
},
391+
nil,
392+
-504,
393+
true,
394+
false,
395+
"",
396+
toString {
397+
alive _originalTarget &&
398+
build_confirmed == 0 && _this in _this && {!isNull (_this getVariable ["KPLIB_carriedObject", objNull])}
399+
}
400+
];
401+
373402
true

Missionframework/functions/fn_createManagedUnit.sqf

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
File: fn_createManagedUnit.sqf
33
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
44
Date: 2019-10-04
5-
Last Update: 2019-12-04
5+
Last Update: 2023-10-28
66
License: MIT License - http://www.opensource.org/licenses/MIT
77
88
Description:
@@ -34,7 +34,11 @@ isNil {
3434
private _groupTemp = createGroup [CIVILIAN, true];
3535

3636
_unit = _groupTemp createUnit [_type, _spawnPos, [], _placement, "FORM"];
37-
_unit addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
37+
_unit addMPEventHandler ["MPKilled", {
38+
params ["_unit", "_killer"];
39+
["KPLIB_manageKills", [_unit, _killer]] call CBA_fnc_localEvent;
40+
}];
41+
3842
_unit setRank _rank;
3943

4044
// Join to target group to preserve Side

Missionframework/functions/fn_handlePlacedZeusObject.sqf

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
File: fn_handlePlacedZeusObject.sqf
33
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
44
Date: 2020-04-11
5-
Last Update: 2020-05-10
5+
Last Update: 2023-10-28
66
License: MIT License - http://www.opensource.org/licenses/MIT
77
88
Description:
@@ -32,14 +32,20 @@ if (_vehicle) then {
3232

3333
// Add kill manager and object init to possible crew units
3434
{
35-
_x addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
35+
_x addMPEventHandler ["MPKilled", {
36+
params ["_unit", "_killer"];
37+
["KPLIB_manageKills", [_unit, _killer]] call CBA_fnc_localEvent;
38+
}];
3639
[_x] call KPLIB_fnc_addObjectInit;
3740
} forEach (crew _obj);
3841
};
3942

4043
// Apply kill manager, if it's not a crate
4144
if !(_crate) then {
42-
_obj addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
45+
_obj addMPEventHandler ["MPKilled", {
46+
params ["_unit", "_killer"];
47+
["KPLIB_manageKills", [_unit, _killer]] call CBA_fnc_localEvent;
48+
}];
4349
} else {
4450
// Otherwise apply all needed values/functionalities
4551
_obj setMass 500;

Missionframework/functions/fn_spawnVehicle.sqf

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
File: fn_spawnVehicle.sqf
33
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
44
Date: 2019-12-03
5-
Last Update: 2020-05-15
5+
Last Update: 2023-10-28
66
License: MIT License - http://www.opensource.org/licenses/MIT
77
88
Description:
@@ -84,11 +84,19 @@ if (_classname in KPLIB_o_militiaVehicles) then {
8484
private _crew = units (createVehicleCrew _newvehicle);
8585
_crew joinSilent _grp;
8686
sleep 0.1;
87-
{_x addMPEventHandler ["MPKilled", {_this spawn kill_manager}];} forEach _crew;
87+
{
88+
_x addMPEventHandler ["MPKilled", {
89+
params ["_unit", "_killer"];
90+
["KPLIB_manageKills", [_unit, _killer]] call CBA_fnc_localEvent;
91+
}];
92+
} forEach _crew;
8893
};
8994

90-
// Add MPKilled and GetIn EHs and enable damage again
91-
_newvehicle addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
95+
// Add Killed and GetIn EHs and enable damage again
96+
_newvehicle addMPEventHandler ["MPKilled", {
97+
params ["_unit", "_killer"];
98+
["KPLIB_manageKills", [_unit, _killer]] call CBA_fnc_localEvent;
99+
}];
92100
sleep 0.1;
93101
_newvehicle allowDamage true;
94102
_newvehicle setDamage 0;

Missionframework/scripts/client/actions/intel_manager.sqf

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
scriptName "intel_manager";
12
// TODO Remove this loop by adding the actions to the units/intel objects on spawn
23
waitUntil {!isNil "KPLIB_permissions"};
34
waitUntil {!(KPLIB_permissions isEqualTo []) || !KPLIB_param_permissions};

Missionframework/scripts/client/actions/open_arsenal.sqf

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
scriptName "open_arsenal";
2+
13
if (KPLIB_param_directArsenal) exitWith {
24
if (KP_liberation_ace && KP_liberation_arsenal_type) then {
35
[player, player, false] call ace_arsenal_fnc_openBox;
@@ -83,7 +85,7 @@ while { dialog && (alive player) && edit_loadout == 0 } do {
8385
if ( load_loadout > 0 ) then {
8486
private _loaded_loadout = _loadouts_data select (lbCurSel 201);
8587
if (KPLIB_ace && KPLIB_param_arsenalType) then {
86-
player setUnitLoadout (_loaded_loadout select 1);
88+
[player, _loaded_loadout select 1, KP_liberation_fill_mags] call CBA_fnc_setLoadout;
8789
} else {
8890
[player, [profileNamespace, _loaded_loadout]] call BIS_fnc_loadInventory;
8991
};

Missionframework/scripts/client/actions/recycle_manager.sqf

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
scriptName "recycle_manager";
2+
13
private _recycleable_vehicles = [];
24
private _recycleable_classnames = [];
35
veh_action_detect_distance = 20;

Missionframework/scripts/client/actions/unflip_manager.sqf

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
scriptName "unflip_manager";
2+
13
waitUntil {!isNil "KPLIB_permissions"};
24
waitUntil {!(KPLIB_permissions isEqualTo []) || !KPLIB_param_permissions};
35

Missionframework/scripts/client/ammoboxes/ammobox_action_manager.sqf

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
scriptName "ammobox_action_manager";
2+
13
waitUntil {!isNil "build_confirmed"};
24
waitUntil {!isNil "one_synchro_done"};
35
waitUntil {!isNil "one_eco_done"};
@@ -57,10 +59,24 @@ while {true} do {
5759
_b_action_id2 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_STORE_CRATE" + "</t>",{[(_this select 0), (nearestObjects [player,KPLIB_storageBuildings,20]) select 0,true] call KPLIB_fnc_crateToStorage;},"",-502,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
5860
_b_action_id3 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_VALUE" + "</t>",{[_this select 0] call KPLIB_fnc_checkCrateValue;uiSleep 3; hint "";},"",-503,true,true,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
5961
_b_action_id4 = _next_box addAction ["<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_PUSH" + "</t>",{(_this select 0) setPos ((_this select 0) getPos [1, (player getDir (_this select 0))]);},"",-504,true,false,"","build_confirmed == 0 && (_this distance _target < 5) && (vehicle player == player)"];
62+
_b_action_id_carry = _next_box addAction [
63+
"<t color='#FFFF00'>" + localize "STR_ACTION_CRATE_CARRY" + "</t>",
64+
{
65+
params ["_crate", "_player"];
66+
_crate attachTo [_player, [0, 2, 1]];
67+
_player setVariable ["KPLIB_carriedObject", _crate];
68+
},
69+
"", -504, true, false, "",
70+
toString {
71+
build_confirmed == 0 && _this in _this && {isNull (_this getVariable ["KPLIB_carriedObject", objNull])}
72+
},
73+
5 // radius
74+
];
6075
_next_box setVariable ["KPLIB_ammo_box_action", _b_action_id1, false];
6176
_next_box setVariable ["KP_crate_store_action", _b_action_id2, false];
6277
_next_box setVariable ["KP_crate_value_action", _b_action_id3, false];
6378
_next_box setVariable ["KP_crate_push_action", _b_action_id4, false];
79+
_next_box setVariable ["KP_crate_carry_action", _b_action_id_carry, false];
6480
_managed_boxes pushback _next_box;
6581
};
6682

@@ -75,6 +91,8 @@ while {true} do {
7591
_next_box removeAction (_next_box getVariable ["KP_crate_store_action", -1]);
7692
_next_box removeAction (_next_box getVariable ["KP_crate_value_action", -1]);
7793
_next_box removeAction (_next_box getVariable ["KP_crate_push_action", -1]);
94+
_next_box removeAction (_next_box getVariable ["KP_crate_carry_action", -1]);
95+
_next_box removeAction (_next_box getVariable ["KP_crate_drop_action", -1]);
7896
}
7997
} foreach _managed_boxes;
8098

Missionframework/scripts/client/asymmetric/asymm_notifications.sqf

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
scriptName "asymm_notificatins";
12
if (isDedicated) exitWith {};
23

34
params ["_notif_id", ["_pos", getpos player]];

Missionframework/scripts/client/build/build_overlay.sqf

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
scriptName "build_overlay";
2+
13
KPLIB_conflicting_objects = [];
24
KPLIB_buildoverlay_icon = "\A3\ui_f\data\map\markers\handdrawn\objective_CA.paa";
35
KPLIB_buildoverlay_color = [ 1, 0, 0, 1 ];

0 commit comments

Comments
 (0)