mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
move dev funcs to folder
This commit is contained in:
parent
a8d28ebedc
commit
c492f184b4
@ -1,3 +1,2 @@
|
||||
PREP(addDamageToUnit);
|
||||
PREP(dev_watchMedicalStats);
|
||||
PREP(setUnconscious);
|
||||
|
@ -10,33 +10,6 @@ if (!hasInterface) exitWith {};
|
||||
}] call EFUNC(common,arithmeticSetSource);
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
[] call FUNC(dev_watchMedicalStats);
|
||||
|
||||
[{!isNull findDisplay 46}, {
|
||||
INFO("Creating Debug Display");
|
||||
if (!isNull (uiNamespace getVariable [QGVAR(debugControl), controlNull])) then {
|
||||
ctrlDelete (uiNamespace getVariable [QGVAR(debugControl), controlNull]); // cleanup on SP Restart
|
||||
};
|
||||
private _ctrl = findDisplay 46 ctrlCreate ["RscText", -1];
|
||||
_ctrl ctrlSetPosition [
|
||||
safeZoneX,
|
||||
safeZoneY,
|
||||
safeZoneW,
|
||||
40 * pixelH
|
||||
];
|
||||
_ctrl ctrlSetFontHeight (40 * pixelH);
|
||||
_ctrl ctrlSetTextColor [0.6, 0, 0, 1];
|
||||
_ctrl ctrlCommit 0;
|
||||
uiNamespace setVariable [QGVAR(debugControl), _ctrl];
|
||||
|
||||
[{
|
||||
private _playerState = [ACE_player, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
|
||||
(uiNamespace getVariable [QGVAR(debugControl), controlNull]) ctrlSetText format ["Player state: %1", _playerState];
|
||||
|
||||
if (!isNull cursorTarget && {cursorTarget isKindOf "CAManBase"}) then {
|
||||
private _targetState = [cursorTarget, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
|
||||
drawIcon3D ["", [0.6, 0, 0, 1], cursorTarget modelToWorldVisual (cursorTarget selectionPosition "pelvis"), 0, 0, 0, format ["State: %1", _targetState], 2, 40 * pixelH, "RobotoCondensed"];
|
||||
};
|
||||
}, 0 ,[]] call CBA_fnc_addPerFrameHandler;
|
||||
}, []] call CBA_fnc_waitUntilAndExecute;
|
||||
call compile preprocessFileLineNumbers QPATHTOF(dev\watchVariable.sqf);
|
||||
call compile preprocessFileLineNumbers QPATHTOF(dev\debugDisplay.sqf);
|
||||
#endif
|
||||
|
29
addons/medical/dev/debugDisplay.sqf
Normal file
29
addons/medical/dev/debugDisplay.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
#include "\z\ace\addons\medical\script_component.hpp"
|
||||
|
||||
[{!isNull findDisplay 46}, {
|
||||
INFO("Creating Debug Display");
|
||||
if (!isNull (uiNamespace getVariable [QGVAR(debugControl), controlNull])) then {
|
||||
ctrlDelete (uiNamespace getVariable [QGVAR(debugControl), controlNull]); // cleanup on SP Restart
|
||||
};
|
||||
private _ctrl = findDisplay 46 ctrlCreate ["RscText", -1];
|
||||
_ctrl ctrlSetPosition [
|
||||
safeZoneX,
|
||||
safeZoneY,
|
||||
safeZoneW,
|
||||
40 * pixelH
|
||||
];
|
||||
_ctrl ctrlSetFontHeight (40 * pixelH);
|
||||
_ctrl ctrlSetTextColor [0.6, 0, 0, 1];
|
||||
_ctrl ctrlCommit 0;
|
||||
uiNamespace setVariable [QGVAR(debugControl), _ctrl];
|
||||
|
||||
[{
|
||||
private _playerState = [ACE_player, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
|
||||
(uiNamespace getVariable [QGVAR(debugControl), controlNull]) ctrlSetText format ["Player state: %1", _playerState];
|
||||
|
||||
if (!isNull cursorTarget && {cursorTarget isKindOf "CAManBase"}) then {
|
||||
private _targetState = [cursorTarget, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
|
||||
drawIcon3D ["", [0.6, 0, 0, 1], cursorTarget modelToWorldVisual (cursorTarget selectionPosition "pelvis"), 0, 0, 0, format ["State: %1", _targetState], 2, 40 * pixelH, "RobotoCondensed"];
|
||||
};
|
||||
}, 0 ,[]] call CBA_fnc_addPerFrameHandler;
|
||||
}, []] call CBA_fnc_waitUntilAndExecute;
|
@ -1,19 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Dev function to watch all medical variables on a unit
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_medical_fnc_dev_watchMedicalStats;
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "\z\ace\addons\medical\script_component.hpp"
|
||||
|
||||
["medical", {
|
||||
|
Loading…
Reference in New Issue
Block a user