Skip to content

Commit 7340f2a

Browse files
author
Freddo
committed
Replaced tabs with 4 spaces
1 parent 2d42fd3 commit 7340f2a

File tree

173 files changed

+4873
-4873
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+4873
-4873
lines changed

source/AIS/AIS_SETUP.sqf

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@
44
//__________________________________________________________________________________________________________________________________________________________________
55
// v v v v v v v v v v v v --- Main Settings --- v v v v v v v v v v v v
66

7-
AIS_REVIVE_INIT_UNITS = "allPlayers"; // Auto-Init a group of units: "allPlayers" , "allPlayables" , "allUnits", "allUnitsBLUFOR", "allUnitsOPFOR", "allUnitsINDFOR", "allUnitsCIVILIAN"
8-
// Warning: I didn't recomment to use "allUnits" if you play with a lot of AI units! AIS is mainly created for players and/or their AI group.
9-
AIS_MEDICAL_EDUCATION = 1; // Who can revive an unconscious unit? 0 == Everybody, 1 == Everybody with a First Aid Kit or Medkit, 2 == Only Medics (this affects both, AI and players!).
10-
AIS_REVIVE_GUARANTY = false; // If true you will fall everytime in uncoscious mode, regardless how strong the impact of damage was.
11-
AIS_MEDEVAC_STATIONS = [];// Add one or more objects and a radius to activate the medevac feature. If enabled revive is only at this place(s) possible. Empty array means feature is disabled.
12-
// Syntax: f.e.: [ [myMedevacVehicle, 15], [myMedicTent, 10] ] --> make sure the variable name is avalible at gamestart. Otherwise call it later in a function.
7+
AIS_REVIVE_INIT_UNITS = "allPlayers"; // Auto-Init a group of units: "allPlayers" , "allPlayables" , "allUnits", "allUnitsBLUFOR", "allUnitsOPFOR", "allUnitsINDFOR", "allUnitsCIVILIAN"
8+
// Warning: I didn't recomment to use "allUnits" if you play with a lot of AI units! AIS is mainly created for players and/or their AI group.
9+
AIS_MEDICAL_EDUCATION = 1; // Who can revive an unconscious unit? 0 == Everybody, 1 == Everybody with a First Aid Kit or Medkit, 2 == Only Medics (this affects both, AI and players!).
10+
AIS_REVIVE_GUARANTY = false; // If true you will fall everytime in uncoscious mode, regardless how strong the impact of damage was.
11+
AIS_MEDEVAC_STATIONS = [];// Add one or more objects and a radius to activate the medevac feature. If enabled revive is only at this place(s) possible. Empty array means feature is disabled.
12+
// Syntax: f.e.: [ [myMedevacVehicle, 15], [myMedicTent, 10] ] --> make sure the variable name is avalible at gamestart. Otherwise call it later in a function.
1313

1414

1515
//__________________________________________________________________________________________________________________________________________________________________
16-
// v v v v v v v v v v v v --- Optional Settings --- v v v v v v v v v v v v
16+
// v v v v v v v v v v v v --- Optional Settings --- v v v v v v v v v v v v
1717

