bug fixes from dedicated testing
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
if ( !hasInterface ) exitWith {};
|
||||
|
||||
[
|
||||
"17th Battalion",
|
||||
QUOTE(MODULE_CATEGORY_NAME),
|
||||
"Create Resupply Box",
|
||||
{
|
||||
params [["_pos", [0,0,0], [[]], 3], ["_target", objNull, [objNull]]];
|
||||
// get parent definition
|
||||
private _supplyCratesCfg = call milsim_resupply_fnc_getSupplyCratesCfg;
|
||||
private _supplyCratesCfg = call EFUNC(resupply,getSupplyCratesCfg);
|
||||
// get the subclass names
|
||||
private _boxTypesAvailable = _supplyCratesCfg call BIS_fnc_getCfgSubClasses;
|
||||
|
||||
@@ -36,11 +38,17 @@ if ( !hasInterface ) exitWith {};
|
||||
_args params ["_pos", "_target", "_keysSorted"];
|
||||
|
||||
|
||||
private _box = [_target, _typeOptionSelected, _pos] call milsim_resupply_fnc_createBox;
|
||||
private _box = [_target, _typeOptionSelected, _pos] call EFUNC(resupply,createBox);
|
||||
if (isNull _box) exitWith {
|
||||
["Resupply Box", "WARNING: Failed to locate or create box!"] call BIS_fnc_curatorHint;
|
||||
};
|
||||
["Resupply Box", format["Created box from class %1", _typeOptionSelected]] call BIS_fnc_curatorHint;
|
||||
[
|
||||
"Resupply Box",
|
||||
format[
|
||||
"Created %1",
|
||||
getText((call EFUNC(resupply,getSupplyCratesCfg)) >> _typeOptionSelected >> "displayName")
|
||||
]
|
||||
] call BIS_fnc_curatorHint;
|
||||
},
|
||||
{},
|
||||
[_pos, _target]
|
||||
@@ -50,7 +58,7 @@ if ( !hasInterface ) exitWith {};
|
||||
|
||||
|
||||
[
|
||||
"17th Battalion",
|
||||
QUOTE(MODULE_CATEGORY_NAME),
|
||||
"Grounds Cleanup",
|
||||
{
|
||||
params [["_pos", [0,0,0], [[]], 3], ["_target", objNull, [objNull]]];
|
||||
|
||||
@@ -56,7 +56,7 @@ _playerItems pushBack (uniform _player);
|
||||
|
||||
|
||||
[
|
||||
LEVEL_INFO,
|
||||
LEVEL_DEBUG,
|
||||
QUOTE(COMPONENT),
|
||||
"CHECKING PLAYER INVENTORY",
|
||||
[_player] call EFUNC(common,addPlayerInfoToArray)
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
[QGVARMAIN(serverEfficiency), [
|
||||
[
|
||||
["float", QGVAR(server_raw_cps), missionNamespace getVariable [QGVAR(server_raw_cps), -1]],
|
||||
["float", QGVAR(server_cps), missionNamespace getVariable [QGVAR(server_cps), -1]]
|
||||
["float", QGVARMAIN(raw_cps), missionNamespace getVariable [QGVAR(server_raw_cps), -1]],
|
||||
["float", QGVARMAIN(cps), missionNamespace getVariable [QGVAR(server_cps), -1]]
|
||||
]
|
||||
]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
@@ -46,6 +46,16 @@ private _supplyCrateTypesCfgs = _supplyCratesCfg call BIS_fnc_returnChildren;
|
||||
configName _supplyCrateCfg,
|
||||
getPos _target
|
||||
] call FUNC(createBox);
|
||||
// log action use in server RPT
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"Supply crate spawned",
|
||||
[player, [
|
||||
["supplyCrateType", _supplyCrateDisplayName],
|
||||
["position", getPos _target]
|
||||
]] call EFUNC(common,addPlayerInfoToArray)
|
||||
] remoteExec [QEFUNC(common,log), 2];
|
||||
}, [_cfg], 0, false, true, "", ""];
|
||||
(_arsenalBox getVariable [QGVAR(supplyCrateActionIDs), []]) pushBack _actionID;
|
||||
} forEach _supplyCrateTypesCfgs;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// all text before cba include
|
||||
#define SETTINGS_GROUP_NAME 17th Battalion
|
||||
#define MODULE_CATEGORY_NAME 17th Battalion
|
||||
|
||||
#define LEVEL_TRACE -1
|
||||
#define LEVEL_DEBUG 0
|
||||
|
||||
@@ -22,6 +22,8 @@ private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
[_parentClass, "InitPost", {
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// create the root action
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -46,13 +48,17 @@ private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_
|
||||
// create the flag category actions (with nested flag actions)
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
params ["_target", "_player", "_params"];
|
||||
_params params ["_rootActionID", "_flagCategoryCfgs"];
|
||||
_params params ["_rootActionID"];
|
||||
|
||||
private _vehicleFlagsCfg = call FUNC(getVehicleFlagsCfg);
|
||||
if (isNull _vehicleFlagsCfg) exitWith {[]};
|
||||
private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_returnChildren;
|
||||
|
||||
// return category child actions with individual flag actions nested as children
|
||||
[_rootActionID, _flagCategoryCfgs] call FUNC(getActionsFlagCategories);
|
||||
|
||||
}, // child code
|
||||
[_rootActionID, _flagCategoryCfgs], // params
|
||||
[_rootActionID], // params
|
||||
nil, // position
|
||||
4, // distance
|
||||
[false, false, false, false, false], // other params
|
||||
|
||||
Reference in New Issue
Block a user