mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
add Trace
This commit is contained in:
parent
bda274efff
commit
317706cf46
@ -18,6 +18,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_weapon", "_magazine", "_ammo"];
|
params ["_weapon", "_magazine", "_ammo"];
|
||||||
|
TRACE_3("Parameter",_weapon,_magazine,_ammo);
|
||||||
|
|
||||||
private ["_array", "_type", "_return", "_config"];
|
private ["_array", "_type", "_return", "_config"];
|
||||||
|
|
||||||
@ -28,6 +29,7 @@ _array = [
|
|||||||
getNumber (configFile >> "CfgAmmo" >> QGVAR(priority))
|
getNumber (configFile >> "CfgAmmo" >> QGVAR(priority))
|
||||||
];
|
];
|
||||||
|
|
||||||
|
TRACE_1("Proiroity Array",_array);
|
||||||
// define Fist Values for Types
|
// define Fist Values for Types
|
||||||
_type = 0;
|
_type = 0;
|
||||||
_array params ["_max"];
|
_array params ["_max"];
|
||||||
@ -40,12 +42,14 @@ _array params ["_max"];
|
|||||||
};
|
};
|
||||||
} forEach _array;
|
} forEach _array;
|
||||||
|
|
||||||
|
TRACE_2("Highest Value",_max,_type);
|
||||||
// create the Config entry Point
|
// create the Config entry Point
|
||||||
_return = [
|
_config = [
|
||||||
(configFile >> "CfgWeapons" >> _weapon),
|
(configFile >> "CfgWeapons" >> _weapon),
|
||||||
(configFile >> "CfgMagazines" >> _magazine),
|
(configFile >> "CfgMagazines" >> _magazine),
|
||||||
(configFile >> "CfgAmmo" >> _ammo)
|
(configFile >> "CfgAmmo" >> _ammo)
|
||||||
] select _type;
|
] select _type;
|
||||||
|
TRACE_1("ConfigPath",_config);
|
||||||
|
|
||||||
// get the Variables out of the Configes and create a array with then
|
// get the Variables out of the Configes and create a array with then
|
||||||
_return = [
|
_return = [
|
||||||
@ -53,7 +57,7 @@ _return = [
|
|||||||
(getNumber (_config >> QGVAR(range))),
|
(getNumber (_config >> QGVAR(range))),
|
||||||
(getNumber (_config >> QGVAR(damage)))
|
(getNumber (_config >> QGVAR(damage)))
|
||||||
];
|
];
|
||||||
|
TRACE_1("Return",_return);
|
||||||
|
|
||||||
missionNameSpace setVariable [format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine], _return];
|
missionNameSpace setVariable [format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine], _return];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user