Initial upload. Not currently functional as a mod. Includes some slightly refactored source code as well as the original mission this was debuted in zipped up as reference + example of usage.

This commit is contained in:
Clarky committed 2026-08-08 17:42:15 +10:00
commit 75b737230e
32 files changed
+2049

No files matched your search

+102
View File
@@ -0,0 +1,102 @@
/*
// Handler for reacting to a supply vehicle creation, thus creating the required interactable actions on that vehicle
[
"CLF_SupplyVehicleCreated",
{
params ["_vehicle"];
[_vehicle] call CLF_fnc_initSupplyVehicleInteractions;
}
] call CBA_fnc_addEventHandler;
// Handler for reacting to a supply depot creation, thus creating the required interactable actions on that depot
[
"CLF_SupplyDepotCreated",
{
params ["_depot"];
[_depot] call CLF_fnc_initSupplyDepotInteractions;
}
] call CBA_fnc_addEventHandler;
*/
// Handler for confirming construction of a vehicle at a factory for the client
[
"CLF_ConfirmFactoryVehicleClient",
{
params ["_hq", "_vehicle", "_cost", "_buildTime", "_player"];
[_hq, _vehicle, _cost, _buildTime, _player] call CLF_fnc_factoryBuildConfirmClient;
}
] call CBA_fnc_addEventHandler;
// Handler for displaying a message local to one player. Message can be SUCCESS (0), WARNING (1), ALERT (2), or INFO (3) with different appearances based on message type
[
"CLF_ShowMessage",
{
params ["_type", "_size", "_message"];
private _fontsize = "";
private _ypos = "";
private _prefix = "";
private _color = "";
switch (_size) do {
case 0: {
_fontsize = 1;
_ypos = 0.3
};
case 1: {
_fontsize = 0.8;
_ypos = 0.65
};
default {
_fontsize = 0.8;
_ypos = 0.65
};
};
switch (_type) do {
case 0: {
_prefix = "SUCCESS";
_color = "#00FF00";
};
case 1: {
_prefix = "WARNING";
_color = "#FFFF00";
};
case 2: {
_prefix = "ALERT";
_color = "#FF0000";
};
case 3: {
_prefix = "INFO";
_color = "#5979FF";
};
default {
_prefix = "INFO";
_color = "#5979FF";
};
};
[
format [
"<t size='%1', align='center'><t color='%2'>%3</t>: %4</t>",
_fontsize,
_color,
_prefix,
_message
],
0, // X position (centre)
_ypos, // Y position
4, // duration
0.3 // fade time
] spawn BIS_fnc_dynamicText;
}
] call CBA_fnc_addEventHandler;
+62
View File
@@ -0,0 +1,62 @@
// Handler for running the VehicleLoaded function
[
"CLF_VehicleLoaded",
{
params ["_vehicle", "_player", "_depot"];
[_vehicle, _player, _depot] call CLF_fnc_vehicleLoad;
}
] call CBA_fnc_addEventHandler;
// Handler for running the VehicleUnloaded function
[
"CLF_VehicleUnloaded",
{
params ["_vehicle", "_player", "_depot"];
[_vehicle, _player, _depot] call CLF_fnc_vehicleUnload;
}
] call CBA_fnc_addEventHandler;
// Handler for confirming factory vehicle construction on the server
[
"CLF_ConfirmFactoryBuildServer",
{
params ["_hq", "_player", "_vehicleClass", "_vehiclePreviewLocation", "_rotation", "_vectorUp", "_cost", "_buildTime", "_specialisation", "_specialisationData"];
[_hq, _player, _vehicleClass, _vehiclePreviewLocation, _rotation, _vectorUp, _cost, _buildTime, _specialisation, _specialisationData] spawn CLF_fnc_factoryBuildConfirmServer;
}
] call CBA_fnc_addEventHandler;
// Handler for cancelling factory vehicle construction on the server
[
"CLF_CancelFactoryBuildServer",
{
params ["_hq", "_vehicle", "_cost", "_player"];
[_hq, _vehicle, _cost, _player ] call CLF_fnc_cancelFactoryBuildServer;
}
] call CBA_fnc_addEventHandler;
// Handler for running the function which consumes materiel at ab ase
[
"CLF_MaterielConsume",
{
params ["_hq", "_amount", "_player"];
[_hq, _amount, _player] call CLF_fnc_materielConsume;
}
] call CBA_fnc_addEventHandler;
// Handler for adding materiel back to a base
[
"CLF_MaterielAdd",
{
params ["_hq", "_amount", "_player"];
[_hq, _amount, _player ] call CLF_fnc_materielAdd;
}
] call CBA_fnc_addEventHandler;
// Handler for adding fortify budget
[
"CLF_FortifyBudgetAdd",
{
params ["_side", "_amount"];
[_side, _amount, true] call ace_fortify_fnc_updateBudget;
}
] call CBA_fnc_addEventHandler;