Skip to content

Commit baa587e

Browse files
authored
Merge pull request #566 from KillahPotatoes/v0.97S10-529
Enemy module pt1
2 parents 32fa525 + 1523a8b commit baa587e

File tree

59 files changed

+1207
-74
lines changed

Some content is hidden

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

59 files changed

+1207
-74
lines changed

Missionframework/KPLIB_functions.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: KPLIB_functions.hpp
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2017-10-16
7-
Last Update: 2018-12-13
7+
Last Update: 2019-02-02
88
99
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
1010
@@ -26,4 +26,5 @@ 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\24_enemy\functions.hpp"
2930
};

Missionframework/modules/01_common/fnc/fn_common_createCrew.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: fn_common_createCrew.sqf
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2018-10-25
7-
Last Update: 2018-12-17
7+
Last Update: 2019-02-23
88
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
99
1010
Description:
@@ -53,7 +53,7 @@ private _crewClasses = _turrets apply {
5353
};
5454

5555
// Spawn group and move into to vehicle
56-
private _grp = [_side, _driverClass + _crewClasses, getPos _vehicle] call KPLIB_fnc_common_createGroup;
56+
private _grp = [_driverClass + _crewClasses, getPos _vehicle, _side] call KPLIB_fnc_common_createGroup;
5757
// Move the units into the vehicle, -1 indicates driver
5858
{
5959
if (_forEachIndex isEqualTo 0) then {

Missionframework/modules/01_common/fnc/fn_common_createGroup.sqf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
File: fn_common_createGroup.sqf
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2018-10-24
7-
Last Update: 2018-12-08
7+
Last Update: 2019-02-23
88
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
99
1010
Description:
1111
Creates a group at given side with units according to given array of classnames and fires the Liberation group created event.
1212
1313
Parameter(s):
14-
_side - Side of the group [SIDE, defaults to KPLIB_preset_sideE]
1514
_units - Array of classnames to spawn as group members [ARRAY, defaults to []]
1615
_spawnPos - Position to spawn the group and units [POSITION, defaults to KPLIB_zeroPos]
16+
_side - Side of the group [SIDE, defaults to KPLIB_preset_sideE]
1717
_addition - Additional argument for unit creation [STRING, defaults to "NONE"]
1818
1919
Returns:
2020
Created group [GROUP]
2121
*/
2222

2323
params [
24-
["_side", KPLIB_preset_sideE, [sideEmpty]],
2524
["_units", [], [[]]],
2625
["_spawnPos", [KPLIB_zeroPos], [[]], [3]],
26+
["_side", KPLIB_preset_sideE, [sideEmpty]],
2727
["_addition", "NONE", [""]]
2828
];
2929

Missionframework/modules/01_common/fnc/fn_common_getFobAlphabetName.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: fn_common_getFobAlphabetName.sqf
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2018-11-27
7-
Last Update: 2018-12-08
7+
Last Update: 2019-02-23
88
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
99
1010
Description:
@@ -20,7 +20,7 @@ params [
2020
["_fob", "", [""]]
2121
];
2222

23-
private _index = KPLIB_sectors_fobs findIf {_x == _fob};
23+
private _index = KPLIB_sectors_fobs find _fob;
2424

2525
if (_index isEqualTo -1) then {
2626
""

Missionframework/modules/02_core/fnc/fn_core_areUnitsNear.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: fn_core_areUnitsNear.sqf
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2018-05-07
7-
Last Update: 2018-12-08
7+
Last Update: 2019-02-23
88
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
99
1010
Description:
@@ -19,7 +19,7 @@
1919
Result [BOOL]
2020
*/
2121

22-
// TODO
22+
// !TODO!
2323
// Guess we can move this to common
2424

2525
params [

Missionframework/modules/02_core/fnc/fn_core_changeSectorOwner.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: fn_core_changeSectorOwner.sqf
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2018-05-07
7-
Last Update: 2018-11-27
7+
Last Update: 2019-02-23
88
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
99
1010
Description:
@@ -27,7 +27,7 @@ if (_toPlayerSide) then {
2727
KPLIB_sectors_blufor pushBack _sectorToChange;
2828
[] call KPLIB_fnc_core_checkWinCond;
2929
} else {
30-
KPLIB_sectors_blufor deleteAt (KPLIB_sectors_blufor findIf {_x isEqualTo _sectorToChange});
30+
KPLIB_sectors_blufor deleteAt (KPLIB_sectors_blufor find _sectorToChange);
3131
};
3232

3333
publicVariable "KPLIB_sectors_blufor";

Missionframework/modules/02_core/fnc/fn_core_handleVehicleSpawn.sqf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: fn_core_handleVehicleSpawn.sqf
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2018-09-10
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:
@@ -29,7 +29,7 @@ switch (typeOf _vehicle) do {
2929
_vehicle,
3030
"STR_KPLIB_ACTION_DEPLOY",
3131
[{["KPLIB_fob_build_requested", _this select 0] call CBA_fnc_localEvent}, true, -800, false, true, "", "[_target, _this] call KPLIB_fnc_core_canBuildFob", 10]
32-
] remoteExecCall ["KPLIB_fnc_common_addAction", 0, true];
32+
] remoteExecCall ["KPLIB_fnc_common_addAction", 0, _vehicle];
3333
};
3434

3535
case KPLIB_preset_respawnTruckF;
@@ -41,7 +41,7 @@ switch (typeOf _vehicle) do {
4141
_vehicle,
4242
"STR_KPLIB_ACTION_REDEPLOY",
4343
[{["KPLIB_respawn_requested", _this] call CBA_fnc_localEvent}, nil, -801, false, true, "", "_this == vehicle _this", 10]
44-
] remoteExecCall ["KPLIB_fnc_common_addAction", 0, true];
44+
] remoteExecCall ["KPLIB_fnc_common_addAction", 0, _vehicle];
4545
};
4646