18-
AIS_DAMAGE_TOLLERANCE_FACTOR = 1; // A higher value means more damage tolerance. 1 is Vanilla. 0.8 mean all damage will reduce to 80% of Vanilla.
19-
AIS_BLEEDOUT_TIME = 300; // Basic life time in seconds until the unit bleed out and die.. The real life time depends on the real damage of the unit. (can be less or more time from the basic value)
20-
AIS_REVIVETIME = 30; // Basic revive time in seconds. The real revive time depends on the real damage of the unit. (can be less or more time from the basic value)
21-
AIS_STABILIZETIME = 20; // Basic stabilize time in seconds to stop the bleeding of a unconscious unit. The real revive time depends on the real damage of the unit. (can be less or more time from the basic value)
22-
AIS_REVIVE_HEAL = false; // If set to true the injured unit get completely healed after the revive. (casual gameplay without a medic)
23-
AIS_TOGGLE_RADIO = true; // If set to true, unconscious players cannot use his TFAR or ACRE radios.
24-
AIS_NO_CHAT = true; // If set to true, a injured player cannot use text chat during he is uncoscious.
25-
AIS_AI_HELP_RADIUS = 50; // Number, Radius in metres. Units in this radius will help to revive if no group member is able to revive. Max value is 200 metres.
26-
AIS_DISABLE_RESPAWN_BUTTON = 30; // Time in seconds while the respawn button is disabled (Esc Menu). Set to 0 to enable the respawn button everytime.
27-
AIS_DISABLE_FURTHER_DAMAGE = false; // If set to true, an unconcious unit wont become further damage til death. If set to false, an unconcious unit can also die before bleedout timer is over. (f.e. trough near explosions)
18+
AIS_DAMAGE_TOLLERANCE_FACTOR = 1; // A higher value means more damage tolerance. 1 is Vanilla. 0.8 mean all damage will reduce to 80% of Vanilla.
19+
AIS_BLEEDOUT_TIME = 300; // Basic life time in seconds until the unit bleed out and die.. The real life time depends on the real damage of the unit. (can be less or more time from the basic value)
20+
AIS_REVIVETIME = 30; // Basic revive time in seconds. The real revive time depends on the real damage of the unit. (can be less or more time from the basic value)
21+
AIS_STABILIZETIME = 20; // Basic stabilize time in seconds to stop the bleeding of a unconscious unit. The real revive time depends on the real damage of the unit. (can be less or more time from the basic value)
22+
AIS_REVIVE_HEAL = false; // If set to true the injured unit get completely healed after the revive. (casual gameplay without a medic)
23+
AIS_TOGGLE_RADIO = true; // If set to true, unconscious players cannot use his TFAR or ACRE radios.
24+
AIS_NO_CHAT = true; // If set to true, a injured player cannot use text chat during he is uncoscious.
25+
AIS_AI_HELP_RADIUS = 50; // Number, Radius in metres. Units in this radius will help to revive if no group member is able to revive. Max value is 200 metres.
26+
AIS_DISABLE_RESPAWN_BUTTON = 30; // Time in seconds while the respawn button is disabled (Esc Menu). Set to 0 to enable the respawn button everytime.
27+
AIS_DISABLE_FURTHER_DAMAGE = false; // If set to true, an unconcious unit wont become further damage til death. If set to false, an unconcious unit can also die before bleedout timer is over. (f.e. trough near explosions)
2828

2929

3030
//__________________________________________________________________________________________________________________________________________________________________
31-
// v v v v v v v v v v v v --- Visual Settings --- v v v v v v v v v v v v
32-
33-
AIS_SHOW_UNC_MARKERS = true; // If set to true, a marker will show injured units on the map.
34-
AIS_SHOW_UNC_MESSAGE_TO = "Group"; // "None", "Side", "Group" --> who read the message about wounded units.
35-
AIS_SHOW_UNC_3D_MARKERS = true; // If set to true, an in-game visible 3D-icon shows you the position of injured units (within a range of 20 metres and 35 metres for medics).
36-
AIS_IMPACT_EFFECTS = true; // Set to true to enable impact effects. (simple simluation of supressing effects)
37-
AIS_SHOW_COUNTDOWN = true; // If set to true, an unconscious unit will be able to see the bleed out timer.
38-
AIS_SHOW_DIARYINFO = true; // If set to true, a diary entry with some informations about the AIS (Credits, features, How to) is added.
31+
// v v v v v v v v v v v v --- Visual Settings --- v v v v v v v v v v v v
32+
33+
AIS_SHOW_UNC_MARKERS = true; // If set to true, a marker will show injured units on the map.
34+
AIS_SHOW_UNC_MESSAGE_TO = "Group"; // "None", "Side", "Group" --> who read the message about wounded units.
35+
AIS_SHOW_UNC_3D_MARKERS = true; // If set to true, an in-game visible 3D-icon shows you the position of injured units (within a range of 20 metres and 35 metres for medics).
36+
AIS_IMPACT_EFFECTS = true; // Set to true to enable impact effects. (simple simluation of supressing effects)
37+
AIS_SHOW_COUNTDOWN = true; // If set to true, an unconscious unit will be able to see the bleed out timer.
38+
AIS_SHOW_DIARYINFO = true; // If set to true, a diary entry with some informations about the AIS (Credits, features, How to) is added.

