mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of https://github.com/KoffeinFlummi/ACE3 into windWeatherOverhaul
This commit is contained in:
commit
287c0d62ca
@ -82,3 +82,4 @@ BlackPixxel
|
|||||||
Asgar Serran <piechottaf@web.de>
|
Asgar Serran <piechottaf@web.de>
|
||||||
Kavinsky <nmunozfernandez@gmail.com>
|
Kavinsky <nmunozfernandez@gmail.com>
|
||||||
Coren <coren4@gmail.com>
|
Coren <coren4@gmail.com>
|
||||||
|
OnkelDisMaster <onkeldismaster@gmail.com>
|
||||||
|
@ -16,3 +16,7 @@ class CfgPatches {
|
|||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "RscTitles.hpp"
|
#include "RscTitles.hpp"
|
||||||
#include "ACE_Settings.hpp"
|
#include "ACE_Settings.hpp"
|
||||||
|
|
||||||
|
class ACE_Extensions {
|
||||||
|
extensions[] += {"ace_advanced_ballistics"};
|
||||||
|
};
|
||||||
|
@ -128,7 +128,7 @@ class ATragMX_RscListBox {
|
|||||||
class ATragMX_RscListNBox: ATragMX_RscListBox {
|
class ATragMX_RscListNBox: ATragMX_RscListBox {
|
||||||
idc=-1;
|
idc=-1;
|
||||||
type=102;
|
type=102;
|
||||||
columns[]={0.0, 0.225, 0.475, 0.725};
|
columns[]={0.0, 0.225, 0.475, 0.7};
|
||||||
drawSideArrows=0;
|
drawSideArrows=0;
|
||||||
idcLeft=-1;
|
idcLeft=-1;
|
||||||
idcRight=-1;
|
idcRight=-1;
|
||||||
@ -523,9 +523,12 @@ class ATragMX_Display {
|
|||||||
x=0.550*safezoneW+safezoneX+0.32;
|
x=0.550*safezoneW+safezoneX+0.32;
|
||||||
text="Cur";
|
text="Cur";
|
||||||
};
|
};
|
||||||
class TEXT_ELEVATION_OUTPUT_ABSOLUTE: ATragMX_RscEdit {
|
class TEXT_ELEVATION_OUTPUT_ABSOLUTE: ATragMX_RscText {
|
||||||
idc=400;
|
idc=400;
|
||||||
w=0.07;
|
style=160;
|
||||||
|
sizeEx=0.025;
|
||||||
|
w=0.065;
|
||||||
|
h=0.032;
|
||||||
x=0.550*safezoneW+safezoneX+0.17;
|
x=0.550*safezoneW+safezoneX+0.17;
|
||||||
y=0.265*safezoneH+safezoneY+0.50;
|
y=0.265*safezoneH+safezoneY+0.50;
|
||||||
text="";
|
text="";
|
||||||
@ -537,7 +540,6 @@ class ATragMX_Display {
|
|||||||
class TEXT_ELEVATION_INPUT_CURRENT: TEXT_ELEVATION_OUTPUT_ABSOLUTE {
|
class TEXT_ELEVATION_INPUT_CURRENT: TEXT_ELEVATION_OUTPUT_ABSOLUTE {
|
||||||
idc=402;
|
idc=402;
|
||||||
x=0.550*safezoneW+safezoneX+0.323;
|
x=0.550*safezoneW+safezoneX+0.323;
|
||||||
onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(parse_input); call FUNC(update_result)});
|
|
||||||
};
|
};
|
||||||
class TEXT_WINDAGE: TEXT_ELEVATION {
|
class TEXT_WINDAGE: TEXT_ELEVATION {
|
||||||
idc=41;
|
idc=41;
|
||||||
@ -555,7 +557,6 @@ class ATragMX_Display {
|
|||||||
class TEXT_WINDAGE_INPUT_CURRENT: TEXT_WINDAGE_OUTPUT_ABSOLUTE {
|
class TEXT_WINDAGE_INPUT_CURRENT: TEXT_WINDAGE_OUTPUT_ABSOLUTE {
|
||||||
idc=412;
|
idc=412;
|
||||||
x=0.550*safezoneW+safezoneX+0.323;
|
x=0.550*safezoneW+safezoneX+0.323;
|
||||||
onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(parse_input); call FUNC(update_result)});
|
|
||||||
};
|
};
|
||||||
class TEXT_LEAD: TEXT_GUN {
|
class TEXT_LEAD: TEXT_GUN {
|
||||||
idc=42;
|
idc=42;
|
||||||
@ -595,11 +596,20 @@ class ATragMX_Display {
|
|||||||
class TEXT_SCOPE_UNIT: TEXT_GUN_LIST {
|
class TEXT_SCOPE_UNIT: TEXT_GUN_LIST {
|
||||||
idc=2000;
|
idc=2000;
|
||||||
style=ST_CENTER;
|
style=ST_CENTER;
|
||||||
|
w=0.06;
|
||||||
x=0.550*safezoneW+safezoneX+0.205;
|
x=0.550*safezoneW+safezoneX+0.205;
|
||||||
colorBackground[]={0,0,0,0};
|
colorBackground[]={0,0,0,0};
|
||||||
text="TMOA";
|
text="TMOA";
|
||||||
action=QUOTE(call FUNC(cycle_scope_unit));
|
action=QUOTE(call FUNC(cycle_scope_unit));
|
||||||
};
|
};
|
||||||
|
class TEXT_SCOPE_CLICK_NUMBER: TEXT_GUN_LIST {
|
||||||
|
idc=2001;
|
||||||
|
style=ST_CENTER;
|
||||||
|
w=0.03;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.27;
|
||||||
|
text="4";
|
||||||
|
action=QUOTE(call FUNC(toggle_solution_setup));
|
||||||
|
};
|
||||||
class TEXT_CALCULATE: TEXT_SCOPE_UNIT {
|
class TEXT_CALCULATE: TEXT_SCOPE_UNIT {
|
||||||
idc=3000;
|
idc=3000;
|
||||||
style=ST_RIGHT;
|
style=ST_RIGHT;
|
||||||
@ -1213,7 +1223,10 @@ class ATragMX_Display {
|
|||||||
};
|
};
|
||||||
class TEXT_ATMO_ENV_DATA_CALC_METHOD: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
|
class TEXT_ATMO_ENV_DATA_CALC_METHOD: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
|
||||||
idc=13011;
|
idc=13011;
|
||||||
x=0.550*safezoneW+safezoneX+0.24;
|
style=64;
|
||||||
|
w=0.14;
|
||||||
|
h=0.07;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.235;
|
||||||
y=0.265*safezoneH+safezoneY+0.29;
|
y=0.265*safezoneH+safezoneY+0.29;
|
||||||
text="Calc Method";
|
text="Calc Method";
|
||||||
};
|
};
|
||||||
@ -1325,6 +1338,16 @@ class ATragMX_Display {
|
|||||||
idc=140050;
|
idc=140050;
|
||||||
y=0.265*safezoneH+safezoneY+0.480;
|
y=0.265*safezoneH+safezoneY+0.480;
|
||||||
};
|
};
|
||||||
|
class TEXT_TARGET_DATA_TARGET_SPEED_DIRECTION: ATragMX_RscButton {
|
||||||
|
idc=140051;
|
||||||
|
colorBackground[]={0.15,0.21,0.23,0.3};
|
||||||
|
colorFocused[]={0.15,0.21,0.23,0.2};
|
||||||
|
w=0.0231;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.305;
|
||||||
|
y=0.265*safezoneH+safezoneY+0.480;
|
||||||
|
text=">";
|
||||||
|
action=QUOTE(call FUNC(cycle_target_speed_direction));
|
||||||
|
};
|
||||||
class TEXT_TARGET_DATA_TARGET_RANGE: TEXT_TARGET_DATA_LATITUDE {
|
class TEXT_TARGET_DATA_TARGET_RANGE: TEXT_TARGET_DATA_LATITUDE {
|
||||||
idc=14006;
|
idc=14006;
|
||||||
y=0.265*safezoneH+safezoneY+0.520;
|
y=0.265*safezoneH+safezoneY+0.520;
|
||||||
@ -1355,5 +1378,94 @@ class ATragMX_Display {
|
|||||||
class TEXT_TARGET_DATA_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT {
|
class TEXT_TARGET_DATA_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT {
|
||||||
idc=14011;
|
idc=14011;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
|
||||||
|
idc=15000;
|
||||||
|
style=64;
|
||||||
|
w=0.25;
|
||||||
|
h=0.07;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.13;
|
||||||
|
y=0.265*safezoneH+safezoneY+0.32;
|
||||||
|
text="Show result in";
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1: TEXT_TARGET_A {
|
||||||
|
idc=15001;
|
||||||
|
w=0.04;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.14;
|
||||||
|
y=0.265*safezoneH+safezoneY+0.35;
|
||||||
|
text="1";
|
||||||
|
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 1; call FUNC(update_solution_setup));
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_2: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
|
||||||
|
idc=15002;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.18;
|
||||||
|
text="2";
|
||||||
|
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 2; call FUNC(update_solution_setup));
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_3: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
|
||||||
|
idc=15003;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.22;
|
||||||
|
text="3";
|
||||||
|
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 3; call FUNC(update_solution_setup));
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_4: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
|
||||||
|
idc=15004;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.26;
|
||||||
|
text="4";
|
||||||
|
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 4; call FUNC(update_solution_setup));
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_8: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
|
||||||
|
idc=15005;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.30;
|
||||||
|
text="8";
|
||||||
|
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 8; call FUNC(update_solution_setup));
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_10: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
|
||||||
|
idc=15006;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.34;
|
||||||
|
text="10";
|
||||||
|
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 10; call FUNC(update_solution_setup));
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_CLICKS_PER: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
|
||||||
|
idc=15007;
|
||||||
|
style=64;
|
||||||
|
w=0.25;
|
||||||
|
h=0.07;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.13;
|
||||||
|
y=0.265*safezoneH+safezoneY+0.42;
|
||||||
|
text="Clicks per";
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA: TEXT_TARGET_A {
|
||||||
|
idc=15008;
|
||||||
|
w=0.05;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.15;
|
||||||
|
y=0.265*safezoneH+safezoneY+0.45;
|
||||||
|
text="TMOA";
|
||||||
|
action=QUOTE(GVAR(currentScopeClickUnitTemp) = 0; call FUNC(update_solution_setup));
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_CLICKS_PER_SMOA: TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA {
|
||||||
|
idc=15009;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.23;
|
||||||
|
text="SMOA";
|
||||||
|
action=QUOTE(GVAR(currentScopeClickUnitTemp) = 1; call FUNC(update_solution_setup));
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_CLICKS_PER_MILS: TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA {
|
||||||
|
idc=15010;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.31;
|
||||||
|
text="MILS";
|
||||||
|
action=QUOTE(GVAR(currentScopeClickUnitTemp) = 2; call FUNC(update_solution_setup));
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_DONE: TEXT_TARGET_SPEED_ASSIST_DONE {
|
||||||
|
idc=15011;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.18;
|
||||||
|
y=0.265*safezoneH+safezoneY+0.55;
|
||||||
|
action=QUOTE(1 call FUNC(toggle_solution_setup));
|
||||||
|
};
|
||||||
|
class TEXT_SOLUTION_SETUP_CANCEL: TEXT_TARGET_SPEED_ASSIST_CANCEL {
|
||||||
|
idc=15012;
|
||||||
|
x=0.550*safezoneW+safezoneX+0.26;
|
||||||
|
y=0.265*safezoneH+safezoneY+0.55;
|
||||||
|
action=QUOTE(0 call FUNC(toggle_solution_setup));
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -20,6 +20,7 @@ PREP(cycle_num_ticks_units);
|
|||||||
PREP(cycle_range_card_columns);
|
PREP(cycle_range_card_columns);
|
||||||
PREP(cycle_scope_unit);
|
PREP(cycle_scope_unit);
|
||||||
PREP(cycle_target_size_units);
|
PREP(cycle_target_size_units);
|
||||||
|
PREP(cycle_target_speed_direction);
|
||||||
PREP(delete_gun);
|
PREP(delete_gun);
|
||||||
PREP(init);
|
PREP(init);
|
||||||
PREP(parse_input);
|
PREP(parse_input);
|
||||||
@ -34,6 +35,7 @@ PREP(show_gun_list);
|
|||||||
PREP(show_main_page);
|
PREP(show_main_page);
|
||||||
PREP(show_range_card);
|
PREP(show_range_card);
|
||||||
PREP(show_range_card_setup);
|
PREP(show_range_card_setup);
|
||||||
|
PREP(show_solution_setup);
|
||||||
PREP(show_target_data);
|
PREP(show_target_data);
|
||||||
PREP(show_target_range_assist);
|
PREP(show_target_range_assist);
|
||||||
PREP(show_target_speed_assist);
|
PREP(show_target_speed_assist);
|
||||||
@ -46,6 +48,7 @@ PREP(toggle_gun_ammo_data);
|
|||||||
PREP(toggle_gun_list);
|
PREP(toggle_gun_list);
|
||||||
PREP(toggle_range_card);
|
PREP(toggle_range_card);
|
||||||
PREP(toggle_range_card_setup);
|
PREP(toggle_range_card_setup);
|
||||||
|
PREP(toggle_solution_setup);
|
||||||
PREP(toggle_target_data);
|
PREP(toggle_target_data);
|
||||||
PREP(toggle_target_range_assist);
|
PREP(toggle_target_range_assist);
|
||||||
PREP(toggle_target_speed_assist);
|
PREP(toggle_target_speed_assist);
|
||||||
@ -59,6 +62,7 @@ PREP(update_range_card);
|
|||||||
PREP(update_relative_click_memory);
|
PREP(update_relative_click_memory);
|
||||||
PREP(update_result);
|
PREP(update_result);
|
||||||
PREP(update_scope_unit);
|
PREP(update_scope_unit);
|
||||||
|
PREP(update_solution_setup);
|
||||||
PREP(update_target);
|
PREP(update_target);
|
||||||
PREP(update_target_data);
|
PREP(update_target_data);
|
||||||
PREP(update_target_selection);
|
PREP(update_target_selection);
|
||||||
|
@ -19,7 +19,7 @@ private ["_gunName", "_gunProfileEntry"];
|
|||||||
|
|
||||||
_gunName = ctrlText 11001;
|
_gunName = ctrlText 11001;
|
||||||
if (_gunName != "") then {
|
if (_gunName != "") then {
|
||||||
_gunProfileEntry = [_gunName, 850, 500, 0.280, -0.0010000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.460, "", "", 0.393, 1, "ICAO"];
|
_gunProfileEntry = [_gunName, 810, 100, 0.0679, -0.0010350, 3.81, 0, 2, 10, 120, 0, 0, 9.525, 7.82, 25.40, 0.393, 1, "ICAO"],
|
||||||
|
|
||||||
GVAR(gunList) = GVAR(gunList) + [_gunProfileEntry];
|
GVAR(gunList) = GVAR(gunList) + [_gunProfileEntry];
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ profileNamespace setVariable ["ACE_ATragMX_windSpeed2", nil];
|
|||||||
profileNamespace setVariable ["ACE_ATragMX_windDirection", nil];
|
profileNamespace setVariable ["ACE_ATragMX_windDirection", nil];
|
||||||
profileNamespace setVariable ["ACE_ATragMX_inclinationAngle", nil];
|
profileNamespace setVariable ["ACE_ATragMX_inclinationAngle", nil];
|
||||||
profileNamespace setVariable ["ACE_ATragMX_targetSpeed", nil];
|
profileNamespace setVariable ["ACE_ATragMX_targetSpeed", nil];
|
||||||
|
profileNamespace setVariable ["ACE_ATragMX_targetSpeedDirection", nil];
|
||||||
profileNamespace setVariable ["ACE_ATragMX_targetRange", nil];
|
profileNamespace setVariable ["ACE_ATragMX_targetRange", nil];
|
||||||
|
|
||||||
profileNamespace setVariable ["ACE_ATragMX_rangeCardStartRange", nil];
|
profileNamespace setVariable ["ACE_ATragMX_rangeCardStartRange", nil];
|
||||||
|
@ -35,6 +35,7 @@ if (GVAR(showRangeCard)) then {
|
|||||||
[] call FUNC(update_range_card);
|
[] call FUNC(update_range_card);
|
||||||
};
|
};
|
||||||
GVAR(showRangeCardSetup) call FUNC(show_range_card_setup);
|
GVAR(showRangeCardSetup) call FUNC(show_range_card_setup);
|
||||||
|
GVAR(showSolutionSetup) call FUNC(show_solution_setup);
|
||||||
GVAR(showTargetData) call FUNC(show_target_data);
|
GVAR(showTargetData) call FUNC(show_target_data);
|
||||||
GVAR(showTargetRangeAssist) call FUNC(show_target_range_assist);
|
GVAR(showTargetRangeAssist) call FUNC(show_target_range_assist);
|
||||||
GVAR(showTargetSpeedAssist) call FUNC(show_target_speed_assist);
|
GVAR(showTargetSpeedAssist) call FUNC(show_target_speed_assist);
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
[] call FUNC(parse_input);
|
[] call FUNC(parse_input);
|
||||||
|
|
||||||
GVAR(currentScopeUnit) = (GVAR(currentScopeUnit) + 1) % (count GVAR(scopeUnits));
|
GVAR(currentScopeUnit) = (GVAR(currentScopeUnit) + 1) % (count GVAR(scopeUnits));
|
||||||
|
GVAR(workingMemory) set [6, GVAR(currentScopeUnit)];
|
||||||
|
|
||||||
[] call FUNC(update_scope_unit);
|
[] call FUNC(update_scope_unit);
|
||||||
[] call FUNC(update_result);
|
[] call FUNC(update_result);
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Author: Ruthberg
|
||||||
|
* Cycles through the target directions left/right
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* call ace_atragmx_cycle_target_direction
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
if ((ctrlText 140051) == ">") then {
|
||||||
|
ctrlSetText [140051, "<"];
|
||||||
|
} else {
|
||||||
|
ctrlSetText [140051, ">"];
|
||||||
|
};
|
@ -42,7 +42,9 @@ GVAR(currentGun) = 0;
|
|||||||
GVAR(currentTarget) = 0;
|
GVAR(currentTarget) = 0;
|
||||||
GVAR(currentScopeUnit) = 0;
|
GVAR(currentScopeUnit) = 0;
|
||||||
GVAR(currentScopeClickUnit) = 2;
|
GVAR(currentScopeClickUnit) = 2;
|
||||||
|
GVAR(currentScopeClickUnitTemp) = 2;
|
||||||
GVAR(currentScopeClickNumber) = 10;
|
GVAR(currentScopeClickNumber) = 10;
|
||||||
|
GVAR(currentScopeClickNumberTemp) = 10;
|
||||||
|
|
||||||
GVAR(atmosphereModeTBH) = true;
|
GVAR(atmosphereModeTBH) = true;
|
||||||
GVAR(altitude) = 0;
|
GVAR(altitude) = 0;
|
||||||
@ -57,6 +59,7 @@ GVAR(windSpeed2) = [0, 0, 0, 0];
|
|||||||
GVAR(windDirection) = [12, 12, 12, 12];
|
GVAR(windDirection) = [12, 12, 12, 12];
|
||||||
GVAR(inclinationAngle) = [0, 0, 0, 0];
|
GVAR(inclinationAngle) = [0, 0, 0, 0];
|
||||||
GVAR(targetSpeed) = [0, 0, 0, 0];
|
GVAR(targetSpeed) = [0, 0, 0, 0];
|
||||||
|
GVAR(targetSpeedDirection) = [1, 1, 1, 1];
|
||||||
GVAR(targetRange) = [0, 0, 0, 0];
|
GVAR(targetRange) = [0, 0, 0, 0];
|
||||||
|
|
||||||
GVAR(showWind2) = false;
|
GVAR(showWind2) = false;
|
||||||
@ -74,6 +77,7 @@ GVAR(showGunAmmoData) = false;
|
|||||||
GVAR(showGunList) = false;
|
GVAR(showGunList) = false;
|
||||||
GVAR(showRangeCard) = false;
|
GVAR(showRangeCard) = false;
|
||||||
GVAR(showRangeCardSetup) = false;
|
GVAR(showRangeCardSetup) = false;
|
||||||
|
GVAR(showSolutionSetup) = false;
|
||||||
GVAR(showTargetData) = false;
|
GVAR(showTargetData) = false;
|
||||||
GVAR(showTargetRangeAssist) = false;
|
GVAR(showTargetRangeAssist) = false;
|
||||||
GVAR(showTargetSpeedAssist) = false;
|
GVAR(showTargetSpeedAssist) = false;
|
||||||
|
@ -40,7 +40,12 @@ if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget)
|
|||||||
GVAR(inclinationAngle) set [GVAR(currentTarget), round(acos(_inclinationAngleCosine))];
|
GVAR(inclinationAngle) set [GVAR(currentTarget), round(acos(_inclinationAngleCosine))];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
GVAR(targetSpeed) set [GVAR(currentTarget), -50 max abs(parseNumber(ctrlText 140050)) min 50];
|
GVAR(targetSpeed) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140050)) min 50];
|
||||||
|
if ((ctrlText 140051) == ">") then {
|
||||||
|
GVAR(targetSpeedDirection) set [GVAR(currentTarget), +1];
|
||||||
|
} else {
|
||||||
|
GVAR(targetSpeedDirection) set [GVAR(currentTarget), -1];
|
||||||
|
};
|
||||||
GVAR(targetRange) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140060)) min 4000];
|
GVAR(targetRange) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140060)) min 4000];
|
||||||
if (GVAR(currentUnit) != 2) then {
|
if (GVAR(currentUnit) != 2) then {
|
||||||
GVAR(windSpeed1) set [GVAR(currentTarget), (GVAR(windSpeed1) select GVAR(currentTarget)) * 0.44704];
|
GVAR(windSpeed1) set [GVAR(currentTarget), (GVAR(windSpeed1) select GVAR(currentTarget)) * 0.44704];
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
GVAR(currentUnit) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentUnit", 2]) min 2;
|
GVAR(currentUnit) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentUnit", 2]) min 2;
|
||||||
[(profileNamespace getVariable ["ACE_ATragMX_currentGun", 0]), true, false] call FUNC(change_gun);
|
[(profileNamespace getVariable ["ACE_ATragMX_currentGun", 0]), true, false] call FUNC(change_gun);
|
||||||
GVAR(currentTarget) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentTarget", 0]) min 3;
|
GVAR(currentTarget) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentTarget", 0]) min 3;
|
||||||
GVAR(currentScopeUnit) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentScopeUnit", 0]) min 3;
|
|
||||||
|
|
||||||
GVAR(atmosphereModeTBH) = profileNamespace getVariable ["ACE_ATragMX_atmosphereModeTBH", true];
|
GVAR(atmosphereModeTBH) = profileNamespace getVariable ["ACE_ATragMX_atmosphereModeTBH", true];
|
||||||
GVAR(altitude) = -1000 max (profileNamespace getVariable ["ACE_ATragMX_altitude", 0]) min 20000;
|
GVAR(altitude) = -1000 max (profileNamespace getVariable ["ACE_ATragMX_altitude", 0]) min 20000;
|
||||||
@ -34,6 +33,7 @@ GVAR(windSpeed2) = profileNamespace getVariable ["ACE_ATragMX_windSpeed2", [0, 0
|
|||||||
GVAR(windDirection) = profileNamespace getVariable ["ACE_ATragMX_windDirection", [12, 12, 12, 12]];
|
GVAR(windDirection) = profileNamespace getVariable ["ACE_ATragMX_windDirection", [12, 12, 12, 12]];
|
||||||
GVAR(inclinationAngle) = profileNamespace getVariable ["ACE_ATragMX_inclinationAngle", [0, 0, 0, 0]];
|
GVAR(inclinationAngle) = profileNamespace getVariable ["ACE_ATragMX_inclinationAngle", [0, 0, 0, 0]];
|
||||||
GVAR(targetSpeed) = profileNamespace getVariable ["ACE_ATragMX_targetSpeed", [0, 0, 0, 0]];
|
GVAR(targetSpeed) = profileNamespace getVariable ["ACE_ATragMX_targetSpeed", [0, 0, 0, 0]];
|
||||||
|
GVAR(targetSpeedDirection) = profileNamespace getVariable ["ACE_ATragMX_targetSpeedDirection", [1, 1, 1, 1]];
|
||||||
GVAR(targetRange) = profileNamespace getVariable ["ACE_ATragMX_targetRange", [0, 0, 0, 0]];
|
GVAR(targetRange) = profileNamespace getVariable ["ACE_ATragMX_targetRange", [0, 0, 0, 0]];
|
||||||
|
|
||||||
GVAR(rangeCardStartRange) = 0 max (profileNamespace getVariable ["ACE_ATragMX_rangeCardStartRange", 200]) min 3000;
|
GVAR(rangeCardStartRange) = 0 max (profileNamespace getVariable ["ACE_ATragMX_rangeCardStartRange", 200]) min 3000;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
GVAR(showMainPage) = _this;
|
GVAR(showMainPage) = _this;
|
||||||
|
|
||||||
{ctrlShow [_x, _this]} forEach [10, 100, 11, 110, 12, 120, 13, 130, 14, 140, 20, 200, 21, 210, 22, 220, 23, 230, 30, 300, 31, 310, 32, 320, 33, 330, 34, 340, 40, 400, 401, 402, 403, 41, 410, 411, 412, 42, 420,
|
{ctrlShow [_x, _this]} forEach [10, 100, 11, 110, 12, 120, 13, 130, 14, 140, 20, 200, 21, 210, 22, 220, 23, 230, 30, 300, 31, 310, 32, 320, 33, 330, 34, 340, 40, 400, 401, 402, 403, 41, 410, 411, 412, 42, 420,
|
||||||
500, 501, 502, 503, 600, 601, 602, 603, 1000, 1001, 1002, 1003, 1004, 2000, 3000, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008];
|
500, 501, 502, 503, 600, 601, 602, 603, 1000, 1001, 1002, 1003, 1004, 2000, 2001, 3000, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008];
|
||||||
|
|
||||||
if (_this) then {
|
if (_this) then {
|
||||||
if (GVAR(atmosphereModeTBH)) then {
|
if (GVAR(atmosphereModeTBH)) then {
|
||||||
@ -26,4 +26,7 @@ if (_this) then {
|
|||||||
} else {
|
} else {
|
||||||
{ctrlShow [_x, false]} forEach [21, 210, 22, 220];
|
{ctrlShow [_x, false]} forEach [21, 210, 22, 220];
|
||||||
};
|
};
|
||||||
|
if (GVAR(currentScopeUnit) != 3) then {
|
||||||
|
{ctrlShow [_x, false]} forEach [2001];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
20
addons/atragmx/functions/fnc_show_solution_setup.sqf
Normal file
20
addons/atragmx/functions/fnc_show_solution_setup.sqf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Author: Ruthberg
|
||||||
|
* Shows/Hides the solution setup controls
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* visible - <BOOL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* false call ace_atragmx_fnc_show_solution_setup
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(showSolutionSetup) = _this;
|
||||||
|
|
||||||
|
{ctrlShow [_x, _this]} forEach [15000, 15001, 15002, 15003, 15004, 15005, 15006, 15007, 15008, 15009, 15010, 15011, 15012];
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
GVAR(showTargetData) = _this;
|
GVAR(showTargetData) = _this;
|
||||||
|
|
||||||
{ctrlShow [_x, _this]} forEach [14000, 140000, 14001, 140010, 14002, 141020, 140020, 141021, 140021, 14003, 140030, 14004, 140040, 141040, 141041, 140041, 14005, 140050, 14006, 140060, 140061, 14007, 14008, 14009, 14010, 14011];
|
{ctrlShow [_x, _this]} forEach [14000, 140000, 14001, 140010, 14002, 141020, 140020, 141021, 140021, 14003, 140030, 14004, 140040, 141040, 141041, 140041, 14005, 140050, 140051, 14006, 140060, 140061, 14007, 14008, 14009, 14010, 14011];
|
||||||
|
|
||||||
if (_this) then {
|
if (_this) then {
|
||||||
[] call FUNC(update_target_data);
|
[] call FUNC(update_target_data);
|
||||||
|
@ -20,7 +20,6 @@ profileNamespace setVariable ["ACE_ATragMX_profileNamespaceVersion", ATRAGMX_PRO
|
|||||||
profileNamespace setVariable ["ACE_ATragMX_currentUnit", GVAR(currentUnit)];
|
profileNamespace setVariable ["ACE_ATragMX_currentUnit", GVAR(currentUnit)];
|
||||||
profileNamespace setVariable ["ACE_ATragMX_currentGun", GVAR(currentGun)];
|
profileNamespace setVariable ["ACE_ATragMX_currentGun", GVAR(currentGun)];
|
||||||
profileNamespace setVariable ["ACE_ATragMX_currentTarget", GVAR(currentTarget)];
|
profileNamespace setVariable ["ACE_ATragMX_currentTarget", GVAR(currentTarget)];
|
||||||
profileNamespace setVariable ["ACE_ATragMX_currentScopeUnit", GVAR(currentScopeUnit)];
|
|
||||||
|
|
||||||
profileNamespace setVariable ["ACE_ATragMX_atmosphereModeTBH", GVAR(atmosphereModeTBH)];
|
profileNamespace setVariable ["ACE_ATragMX_atmosphereModeTBH", GVAR(atmosphereModeTBH)];
|
||||||
profileNamespace setVariable ["ACE_ATragMX_altitude", GVAR(altitude)];
|
profileNamespace setVariable ["ACE_ATragMX_altitude", GVAR(altitude)];
|
||||||
@ -36,6 +35,7 @@ profileNamespace setVariable ["ACE_ATragMX_windSpeed2", GVAR(windSpeed2)];
|
|||||||
profileNamespace setVariable ["ACE_ATragMX_windDirection", GVAR(windDirection)];
|
profileNamespace setVariable ["ACE_ATragMX_windDirection", GVAR(windDirection)];
|
||||||
profileNamespace setVariable ["ACE_ATragMX_inclinationAngle", GVAR(inclinationAngle)];
|
profileNamespace setVariable ["ACE_ATragMX_inclinationAngle", GVAR(inclinationAngle)];
|
||||||
profileNamespace setVariable ["ACE_ATragMX_targetSpeed", GVAR(targetSpeed)];
|
profileNamespace setVariable ["ACE_ATragMX_targetSpeed", GVAR(targetSpeed)];
|
||||||
|
profileNamespace setVariable ["ACE_ATragMX_targetSpeedDirection", GVAR(targetSpeedDirection)];
|
||||||
profileNamespace setVariable ["ACE_ATragMX_targetRange", GVAR(targetRange)];
|
profileNamespace setVariable ["ACE_ATragMX_targetRange", GVAR(targetRange)];
|
||||||
|
|
||||||
profileNamespace setVariable ["ACE_ATragMX_rangeCardStartRange", GVAR(rangeCardStartRange)];
|
profileNamespace setVariable ["ACE_ATragMX_rangeCardStartRange", GVAR(rangeCardStartRange)];
|
||||||
|
38
addons/atragmx/functions/fnc_toggle_solution_setup.sqf
Normal file
38
addons/atragmx/functions/fnc_toggle_solution_setup.sqf
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Author: Ruthberg
|
||||||
|
* Toggles the solution setup screen on/off
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Apply new data? <NUMBER>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* 1 call ace_atragmx_fnc_toggle_solution_setup
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
if (ctrlVisible 15000) then {
|
||||||
|
false call FUNC(show_solution_setup);
|
||||||
|
true call FUNC(show_main_page);
|
||||||
|
|
||||||
|
if (_this == 1) then {
|
||||||
|
GVAR(currentScopeClickUnit) = GVAR(currentScopeClickUnitTemp);
|
||||||
|
GVAR(currentScopeClickNumber) = GVAR(currentScopeClickNumberTemp);
|
||||||
|
GVAR(workingMemory) set [7, GVAR(currentScopeClickUnit)];
|
||||||
|
GVAR(workingMemory) set [8, GVAR(currentScopeClickNumber)];
|
||||||
|
[] call FUNC(update_scope_unit);
|
||||||
|
[] call FUNC(update_result);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
true call FUNC(show_solution_setup);
|
||||||
|
false call FUNC(show_main_page);
|
||||||
|
|
||||||
|
GVAR(currentScopeClickUnitTemp) = GVAR(currentScopeClickUnit);
|
||||||
|
GVAR(currentScopeClickNumberTemp) = GVAR(currentScopeClickNumber);
|
||||||
|
|
||||||
|
[] call FUNC(update_solution_setup);
|
||||||
|
};
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_range", "_elevation", "_windage1", "_windage2", "_elevationScopeStep", "_windageScopeStep", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput"];
|
private ["_range", "_elevation", "_windage1", "_windage2", "_clickSize", "_clickNumber", "_clickInterval", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput"];
|
||||||
_lastColumnOutput = "";
|
_lastColumnOutput = "";
|
||||||
|
|
||||||
if (GVAR(showWind2) && GVAR(rangeCardCurrentColumn) == 0) then {
|
if (GVAR(showWind2) && GVAR(rangeCardCurrentColumn) == 0) then {
|
||||||
@ -54,12 +54,17 @@ lnbClear 5007;
|
|||||||
_windage2 = _windage2 * 1.047;
|
_windage2 = _windage2 * 1.047;
|
||||||
};
|
};
|
||||||
case 3: {
|
case 3: {
|
||||||
_elevationScopeStep = (GVAR(workingMemory) select 7);
|
switch (GVAR(workingMemory) select 7) do {
|
||||||
_windageScopeStep = (GVAR(workingMemory) select 8);
|
case 0: { _clickSize = 1; };
|
||||||
|
case 1: { _clickSize = 1 / 1.047; };
|
||||||
|
case 2: { _clickSize = 3.38; };
|
||||||
|
};
|
||||||
|
_clickNumber = GVAR(workingMemory) select 8;
|
||||||
|
_clickInterval = _clickSize / _clickNumber;
|
||||||
|
|
||||||
_elevation = Round(_elevation / _elevationScopeStep);
|
_elevation = Round(_elevation / _clickInterval);
|
||||||
_windage1 = Round(_windage1 / _windageScopeStep);
|
_windage1 = Round(_windage1 / _clickInterval);
|
||||||
_windage2 = Round(_windage2 / _windageScopeStep);
|
_windage2 = Round(_windage2 / _clickInterval);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_wind2", "_windageRel", "_windageCur", "_lead", "_elevationScopeStep", "_windageScopeStep"];
|
private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_wind2", "_windageRel", "_windageCur", "_lead", "_clickSize", "_clickNumber", "_clickInterval"];
|
||||||
_elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget);
|
_elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget);
|
||||||
_windageAbs = GVAR(windage1Output) select GVAR(currentTarget);
|
_windageAbs = GVAR(windage1Output) select GVAR(currentTarget);
|
||||||
|
|
||||||
@ -55,19 +55,24 @@ switch (GVAR(currentScopeUnit)) do {
|
|||||||
_windageCur = _windageCur * 1.047;
|
_windageCur = _windageCur * 1.047;
|
||||||
};
|
};
|
||||||
case 3: {
|
case 3: {
|
||||||
_elevationScopeStep = (GVAR(workingMemory) select 7);
|
switch (GVAR(workingMemory) select 7) do {
|
||||||
_windageScopeStep = (GVAR(workingMemory) select 8);
|
case 0: { _clickSize = 1; };
|
||||||
|
case 1: { _clickSize = 1 / 1.047; };
|
||||||
|
case 2: { _clickSize = 3.38; };
|
||||||
|
};
|
||||||
|
_clickNumber = GVAR(workingMemory) select 8;
|
||||||
|
_clickInterval = _clickSize / _clickNumber;
|
||||||
|
|
||||||
_elevationAbs = Round(_elevationAbs / _elevationScopeStep);
|
_elevationAbs = Round(_elevationAbs / _clickInterval);
|
||||||
_windageAbs = Round(_windageAbs / _windageScopeStep);
|
_windageAbs = Round(_windageAbs / _clickInterval);
|
||||||
|
|
||||||
_wind2 = Round(_wind2 / _windageScopeStep);
|
_wind2 = Round(_wind2 / _clickInterval);
|
||||||
|
|
||||||
_elevationRel = Round(_elevationRel / _elevationScopeStep);
|
_elevationRel = Round(_elevationRel / _clickInterval);
|
||||||
_windageRel = Round(_windageRel / _windageScopeStep);
|
_windageRel = Round(_windageRel / _clickInterval);
|
||||||
|
|
||||||
_elevationCur = Round(_elevationCur / _elevationScopeStep);
|
_elevationCur = Round(_elevationCur / _clickInterval);
|
||||||
_windageCur = Round(_windageCur / _windageScopeStep);
|
_windageCur = Round(_windageCur / _clickInterval);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -77,16 +82,88 @@ if (GVAR(showWind2)) then {
|
|||||||
ctrlSetText [42, "Lead"];
|
ctrlSetText [42, "Lead"];
|
||||||
};
|
};
|
||||||
|
|
||||||
ctrlSetText [400, Str(Round(_elevationAbs * 100) / 100)];
|
_elevationAbs = Round(_elevationAbs * 100) / 100;
|
||||||
ctrlSetText [401, Str(Round(_elevationRel * 100) / 100)];
|
if (_elevationAbs > 0) then {
|
||||||
ctrlSetText [402, Str(Round(_elevationCur * 100) / 100)];
|
ctrlSetText [400, format["%1", abs(_elevationAbs)]];
|
||||||
|
} else {
|
||||||
|
if (_elevationAbs < 0) then {
|
||||||
|
ctrlSetText [400, format["%1D", abs(_elevationAbs)]];
|
||||||
|
} else {
|
||||||
|
ctrlSetText [400, "0.0"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_elevationRel = Round(_elevationRel * 100) / 100;
|
||||||
|
if (_elevationRel > 0) then {
|
||||||
|
ctrlSetText [401, format["%1", abs(_elevationRel)]];
|
||||||
|
} else {
|
||||||
|
if (_elevationRel < 0) then {
|
||||||
|
ctrlSetText [401, format["%1D", abs(_elevationRel)]];
|
||||||
|
} else {
|
||||||
|
ctrlSetText [401, "0.0"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_elevationCur = Round(_elevationCur * 100) / 100;
|
||||||
|
if (_elevationCur > 0) then {
|
||||||
|
ctrlSetText [402, format["%1", abs(_elevationCur)]];
|
||||||
|
} else {
|
||||||
|
if (_elevationCur < 0) then {
|
||||||
|
ctrlSetText [402, format["%1D", abs(_elevationCur)]];
|
||||||
|
} else {
|
||||||
|
ctrlSetText [402, "0.0"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
ctrlSetText [410, Str(Round(_windageAbs * 100) / 100)];
|
_windageAbs = Round(_windageAbs * 100) / 100;
|
||||||
ctrlSetText [411, Str(Round(_windageRel * 100) / 100)];
|
if (_windageAbs > 0) then {
|
||||||
ctrlSetText [412, Str(Round(_windageCur * 100) / 100)];
|
ctrlSetText [410, format["%1R", abs(_windageAbs)]];
|
||||||
|
} else {
|
||||||
|
if (_windageAbs < 0) then {
|
||||||
|
ctrlSetText [410, format["%1L", abs(_windageAbs)]];
|
||||||
|
} else {
|
||||||
|
ctrlSetText [410, "0.0"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_windageRel = Round(_windageRel * 100) / 100;
|
||||||
|
if (_windageRel > 0) then {
|
||||||
|
ctrlSetText [411, format["%1R", abs(_windageRel)]];
|
||||||
|
} else {
|
||||||
|
if (_windageRel < 0) then {
|
||||||
|
ctrlSetText [411, format["%1L", abs(_windageRel)]];
|
||||||
|
} else {
|
||||||
|
ctrlSetText [411, "0.0"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_windageCur = Round(_windageCur * 100) / 100;
|
||||||
|
if (_windageCur > 0) then {
|
||||||
|
ctrlSetText [412, format["%1R", abs(_windageCur)]];
|
||||||
|
} else {
|
||||||
|
if (_windageCur < 0) then {
|
||||||
|
ctrlSetText [412, format["%1L", abs(_windageCur)]];
|
||||||
|
} else {
|
||||||
|
ctrlSetText [412, "0.0"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
if (GVAR(showWind2)) then {
|
if (GVAR(showWind2)) then {
|
||||||
ctrlSetText [420, Str(Round(_wind2 * 100) / 100)];
|
_wind2 = Round(_wind2 * 100) / 100;
|
||||||
|
if (_wind2 > 0) then {
|
||||||
|
ctrlSetText [420, format["%1R", abs(_wind2)]];
|
||||||
|
} else {
|
||||||
|
if (_wind2 < 0) then {
|
||||||
|
ctrlSetText [420, format["%1L", abs(_wind2)]];
|
||||||
|
} else {
|
||||||
|
ctrlSetText [420, "0.0"];
|
||||||
|
};
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
ctrlSetText [420, Str(Round(_lead * 100) / 100)];
|
_lead = Round(_lead * 100) / 100;
|
||||||
|
if (_lead > 0) then {
|
||||||
|
if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then {
|
||||||
|
ctrlSetText [420, format["%1R", abs(_lead)]];
|
||||||
|
} else {
|
||||||
|
ctrlSetText [420, format["%1L", abs(_lead)]];
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
ctrlSetText [420, "0.0"];
|
||||||
|
};
|
||||||
};
|
};
|
@ -15,10 +15,15 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
ctrlSetText [2000, GVAR(scopeUnits) select GVAR(currentScopeUnit)];
|
||||||
|
ctrlSetText [2001, Str(GVAR(currentScopeClickNumber))];
|
||||||
|
|
||||||
if (GVAR(currentScopeUnit) == 3) then {
|
if (GVAR(currentScopeUnit) == 3) then {
|
||||||
ctrlSetText [2000, format["Clicks=%1", GVAR(currentScopeClickNumber)]];
|
|
||||||
ctrlSetText [5000, format["Clicks=%1", GVAR(currentScopeClickNumber)]];
|
ctrlSetText [5000, format["Clicks=%1", GVAR(currentScopeClickNumber)]];
|
||||||
|
if (GVAR(showMainPage)) then {
|
||||||
|
ctrlShow [2001, true];
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
ctrlSetText [2000, GVAR(scopeUnits) select GVAR(currentScopeUnit)];
|
|
||||||
ctrlSetText [5000, GVAR(scopeUnits) select GVAR(currentScopeUnit)];
|
ctrlSetText [5000, GVAR(scopeUnits) select GVAR(currentScopeUnit)];
|
||||||
|
ctrlShow [2001, false];
|
||||||
};
|
};
|
31
addons/atragmx/functions/fnc_update_solution_setup.sqf
Normal file
31
addons/atragmx/functions/fnc_update_solution_setup.sqf
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Author: Ruthberg
|
||||||
|
* Updates all solution setup input fields
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* call ace_atragmx_fnc_update_solution_setup
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
{((uiNamespace getVariable "ATragMX_Display") displayCtrl _x) ctrlEnable true} forEach [15001, 15002, 15003, 15004, 15005, 15006, 15008, 15009, 15010];
|
||||||
|
|
||||||
|
switch (GVAR(currentScopeClickNumberTemp)) do {
|
||||||
|
case 1: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15001) ctrlEnable false; };
|
||||||
|
case 2: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15002) ctrlEnable false; };
|
||||||
|
case 3: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15003) ctrlEnable false; };
|
||||||
|
case 4: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15004) ctrlEnable false; };
|
||||||
|
case 8: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15005) ctrlEnable false; };
|
||||||
|
case 10: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15006) ctrlEnable false; };
|
||||||
|
};
|
||||||
|
|
||||||
|
((uiNamespace getVariable "ATragMX_Display") displayCtrl (15008 + GVAR(currentScopeClickUnitTemp))) ctrlEnable false;
|
||||||
|
|
||||||
|
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15011);
|
@ -32,6 +32,11 @@ if (GVAR(currentUnit) != 2) then {
|
|||||||
} else {
|
} else {
|
||||||
ctrlSetText [140050, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)];
|
ctrlSetText [140050, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)];
|
||||||
};
|
};
|
||||||
|
if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then {
|
||||||
|
ctrlSetText [140051, ">"];
|
||||||
|
} else {
|
||||||
|
ctrlSetText [140051, "<"];
|
||||||
|
};
|
||||||
if (GVAR(currentUnit) == 1) then {
|
if (GVAR(currentUnit) == 1) then {
|
||||||
ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))];
|
ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))];
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,10 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
((uiNamespace getVariable "ATragMX_Display") displayCtrl 500) ctrlEnable true;
|
{((uiNamespace getVariable "ATragMX_Display") displayCtrl _x) ctrlEnable true} forEach [500, 501, 502, 503];
|
||||||
((uiNamespace getVariable "ATragMX_Display") displayCtrl 501) ctrlEnable true;
|
|
||||||
((uiNamespace getVariable "ATragMX_Display") displayCtrl 502) ctrlEnable true;
|
|
||||||
((uiNamespace getVariable "ATragMX_Display") displayCtrl 503) ctrlEnable true;
|
|
||||||
|
|
||||||
((uiNamespace getVariable "ATragMX_Display") displayCtrl 500 + GVAR(currentTarget)) ctrlEnable false;
|
((uiNamespace getVariable "ATragMX_Display") displayCtrl 500 + GVAR(currentTarget)) ctrlEnable false;
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@
|
|||||||
<English>%1<br/>Attached</English>
|
<English>%1<br/>Attached</English>
|
||||||
<German>%1<br/>befestigt</German>
|
<German>%1<br/>befestigt</German>
|
||||||
<Spanish>%1<br/>acoplada</Spanish>
|
<Spanish>%1<br/>acoplada</Spanish>
|
||||||
<Polish>%1<br/>Przyczepiono</Polish>
|
<Polish>%1<br/>przyczepiono</Polish>
|
||||||
<French>%1<br/>attachée</French>
|
<French>%1<br/>attachée</French>
|
||||||
<Czech>%1<br/>Připnutý</Czech>
|
<Czech>%1<br/>Připnutý</Czech>
|
||||||
<Portuguese>%1<br/>Acoplada</Portuguese>
|
<Portuguese>%1<br/>Acoplada</Portuguese>
|
||||||
@ -195,7 +195,7 @@
|
|||||||
<English>%1<br/>Detached</English>
|
<English>%1<br/>Detached</English>
|
||||||
<German>%1<br/>entfernt</German>
|
<German>%1<br/>entfernt</German>
|
||||||
<Spanish>%1<br/>quitada</Spanish>
|
<Spanish>%1<br/>quitada</Spanish>
|
||||||
<Polish>%1<br/>Odczepiono</Polish>
|
<Polish>%1<br/>odczepiono</Polish>
|
||||||
<French>%1<br/>détachée</French>
|
<French>%1<br/>détachée</French>
|
||||||
<Czech>%1<br/>Odepnutý</Czech>
|
<Czech>%1<br/>Odepnutý</Czech>
|
||||||
<Portuguese>%1<br/>Separada</Portuguese>
|
<Portuguese>%1<br/>Separada</Portuguese>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<German>Gefangen nehmen</German>
|
<German>Gefangen nehmen</German>
|
||||||
<Spanish>Tomar prisionero</Spanish>
|
<Spanish>Tomar prisionero</Spanish>
|
||||||
<French>Capturer le prisonnier</French>
|
<French>Capturer le prisonnier</French>
|
||||||
<Polish>Weź więźnia</Polish>
|
<Polish>Aresztuj</Polish>
|
||||||
<Czech>Zajmout Osobu</Czech>
|
<Czech>Zajmout Osobu</Czech>
|
||||||
<Italian>Arresta il Prigioniero</Italian>
|
<Italian>Arresta il Prigioniero</Italian>
|
||||||
<Portuguese>Tomar Prisioneiro</Portuguese>
|
<Portuguese>Tomar Prisioneiro</Portuguese>
|
||||||
@ -53,7 +53,7 @@
|
|||||||
<English>You need to take him as prisoner first!</English>
|
<English>You need to take him as prisoner first!</English>
|
||||||
<German>Du musst ihn zuerst gefangen nehmen.</German>
|
<German>Du musst ihn zuerst gefangen nehmen.</German>
|
||||||
<Spanish>Necesitas hacerle prisionero primero!</Spanish>
|
<Spanish>Necesitas hacerle prisionero primero!</Spanish>
|
||||||
<Polish>Najpierw musisz wziąć go jako więźnia!</Polish>
|
<Polish>Najpierw musisz go aresztować!</Polish>
|
||||||
<French>Vous devez d'abord le capturer!</French>
|
<French>Vous devez d'abord le capturer!</French>
|
||||||
<Czech>Musíš ho nejdříve zajmout!</Czech>
|
<Czech>Musíš ho nejdříve zajmout!</Czech>
|
||||||
<Italian>Prima devi arrestarlo!</Italian>
|
<Italian>Prima devi arrestarlo!</Italian>
|
||||||
|
@ -248,5 +248,13 @@ if(isMultiplayer && { time > 0 || isNull player } ) then {
|
|||||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// check dlls
|
||||||
|
{
|
||||||
|
if (_x callExtension "version" == "") then {
|
||||||
|
private "_errorMsg";
|
||||||
|
_errorMsg = format ["Extension %1.dll not installed.", _x];
|
||||||
|
|
||||||
|
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
||||||
|
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||||
|
};
|
||||||
|
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");
|
||||||
|
@ -42,6 +42,7 @@ PREP(doAnimation);
|
|||||||
PREP(dropBackpack);
|
PREP(dropBackpack);
|
||||||
PREP(endRadioTransmission);
|
PREP(endRadioTransmission);
|
||||||
PREP(eraseCache);
|
PREP(eraseCache);
|
||||||
|
PREP(errorMessage);
|
||||||
PREP(execNextFrame);
|
PREP(execNextFrame);
|
||||||
PREP(execPersistentFnc);
|
PREP(execPersistentFnc);
|
||||||
PREP(execRemoteFnc);
|
PREP(execRemoteFnc);
|
||||||
|
@ -152,3 +152,15 @@ class CfgUIGrids {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
// check dll
|
||||||
|
class RscStandardDisplay;
|
||||||
|
class RscDisplayMain: RscStandardDisplay {
|
||||||
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage));
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
class ACE_Extensions {
|
||||||
|
extensions[] = {};
|
||||||
|
};
|
||||||
|
@ -27,7 +27,7 @@ if ((local _unit) && {!([_unit] call EFUNC(common,isPlayer))}) then {
|
|||||||
_unit disableConversation true;
|
_unit disableConversation true;
|
||||||
} else {
|
} else {
|
||||||
//Sanity check to make sure we don't enable unconsious AI
|
//Sanity check to make sure we don't enable unconsious AI
|
||||||
if (_unit getVariable ["ace_isunconscious", false]) exitWith {ERROR("Enabling AI for unconsious unit");};
|
if (_unit getVariable ["ace_isunconscious", false] && alive _unit) exitWith {ERROR("Enabling AI for unconsious unit");};
|
||||||
_unit enableAI "MOVE";
|
_unit enableAI "MOVE";
|
||||||
_unit enableAI "TARGET";
|
_unit enableAI "TARGET";
|
||||||
_unit enableAI "AUTOTARGET";
|
_unit enableAI "AUTOTARGET";
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Disables key input. ESC can still be pressed to open the menu.
|
* Disables key input. ESC can still be pressed to open the menu.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: True to disable key inputs, false to re-enable them (Bool)
|
* 0: True to disable key inputs, false to re-enable them <BOOL>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Nothing
|
* Nothing
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_state", "_dlg"];
|
private ["_state", "_dlg"];
|
||||||
@ -22,10 +24,12 @@ if (_state) then {
|
|||||||
if ("ACE_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) exitWith {};
|
if ("ACE_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) exitWith {};
|
||||||
|
|
||||||
// end TFAR and ACRE2 radio transmissions
|
// end TFAR and ACRE2 radio transmissions
|
||||||
0 spawn FUNC(endRadioTransmission);
|
call FUNC(endRadioTransmission);
|
||||||
|
|
||||||
// Close map
|
// Close map
|
||||||
if (visibleMap && {!(player getVariable ["ACE_canSwitchUnits", false])}) then {openMap false};
|
if (visibleMap && {!(player getVariable ["ACE_canSwitchUnits", false])}) then {
|
||||||
|
openMap false;
|
||||||
|
};
|
||||||
|
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
createDialog QGVAR(DisableMouse_Dialog);
|
createDialog QGVAR(DisableMouse_Dialog);
|
||||||
@ -62,9 +66,22 @@ if (_state) then {
|
|||||||
_ctrl ctrlSetTooltip "Respawn.";
|
_ctrl ctrlSetTooltip "Respawn.";
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_key in actionKeys "TeamSwitch" && {teamSwitchEnabled}) then {(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; teamSwitch};//_acc = accTime; teamSwitch; setAccTime _acc};
|
if (_key in actionKeys "TeamSwitch" && {teamSwitchEnabled}) then {
|
||||||
if (_key in actionKeys "CuratorInterface" && {getAssignedCuratorLogic player in allCurators}) then {(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; openCuratorInterface};
|
(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0;
|
||||||
if (_key in actionKeys "ShowMap" && {player getVariable ["ACE_canSwitchUnits", false]}) then {(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; openMap true};
|
_acc = accTime;
|
||||||
|
teamSwitch;
|
||||||
|
setAccTime _acc;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_key in actionKeys "CuratorInterface" && {getAssignedCuratorLogic player in allCurators}) then {
|
||||||
|
(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0;
|
||||||
|
openCuratorInterface;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_key in actionKeys "ShowMap" && {player getVariable ["ACE_canSwitchUnits", false]}) then {
|
||||||
|
(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0;
|
||||||
|
openMap true;
|
||||||
|
};
|
||||||
|
|
||||||
if (serverCommandAvailable "#missions" || {player getVariable ["ACE_isUnconscious", false] && {(call FUNC(player)) getVariable [QEGVAR(medical,AllowChatWhileUnconscious), missionNamespace getVariable [QEGVAR(medical,AllowChatWhileUnconscious), false]]}}) then {
|
if (serverCommandAvailable "#missions" || {player getVariable ["ACE_isUnconscious", false] && {(call FUNC(player)) getVariable [QEGVAR(medical,AllowChatWhileUnconscious), missionNamespace getVariable [QEGVAR(medical,AllowChatWhileUnconscious), false]]}}) then {
|
||||||
if (!(_key in (actionKeys "DefaultAction" + actionKeys "Throw")) && {_key in (actionKeys "Chat" + actionKeys "PrevChannel" + actionKeys "NextChannel")}) then {
|
if (!(_key in (actionKeys "DefaultAction" + actionKeys "Throw")) && {_key in (actionKeys "Chat" + actionKeys "PrevChannel" + actionKeys "NextChannel")}) then {
|
||||||
@ -74,6 +91,7 @@ if (_state) then {
|
|||||||
|
|
||||||
_key > 0
|
_key > 0
|
||||||
}];
|
}];
|
||||||
|
|
||||||
_dlg displayAddEventHandler ["KeyUp", {true}];
|
_dlg displayAddEventHandler ["KeyUp", {true}];
|
||||||
|
|
||||||
["ACE_DisableUserInput", "onEachFrame", {
|
["ACE_DisableUserInput", "onEachFrame", {
|
||||||
@ -82,6 +100,7 @@ if (_state) then {
|
|||||||
[true] call FUNC(disableUserInput);
|
[true] call FUNC(disableUserInput);
|
||||||
};
|
};
|
||||||
}] call BIS_fnc_addStackedEventHandler;
|
}] call BIS_fnc_addStackedEventHandler;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ("ACE_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) then {
|
if ("ACE_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) then {
|
||||||
["ACE_DisableUserInput", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
["ACE_DisableUserInput", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
||||||
|
144
addons/common/functions/fnc_errorMessage.sqf
Normal file
144
addons/common/functions/fnc_errorMessage.sqf
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
/*
|
||||||
|
* Author: commy2, based on BIS_fnc_errorMsg and BIS_fnc_guiMessage by Karel Moricky (BI)
|
||||||
|
* Stops simulation and opens a textbox with error message.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* ?
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
disableSerialization;
|
||||||
|
endLoadingScreen;
|
||||||
|
|
||||||
|
private ["_textHeader", "_textMessage", "_onOK", "_onCancel"];
|
||||||
|
|
||||||
|
_textHeader = _this select 0;
|
||||||
|
_textMessage = _this select 1;
|
||||||
|
_onOK = ARR_SELECT(_this,2,{});
|
||||||
|
_onCancel = ARR_SELECT(_this,3,{});
|
||||||
|
|
||||||
|
if (typeName _textMessage == "STRING") then {
|
||||||
|
_textMessage = parseText _textMessage;
|
||||||
|
};
|
||||||
|
|
||||||
|
(ARR_SELECT(_this,4,call BIS_fnc_displayMission)) createDisplay "RscDisplayCommonMessagePause";
|
||||||
|
|
||||||
|
private ["_display", "_ctrlRscMessageBox", "_ctrlBcgCommonTop", "_ctrlBcgCommon", "_ctrlText", "_ctrlBackgroundButtonOK", "_ctrlBackgroundButtonMiddle", "_ctrlBackgroundButtonCancel", "_ctrlButtonOK", "_ctrlButtonCancel"];
|
||||||
|
|
||||||
|
_display = uiNamespace getVariable "RscDisplayCommonMessage_display";
|
||||||
|
_ctrlRscMessageBox = _display displayCtrl 2351;
|
||||||
|
_ctrlBcgCommonTop = _display displayCtrl 235100;
|
||||||
|
_ctrlBcgCommon = _display displayCtrl 235101;
|
||||||
|
_ctrlText = _display displayCtrl 235102;
|
||||||
|
_ctrlBackgroundButtonOK = _display displayCtrl 235103;
|
||||||
|
_ctrlBackgroundButtonMiddle = _display displayCtrl 235104;
|
||||||
|
_ctrlBackgroundButtonCancel = _display displayCtrl 235105;
|
||||||
|
_ctrlButtonOK = _display displayCtrl 235106;
|
||||||
|
_ctrlButtonCancel = _display displayCtrl 235107;
|
||||||
|
|
||||||
|
_ctrlBcgCommonTop ctrlSetText _textHeader;
|
||||||
|
|
||||||
|
private ["_ctrlButtonOKPos", "_ctrlBcgCommonPos", "_bottomSpaceY", "_ctrlTextPos", "_marginX", "_marginY"];
|
||||||
|
|
||||||
|
_ctrlButtonOKPos = ctrlPosition _ctrlButtonOK;
|
||||||
|
_ctrlBcgCommonPos = ctrlPosition _ctrlBcgCommon;
|
||||||
|
_bottomSpaceY = (_ctrlButtonOKPos select 1) - ((_ctrlBcgCommonPos select 1) + (_ctrlBcgCommonPos select 3));
|
||||||
|
|
||||||
|
_ctrlTextPos = ctrlPosition _ctrlText;
|
||||||
|
_marginX = (_ctrlTextPos select 0) - (_ctrlBcgCommonPos select 0);
|
||||||
|
_marginY = (_ctrlTextPos select 1) - (_ctrlBcgCommonPos select 1);
|
||||||
|
|
||||||
|
private ["_ctrlTextPosH", "_bottomPosY"];
|
||||||
|
|
||||||
|
_ctrlText ctrlSetStructuredText _textMessage;
|
||||||
|
_ctrlTextPosH = ctrlTextHeight _ctrlText;
|
||||||
|
|
||||||
|
_ctrlBcgCommon ctrlSetPosition [
|
||||||
|
_ctrlBcgCommonPos select 0,
|
||||||
|
_ctrlBcgCommonPos select 1,
|
||||||
|
_ctrlBcgCommonPos select 2,
|
||||||
|
_ctrlTextPosH + _marginY * 2
|
||||||
|
];
|
||||||
|
_ctrlBcgCommon ctrlCommit 0;
|
||||||
|
|
||||||
|
_ctrlText ctrlSetPosition [
|
||||||
|
(_ctrlBcgCommonPos select 0) + _marginX,
|
||||||
|
(_ctrlBcgCommonPos select 1) + _marginY,
|
||||||
|
(_ctrlBcgCommonPos select 2) - _marginX * 2,
|
||||||
|
_ctrlTextPosH
|
||||||
|
];
|
||||||
|
_ctrlText ctrlCommit 0;
|
||||||
|
|
||||||
|
_bottomPosY = (_ctrlBcgCommonPos select 1) + _ctrlTextPosH + (_marginY * 2) + _bottomSpaceY;
|
||||||
|
|
||||||
|
{
|
||||||
|
private "_xPos";
|
||||||
|
_xPos = ctrlPosition _x;
|
||||||
|
|
||||||
|
_xPos set [1, _bottomPosY];
|
||||||
|
_x ctrlSetPosition _xPos;
|
||||||
|
_x ctrlCommit 0;
|
||||||
|
} foreach [
|
||||||
|
_ctrlBackgroundButtonOK,
|
||||||
|
_ctrlBackgroundButtonMiddle,
|
||||||
|
_ctrlBackgroundButtonCancel,
|
||||||
|
_ctrlButtonOK,
|
||||||
|
_ctrlButtonCancel
|
||||||
|
];
|
||||||
|
|
||||||
|
private ["_ctrlRscMessageBoxPos", "_ctrlRscMessageBoxPosH"];
|
||||||
|
|
||||||
|
_ctrlRscMessageBoxPos = ctrlPosition _ctrlRscMessageBox;
|
||||||
|
_ctrlRscMessageBoxPosH = _bottomPosY + (_ctrlButtonOKPos select 3);
|
||||||
|
|
||||||
|
_ctrlRscMessageBox ctrlSetPosition [
|
||||||
|
0.5 - (_ctrlBcgCommonPos select 2) / 2,
|
||||||
|
0.5 - _ctrlRscMessageBoxPosH / 2,
|
||||||
|
(_ctrlBcgCommonPos select 2) + 0.5,
|
||||||
|
_ctrlRscMessageBoxPosH
|
||||||
|
];
|
||||||
|
|
||||||
|
_ctrlRscMessageBox ctrlEnable true;
|
||||||
|
_ctrlRscMessageBox ctrlCommit 0;
|
||||||
|
|
||||||
|
if (_onOK isEqualTo {}) then {
|
||||||
|
_ctrlButtonOK ctrlEnable false;
|
||||||
|
_ctrlButtonOK ctrlSetFade 0;
|
||||||
|
_ctrlButtonOK ctrlSetText "";
|
||||||
|
_ctrlButtonOK ctrlCommit 0;
|
||||||
|
} else {
|
||||||
|
_ctrlButtonOK ctrlEnable true;
|
||||||
|
_ctrlButtonOK ctrlSetFade 0;
|
||||||
|
_ctrlButtonOK ctrlSetText localize "STR_DISP_OK";
|
||||||
|
_ctrlButtonOK ctrlCommit 0;
|
||||||
|
|
||||||
|
ctrlSetFocus _ctrlButtonOK;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_onCancel isEqualTo {}) then {
|
||||||
|
_ctrlButtonCancel ctrlEnable false;
|
||||||
|
_ctrlButtonCancel ctrlSetFade 0;
|
||||||
|
_ctrlButtonCancel ctrlSetText "";
|
||||||
|
_ctrlButtonCancel ctrlCommit 0;
|
||||||
|
} else {
|
||||||
|
_ctrlButtonCancel ctrlEnable true;
|
||||||
|
_ctrlButtonCancel ctrlSetFade 0;
|
||||||
|
_ctrlButtonCancel ctrlSetText localize "STR_DISP_CANCEL";
|
||||||
|
_ctrlButtonCancel ctrlCommit 0;
|
||||||
|
|
||||||
|
ctrlSetFocus _ctrlButtonCancel;
|
||||||
|
};
|
||||||
|
|
||||||
|
_ctrlButtonOK ctrlAddEventHandler ["buttonClick", {(ctrlParent (_this select 0)) closeDisplay 1; true}];
|
||||||
|
_ctrlButtonCancel ctrlAddEventHandler ["buttonClick", {(ctrlParent (_this select 0)) closeDisplay 2; true}];
|
||||||
|
|
||||||
|
GVAR(errorOnOK) = _onOK;
|
||||||
|
GVAR(errorOnCancel) = _onCancel;
|
||||||
|
|
||||||
|
_display displayAddEventHandler ["unload", {call ([{}, GVAR(errorOnOK), GVAR(errorOnCancel)] select (_this select 1))}];
|
||||||
|
_display displayAddEventHandler ["keyDown", {_this select 1 == 1}];
|
@ -9,8 +9,6 @@ _isUnconscious = _this select 1;
|
|||||||
private "_player";
|
private "_player";
|
||||||
_player = ACE_player;
|
_player = ACE_player;
|
||||||
|
|
||||||
if ((_unit getHitPointDamage "HitLeftLeg") + (_unit getHitPointDamage "HitRightLeg") > 0.4) exitwith {};
|
|
||||||
|
|
||||||
if (_player getVariable [QGVAR(isDragging), false]) then {
|
if (_player getVariable [QGVAR(isDragging), false]) then {
|
||||||
|
|
||||||
private "_draggedObject";
|
private "_draggedObject";
|
||||||
@ -22,9 +20,9 @@ if (_player getVariable [QGVAR(isDragging), false]) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// handle waking up dragged unit
|
// handle waking up dragged unit
|
||||||
if (_unit == _draggedObject) then {
|
//if (_unit == _draggedObject) then {
|
||||||
[_player, _draggedObject] call FUNC(dropObject);
|
// [_player, _draggedObject] call FUNC(dropObject);
|
||||||
};
|
//};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -39,8 +37,8 @@ if (_player getVariable [QGVAR(isCarrying), false]) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// handle waking up dragged unit
|
// handle waking up dragged unit
|
||||||
if (_unit == _carriedObject) then {
|
//if (_unit == _carriedObject) then {
|
||||||
[_player, _carriedObject] call FUNC(dropObject_carry);
|
// [_player, _carriedObject] call FUNC(dropObject_carry);
|
||||||
};
|
//};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<English>Item too heavy</English>
|
<English>Item too heavy</English>
|
||||||
<German>Gegenstand ist zu schwer</German>
|
<German>Gegenstand ist zu schwer</German>
|
||||||
<Spanish>Articulo demasiado pesado</Spanish>
|
<Spanish>Articulo demasiado pesado</Spanish>
|
||||||
<Polish>Przedmiot zbyt ciężki</Polish>
|
<Polish>Przedmiot jest zbyt ciężki</Polish>
|
||||||
<French>Objet trop lourd</French>
|
<French>Objet trop lourd</French>
|
||||||
<Portuguese>Não é possível carregar o item devido a seu peso</Portuguese>
|
<Portuguese>Não é possível carregar o item devido a seu peso</Portuguese>
|
||||||
<Italian>Non è possibile trascinare l'oggetto a causa del suo peso</Italian>
|
<Italian>Non è possibile trascinare l'oggetto a causa del suo peso</Italian>
|
||||||
|
@ -233,7 +233,7 @@
|
|||||||
<English>Dial</English>
|
<English>Dial</English>
|
||||||
<German>Wählen</German>
|
<German>Wählen</German>
|
||||||
<Spanish>Marcar</Spanish>
|
<Spanish>Marcar</Spanish>
|
||||||
<Polish>Wybierz mumer</Polish>
|
<Polish>Wybierz numer</Polish>
|
||||||
<French>Composer</French>
|
<French>Composer</French>
|
||||||
<Czech>Vytočit</Czech>
|
<Czech>Vytočit</Czech>
|
||||||
<Italian>Composizione numero</Italian>
|
<Italian>Composizione numero</Italian>
|
||||||
@ -281,7 +281,7 @@
|
|||||||
<English>Detonate Menu</English>
|
<English>Detonate Menu</English>
|
||||||
<German>"Zünden"-Menü</German>
|
<German>"Zünden"-Menü</German>
|
||||||
<Spanish>Menú de detonación</Spanish>
|
<Spanish>Menú de detonación</Spanish>
|
||||||
<Polish>Menu detonowania</Polish>
|
<Polish>Menu detonacji</Polish>
|
||||||
<French>Menu de mise à feu</French>
|
<French>Menu de mise à feu</French>
|
||||||
<Czech>Menu Detonace</Czech>
|
<Czech>Menu Detonace</Czech>
|
||||||
<Italian>Menù di detonazione</Italian>
|
<Italian>Menù di detonazione</Italian>
|
||||||
@ -484,7 +484,7 @@
|
|||||||
<German>Zündet Sprengladungen wenn losgelassen.</German>
|
<German>Zündet Sprengladungen wenn losgelassen.</German>
|
||||||
<French>Déclenche la mise à feu d'un explosif lorsqu'il est libéré.</French>
|
<French>Déclenche la mise à feu d'un explosif lorsqu'il est libéré.</French>
|
||||||
<Czech>Používaný k vzdálenému odpálení, při uvolnění odpálí výbušniny</Czech>
|
<Czech>Používaný k vzdálenému odpálení, při uvolnění odpálí výbušniny</Czech>
|
||||||
<Polish>Używany w celu zdalnej detonacji ładunków kiedy jego operator zostanie zabity.</Polish>
|
<Polish>Używany w celu zdalnej detonacji ładunków, kiedy jego operator zostanie zabity.</Polish>
|
||||||
<Spanish>Utilizado para detonar explosivos remotamente al soltarlo.</Spanish>
|
<Spanish>Utilizado para detonar explosivos remotamente al soltarlo.</Spanish>
|
||||||
<Hungarian>Robbanóanyagok távoli robbantásához való, elengedéskor gyújt.</Hungarian>
|
<Hungarian>Robbanóanyagok távoli robbantásához való, elengedéskor gyújt.</Hungarian>
|
||||||
<Russian>Используется для дистанционного подрыва, после смерти оператора.</Russian>
|
<Russian>Используется для дистанционного подрыва, после смерти оператора.</Russian>
|
||||||
|
@ -20,3 +20,7 @@ class CfgPatches {
|
|||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
|
|
||||||
#include "CfgOptics.hpp"
|
#include "CfgOptics.hpp"
|
||||||
|
|
||||||
|
class ACE_Extensions {
|
||||||
|
extensions[] += {"ace_fcs"};
|
||||||
|
};
|
||||||
|
7
addons/interact_menu/CfgActions.hpp
Normal file
7
addons/interact_menu/CfgActions.hpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
class CfgActions {
|
||||||
|
class None;
|
||||||
|
class OpenBag: None {
|
||||||
|
showWindow = 0;
|
||||||
|
};
|
||||||
|
};
|
@ -14,6 +14,8 @@ class CfgPatches {
|
|||||||
|
|
||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
|
|
||||||
|
#include "CfgActions.hpp"
|
||||||
|
|
||||||
#include "CursorMenus.hpp"
|
#include "CursorMenus.hpp"
|
||||||
|
|
||||||
class ACE_Settings {
|
class ACE_Settings {
|
||||||
@ -23,6 +25,12 @@ class ACE_Settings {
|
|||||||
isClientSettable = 1;
|
isClientSettable = 1;
|
||||||
displayName = "$STR_ACE_Interact_Menu_AlwaysUseCursorSelfInteraction";
|
displayName = "$STR_ACE_Interact_Menu_AlwaysUseCursorSelfInteraction";
|
||||||
};
|
};
|
||||||
|
class GVAR(AlwaysUseCursorInteraction) {
|
||||||
|
value = 0;
|
||||||
|
typeName = "BOOL";
|
||||||
|
isClientSettable = 1;
|
||||||
|
displayName = "$STR_ACE_Interact_Menu_AlwaysUseCursorInteraction";
|
||||||
|
};
|
||||||
class GVAR(UseListMenu) {
|
class GVAR(UseListMenu) {
|
||||||
value = 0;
|
value = 0;
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
@ -30,3 +38,7 @@ class ACE_Settings {
|
|||||||
displayName = "$STR_ACE_Interact_Menu_UseListMenu";
|
displayName = "$STR_ACE_Interact_Menu_UseListMenu";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ACE_Extensions {
|
||||||
|
extensions[] += {"ace_breakLine"};
|
||||||
|
};
|
||||||
|
@ -33,7 +33,9 @@ GVAR(lastTimeSearchedActions) = -1000;
|
|||||||
|
|
||||||
GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) ||
|
GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) ||
|
||||||
visibleMap ||
|
visibleMap ||
|
||||||
{(_menuType == 1) && {(isWeaponDeployed ACE_player) || GVAR(AlwaysUseCursorSelfInteraction) || {cameraView == "GUNNER"}}};
|
{(_menuType == 1) && {(isWeaponDeployed ACE_player) || GVAR(AlwaysUseCursorSelfInteraction) || {cameraView == "GUNNER"}}} ||
|
||||||
|
{(_menuType == 0) && GVAR(AlwaysUseCursorInteraction)};
|
||||||
|
|
||||||
if (GVAR(useCursorMenu)) then {
|
if (GVAR(useCursorMenu)) then {
|
||||||
createDialog QGVAR(cursorMenu);
|
createDialog QGVAR(cursorMenu);
|
||||||
// The dialog sets:
|
// The dialog sets:
|
||||||
|
@ -12,6 +12,12 @@
|
|||||||
<Hungarian>Mindig legyen a saját cselekvés kurzorja látható</Hungarian>
|
<Hungarian>Mindig legyen a saját cselekvés kurzorja látható</Hungarian>
|
||||||
<Italian>Mostra sempre il cursore per le auto interazioni</Italian>
|
<Italian>Mostra sempre il cursore per le auto interazioni</Italian>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Interact_Menu_AlwaysUseCursorInteraction">
|
||||||
|
<English>Always display cursor for interaction</English>
|
||||||
|
<Spanish>Mostrar siempre el cursor para la interacción</Spanish>
|
||||||
|
<French>Toujours afficher le curseur pour les interactions</French>
|
||||||
|
<Italian>Mostra sempre il cursore per le interazioni</Italian>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Interact_Menu_UseListMenu">
|
<Key ID="STR_ACE_Interact_Menu_UseListMenu">
|
||||||
<English>Display interaction menus as lists</English>
|
<English>Display interaction menus as lists</English>
|
||||||
<Spanish>Mostrar los menus de interacción como listas</Spanish>
|
<Spanish>Mostrar los menus de interacción como listas</Spanish>
|
||||||
|
@ -24,6 +24,10 @@ _actionTrees = missionNamespace getVariable [_varName, []];
|
|||||||
|
|
||||||
_actions = [];
|
_actions = [];
|
||||||
// Mount unit MainActions menu
|
// Mount unit MainActions menu
|
||||||
_actions pushBack [(_actionTrees select 0) select 0, (_actionTrees select 0) select 1, _unit];
|
|
||||||
|
{
|
||||||
|
EXPLODE_2_PVT(_x,_actionData,_children);
|
||||||
|
_actions pushBack [_actionData, _children, _unit];
|
||||||
|
} forEach ((_actionTrees select 0) select 1);
|
||||||
|
|
||||||
_actions
|
_actions
|
||||||
|
@ -430,7 +430,7 @@
|
|||||||
<Spanish>Te tocaron el hombro DERECHO</Spanish>
|
<Spanish>Te tocaron el hombro DERECHO</Spanish>
|
||||||
<German>Dir wurde auf die rechte Schulter geklopft</German>
|
<German>Dir wurde auf die rechte Schulter geklopft</German>
|
||||||
<French>On te tape sur l'épaule droite</French>
|
<French>On te tape sur l'épaule droite</French>
|
||||||
<Polish>Zostałeś klepnięty po ramieniu</Polish>
|
<Polish>Zostałeś klepnięty w prawe ramię</Polish>
|
||||||
<Hungarian>Megveregették a JOBB válladat.</Hungarian>
|
<Hungarian>Megveregették a JOBB válladat.</Hungarian>
|
||||||
<Czech>Někdo tě poklepal na PRAVÉ rameno</Czech>
|
<Czech>Někdo tě poklepal na PRAVÉ rameno</Czech>
|
||||||
<Russian>Вас похлопали по ПРАВОМУ плечу</Russian>
|
<Russian>Вас похлопали по ПРАВОМУ плечу</Russian>
|
||||||
@ -442,7 +442,7 @@
|
|||||||
<Spanish>Te tocaron el hombro IZQUIERDO.</Spanish>
|
<Spanish>Te tocaron el hombro IZQUIERDO.</Spanish>
|
||||||
<German>Dir wurde auf die linke Schulter geklopft</German>
|
<German>Dir wurde auf die linke Schulter geklopft</German>
|
||||||
<French>On te tape sur l'épaule gauche</French>
|
<French>On te tape sur l'épaule gauche</French>
|
||||||
<Polish>Zostałeś klepnięty po ramieniu</Polish>
|
<Polish>Zostałeś klepnięty w lewe ramię</Polish>
|
||||||
<Hungarian>Megveregették a BAL válladat.</Hungarian>
|
<Hungarian>Megveregették a BAL válladat.</Hungarian>
|
||||||
<Czech>Někdo tě poklepal na LEVÉ rameno</Czech>
|
<Czech>Někdo tě poklepal na LEVÉ rameno</Czech>
|
||||||
<Russian>Вас похлопали по ЛЕВОМУ плечу</Russian>
|
<Russian>Вас похлопали по ЛЕВОМУ плечу</Russian>
|
||||||
|
@ -3,6 +3,7 @@ class ACE_Head {
|
|||||||
displayName = "$STR_ACE_Interaction_Head";
|
displayName = "$STR_ACE_Interaction_Head";
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
distance = MEDICAL_ACTION_DISTANCE;
|
distance = MEDICAL_ACTION_DISTANCE;
|
||||||
@ -74,6 +75,7 @@ class ACE_Torso {
|
|||||||
displayName = "$STR_ACE_Interaction_Torso";
|
displayName = "$STR_ACE_Interaction_Torso";
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
distance = MEDICAL_ACTION_DISTANCE;
|
distance = MEDICAL_ACTION_DISTANCE;
|
||||||
@ -173,6 +175,7 @@ class ACE_ArmLeft {
|
|||||||
displayName = "$STR_ACE_Interaction_ArmLeft";
|
displayName = "$STR_ACE_Interaction_ArmLeft";
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
distance = MEDICAL_ACTION_DISTANCE;
|
distance = MEDICAL_ACTION_DISTANCE;
|
||||||
@ -329,6 +332,7 @@ class ACE_ArmRight {
|
|||||||
displayName = "$STR_ACE_Interaction_ArmRight";
|
displayName = "$STR_ACE_Interaction_ArmRight";
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
distance = MEDICAL_ACTION_DISTANCE;
|
distance = MEDICAL_ACTION_DISTANCE;
|
||||||
@ -423,8 +427,8 @@ class ACE_ArmRight {
|
|||||||
};
|
};
|
||||||
class PlasmaIV: BloodIV {
|
class PlasmaIV: BloodIV {
|
||||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000";
|
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000";
|
||||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached));
|
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV')] call DFUNC(canTreatCached));
|
||||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment));
|
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV')] call DFUNC(treatment));
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
};
|
};
|
||||||
class PlasmaIV_500: PlasmaIV {
|
class PlasmaIV_500: PlasmaIV {
|
||||||
@ -482,6 +486,7 @@ class ACE_LegLeft {
|
|||||||
displayName = "$STR_ACE_Interaction_LegLeft";
|
displayName = "$STR_ACE_Interaction_LegLeft";
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
distance = MEDICAL_ACTION_DISTANCE;
|
distance = MEDICAL_ACTION_DISTANCE;
|
||||||
@ -578,8 +583,8 @@ class ACE_LegLeft {
|
|||||||
};
|
};
|
||||||
class PlasmaIV: BloodIV {
|
class PlasmaIV: BloodIV {
|
||||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000";
|
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000";
|
||||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached));
|
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV')] call DFUNC(canTreatCached));
|
||||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment));
|
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV')] call DFUNC(treatment));
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
};
|
};
|
||||||
class PlasmaIV_500: PlasmaIV {
|
class PlasmaIV_500: PlasmaIV {
|
||||||
@ -623,6 +628,7 @@ class ACE_LegRight {
|
|||||||
displayName = "$STR_ACE_Interaction_LegRight";
|
displayName = "$STR_ACE_Interaction_LegRight";
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
distance = MEDICAL_ACTION_DISTANCE;
|
distance = MEDICAL_ACTION_DISTANCE;
|
||||||
@ -718,8 +724,8 @@ class ACE_LegRight {
|
|||||||
};
|
};
|
||||||
class PlasmaIV: BloodIV {
|
class PlasmaIV: BloodIV {
|
||||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000";
|
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000";
|
||||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached));
|
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV')] call DFUNC(canTreatCached));
|
||||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment));
|
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV')] call DFUNC(treatment));
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
};
|
};
|
||||||
class PlasmaIV_500: PlasmaIV {
|
class PlasmaIV_500: PlasmaIV {
|
||||||
|
@ -4,6 +4,7 @@ class Medical {
|
|||||||
hotkey = "M";
|
hotkey = "M";
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
|
|
||||||
class ACE_Head {
|
class ACE_Head {
|
||||||
@ -11,6 +12,7 @@ class Medical {
|
|||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
|
|
||||||
class Bandage {
|
class Bandage {
|
||||||
@ -146,6 +148,7 @@ class Medical {
|
|||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
|
|
||||||
class Bandage {
|
class Bandage {
|
||||||
@ -246,6 +249,7 @@ class Medical {
|
|||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
|
|
||||||
class Bandage {
|
class Bandage {
|
||||||
@ -342,6 +346,7 @@ class Medical {
|
|||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
|
|
||||||
class Bandage {
|
class Bandage {
|
||||||
@ -427,6 +432,7 @@ class Medical {
|
|||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
|
||||||
|
condition = "true";
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
|
|
||||||
class Bandage {
|
class Bandage {
|
||||||
|
@ -135,4 +135,12 @@ class ACE_Settings {
|
|||||||
values[] = {"$STR_ACE_Medical_painEffect_Flash", "$STR_ACE_Medical_painEffect_Chroma"};
|
values[] = {"$STR_ACE_Medical_painEffect_Flash", "$STR_ACE_Medical_painEffect_Chroma"};
|
||||||
isClientSettable = 1;
|
isClientSettable = 1;
|
||||||
};
|
};
|
||||||
|
class GVAR(allowUnconsciousAnimationOnTreatment) {
|
||||||
|
typeName = "BOOL";
|
||||||
|
value = 0;
|
||||||
|
};
|
||||||
|
class GVAR(moveUnitsFromGroupOnUnconscious) {
|
||||||
|
typeName = "BOOL";
|
||||||
|
value = 0;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -241,7 +241,7 @@ if (USE_WOUND_EVENT_SYNC) then {
|
|||||||
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
|
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
|
||||||
{
|
{
|
||||||
[_x, _newPlayer] call FUNC(requestWoundSync);
|
[_x, _newPlayer] call FUNC(requestWoundSync);
|
||||||
}foreach units group player;
|
}foreach units group _newPlayer;
|
||||||
};
|
};
|
||||||
}] call EFUNC(common,addEventhandler);
|
}] call EFUNC(common,addEventhandler);
|
||||||
};
|
};
|
||||||
|
@ -96,6 +96,7 @@ PREP(moduleAssignMedicalFacility);
|
|||||||
PREP(moduleTreatmentConfiguration);
|
PREP(moduleTreatmentConfiguration);
|
||||||
PREP(copyDeadBody);
|
PREP(copyDeadBody);
|
||||||
PREP(requestWoundSync);
|
PREP(requestWoundSync);
|
||||||
|
PREP(unconsciousPFH);
|
||||||
|
|
||||||
// Networked litter
|
// Networked litter
|
||||||
PREP(createLitter);
|
PREP(createLitter);
|
||||||
|
@ -6,7 +6,6 @@ _unit = _this select 0;
|
|||||||
|
|
||||||
if !(local _unit) exitWith {};
|
if !(local _unit) exitWith {};
|
||||||
|
|
||||||
diag_log "running respawn";
|
|
||||||
[_unit] call FUNC(init);
|
[_unit] call FUNC(init);
|
||||||
|
|
||||||
//Reset captive status for respawning unit
|
//Reset captive status for respawning unit
|
||||||
|
@ -19,4 +19,4 @@
|
|||||||
#define MAX_DURATION_CACHE 2
|
#define MAX_DURATION_CACHE 2
|
||||||
|
|
||||||
// parameters, function, namespace, uid
|
// parameters, function, namespace, uid
|
||||||
[_this, DFUNC(canTreat), _this select 0, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE, "clearConditionCaches"] call EFUNC(common,cachedCall);
|
[_this, DFUNC(canTreat), _this select 1, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE, "clearConditionCaches"] call EFUNC(common,cachedCall);
|
||||||
|
@ -21,10 +21,10 @@ if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitwith { true };
|
|||||||
|
|
||||||
// Find the correct Damage threshold for unit.
|
// Find the correct Damage threshold for unit.
|
||||||
_damageThreshold = [1,1,1];
|
_damageThreshold = [1,1,1];
|
||||||
if (isPlayer _unit) then {
|
if ([_unit] call EFUNC(common,IsPlayer)) then {
|
||||||
//_damageThreshold =_unit getvariable[QGVAR(unitDamageThreshold), [GVAR(damageThreshold_Players), GVAR(damageThreshold_Players), GVAR(damageThreshold_Players) * 1.7]];
|
_damageThreshold =_unit getvariable[QGVAR(unitDamageThreshold), [GVAR(playerDamageThreshold), GVAR(playerDamageThreshold), GVAR(playerDamageThreshold) * 1.7]];
|
||||||
} else {
|
} else {
|
||||||
//_damageThreshold =_unit getvariable[QGVAR(unitDamageThreshold), [GVAR(damageThreshold_AI), GVAR(damageThreshold_AI), GVAR(damageThreshold_AI) * 1.7]];
|
_damageThreshold =_unit getvariable[QGVAR(unitDamageThreshold), [GVAR(AIDamageThreshold), GVAR(AIDamageThreshold), GVAR(AIDamageThreshold) * 1.7]];
|
||||||
};
|
};
|
||||||
|
|
||||||
_damageBodyPart = ((_unit getvariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage;
|
_damageBodyPart = ((_unit getvariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage;
|
||||||
|
@ -59,20 +59,30 @@ if (isClass (_config >> _className)) then {
|
|||||||
_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []];
|
_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []];
|
||||||
_exist = false;
|
_exist = false;
|
||||||
_injuryId = _injury select 0;
|
_injuryId = _injury select 0;
|
||||||
|
_bandagedInjury = [];
|
||||||
{
|
{
|
||||||
if ((_x select 0) == _injuryId) exitwith {
|
if ((_x select 0) == _injuryId) exitwith {
|
||||||
_exist = true;
|
_exist = true;
|
||||||
_existingInjury = _x;
|
_existingInjury = _x;
|
||||||
_existingInjury set [3, (_existingInjury select 3) + _impact];
|
_existingInjury set [3, (_existingInjury select 3) + _impact];
|
||||||
_bandagedWounds set [_foreachIndex, _existingInjury];
|
_bandagedWounds set [_foreachIndex, _existingInjury];
|
||||||
|
|
||||||
|
_bandagedInjury = _existingInjury;
|
||||||
};
|
};
|
||||||
}foreach _bandagedWounds;
|
}foreach _bandagedWounds;
|
||||||
|
|
||||||
if !(_exist) then {
|
if !(_exist) then {
|
||||||
// [ID, classID, bodypart, percentage treated, bloodloss rate]
|
// [ID, classID, bodypart, percentage treated, bloodloss rate]
|
||||||
_bandagedWounds pushback [_injuryId, _injury select 1, _injury select 2, _impact, _injury select 4];
|
_bandagedInjury = [_injuryId, _injury select 1, _injury select 2, _impact, _injury select 4];
|
||||||
|
_bandagedWounds pushback _bandagedInjury;
|
||||||
|
};
|
||||||
|
|
||||||
|
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, !USE_WOUND_EVENT_SYNC];
|
||||||
|
|
||||||
|
if (USE_WOUND_EVENT_SYNC) then {
|
||||||
|
// sync _bandagedInjury
|
||||||
|
|
||||||
};
|
};
|
||||||
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true];
|
|
||||||
|
|
||||||
// Check if we are ever going to reopen this
|
// Check if we are ever going to reopen this
|
||||||
if (random(1) <= _reopeningChance) then {
|
if (random(1) <= _reopeningChance) then {
|
||||||
@ -109,7 +119,7 @@ if (random(1) <= _reopeningChance) then {
|
|||||||
}foreach _bandagedWounds;
|
}foreach _bandagedWounds;
|
||||||
|
|
||||||
if (_exist) then {
|
if (_exist) then {
|
||||||
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true];
|
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, !USE_WOUND_EVENT_SYNC];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
// Otherwise something went wrong, we we don't reopen them..
|
// Otherwise something went wrong, we we don't reopen them..
|
||||||
|
@ -57,6 +57,12 @@ if (GVAR(level) >= 2) then {
|
|||||||
_minLethalDamage = GVAR(minLethalDamages) select _typeIndex;
|
_minLethalDamage = GVAR(minLethalDamages) select _typeIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isNull _source} && {_projectile == ""} && {_selection == ""}) then {
|
||||||
|
if (GVAR(enableVehicleCrashes)) then {
|
||||||
|
_selection = GVAR(SELECTIONS) select (floor(random(count GVAR(SELECTIONS))));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)} && {_selection in ["", "head", "body"]}) then {
|
if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)} && {_selection in ["", "head", "body"]}) then {
|
||||||
if ([_unit] call FUNC(setDead)) then {
|
if ([_unit] call FUNC(setDead)) then {
|
||||||
_damageReturn = 1;
|
_damageReturn = 1;
|
||||||
|
@ -33,10 +33,12 @@ if (isNull _sourceOfDamage && {_typeOfProjectile == ""} && {vehicle _unit == _un
|
|||||||
};
|
};
|
||||||
_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
|
_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
|
||||||
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||||
|
if (_part < 0) exitwith {};
|
||||||
|
|
||||||
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
||||||
// Sorting out the damage
|
// Sorting out the damage
|
||||||
_damageBodyParts = _unit getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
_damageBodyParts = _unit getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
||||||
|
|
||||||
_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage];
|
_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage];
|
||||||
_unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
_unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ if (_selectionName in _hitSelections) then {
|
|||||||
|
|
||||||
// Check for vehicle crash
|
// Check for vehicle crash
|
||||||
if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isNull _source} && {_projectile == ""} && {_selectionName == ""}) then {
|
if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isNull _source} && {_projectile == ""} && {_selectionName == ""}) then {
|
||||||
if (missionNamespace getvariable [QGVAR(allowVehicleCrashDamage), true]) then {
|
if (GVAR(enableVehicleCrashes)) then {
|
||||||
_selectionName = _hitSelections select (floor(random(count _hitSelections)));
|
_selectionName = _hitSelections select (floor(random(count _hitSelections)));
|
||||||
_projectile = "vehiclecrash";
|
_projectile = "vehiclecrash";
|
||||||
};
|
};
|
||||||
|
@ -133,7 +133,6 @@ if (count _woundsCreated > 0) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (USE_WOUND_EVENT_SYNC) then {
|
if (USE_WOUND_EVENT_SYNC) then {
|
||||||
// TODO Should this be done in a single broadcast?
|
|
||||||
// Broadcast the new injuries across the net in parts. One broadcast per injury. Prevents having to broadcast one massive array of injuries.
|
// Broadcast the new injuries across the net in parts. One broadcast per injury. Prevents having to broadcast one massive array of injuries.
|
||||||
{
|
{
|
||||||
["medical_propagateWound", [_unit, _x]] call EFUNC(common,globalEvent);
|
["medical_propagateWound", [_unit, _x]] call EFUNC(common,globalEvent);
|
||||||
|
@ -22,4 +22,14 @@ if (_local) then {
|
|||||||
if (_unit getvariable[QGVAR(addedToUnitLoop),false]) then {
|
if (_unit getvariable[QGVAR(addedToUnitLoop),false]) then {
|
||||||
[_unit, true] call FUNC(addToInjuredCollection);
|
[_unit, true] call FUNC(addToInjuredCollection);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ((_unit getvariable ["ACE_isUnconscious",false]) && {count (_unit getvariable [QGVAR(unconsciousArguments), []]) >= 7}) then {
|
||||||
|
private "_arguments";
|
||||||
|
_arguments = (_unit getvariable [QGVAR(unconsciousArguments), []]);
|
||||||
|
_arguments set [ 3, time];
|
||||||
|
|
||||||
|
[DFUNC(unconsciousPFH), 0.1, _arguments ] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
_unit setvariable [QGVAR(unconsciousArguments), nil, true];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -94,7 +94,7 @@ if (GVAR(level) >= 2) then {
|
|||||||
if ([_unit] call EFUNC(common,isAwake)) then {
|
if ([_unit] call EFUNC(common,isAwake)) then {
|
||||||
if (_bloodVolume < 60) then {
|
if (_bloodVolume < 60) then {
|
||||||
if (random(1) > 0.9) then {
|
if (random(1) > 0.9) then {
|
||||||
[_unit] call FUNC(setUnconscious);
|
[_unit, true, 15 + random(20)] call FUNC(setUnconscious);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -136,7 +136,7 @@ if (GVAR(level) >= 2) then {
|
|||||||
|
|
||||||
if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then {
|
if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then {
|
||||||
if (_heartRate < 10 || _bloodPressureH < 30 || _bloodVolume < 20) then {
|
if (_heartRate < 10 || _bloodPressureH < 30 || _bloodVolume < 20) then {
|
||||||
[_unit] call FUNC(setUnconscious); // safety check to ensure unconsciousness for units if they are not dead already.
|
[_unit, true, 10+ random(20)] call FUNC(setUnconscious); // safety check to ensure unconsciousness for units if they are not dead already.
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_bloodPressureH > 260) then {
|
if (_bloodPressureH > 260) then {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_allUsedMedication", "_logs"];
|
private ["_unit", "_allUsedMedication", "_logs", "_forceNew"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
|
||||||
@ -28,6 +28,7 @@ _unit setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
|
|||||||
_unit setvariable [QGVAR(openWounds), [], true];
|
_unit setvariable [QGVAR(openWounds), [], true];
|
||||||
_unit setvariable [QGVAR(bandagedWounds), [], true];
|
_unit setvariable [QGVAR(bandagedWounds), [], true];
|
||||||
_unit setVariable [QGVAR(internalWounds), [], true];
|
_unit setVariable [QGVAR(internalWounds), [], true];
|
||||||
|
_unit setvariable [QGVAR(lastUniqueWoundID), 1, true];
|
||||||
|
|
||||||
// vitals
|
// vitals
|
||||||
_unit setVariable [QGVAR(heartRate), 80];
|
_unit setVariable [QGVAR(heartRate), 80];
|
||||||
@ -36,24 +37,24 @@ _unit setvariable [QGVAR(bloodPressure), [80, 120]];
|
|||||||
_unit setVariable [QGVAR(peripheralResistance), 100];
|
_unit setVariable [QGVAR(peripheralResistance), 100];
|
||||||
|
|
||||||
// fractures
|
// fractures
|
||||||
_unit setVariable [QGVAR(fractures), []];
|
_unit setVariable [QGVAR(fractures), [], true];
|
||||||
|
|
||||||
// triage card and logs
|
// triage card and logs
|
||||||
_unit setvariable [QGVAR(triageLevel), 0, true];
|
_unit setvariable [QGVAR(triageLevel), 0, true];
|
||||||
_unit setvariable [QGVAR(triageCard), [], true];
|
_unit setvariable [QGVAR(triageCard), [], true];
|
||||||
|
|
||||||
// IVs
|
// IVs
|
||||||
_unit setVariable [QGVAR(salineIVVolume), 0];
|
_unit setVariable [QGVAR(salineIVVolume), 0, true];
|
||||||
_unit setVariable [QGVAR(plasmaIVVolume), 0];
|
_unit setVariable [QGVAR(plasmaIVVolume), 0, true];
|
||||||
_unit setVariable [QGVAR(bloodIVVolume), 0];
|
_unit setVariable [QGVAR(bloodIVVolume), 0, true];
|
||||||
|
|
||||||
// damage storage
|
// damage storage
|
||||||
_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
|
_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
|
||||||
|
|
||||||
// airway
|
// airway
|
||||||
_unit setvariable [QGVAR(airwayStatus), 100, true];
|
_unit setvariable [QGVAR(airwayStatus), 100];
|
||||||
_unit setVariable [QGVAR(airwayOccluded), false, true];
|
_unit setVariable [QGVAR(airwayOccluded), false];
|
||||||
_unit setvariable [QGVAR(airwayCollapsed), false, true];
|
_unit setvariable [QGVAR(airwayCollapsed), false];
|
||||||
|
|
||||||
// generic medical admin
|
// generic medical admin
|
||||||
_unit setvariable [QGVAR(addedToUnitLoop), false, true];
|
_unit setvariable [QGVAR(addedToUnitLoop), false, true];
|
||||||
@ -69,11 +70,11 @@ _allUsedMedication = _unit getVariable [QGVAR(allUsedMedication), []];
|
|||||||
{
|
{
|
||||||
_unit setvariable [_x select 0, nil];
|
_unit setvariable [_x select 0, nil];
|
||||||
} foreach _allUsedMedication;
|
} foreach _allUsedMedication;
|
||||||
_unit setVariable [QGVAR(allUsedMedication), []];
|
_unit setVariable [QGVAR(allUsedMedication), [], true];
|
||||||
|
|
||||||
_logs = _unit getvariable [QGVAR(allLogs), []];
|
_logs = _unit getvariable [QGVAR(allLogs), []];
|
||||||
{
|
{
|
||||||
_unit setvariable [_x, nil, true];
|
_unit setvariable [_x, nil];
|
||||||
} foreach _logs;
|
} foreach _logs;
|
||||||
_unit setvariable [QGVAR(allLogs), [], true];
|
_unit setvariable [QGVAR(allLogs), [], true];
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Glowbal
|
* Author: Glowbal
|
||||||
* Enabled the vitals loop for a unit.
|
* Handles an wound update request.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The Unit <OBJECT>
|
* 0: The Unit <OBJECT>
|
||||||
* 1: the last known ID <NUMBER>
|
* 1: Origin object <OBJECT>
|
||||||
* 2: Origin object <OBJECT>
|
|
||||||
*
|
*
|
||||||
* ReturnValue:
|
* ReturnValue:
|
||||||
* <NIL>
|
* <NIL>
|
||||||
@ -14,12 +13,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit", "_lastId", "_openWounds"];
|
private ["_unit", "_openWounds"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_lastId = _this select 1;
|
_originOfrequest = _this select 1;
|
||||||
_originOfrequest = _this select 2;
|
|
||||||
|
|
||||||
if (local _unit) then {
|
if (local _unit && !(local _originOfrequest)) then {
|
||||||
_openWounds = _unit getvariable [QGVAR(openWounds), []];
|
_openWounds = _unit getvariable [QGVAR(openWounds), []];
|
||||||
{
|
{
|
||||||
["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent);
|
["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent);
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private [ "_target", "_caller", "_openWounds","_lastId"];
|
private [ "_target", "_caller", "_openWounds"];
|
||||||
_target = _this select 0;
|
_target = _this select 0;
|
||||||
_caller = _this select 1;
|
_caller = _this select 1;
|
||||||
|
|
||||||
if (local _target || GVAR(level) < 2) exitwith {}; // if the target is local, we already got the most update to date information
|
if (local _target || GVAR(level) < 2) exitwith {}; // if the target is local, we already got the most update to date information
|
||||||
if (_target getvariable [QGVAR(isWoundSynced), false]) exitwith {};
|
if (_target getvariable [QGVAR(isWoundSynced), false]) exitwith {};
|
||||||
_target setvariable [QGVAR(isWoundSynced), true];
|
_target setvariable [QGVAR(isWoundSynced), true];
|
||||||
["medical_woundUpdateRequest", [_target], [_target, _lastId, _caller]] call EFUNC(common,targetEvent);
|
["medical_woundUpdateRequest", [_target], [_target, _caller]] call EFUNC(common,targetEvent);
|
||||||
|
@ -23,7 +23,7 @@ _set = if (count _this > 1) then {_this select 1} else {true};
|
|||||||
_minWaitingTime = if (count _this > 2) then {_this select 2} else {DEFAULT_DELAY};
|
_minWaitingTime = if (count _this > 2) then {_this select 2} else {DEFAULT_DELAY};
|
||||||
|
|
||||||
if !(_set) exitwith {
|
if !(_set) exitwith {
|
||||||
_unit setvariable ["ACE_isUnconscious", false,true];
|
_unit setvariable ["ACE_isUnconscious", false, true];
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(!(isNull _unit) && {(_unit isKindOf "CaManBase") && ([_unit] call EFUNC(common,isAwake))}) exitwith{};
|
if !(!(isNull _unit) && {(_unit isKindOf "CaManBase") && ([_unit] call EFUNC(common,isAwake))}) exitwith{};
|
||||||
@ -37,7 +37,14 @@ _unit setUnconscious true;
|
|||||||
|
|
||||||
if (_unit == ACE_player) then {
|
if (_unit == ACE_player) then {
|
||||||
if (visibleMap) then {openMap false};
|
if (visibleMap) then {openMap false};
|
||||||
|
while {dialog} do {
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// if we have unconsciousness for AI disabled, we will kill the unit instead
|
||||||
|
if (!([_unit] call EFUNC(common,IsPlayer)) && (GVAR(enableUnsconsiousnessAI) == 0 || (GVAR(enableUnsconsiousnessAI) == 2 && random(1) <= 0.5))) exitwith {
|
||||||
|
[_unit, true] call FUNC(setDead); // force, to avoid getting into a loop in case revive is enabled.
|
||||||
};
|
};
|
||||||
|
|
||||||
// If a unit has the launcher out, it will sometimes start selecting the primairy weapon while unconscious,
|
// If a unit has the launcher out, it will sometimes start selecting the primairy weapon while unconscious,
|
||||||
@ -68,73 +75,15 @@ _unit setUnitPos "DOWN";
|
|||||||
|
|
||||||
// So the AI does not get stuck, we are moving the unit to a temp group on its own.
|
// So the AI does not get stuck, we are moving the unit to a temp group on its own.
|
||||||
//Unconscious units shouldn't be put in another group #527:
|
//Unconscious units shouldn't be put in another group #527:
|
||||||
// [_unit, true, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
|
||||||
|
[_unit, true, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
||||||
|
};
|
||||||
|
|
||||||
[_unit, QGVAR(unconscious), true] call EFUNC(common,setCaptivityStatus);
|
[_unit, QGVAR(unconscious), true] call EFUNC(common,setCaptivityStatus);
|
||||||
[_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation);
|
[_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation);
|
||||||
|
|
||||||
_startingTime = time;
|
_startingTime = time;
|
||||||
|
|
||||||
[{
|
[DFUNC(unconsciousPFH), 0.1, [_unit,_animState, _originalPos, _startingTime, _minWaitingTime, false, vehicle _unit isKindOf "ParachuteBase"] ] call CBA_fnc_addPerFrameHandler;
|
||||||
private ["_unit", "_vehicleOfUnit","_minWaitingTime", "_oldAnimation", "_captiveSwitch", "_hasMovedOut"];
|
|
||||||
_args = _this select 0;
|
|
||||||
_unit = _args select 0;
|
|
||||||
_oldAnimation = _args select 1;
|
|
||||||
_originalPos = _args select 2;
|
|
||||||
_startingTime = _args select 3;
|
|
||||||
_minWaitingTime = _args select 4;
|
|
||||||
_hasMovedOut = _args select 5;
|
|
||||||
|
|
||||||
if (!alive _unit) exitwith {
|
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
|
||||||
};
|
|
||||||
|
|
||||||
// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation
|
|
||||||
if !(_unit getvariable ["ACE_isUnconscious",false]) exitwith {
|
|
||||||
|
|
||||||
// TODO, handle this with carry instead, so we can remove the PFH here.
|
|
||||||
// Wait until the unit isn't being carried anymore, so we won't end up with wierd animations
|
|
||||||
if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then {
|
|
||||||
if (vehicle _unit == _unit) then {
|
|
||||||
if (animationState _unit == "AinjPpneMstpSnonWrflDnon") then {
|
|
||||||
[_unit,"AinjPpneMstpSnonWrflDnon_rolltofront", 2] call EFUNC(common,doAnimation);
|
|
||||||
[_unit,"amovppnemstpsnonwnondnon", 1] call EFUNC(common,doAnimation);
|
|
||||||
} else {
|
|
||||||
[_unit,"amovppnemstpsnonwnondnon", 2] call EFUNC(common,doAnimation);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
// Switch to the units original animation, assuming
|
|
||||||
// TODO: what if the unit switched vehicle?
|
|
||||||
[_unit, _oldAnimation, 2] call EFUNC(common,doAnimation);
|
|
||||||
};
|
|
||||||
// EXIT PFH
|
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
|
||||||
};
|
|
||||||
if (!_hasMovedOut) then {
|
|
||||||
// Reset the unit back to the previous captive state.
|
|
||||||
[_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus);
|
|
||||||
|
|
||||||
// Swhich the unit back to its original group
|
|
||||||
//Unconscious units shouldn't be put in another group #527:
|
|
||||||
// [_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
|
||||||
|
|
||||||
[_unit, false] call EFUNC(common,disableAI);
|
|
||||||
_unit setUnitPos _originalPos; // This is not position but stance (DOWN, MIDDLE, UP)
|
|
||||||
|
|
||||||
_unit setUnconscious false;
|
|
||||||
["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent);
|
|
||||||
// ensure this statement runs only once
|
|
||||||
_args set [5, true];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs
|
|
||||||
if ((time - _startingTime) >= _minWaitingTime) exitwith {
|
|
||||||
|
|
||||||
if (!([_unit] call FUNC(getUnconsciousCondition))) then {
|
|
||||||
_unit setvariable ["ACE_isUnconscious", false, true];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}, 0.1, [_unit,_animState, _originalPos, _startingTime, _minWaitingTime, false] ] call CBA_fnc_addPerFrameHandler;
|
|
||||||
|
|
||||||
["medical_onUnconscious", [_unit, true]] call EFUNC(common,globalEvent);
|
["medical_onUnconscious", [_unit, true]] call EFUNC(common,globalEvent);
|
||||||
|
@ -129,7 +129,7 @@ if (isNil _callbackProgress) then {
|
|||||||
|
|
||||||
// Patient Animation
|
// Patient Animation
|
||||||
_patientAnim = getText (_config >> "animationPatient");
|
_patientAnim = getText (_config >> "animationPatient");
|
||||||
if (_target getvariable ["ACE_isUnconscious", false]) then {
|
if (_target getvariable ["ACE_isUnconscious", false] && GVAR(allowUnconsciousAnimationOnTreatment)) then {
|
||||||
if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then {
|
if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then {
|
||||||
_patientAnim = getText (_config >> "animationPatientUnconscious");
|
_patientAnim = getText (_config >> "animationPatientUnconscious");
|
||||||
};
|
};
|
||||||
@ -149,6 +149,8 @@ if (_caller == _target) then {
|
|||||||
_callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE");
|
_callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_caller setvariable [QGVAR(selectedWeaponOnTreatment), currentWeapon _caller];
|
||||||
|
|
||||||
// Cannot use secondairy weapon for animation
|
// Cannot use secondairy weapon for animation
|
||||||
if (currentWeapon _caller == secondaryWeapon _caller) then {
|
if (currentWeapon _caller == secondaryWeapon _caller) then {
|
||||||
_caller selectWeapon (primaryWeapon _caller);
|
_caller selectWeapon (primaryWeapon _caller);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_target", "_bandage", "_part", "_selectionName", "_openWounds", "_config", "_effectiveness","_mostEffectiveInjury", "_mostEffectiveSpot", "_woundEffectivenss", "_mostEffectiveInjury", "_impact", "_exit"];
|
private ["_target", "_bandage", "_part", "_selectionName", "_openWounds", "_config", "_effectiveness","_mostEffectiveInjury", "_mostEffectiveSpot", "_woundEffectivenss", "_mostEffectiveInjury", "_impact", "_exit", "_specificClass", "_classID", "_effectivenessFound"];
|
||||||
_target = _this select 0;
|
_target = _this select 0;
|
||||||
_bandage = _this select 1;
|
_bandage = _this select 1;
|
||||||
_selectionName = _this select 2;
|
_selectionName = _this select 2;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target","_selectionName","_className","_config","_callback", "_usersOfItems"];
|
private ["_caller", "_target","_selectionName","_className","_config","_callback", "_usersOfItems", "_weaponSelect"];
|
||||||
|
|
||||||
_args = _this select 0;
|
_args = _this select 0;
|
||||||
_caller = _args select 0;
|
_caller = _args select 0;
|
||||||
@ -34,6 +34,13 @@ if (vehicle _caller == _caller) then {
|
|||||||
};
|
};
|
||||||
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
|
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
|
||||||
|
|
||||||
|
_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), ""]);
|
||||||
|
if (_weaponSelect != "") then {
|
||||||
|
_caller selectWeapon _weaponSelect;
|
||||||
|
} else {
|
||||||
|
_caller action ["SwitchWeapon", _caller, _caller, 99];
|
||||||
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
(_x select 0) addItem (_x select 1);
|
(_x select 0) addItem (_x select 1);
|
||||||
}foreach _usersOfItems;
|
}foreach _usersOfItems;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target","_selectionName","_className","_config","_callback"];
|
private ["_caller", "_target","_selectionName","_className","_config","_callback", "_weaponSelect"];
|
||||||
_args = _this select 0;
|
_args = _this select 0;
|
||||||
_caller = _args select 0;
|
_caller = _args select 0;
|
||||||
_target = _args select 1;
|
_target = _args select 1;
|
||||||
@ -32,6 +32,13 @@ if (vehicle _caller == _caller) then {
|
|||||||
};
|
};
|
||||||
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
|
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
|
||||||
|
|
||||||
|
_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), ""]);
|
||||||
|
if (_weaponSelect != "") then {
|
||||||
|
_caller selectWeapon _weaponSelect;
|
||||||
|
} else {
|
||||||
|
_caller action ["SwitchWeapon", _caller, _caller, 99];
|
||||||
|
};
|
||||||
|
|
||||||
// Record specific callback
|
// Record specific callback
|
||||||
_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
|
_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
|
||||||
if (GVAR(level) >= 2) then {
|
if (GVAR(level) >= 2) then {
|
||||||
|
97
addons/medical/functions/fnc_unconsciousPFH.sqf
Normal file
97
addons/medical/functions/fnc_unconsciousPFH.sqf
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
* Author: Glowbal
|
||||||
|
* PFH logic for unconscious state
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: The unit that will be put in an unconscious state <OBJECT>
|
||||||
|
*
|
||||||
|
* ReturnValue:
|
||||||
|
* nil
|
||||||
|
*
|
||||||
|
* Public: yes
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_unit", "_vehicleOfUnit","_minWaitingTime", "_oldAnimation", "_captiveSwitch", "_hasMovedOut", "_parachuteCheck"];
|
||||||
|
_args = _this select 0;
|
||||||
|
_unit = _args select 0;
|
||||||
|
_oldAnimation = _args select 1;
|
||||||
|
_originalPos = _args select 2;
|
||||||
|
_startingTime = _args select 3;
|
||||||
|
_minWaitingTime = _args select 4;
|
||||||
|
_hasMovedOut = _args select 5;
|
||||||
|
_parachuteCheck = _args select 6;
|
||||||
|
|
||||||
|
if (!alive _unit) exitwith {
|
||||||
|
if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
|
||||||
|
[_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
||||||
|
};
|
||||||
|
[_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus);
|
||||||
|
[_unit, false] call EFUNC(common,disableAI);
|
||||||
|
//_unit setUnitPos _originalPos;
|
||||||
|
_unit setUnconscious false;
|
||||||
|
["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent);
|
||||||
|
|
||||||
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
|
};
|
||||||
|
|
||||||
|
// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation
|
||||||
|
if !(_unit getvariable ["ACE_isUnconscious",false]) exitwith {
|
||||||
|
// TODO, handle this with carry instead, so we can remove the PFH here.
|
||||||
|
// Wait until the unit isn't being carried anymore, so we won't end up with wierd animations
|
||||||
|
if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then {
|
||||||
|
if (vehicle _unit == _unit) then {
|
||||||
|
if (animationState _unit == "AinjPpneMstpSnonWrflDnon") then {
|
||||||
|
[_unit,"AinjPpneMstpSnonWrflDnon_rolltofront", 2] call EFUNC(common,doAnimation);
|
||||||
|
[_unit,"amovppnemstpsnonwnondnon", 1] call EFUNC(common,doAnimation);
|
||||||
|
} else {
|
||||||
|
[_unit,"amovppnemstpsnonwnondnon", 2] call EFUNC(common,doAnimation);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// Switch to the units original animation, assuming
|
||||||
|
// TODO: what if the unit switched vehicle?
|
||||||
|
[_unit, _oldAnimation, 2] call EFUNC(common,doAnimation);
|
||||||
|
};
|
||||||
|
["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent);
|
||||||
|
// EXIT PFH
|
||||||
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
|
};
|
||||||
|
if (!_hasMovedOut) then {
|
||||||
|
// Reset the unit back to the previous captive state.
|
||||||
|
[_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus);
|
||||||
|
|
||||||
|
// Swhich the unit back to its original group
|
||||||
|
//Unconscious units shouldn't be put in another group #527:
|
||||||
|
if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
|
||||||
|
[_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
||||||
|
};
|
||||||
|
[_unit, false] call EFUNC(common,disableAI);
|
||||||
|
_unit setUnitPos _originalPos; // This is not position but stance (DOWN, MIDDLE, UP)
|
||||||
|
|
||||||
|
_unit setUnconscious false;
|
||||||
|
|
||||||
|
// ensure this statement runs only once
|
||||||
|
_args set [5, true];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_parachuteCheck) then {
|
||||||
|
if !(vehicle _unit isKindOf "ParachuteBase") then {
|
||||||
|
[_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation);
|
||||||
|
_args set [6, false];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!local _unit) exitwith {
|
||||||
|
_args set [ 4, _minWaitingTime - (time - _startingTime)];
|
||||||
|
_unit setvariable [QGVAR(unconsciousArguments), _args, true];
|
||||||
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs
|
||||||
|
if ((time - _startingTime) >= _minWaitingTime) exitwith {
|
||||||
|
if (!([_unit] call FUNC(getUnconsciousCondition))) then {
|
||||||
|
_unit setvariable ["ACE_isUnconscious", false, true];
|
||||||
|
};
|
||||||
|
};
|
@ -49,11 +49,11 @@ if (GVAR(currentApplicationPage) == 1) then {
|
|||||||
|
|
||||||
} else { //Map Mode:
|
} else { //Map Mode:
|
||||||
if (GVAR(mapAutoTrackPosition)) then {
|
if (GVAR(mapAutoTrackPosition)) then {
|
||||||
_theMap ctrlMapAnimAdd [0, (GVAR(mapZoom)/_mapSize), GVAR(gpsPositionASL)];
|
_theMap ctrlMapAnimAdd [0, (GVAR(mapZoom)/_mapSize), (getPosASL ace_player)];
|
||||||
ctrlMapAnimCommit _theMap;
|
ctrlMapAnimCommit _theMap;
|
||||||
};
|
};
|
||||||
_size = 48 * _mapSize;
|
_size = 48 * _mapSize;
|
||||||
_theMap drawIcon [QUOTE(PATHTO_R(images\icon_self.paa)), [0.533,0.769,0.76,0.75], GVAR(gpsPositionASL), _size, _size, (getDir ace_player), '', 0 ];
|
_theMap drawIcon [QUOTE(PATHTO_R(images\icon_self.paa)), [0.533,0.769,0.76,0.75], (getPosASL ace_player), _size, _size, (getDir ace_player), '', 0 ];
|
||||||
|
|
||||||
if (GVAR(settingShowAllWaypointsOnMap)) then {
|
if (GVAR(settingShowAllWaypointsOnMap)) then {
|
||||||
_size = 32 * _mapSize;
|
_size = 32 * _mapSize;
|
||||||
|
@ -83,7 +83,6 @@ if ((_oldShowMode == DISPLAY_MODE_CLOSED) && {GVAR(currentShowMode) != DISPLAY_M
|
|||||||
};
|
};
|
||||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||||
} else {
|
} else {
|
||||||
GVAR(gpsPositionASL) = getPosAsl ace_player;
|
|
||||||
if (GVAR(currentShowMode) == DISPLAY_MODE_HIDDEN) then {
|
if (GVAR(currentShowMode) == DISPLAY_MODE_HIDDEN) then {
|
||||||
//If display is hidden, and we can show, then swithc modes:
|
//If display is hidden, and we can show, then swithc modes:
|
||||||
if ([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) then {
|
if ([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) then {
|
||||||
|
@ -44,7 +44,7 @@ case (APP_MODE_INFODISPLAY): {
|
|||||||
(_display displayCtrl IDC_MODEDISPLAY_NORTHING) ctrlSetText _northingText;
|
(_display displayCtrl IDC_MODEDISPLAY_NORTHING) ctrlSetText _northingText;
|
||||||
|
|
||||||
//Elevation:
|
//Elevation:
|
||||||
_numASL = (GVAR(gpsPositionASL) select 2) + GVAR(mapAltitude);
|
_numASL = ((getPosASL ace_player) select 2) + GVAR(mapAltitude);
|
||||||
_aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber;
|
_aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber;
|
||||||
_aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"};
|
_aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"};
|
||||||
(_display displayCtrl IDC_MODEDISPLAY_ELEVATIONNUM) ctrlSetText _aboveSeaLevelText;
|
(_display displayCtrl IDC_MODEDISPLAY_ELEVATIONNUM) ctrlSetText _aboveSeaLevelText;
|
||||||
@ -88,13 +88,13 @@ case (APP_MODE_INFODISPLAY): {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!(_targetPosLocationASL isEqualTo [])) then {
|
if (!(_targetPosLocationASL isEqualTo [])) then {
|
||||||
_bearing = [GVAR(gpsPositionASL), _targetPosLocationASL] call BIS_fnc_dirTo;
|
_bearing = [(getPosASL ace_player), _targetPosLocationASL] call BIS_fnc_dirTo;
|
||||||
_bearingText = if (GVAR(settingUseMils)) then {
|
_bearingText = if (GVAR(settingUseMils)) then {
|
||||||
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
|
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
|
||||||
} else {
|
} else {
|
||||||
([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||||
};
|
};
|
||||||
_2dDistanceKm = ((GVAR(gpsPositionASL) select [0,2]) distance (_targetPosLocationASL select [0,2])) / 1000;
|
_2dDistanceKm = (((getPosASL ace_player) select [0,2]) distance (_targetPosLocationASL select [0,2])) / 1000;
|
||||||
_rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)];
|
_rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)];
|
||||||
_numASL = (_targetPosLocationASL select 2) + GVAR(mapAltitude);
|
_numASL = (_targetPosLocationASL select 2) + GVAR(mapAltitude);
|
||||||
_aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber;
|
_aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber;
|
||||||
@ -125,7 +125,7 @@ case (APP_MODE_COMPASS): {
|
|||||||
(_display displayCtrl IDC_MODECOMPASS_RANGE) ctrlSetText "";
|
(_display displayCtrl IDC_MODECOMPASS_RANGE) ctrlSetText "";
|
||||||
(_display displayCtrl IDC_MODECOMPASS_TARGET) ctrlSetText "";
|
(_display displayCtrl IDC_MODECOMPASS_TARGET) ctrlSetText "";
|
||||||
} else {
|
} else {
|
||||||
_playerPos2d = GVAR(gpsPositionASL) select [0,2];
|
_playerPos2d = (getPosASL ace_player) select [0,2];
|
||||||
|
|
||||||
_targetPosName = "";
|
_targetPosName = "";
|
||||||
_targetPosLocationASL = [];
|
_targetPosLocationASL = [];
|
||||||
@ -145,13 +145,13 @@ case (APP_MODE_COMPASS): {
|
|||||||
_rangeText = "---";
|
_rangeText = "---";
|
||||||
|
|
||||||
if (!(_targetPosLocationASL isEqualTo [])) then {
|
if (!(_targetPosLocationASL isEqualTo [])) then {
|
||||||
_bearing = [GVAR(gpsPositionASL), _targetPosLocationASL] call BIS_fnc_dirTo;
|
_bearing = [(getPosASL ace_player), _targetPosLocationASL] call BIS_fnc_dirTo;
|
||||||
_bearingText = if (GVAR(settingUseMils)) then {
|
_bearingText = if (GVAR(settingUseMils)) then {
|
||||||
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
|
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
|
||||||
} else {
|
} else {
|
||||||
([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||||
};
|
};
|
||||||
_2dDistanceKm = ((GVAR(gpsPositionASL) select [0,2]) distance (_targetPosLocationASL select [0,2])) / 1000;
|
_2dDistanceKm = (((getPosASL ace_player) select [0,2]) distance (_targetPosLocationASL select [0,2])) / 1000;
|
||||||
_rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)];
|
_rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ case (APP_MODE_WAYPOINTS): {
|
|||||||
{
|
{
|
||||||
EXPLODE_2_PVT(_x,_wpName,_wpPos);
|
EXPLODE_2_PVT(_x,_wpName,_wpPos);
|
||||||
_wpListBox lbAdd _wpName;
|
_wpListBox lbAdd _wpName;
|
||||||
_2dDistanceKm = ((GVAR(gpsPositionASL) select [0,2]) distance (_wpPos select [0,2])) / 1000;
|
_2dDistanceKm = (((getPosASL ace_player) select [0,2]) distance (_wpPos select [0,2])) / 1000;
|
||||||
_wpListBox lbSetTextRight [_forEachIndex, (format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)])];
|
_wpListBox lbSetTextRight [_forEachIndex, (format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)])];
|
||||||
} forEach _waypoints;
|
} forEach _waypoints;
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Edited with tabler. -->
|
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="microdagr">
|
<Package name="microdagr">
|
||||||
<Key ID="STR_ACE_microdagr_itemName">
|
<Key ID="STR_ACE_microdagr_itemName">
|
||||||
@ -252,7 +251,7 @@
|
|||||||
<Spanish>Mostrar MicroDAGR</Spanish>
|
<Spanish>Mostrar MicroDAGR</Spanish>
|
||||||
<Russian>Показать MicroDAGR</Russian>
|
<Russian>Показать MicroDAGR</Russian>
|
||||||
<Czech>Ukázat MicroDAGR GPS</Czech>
|
<Czech>Ukázat MicroDAGR GPS</Czech>
|
||||||
<Polish>Pokaż<br />MicroDAGR</Polish>
|
<Polish>Pokaż MicroDAGR</Polish>
|
||||||
<French>Afficher MicroDAGR</French>
|
<French>Afficher MicroDAGR</French>
|
||||||
<Hungarian>MicroDAGR mutatása</Hungarian>
|
<Hungarian>MicroDAGR mutatása</Hungarian>
|
||||||
<Italian>Mostra MicroDAGR</Italian>
|
<Italian>Mostra MicroDAGR</Italian>
|
||||||
@ -263,7 +262,7 @@
|
|||||||
<Spanish>Configurar MicroDAGR</Spanish>
|
<Spanish>Configurar MicroDAGR</Spanish>
|
||||||
<Russian>Настроить MicroDAGR</Russian>
|
<Russian>Настроить MicroDAGR</Russian>
|
||||||
<Czech>Konfigurovat MicroDAGR GPS</Czech>
|
<Czech>Konfigurovat MicroDAGR GPS</Czech>
|
||||||
<Polish>Konfiguruj<br />MicroDAGR</Polish>
|
<Polish>Konfiguruj MicroDAGR</Polish>
|
||||||
<French>Configurer MicroDAGR</French>
|
<French>Configurer MicroDAGR</French>
|
||||||
<Hungarian>MicroDAGR konfigurálása</Hungarian>
|
<Hungarian>MicroDAGR konfigurálása</Hungarian>
|
||||||
<Italian>ConfiguraMicroDAGR</Italian>
|
<Italian>ConfiguraMicroDAGR</Italian>
|
||||||
@ -274,7 +273,7 @@
|
|||||||
<Spanish>Cerrar MicroDAGR</Spanish>
|
<Spanish>Cerrar MicroDAGR</Spanish>
|
||||||
<Russian>Закрыть MicroDAGR</Russian>
|
<Russian>Закрыть MicroDAGR</Russian>
|
||||||
<Czech>Zavřít MicroDAGR GPS</Czech>
|
<Czech>Zavřít MicroDAGR GPS</Czech>
|
||||||
<Polish>Zamknij<br />MicroDAGR</Polish>
|
<Polish>Zamknij MicroDAGR</Polish>
|
||||||
<French>Fermer MicroDAGR</French>
|
<French>Fermer MicroDAGR</French>
|
||||||
<Hungarian>MicroDAGR elrejtése</Hungarian>
|
<Hungarian>MicroDAGR elrejtése</Hungarian>
|
||||||
<Italian>Chiudi MicroDAGR</Italian>
|
<Italian>Chiudi MicroDAGR</Italian>
|
||||||
|
1
addons/recoil/$PBOPREFIX$
Normal file
1
addons/recoil/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
|||||||
|
z\ace\addons\recoil
|
255
addons/recoil/CfgRecoils.hpp
Normal file
255
addons/recoil/CfgRecoils.hpp
Normal file
@ -0,0 +1,255 @@
|
|||||||
|
|
||||||
|
#define KICKBACK 1.6
|
||||||
|
|
||||||
|
#define MUZZLETEMP 1
|
||||||
|
#define MUZZLEPERM 0.1
|
||||||
|
|
||||||
|
#define MUZZLECLIMB_POS 1
|
||||||
|
#define MUZZLERIGHT_POS 0.4
|
||||||
|
|
||||||
|
#define MUZZLECLIMB_MAG 1
|
||||||
|
#define MUZZLERIGHT_MAG 1
|
||||||
|
|
||||||
|
class CfgRecoils {
|
||||||
|
class Default {
|
||||||
|
// doc: http://forums.bistudio.com/showthread.php?188999-Recoil-Overhaul-Feedback&s=dba8590ec07adb5ffa87f72d38dde6fc&p=2886744&viewfull=1#post2886744
|
||||||
|
// {horizontal axis position, vertical axis position, horizontal magnitude, vertical magnitude}
|
||||||
|
muzzleOuter[] = {0*MUZZLERIGHT_POS,0.4*MUZZLECLIMB_POS,0.5*MUZZLERIGHT_MAG,0.6*MUZZLECLIMB_MAG};
|
||||||
|
// restricted area inside the outer ellipse where the recoil cannot end
|
||||||
|
muzzleInner[] = {0,0.05,0.2,0.2};
|
||||||
|
// minimum and maximum interval for backward force
|
||||||
|
kickBack[] = {0.05*KICKBACK,0.1*KICKBACK};
|
||||||
|
permanent = 0.1*MUZZLEPERM;
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_default: Default {
|
||||||
|
muzzleOuter[] = {0.3*MUZZLERIGHT_POS,1*MUZZLECLIMB_POS,0.3*MUZZLERIGHT_MAG,0.2*MUZZLECLIMB_MAG};
|
||||||
|
muzzleInner[] = {0,0,0.1,0.1};
|
||||||
|
kickBack[] = {0.03*KICKBACK,0.06*KICKBACK};
|
||||||
|
permanent = 0.1*MUZZLEPERM;
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_mk20: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,0.6*MUZZLECLIMB_POS,0.2*MUZZLERIGHT_MAG,0.2*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.01*KICKBACK,0.03*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_mk20c: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,0.8*MUZZLECLIMB_POS,0.3*MUZZLERIGHT_MAG,0.2*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.04*KICKBACK};
|
||||||
|
temporary = 0.015*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_trg20: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,1*MUZZLECLIMB_POS,0.3*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.04*KICKBACK};
|
||||||
|
temporary = 0.015*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_trg21: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,0.8*MUZZLECLIMB_POS,0.3*MUZZLERIGHT_MAG,0.2*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.01*KICKBACK,0.03*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_mx: recoil_default {
|
||||||
|
muzzleOuter[] = {0.3*MUZZLERIGHT_POS,1*MUZZLECLIMB_POS,0.4*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.04*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_mxc: recoil_default {
|
||||||
|
muzzleOuter[] = {0.3*MUZZLERIGHT_POS,1.2*MUZZLECLIMB_POS,0.4*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.03*KICKBACK,0.06*KICKBACK};
|
||||||
|
temporary = 0.015*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_sw: recoil_default {
|
||||||
|
muzzleOuter[] = {0.3*MUZZLERIGHT_POS,0.8*MUZZLECLIMB_POS,0.5*MUZZLERIGHT_MAG,0.2*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.04*KICKBACK};
|
||||||
|
temporary = 0.005*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_mxm: recoil_default {
|
||||||
|
muzzleOuter[] = {0.3*MUZZLERIGHT_POS,0.8*MUZZLECLIMB_POS,0.4*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.04*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_ktb: recoil_default {
|
||||||
|
muzzleOuter[] = {0.3*MUZZLERIGHT_POS,1*MUZZLECLIMB_POS,0.3*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.04*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_ktbc: recoil_default {
|
||||||
|
muzzleOuter[] = {0.3*MUZZLERIGHT_POS,1.2*MUZZLECLIMB_POS,0.3*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.03*KICKBACK,0.06*KICKBACK};
|
||||||
|
temporary = 0.015*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_smg_01: recoil_default {
|
||||||
|
muzzleOuter[] = {0.1*MUZZLERIGHT_POS,0.8*MUZZLECLIMB_POS,0.3*MUZZLERIGHT_MAG,0.2*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.01*KICKBACK,0.03*KICKBACK};
|
||||||
|
temporary = 0.015*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_smg_02: recoil_default {
|
||||||
|
muzzleOuter[] = {0.1*MUZZLERIGHT_POS,0.6*MUZZLECLIMB_POS,0.2*MUZZLERIGHT_MAG,0.2*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.01*KICKBACK,0.02*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_pdw: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,1*MUZZLECLIMB_POS,0.3*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.04*KICKBACK};
|
||||||
|
temporary = 0.02*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_sdar: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,1*MUZZLECLIMB_POS,0.3*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.04*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_pistol_p07: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,1*MUZZLECLIMB_POS,0.2*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.03*KICKBACK,0.06*KICKBACK};
|
||||||
|
temporary = 0.03*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_pistol_rook40: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,1*MUZZLECLIMB_POS,0.2*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.03*KICKBACK,0.06*KICKBACK};
|
||||||
|
temporary = 0.02*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_pistol_acpc2: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,1.5*MUZZLECLIMB_POS,0.2*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.04*KICKBACK,0.08*KICKBACK};
|
||||||
|
temporary = 0.04*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_pistol_4five: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,1.5*MUZZLECLIMB_POS,0.2*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.04*KICKBACK,0.08*KICKBACK};
|
||||||
|
temporary = 0.06*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_pistol_zubr: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,1.5*MUZZLECLIMB_POS,0.2*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.04*KICKBACK,0.08*KICKBACK};
|
||||||
|
temporary = 0.08*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_pistol_signal: recoil_default {
|
||||||
|
muzzleOuter[] = {0.2*MUZZLERIGHT_POS,1.5*MUZZLECLIMB_POS,0.2*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.04*KICKBACK};
|
||||||
|
temporary = 0.02*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_rpg: recoil_default {
|
||||||
|
muzzleOuter[] = {2*MUZZLERIGHT_POS,3*MUZZLECLIMB_POS,1*MUZZLERIGHT_MAG,0.5*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.08*KICKBACK,0.1*KICKBACK};
|
||||||
|
temporary = 0.1*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_nlaw: recoil_default {
|
||||||
|
muzzleOuter[] = {2*MUZZLERIGHT_POS,3*MUZZLECLIMB_POS,1*MUZZLERIGHT_MAG,0.5*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.06*KICKBACK,0.08*KICKBACK};
|
||||||
|
temporary = 0.08*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_titan_long: recoil_default {
|
||||||
|
muzzleOuter[] = {2*MUZZLERIGHT_POS,3*MUZZLECLIMB_POS,1*MUZZLERIGHT_MAG,0.5*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.1*KICKBACK,0.12*KICKBACK};
|
||||||
|
temporary = 0.15*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_titan_short: recoil_default {
|
||||||
|
muzzleOuter[] = {2*MUZZLERIGHT_POS,3*MUZZLECLIMB_POS,1*MUZZLERIGHT_MAG,0.5*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.1*KICKBACK,0.12*KICKBACK};
|
||||||
|
temporary = 0.12*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_mk200: recoil_default {
|
||||||
|
muzzleOuter[] = {0.4*MUZZLERIGHT_POS,0.6*MUZZLECLIMB_POS,0.6*MUZZLERIGHT_MAG,0.2*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.03*KICKBACK,0.06*KICKBACK};
|
||||||
|
temporary = 0.005*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_zafir: recoil_default {
|
||||||
|
muzzleOuter[] = {0.5*MUZZLERIGHT_POS,1*MUZZLECLIMB_POS,0.7*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.08*KICKBACK};
|
||||||
|
temporary = 0.005*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_m320: recoil_default {
|
||||||
|
muzzleOuter[] = {1*MUZZLERIGHT_POS,3*MUZZLECLIMB_POS,0.5*MUZZLERIGHT_MAG,0.6*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.08*KICKBACK,0.1*KICKBACK};
|
||||||
|
temporary = 0.02*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_gm6: recoil_default {
|
||||||
|
muzzleOuter[] = {1.4*MUZZLERIGHT_POS,3.5*MUZZLECLIMB_POS,0.7*MUZZLERIGHT_MAG,0.8*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.1*KICKBACK,0.12*KICKBACK};
|
||||||
|
temporary = 0.025*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_ebr: recoil_default {
|
||||||
|
muzzleOuter[] = {0.4*MUZZLERIGHT_POS,1.5*MUZZLECLIMB_POS,0.6*MUZZLERIGHT_MAG,0.4*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.04*KICKBACK,0.07*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_dmr_01: recoil_default {
|
||||||
|
muzzleOuter[] = {0.5*MUZZLERIGHT_POS,2*MUZZLECLIMB_POS,0.5*MUZZLERIGHT_MAG,0.5*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.03*KICKBACK,0.08*KICKBACK};
|
||||||
|
temporary = 0.015*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_dmr_02: recoil_default {
|
||||||
|
muzzleOuter[] = {0.5*MUZZLERIGHT_POS,2.5*MUZZLECLIMB_POS,0.6*MUZZLERIGHT_MAG,0.5*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.06*KICKBACK,0.08*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_dmr_03: recoil_default {
|
||||||
|
muzzleOuter[] = {0.3*MUZZLERIGHT_POS,1.5*MUZZLECLIMB_POS,0.5*MUZZLERIGHT_MAG,0.4*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.03*KICKBACK,0.06*KICKBACK};
|
||||||
|
temporary = 0.005*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_dmr_04: recoil_default {
|
||||||
|
muzzleOuter[] = {0.4*MUZZLERIGHT_POS,1.5*MUZZLECLIMB_POS,0.5*MUZZLERIGHT_MAG,0.4*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.04*KICKBACK};
|
||||||
|
temporary = 0.015*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_dmr_05: recoil_default {
|
||||||
|
muzzleOuter[] = {0.5*MUZZLERIGHT_POS,2.5*MUZZLECLIMB_POS,0.8*MUZZLERIGHT_MAG,0.6*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.08*KICKBACK,0.1*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_dmr_06: recoil_default {
|
||||||
|
muzzleOuter[] = {0.5*MUZZLERIGHT_POS,2*MUZZLECLIMB_POS,0.7*MUZZLERIGHT_MAG,0.5*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.05*KICKBACK,0.1*KICKBACK};
|
||||||
|
temporary = 0.01*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_mmg_01: recoil_default {
|
||||||
|
muzzleOuter[] = {0.6*MUZZLERIGHT_POS,1.5*MUZZLECLIMB_POS,0.8*MUZZLERIGHT_MAG,0.3*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.02*KICKBACK,0.08*KICKBACK};
|
||||||
|
temporary = 0.005*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class recoil_mmg_02: recoil_default {
|
||||||
|
muzzleOuter[] = {0.5*MUZZLERIGHT_POS,1.5*MUZZLECLIMB_POS,0.6*MUZZLERIGHT_MAG,0.4*MUZZLECLIMB_MAG};
|
||||||
|
kickBack[] = {0.04*KICKBACK,0.08*KICKBACK};
|
||||||
|
temporary = 0.005*MUZZLETEMP;
|
||||||
|
};
|
||||||
|
};
|
15
addons/recoil/config.cpp
Normal file
15
addons/recoil/config.cpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"ace_common"};
|
||||||
|
author[] = {"commy2"};
|
||||||
|
authorUrl = "";
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgRecoils.hpp"
|
12
addons/recoil/script_component.hpp
Normal file
12
addons/recoil/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#define COMPONENT recoil
|
||||||
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED_RECOIL
|
||||||
|
#define DEBUG_MODE_FULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED_RECOIL
|
||||||
|
#define DEBUG_SETTINGS DEBUG_ENABLED_RECOIL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
@ -4,7 +4,7 @@
|
|||||||
if !(hasInterface) exitWith {};
|
if !(hasInterface) exitWith {};
|
||||||
|
|
||||||
// Add keybinds
|
// Add keybinds
|
||||||
["ACE3", QGVAR(SelectPistol), localize "STR_ACE_WeaponSelect_SelectPistol",
|
["ACE3", QGVAR(SelectPistolNew), localize "STR_ACE_WeaponSelect_SelectPistol",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
@ -13,12 +13,12 @@ if !(hasInterface) exitWith {};
|
|||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, handgunWeapon ACE_player] call FUNC(selectWeaponMode);
|
[ACE_player, handgunWeapon ACE_player] call FUNC(selectWeaponMode);
|
||||||
true
|
false
|
||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[2, [false, false, false]], false] call cba_fnc_addKeybind; //1 Key
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //1 Key
|
||||||
|
|
||||||
["ACE3", QGVAR(SelectRifle), localize "STR_ACE_WeaponSelect_SelectRifle",
|
["ACE3", QGVAR(SelectRifleNew), localize "STR_ACE_WeaponSelect_SelectRifle",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
@ -27,12 +27,12 @@ if !(hasInterface) exitWith {};
|
|||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMode);
|
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMode);
|
||||||
true
|
false
|
||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[3, [false, false, false]], false] call cba_fnc_addKeybind; //2 Key
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //2 Key
|
||||||
|
|
||||||
["ACE3", QGVAR(SelectRifleMuzzle), localize "STR_ACE_WeaponSelect_SelectRifleMuzzle",
|
["ACE3", QGVAR(SelectRifleMuzzleNew), localize "STR_ACE_WeaponSelect_SelectRifleMuzzle",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
@ -41,12 +41,12 @@ if !(hasInterface) exitWith {};
|
|||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMuzzle);
|
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMuzzle);
|
||||||
true
|
false
|
||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[4, [false, false, false]], false] call cba_fnc_addKeybind; //3 Key
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //3 Key
|
||||||
|
|
||||||
["ACE3", QGVAR(SelectLauncher), localize "STR_ACE_WeaponSelect_SelectLauncher",
|
["ACE3", QGVAR(SelectLauncherNew), localize "STR_ACE_WeaponSelect_SelectLauncher",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
@ -55,12 +55,12 @@ if !(hasInterface) exitWith {};
|
|||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, secondaryWeapon ACE_player] call FUNC(selectWeaponMode);
|
[ACE_player, secondaryWeapon ACE_player] call FUNC(selectWeaponMode);
|
||||||
true
|
false
|
||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[5, [false, false, false]], false] call cba_fnc_addKeybind; //4 Key
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //4 Key
|
||||||
|
|
||||||
["ACE3", QGVAR(SelectBinocular), localize "STR_ACE_WeaponSelect_SelectBinocular",
|
["ACE3", QGVAR(SelectBinocularNew), localize "STR_ACE_WeaponSelect_SelectBinocular",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
@ -69,10 +69,10 @@ if !(hasInterface) exitWith {};
|
|||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, binocular ACE_player] call FUNC(selectWeaponMode);
|
[ACE_player, binocular ACE_player] call FUNC(selectWeaponMode);
|
||||||
true
|
false
|
||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[6, [false, false, false]], false] call cba_fnc_addKeybind; //5 Key
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //5 Key
|
||||||
|
|
||||||
["ACE3", QGVAR(SelectGrenadeFrag), localize "STR_ACE_WeaponSelect_SelectGrenadeFrag",
|
["ACE3", QGVAR(SelectGrenadeFrag), localize "STR_ACE_WeaponSelect_SelectGrenadeFrag",
|
||||||
{
|
{
|
||||||
@ -144,7 +144,7 @@ if !(hasInterface) exitWith {};
|
|||||||
{false},
|
{false},
|
||||||
[2, [false, false, false]], false] call cba_fnc_addKeybind; //1 Key
|
[2, [false, false, false]], false] call cba_fnc_addKeybind; //1 Key
|
||||||
|
|
||||||
["ACE3", QGVAR(SelectMainGun), localize "STR_ACE_WeaponSelect_SelectMainGun",
|
["ACE3", QGVAR(SelectMainGunNew), localize "STR_ACE_WeaponSelect_SelectMainGun",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
@ -153,12 +153,12 @@ if !(hasInterface) exitWith {};
|
|||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, vehicle ACE_player, 0] call FUNC(selectWeaponVehicle);
|
[ACE_player, vehicle ACE_player, 0] call FUNC(selectWeaponVehicle);
|
||||||
true
|
false
|
||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[4, [false, false, false]], false] call cba_fnc_addKeybind; //3 Key
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //3 Key
|
||||||
|
|
||||||
["ACE3", QGVAR(SelectMachineGun), localize "STR_ACE_WeaponSelect_SelectMachineGun",
|
["ACE3", QGVAR(SelectMachineGunNew), localize "STR_ACE_WeaponSelect_SelectMachineGun",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
@ -167,12 +167,12 @@ if !(hasInterface) exitWith {};
|
|||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, vehicle ACE_player, 1] call FUNC(selectWeaponVehicle);
|
[ACE_player, vehicle ACE_player, 1] call FUNC(selectWeaponVehicle);
|
||||||
true
|
false
|
||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[5, [false, false, false]], false] call cba_fnc_addKeybind; //4 Key
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //4 Key
|
||||||
|
|
||||||
["ACE3", QGVAR(SelectMissiles), localize "STR_ACE_WeaponSelect_SelectMissiles",
|
["ACE3", QGVAR(SelectMissilesNew), localize "STR_ACE_WeaponSelect_SelectMissiles",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
@ -181,10 +181,10 @@ if !(hasInterface) exitWith {};
|
|||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, vehicle ACE_player, 2] call FUNC(selectWeaponVehicle);
|
[ACE_player, vehicle ACE_player, 2] call FUNC(selectWeaponVehicle);
|
||||||
true
|
false
|
||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[6, [false, false, false]], false] call cba_fnc_addKeybind; //5 Key
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //5 Key
|
||||||
|
|
||||||
["ACE3", QGVAR(FireSmokeLauncher), localize "STR_ACE_WeaponSelect_FireSmokeLauncher",
|
["ACE3", QGVAR(FireSmokeLauncher), localize "STR_ACE_WeaponSelect_FireSmokeLauncher",
|
||||||
{
|
{
|
||||||
|
2801
extras/CfgAmmoReference.hpp
Normal file
2801
extras/CfgAmmoReference.hpp
Normal file
File diff suppressed because it is too large
Load Diff
1894
extras/CfgWeaponsReference.hpp
Normal file
1894
extras/CfgWeaponsReference.hpp
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
extras/assets/icons/png/Icon_Module/Icon_Module_Repair_ca.png
Normal file
BIN
extras/assets/icons/png/Icon_Module/Icon_Module_Repair_ca.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
36
optionals/asdg_comp/config.cpp
Normal file
36
optionals/asdg_comp/config.cpp
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"asdg_jointrails","ace_laserpointer","ace_optics"};
|
||||||
|
author[]={"OnkelDisMaster"};
|
||||||
|
authorUrl = "http://2.xn--gebirgsjgerkompanie-nwb.de/";
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class asdg_SlotInfo;
|
||||||
|
class asdg_FrontSideRail: asdg_SlotInfo {
|
||||||
|
class compatibleItems {
|
||||||
|
ACE_acc_pointer_red = 1;
|
||||||
|
ACE_acc_pointer_green = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class asdg_OpticRail;
|
||||||
|
class asdg_OpticRail1913: asdg_OpticRail {
|
||||||
|
class compatibleItems {
|
||||||
|
ACE_optic_Hamr_2D = 1;
|
||||||
|
ACE_optic_Hamr_PIP = 1;
|
||||||
|
ACE_optic_Arco_2D = 1;
|
||||||
|
ACE_optic_Arco_PIP = 1;
|
||||||
|
ACE_optic_MRCO_2D = 1;
|
||||||
|
ACE_optic_SOS_2D = 1;
|
||||||
|
ACE_optic_SOS_PIP = 1;
|
||||||
|
ACE_optic_LRPS_2D = 1;
|
||||||
|
ACE_optic_LRPS_PIP = 1;
|
||||||
|
};
|
||||||
|
};
|
5
optionals/asdg_comp/script_component.hpp
Normal file
5
optionals/asdg_comp/script_component.hpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#define COMPONENT asdg_comp
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
@ -39,6 +39,11 @@ prefix = z\ace\addons
|
|||||||
# Default: <work_drive>\<prefix>\addons
|
# Default: <work_drive>\<prefix>\addons
|
||||||
module_root = P:\z\ace\addons
|
module_root = P:\z\ace\addons
|
||||||
|
|
||||||
|
# Set the location where the optional addon source folders (i.e. P:\z\ace\optionals)
|
||||||
|
# Default: <work_drive>\<prefix>\optionals
|
||||||
|
optionals_root = P:\z\ace\optionals
|
||||||
|
|
||||||
|
|
||||||
# Directory where the built addon will be saved.
|
# Directory where the built addon will be saved.
|
||||||
# Default: release
|
# Default: release
|
||||||
release_dir = P:\z\ace\release
|
release_dir = P:\z\ace\release
|
||||||
|
169
tools/make.py
169
tools/make.py
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# vim: set fileencoding=utf-8 :
|
# vim: set fileencoding=utf-8 :
|
||||||
|
|
||||||
# make.py
|
# make.py
|
||||||
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
__version__ = "0.3dev"
|
__version__ = "0.4"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -54,6 +54,13 @@ import re
|
|||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
import winreg
|
import winreg
|
||||||
|
|
||||||
|
######## GLOBALS #########
|
||||||
|
work_drive = ""
|
||||||
|
module_root = ""
|
||||||
|
release_dir = ""
|
||||||
|
module_root_parent = ""
|
||||||
|
optionals_root = ""
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# http://akiscode.com/articles/sha-1directoryhash.shtml
|
# http://akiscode.com/articles/sha-1directoryhash.shtml
|
||||||
# Copyright (c) 2009 Stephen Akiki
|
# Copyright (c) 2009 Stephen Akiki
|
||||||
@ -246,6 +253,8 @@ def color(color):
|
|||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
if color == "green":
|
if color == "green":
|
||||||
set_text_attr(FOREGROUND_GREEN | get_text_attr() & 0x0070 | FOREGROUND_INTENSITY)
|
set_text_attr(FOREGROUND_GREEN | get_text_attr() & 0x0070 | FOREGROUND_INTENSITY)
|
||||||
|
elif color == "yellow":
|
||||||
|
set_text_attr(FOREGROUND_YELLOW | get_text_attr() & 0x0070 | FOREGROUND_INTENSITY)
|
||||||
elif color == "red":
|
elif color == "red":
|
||||||
set_text_attr(FOREGROUND_RED | get_text_attr() & 0x0070 | FOREGROUND_INTENSITY)
|
set_text_attr(FOREGROUND_RED | get_text_attr() & 0x0070 | FOREGROUND_INTENSITY)
|
||||||
elif color == "blue":
|
elif color == "blue":
|
||||||
@ -284,11 +293,122 @@ def print_yellow(msg):
|
|||||||
print(msg)
|
print(msg)
|
||||||
color("reset")
|
color("reset")
|
||||||
|
|
||||||
|
|
||||||
|
def copy_important_files(source_dir,destination_dir):
|
||||||
|
|
||||||
|
originalDir = os.getcwd()
|
||||||
|
importantFiles = ["mod.cpp",
|
||||||
|
"README.md",
|
||||||
|
"AUTHORS.txt",
|
||||||
|
"LICENSE",
|
||||||
|
"logo_ace3_ca.paa"
|
||||||
|
]
|
||||||
|
|
||||||
|
print_yellow ("source_dir: " + source_dir)
|
||||||
|
print_yellow("destination_dir: " + destination_dir)
|
||||||
|
|
||||||
|
#copy importantFiles
|
||||||
|
try:
|
||||||
|
print_blue("\nSearching for important files in " + source_dir)
|
||||||
|
for file in importantFiles:
|
||||||
|
print_green("Copying file => " + os.path.join(source_dir,file))
|
||||||
|
shutil.copyfile(os.path.join(source_dir,file),os.path.join(destination_dir,file))
|
||||||
|
except:
|
||||||
|
print_error("COPYING IMPORTANT FILES.")
|
||||||
|
raise
|
||||||
|
|
||||||
|
#copy all extension dlls
|
||||||
|
try:
|
||||||
|
os.chdir(os.path.join(source_dir))
|
||||||
|
print_blue("\nSearching for DLLs in " + os.getcwd())
|
||||||
|
filenames = glob.glob("*.dll")
|
||||||
|
|
||||||
|
if not filenames:
|
||||||
|
print ("Empty SET")
|
||||||
|
|
||||||
|
for dll in filenames:
|
||||||
|
print_green("Copying dll => " + os.path.join(source_dir,dll))
|
||||||
|
if os.path.isfile(dll):
|
||||||
|
shutil.copyfile(os.path.join(source_dir,dll),os.path.join(destination_dir,dll))
|
||||||
|
except:
|
||||||
|
print_error("COPYING DLL FILES.")
|
||||||
|
raise
|
||||||
|
finally:
|
||||||
|
os.chdir(originalDir)
|
||||||
|
|
||||||
|
def copy_optionals_for_building(mod,pbos):
|
||||||
|
src_directories = os.listdir(optionals_root)
|
||||||
|
current_dir = os.getcwd()
|
||||||
|
|
||||||
|
print("")
|
||||||
|
try:
|
||||||
|
|
||||||
|
#special server.pbo processing
|
||||||
|
files = glob.glob(os.path.join(release_dir, "@ace","optionals","*.pbo"))
|
||||||
|
for file in files:
|
||||||
|
file_name = os.path.basename(file)
|
||||||
|
print ("Adding the following file: " + file_name)
|
||||||
|
pbos.append(file_name)
|
||||||
|
pbo_path = os.path.join(release_dir, "@ace","optionals",file_name)
|
||||||
|
if (os.path.isfile(pbo_path)):
|
||||||
|
print("Moving " + pbo_path + " for processing.")
|
||||||
|
shutil.move(pbo_path, os.path.join(release_dir,"@ace","addons",file_name))
|
||||||
|
|
||||||
|
except:
|
||||||
|
print_error("Error in moving")
|
||||||
|
raise
|
||||||
|
finally:
|
||||||
|
os.chdir(current_dir)
|
||||||
|
|
||||||
|
print("")
|
||||||
|
try:
|
||||||
|
for dir_name in src_directories:
|
||||||
|
mod.append(dir_name)
|
||||||
|
if (dir_name == "userconfig"):
|
||||||
|
destination = os.path.join(work_drive,dir_name)
|
||||||
|
else:
|
||||||
|
destination = os.path.join(module_root,dir_name)
|
||||||
|
|
||||||
|
print("Temporarily copying " + os.path.join(optionals_root,dir_name) + " => " + destination + " for building.")
|
||||||
|
shutil.rmtree(destination, True)
|
||||||
|
shutil.copytree(os.path.join(optionals_root,dir_name), destination)
|
||||||
|
except:
|
||||||
|
print_error("Copy Optionals Failed")
|
||||||
|
raise
|
||||||
|
finally:
|
||||||
|
os.chdir(current_dir)
|
||||||
|
|
||||||
|
def cleanup_optionals(mod,pbos):
|
||||||
|
print("")
|
||||||
|
try:
|
||||||
|
for dir_name in mod:
|
||||||
|
if (dir_name == "userconfig"):
|
||||||
|
destination = os.path.join(work_drive,dir_name)
|
||||||
|
else:
|
||||||
|
destination = os.path.join(module_root,dir_name)
|
||||||
|
|
||||||
|
print("Cleaning " + destination)
|
||||||
|
|
||||||
|
try:
|
||||||
|
file_name = "ace_{}.pbo".format(dir_name)
|
||||||
|
src_file_path = os.path.join(release_dir, "@ace","addons",file_name)
|
||||||
|
dst_file_path = os.path.join(release_dir, "@ace","optionals",file_name)
|
||||||
|
if (os.path.isfile(src_file_path)):
|
||||||
|
#print("Preserving " + file_name)
|
||||||
|
os.renames(src_file_path,dst_file_path)
|
||||||
|
except FileExistsError:
|
||||||
|
print_error(file_name + " already exists")
|
||||||
|
continue
|
||||||
|
shutil.rmtree(destination)
|
||||||
|
|
||||||
|
except:
|
||||||
|
print_error("Cleaning Optionals Failed")
|
||||||
|
raise
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
"""Build an Arma addon suite in a directory from rules in a make.cfg file."""
|
"""Build an Arma addon suite in a directory from rules in a make.cfg file."""
|
||||||
print_blue(("\nmake.py for Arma, v" + __version__))
|
print_blue(("\nmake.py for Arma, modified for Advanced Combat Environment v" + __version__))
|
||||||
|
|
||||||
if sys.platform != "win32":
|
if sys.platform != "win32":
|
||||||
print_error("Non-Windows platform (Cygwin?). Please re-run from cmd.")
|
print_error("Non-Windows platform (Cygwin?). Please re-run from cmd.")
|
||||||
@ -321,6 +441,7 @@ make.py [help] [test] [force] [key <name>] [target <name>] [release <version>]
|
|||||||
test -- Copy result to Arma 3.
|
test -- Copy result to Arma 3.
|
||||||
release <version> -- Make archive with <version>.
|
release <version> -- Make archive with <version>.
|
||||||
force -- Ignore cache and build all.
|
force -- Ignore cache and build all.
|
||||||
|
checkexternal -- Check External Files
|
||||||
target <name> -- Use rules in make.cfg under heading [<name>] rather than
|
target <name> -- Use rules in make.cfg under heading [<name>] rather than
|
||||||
default [Make]
|
default [Make]
|
||||||
key <name> -- Use key in working directory with <name> to sign. If it does not
|
key <name> -- Use key in working directory with <name> to sign. If it does not
|
||||||
@ -378,6 +499,12 @@ See the make.cfg file for additional build options.
|
|||||||
quiet = True
|
quiet = True
|
||||||
argv.remove("quiet")
|
argv.remove("quiet")
|
||||||
|
|
||||||
|
if "checkexternal" in argv:
|
||||||
|
argv.remove("checkexternal")
|
||||||
|
check_external = True
|
||||||
|
else:
|
||||||
|
check_external = False
|
||||||
|
|
||||||
# Get the directory the make script is in.
|
# Get the directory the make script is in.
|
||||||
make_root = os.path.dirname(os.path.realpath(__file__))
|
make_root = os.path.dirname(os.path.realpath(__file__))
|
||||||
make_root_parent = os.path.abspath(os.path.join(os.getcwd(), os.pardir))
|
make_root_parent = os.path.abspath(os.path.join(os.getcwd(), os.pardir))
|
||||||
@ -396,6 +523,12 @@ See the make.cfg file for additional build options.
|
|||||||
|
|
||||||
cfg = configparser.ConfigParser();
|
cfg = configparser.ConfigParser();
|
||||||
try:
|
try:
|
||||||
|
global work_drive
|
||||||
|
global module_root
|
||||||
|
global release_dir
|
||||||
|
global module_root_parent
|
||||||
|
global optionals_root
|
||||||
|
|
||||||
cfg.read(os.path.join(make_root, "make.cfg"))
|
cfg.read(os.path.join(make_root, "make.cfg"))
|
||||||
|
|
||||||
# Project name (with @ symbol)
|
# Project name (with @ symbol)
|
||||||
@ -436,20 +569,28 @@ See the make.cfg file for additional build options.
|
|||||||
# Project module Root
|
# Project module Root
|
||||||
module_root_parent = os.path.abspath(os.path.join(os.path.join(work_drive, prefix), os.pardir))
|
module_root_parent = os.path.abspath(os.path.join(os.path.join(work_drive, prefix), os.pardir))
|
||||||
module_root = cfg.get(make_target, "module_root", fallback=os.path.join(make_root_parent, "addons"))
|
module_root = cfg.get(make_target, "module_root", fallback=os.path.join(make_root_parent, "addons"))
|
||||||
|
optionals_root = os.path.join(module_root_parent, "optionals")
|
||||||
print_green ("module_root: " + module_root)
|
print_green ("module_root: " + module_root)
|
||||||
|
|
||||||
if (os.path.isdir(module_root)):
|
if (os.path.isdir(module_root)):
|
||||||
os.chdir(module_root)
|
os.chdir(module_root)
|
||||||
else:
|
else:
|
||||||
print_error ("Directory " + module_root + " does not exist.")
|
print_error ("Directory " + module_root + " does not exist.")
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
if (os.path.isdir(optionals_root)):
|
||||||
|
print_green ("optionals_root: " + optionals_root)
|
||||||
|
else:
|
||||||
|
print_error ("Directory " + optionals_root + " does not exist.")
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
print_green ("release_dir: " + release_dir)
|
||||||
|
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
print_error("Could not parse make.cfg.")
|
print_error("Could not parse make.cfg.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# See if we have been given specific modules to build from command line.
|
# See if we have been given specific modules to build from command line.
|
||||||
if len(argv) > 1 and not make_release:
|
if len(argv) > 1 and not make_release:
|
||||||
arg_modules = True
|
arg_modules = True
|
||||||
@ -492,6 +633,11 @@ See the make.cfg file for additional build options.
|
|||||||
print ("No cache found.")
|
print ("No cache found.")
|
||||||
cache = {}
|
cache = {}
|
||||||
|
|
||||||
|
#Temporarily copy optionals_root for building. They will be removed later.
|
||||||
|
optionals_modules = []
|
||||||
|
optional_files = []
|
||||||
|
copy_optionals_for_building(optionals_modules,optional_files)
|
||||||
|
|
||||||
# Get list of subdirs in make root.
|
# Get list of subdirs in make root.
|
||||||
dirs = next(os.walk(module_root))[1]
|
dirs = next(os.walk(module_root))[1]
|
||||||
|
|
||||||
@ -537,6 +683,7 @@ See the make.cfg file for additional build options.
|
|||||||
# For each module, prep files and then build.
|
# For each module, prep files and then build.
|
||||||
for module in modules:
|
for module in modules:
|
||||||
print_green("\nMaking " + module + "-"*max(1, (60-len(module))))
|
print_green("\nMaking " + module + "-"*max(1, (60-len(module))))
|
||||||
|
missing = False
|
||||||
|
|
||||||
# Cache check
|
# Cache check
|
||||||
if module in cache:
|
if module in cache:
|
||||||
@ -551,9 +698,14 @@ See the make.cfg file for additional build options.
|
|||||||
# Hash the module
|
# Hash the module
|
||||||
new_sha = get_directory_hash(os.path.join(module_root, module))
|
new_sha = get_directory_hash(os.path.join(module_root, module))
|
||||||
|
|
||||||
|
# Is the pbo file missing?
|
||||||
|
missing = not os.path.isfile(os.path.join(release_dir, project, "addons", "ace_{}.pbo".format(module)))
|
||||||
|
if missing:
|
||||||
|
print("ace_{}.pbo".format(module) + " is missing. Building...")
|
||||||
|
|
||||||
# Check if it needs rebuilt
|
# Check if it needs rebuilt
|
||||||
# print ("Hash:", new_sha)
|
# print ("Hash:", new_sha)
|
||||||
if old_sha == new_sha:
|
if old_sha == new_sha and not missing:
|
||||||
if not force_build:
|
if not force_build:
|
||||||
print("Module has not changed.")
|
print("Module has not changed.")
|
||||||
# Skip everything else
|
# Skip everything else
|
||||||
@ -658,7 +810,10 @@ See the make.cfg file for additional build options.
|
|||||||
cmd = [makepboTool, "-P","-A","-L","-N","-G", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"Addons")]
|
cmd = [makepboTool, "-P","-A","-L","-N","-G", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"Addons")]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
if check_external:
|
||||||
cmd = [pboproject, "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S","+Noisy", "+X", "+Clean", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"]
|
cmd = [pboproject, "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S","+Noisy", "+X", "+Clean", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"]
|
||||||
|
else:
|
||||||
|
cmd = [pboproject, "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S","+Noisy", "-X", "+Clean", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"]
|
||||||
|
|
||||||
color("grey")
|
color("grey")
|
||||||
if quiet:
|
if quiet:
|
||||||
@ -841,6 +996,8 @@ See the make.cfg file for additional build options.
|
|||||||
except:
|
except:
|
||||||
print_error("Could not copy files. Is Arma 3 running?")
|
print_error("Could not copy files. Is Arma 3 running?")
|
||||||
|
|
||||||
|
copy_important_files(module_root_parent,os.path.join(release_dir, "@ace"))
|
||||||
|
cleanup_optionals(optionals_modules,optional_files)
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main(sys.argv)
|
main(sys.argv)
|
||||||
input("Press Enter to continue...")
|
input("Press Enter to continue...")
|
||||||
|
Loading…
Reference in New Issue
Block a user