4747
case KPLIB_preset_addHeliF: {
@@ -52,7 +52,7 @@ switch (typeOf _vehicle) do {
5252
"STR_KPLIB_ACTION_HELIMOVE",
5353
[{[_this select 0] call KPLIB_fnc_core_heliToDeck;}, nil, 10, true, true, "", "(_target distance KPLIB_eden_startbase) < 20", 4],
5454
"#FF8000"
55-
] remoteExecCall ["KPLIB_fnc_common_addAction", 0, true];
55+
] remoteExecCall ["KPLIB_fnc_common_addAction", 0, _vehicle];
5656
};
5757
};
5858
};

Missionframework/modules/02_core/fnc/fn_core_spawnPotato.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: fn_core_spawnPotato.sqf
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2017-05-01
7-
Last Update: 2018-12-08
7+
Last Update: 2019-02-23
88
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
99
1010
Description:
@@ -18,7 +18,7 @@
1818
*/
1919

2020
// Check if there wasn't a Potato 01 already spawned or if the spawned one is destroyed.
21-
// NOTE: As the loading will happen before this function is called, it won't interfere with a loaded Potato 01.
21+
// !NOTE! As the loading will happen before this function is called, it won't interfere with a loaded Potato 01.
2222
if(!isServer || alive KPLIB_core_potato01) exitWith {};
2323

2424
// If Potato 01 wreck is too close to respawn we should delete it.

Missionframework/modules/02_core/fnc/fn_core_spawnStartFobBox.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: fn_core_spawnStartFobBox.sqf
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2018-05-09
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,7 +41,7 @@ private _fobBox = [KPLIB_preset_fobBoxF, [_spawnPos select 0, _spawnPos select 1
4141
"STR_KPLIB_ACTION_DEPLOYRANDOM",
4242
[{[_this select 0] call KPLIB_fnc_core_buildFobRandom;}, true, -800, false, true, "", "(_target distance KPLIB_eden_boxspawn) < 3 && KPLIB_sectors_fobs isEqualTo []", 4],
4343
"#FF0000"
44-
] remoteExecCall ["KPLIB_fnc_common_addAction", 0, true];
44+
] remoteExecCall ["KPLIB_fnc_common_addAction", 0, _fobBox];
4545

4646
// Add event handler to call this script again if box was destroyed.
4747
_fobBox addMPEventHandler ["MPKilled", {[_this select 0] call KPLIB_fnc_core_spawnStartFobBox}];

Missionframework/modules/02_core/scripts/server/sectorMonitor.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
File: sectorMonitor.sqf
55
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
66
Date: 2018-05-05
7-
Last Update: 2018-11-09
7+
Last Update: 2019-02-23
88
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
99
1010
Description:
@@ -15,7 +15,7 @@ scriptName "KPLIB_sectorMonitor";
1515
if(isServer) then {
1616

1717
// Update sector markers every time sector state was changed
18-
{[_x, {call KPLIB_fnc_core_updateSectorMarkers}] call CBA_fnc_addEventHandler;} forEach ["KPLIB_sector_activated", "KPLIB_sector_deactivated"];
18+
{[_x, {[] call KPLIB_fnc_core_updateSectorMarkers}] call CBA_fnc_addEventHandler;} forEach ["KPLIB_sector_activated", "KPLIB_sector_deactivated"];
1919

2020
// Init function, executed every time whole list of sectors was iterated
2121
private _initFunction = {

0 commit comments

Comments
 (0)