mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into release-3.13.2
This commit is contained in:
commit
d898b7de81
@ -51,8 +51,9 @@
|
||||
_item hideObjectGlobal false;
|
||||
_item setPosASL (AGLtoASL _emptyPosAGL);
|
||||
|
||||
if ((getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation")) == "carx") then {
|
||||
TRACE_1("re-enabling car damage",_item);
|
||||
private _simulationType = toLower getText (configFile >> "CfgVehicles" >> typeOf _item >> "simulation");
|
||||
if (_simulationType in ["carx", "tankx"]) then {
|
||||
TRACE_1("re-enabling vehicle damage",_item);
|
||||
[_item, "blockDamage", "ACE_cargo", false] call EFUNC(common,statusEffect_set);
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
@ -53,9 +53,3 @@ class Extended_Killed_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_DisplayLoad_EventHandlers {
|
||||
class RscDisplayMission {
|
||||
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +0,0 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_display"];
|
||||
|
||||
_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];
|
@ -27,13 +27,16 @@ if (isNil "ACE_maxWeightCarry") then {
|
||||
// handle waking up dragged unit and falling unconscious while dragging
|
||||
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// display event handler
|
||||
["MouseZChanged", {_this select 1 call FUNC(handleScrollWheel)}] call CBA_fnc_addDisplayHandler;
|
||||
|
||||
//@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);
|
||||
|
@ -63,7 +63,7 @@ _unit setVariable [QGVAR(ReleaseActionID), [
|
||||
if (_target isKindOf "CAManBase") then {
|
||||
[localize LSTRING(Drop), "", ""] call EFUNC(interaction,showMouseHint);
|
||||
} else {
|
||||
[localize LSTRING(Drop), "", localize LSTRING(LowerRaise)] call EFUNC(interaction,showMouseHint);
|
||||
[localize LSTRING(Drop), "", localize LSTRING(RaiseLowerRotate)] call EFUNC(interaction,showMouseHint);
|
||||
};
|
||||
|
||||
// check everything
|
||||
|
@ -83,3 +83,6 @@ private _mass = _target getVariable [QGVAR(originalMass), 0];
|
||||
if (_mass != 0) then {
|
||||
[QEGVAR(common,setMass), [_target, _mass], _target] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
// reset temp direction
|
||||
_target setVariable [QGVAR(carryDirection_temp), nil];
|
||||
|
@ -22,30 +22,42 @@ private _unit = ACE_player;
|
||||
// EH is always assigned. Exit and don't overwrite input if not carrying
|
||||
if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith {false};
|
||||
|
||||
// move carried item 15 cm per scroll interval
|
||||
_scrollAmount = _scrollAmount * 0.15;
|
||||
|
||||
private _carriedItem = _unit getVariable [QGVAR(carriedObject), objNull];
|
||||
|
||||
//disabled for persons
|
||||
if (_carriedItem isKindOf "CAManBase") exitWith {false};
|
||||
|
||||
private _position = getPosASL _carriedItem;
|
||||
private _maxHeight = (_unit modelToWorldVisualWorld [0, 0, 0]) select 2;
|
||||
if !(cba_events_control) then {
|
||||
// raise/lower
|
||||
|
||||
_position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5)) max _maxHeight];
|
||||
// move carried item 15 cm per scroll interval
|
||||
_scrollAmount = _scrollAmount * 0.15;
|
||||
|
||||
// move up/down object and reattach at current position
|
||||
detach _carriedItem;
|
||||
private _position = getPosASL _carriedItem;
|
||||
private _maxHeight = (_unit modelToWorldVisualWorld [0, 0, 0]) select 2;
|
||||
|
||||
// Uses this method of selecting position because setPosATL did not have immediate effect
|
||||
private _positionChange = _position vectorDiff (getPosASL _carriedItem);
|
||||
private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _carriedItem);
|
||||
_selectionPosition = _selectionPosition vectorAdd _positionChange;
|
||||
_carriedItem attachTo [_unit, _selectionPosition];
|
||||
_position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5)) max _maxHeight];
|
||||
|
||||
//reset the carry direction
|
||||
private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
|
||||
[QEGVAR(common,setDir), [_carriedItem, _direction], _carriedItem] call CBA_fnc_targetEvent;
|
||||
// move up/down object and reattach at current position
|
||||
detach _carriedItem;
|
||||
|
||||
// Uses this method of selecting position because setPosATL did not have immediate effect
|
||||
private _positionChange = _position vectorDiff (getPosASL _carriedItem);
|
||||
private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _carriedItem);
|
||||
_selectionPosition = _selectionPosition vectorAdd _positionChange;
|
||||
_carriedItem attachTo [_unit, _selectionPosition];
|
||||
|
||||
//reset the carry direction
|
||||
private _direction = _carriedItem getVariable [QGVAR(carryDirection_temp), _carriedItem getVariable [QGVAR(carryDirection), 0]];
|
||||
[QEGVAR(common,setDir), [_carriedItem, _direction], _carriedItem] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
// rotate
|
||||
|
||||
private _direction = _carriedItem getVariable [QGVAR(carryDirection_temp), _carriedItem getVariable [QGVAR(carryDirection), 0]];
|
||||
_scrollAmount = _scrollAmount * 10;
|
||||
_direction = _direction + _scrollAmount;
|
||||
[QEGVAR(common,setDir), [_carriedItem, _direction], _carriedItem] call CBA_fnc_targetEvent;
|
||||
_carriedItem setVariable [QGVAR(carryDirection_temp), _direction];
|
||||
};
|
||||
|
||||
true
|
||||
|
@ -86,21 +86,9 @@
|
||||
<Chinesesimp>背起</Chinesesimp>
|
||||
<Turkish>Taşı</Turkish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Dragging_LowerRaise">
|
||||
<English>Raise/Lower</English>
|
||||
<German>Heben/Senken</German>
|
||||
<Polish>Wyżej/Niżej</Polish>
|
||||
<Portuguese>Levantar/Abaixar</Portuguese>
|
||||
<Russian>Поднять/Опустить</Russian>
|
||||
<Czech>Zvýšit/Snížit</Czech>
|
||||
<Italian>Alza/Abbassa</Italian>
|
||||
<Spanish>Subir/Bajar</Spanish>
|
||||
<French>Lever/Baisser</French>
|
||||
<Japanese>上げる/下げる</Japanese>
|
||||
<Korean>높이기/낮추기</Korean>
|
||||
<Chinese>提高/下降</Chinese>
|
||||
<Chinesesimp>提高/下降</Chinesesimp>
|
||||
<Turkish>Yukarı/Aşağı</Turkish>
|
||||
<Key ID="STR_ACE_Dragging_RaiseLowerRotate">
|
||||
<English>Raise/Lower | (Ctrl + Scroll) Rotate</English>
|
||||
<German>Heben/Senken | (Strg + Scrollen) Drehen</German>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -229,7 +229,10 @@ private _enginePosition = _vehicle modelToWorld (_vehicle selectionPosition _eng
|
||||
if (_position distance _enginePosition < EFFECT_SIZE * 2) then {
|
||||
_vehicle setHit [_engineSelection, 1];
|
||||
|
||||
if ("ace_cookoff" call EFUNC(common,isModLoaded) && {EGVAR(cookoff,enable)}) then {
|
||||
_vehicle call EFUNC(cookoff,engineFire);
|
||||
if ("ace_cookoff" call EFUNC(common,isModLoaded)) then {
|
||||
private _enabled = _vehicle getVariable [QEGVAR(cookoff,enable), EGVAR(cookoff,enable)];
|
||||
if (_enabled in [2, true] || {_enabled isEqualTo 1 && {fullCrew [_vehicle, "", false] findIf {isPlayer (_x select 0)} != -1}}) then {
|
||||
_vehicle call EFUNC(cookoff,engineFire);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -8,7 +8,7 @@
|
||||
* 0: Left click text <STRING>
|
||||
* 1: Right click text <STRING>
|
||||
* 2: Scroll text <STRING> (default: "")
|
||||
* 2: Extra icon/text pairs <ARRAY> (default: [])
|
||||
* 3: Extra icon/text pairs <ARRAY> (default: [])
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
|
49
addons/medical_damage/CfgEden.hpp
Normal file
49
addons/medical_damage/CfgEden.hpp
Normal file
@ -0,0 +1,49 @@
|
||||
class Cfg3DEN {
|
||||
class Attributes {
|
||||
class Slider;
|
||||
class GVAR(slider): Slider {
|
||||
attributeLoad = "params [""_ctrlGroup""];\
|
||||
private _slider = _ctrlGroup controlsGroupCtrl 100;\
|
||||
private _edit = _ctrlGroup controlsGroupCtrl 101;\
|
||||
_slider sliderSetPosition _value;\
|
||||
_edit ctrlSetText (if (_value < 0.1) then {localize ""str_disp_default""} else {[_value, 1, 1] call CBA_fnc_formatNumber});";
|
||||
attributeSave = "params [""_ctrlGroup""];\
|
||||
sliderPosition (_ctrlGroup controlsGroupCtrl 100); ";
|
||||
onLoad = "params [""_ctrlGroup""];\
|
||||
private _slider = _ctrlGroup controlsGroupCtrl 100;\
|
||||
private _edit = _ctrlGroup controlsGroupCtrl 101;\
|
||||
_slider sliderSetRange [0, 10];\
|
||||
_slider ctrlAddEventHandler [""SliderPosChanged"", {\
|
||||
params [""_slider""];\
|
||||
private _edit = (ctrlParentControlsGroup _slider) controlsGroupCtrl 101;\
|
||||
private _value = sliderPosition _slider;\
|
||||
_edit ctrlSetText (if (_value < 0.1) then {localize ""str_disp_default""} else {[_value, 1, 1] call CBA_fnc_formatNumber});\
|
||||
}];\
|
||||
_edit ctrlAddEventHandler [""KillFocus"", {\
|
||||
params [""_edit""];\
|
||||
private _slider = (ctrlParentControlsGroup _edit) controlsGroupCtrl 100;\
|
||||
private _value = ((parseNumber ctrlText _edit) min 10) max 0;\
|
||||
_slider sliderSetPosition _value;\
|
||||
_edit ctrlSetText (if (_value < 0.1) then { localize ""str_disp_default"" } else {[_value, 1, 1] call CBA_fnc_formatNumber});\
|
||||
}];";
|
||||
};
|
||||
};
|
||||
class Object {
|
||||
class AttributeCategories {
|
||||
class ace_attributes {
|
||||
class Attributes {
|
||||
class GVAR(threshold) {
|
||||
property = QUOTE(threshold);
|
||||
control = QGVAR(slider);
|
||||
displayName = CSTRING(Eden_threshold_DisplayName);
|
||||
tooltip = CSTRING(Eden_threshold_Description);
|
||||
expression = QUOTE(if (_value >= 0.1) then {_this setVariable [ARR_3(QQEGVAR(medical,damageThreshold),_value,true)]});
|
||||
typeName = "NUMBER";
|
||||
condition = "objectControllable";
|
||||
defaultValue = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -18,6 +18,7 @@ class CfgPatches {
|
||||
#include "ACE_Medical_Injuries.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "CfgEden.hpp"
|
||||
|
||||
/*
|
||||
class ACE_Extensions {
|
||||
|
@ -39,7 +39,7 @@ if (EGVAR(medical,fatalDamageSource) in [0, 2]) then {
|
||||
};
|
||||
if (EGVAR(medical,fatalDamageSource) in [1, 2]) then {
|
||||
// Sum of trauma to critical areas can be fatal (e.g. many small hits)
|
||||
private _damageThreshold = if (isPlayer _unit) then { EGVAR(medical,playerDamageThreshold) } else { EGVAR(medical,AIDamageThreshold) };
|
||||
private _damageThreshold = GET_DAMAGE_THRESHOLD(_unit);
|
||||
private _headThreshhold = 1.25 * _damageThreshold;
|
||||
private _bodyThreshhold = 1.5 * _damageThreshold;
|
||||
|
||||
|
@ -30,10 +30,7 @@ _bodyPartDamage params ["_headDamage", "_bodyDamage", "_leftArmDamage", "_rightA
|
||||
};
|
||||
} forEach GET_OPEN_WOUNDS(_unit);
|
||||
|
||||
private _damageThreshold = [
|
||||
EGVAR(medical,AIDamageThreshold),
|
||||
EGVAR(medical,playerDamageThreshold)
|
||||
] select (isPlayer _unit);
|
||||
private _damageThreshold = GET_DAMAGE_THRESHOLD(_unit);
|
||||
|
||||
if ((_headDamage > _damageThreshold / 2) || {_bodyDamage > _damageThreshold} || {(_painLevel >= PAIN_UNCONSCIOUS) && {random 1 < 0.1}}) then {
|
||||
[QEGVAR(medical,CriticalInjury), _unit] call CBA_fnc_localEvent;
|
||||
|
@ -631,5 +631,15 @@
|
||||
<Turkish>Ikisinden biri</Turkish>
|
||||
<German>Beide</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Damage_Eden_threshold_DisplayName">
|
||||
<English>Unit Damage Threshold</English>
|
||||
<German>Schwelle für Schaden</German>
|
||||
<French>Seuil de dégâts</French>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Damage_Eden_threshold_Description">
|
||||
<English>Sets the amount of damage a unit can receive before going unconscious. (0 for mission default)</English>
|
||||
<German>Legt die Höhe des Schadens fest, den eine Einheit erhalten kann, bevor diese ohnmächtig wird. (0 für Misionsnormalwert)</German>
|
||||
<French>Définit la quantité de dégâts que l'unité peut subir avant de perdre connaissance (ou mourir, si l'option "Somme des traumatismes" est sélectionnée).\n(0 utilise la valeur définie dans la mission.)</French>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -179,6 +179,7 @@
|
||||
#define GET_OPEN_WOUNDS(unit) (unit getVariable [VAR_OPEN_WOUNDS, []])
|
||||
#define GET_BANDAGED_WOUNDS(unit) (unit getVariable [VAR_BANDAGED_WOUNDS, []])
|
||||
#define GET_STITCHED_WOUNDS(unit) (unit getVariable [VAR_STITCHED_WOUNDS, []])
|
||||
#define GET_DAMAGE_THRESHOLD(unit) (unit getVariable [QEGVAR(medical,damageThreshold), [EGVAR(medical,AIDamageThreshold),EGVAR(medical,playerDamageThreshold)] select (isPlayer unit)])
|
||||
|
||||
// The following function calls are defined here just for consistency
|
||||
#define GET_BLOOD_LOSS(unit) ([unit] call EFUNC(medical_status,getBloodLoss))
|
||||
|
@ -33,7 +33,7 @@ GVAR(isSpeedLimiter) = false;
|
||||
|
||||
["ACE3 Vehicles", QGVAR(scrollUp), localize LSTRING(IncreaseSpeedLimit), {
|
||||
if (GVAR(isSpeedLimiter)) then {
|
||||
GVAR(speedLimit) = round (GVAR(speedLimit) + 1) max 5;
|
||||
GVAR(speedLimit) = round (GVAR(speedLimit) + GVAR(speedLimiterStep)) max (5 max GVAR(speedLimiterStep));
|
||||
[["%1: %2", LSTRING(SpeedLimit), GVAR(speedLimit)]] call EFUNC(common,displayTextStructured);
|
||||
true
|
||||
};
|
||||
@ -41,7 +41,7 @@ GVAR(isSpeedLimiter) = false;
|
||||
|
||||
["ACE3 Vehicles", QGVAR(scrollDown), localize LSTRING(DecreaseSpeedLimit), {
|
||||
if (GVAR(isSpeedLimiter)) then {
|
||||
GVAR(speedLimit) = round (GVAR(speedLimit) - 1) max 5;
|
||||
GVAR(speedLimit) = round (GVAR(speedLimit) - GVAR(speedLimiterStep)) max (5 max GVAR(speedLimiterStep));
|
||||
[["%1: %2", LSTRING(SpeedLimit), GVAR(speedLimit)]] call EFUNC(common,displayTextStructured);
|
||||
true
|
||||
};
|
||||
|
@ -19,3 +19,11 @@
|
||||
},
|
||||
true // needs restart
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
[
|
||||
QGVAR(speedLimiterStep),
|
||||
"SLIDER",
|
||||
LSTRING(SpeedLimiterStep),
|
||||
ELSTRING(common,ACEKeybindCategoryVehicles),
|
||||
[1, 10, 5, 0]
|
||||
] call CBA_fnc_addSetting;
|
||||
|
@ -148,5 +148,11 @@
|
||||
<Italian>Nasconde la voce Espelli dal menu azione. Richiede il riavvio del gioco.</Italian>
|
||||
<Czech>Schová akci vyskošení z vozidla z akčního menu. Vyžaduje restart hry.</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Vehicles_SpeedLimiterStep">
|
||||
<English>Speed Limiter Step</English>
|
||||
<German>Schrittgröße des Geschwindigkeitsbegrenzers</German>
|
||||
<Polish>Przeskok limitera prędkości</Polish>
|
||||
<French>Pas du limiteur de vitesse</French>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
1
tools/pDummies/readme.md
Normal file
1
tools/pDummies/readme.md
Normal file
@ -0,0 +1 @@
|
||||
These are dummy files for p drive to allow building with pboProject (check externals now always enabled) - Normally extracted a3 is still required
|
Loading…
Reference in New Issue
Block a user