mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into armake
This commit is contained in:
commit
fd39ee9e6b
@ -1,7 +1,3 @@
|
||||
|
||||
class Single;
|
||||
class Burst;
|
||||
class FullAuto;
|
||||
class Mode_SemiAuto;
|
||||
class Mode_Burst;
|
||||
class Mode_FullAuto;
|
||||
@ -90,7 +86,10 @@ class CfgWeapons {
|
||||
|
||||
/* MX */
|
||||
|
||||
class arifle_MX_Base_F: Rifle_Base_F {};
|
||||
class arifle_MX_Base_F: Rifle_Base_F {
|
||||
class Single: Mode_SemiAuto {};
|
||||
class FullAuto: Mode_FullAuto {};
|
||||
};
|
||||
class arifle_MX_SW_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"100Rnd_65x39_caseless_mag_Tracer",
|
||||
|
15
addons/dogtags/CfgEventHandlers.hpp
Normal file
15
addons/dogtags/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
43
addons/dogtags/CfgVehicles.hpp
Normal file
43
addons/dogtags/CfgVehicles.hpp
Normal file
@ -0,0 +1,43 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
class ACE_Dogtag {
|
||||
displayName = CSTRING(itemName);
|
||||
condition = "";
|
||||
statement = "";
|
||||
showDisabled = 0;
|
||||
priority = 3;
|
||||
icon = QPATHTOF(data\dogtag_icon_ca.paa);
|
||||
class ACE_CheckDogtag {
|
||||
displayName = CSTRING(checkDogtag);
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canCheckDogtag));
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkDogtag));
|
||||
showDisabled = 0;
|
||||
priority = 3;
|
||||
icon = QPATHTOF(data\dogtag_icon_ca.paa);
|
||||
};
|
||||
class ACE_TakeDogtag {
|
||||
displayName = CSTRING(takeDogtag);
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeDogtag));
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(takeDogtag));
|
||||
showDisabled = 0;
|
||||
priority = 3;
|
||||
icon = QPATHTOF(data\dogtag_icon_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class ACE_CheckDogtags {
|
||||
displayName = CSTRING(checkItem);
|
||||
condition = "true";
|
||||
statement = "";
|
||||
insertChildren = QUOTE(_this call DFUNC(addDogtagActions));
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
1025
addons/dogtags/CfgWeapons.hpp
Normal file
1025
addons/dogtags/CfgWeapons.hpp
Normal file
File diff suppressed because it is too large
Load Diff
72
addons/dogtags/Dogtag.hpp
Normal file
72
addons/dogtags/Dogtag.hpp
Normal file
@ -0,0 +1,72 @@
|
||||
class RscPicture;
|
||||
class RscStructuredText;
|
||||
|
||||
class RscTitles {
|
||||
class GVAR(singleTag) {
|
||||
idd = -1;
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),_this select 0)]);
|
||||
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),nil)]);
|
||||
movingEnable = false;
|
||||
duration = 5;
|
||||
fadeIn = 0.2;
|
||||
fadeOut = 0.2;
|
||||
|
||||
class controls {
|
||||
class background: RscPicture {
|
||||
idc = 1000;
|
||||
text = QUOTE(PATHTOF(data\dogtagSingle.paa));
|
||||
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
colorText[] = {1, 1, 1, 1};
|
||||
colorBackground[] = {0, 0, 0, 0};
|
||||
x = ((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 * (((safezoneW / safezoneH) min 1.2) / 40));
|
||||
y = safeZoneY + 0.175 * safezoneH;
|
||||
w = (8 * (((safezoneW / safezoneH) min 1.2) / 40));
|
||||
h = (8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
|
||||
font = "EtelkaMonospacePro";
|
||||
};
|
||||
class nickname: RscStructuredText {
|
||||
idc = 1001;
|
||||
text = "";
|
||||
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
colorText[] = {1, 1, 1, 1};
|
||||
colorBackground[] = {0, 0, 0, 0};
|
||||
x = ((safezoneX + safezoneW) - (8.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 * (((safezoneW / safezoneH) min 1.2) / 40));
|
||||
y = safeZoneY + 0.24 * safezoneH;
|
||||
w = (5.9 * (((safezoneW / safezoneH) min 1.2) / 40));
|
||||
h = (3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
|
||||
font = "RobotoCondensed";
|
||||
class Attributes {
|
||||
font = "RobotoCondensed";
|
||||
color = "#EEEEEE";
|
||||
align = "left";
|
||||
valign = "middle";
|
||||
shadow = 2;
|
||||
shadowColor = "#3f4345";
|
||||
size = "0.80";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class GVAR(doubleTag): GVAR(singleTag) {
|
||||
idd = -1;
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),_this select 0)]);
|
||||
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),nil)]);
|
||||
|
||||
class controls: controls {
|
||||
class background: background {
|
||||
text = QUOTE(PATHTOF(data\dogtagDouble.paa));
|
||||
};
|
||||
class nickname: nickname {
|
||||
class Attributes: Attributes {
|
||||
font = "RobotoCondensed";
|
||||
color = "#EEEEEE";
|
||||
align = "left";
|
||||
valign = "middle";
|
||||
shadow = 2;
|
||||
shadowColor = "#3f4345";
|
||||
size = "0.80";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
11
addons/dogtags/README.md
Normal file
11
addons/dogtags/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
ace_dogtags
|
||||
==========
|
||||
|
||||
Adds options to check and take dog tag from dead or unconscious units
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [SzwedzikPL](https://github.com/SzwedzikPL)
|
13
addons/dogtags/XEH_PREP.hpp
Normal file
13
addons/dogtags/XEH_PREP.hpp
Normal file
@ -0,0 +1,13 @@
|
||||
PREP(addDogtagActions);
|
||||
PREP(addDogtagItem);
|
||||
PREP(bloodType);
|
||||
PREP(canCheckDogtag);
|
||||
PREP(canTakeDogtag);
|
||||
PREP(checkDogtag);
|
||||
PREP(checkDogtagItem);
|
||||
PREP(getDogtagData);
|
||||
PREP(getDogtagItem);
|
||||
PREP(sendDogtagData);
|
||||
PREP(showDogtag);
|
||||
PREP(ssn);
|
||||
PREP(takeDogtag);
|
45
addons/dogtags/XEH_postInit.sqf
Normal file
45
addons/dogtags/XEH_postInit.sqf
Normal file
@ -0,0 +1,45 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
[QGVAR(showDogtag), DFUNC(showDogtag)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(sendDogtagData), DFUNC(sendDogtagData)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(getDogtagItem), DFUNC(getDogtagItem)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(addDogtagItem), DFUNC(addDogtagItem)] call CBA_fnc_addEventHandler;
|
||||
|
||||
|
||||
//Add actions and event handlers only if ace_medical is loaded
|
||||
// - Adding actions via config would create a dependency
|
||||
if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
|
||||
if (hasInterface) then {
|
||||
|
||||
private _checkTagAction = [
|
||||
"ACE_CheckDogtag",
|
||||
format ["%1: %2", localize LSTRING(itemName), localize LSTRING(checkDogtag)],
|
||||
QPATHTOF(data\dogtag_icon_ca.paa),
|
||||
{[_player,_target] call FUNC(checkDogtag)},
|
||||
{!isNil {_target getVariable QGVAR(dogtagData)}}
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
["ACE_bodyBagObject", 0, ["ACE_MainActions"], _checkTagAction] call EFUNC(interact_menu,addActionToClass);
|
||||
|
||||
private _takeTagAction = [
|
||||
"ACE_TakeDogtag",
|
||||
format ["%1: %2", localize LSTRING(itemName), localize LSTRING(takeDogtag)],
|
||||
QPATHTOF(data\dogtag_icon_ca.paa),
|
||||
{[_player,_target] call FUNC(takeDogtag)},
|
||||
{(!isNil {_target getVariable QGVAR(dogtagData)}) && {((_target getVariable [QGVAR(dogtagTaken), objNull]) != _target)}}
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
["ACE_bodyBagObject", 0, ["ACE_MainActions"], _takeTagAction] call EFUNC(interact_menu,addActionToClass);
|
||||
};
|
||||
if (isServer) then {
|
||||
["ace_placedInBodyBag", {
|
||||
params ["_target", "_bodyBag"];
|
||||
TRACE_2("ace_placedInBodyBag eh",_target,_bodyBag);
|
||||
|
||||
private _dogTagData = [_target] call FUNC(getDogtagData);
|
||||
_bodyBag setVariable [QGVAR(dogtagData), _dogTagData, true];
|
||||
|
||||
if ((_target getVariable [QGVAR(dogtagTaken), objNull]) == _target) then {
|
||||
_bodyBag setVariable [QGVAR(dogtagTaken), _bodyBag, true];
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
};
|
||||
};
|
7
addons/dogtags/XEH_preInit.sqf
Normal file
7
addons/dogtags/XEH_preInit.sqf
Normal file
@ -0,0 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
ADDON = true;
|
3
addons/dogtags/XEH_preStart.sqf
Normal file
3
addons/dogtags/XEH_preStart.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
18
addons/dogtags/config.cpp
Normal file
18
addons/dogtags/config.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"SzwedzikPL"};
|
||||
authorUrl = "https://github.com/SzwedzikPL/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "Dogtag.hpp"
|
BIN
addons/dogtags/data/ace_dogtag.p3d
Normal file
BIN
addons/dogtags/data/ace_dogtag.p3d
Normal file
Binary file not shown.
82
addons/dogtags/data/dogtag.rvmat
Normal file
82
addons/dogtags/data/dogtag.rvmat
Normal file
@ -0,0 +1,82 @@
|
||||
class StageTI {
|
||||
texture = "a3\data_f\default_glass_ti_ca.paa";
|
||||
};
|
||||
ambient[] = {1,1,1,1};
|
||||
diffuse[] = {1,1,1,1};
|
||||
forcedDiffuse[] = {0,0,0,0};
|
||||
emmisive[] = {0,0,0,1};
|
||||
specular[] = {0.3,0.3,0.3,1};
|
||||
specularPower = 50;
|
||||
PixelShaderID = "Super";
|
||||
VertexShaderID = "Super";
|
||||
class Stage1 {
|
||||
texture = "z\ace\addons\dogtags\data\dogtag_nohq.paa";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage2 {
|
||||
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage3 {
|
||||
texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage4 {
|
||||
texture = "#(argb,8,8,3)color(1,1,1,1,AS)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage5 {
|
||||
texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage6 {
|
||||
texture = "#(ai,32,128,1)fresnel(0.85,0.36)";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage7 {
|
||||
useWorldEnvMap = "true";
|
||||
texture = "a3\data_f\env_interier_car_ca.paa";
|
||||
uvSource = "tex";
|
||||
class uvTransform {
|
||||
aside[] = {1,0,0};
|
||||
up[] = {0,1,0};
|
||||
dir[] = {0,0,1};
|
||||
pos[] = {0,0,0};
|
||||
};
|
||||
};
|
BIN
addons/dogtags/data/dogtagDouble.paa
Normal file
BIN
addons/dogtags/data/dogtagDouble.paa
Normal file
Binary file not shown.
BIN
addons/dogtags/data/dogtagSingle.paa
Normal file
BIN
addons/dogtags/data/dogtagSingle.paa
Normal file
Binary file not shown.
BIN
addons/dogtags/data/dogtag_ca.paa
Normal file
BIN
addons/dogtags/data/dogtag_ca.paa
Normal file
Binary file not shown.
BIN
addons/dogtags/data/dogtag_icon_ca.paa
Normal file
BIN
addons/dogtags/data/dogtag_icon_ca.paa
Normal file
Binary file not shown.
BIN
addons/dogtags/data/dogtag_nohq.paa
Normal file
BIN
addons/dogtags/data/dogtag_nohq.paa
Normal file
Binary file not shown.
16
addons/dogtags/data/model.cfg
Normal file
16
addons/dogtags/data/model.cfg
Normal file
@ -0,0 +1,16 @@
|
||||
class CfgSkeletons {
|
||||
class Default {
|
||||
isDiscrete = 1;
|
||||
skeletonInherit = "";
|
||||
skeletonBones[] = {};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgModels {
|
||||
class Default {
|
||||
sectionsInherit = "";
|
||||
sections[] = {""};
|
||||
skeletonName = "Default";
|
||||
};
|
||||
class ace_dogtag: Default {};
|
||||
};
|
40
addons/dogtags/functions/fnc_addDogtagActions.sqf
Normal file
40
addons/dogtags/functions/fnc_addDogtagActions.sqf
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Author: SzwedzikPL
|
||||
* Creates one action per dogtag.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
* 1: Player <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Children actions <ARRAY>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_target", "_player"];
|
||||
|
||||
//Get all dogtags and their ids
|
||||
private _unitDogtags = [];
|
||||
private _unitDogtagIDs = [];
|
||||
{
|
||||
private _id = getNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(tagID));
|
||||
if (_id > 0) then {
|
||||
_unitDogtags pushBack _x;
|
||||
_unitDogtagIDs pushBack _id;
|
||||
};
|
||||
} forEach items _player;
|
||||
|
||||
//Create action children for all dogtags
|
||||
private _actions = [];
|
||||
{
|
||||
private _tagID = _unitDogtagIDs select _forEachIndex;
|
||||
private _displayName = format ["%1 #%2", getText (configFile >> "CfgWeapons" >> _x >> "displayName"), _tagID];
|
||||
private _picture = getText (configFile >> "CfgWeapons" >> _x >> "picture");
|
||||
|
||||
private _action = [_x, _displayName, _picture, {_this call FUNC(checkDogtagItem)}, {true}, {}, _x] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _player];
|
||||
} forEach _unitDogtags;
|
||||
|
||||
_actions
|
24
addons/dogtags/functions/fnc_addDogtagItem.sqf
Normal file
24
addons/dogtags/functions/fnc_addDogtagItem.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Author: SzwedzikPL
|
||||
* Adds dogtag item to unit (triggered by server)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Item class <STRING>
|
||||
* 1: Dogtag data <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_item", "_dogtagData"];
|
||||
|
||||
if (_item == "") exitWith {};
|
||||
|
||||
[ace_player, _item] call CBA_fnc_addItem;
|
||||
|
||||
_dogtagData params ["_nickName"];
|
||||
private _displayText = format [localize LSTRING(takeDogtagSuccess), _nickName];
|
||||
[_displayText] call EFUNC(common,displayText);
|
24
addons/dogtags/functions/fnc_bloodType.sqf
Normal file
24
addons/dogtags/functions/fnc_bloodType.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Reports a blood type depending on the units name.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Name of a unit <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* A random blood type <STRING>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define BLOOD_TYPES ["O POS", "O NEG", "A POS", "A NEG", "B POS", "B NEG", "AB POS", "AB NEG"]
|
||||
|
||||
params ["_name"];
|
||||
|
||||
private _num = 0;
|
||||
private _count = {_num = _num + _x} count toArray _name;
|
||||
|
||||
_num = _num + _count;
|
||||
|
||||
BLOOD_TYPES select (_num % count BLOOD_TYPES)
|
20
addons/dogtags/functions/fnc_canCheckDogtag.sqf
Normal file
20
addons/dogtags/functions/fnc_canCheckDogtag.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Author: SzwedzikPL
|
||||
* Checks if dogtag can be checked.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* True if dogtag can be checked <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_player", "_target"];
|
||||
|
||||
if (isNull _target) exitWith {false};
|
||||
|
||||
(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}
|
20
addons/dogtags/functions/fnc_canTakeDogtag.sqf
Normal file
20
addons/dogtags/functions/fnc_canTakeDogtag.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Author: SzwedzikPL
|
||||
* Checks if dogtag can be taken.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* True if dogtag can be taken <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_player", "_target"];
|
||||
|
||||
if (isNull _target) exitWith {false};
|
||||
|
||||
(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}
|
21
addons/dogtags/functions/fnc_checkDogtag.sqf
Normal file
21
addons/dogtags/functions/fnc_checkDogtag.sqf
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Author: SzwedzikPL
|
||||
* Checks unit dogtag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_player", "_target"];
|
||||
|
||||
private _doubleTags = (_target getVariable [QGVAR(dogtagTaken), objNull]) != _target;
|
||||
private _dogTagData = [_target] call FUNC(getDogTagData);
|
||||
|
||||
[QGVAR(showDogtag), [_dogTagData, _doubleTags]] call CBA_fnc_localEvent;
|
19
addons/dogtags/functions/fnc_checkDogtagItem.sqf
Normal file
19
addons/dogtags/functions/fnc_checkDogtagItem.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Author: SzwedzikPL
|
||||
* Check dogtag self menu action
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
* 2: Item class <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Mone
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_player", "_target", "_item"];
|
||||
|
||||
[QGVAR(sendDogtagData), [_player, _item]] call CBA_fnc_serverEvent;
|
31
addons/dogtags/functions/fnc_getDogtagData.sqf
Normal file
31
addons/dogtags/functions/fnc_getDogtagData.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: esteldunedain
|
||||
* Get unit dogtag data
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_target"];
|
||||
|
||||
// Check if the data was already created
|
||||
private _dogTagData = _target getVariable QGVAR(dogtagData);
|
||||
if (!isNil "_dogTagData") exitWith {_dogTagData};
|
||||
|
||||
// Create dog tag data once for the unit: nickname, code (eg. 135-13-900) and blood type
|
||||
private _targetName = [_target, false, true] call EFUNC(common,getName);
|
||||
|
||||
private _dogTagData = [
|
||||
_targetName,
|
||||
_targetName call FUNC(ssn),
|
||||
_targetName call FUNC(bloodType)
|
||||
];
|
||||
// Store it
|
||||
_target setVariable [QGVAR(dogtagData), _dogTagData, true];
|
||||
_dogTagData
|
36
addons/dogtags/functions/fnc_getDogtagItem.sqf
Normal file
36
addons/dogtags/functions/fnc_getDogtagItem.sqf
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Author: SzwedzikPL
|
||||
* Server: creates new dogtag item and send it to client
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if(!isServer) exitWith {};
|
||||
|
||||
params ["_player", "_target"];
|
||||
TRACE_2("getDogtagItem",_player,_target);
|
||||
|
||||
private _allDogtags = missionNamespace getVariable [QGVAR(allDogtags), []];
|
||||
private _allDogtagDatas = missionNamespace getVariable [QGVAR(allDogtagDatas), []];
|
||||
|
||||
private _nextID = count _allDogtags + 1;
|
||||
|
||||
if (_nextID > 999) exitWith {ACE_LOGERROR("Ran out of IDs");};
|
||||
|
||||
private _dogTagData = [_target] call FUNC(getDogTagData);
|
||||
private _item = format ["ACE_dogtag_%1", _nextID];
|
||||
_allDogtags pushBack _item;
|
||||
_allDogtagDatas pushBack _dogTagData;
|
||||
|
||||
missionNamespace setVariable [QGVAR(allDogtags), _allDogtags];
|
||||
missionNamespace setVariable [QGVAR(allDogtagDatas), _allDogtagDatas];
|
||||
|
||||
[QGVAR(addDogtagItem), [_item, _dogTagData], [_player]] call CBA_fnc_targetEvent;
|
30
addons/dogtags/functions/fnc_sendDogtagData.sqf
Normal file
30
addons/dogtags/functions/fnc_sendDogtagData.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: SzwedzikPL
|
||||
* Server: returns to client data on given dogtag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if(!isServer) exitWith {};
|
||||
|
||||
params ["_target", "_item"];
|
||||
TRACE_2("sendDogtagData",_target,_item);
|
||||
|
||||
private _allDogtags = missionNameSpace getVariable [QGVAR(allDogtags), []];
|
||||
private _allDogtagDatas = missionNameSpace getVariable [QGVAR(allDogtagDatas), []];
|
||||
|
||||
private _dogtagData = [];
|
||||
private _index = _allDogtags find _item;
|
||||
if (_index >= 0) then {
|
||||
_dogtagData = _allDogtagDatas select _index;
|
||||
};
|
||||
|
||||
[QGVAR(showDogtag), [_dogtagData], [_target]] call CBA_fnc_targetEvent;
|
32
addons/dogtags/functions/fnc_showDogtag.sqf
Normal file
32
addons/dogtags/functions/fnc_showDogtag.sqf
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Author: SzwedzikPL
|
||||
* Shows dogtag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Dog tag data <ARRAY>
|
||||
* 1: Display as double tag <BOOLEAN>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
disableSerialization;
|
||||
|
||||
params ["_dogtagData", ["_doubleTags", false, [false]]];
|
||||
|
||||
if (!hasInterface || {_dogtagData isEqualTo []}) exitWith {};
|
||||
|
||||
if (_doubleTags) then {
|
||||
(QGVAR(tag) call BIS_fnc_rscLayer) cutRsc [QGVAR(doubleTag), "PLAIN", 1, true];
|
||||
} else {
|
||||
(QGVAR(tag) call BIS_fnc_rscLayer) cutRsc [QGVAR(singleTag), "PLAIN", 1, true];
|
||||
};
|
||||
private _display = uiNamespace getvariable [QGVAR(tag), displayNull];
|
||||
if(isNull _display) exitWith {};
|
||||
|
||||
private _control = _display displayCtrl 1001;
|
||||
_dogtagData params ["_nickName", "_code", "_bloodType"];
|
||||
_control ctrlSetStructuredText parseText format ["%1<br/>%2<br/>%3", toUpper _nickName, _code, _bloodType];
|
31
addons/dogtags/functions/fnc_ssn.sqf
Normal file
31
addons/dogtags/functions/fnc_ssn.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: SilentSpike
|
||||
* Reports a social security number generated from the units name.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Name of a unit <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* A random three/two/four format social security number <STRING>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name"];
|
||||
private _length = count _name;
|
||||
private _chars = toArray _name;
|
||||
|
||||
// For short names, reuse characters
|
||||
if (_length < 9) then {
|
||||
// Iterates every second character, swapping odd/even with each loop
|
||||
for [{_i = 0},{_i < 2*(9 - _length)},{_i = _i + 2}] do {
|
||||
_chars pushBack (_chars select floor((_i + (_i/_length % 2)) % _length));
|
||||
};
|
||||
};
|
||||
|
||||
// Offset array slice for long names to make generation more unique
|
||||
private _slice = [0, _length % 9] select (_length > 9);
|
||||
private _nums = (_chars select [_slice, 9]) apply { _x % 10 };
|
||||
|
||||
([_nums select [0,3],_nums select [3,2], _nums select [5,4]] apply { _x joinString "" }) joinString "-"
|
24
addons/dogtags/functions/fnc_takeDogtag.sqf
Normal file
24
addons/dogtags/functions/fnc_takeDogtag.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Author: SzwedzikPL
|
||||
* If dogtag is not already taken triggers event on server
|
||||
* If dogtag already taken displays info about it
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_player", "_target"];
|
||||
|
||||
if ((_target getVariable [QGVAR(dogtagTaken), objNull]) == _target) then {
|
||||
[localize LSTRING(dogtagAlreadyTaken)] call EFUNC(common,displayText);
|
||||
} else {
|
||||
_target setVariable [QGVAR(dogtagTaken), _target, true];
|
||||
[QGVAR(getDogtagItem), [_player, _target]] call CBA_fnc_serverEvent;
|
||||
};
|
1
addons/dogtags/functions/script_component.hpp
Normal file
1
addons/dogtags/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\dogtags\script_component.hpp"
|
17
addons/dogtags/script_component.hpp
Normal file
17
addons/dogtags/script_component.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#define COMPONENT dogtags
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define CBA_DEBUG_SYNCHRONOUS
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_DOGTAGS
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_DOGTAGS
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_DOGTAGS
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
29
addons/dogtags/stringtable.xml
Normal file
29
addons/dogtags/stringtable.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Dogtags">
|
||||
<Key ID="STR_ACE_Dogtags_itemName">
|
||||
<English>Dog Tag</English>
|
||||
<Polish>Nieśmiertelnik</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Dogtags_checkItem">
|
||||
<English>Check Dog Tag</English>
|
||||
<Polish>Sprawdź nieśmiertelnik</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Dogtags_checkDogtag">
|
||||
<English>Check</English>
|
||||
<Polish>Sprawdź</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Dogtags_takeDogtag">
|
||||
<English>Take</English>
|
||||
<Polish>Zabierz</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Dogtags_takeDogtagSuccess">
|
||||
<English>Dogtag taken from %1...</English>
|
||||
<Polish>Zabrałeś nieśmiertelnik %1...</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Dogtags_dogtagAlreadyTaken">
|
||||
<English>Somebody else has already taken the dogtag...</English>
|
||||
<Polish>Ktoś już zabrał ten nieśmiertelnik...</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -28,3 +28,30 @@ if (isNil "ACE_maxWeightCarry") then {
|
||||
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
//@todo Captivity?
|
||||
|
||||
//Add Keybind:
|
||||
["ACE3 Common", QGVAR(drag), (localize LSTRING(DragKeybind)),
|
||||
{
|
||||
if (!alive ACE_player) exitWith {false};
|
||||
if !([ACE_player, objNull, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// If we are drag/carrying something right now then just drop it:
|
||||
if (ACE_player getVariable [QGVAR(isDragging), false]) exitWith {
|
||||
[ACE_player, ACE_player getVariable [QGVAR(draggedObject), objNull]] call FUNC(dropObject);
|
||||
false
|
||||
};
|
||||
if (ACE_player getVariable [QGVAR(isCarrying), false]) exitWith {
|
||||
[ACE_player, ACE_player getVariable [QGVAR(carriedObject), objNull]] call FUNC(dropObject_carry);
|
||||
false
|
||||
};
|
||||
|
||||
private _cursor = cursorObject;
|
||||
if ((isNull _cursor) || {(_cursor distance ACE_player) > 2.6}) exitWith {false};
|
||||
if (!([ACE_player, _cursor] call FUNC(canDrag))) exitWith {false};
|
||||
|
||||
[ACE_player, _cursor] call FUNC(startDrag);
|
||||
false
|
||||
},
|
||||
{false},
|
||||
[-1, [false, false, false]]] call CBA_fnc_addKeybind; // UNBOUND
|
||||
|
||||
|
@ -25,6 +25,18 @@
|
||||
<Italian>Lascia</Italian>
|
||||
<Hungarian>Elengedés</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Dragging_DragKeybind">
|
||||
<English>Drag/Release Object</English>
|
||||
<Russian>Тащить/Отпустить Объекты</Russian>
|
||||
<Spanish>Arrastrar/Soltar Objeto</Spanish>
|
||||
<Polish>Ciągnij/Puść Obiekt</Polish>
|
||||
<Czech>Táhnout/Položit Objekt</Czech>
|
||||
<French>Trainer/Lâcher Objets</French>
|
||||
<German>Objekt ziehen/loslassen</German>
|
||||
<Portuguese>Arrastar/Soltar Objeto</Portuguese>
|
||||
<Italian>Trascina/Lascia Oggetto</Italian>
|
||||
<Hungarian>Húzás/Elengedés Objektum</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Dragging_UnableToDrag">
|
||||
<English>Item too heavy</English>
|
||||
<German>Gegenstand ist zu schwer</German>
|
||||
|
@ -286,7 +286,7 @@ class CfgVehicles {
|
||||
class B_Soldier_03_f; class B_engineer_F:B_Soldier_03_f {MACRO_ADDMINEKIT};
|
||||
class B_Soldier_diver_base_F; class B_diver_exp_F:B_Soldier_diver_base_F {MACRO_ADDMINEKIT};
|
||||
class B_Soldier_recon_base; class B_recon_exp_F:B_Soldier_recon_base {MACRO_ADDMINEKIT};
|
||||
class B_CTRG_soldier_engineer_exp_F:B_Soldier_base_F {MACRO_ADDMINEKIT};
|
||||
class B_Soldier_02_f; class B_CTRG_soldier_engineer_exp_F:B_Soldier_02_f {MACRO_ADDMINEKIT};
|
||||
class I_G_Soldier_base_F; class I_G_engineer_F:I_G_Soldier_base_F {MACRO_ADDMINEKIT};
|
||||
class I_G_Soldier_exp_F:I_G_Soldier_base_F {MACRO_ADDMINEKIT};
|
||||
class B_G_engineer_F:I_G_engineer_F {MACRO_ADDMINEKIT};
|
||||
|
@ -1,7 +1,7 @@
|
||||
class ACE_UI {
|
||||
class gunnerZeroing {
|
||||
class conditions {
|
||||
ADDON = "false";
|
||||
ADDON = "(false)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -19,11 +19,6 @@ class CfgWeapons {
|
||||
class UGL_F: GrenadeLauncher {
|
||||
magazines[] += {"ACE_HuntIR_M203"};
|
||||
};
|
||||
class GL_3GL_F: UGL_F {
|
||||
//magazines[] += {"ACE_HuntIR_M203"};
|
||||
magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell","ACE_HuntIR_M203"};
|
||||
};
|
||||
|
||||
class Rifle_Base_F;
|
||||
class arifle_MX_Base_F: Rifle_Base_F {
|
||||
class GL_3GL_F: UGL_F {
|
||||
|
@ -159,7 +159,7 @@ if (count GVAR(collectedActionPoints) > 1) then {
|
||||
private _delta = vectorNormalized ((GVAR(collectedActionPoints) select _i select 1) vectorDiff (GVAR(collectedActionPoints) select _j select 1));
|
||||
|
||||
// If _i is inside a cone with 20º half angle with origin on _j
|
||||
if (_delta select 2 > 0.94) exitWith {
|
||||
if ((_delta select 2 > 0.94) && {((GVAR(collectedActionPoints) select _i select 1) distance2d (GVAR(collectedActionPoints) select _j select 1)) < 0.1}) exitWith {
|
||||
GVAR(collectedActionPoints) deleteAt _i;
|
||||
};
|
||||
};
|
||||
|
@ -38,6 +38,9 @@ class CfgWeapons {
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
class launch_B_Titan_short_tna_F: launch_B_Titan_short_F {
|
||||
GVAR(enabled) = 1;
|
||||
};
|
||||
class launch_I_Titan_short_F: launch_Titan_short_base {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
@ -59,6 +62,9 @@ class CfgWeapons {
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
class launch_O_Titan_short_ghex_F: launch_O_Titan_short_F {
|
||||
GVAR(enabled) = 1;
|
||||
};
|
||||
class launch_Titan_short_F: launch_Titan_short_base {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
|
@ -2,12 +2,12 @@
|
||||
#include "script_component.hpp"
|
||||
TRACE_1("enter", _this);
|
||||
|
||||
private["_player", "_currentFireMode"];
|
||||
private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};
|
||||
private _currentFireMode = _currentShooter getVariable["ace_missileguidance_attackProfile", "JAV_TOP"];
|
||||
|
||||
_currentFireMode = ACE_player getVariable["ace_missileguidance_attackProfile", "JAV_TOP"];
|
||||
if(_currentFireMode == "JAV_DIR") then {
|
||||
_currentFireMode = "JAV_TOP";
|
||||
} else {
|
||||
_currentFireMode = "JAV_DIR";
|
||||
};
|
||||
ACE_player setVariable["ace_missileguidance_attackProfile", _currentFireMode, false];
|
||||
_currentShooter setVariable["ace_missileguidance_attackProfile", _currentFireMode, false];
|
||||
|
@ -11,7 +11,7 @@ private["_firedEH", "_fov", "_lastTick", "_lockTime", "_maxX", "_maxY", "_minX",
|
||||
private["_offsetX", "_offsetY", "_pos", "_randomLockInterval", "_randomPosWithinBounds", "_range"];
|
||||
private["_runTime", "_soundTime", "_targetArray", "_zamerny", "_currentShooter"];
|
||||
|
||||
_currentShooter = (vehicle ACE_player);
|
||||
_currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};
|
||||
|
||||
#define __OffsetX ((ctrlPosition __JavelinIGUITargetingLineV) select 0) - 0.5
|
||||
#define __OffsetY ((ctrlPosition __JavelinIGUITargetingLineH) select 1) - 0.5
|
||||
|
@ -2,13 +2,15 @@
|
||||
#include "script_component.hpp"
|
||||
TRACE_1("enter", _this);
|
||||
|
||||
#define __LOCKONTIMERANDOM 2 // Deviation in lock on time
|
||||
#define __LOCKONTIMERANDOM 1 // Deviation in lock on time
|
||||
|
||||
if((count _this) > 0) then {
|
||||
uiNameSpace setVariable ['ACE_RscOptics_javelin',_this select 0];
|
||||
};
|
||||
|
||||
ACE_player setVariable ["ace_missileguidance_target",nil, false];
|
||||
private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};
|
||||
TRACE_2("shooter",_currentShooter,typeOf _currentShooter);
|
||||
_currentShooter setVariable ["ace_missileguidance_target", nil, false];
|
||||
|
||||
__JavelinIGUISeek ctrlSetTextColor __ColorGray;
|
||||
__JavelinIGUINFOV ctrlSetTextColor __ColorGray;
|
||||
|
@ -2,13 +2,13 @@
|
||||
#include "script_component.hpp"
|
||||
TRACE_1("enter", _this);
|
||||
|
||||
private["_player", "_currentFireMode"];
|
||||
private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};
|
||||
private _currentFireMode = _currentShooter getVariable ["ace_missileguidance_attackProfile", "JAV_TOP"];
|
||||
|
||||
_currentFireMode = ACE_player getVariable["ace_missileguidance_attackProfile", "JAV_TOP"];
|
||||
if(_currentFireMode == "JAV_TOP") then {
|
||||
__JavelinIGUITop ctrlSetTextColor __ColorGreen;
|
||||
__JavelinIGUIDir ctrlSetTextColor __ColorGray;
|
||||
} else {
|
||||
__JavelinIGUITop ctrlSetTextColor __ColorGray;
|
||||
__JavelinIGUIDir ctrlSetTextColor __ColorGreen;
|
||||
};
|
||||
};
|
||||
|
@ -84,6 +84,7 @@
|
||||
#define TYPE_BACKPACK 901
|
||||
|
||||
#ifdef DISABLE_COMPILE_CACHE
|
||||
#undef PREP
|
||||
#define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,fncName).sqf)
|
||||
#else
|
||||
#undef PREP
|
||||
|
@ -129,7 +129,7 @@ if (_show) then {
|
||||
};
|
||||
} foreach _bandagedwounds;
|
||||
} else {
|
||||
private _damaged = [true, true, true, true, true, true];
|
||||
_damaged = [true, true, true, true, true, true];
|
||||
{
|
||||
private _hitPoint = [_target, _x, true] call FUNC(translateSelections);
|
||||
_selectionBloodLoss set [_forEachIndex, _target getHitPointDamage _hitPoint];
|
||||
|
@ -21,13 +21,6 @@ if (!local _unit) exitWith {};
|
||||
|
||||
private _startTime = _unit getVariable [QGVAR(reviveStartTime), 0];
|
||||
|
||||
// Remove heartbeat
|
||||
if (GVAR(level) >= 2) then {
|
||||
if (_unit getVariable [QGVAR(heartRate), 60] > 0) then {
|
||||
_unit setVariable [QGVAR(heartRate), 0];
|
||||
};
|
||||
};
|
||||
|
||||
// If we are in revive state in a blown up vehicle, try to unload so that people can access the body
|
||||
if ((alive _unit) && {(vehicle _unit) != _unit} && {!alive (vehicle _unit)}) then {
|
||||
TRACE_2("Unloading", _unit, vehicle _unit);
|
||||
@ -52,5 +45,12 @@ if !(_unit getVariable [QGVAR(inReviveState), false]) exitwith {
|
||||
_unit setVariable [QGVAR(reviveStartTime), nil];
|
||||
};
|
||||
|
||||
// Remove heartbeat
|
||||
if (GVAR(level) >= 2) then {
|
||||
if (_unit getVariable [QGVAR(heartRate), 60] > 0) then {
|
||||
_unit setVariable [QGVAR(heartRate), 0];
|
||||
};
|
||||
};
|
||||
|
||||
// Schedule the loop to be executed again 1 sec later
|
||||
[DFUNC(reviveStateLoop), [_unit], 1] call CBA_fnc_waitAndExecute;
|
||||
|
@ -27,7 +27,7 @@ if (isNil QGVAR(bodiesToDelete)) then {GVAR(bodiesToDelete) = [];};
|
||||
GVAR(bodiesToDelete) pushBack _target;
|
||||
|
||||
// Start up a loop to wait for bodies to be free to delete
|
||||
if ((count GVAR(bodiesToDelete)) > 0) then {
|
||||
if ((count GVAR(bodiesToDelete)) == 1) then {
|
||||
[] call FUNC(bodyCleanupLoop);
|
||||
};
|
||||
|
||||
|
@ -14,6 +14,8 @@ private["_seeker", "_seekerPos", "_target", "_targetPos", "_return", "_vectorTo"
|
||||
_seeker = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
if ((isNil "_seeker") || {isNil "_target"}) exitWith {false};
|
||||
|
||||
_targetPos = getPosASL _target;
|
||||
_seekerPos = getPosASL _seeker;
|
||||
_return = true;
|
||||
|
@ -37,7 +37,7 @@ _fnc_parameters = {
|
||||
_size = 1;
|
||||
} else {
|
||||
if (_drawRank && {rank _target != ""}) then {
|
||||
_icon = GVAR(factionRanks) getVariable faction _target;
|
||||
_icon = GVAR(factionRanks) getVariable (_target getVariable [QGVAR(faction), faction _target]);
|
||||
if (!isNil "_icon") then {
|
||||
_icon = _icon param [ALL_RANKS find rank _target, ""];
|
||||
} else {
|
||||
|
BIN
addons/optionsmenu/gui/aceMenuIcon_ca.paa
Normal file
BIN
addons/optionsmenu/gui/aceMenuIcon_ca.paa
Normal file
Binary file not shown.
@ -12,6 +12,11 @@ class RscHTML;
|
||||
class RscText;
|
||||
|
||||
|
||||
class RscControlsGroupNoHScrollbars;
|
||||
class RscPicture;
|
||||
class RscButtonMenu;
|
||||
|
||||
|
||||
#ifndef ACE_DEFINE_H
|
||||
#define ACE_DEFINE_H
|
||||
|
||||
|
@ -108,62 +108,90 @@ class RscDisplayMain: RscStandardDisplay {
|
||||
idc = 80085;
|
||||
};
|
||||
|
||||
class ACE_news: RscControlsGroupNoScrollbars {
|
||||
idc = 80086;
|
||||
x = "safezoneX + safezoneW - (16 *(((safezoneW / safezoneH) min 1.2) / 40))";
|
||||
y = "safezoneY + (18.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))";
|
||||
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "4.95 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
class controls {
|
||||
class ACE_NewsTitle: RscText {
|
||||
text = CSTRING(aceNews);
|
||||
colorBackground[] = {(162/255),(28/255),(28/255),0.8};
|
||||
idc = -1;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "15 *(((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
};
|
||||
class ACE_VersionInfo: RscText {
|
||||
idc = 68;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0,0,0,0.5};
|
||||
};
|
||||
class ACE_NewsBackground: RscText {
|
||||
idc = -1;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "2.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "5.75 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0,0,0,0.5};
|
||||
};
|
||||
class ACE_NewsText: RscHTML {
|
||||
idc = 69;
|
||||
x = "0.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "2.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "14 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "2.75 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
|
||||
class ACE_news_apex: RscControlsGroupNoHScrollbars {
|
||||
idc = 80090;
|
||||
x = "safezoneX + safezoneW - 10 * (pixelW * pixelGrid * 2) - (4 * pixelH)";
|
||||
y = "safezoneY + safezoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 3 * (4 * pixelH)";
|
||||
w = "10 * (pixelW * pixelGrid * 2)";
|
||||
h = "2 * (pixelH * pixelGrid * 2)";
|
||||
class Controls {
|
||||
class Background: RscPicture {
|
||||
idc = 80091;
|
||||
text = "\a3\Ui_f\data\GUI\Rsc\RscDisplayMain\gradientMods_ca.paa";
|
||||
colorText[] = {0,0,0,0.75};
|
||||
x = "(10 - 4 * 2) * (pixelW * pixelGrid * 2)";
|
||||
y = 0;
|
||||
w = "4 * 2 * (pixelW * pixelGrid * 2)";
|
||||
h = "2 * (pixelH * pixelGrid * 2)";
|
||||
angle = 180;
|
||||
};
|
||||
class BackgroundIcon: RscPicture {
|
||||
idc = 80092;
|
||||
text = "\a3\Ui_f\data\GUI\Rsc\RscDisplayMain\backgroundModsIcon_ca.paa";
|
||||
colorText[] = {0,0,0,0.75};
|
||||
x = "(10 - 2 * 2) * (pixelW * pixelGrid * 2)";
|
||||
y = 0;
|
||||
w = "2 * 2 * (pixelW * pixelGrid * 2)";
|
||||
h = "2 * (pixelH * pixelGrid * 2)";
|
||||
angle = 180;
|
||||
};
|
||||
class Icon: RscPicture {
|
||||
idc = 80093;
|
||||
text = QPATHTOF(gui\aceMenuIcon_ca.paa);
|
||||
colorText[] = {1,1,1,0.5};
|
||||
x = "(10 - 2) * (pixelW * pixelGrid * 2)";
|
||||
y = 0;
|
||||
w = "2 * (pixelW * pixelGrid * 2)";
|
||||
h = "2 * (pixelH * pixelGrid * 2)";
|
||||
};
|
||||
class CurrentVersionInfo: RscText {
|
||||
idc = 80094;
|
||||
style = 1;
|
||||
text = "";
|
||||
sizeEx = "(pixelH * pixelGrid * 1.5)";
|
||||
font = "RobotoCondensedLight";
|
||||
shadow = 1;
|
||||
colorBackground[] = {0,0,0,0};
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)";
|
||||
h = "2 * (pixelH * pixelGrid * 1)";
|
||||
onLoad = "(_this select 0) ctrlenable false;";
|
||||
};
|
||||
class HTTPVersionInfo: RscHTML {
|
||||
idc = 80095;
|
||||
shadow = 0;
|
||||
class H1 {
|
||||
font = "RobotoCondensed";
|
||||
sizeEx = "(pixelH * pixelGrid * 1.5)";
|
||||
font = "RobotoCondensedLight";
|
||||
fontBold = "RobotoCondensedLight";
|
||||
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)";
|
||||
align = "right";
|
||||
};
|
||||
class H2: H1 {
|
||||
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
|
||||
font = "RobotoCondensedLight";
|
||||
sizeEx = "(pixelH * pixelGrid * 1.5)";
|
||||
};
|
||||
class P: H1 {
|
||||
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
fontBold = "RobotoCondensedLight";
|
||||
sizeEx = "(pixelH * pixelGrid * 1.5)";
|
||||
};
|
||||
colorBold[] = {0.6,0.6,0.6,1};
|
||||
colorLink[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",1};
|
||||
colorLinkActive[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",1};
|
||||
x = 0;
|
||||
y = "2 * (pixelH * pixelGrid * 1)";
|
||||
w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)";
|
||||
h = "2 * (pixelH * pixelGrid * 1)";
|
||||
onLoad = "(_this select 0) ctrlenable false;";
|
||||
};
|
||||
class Button: RscButtonMenu {
|
||||
idc = 80096;
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorBackgroundFocused[] = {0,0,0,0};
|
||||
colorBackground2[] = {0,0,0,0};
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = "10 * (pixelW * pixelGrid * 2)";
|
||||
h = "2 * (pixelH * pixelGrid * 2)";
|
||||
|
||||
tooltip = "Download latest and report issues:";
|
||||
url = "https://github.com/acemod/ACE3";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -15,17 +15,18 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (missionNamespace getVariable [QGVAR(newsLoaded), false]) exitWith {};
|
||||
GVAR(newsLoaded) = true;
|
||||
|
||||
//Need to load from profileNamespace because ace_settings might not be init if world = empty
|
||||
if (profileNamespace getVariable [QGVAR(showNewsOnMainMenu), true]) then {
|
||||
((_this select 0) displayCtrl 80086) ctrlShow true;
|
||||
((_this select 0) displayCtrl 80090) ctrlShow true;
|
||||
|
||||
private ["_version"];
|
||||
_version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr");
|
||||
((_this select 0) displayCtrl 68) ctrlSetText format ["Installed Version: %1", _version];
|
||||
((_this select 0) displayCtrl 69) htmlLoad "http://ace3mod.com/version.html";
|
||||
private _ace3VersionStr = (getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr")) select [0,5];
|
||||
((_this select 0) displayCtrl 80094) ctrlSetText format ["Version: %1", _ace3VersionStr];
|
||||
((_this select 0) displayCtrl 80095) htmlLoad "http://ace3mod.com/version.html";
|
||||
} else {
|
||||
((_this select 0) displayCtrl 80086) ctrlShow false;
|
||||
((_this select 0) displayCtrl 80090) ctrlShow false;
|
||||
};
|
||||
|
||||
/*
|
||||
Note: switch version.html to simpler format and right align
|
||||
<h1 align="right">Latest: {{site.ace.version.major}}.{{site.ace.version.minor}}.{{site.ace.version.patch}}</h1>
|
||||
*/
|
||||
|
@ -2,17 +2,6 @@ class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_SpareBarrel: ACE_ItemCore {
|
||||
displayname = CSTRING(SpareBarrelName);
|
||||
descriptionshort = CSTRING(SpareBarrelDescription);
|
||||
//model = "";
|
||||
picture = QPATHTOF(UI\spare_barrel_ca.paa);
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 30;
|
||||
};
|
||||
};
|
||||
|
||||
class RifleCore;
|
||||
class Rifle: RifleCore {
|
||||
//Mean Rounds Between Stoppages (this will be scaled based on the barrel temp)
|
||||
|
@ -4,16 +4,4 @@ ADDON = false;
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
if (isNil "CBA_fnc_getMagazineIndex") then {
|
||||
CBA_fnc_getMagazineIndex = {
|
||||
params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]];
|
||||
|
||||
private _displayName = getText (configFile >> "CfgMagazines" >> _magazine >> "displayName");
|
||||
|
||||
if (_displayName isEqualTo "") exitWith {[]};
|
||||
|
||||
(magazinesDetail _unit select {_x find _displayName == 0}) apply {_x = _x splitString "[:]"; _x select (count _x - 1)};
|
||||
};
|
||||
};
|
||||
|
||||
ADDON = true;
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Displays the weapon temperature
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Weapon <STRING>
|
||||
*
|
||||
* Return Values:
|
||||
@ -16,11 +16,13 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_player", "_weapon"];
|
||||
TRACE_2("params",_player,_weapon);
|
||||
params ["_unit", "_weapon"];
|
||||
TRACE_2("params",_unit,_weapon);
|
||||
|
||||
// Get unit's weapon's temperature:
|
||||
private _tempVarName = format [QGVAR(%1_temp), _weapon];
|
||||
private _temperature = _unit getVariable [_tempVarName, 0];
|
||||
|
||||
// Calculate cool down of weapon since last shot
|
||||
private _temperature = [_player, _weapon, 0] call FUNC(updateTemperature);
|
||||
private _scaledTemperature = (_temperature / 1000) min 1;
|
||||
|
||||
private _color = [
|
||||
@ -41,6 +43,8 @@ for "_a" from (_count + 1) to 12 do {
|
||||
_string = _string + "|";
|
||||
};
|
||||
|
||||
TRACE_3("",_temperature,_color,_string);
|
||||
|
||||
_text = composeText [_text, [_string, [0.5, 0.5, 0.5]] call EFUNC(common,stringToColoredText)];
|
||||
|
||||
private _picture = getText (configFile >> "CfgWeapons" >> _weapon >> "picture");
|
||||
|
@ -50,4 +50,4 @@ _gunner setVariable [format [QGVAR(%1_temp), _weapon], _coolestTemp, true];
|
||||
[GVAR(storedSpareBarrels), _coolestMag, [_weaponTemp, CBA_missionTime, _barrelMass]] call CBA_fnc_hashSet;
|
||||
|
||||
// Send an event so the machines of the assistant and gunner can show the hint
|
||||
[QGVAR(showWeaponTemperature), _gunner], [_gunner, _weapon], [_assistant] call CBA_fnc_targetEvent;
|
||||
[QGVAR(showWeaponTemperature), [_gunner, _weapon], [_assistant, _gunner]] call CBA_fnc_targetEvent;
|
||||
|
@ -17,11 +17,21 @@
|
||||
|
||||
private ["_turretPath", "_magazines", "_magazine", "_currentMagazines", "_maxMagazines", "_maxRounds", "_currentRounds"];
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
TRACE_1("params",_vehicle);
|
||||
|
||||
|
||||
//ToDo: Cleanup with CBA_fnc_ownerEvent in CBA 2.4.2
|
||||
{
|
||||
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_vehicle, _x]] call CBA_fnc_globalEvent;
|
||||
} forEach REARM_TURRET_PATHS;
|
||||
|
||||
|
||||
/*
|
||||
if (isServer) then {
|
||||
{
|
||||
_turretOwnerID = _vehicle turretOwner _x;
|
||||
if (_turretOwnerID == 0) then {
|
||||
//wtf is _truck from???
|
||||
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _truck] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _turretOwnerID] call CBA_fnc_targetEvent;
|
||||
@ -30,3 +40,4 @@ if (isServer) then {
|
||||
} else {
|
||||
[QGVAR(rearmEntireVehicleSuccessLocalEH), _this] call CBA_fnc_serverEvent;
|
||||
};
|
||||
*/
|
||||
|
@ -18,6 +18,10 @@
|
||||
|
||||
private ["_magazines", "_magazine", "_currentMagazines", "_maxMagazines", "_maxRounds", "_currentRounds"];
|
||||
params [["_vehicle", objNull, [objNull]], ["_turretPath", [], [[]]]];
|
||||
TRACE_2("params",_vehicle,_turretPath);
|
||||
|
||||
//ToDo: Cleanup with CBA_fnc_ownerEvent in CBA 2.4.2
|
||||
if (!(_vehicle turretLocal _turretPath)) exitWith {TRACE_1("not local turret",_turretPath);};
|
||||
|
||||
_magazines = [_vehicle, _turretPath] call FUNC(getConfigMagazines);
|
||||
{
|
||||
|
@ -24,6 +24,7 @@
|
||||
private ["_dummy", "_weaponSelect", "_turretOwnerID"];
|
||||
params [["_args", [objNull, objNull, [], 0, "", 0], [[]], [6]]];
|
||||
_args params ["_target", "_unit", "_turretPath", "_numMagazines", "_magazineClass", "_numRounds"];
|
||||
TRACE_6("params",_target,_unit,_turretPath,_numMagazines,_magazineClass,_numRounds);
|
||||
|
||||
//hint format ["Target: %1\nTurretPath: %2\nNumMagazines: %3\nMagazine: %4\nNumRounds: %5", _target, _turretPath, _numMagazines, _magazineClass, _numRounds];
|
||||
|
||||
@ -31,6 +32,10 @@ if (local _unit) then {
|
||||
[_unit, true, true] call FUNC(dropAmmo);
|
||||
};
|
||||
|
||||
//ToDo: Cleanup with CBA_fnc_ownerEvent in CBA 2.4.2
|
||||
[QGVAR(rearmSuccessLocalEH), _this] call CBA_fnc_globalEvent;
|
||||
|
||||
/*
|
||||
if (isServer) then {
|
||||
_turretOwnerID = _target turretOwner _turretPath;
|
||||
if (_turretOwnerID == 0) then {
|
||||
@ -41,3 +46,4 @@ if (isServer) then {
|
||||
} else {
|
||||
[QGVAR(rearmSuccessLocalEH), _this] call CBA_fnc_serverEvent;
|
||||
};
|
||||
*/
|
@ -24,6 +24,10 @@
|
||||
private ["_rounds", "_currentRounds", "_maxMagazines", "_currentMagazines", "_dummy", "_weaponSelect"];
|
||||
params [["_args", [objNull, objNull, [], 0, "", 0], [[]], [6]]];
|
||||
_args params ["_target", "_unit", "_turretPath", "_numMagazines", "_magazineClass", "_numRounds"];
|
||||
TRACE_6("params",_target,_unit,_turretPath,_numMagazines,_magazineClass,_numRounds);
|
||||
|
||||
//ToDo: Cleanup with CBA_fnc_ownerEvent in CBA 2.4.2
|
||||
if (!(_target turretLocal _turretPath)) exitWith {TRACE_1("not local turret",_turretPath);};
|
||||
|
||||
//hint format ["Target: %1\nTurretPath: %2\nNumMagazines: %3\nMagazine: %4\nNumRounds: %5\nUnit: %6", _target, _turretPath, _numMagazines, _magazineClass, _numRounds, _unit];
|
||||
|
||||
|
@ -52,21 +52,13 @@
|
||||
#define MACRO_CONNECT_ACTIONS \
|
||||
class ACE_Actions { \
|
||||
class ACE_MainActions { \
|
||||
class GVAR(Refuel) { \
|
||||
displayName = CSTRING(Refuel); \
|
||||
class GVAR(Connect) { \
|
||||
displayName = CSTRING(Connect); \
|
||||
distance = REFUEL_ACTION_DISTANCE; \
|
||||
condition = "true"; \
|
||||
statement = ""; \
|
||||
showDisabled = 0; \
|
||||
priority = 2; \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canConnectNozzle)); \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(connectNozzle)); \
|
||||
icon = QPATHTOF(ui\icon_refuel_interact.paa); \
|
||||
class GVAR(Connect) { \
|
||||
displayName = CSTRING(Connect); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canConnectNozzle)); \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(connectNozzle)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOF(ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
}; \
|
||||
}; \
|
||||
};
|
||||
@ -76,6 +68,7 @@
|
||||
class ACE_MainActions { \
|
||||
displayName = CSTRING(Refuel); \
|
||||
distance = REFUEL_ACTION_DISTANCE; \
|
||||
position = "[0,-0.025,0.125]"; \
|
||||
condition = "true"; \
|
||||
statement = ""; \
|
||||
showDisabled = 0; \
|
||||
@ -319,12 +312,17 @@ class CfgVehicles {
|
||||
};
|
||||
|
||||
class Van_01_fuel_base_F: Van_01_base_F {
|
||||
transportFuel = 0; //1k
|
||||
MACRO_REFUEL_ACTIONS
|
||||
GVAR(hooks)[] = {{0.38,-3.17,-.7},{-0.41,-3.17,-.7}};
|
||||
GVAR(fuelCargo) = 2000;
|
||||
};
|
||||
|
||||
class C_Van_01_fuel_F: Van_01_fuel_base_F {
|
||||
transportFuel = 0; //1k
|
||||
};
|
||||
class I_G_Van_01_fuel_F: Van_01_fuel_base_F {
|
||||
transportFuel = 0; //1k
|
||||
};
|
||||
|
||||
class Tank_F: Tank {
|
||||
GVAR(fuelCapacity) = 1200;
|
||||
};
|
||||
|
@ -9,3 +9,16 @@ if (isServer) then {
|
||||
[QGVAR(resetLocal), {
|
||||
_this call FUNC(resetLocal);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
diag_log text format ["[ACE-refuel] Showing CfgVehicles with vanilla transportFuel"];
|
||||
private _fuelTrucks = configProperties [configFile >> "CfgVehicles", "(isClass _x) && {(getNumber (_x >> 'transportFuel')) > 0}", true];
|
||||
{
|
||||
if ((configName _x) isKindOf "Car") then {
|
||||
diag_log text format ["Car [%1] needs config [fuel: %2]", configName _x, getNumber (_x >> 'transportFuel')];
|
||||
} else {
|
||||
diag_log text format ["Non-car? [%1] needs config [fuel: %2]", configName _x, getNumber (_x >> 'transportFuel')];
|
||||
};
|
||||
} forEach _fuelTrucks;
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
class ACE_UI {
|
||||
class ammoCount {
|
||||
class conditions {
|
||||
ADDON = "false";
|
||||
ADDON = "(false)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -25,5 +25,5 @@ class ACE_newEvents {
|
||||
setWheelHitPointDamage = QGVAR(setWheelHitPointDamage);
|
||||
setVehicleHitPointDamage = QGVAR(setVehicleHitPointDamage);
|
||||
setVehicleDamage = QGVAR(setVehicleDamage);
|
||||
AddCargoByClass = "ace_addCargoByClass";
|
||||
AddCargoByClass = "ace_addCargo";
|
||||
};
|
||||
|
@ -33,4 +33,4 @@ if (!EGVAR(common,settingsInitFinished)) exitWith {
|
||||
if (!_force && !GVAR(addSpareParts)) exitWith {};
|
||||
|
||||
// Load
|
||||
["ace_addCargoByClass", [_part, _vehicle, _amount]] call CBA_fnc_localEvent;
|
||||
["ace_addCargo", [_part, _vehicle, _amount]] call CBA_fnc_localEvent;
|
||||
|
@ -1,49 +1,10 @@
|
||||
class Mode_SemiAuto;
|
||||
class Mode_Burst;
|
||||
class Mode_FullAuto;
|
||||
class MuzzleSlot;
|
||||
|
||||
// config inheritance of weapon slot info v1.32
|
||||
class SlotInfo;
|
||||
class CowsSlot: SlotInfo {};
|
||||
class PointerSlot: SlotInfo {
|
||||
//compatibleItems[] = {"acc_flashlight","acc_pointer_IR", "ACE_acc_flashlight_tls"};
|
||||
};
|
||||
|
||||
class CfgWeapons {
|
||||
|
||||
// config inheritance of weapon slot info v1.32 for launchers
|
||||
class Launcher;
|
||||
class Launcher_Base_F: Launcher {
|
||||
class WeaponSlotsInfo {};
|
||||
};
|
||||
|
||||
// config inheritance of weapon slot info v1.32 for assault rifles
|
||||
class RifleCore;
|
||||
class Rifle: RifleCore {
|
||||
class WeaponSlotsInfo {
|
||||
class MuzzleSlot: MuzzleSlot {};
|
||||
class CowsSlot: CowsSlot {};
|
||||
class PointerSlot: PointerSlot {};
|
||||
};
|
||||
};
|
||||
class Rifle_Base_F: Rifle {};
|
||||
class Rifle_Long_Base_F: Rifle_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {};
|
||||
};
|
||||
|
||||
// config inheritance of weapon slot info v1.32 for handguns
|
||||
class PistolCore;
|
||||
class Pistol: PistolCore {
|
||||
class WeaponSlotsInfo {
|
||||
class CowsSlot: SlotInfo {};
|
||||
};
|
||||
};
|
||||
class Pistol_Base_F: Pistol {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {};
|
||||
};
|
||||
};
|
||||
class Rifle_Base_F;
|
||||
class Rifle_Long_Base_F;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//////////// SMALL ARMS WEAPONS ///////////////////////////////////////////////
|
||||
|
@ -70,8 +70,8 @@ class CfgVehicles {
|
||||
model = QPATHTOF(data\ace_spottingscope.p3d);
|
||||
mapSize = 0.5;
|
||||
transportSoldier = 0;
|
||||
getInAction = "GetInLow";
|
||||
getOutAction = "GetOutLow";
|
||||
getInAction = "PlayerProne";
|
||||
getOutAction = "PlayerProne";
|
||||
editorSubcategory = "EdSubcat_Turrets";
|
||||
|
||||
class Turrets: Turrets {
|
||||
@ -115,8 +115,8 @@ class CfgVehicles {
|
||||
gunnerOutOpticsShowCursor = 0;
|
||||
gunnerOpticsShowCursor = 0;
|
||||
gunnerAction = "ACE_SpottingScope";
|
||||
gunnerGetInAction = "GetInLow";
|
||||
gunnerGetOutAction = "GetOutLow";
|
||||
gunnerGetInAction = "PlayerProne";
|
||||
gunnerGetOutAction = "PlayerProne";
|
||||
gunnerForceOptics = 0;
|
||||
ejectDeadGunner = 0;
|
||||
turretInfoType = QGVAR(RscUnitInfo);
|
||||
|
Binary file not shown.
@ -83,7 +83,7 @@ class ACE_Settings {
|
||||
displayName = CSTRING(AmmoCount);
|
||||
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
value = 0;
|
||||
isClientSettable = 1;
|
||||
};
|
||||
class GVAR(magCount) {
|
||||
|
@ -73,7 +73,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(AmmoCount);
|
||||
description = CSTRING(RequiresSoldierVehicleWeaponInfo);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
defaultValue = 0;
|
||||
};
|
||||
class magCount {
|
||||
displayName = CSTRING(MagCount);
|
||||
|
@ -58,5 +58,5 @@ class ACE_newEvents {
|
||||
zeusUnitAssigned = QGVAR(zeusUnitAssigned);
|
||||
SetSurrendered = QEGVAR(captives,setSurrendered);
|
||||
SetHandcuffed = QEGVAR(captives,setHandcuffed);
|
||||
AddCargoByClass = "ace_addCargoByClass";
|
||||
AddCargoByClass = "ace_addCargo";
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(c
|
||||
if (getNumber (configFile >> "CfgVehicles" >> "ACE_Track" >> QEGVAR(cargo,size)) > [_mouseOverUnit] call EFUNC(cargo,getCargoSpaceLeft)) then {
|
||||
[LSTRING(OnlyEnoughCargoSpace)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
["ace_addCargoByClass", ["ACE_Track", _mouseOverUnit, 1, true]] call CBA_fnc_localEvent;
|
||||
["ace_addCargo", ["ACE_Track", _mouseOverUnit, 1, true]] call CBA_fnc_localEvent;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(c
|
||||
if (getNumber (configFile >> "CfgVehicles" >> "ACE_Wheel" >> QEGVAR(cargo,size)) > [_mouseOverUnit] call EFUNC(cargo,getCargoSpaceLeft)) then {
|
||||
[LSTRING(OnlyEnoughCargoSpace)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
["ace_addCargoByClass", ["ACE_Wheel", _mouseOverUnit, 1, true]] call CBA_fnc_localEvent;
|
||||
["ace_addCargo", ["ACE_Wheel", _mouseOverUnit, 1, true]] call CBA_fnc_localEvent;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user