Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical AI - Header fixes #10140

Merged
merged 1 commit into from
Jul 23, 2024
Merged
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
2 changes: 1 addition & 1 deletion addons/medical_ai/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

["CBA_settingsInitialized", {
TRACE_1("settingsInitialized",GVAR(enabledFor));

if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled
if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients

Expand All @@ -20,5 +21,4 @@
}] call CBA_fnc_addClassEventHandler;

#include "stateMachine.inc.sqf"

}] call CBA_fnc_addEventHandler;
2 changes: 1 addition & 1 deletion addons/medical_ai/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ if (isNil QGVAR(timeSafe_shoot)) then { GVAR(timeSafe_shoot) = 30; };
if (isNil QGVAR(timeSafe_hit)) then { GVAR(timeSafe_hit) = 30; };
if (isNil QGVAR(timeSafe_suppressed)) then { GVAR(timeSafe_suppressed) = 30; };

GVAR(itemHash) = uinamespace getVariable QGVAR(itemHash);
GVAR(itemHash) = uiNamespace getVariable QGVAR(itemHash);

ADDON = true;
4 changes: 2 additions & 2 deletions addons/medical_ai/functions/fnc_canRequestMedic.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* Checks if there is a medic available in the unit's group.
*
* Arguments:
* None
* Unit <OBJECT>
*
* Return Value:
* Can request medic <BOOL>
*
* Example:
* player call ACE_medical_ai_fnc_canRequestMedic
* player call ace_medical_ai_fnc_canRequestMedic
*
* Public: No
*/
Expand Down
4 changes: 2 additions & 2 deletions addons/medical_ai/functions/fnc_healSelf.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* Makes the unit heal itself.
*
* Arguments:
* None
* Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* call ACE_medical_ai_fnc_healSelf
* cursorObject call ace_medical_ai_fnc_healSelf
*
* Public: No
*/
Expand Down
5 changes: 3 additions & 2 deletions addons/medical_ai/functions/fnc_healUnit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
* Makes a medic heal the next unit that needs treatment.
*
* Arguments:
* None
* Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* call ACE_medical_ai_fnc_healUnit
* cursorObject call ace_medical_ai_fnc_healUnit
*
* Public: No
*/

// Player will have to do this manually of course
if ([_this] call EFUNC(common,isPlayer)) exitWith {};
// Can't heal other units when unconscious
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_ai/functions/fnc_healingLogic.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Nothing
*
* Example:
* [a, b] call ACE_medical_ai_fnc_healingLogic
* [cursorObject, cursorObject] call ace_medical_ai_fnc_healingLogic
*
* Public: No
*/
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_ai/functions/fnc_isInjured.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Does unit need treatment <BOOL>
*
* Example:
* player call ACE_medical_ai_fnc_isInjured
* cursorObject call ace_medical_ai_fnc_isInjured
*
* Public: No
*/
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_ai/functions/fnc_isSafe.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Is unit safe enough <BOOL>
*
* Example:
* call ACE_medical_ai_fnc_isSafe
* cursorObject call ace_medical_ai_fnc_isSafe
*
* Public: No
*/
Expand Down
4 changes: 2 additions & 2 deletions addons/medical_ai/functions/fnc_itemCheck.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Checks if AI healer has items
* Checks if AI healer has items.
*
* Arguments:
* 0: Healer <OBJECT>
Expand All @@ -13,7 +13,7 @@
* 2: Treatment <STRING> (Optional)
*
* Example:
* [cursorObject, "@bandage"] call ACE_medical_ai_fnc_itemCheck
* [cursorObject, "@bandage"] call ace_medical_ai_fnc_itemCheck
*
* Public: No
*/
Expand Down
3 changes: 2 additions & 1 deletion addons/medical_ai/functions/fnc_playTreatmentAnim.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
* None
*
* Example:
* [bob, true, true] call ACE_medical_ai_fnc_playTreatmentAnim
* [cursorObject, true, true] call ace_medical_ai_fnc_playTreatmentAnim
*
* Public: No
*/

params ["_unit", "_actionName", "_isSelfTreatment"];
TRACE_3("playTreatmentAnim",_unit,_actionName,_isSelfTreatment);

Expand Down
4 changes: 2 additions & 2 deletions addons/medical_ai/functions/fnc_requestMedic.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* Sends a request to the units assigned medic to heal it.
*
* Arguments:
* None
* Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* call ACE_medical_ai_fnc_requestMedic
* cursorObject call ace_medical_ai_fnc_requestMedic
*
* Public: No
*/
Expand Down
4 changes: 2 additions & 2 deletions addons/medical_ai/functions/fnc_wasRequested.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* Checks if the unit was requested to treat another unit.
*
* Arguments:
* None
* Unit <OBJECT>
*
* Return Value:
* Was requested <BOOL>
*
* Example:
* call ACE_medical_ai_fnc_wasRequested
* cursorObject call ace_medical_ai_fnc_wasRequested
*
* Public: No
*/
Expand Down