Merge remote-tracking branch 'origin/master' into medical-rewrite

This commit is contained in:
commy2 2016-09-25 18:11:48 +02:00
commit 033c7c7eec
122 changed files with 1163 additions and 1212 deletions

55
.gibot.yml Normal file
View File

@ -0,0 +1,55 @@
stages:
mark_for_closing:
days: 30
labels:
- need more info
- invalid
- can't reproduce
- wontfix
- information required
exclude:
- marked for cleanup
comment:
- 'Hello @{author}! There has been no activity on this ticket for over a period of {days} days. I am automatically replying to let you know we will close this ticket within 1 week due to inactivity and consider this resolved.'
- 'If you believe this in error, please reply with the requested information.'
- 'Thank you. :robot:'
action:
close: false
comment: true
assign_label:
- marked for cleanup
clean_up:
days: 7
labels:
- marked for cleanup
comment:
- 'Hello @{author}! We have detected no activity for {days} days on this ticket. We therefore assume that the original reporter has lost interest or the issue has been resolved.'
- 'Since we have marked this ticket for deletion, we will be closing it.'
- 'If this has been closed in error, please create a comment below and we can reopen this issue. Note that you may need to provide additional information that was requested.'
- 'Thank you. :robot:'
action:
close: true
comment: true
assign_label:
- closed by bot
remove_label:
- marked for cleanup
remind_about_old_ticket:
days: 130
labels:
- bug
- critical bug
exclude:
- need more info
- invalid
- can't reproduce
- wontfix
- information required
- marked for cleanup
- inactive
comment:
- 'Hello @acemod/maintainers. This ticket has been open for over {days} days without any activity.'
action:
comment: true
assign_label:
- inactive

3
.lgtm
View File

@ -1,3 +0,0 @@
approvals = 1
pattern = "(?i)LGTM|(?i):\\+1:|(?i):shipit:"
self_approval_off = true

View File

@ -5,6 +5,6 @@ PREP(getMetabolicCosts);
PREP(handleEffects);
PREP(handlePlayerChanged);
PREP(handleStaminaBar);
PREP(mainLoop);
PREP(moduleSettings);
PREP(pfhMain);
PREP(removeDutyFactor);

View File

@ -37,8 +37,8 @@ if (!hasInterface) exitWith {};
}] call FUNC(addDutyFactor);
};
// - Add main PFH -------------------------------------------------------------
[FUNC(pfhMain), 1, []] call CBA_fnc_addPerFrameHandler;
// - Add main loop at 1 second interval -------------------------------------------------------------
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
}] call CBA_fnc_addEventHandler;
["ace_settingChanged", {

View File

@ -1,6 +1,6 @@
/*
* Author: BaerMitUmlaut
* Main perFrameHandler that updates fatigue values.
* Main looping function that updates fatigue values.
*
* Arguments:
* None
@ -9,7 +9,9 @@
* None
*/
#include "script_component.hpp"
if (!alive ACE_player) exitWith {}; // Dead people don't breath, Will also handle null (Map intros)
if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros)
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
};
private _currentWork = REE;
private _currentSpeed = (vectorMagnitude (velocity ACE_player)) min 6;
@ -61,3 +63,5 @@ private _perceivedFatigue = 1 - (_anReservePercentage min _aeReservePercentage);
if (GVAR(enableStaminaBar)) then {
[GVAR(anReserve) / AN_MAXRESERVE] call FUNC(handleStaminaBar);
};
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;

View File

@ -12,6 +12,6 @@ class Extended_PreInit_EventHandlers {
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient));
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};

View File