source/AIS/Core/cfgFunctions.hpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@ class AIS_Core
55
file = "AIS\Core";
66
class preInit { preInit = 1; };
77
class postInit { postInit = 1; };
8-
class addAction;
9-
class aisInitHost;
10-
class aisInitPlayer;
11-
class bindEventHandler;
12-
class createLocalMarker;
13-
class dynamicText;
14-
class initEvents;
15-
class inRange;
16-
class interaction_Loop;
17-
class isPlayable;
18-
class onEachFrame;
19-
class onNextFrame;
20-
class progress_ShowBar;
21-
class progress_ShowBarText;
22-
class removeonEachFrame;
23-
class setPosAGLS;
24-
class setVariables;
25-
class triggerEvent;
26-
class waitUntilAndExecute;
27-
class handleDisconnect;
28-
class resetOnTeamSwitch;
8+
class addAction;
9+
class aisInitHost;
10+
class aisInitPlayer;
11+
class bindEventHandler;
12+
class createLocalMarker;
13+
class dynamicText;
14+
class initEvents;
15+
class inRange;
16+
class interaction_Loop;
17+
class isPlayable;
18+
class onEachFrame;
19+
class onNextFrame;
20+
class progress_ShowBar;
21+
class progress_ShowBarText;
22+
class removeonEachFrame;
23+
class setPosAGLS;
24+
class setVariables;
25+
class triggerEvent;
26+
class waitUntilAndExecute;
27+
class handleDisconnect;
28+
class resetOnTeamSwitch;
2929
};
3030
};
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
/*
2-
Author: NetFusion
3-
Description:
4-
Continuously checks whether an action should be added to the cursorTarget.
5-
Parameter(s):
6-
-
2+
Author: NetFusion
3+
Description:
4+
Continuously checks whether an action should be added to the cursorTarget.
5+
Parameter(s):
6+
-
77
Remarks:
88
* Should only be called once per mission.
99
10-
Returns:
11-
-
12-
Example:
13-
-
10+
Returns:
11+
-
12+
Example:
13+
-
1414
*/
1515

1616
AIS_Core_lastCursorTarget = objNull;
1717

1818
[{
1919
_cursorTarget = cursorTarget;
20-
if (_cursorTarget isEqualTo AIS_Core_lastCursorTarget || {player distance _cursorTarget > 15}) exitWith {}; // psycho: prevent cycling trough cursorTargets more than 15m away (engine limitation is 15m for every action)
20+
if (_cursorTarget isEqualTo AIS_Core_lastCursorTarget || {player distance _cursorTarget > 15}) exitWith {}; // psycho: prevent cycling trough cursorTargets more than 15m away (engine limitation is 15m for every action)
2121
AIS_Core_lastCursorTarget = _cursorTarget;
2222

23-
private _objActions = _cursorTarget getVariable ["AIS_Core_actionStorage", []];
23+
private _objActions = _cursorTarget getVariable ["AIS_Core_actionStorage", []];
2424
{
2525
_x params ["_onObject", "_text", "_distance", "_condition", "_callback", "_args", "_formated"];
2626

2727
if (!(_x in _objActions)) then {
2828
if ((_onObject isEqualType "" && {_cursorTarget isKindOf _onObject}) || (_onObject isEqualType objNull && {_cursorTarget isEqualTo _onObject})) then {
2929
private _action = _cursorTarget addAction [_text, _callback, _args, 1.5, true, true, "", _condition, _distance];
3030
_objActions pushBack _x;
31-
32-
if (_formated != "") then {
33-
_cursorTarget setUserActionText [
34-
_action,
35-
_text,
36-
format [_formated, _text],
37-
""
38-
];
39-
};
31+
32+
if (_formated != "") then {
33+
_cursorTarget setUserActionText [
34+
_action,
35+
_text,
36+
format [_formated, _text],
37+
""
38+
];
39+
};
4040
};
4141
};
4242
nil
4343
} count (missionNamespace getVariable ["AIS_Core_actionStorage", []]);
4444

45-
_cursorTarget setVariable ["AIS_Core_actionStorage", _objActions]; //@todo maybe init array and remove this line - this requires module dependencies
45+
_cursorTarget setVariable ["AIS_Core_actionStorage", _objActions]; //@todo maybe init array and remove this line - this requires module dependencies
4646
}] call AIS_Core_fnc_onEachFrame;

