-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Overhauls the spectator module entirely to share a similar UX to BI's "End Game Spectator" while maintaining some of the extended flexibility of ACE Spectator. - Simplifies spectator setup by reducing the number of settings. More advanced setup is still possible via the API functions provided.
- Loading branch information
Showing
103 changed files
with
4,083 additions
and
2,561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Author: AACO | ||
* Function used to get the vehicle icon for provided object (cached for repeat use) | ||
* | ||
* Arguments: | ||
* 0: Object to get icon of <OBJECT/STRING> | ||
* | ||
* Return Value: | ||
* Icon of vehicle <STRING> | ||
* | ||
* Examples: | ||
* ["B_Soldier_F"] call ace_common_fnc_getVehicleIcon; | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
#include "script_component.hpp" | ||
#define DEFAULT_TEXTURE "\A3\ui_f\data\Map\VehicleIcons\iconVehicle_ca.paa" | ||
|
||
params [["_object", objNull, [objNull, ""]]]; | ||
|
||
if ((_object isEqualType objNull && {isNull _object}) || {_object isEqualType "" && {_object == ""}}) exitWith { DEFAULT_TEXTURE }; | ||
|
||
ISNILS(GVAR(vehicleIconCache),call CBA_fnc_createNamespace); | ||
|
||
private _objectType = if (_object isEqualType objNull) then { | ||
typeOf _object | ||
} else { | ||
_object | ||
}; | ||
private _cachedValue = GVAR(vehicleIconCache) getVariable _objectType; | ||
|
||
if (isNil "_cachedValue") then { | ||
private _vehicleValue = getText (configfile >> "CfgVehicles" >> _objectType >> "icon"); | ||
private _vehicleIconValue = getText (configfile >> "CfgVehicleIcons" >> _vehicleValue); | ||
|
||
if (_vehicleIconValue == "") then { | ||
if (_vehicleValue != "" && {((toLower _vehicleValue) find ".paa") > -1}) then { | ||
_cachedValue = _vehicleValue; | ||
} else { | ||
_cachedValue = DEFAULT_TEXTURE; | ||
}; | ||
} else { | ||
_cachedValue = _vehicleIconValue; | ||
}; | ||
|
||
GVAR(vehicleIconCache) setVariable [_objectType, _cachedValue]; | ||
}; | ||
|
||
_cachedValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Author: SilentSpike | ||
* Check if a unit is a medic | ||
* | ||
* Arguments: | ||
* 0: The Unit <OBJECT> | ||
* | ||
* ReturnValue: | ||
* Unit is medic <BOOL> | ||
* | ||
* Example: | ||
* [player] call ace_common_fnc_isMedic | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
#include "script_component.hpp" | ||
|
||
params ["_unit"]; | ||
|
||
private _isMedic = _unit getVariable [QEGVAR(medical,medicClass), getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "attendant")]; | ||
|
||
_isMedic > 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.