@ -1,5 +1,8 @@
#include "script_component.hpp"
// Fired XEH
[QGVAR(throwFiredXEH), FUNC(throwFiredXEH)] call CBA_fnc_addEventHandler;
// Exit on HC
if (!hasInterface) exitWith {};
@ -63,6 +66,13 @@ GVAR(ammoMagLookup) = call CBA_fnc_createNamespace;
[_this select 1, "Player changed"] call FUNC(exitThrowMode);
}] call CBA_fnc_addPlayerEventhandler;
["visibleMap", {
if (visibleMap && {ACE_player getVariable [QGVAR(inHand), false]}) then {
[ACE_player, "Opened Map"] call FUNC(exitThrowMode);
};
}] call CBA_fnc_addPlayerEventhandler;
["ace_interactMenuOpened", {
// Exit if advanced throwing is disabled (pick up only supports advanced throwing)
if (!GVAR(enabled)) exitWith {};
@ -80,9 +90,6 @@ GVAR(ammoMagLookup) = call CBA_fnc_createNamespace;
}] call CBA_fnc_addEventHandler;
// Fired XEH
[QGVAR(throwFiredXEH), FUNC(throwFiredXEH)] call CBA_fnc_addEventHandler;
// Set last thrown time on Vanilla Throwing and Advanced Throwing
["ace_firedPlayer", {
if (_weapon == "Throw") then {

View File

@ -47,11 +47,15 @@ for "_i" from 0.05 to 1.45 step 0.1 do {
if (_newTrajASL distance (getPosASLVisual ACE_player) <= 20) then {
if ((ASLToATL _newTrajASL) select 2 <= 0) then {
_cross = 1
_cross = 1; // 1: Distance Limit (Green)
} else {
// Even vanilla throwables go through glass, only "GEOM" LOD will stop it but that will also stop it when there is glass in a window
if (lineIntersects [_prevTrajASL, _newTrajASL]) then {
_cross = 2;
if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD
_cross = 2; // 2: View LOD Block (Red)
} else {
if (!((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isEqualTo [])) then {
_cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass
};
};
};
@ -60,7 +64,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do {
private _movePerc = linearConversion [3, 0, vectorMagnitude (velocity ACE_player), 0, 1, true];
_alpha = _alpha * _movePerc;
private _col = [ [1, 1, 1, _alpha], [0, 1, 0, _alpha], [1, 0, 0, _alpha] ] select _cross;
private _col = [ [1, 1, 1, _alpha], [0, 1, 0, _alpha], [1, 0, 0, _alpha], [1, 1, 0, _alpha] ] select _cross;
if (_cross != 2 && {lineIntersects [eyePos ACE_player, _newTrajASL]}) then {
_col set [3, 0.1]

View File

@ -31,6 +31,12 @@ private _muzzle = _unit getVariable [QGVAR(activeMuzzle), ""];
// Set muzzle ammo to 0 to block vanilla throwing (can only be 0 or 1), removeItem above resets it
_unit setAmmo [_muzzle, 0];
// Handle weird scripted grenades (RHS) which could cause unexpected behaviour
private _nonInheritedCfg = configProperties [configFile >> "CfgAmmo" >> _throwableType, 'configName _x == QGVAR(replaceWith)', false];
if ((count _nonInheritedCfg) == 1) then {
_throwableType = getText (_nonInheritedCfg select 0);
};
// Create actual throwable globally
private _activeThrowableOld = _unit getVariable [QGVAR(activeThrowable), objNull];
private _activeThrowable = createVehicle [_throwableType, _activeThrowableOld, [], 0, "CAN_COLLIDE"];

View File

@ -22,6 +22,7 @@ class CfgWeapons {
};
class Rifle_Base_F: Rifle {};
class Rifle_Short_Base_F: Rifle_Base_F {};
class Rifle_Long_Base_F: Rifle_Base_F {};
// MX
@ -470,7 +471,7 @@ class CfgWeapons {
};
// PD2000
class pdw2000_base_F: Rifle_Base_F {
class pdw2000_base_F: Rifle_Short_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
@ -484,7 +485,7 @@ class CfgWeapons {
};
// Vector
class SMG_01_Base: Rifle_Base_F {
class SMG_01_Base: Rifle_Short_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;

View File

@ -18,7 +18,3 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "RscTitles.hpp"
class ACE_newEvents {
RangerfinderData = QEGVAR(vector,rangefinderData);
};

View File

@ -19,7 +19,3 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "GUI_VirtualAmmo.hpp"
class ACE_newEvents {
interactMenuOpened = "ace_interactMenuOpened";
};

View File

@ -15,7 +15,3 @@ class CfgPatches {
};
#include "CfgEventHandlers.hpp"
class ACE_newEvents {
backpackOpened = "ace_backpackOpened";
};

View File

@ -9,7 +9,8 @@ class CfgWeapons {
class MMG_01_base_F;
class MMG_02_base_F;
class Rifle_Base_F;
class Rifle_Long_Base_F;
class Rifle_Short_Base_F: Rifle_Base_F {};
class Rifle_Long_Base_F: Rifle_Base_F {};
class MuzzleSlot;
/* Long Rifles */
@ -189,8 +190,8 @@ class CfgWeapons {
dispersion = 0.0008727; // radians. Equal to 3 MOA.
};
};
class pdw2000_base_F: Rifle_Base_F {};
class SMG_01_Base: Rifle_Base_F {};
class pdw2000_base_F: Rifle_Short_Base_F {};
class SMG_01_Base: Rifle_Short_Base_F {};
class SMG_02_base_F: Rifle_Base_F {};
/* Pistols */

View File

@ -20,11 +20,3 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgEden.hpp"
class ACE_newEvents {
SetSurrendered = QGVAR(setSurrendered);
SetHandcuffed = QGVAR(setHandcuffed);
MoveOutCaptive = QGVAR(moveOutCaptive);
MoveInCaptive = QGVAR(moveInCaptive);
CaptiveStatusChanged = "ace_captiveStatusChanged";
};

View File

@ -18,13 +18,3 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "menu.hpp"
class ACE_newEvents {
LoadCargo = "ace_loadCargo";
cargoUnloaded = "ace_cargoUnloaded";
cargoLoaded = "ace_cargoLoaded";
AddCargoByClass = "ace_addCargo";
ServerUnloadCargo = QGVAR(serverUnload);
UnloadCargo = "ace_unloadCargo";
cargoAddedByClass = "ace_cargoAdded";
};

View File

@ -57,13 +57,16 @@ _newItem setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDi
if (isNull _item || {getPos _item select 2 < 1}) exitWith {};
private _itemPosASL = getPosASL _item;
private _itemVelocity = velocity _item;
private _parachute = createVehicle ["B_Parachute_02_F", [0,0,0], [], 0, "CAN_COLLIDE"];
_item attachTo [_parachute, [0,0,0.2]];
_parachute setPosASL _itemPosASL;
_parachute setVelocity _itemVelocity;
// cannot use setPos on parachutes without them closing down
_parachute attachTo [_item, [0,0,0]];
detach _parachute;
private _velocity = velocity _item;
_item attachTo [_parachute, [0,0,-1]];
_parachute setVelocity _velocity;
private _light = "Chemlight_yellow" createVehicle [0,0,0];
_light attachTo [_item, [0,0,0]];

View File

@ -8,4 +8,14 @@ class Cfg3DEN {
};
};
};
class Group {
class AttributeCategories {
class ace_attributes {
displayName = CSTRING(Options);
collapsed = 1;
class Attributes {};
};
};
};
};

View File

@ -2,8 +2,24 @@
class RscStructuredText;
class RscMapControl;
class ctrlStructuredText;
class GVAR(debug_structuredText): ctrlStructuredText {
sizeEx = "16 * pixelH";
size = "16 * pixelH";
};
class RscTitles {
class GVAR(watchVariableUI) {
idd = -1;
onLoad = QUOTE(with uiNameSpace do {GVAR(watchVariableUI) = _this select 0};);
movingEnable = 0;
duration = 999999;
fadeIn = "false";
fadeOut = "false";
class controls {};
};
class ACE_RscHint {
idd = -1;
onLoad = "uiNamespace setVariable ['ACE_ctrlHint', (_this select 0) displayCtrl 1];";

View File

@ -38,7 +38,6 @@ PREP(dropBackpack);
PREP(endRadioTransmission);
PREP(eraseCache);
PREP(errorMessage);
PREP(execNextFrame);
PREP(findUnloadPosition);
PREP(firedEH);
PREP(fixCollision);
@ -85,12 +84,10 @@ PREP(hadamardProduct);
PREP(handleEngine);
PREP(handleModifierKey);
PREP(handleModifierKeyUp);
PREP(handleScrollWheel);
PREP(hasItem);
PREP(hasMagazine);
PREP(headBugFix);
PREP(hideUnit);
PREP(insertionSort);
PREP(interpolateFromArray);
PREP(inTransitionAnim);
PREP(isAwake);
@ -172,8 +169,7 @@ PREP(unloadPersonLocal);
PREP(unmuteUnit);
PREP(useItem);
PREP(useMagazine);
PREP(waitAndExecute);
PREP(waitUntilAndExecute);
PREP(watchVariable);
PREP(waveHeightAt);
PREP(translateToWeaponSpace);
@ -183,14 +179,12 @@ PREP(translateToModelSpace);
PREP(worldToScreenBounds);
// config items
PREP(getConfigType);
PREP(getItemType);
PREP(getWeaponType);
PREP(getWeaponModes);
PREP(getWeaponMuzzles);
// config objects
PREP(getConfigTypeObject);
PREP(getConfigGunner);
PREP(getConfigCommander);
PREP(getSelectionsWithoutHitPoints);
@ -211,10 +205,6 @@ PREP(getTurretsFFV);
PREP(getTurretsOther);
PREP(hasHatch);
// missing inventory commands
PREP(binocularMagazine);
PREP(removeBinocularMagazine);
// ACE_Debug
PREP(getChildren);
PREP(getDisplayConfigName);
@ -224,15 +214,6 @@ PREP(showUser);
PREP(dumpPerformanceCounters);
PREP(dumpArray);
PREP(globalEvent);
PREP(addEventHandler);
PREP(objectEvent);
PREP(targetEvent);
PREP(serverEvent);
PREP(localEvent);
PREP(removeEventHandler);
PREP(removeAlLEventHandlers);
// Synchronized Events
PREP(syncedEventPFH);
PREP(addSyncedEventHandler);
@ -247,17 +228,8 @@ PREP(_handleRequestAllSyncedEvents);
// other eventhandlers
PREP(addActionEventHandler);
PREP(addActionMenuEventHandler);
PREP(addScrollWheelEventHandler);
PREP(addMapMarkerCreatedEventHandler);
PREP(removeActionEventHandler);
PREP(removeActionMenuEventHandler);
PREP(removeScrollWheelEventHandler);
PREP(removeMapMarkerCreatedEventHandler);
// hashes
PREP(hashCreate);
PREP(hashSet);
PREP(hashGet);
PREP(hashHasKey);
PREP(hashRem);

View File

@ -1,4 +1,3 @@
#include "script_component.hpp"
call COMPILE_FILE(init_handleScrollWheel);
call COMPILE_FILE(init_handleModifierKey);

View File

@ -306,71 +306,6 @@ if (!isNull (missionNamespace getVariable ["cba_events_oldUnit", objNull])) then
// "playerChanged" event
["unit", {
ACE_player = (_this select 0);
["ace_playerChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
// "playerVehicleChanged" event
["vehicle", {
["ace_playerVehicleChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
// "playerTurretChanged" event
["turret", {
["ace_playerTurretChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
// "playerWeaponChanged" event
["weapon", {
["ace_playerWeaponChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
// "playerInventoryChanged" event
["loadout", {
private _fnc_getAllGear = {
if (isNull _this) exitWith {[
"",
"",
"", [],
"", [],
"", [],
"", ["","","",""], [],
"", ["","","",""], [],
"", ["","","",""], [],
[],
"",
""
]};
[
headgear _this,
goggles _this,
uniform _this, uniformItems _this,
vest _this, vestItems _this,
backpack _this, backpackItems _this,
primaryWeapon _this, primaryWeaponItems _this, primaryWeaponMagazine _this,
secondaryWeapon _this, secondaryWeaponItems _this, secondaryWeaponMagazine _this,
handgunWeapon _this, handgunItems _this, handgunMagazine _this,
assignedItems _this,
binocular _this,
_this call CBA_fnc_binocularMagazine
]
};
["ace_playerInventoryChanged", [ACE_player, ACE_player call _fnc_getAllGear]] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
// "playerVisionModeChanged" event
["visionMode", {
["ace_playerVisionModeChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
// "cameraViewChanged" event
["cameraView", {
["ace_cameraViewChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
["visibleMap", {
["ace_visibleMapChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addPlayerEventHandler;
GVAR(OldIsCamera) = false;

View File

@ -14,70 +14,6 @@ class CfgPatches {
};
};
// This class will be deprecated in version 3.8.0
class ACE_newEvents {
// Status effect events
forceWalk = QGVAR(forceWalk);
blockSprint = QGVAR(blockSprint);
setCaptive = QGVAR(setCaptive);
blockDamage = QGVAR(blockDamage);
blockEngine = QGVAR(blockEngine);
// Public listenable events
PlayerJip = "ace_playerJIP";
activeCameraChanged = "ace_activeCameraChanged";
visibleMapChanged = "ace_visibleMapChanged";
cameraViewChanged = "ace_cameraViewChanged";
playerVisionModeChanged = "ace_playerVisionModeChanged";
playerInventoryChanged = "ace_playerInventoryChanged";
playerWeaponChanged = "ace_playerWeaponChanged";
playerTurretChanged = "ace_playerTurretChanged";
playerVehicleChanged = "ace_playerVehicleChanged";
playerChanged = "ace_playerChanged";
SettingsInitialized = "ace_settingsInitialized";
SettingChanged = "ace_settingChanged";
firedNonPlayerVehicle = "ace_firedNonPlayerVehicle";
firedPlayerVehicleNonLocal = "ace_firedPlayerVehicleNonLocal";
firedPlayerVehicle = "ace_firedPlayerVehicle";
firedNonPlayer = "ace_firedNonPlayer";
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
firedPlayer = "ace_firedPlayer";
unloadPersonEvent = "ace_unloadPersonEvent";
loadPersonEvent = "ace_loadPersonEvent";
useItem = "ace_useItem";
infoDisplayChanged = "ace_infoDisplayChanged";
// Internal callable events
setStatusEffect = QGVAR(setStatusEffect);
HeadbugFixUsed = QGVAR(headbugFixUsed);
InitSettingsFromModules = QGVAR(initSettingsFromModules);
enableSimulationGlobal = QGVAR(enableSimulationGlobal);
hideObjectGlobal = QGVAR(hideObjectGlobal);
fixPosition = QGVAR(fixPosition);
fixFloating = QGVAR(fixFloating);
fixCollision = QGVAR(fixCollision);
unlockVehicle = QGVAR(unlockVehicle);
lockVehicle = QGVAR(lockVehicle);
displayTextPicture = QGVAR(displayTextPicture);
displayTextStructured = QGVAR(displayTextStructured);
setVanillaHitPointDamage = QGVAR(setVanillaHitPointDamage);
setVectorDirAndUp = QGVAR(setVectorDirAndUp);
switchMove = QGVAR(switchMove);
playMoveNow = QGVAR(playMoveNow);
playMove = QGVAR(playMove);
setVelocity = QGVAR(setVelocity);
selectLeader = QGVAR(selectLeader);
setSpeaker = QGVAR(setSpeaker);
engineOn = QGVAR(engineOn);
setFuel = QGVAR(setFuel);
setDir = QGVAR(setDir);
// Events framework
SEH_s = "ACEs";
SEH = "ACEe";
SEH_all = "ACEa";
};
#include "CfgEventHandlers.hpp"
#include "CfgLocationTypes.hpp"

View File

@ -1,14 +0,0 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
params ["_eventName", "_eventCode"];
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
if (_newName != "") then {
TRACE_2("Switching Names",_eventName,_newName);
_eventName = _newName;
};
[_eventName, _eventCode] call CBA_fnc_addEventHandler;
ACE_DEPRECATED("ace_common_fnc_addEventHandler","3.8.0","CBA_fnc_addEventHandler");

View File

@ -1,35 +0,0 @@
/*
* Author: commy2
* Add an event handler that executes every time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games.
* _this will be [Interval] where 'Interval' is a number.
*
* Arguments:
* 0: Code to execute <CODE, STRING>
*
* Return Value:
* ID of the event script (used to remove it later). <NUMBER>
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_statement"];
ACE_DEPRECATED("ace_common_fnc_addScrollWheelEventHandler", "3.8.0", "'MouseZChanged' Display EventHandler");
if (_statement isEqualType "") then {
_statement = compile _statement;
};
private _actionsVar = missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]];
_actionsVar params ["_id", "_actionIDs", "_actions"];
_id = _id + 1;
_actionIDs pushBack _id;
_actions pushBack _statement;
missionNamespace setVariable ["ACE_EventHandler_ScrollWheel", [_id, _actionIDs, _actions]];
_id

View File

@ -1,20 +0,0 @@
/*
* Author: commy2
* Returns the magazine of the units rangefinder.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Magazine of the units binocular <STRING>
*
* Example:
* player call ace_common_fnc_binocularMagazine
*
* Public: Yes
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_binocularMagazine","3.8.0","CBA_fnc_binocularMagazine");
_this call CBA_fnc_binocularMagazine

View File

@ -1,18 +0,0 @@
/*
* Author: esteldunedain
* Executes a code on the next frame
*
* Arguments:
* 0: Code to execute <CODE>
* 1: Parameters to run the code with <ARRAY>
*
* Return Value:
* PFH handler ID <NUMBER>
*
* Public: Yes
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_execNextFrame","3.8.0","CBA_fnc_execNextFrame");
_this call CBA_fnc_execNextFrame;

View File

@ -1,17 +0,0 @@
/*
* Author: commy2
* Determins type of item. Can be CfgMagaines, CfgWeapons or CfgGlasses.
*
* Arguments:
* 0: Item Classname <STRING>
*
* Return Value:
* Config category ("CfgWeapons", "CfgMagazines", "CfgGlasses", "") <STRING>
*
* Public: Yes
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_getConfigType","3.8.0","CBA_fnc_getItemConfig");
configName (configHierarchy (_item call CBA_fnc_getItemConfig) param [1, configNull])

View File

@ -1,17 +0,0 @@
/*
* Author: commy2
* Determins type of object. Can be CfgVehicles or CfgAmmo.
*
* Arguments:
* 0: Object classname <STRING>
*
* Return Value:
* Config category ("CfgWeapons", "Cfgmagazines", "CfgGlasses", "") <STRING>
*
* Public: Yes
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_getConfigTypeObject","3.8.0","CBA_fnc_getObjectConfig");
configName (configHierarchy (_item call CBA_fnc_getObjectConfig) param [1, configNull])

View File

@ -1,14 +0,0 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
params ["_eventName", "_eventArgs"];
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
if (_newName != "") then {
TRACE_2("Switching Names",_eventName,_newName);
_eventName = _newName;
};
[_eventName, _eventArgs] call CBA_fnc_globalEvent;
ACE_DEPRECATED("ace_common_fnc_globalEvent","3.8.0","CBA_fnc_globalEvent");

View File

@ -1,20 +0,0 @@
/*
* Author: commy2
* Handles MouseZChanged event.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Public : No
*/
#include "script_component.hpp"
{
[_this select 1] call _x;
false
} count ((missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]]) select 2);
nil

View File

@ -1,17 +0,0 @@
/*
* Author: ?
* Returns an empty hash structure
*
* Arguments:
* None
*
* Return Value:
* Empty Hash Structure <ARRAY>
*
* Public: No
*/
#include "script_component.hpp"
ACE_DEPRECATED(QFUNC(hashCreate),"3.8.0","CBA_fnc_hashCreate");
[[],[]]

View File

@ -1,40 +0,0 @@
/*
* Author: ?
* Returns value attached to key in given hash.
*
* Arguments:
* 0: Hash <ARRAY>
* 1: Key <STRING>
*
* Return Value:
* Value <ANY>
*
* Public: No
*/
#include "script_component.hpp"
ACE_DEPRECATED(QFUNC(hashGet),"3.8.0","CBA_fnc_hashGet");
params ["_hash", "_key"];
ERRORDATA(2);
private _val = nil;
try {
if(VALIDHASH(_hash)) then {
private _index = (_hash select 0) find _key;
if(_index != -1) then {
_val = (_hash select 1) select _index;
if(IS_STRING(_val) && {_val == "ACREHASHREMOVEDONOTUSETHISVAL"}) then {
_val = nil;
};
};
} else {
ERROR("Input hash is not valid");
};
} catch {
HANDLECATCH;
};
if (isNil "_val") exitWith { nil };
_val

View File

@ -1,35 +0,0 @@
/*
* Author: ?
* ?
*
* Arguments:
* ?
*
* Return Value:
* ?
*
* Public: ?
*/
#include "script_component.hpp"
ACE_DEPRECATED(QFUNC(hashHasKey),"3.8.0","CBA_fnc_hashHasKey");
// diag_log text format["%1 HASH HAS KEY: %2", diag_tickTime, _this];
params ["_hash", "_key"];
ERRORDATA(2);
private _val = false;
try {
if(VALIDHASH(_hash)) then {
private _index = (_hash select 0) find _key;
if(_index != -1) then {
_val = true;
};
} else {
ERROR("Input hash is not valid");
};
} catch {
HANDLECATCH;
};
_val

View File

@ -1,41 +0,0 @@
/*
* Author: ?
* ?
*
* Arguments:
* ?
*
* Return Value:
* ?
*
* Public: ?
*/
#include "script_component.hpp"
ACE_DEPRECATED(QFUNC(hashRem),"3.8.0","CBA_fnc_hashRem");
params ["_hash", "_key"];
ERRORDATA(2);
private _val = nil;
try {
if(VALIDHASH(_hash)) then {
private _index = (_hash select 0) find _key;
if(_index != -1) then {
(_hash select 1) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
// is this hash is not part of a hash list?
// if it is we need to leave the keys intact.
if((count _hash) == 2) then {
// if this is a standalone hash then we can clean it up
(_hash select 0) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
_hash set[0, ((_hash select 0) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
_hash set[1, ((_hash select 1) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
};
};
} else {
ERROR("Input hash is not valid");
};
} catch {
HANDLECATCH;
};
true

View File

@ -1,38 +0,0 @@
/*
* Author: ?
* ?
*
* Arguments:
* ?
*
* Return Value:
* ?
*
* Public: ?
*/
#include "script_component.hpp"
ACE_DEPRECATED(QFUNC(hashSet),"3.8.0","CBA_fnc_hashSet");
// diag_log text format["%1 HASH SET: %2", diag_tickTime, _this];
params ["_hash", "_key", "_val"];
ERRORDATA(3);
try {
if(VALIDHASH(_hash)) then {
private _index = (_hash select 0) find _key;
if(_index == -1) then {
_index = (_hash select 0) find "ACREHASHREMOVEDONOTUSETHISVAL";
if(_index == -1) then {
_index = (count (_hash select 0));
};
(_hash select 0) set[_index, _key];
};
(_hash select 1) set[_index, _val];
} else {
ERROR("Input hash is not valid");
};
} catch {
HANDLECATCH;
};

View File

@ -1,22 +0,0 @@
/*
* Author: Ruthberg
* Sorts an array of numbers
*
* Arguments:
* 0: array <ARRAY>
* 1: ascending (optional) <BOOL>
*
* Return Value:
* sortedArray (ARRAY)
*
* Public: No
*/
#include "script_component.hpp"
ACE_DEPRECATED(QFUNC(insertionSort),"3.8.0","sort");
params [["_list", [], [[]]], ["_ascending", true, [false]]];
_list = + _list; // copy array to not alter the original one
_list sort _ascending;
_list

View File

@ -1,13 +0,0 @@
#include "script_component.hpp"
params ["_eventName", "_eventArgs"];
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
if (_newName != "") then {
TRACE_2("Switching Names",_eventName,_newName);
_eventName = _newName;
};
[_eventName, _eventArgs] call CBA_fnc_localEvent;
ACE_DEPRECATED("ace_common_fnc_localEvent","3.8.0","CBA_fnc_localEvent");

View File

@ -1,13 +0,0 @@
#include "script_component.hpp"
params ["_eventName", "_eventTargets", "_eventArgs"];
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
if (_newName != "") then {
TRACE_2("Switching Names",_eventName,_newName);
_eventName = _newName;
};
[_eventName, _eventArgs, _eventTargets] call CBA_fnc_targetEvent;
ACE_DEPRECATED("ace_common_fnc_objectEvent","3.8.0","CBA_fnc_targetEvent");

View File

@ -1,14 +0,0 @@
#include "script_component.hpp"
params ["_eventName"];
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
if (_newName != "") then {
TRACE_2("Switching Names",_eventName,_newName);
_eventName = _newName;
};
CBA_events_eventNamespace setVariable [_eventName,nil];
CBA_events_eventHashes setVariable [_eventName,nil];
ACE_DEPRECATED("ace_common_fnc_removeAllEventHandlers","3.8.0","N/A (remove events individually w/ CBA_fnc_removeEventHandler)");

View File

@ -1,20 +0,0 @@
/*
* Author: commy2
* Removes the magazine of the units rangefinder.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* player call ace_common_fnc_removeBinocularMagazine
*
* Public: Yes
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_removeBinocularMagazine","3.8.0","CBA_fnc_removeBinocularMagazine");
_this call CBA_fnc_removeBinocularMagazine

View File

@ -1,13 +0,0 @@
#include "script_component.hpp"
params ["_eventName", "_eventCode"];
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
if (_newName != "") then {
TRACE_2("Switching Names",_eventName,_newName);
_eventName = _newName;
};
[_eventName, _eventCode] call CBA_fnc_removeEventHandler;
ACE_DEPRECATED("ace_common_fnc_removeEventHandler","3.8.0","CBA_fnc_removeEventHandler");

View File

@ -1,31 +0,0 @@
/*
* Author: commy2
* Remove a scroll wheel event handler.
*
* Arguments:
* 0: ID of the event handler <NUMBER>
*
* Return Value:
* None
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_id"];
private _actionsVar = missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]];
_actionsVar params ["_currentId", "_actionIDs", "_actions"];
_id = _actionIDs find _id;
if (_id == -1) exitWith {};
_actionIDs set [_id, -1];
_actionIDs = _actionIDs - [-1];
_actions set [_id, []];//{}
_actions = _actions - [[]];//[{}]
missionNamespace setVariable ["ACE_EventHandler_ScrollWheel", [_currentId, _actionIDs, _actions]];

View File

@ -1,13 +0,0 @@
#include "script_component.hpp"
params ["_eventName", "_eventArgs"];
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
if (_newName != "") then {
TRACE_2("Switching Names",_eventName,_newName);
_eventName = _newName;
};
[_eventName, _eventArgs] call CBA_fnc_serverEvent;
ACE_DEPRECATED("ace_common_fnc_serverEvent","3.8.0","CBA_fnc_serverEvent");

View File

@ -1,13 +0,0 @@
#include "script_component.hpp"
params ["_eventName", "_eventTargets", "_eventArgs"];
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
if (_newName != "") then {
TRACE_2("Switching Names",_eventName,_newName);
_eventName = _newName;
};
[_eventName,_eventArgs,_eventTargets] call CBA_fnc_targetEvent;
ACE_DEPRECATED("ace_common_fnc_targetEvent","3.8.0","CBA_fnc_targetEvent");

View File

@ -1,22 +0,0 @@
/*
* Author: esteldunedain
* Executes a code once with a given game time delay, using a PFH
*
* Arguments:
* 0: Code to execute <CODE>
* 1: Parameters to run the code with <ARRAY>
* 2: Delay in seconds before executing the code <NUMBER>
*
* Return Value:
* None
*
* Example:
* [{(_this select 0) setVelocity [0,0,200];}, [player], 10] call ace_common_fnc_waitAndExecute
*
* Public: Yes
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_waitAndExecute","3.8.0","CBA_fnc_waitAndExecute");
_this call CBA_fnc_waitAndExecute;

View File

@ -1,24 +0,0 @@
/*
* Author: joko // Jonas
* Executes a code once with after the Condition is True, using a PFH
*
* Arguments:
* 0: Condition <CODE>
* 1: Code to execute <CODE>
* 2: Parameters to run the code with <ARRAY,ANY,NIL>
*
* Return Value:
* None
*
* Example:
* [{(_this select 0) == vehicle (_this select 0)}, {(_this select 0) setDamage 1;}, [ACE_player]] call ace_common_fnc_waitUntilAndExecute
*
* Public: No
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_waitUntilAndExecute","3.8.0","CBA_fnc_waitUntilAndExecute");
_this call CBA_fnc_waitUntilAndExecute;
nil

View File

@ -0,0 +1,149 @@
/*
* Author: PabstMirror
* Shows multiple watched variables on the main display (for easy debugging)
*
* Arguments:
* 0: Title (var name) <STRING>
* 1: Code to generate result (passed nothing, can return any) <OPTIONAL><CODE>
* 2: Array containing modifiers <OPTIONAL><ARRAY>
* For Numbers:
* 0: Show Delta change (default: true) <OPTIONAL><BOOL>
* 1: Slider Min Value (default: 0) <OPTIONAL><NUMBER>
* 1: Slider Max Value (default: 0) <OPTIONAL><NUMBER>
* For Anything else:
* 0: Number of structured text lines (default: 1) <OPTIONAL><NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* ["CBA_missionTime"] call ace_common_fnc_watchVariable; // Uses title as code
* ["diag_frameNo", {diag_frameNo}, [false]] call ace_common_fnc_watchVariable; // Won't show delta
* ["blood", {player getVariable "ace_medical_bloodVolume"}, [true, 0, 100]] call ace_common_fnc_watchVariable; // Shows slider
* ["multiLine text", {"Line 1 <br/>Line 2"}, [2]] call ace_common_fnc_watchVariable;
* ["player names", {allPlayers apply {name _x}}, [5]] call ace_common_fnc_watchVariable; // handles any data types
*
* Public: Yes
*/
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
#define TEXT_HEIGHT 16
params [["_name", "", [""]],["_code", {}, [{}]], ["_mods", [], [[]]]];
TRACE_3("params",_name,_code,_mods);
if (!hasInterface) exitWith {};
if (canSuspend) exitWith { // Ensure atomic - (fix `disableSerialization` error when called from init.sqf)
[FUNC(watchVariable), _this] call CBA_fnc_directCall;
};
if (isNull (findDisplay 46)) exitWith {
TRACE_1("waiting for main display to be ready",isNull (findDisplay 46));
[{!isNull (findDisplay 46)}, {_this call FUNC(watchVariable);}, _this] call CBA_fnc_waitUntilAndExecute;
};
if (_code isEqualTo {}) then {TRACE_1("using title as code",_title); _code = compile _name;};
private _trackedDisplay = uiNamespace getVariable [QGVAR(watchVariableUI), displayNull];
if (isNull _trackedDisplay) then {
TRACE_1("creating display and adding PFEH",time);
QGVAR(watchVariableUI) cutRsc [QGVAR(watchVariableUI), "PLAIN", 1, true];
[{
private _trackedDisplay = uiNamespace getVariable [QGVAR(watchVariableUI), displayNull];
private _varArray = _trackedDisplay getVariable [QGVAR(vars), []];
TRACE_1("updating watched variables",count _varArray);
{
_x params ["_ctrlGroup", "_code", "_showDelta", "_lastNumber", "_barMin", "_barMax"];
private _result = [] call _code;
if (isNil "_result") then {
(_ctrlGroup controlsGroupCtrl 1) ctrlSetStructuredText parseText format ["<t color='#FFFF00'>NIL</t>"];
} else {
if (_result isEqualType 0) then {
(_ctrlGroup controlsGroupCtrl 2) progressSetPosition linearConversion [_barMin, _barMax, _result, 0, 1, true];
if (_showDelta) then {
private _delta = _result - _lastNumber;
_x set [3, _result];
if (_delta < 0) then {
(_ctrlGroup controlsGroupCtrl 1) ctrlSetStructuredText parseText format ["%1 (<t color='#FF0000'>%2</t>)", _result, _delta];
} else {
(_ctrlGroup controlsGroupCtrl 1) ctrlSetStructuredText parseText format ["%1 (<t color='#00FF00'>%2</t>)", _result, _delta];
};
} else {
(_ctrlGroup controlsGroupCtrl 1) ctrlSetStructuredText parseText format ["%1", _result];
};
} else {
(_ctrlGroup controlsGroupCtrl 1) ctrlSetStructuredText parseText format ["%1", _result];
};
};
} forEach _varArray;
}, 1, []] call CBA_fnc_addPerFrameHandler;
};
// Add curent call:
private _trackedDisplay = uiNamespace getVariable [QGVAR(watchVariableUI), displayNull];
private _varArray = _trackedDisplay getVariable [QGVAR(vars), []];
private _freePositionY = _trackedDisplay getVariable [QGVAR(freePosition), safeZoneY + 100 * pixelH];
private _height = 2 * TEXT_HEIGHT * pixelH;
private _ctrlGroup = _trackedDisplay ctrlCreate ["ctrlControlsGroupNoScrollbars", -1];
private _ctrlBackground = (_trackedDisplay ctrlCreate ["ctrlStaticBackground", -1, _ctrlGroup]);
_ctrlBackground ctrlSetBackgroundColor [0.2, 0.2, 0.2, 0.5];
private _ctrlTitle = (_trackedDisplay ctrlCreate ["ctrlStatic", -1, _ctrlGroup]);
_ctrlTitle ctrlSetFontHeight (TEXT_HEIGHT * pixelH);
_ctrlTitle ctrlSetFont "EtelkaMonospacePro";
_ctrlTitle ctrlSetPosition [0, 0, 300 * pixelW, TEXT_HEIGHT * pixelW];
_ctrlTitle ctrlCommit 0;
_ctrlTitle ctrlSetText _name;
if ((_mods param [0, true, [0, false]]) isEqualType false) then {
_mods params [["_showDelta", true, [false]], ["_barMin", 0, [0]], ["_barMax", 0, [0]]];
TRACE_3("adding number",_barMin,_barMax,_showDelta);
if (_barMin != _barMax) then {
TRACE_2("creating bar",_barMin,_barMax);
private _ctrlSlider = _trackedDisplay ctrlCreate ["RscProgress", 2, _ctrlGroup];
_ctrlSlider ctrlSetPosition [0 * pixelW, TEXT_HEIGHT * pixelH, 300 * pixelW, TEXT_HEIGHT * pixelH];
_ctrlSlider ctrlSetFade 0.25;
_ctrlSlider ctrlSetTextColor [0, 0, 0.2, 1];
_ctrlSlider ctrlCommit 0;
};
private _ctrlResultText = _trackedDisplay ctrlCreate [QGVAR(debug_structuredText), 1, _ctrlGroup];
_ctrlResultText ctrlSetPosition [25 * pixelW, TEXT_HEIGHT * pixelH, 275 * pixelW, TEXT_HEIGHT * pixelH];
_ctrlResultText ctrlCommit 0;
_varArray pushBack [_ctrlGroup, _code, _showDelta, 0, _barMin, _barMax];
} else {
_mods params [["_lines", 1, [1]]];
_lines = _lines max 1;
TRACE_1("adding text",_lines);
private _ctrlResultText = _trackedDisplay ctrlCreate [QGVAR(debug_structuredText), 1, _ctrlGroup];
_ctrlResultText ctrlSetPosition [25 * pixelW, TEXT_HEIGHT * pixelH, 275 * pixelW, _lines * TEXT_HEIGHT * pixelH];
_ctrlResultText ctrlCommit 0;
_height = (1 + _lines) * TEXT_HEIGHT * pixelH;
_varArray pushBack [_ctrlGroup, _code, false, -1, 0, 0];
};
_trackedDisplay setVariable [QGVAR(vars), _varArray];
_ctrlGroup ctrlSetPosition [safeZoneX, _freePositionY, 300 * pixelW, _height];
_ctrlGroup ctrlCommit 0;
_ctrlBackground ctrlSetPosition [0, 0, 300 * pixelW, _height];
_ctrlBackground ctrlCommit 0;
_freePositionY = _freePositionY + _height + 5 * pixelH;
_trackedDisplay setVariable [QGVAR(freePosition), _freePositionY];
nil

View File

@ -1,19 +0,0 @@
/*
* Author: commy2
* Initializes the MouseZChanged eventhandler.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Public : No
*/
#include "script_component.hpp"
disableSerialization;
params ["_display"];
_display displayAddEventHandler ["MouseZChanged", QUOTE(_this call FUNC(handleScrollWheel))];

View File

@ -16,7 +16,3 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
class ACE_newEvents {
interactMenuOpened = "ace_interactMenuOpened";
};

View File

@ -19,7 +19,3 @@ class CfgPatches {
#include "CfgWeapons.hpp"
#include "Dialog.hpp"
#include "RscTitles.hpp"
class ACE_newEvents {
RangerfinderData = QEGVAR(vector,rangefinderData);
};

View File

@ -19,8 +19,3 @@ class CfgPatches {
#include "CfgWeapons.hpp"
#include "gui_disarm.hpp"
class ACE_newEvents {
DisarmDebugCallback = QGVAR(debugCallback);
DisarmDropItems = QGVAR(dropItems);
};

View File

@ -2,14 +2,14 @@ class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_Actions {
class ACE_MainActions {
class ACE_Dogtag {
displayName = CSTRING(itemName);
condition = "";
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeDogtag));
statement = "";
showDisabled = 0;
priority = 3;
distance = 1.75;
icon = QPATHTOF(data\dogtag_icon_ca.paa);
selection = "neck";
class ACE_CheckDogtag {
displayName = CSTRING(checkDogtag);
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canCheckDogtag));
@ -28,7 +28,6 @@ class CfgVehicles {
};
};
};
};
class ACE_SelfActions {
class ACE_Equipment {
class ACE_CheckDogtags {

View File

@ -10,14 +10,14 @@
// - 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;
] call EFUNC(interact_menu,createAction);
["ACE_bodyBagObject", 0, ["ACE_MainActions"], _checkTagAction] call EFUNC(interact_menu,addActionToClass);
private _takeTagAction = [
@ -26,9 +26,11 @@ if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
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;
] call EFUNC(interact_menu,createAction);
["ACE_bodyBagObject", 0, ["ACE_MainActions"], _takeTagAction] call EFUNC(interact_menu,addActionToClass);
};
if (isServer) then {
["ace_placedInBodyBag", {
params ["_target", "_bodyBag"];

View File

@ -24,4 +24,8 @@ if (_item == "") exitWith {};
_dogtagData params ["_nickName"];
private _displayText = format [localize LSTRING(takeDogtagSuccess), _nickName];
[_displayText] call EFUNC(common,displayText);
// display message
[{
[_this, 2.5] call EFUNC(common,displayTextStructured);
}, _displayText, DOGTAG_SHOW_DELAY] call CBA_fnc_waitAndExecute;

View File

@ -18,7 +18,26 @@
params ["_player", "_target"];
// animation
_player call EFUNC(common,goKneeling);
// sound
private _position = AGLToASL (_target modelToWorld (_target selectionPosition "neck"));
playSound3D [
selectRandom RUSTLING_SOUNDS,
objNull,
false,
_position,
1,
1,
50
];
// display dogtag
private _doubleTags = (_target getVariable [QGVAR(dogtagTaken), objNull]) != _target;
private _dogTagData = [_target] call FUNC(getDogTagData);
[QGVAR(showDogtag), [_dogTagData, _doubleTags]] call CBA_fnc_localEvent;
[{
[QGVAR(showDogtag), _this] call CBA_fnc_localEvent;
}, [_dogTagData, _doubleTags], DOGTAG_SHOW_DELAY] call CBA_fnc_waitAndExecute;

View File

@ -19,8 +19,27 @@
params ["_player", "_target"];
// animation
_player call EFUNC(common,goKneeling);
// sound
private _position = AGLToASL (_target modelToWorld (_target selectionPosition "neck"));
playSound3D [
selectRandom RUSTLING_SOUNDS,
objNull,
false,
_position,
1,
1,
50
];
// display message
if ((_target getVariable [QGVAR(dogtagTaken), objNull]) == _target) then {
[localize LSTRING(dogtagAlreadyTaken)] call EFUNC(common,displayText);
[{
[_this, 2.5] call EFUNC(common,displayTextStructured);
}, localize LSTRING(dogtagAlreadyTaken), DOGTAG_SHOW_DELAY] call CBA_fnc_waitAndExecute;
} else {
_target setVariable [QGVAR(dogtagTaken), _target, true];
[QGVAR(getDogtagItem), [_player, _target]] call CBA_fnc_serverEvent;

View File

@ -16,3 +16,12 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#define DOGTAG_SHOW_DELAY 1
#define RUSTLING_SOUNDS [\
"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWpstDnon_medic.wss",\
"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWrflDnon_medic.wss",\
"a3\sounds_f\characters\ingame\AinvPpneMstpSlayWpstDnon_medic.wss",\
"a3\sounds_f\characters\ingame\AinvPpneMstpSlayWrflDnon_medic.wss"\
]

View File

@ -45,8 +45,3 @@ class CfgMineTriggers {
mineTriggerRange = 1;
};
};
class ACE_newEvents {
clientRequestsOrientations = QGVAR(sendOrientations);
serverSendsOrientations = QGVAR(orientationsSent);
};

View File

@ -9,6 +9,12 @@ class asdg_MuzzleSlot_762: asdg_MuzzleSlot { // for 7.62x51 universal mount supp
ACE_muzzle_mzls_B = 1;
};
};
class asdg_MuzzleSlot_65: asdg_MuzzleSlot_762 { // for 6.5 weapons, mostly to deal with BIS vanilla compatibility
class compatibleItems: compatibleItems {
ACE_muzzle_mzls_H = 1;
ACE_muzzle_mzls_B = 0;
};
};
class asdg_MuzzleSlot_93x64: asdg_MuzzleSlot { // for 9.3x64 universal mount suppressors
class compatibleItems {
ACE_muzzle_mzls_93mmg = 1;
@ -19,6 +25,11 @@ class asdg_MuzzleSlot_9MM_SMG: asdg_MuzzleSlot { // for 9x19mm universal mount S
ACE_muzzle_mzls_smg_02 = 1;
};
};
class asdg_MuzzleSlot_9MM: asdg_MuzzleSlot { // for 9x19mm universal mount pistol suppressors
class compatibleItems {
ACE_muzzle_mzls_smg_02 = 1;
};
};
class asdg_MuzzleSlot_556: asdg_MuzzleSlot { // for 5.56x45 universal mount suppressors
class compatibleItems {
ACE_muzzle_mzls_L = 1;
@ -29,12 +40,16 @@ class asdg_MuzzleSlot_45ACP_SMG: asdg_MuzzleSlot { // for .45ACP universal mount
ACE_muzzle_mzls_smg_01 = 1;
};
};
class asdg_MuzzleSlot_45ACP: asdg_MuzzleSlot { // for .45ACP universal mount pistol suppressors
class compatibleItems {
ACE_muzzle_mzls_smg_01 = 1;
};
};
class asdg_MuzzleSlot_762MG: asdg_MuzzleSlot { // for 7.62, 6.5 and 5.56 universal mount MG suppressors
class compatibleItems {
ACE_muzzle_mzls_B = 1;
};
};
class MuzzleSlot;
class CfgWeapons {
@ -44,100 +59,6 @@ class CfgWeapons {
class WeaponSlotsInfo;
};
/* MX */
class arifle_MX_Base_F: Rifle_Base_F {
class WeaponSlotsInfo;
};
class arifle_MXC_F: arifle_MX_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: asdg_MuzzleSlot_762 {
class compatibleItems: compatibleItems {
ACE_muzzle_mzls_H = 1;
ACE_muzzle_mzls_B = 0;
};
};
};
};
class arifle_MX_F: arifle_MX_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: asdg_MuzzleSlot_762 {
class compatibleItems: compatibleItems {
ACE_muzzle_mzls_H = 1;
ACE_muzzle_mzls_B = 0;
};
};
};
};
class arifle_MX_GL_F: arifle_MX_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: asdg_MuzzleSlot_762 {
class compatibleItems: compatibleItems {
ACE_muzzle_mzls_H = 1;
ACE_muzzle_mzls_B = 0;
};
};
};
};
class arifle_MX_SW_F: arifle_MX_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: asdg_MuzzleSlot_762MG {
class compatibleItems: compatibleItems {
ACE_muzzle_mzls_H = 1;
ACE_muzzle_mzls_B = 0;
};
};
};
};
class arifle_MXM_F: arifle_MX_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: asdg_MuzzleSlot_762 {
class compatibleItems: compatibleItems {
ACE_muzzle_mzls_H = 1;
ACE_muzzle_mzls_B = 0;
};
};
};
};
/* Katiba */
class arifle_Katiba_Base_F: Rifle_Base_F {
class WeaponSlotsInfo;
};
class arifle_Katiba_F: arifle_Katiba_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: asdg_MuzzleSlot_762 {
class compatibleItems: compatibleItems {
ACE_muzzle_mzls_H = 1;
ACE_muzzle_mzls_B = 0;
};
};
};
};
class arifle_Katiba_C_F: arifle_Katiba_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: asdg_MuzzleSlot_762 {
class compatibleItems: compatibleItems {
ACE_muzzle_mzls_H = 1;
ACE_muzzle_mzls_B = 0;
};
};
};
};
class arifle_Katiba_GL_F: arifle_Katiba_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: asdg_MuzzleSlot_762 {
class compatibleItems: compatibleItems {
ACE_muzzle_mzls_H = 1;
ACE_muzzle_mzls_B = 0;
};
};
};
};
/* Other */
class LMG_Mk200_F: Rifle_Long_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
@ -150,56 +71,6 @@ class CfgWeapons {
};
};
/* Pistols */
class Pistol;
class Pistol_Base_F: Pistol {
class WeaponSlotsInfo;
};
class hgun_P07_F: Pistol_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: MuzzleSlot {
linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
};
};
};
class hgun_Rook40_F: Pistol_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: MuzzleSlot {
linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
};
};
};
class hgun_ACPC2_F: Pistol_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: MuzzleSlot {
compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
};
};
};
class hgun_Pistol_heavy_01_F: Pistol_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot: MuzzleSlot {
compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
};
};
};
/*class hgun_Pistol_heavy_02_F: Pistol_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
class MuzzleSlot {
linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
};
};
};*/
/* Flashsuppressors */

View File

@ -270,8 +270,3 @@ class CfgCloudlets {
destroyOnWaterSurface = 1;
};
};
class ACE_newEvents {
GlassesChanged = "ace_glassesChanged";
GlassesCracked = "ace_glassesCracked";
};

View File

@ -28,7 +28,3 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "Effects.hpp"
class ACE_newEvents {
flashbangExplosion = "ace_flashbangExploded";
};

View File

@ -25,9 +25,3 @@ class CfgPatches {
class ACE_Extensions {
extensions[] += {"ace_break_line", "ace_parse_imagepath"};
};
class ACE_newEvents {
interactMenuOpened = "ace_interactMenuOpened";
clearConditionCaches = QGVAR(clearConditionCaches);
interactMenuClosed = "ace_interactMenuClosed";
};

View File

@ -19,12 +19,3 @@ class CfgPatches {
#include "RscTitles.hpp"
#include "ACE_Settings.hpp"
#include "ACE_ZeusActions.hpp"
class ACE_newEvents {
getDown = QGVAR(getDown);
pardon = QGVAR(pardon);
tapShoulder = QGVAR(tapShoulder);
sendAway = QGVAR(sendAway);
lampTurnOff = QGVAR(setLampOff);
lampTurnOn = QGVAR(setLampOn);
};

View File

@ -17,8 +17,3 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "RscInGameUI.hpp"
class ACE_newEvents {
laser_laserOff = "ace_laserOff";
laser_laserOn = "ace_laserOn";
};

View File

@ -19,8 +19,3 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgJointRails.hpp"
class ACE_newEvents {
GunLightOff = "ace_gunLightOff";
SetHandcuffed = QEGVAR(captives,setHandcuffed);
};

View File

@ -17,7 +17,3 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"
class ACE_newEvents {
interactMenuOpened = "ace_interactMenuOpened";
};

21
addons/map/Cfg3DEN.hpp Normal file
View File

@ -0,0 +1,21 @@
class Cfg3DEN {
class Group {
class AttributeCategories {
class ace_attributes {
class Attributes {
class GVAR(hideBlueForceMarker) {
property = QGVAR(hideBlueForceMarker);
control = "Checkbox";
displayName = CSTRING(disableBFT);
tooltip = CSTRING(disableBFT_description);
// groups are kaputt. have to delay setVariable public for it to work.
expression = QUOTE(if (_value) then {[ARR_2({(_this select 0) setVariable [ARR_3('%s',_this select 1,true)];},[ARR_2(_this,_value)])] call CBA_fnc_execNextFrame};);
typeName = "BOOL";
defaultValue = "(false)"; // fix pbo project preprocessing bug
};
};
};
};
};
};

View File

@ -26,6 +26,7 @@ class RscButtonMenu;
class RscEdit;
#include "ACE_Settings.hpp"
#include "Cfg3DEN.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgMarkers.hpp"
#include "CfgVehicles.hpp"

View File

@ -374,5 +374,13 @@
<Spanish>Cambiar el canal de marcadores inicial al comenzar la misión</Spanish>
<French>Change le canal de communication par défaut au début de la mission.</French>
</Key>
<Key ID="STR_ACE_Map_disableBFT">
<English>Disable BFT</English>
<German>BFT deaktivieren</German>
</Key>
<Key ID="STR_ACE_Map_disableBFT_description">
<English>Always disable Blue Force Tracking for this group.</English>
<German>Blue Force Tracking für diese Gruppe immer deaktivieren.</German>
</Key>
</Package>
</Project>

View File

@ -19,7 +19,7 @@
if ([_this] call EFUNC(medical,isMedic) || {vehicle _this != _this}) exitWith {false};
{
if ([_x] call EFUNC(medical,isMedic)) exitWith {
if ([_x] call EFUNC(medical,isMedic) && {!([_x] call EFUNC(common,isPlayer))}) exitWith {
_this setVariable [QGVAR(assignedMedic), _x];
true
};

View File

@ -1 +1 @@
x\ace\addons\medical_blood
z\ace\addons\medical_blood

View File

@ -19,7 +19,3 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "gui.hpp"
#include "ACE_Settings.hpp"
class ACE_newEvents {
RangerfinderData = QEGVAR(vector,rangefinderData);
};

View File

@ -34,7 +34,3 @@ class RscStructuredText;
#include "RscInGameUI.hpp"
#include "RscRangeTable.hpp"
class ACE_newEvents {
initMortar = "ace_initMortar";
};

View File

@ -20,8 +20,5 @@ class Extended_PostInit_EventHandlers {
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMain {
GVAR(loadMainMenuBox) = QUOTE(_this call COMPILE_FILE(init_loadMainMenuBox));
//Hide the button if there is no world (-world=empty)
GVAR(hideButtonEmptyWorld) = "((_this select 0) displayCtrl 80085) ctrlShow (missionName != '');";
};
};

View File

@ -102,14 +102,6 @@ class RscDisplayMovieInterrupt: RscStandardDisplay {
};
class RscDisplayMain: RscStandardDisplay {
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {
action = "if (missionName != '') then {createDialog 'ACE_settingsMenu';};";
x = "safezoneX";
y = "safezoneY";
idc = 80085;
};
class ACE_news_apex: RscControlsGroupNoHScrollbars {
idc = 80090;
x = "safezoneX + safezoneW - 10 * (pixelW * pixelGrid * 2) - (4 * pixelH)";

View File

@ -52,10 +52,3 @@ class CfgGesturesMale {
};
};
};
class ACE_newEvents {
initiateSwapBarrelAssisted = QGVAR(initiateSwapBarrelAssisted);
showWeaponTemperature = QGVAR(showWeaponTemperature);
loadCoolestSpareBarrel = QGVAR(loadCoolestSpareBarrel);
sendSpareBarrelTemperatureHint = QGVAR(sendSpareBarrelTemperatureHint);
weaponJammed = "ace_weaponJammed";
};

View File

@ -16,7 +16,3 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgWeapons.hpp"
class ACE_newEvents {
overpressure = "ace_overpressure";
};

View File

@ -3,6 +3,9 @@ class CfgWeapons {
class Rifle_Long_Base_F: Rifle_Base_F {
class WeaponSlotsInfo;
};
class Rifle_Short_Base_F: Rifle_Base_F {
class WeaponSlotsInfo;
};
class Launcher;
class Launcher_Base_F: Launcher {
class WeaponSlotsInfo;
@ -176,7 +179,7 @@ class CfgWeapons {
// - SMGs ---------------------------------------------------------------------
// - CPW ------------------------------------------------------------------
class pdw2000_base_F: Rifle_Base_F {
class pdw2000_base_F: Rifle_Short_Base_F {
class WeaponSlotsInfo;
};
class hgun_PDW2000_F: pdw2000_base_F {
@ -186,7 +189,7 @@ class CfgWeapons {
};
// - KRISS Vector ---------------------------------------------------------
class SMG_01_Base: Rifle_Base_F {
class SMG_01_Base: Rifle_Short_Base_F {
class WeaponSlotsInfo;
};
class SMG_01_F: SMG_01_Base {

View File

@ -20,9 +20,3 @@ class CfgPatches {
#include "CfgActions.hpp"
#include "ACE_Settings.hpp"
#include "ACE_UI.hpp"
class ACE_newEvents {
setAmmoSync = QGVAR(syncAmmo);
returnedAmmo = QGVAR(ammoReturned);
linkedAmmo = QGVAR(ammoLinked);
};

View File

@ -18,7 +18,3 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
class ACE_newEvents {
reloadLauncher = QGVAR(reloadLauncher);
};

View File

@ -313,9 +313,12 @@ class CfgVehicles {
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
};
class ACE_Actions {
class ACE_MainActions {
modifierFunction = QUOTE(_this call FUNC(modifyInteraction));
};
};
icon = "iconObject_circle";
mapSize = 0.7;
accuracy = 0.2;
vehicleClass = "ACE_Logistics_Items";
destrType = "DesturctNo"; // scripted delayed destruction
@ -328,6 +331,25 @@ class CfgVehicles {
scope = 2;
model = QPATHTOF(data\ace_track.p3d);
displayName = CSTRING(SpareTrack);
icon = "iconObject_2x1";
mapSize = 0.5;
// damage handling
armor = 0.6;
armorStructural = 1;
minTotalDamageThreshold = 0.01;
explosionShielding = 1;
replaceDamagedLimit = 0.9;
selectionDamage = "mat_track";
class Damage {
tex[] = {};
mat[] = {
QPATHTO_R(data\trailObjects_steel.rvmat),
QPATHTO_R(data\trailObjects_steel_damage.rvmat),
QPATHTO_R(data\trailObjects_steel_destruct.rvmat)
};
};
};
class ACE_Wheel: ACE_RepairItem_Base {
@ -338,6 +360,41 @@ class CfgVehicles {
model = QPATHTOF(data\ace_wheel.p3d);
displayName = CSTRING(SpareWheel);
picture = QPATHTOF(ui\tire_ca.paa);
icon = "iconObject_circle";
mapSize = 0.7;
// damage handling
armor = 0.05;
armorStructural = 1;
minTotalDamageThreshold = 0.01;
explosionShielding = 1;
replaceDamagedLimit = 0.9;
selectionDamage = "mat_tyre"; //"mat_rim"
// necessary because only one "selectionDamage" (== "visual") is allowed for simple damage objects
// can not take damage individually though, because of limitations of the thingX simulation type
class HitPoints {
class HitBody {
armor = 0.6;
material = -1;
name = "zbytek";
visual = "mat_rim";
passThrough = 1;
explosionShielding = 1;
};
};
class Damage {
tex[] = {};
mat[] = {
QPATHTO_R(data\trailObjects_tyre.rvmat),
QPATHTO_R(data\trailObjects_tyre_damage.rvmat),
QPATHTO_R(data\trailObjects_tyre_damage.rvmat),
QPATHTO_R(data\trailObjects_steel.rvmat),
QPATHTO_R(data\trailObjects_steel_damage.rvmat),
QPATHTO_R(data\trailObjects_steel_destruct.rvmat)
};
};
};
// disable vanilla repair

View File

@ -23,6 +23,7 @@ PREP(isEngineer);
PREP(isInRepairFacility);
PREP(isNearRepairVehicle);
PREP(isRepairVehicle);
PREP(modifyInteraction);
PREP(moduleAddSpareParts);
PREP(moduleAssignEngineer);
PREP(moduleAssignRepairVehicle);

View File

@ -20,10 +20,3 @@ class CfgPatches {
#include "CfgActions.hpp"
#include "CfgVehicles.hpp"
#include "CfgEden.hpp"
class ACE_newEvents {
setWheelHitPointDamage = QGVAR(setWheelHitPointDamage);
setVehicleHitPointDamage = QGVAR(setVehicleHitPointDamage);
setVehicleDamage = QGVAR(setVehicleDamage);
AddCargoByClass = "ace_addCargo";
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,44 @@
class CfgSkeletons {
class Default {
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
class ace_wheel: Default {
skeletonBones[] = {
"zbytek", ""
};
};
class ace_track: Default {
skeletonBones[] = {
"zbytek", ""
};
};
};
class CfgModels {
class Default {
skeletonName = "";
sectionsInherit = "";
sections[] = {};
};
class ace_wheel: Default {
skeletonName = "ace_wheel";
sectionsInherit = "";
sections[] = {
"mat_tyre",
"mat_rim"
};
};
class ace_track: Default {
skeletonName = "ace_track";
sectionsInherit = "";
sections[] = {
"mat_track"
};
};
};

View File

@ -1,100 +0,0 @@
#define _ARMA_
class StageTI
{
texture = "a3\data_f\default_ti_ca.paa";
};
ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0,0,0,0};
specular[] = {0.0099999998,0.0099999998,0.0099999998,0.0099999998};
specularPower = 500;
surfaceInfo="a3\data_f\penetration\metal.bisurf";
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1
{
texture = "z\ace\addons\repair\data\trailObjects_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,64,64,1)fresnelGlass(2)";
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_land_ca.paa";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

View File

@ -0,0 +1,91 @@
class StageTI {
texture = "a3\data_f\default_ti_ca.paa";
};
ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0,0,0,0};
specular[] = {0.01,0.01,0.01,0.01};
specularPower = 500;
surfaceInfo = "a3\data_f\penetration\metal.bisurf";
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1 {
texture = "z\ace\addons\repair\data\trailObjects_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,64,64,1)fresnelGlass(2)";
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_land_ca.paa";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

View File

@ -0,0 +1,91 @@
class StageTI {
texture = "a3\data_f\default_ti_ca.paa";
};
ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0,0,0,0};
specular[] = {0.01,0.01,0.01,0.01};
specularPower = 500;
surfaceInfo = "a3\data_f\penetration\metal.bisurf";
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1 {
texture = "z\ace\addons\repair\data\trailObjects_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 = "a3\data_f\destruct\damage_metal_cdt.paa";
uvSource = "tex";
class uvTransform {
aside[] = {5,0,0};
up[] = {0,5,0};
dir[] = {0,0,0};
pos[] = {0,0,0};
};
};
class Stage3 {
texture = "a3\data_f\destruct\damage_metal_mc.paa";
uvSource = "tex";
class uvTransform {
aside[] = {3,0,0};
up[] = {0,3,0};
dir[] = {0,0,0};
pos[] = {0.1,0.23,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,64,64,1)fresnelGlass(2)";
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_land_ca.paa";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

View File

@ -0,0 +1,91 @@
class StageTI {
texture = "a3\data_f\default_ti_ca.paa";
};
ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0,0,0,0};
specular[] = {0.01,0.01,0.01,0.01};
specularPower = 500;
surfaceInfo = "a3\data_f\penetration\metal.bisurf";
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1 {
texture = "z\ace\addons\repair\data\trailObjects_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 = "a3\data_f\destruct\destruct_rust_cdt.paa";
uvSource = "tex";
class uvTransform {
aside[] = {8,8,0};
up[] = {-8,8,0};
dir[] = {0,0,0};
pos[] = {0,0,0};
};
};
class Stage3 {
texture = "a3\data_f\destruct\destruct_rust_mca.paa";
uvSource = "tex";
class uvTransform {
aside[] = {2,0,0};
up[] = {0,2,0};
dir[] = {0,0,0};
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,64,64,1)fresnelGlass(2)";
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_land_ca.paa";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

View File

@ -0,0 +1,91 @@
class StageTI {
texture = "a3\data_f\default_ti_ca.paa";
};
ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0,0,0,0};
specular[] = {0.01,0.01,0.01,0.01};
specularPower = 500;
surfaceInfo = "a3\data_f\penetration\metal.bisurf";
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1 {
texture = "z\ace\addons\repair\data\trailObjects_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,64,64,1)fresnelGlass(2)";
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_land_ca.paa";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

View File

@ -0,0 +1,91 @@
class StageTI {
texture = "a3\data_f\default_ti_ca.paa";
};
ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0,0,0,0};
specular[] = {0.01,0.01,0.01,0.01};
specularPower = 500;
surfaceInfo = "a3\data_f\penetration\metal.bisurf";
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1 {
texture = "z\ace\addons\repair\data\trailObjects_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 = "a3\data_f\destruct\destr_rubber_half_dt.paa";
uvSource = "tex";
class uvTransform {
aside[] = {5,0,0};
up[] = {0,5,0};
dir[] = {0,0,0};
pos[] = {0,0,0};
};
};
class Stage3 {
texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
uvSource = "tex";
class uvTransform {
aside[] = {3,0,0};
up[] = {0,3,0};
dir[] = {0,0,0};
pos[] = {0.1,0.23,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,64,64,1)fresnelGlass(2)";
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_land_ca.paa";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

View File

@ -0,0 +1,28 @@
/*
* Author: PabstMirror
* Modifies the base interaction point for repair items to show it's current damage
*
* Arguments:
* 0: Target <OBJECT>
* 1: Player <OBJECT>
* 2: Args <Any>
* 3: Action Data <ARRAY>
*
* Return Value:
* Nothing
*
* Example:
* [cursorObject, player, [], []] call ace_repair_fnc_modifyInteraction;
*
* Public: No
*/
#include "script_component.hpp"
params ["_target", "_player", "_args", "_actionData"];
TRACE_4("params",_target,_player,_args,_actionData);
// Interaction dots numbered 0..8, white to red.
// Convert damage to number (rounding up), so that even slight damage can bee seen
private _fileName = format [QPATHTOF(ui\damage_%1_ca.paa), ceil (linearConversion [0, 1, damage _target, 0, 8, true])];
_actionData set [2, _fileName];

View File

@ -26,12 +26,6 @@ private ["_damageNew", "_damageOld", "_hitPointDamageRepaired", "_hitPointDamage
// can't execute all commands if the vehicle isn't local. exit here.
if !(local _vehicle) exitWith {ACE_LOGERROR_1("Vehicle Not Local %1", _vehicle);};
//Check for bad typeName (changed from orignal v3.3 that took string)
if (_hitPointIndex isEqualType "") then {
ACE_DEPRECATED("repair-setHitPointDamage (hit point name <string>","3.5.0","hit index <number>");
_hitPointIndex = _allHitPoints find _hitPointIndex;
};
// get all hitpoints and selections and damages
(getAllHitPointsDamage _vehicle) params [["_allHitPoints", []], ["_allHitPointsSelections", []], ["_allHitPointDamages", []]];

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More