source/AIS/Core/fn_addAction.sqf

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
/*
2-
Author: [C-L-F] NetFusion
3-
Edited: Psychobastard
2+
Author: [C-L-F] NetFusion
3+
Edited: Psychobastard
44
5-
Description:
6-
Add an action to an object or type(s) of object(s).
5+
Description:
6+
Add an action to an object or type(s) of object(s).
77
8-
Parameter(s):
9-
0: STRING - the title of the action.
10-
1: OBJECT, ARRAY, STRING - the object (type) which the action should be added to.
11-
2: NUMBER - the distance in which the action is visible.
12-
3: STRING - the condition which is evaluated on every frame (if play is in range) to determine whether the action is visible.
13-
4: CODE - the callback which gets called when the action is activated.
14-
5: ARRAY - (optional) the arguments which get passed to the callback.
8+
Parameter(s):
9+
0: STRING - the title of the action.
10+
1: OBJECT, ARRAY, STRING - the object (type) which the action should be added to.
11+
2: NUMBER - the distance in which the action is visible.
12+
3: STRING - the condition which is evaluated on every frame (if play is in range) to determine whether the action is visible.
13+
4: CODE - the callback which gets called when the action is activated.
14+
5: ARRAY - (optional) the arguments which get passed to the callback.
1515
1616
Remarks:
1717
* '_target' is the object inside the condition string.
1818
* [object, caller, ID, arguments] is _this in the callback
1919
20-
Returns:
21-
-
20+
Returns:
21+
-
2222
23-
Example:
24-
["Hint Hello!", player, 0, "true", { hint format ["Hello %1", name player]; }] call AIS_Core_fnc_addAction;
25-
["Hint Hello!", "Man", 3, "true", { hint format ["Hello %1", name (_this select 0)]; }] call AIS_Core_fnc_addAction;
23+
Example:
24+
["Hint Hello!", player, 0, "true", { hint format ["Hello %1", name player]; }] call AIS_Core_fnc_addAction;
25+
["Hint Hello!", "Man", 3, "true", { hint format ["Hello %1", name (_this select 0)]; }] call AIS_Core_fnc_addAction;
2626
*/
2727

