Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
596 changes: 279 additions & 317 deletions maps/altis/mission.sqm

Large diffs are not rendered by default.

257 changes: 98 additions & 159 deletions maps/cam_lao_nam/mission.sqm

Large diffs are not rendered by default.

268 changes: 114 additions & 154 deletions maps/vn_khe_sanh/mission.sqm

Large diffs are not rendered by default.

222 changes: 102 additions & 120 deletions maps/vn_the_bra/mission.sqm

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions mission/config/functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class CfgFunctions
postinit = 1;
};
class adv_revive_params {};
class arsenals_init {};
class init_mission_handlers {};
};

Expand Down
40 changes: 40 additions & 0 deletions mission/functions/core/init/fn_arsenals_init.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
File: fn_arsenals_init.sqf
Author: Savage Game Design
Public: No

Description:
Sets up arsenals with Arsenal map markers
and finds nearby trashcans to initialise when player joins

Parameter(s): none

Returns:
true when executed successfully

Example(s):
call vn_mf_fnc_arsenals_init;
*/


diag_log format ["INFO: %1: Loading arsenals ...", _fnc_scriptName];

// can be multiple WL arsenal modules in the mission
// also possible to sync different module instances to the same arsenal object
private _wlModules = allMissionObjects "Logic" select {typeOf _x isEqualTo "vn_module_whitelistedarsenal"};
private _arsenals = flatten (_wlModules apply {synchronizedObjects _x});
_arsenals = _arsenals arrayIntersect _arsenals;

{
// create map markers for arsenal objects
_marker = createMarkerLocal [format["vn_mf_arsenal_%1", _forEachIndex], _x];
_marker setMarkerTextLocal "Arsenal";
_marker setMarkerTypeLocal "mil_dot";
_marker setMarkerColorLocal "ColorPink";
_marker setMarkerAlpha 1;
} forEach _arsenals;

missionNamespace setVariable ["vn_mf_arsenals", _arsenals];
diag_log format ["INFO: %1: Loaded %2 arsenals.", _fnc_scriptName, count _arsenals];

true
Original file line number Diff line number Diff line change
@@ -1,41 +1,59 @@
/*
File: fn_arsenal_trash_cleanup_init.sqf
Author: Savage Game Design
Public: Yes
File: fn_arsenal_trash_cleanup_init.sqf
Author: Savage Game Design
Public: Yes

Description:
Called to initialise the trashcans on the map near arsenals.
Description:
Called to initialise the trashcans on the map near arsenals.

Parameter(s):
None
Parameter(s):
None

Returns:
None
Returns:
true when executed successfully, nil on error.

Example(s):
call vn_mf_fnc_arsenal_trash_cleanup_init;
Example(s):
call vn_mf_fnc_arsenal_trash_cleanup_init;
*/

private _arsenals = allMapMarkers select {_x find "arsenal" isEqualTo 0};

{
private _trashCan = missionNamespace getVariable [format["arsenal_cleanup_%1",_forEachIndex], objNull];
_trashCan addAction
[
"Clean Up",
{
params ["_target", "_caller", "_actionId", "_arguments"];
["arsenalcleanup", [_target]] call para_c_fnc_call_on_server;
},
nil,
1.5,
true,
true,
"",
"true",
5,
false,
"",
""
diag_log format ["INFO: %1: Loading trash cans ...", _fnc_scriptName];

private _arsenals = missionNamespace getVariable ["vn_mf_arsenals", []];

if (_arsenals isEqualTo []) exitWith {
diag_log format [
"WARN: %1: No mike force arsenals initialised, cannot init trash cans.",
_fnc_scriptName
];
} forEach _arsenals;
nil
};

_arsenals
apply {
// find nearby trash can objects (within 10m) and add the clean up action
(nearestObjects [_x, [], 10, true])
select {typeOf _x isEqualTo "Land_vn_object_trashcan_01"}
apply {
_x addAction [
"Clean Up",
{
params ["_target", "_caller", "_actionId", "_arguments"];
["arsenalcleanup", [_target]] call para_c_fnc_call_on_server;
},
nil,
1.5,
true,
true,
"",
"true",
5,
false,
"",
""
];
};
};

diag_log format ["INFO: %1: Trash cans loaded.", _fnc_scriptName];

true
3 changes: 3 additions & 0 deletions mission/para_server_init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ enableenvironment [[false,true] select _ambientlife,[false,true] select _ambient
//Set up respawn points.
[] call vn_mf_fnc_respawn_points_init;

// setup arsenals
[] call vn_mf_fnc_arsenals_init;

// start scheduler
diag_log "VN MikeForce: Starting scheduler";
[] call para_g_fnc_scheduler_subsystem_init;
Expand Down