2828
params ["_text", "_onObject", "_distance", "_condition", "_callback", ["_args", []], ["_formated", "", [""]]];
@@ -35,36 +35,36 @@ if (_distance > 0) then {
3535

3636
if (_onObject isEqualType objNull && {_onObject isEqualTo AIS_Core_realPlayer}) exitWith {
3737
private _action = _onObject addAction [_text, _callback, _args, 1.5, false, true, "", _condition, _distance];
38-
39-
if (_formated != "") then {
40-
_onObject setUserActionText [
41-
_action,
42-
_text,
43-
format [_formated, _text],
44-
""
45-
];
46-
};
47-
48-
[
49-
"AIS_playerChanged", {
50-
params ["_data", "_params"];
51-
_data params ["_currentPlayer", "_oldPlayer"];
52-
_params params ["_text", "_callback", "_distance", ["_args", []], "_condition", ["_formated", "", [""]]];
38+
39+
if (_formated != "") then {
40+
_onObject setUserActionText [
41+
_action,
42+
_text,
43+
format [_formated, _text],
44+
""
45+
];
46+
};
47+
48+
[
49+
"AIS_playerChanged", {
50+
params ["_data", "_params"];
51+
_data params ["_currentPlayer", "_oldPlayer"];
52+
_params params ["_text", "_callback", "_distance", ["_args", []], "_condition", ["_formated", "", [""]]];
5353

54-
private _action = _currentPlayer addAction [_text, _callback, _args, 1.5, false, true, "", _condition, _distance];
55-
56-
if (_formated != "") then {
57-
_currentPlayer setUserActionText [
58-
_action,
59-
_text,
60-
format [_formated, _text],
61-
""
62-
];
63-
};
64-
},
65-
[_text, _callback, _distance, _args, _condition, _formated]
66-
] call AIS_Core_fnc_bindEventHandler;
67-
54+
private _action = _currentPlayer addAction [_text, _callback, _args, 1.5, false, true, "", _condition, _distance];
55+
56+
if (_formated != "") then {
57+
_currentPlayer setUserActionText [
58+
_action,
59+
_text,
60+
format [_formated, _text],
61+
""
62+
];
63+
};
64+
},
65+
[_text, _callback, _distance, _args, _condition, _formated]
66+
] call AIS_Core_fnc_bindEventHandler;
67+
6868
};
6969

7070
if (!(_onObject isEqualType [])) then {

source/AIS/Core/fn_aisInitHost.sqf

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ params ["_unit"];
33
if (_unit getVariable ["AIS_noReviveInit", false]) exitWith {};
44

55
if (!isNil {_unit getVariable "ais_aisInit"}) then {
6-
_unit removeAllEventHandlers "Killed";
7-
_unit removeAllEventHandlers "Respawn";
8-
_unit removeAllEventHandlers "HandleHeal";
9-
[_unit] call AIS_Core_fnc_setVariables;
6+
_unit removeAllEventHandlers "Killed";
7+
_unit removeAllEventHandlers "Respawn";
8+
_unit removeAllEventHandlers "HandleHeal";
9+
[_unit] call AIS_Core_fnc_setVariables;
1010
};
1111
_unit setVariable ["ais_aisInit", true];
1212

1313

1414
// set damage EH only for local and non-player units!
1515
// last check if unit is local
1616
if (local _unit && !(isPlayer _unit)) then {
17-
[_unit] spawn {
18-
_unit = _this select 0;
17+
[_unit] spawn {
18+
_unit = _this select 0;
1919

20-
waitUntil {!isNil {_unit getVariable "BIS_fnc_feedback_hitArrayHandler"} || {time > 0}};
21-
_unit removeAllEventHandlers "handleDamage";
22-
["%1 --- add damageEH to AI %2", diag_ticktime, _unit] call BIS_fnc_logFormat;
23-
ais_hdEH = _unit addEventHandler ["HandleDamage", {_this call AIS_Damage_fnc_handleDamage}];
24-
25-
ais_hkEH = _unit addEventHandler ["Killed", {_this call AIS_System_fnc_killed}];
26-
27-
if ([_unit] call AIS_Core_fnc_isPlayable) then {
28-
ais_hrEH = _unit addEventHandler ["Respawn", {_this call AIS_System_fnc_respawn}];
29-
};
30-
_unit removeAllEventHandlers "HandleHeal";
31-
ais_hhEH = _unit addEventHandler ["HandleHeal", {_this call AIS_System_fnc_handleHeal}];
32-
};
20+
waitUntil {!isNil {_unit getVariable "BIS_fnc_feedback_hitArrayHandler"} || {time > 0}};
21+
_unit removeAllEventHandlers "handleDamage";
22+
["%1 --- add damageEH to AI %2", diag_ticktime, _unit] call BIS_fnc_logFormat;
23+
ais_hdEH = _unit addEventHandler ["HandleDamage", {_this call AIS_Damage_fnc_handleDamage}];
24+
25+
ais_hkEH = _unit addEventHandler ["Killed", {_this call AIS_System_fnc_killed}];
26+
27+
if ([_unit] call AIS_Core_fnc_isPlayable) then {
28+
ais_hrEH = _unit addEventHandler ["Respawn", {_this call AIS_System_fnc_respawn}];
29+
};
30+
_unit removeAllEventHandlers "HandleHeal";
31+
ais_hhEH = _unit addEventHandler ["HandleHeal", {_this call AIS_System_fnc_handleHeal}];
32+
};
3333
};

0 commit comments

Comments
 (0)