Merge branch 'master' into fire-refactor

This commit is contained in:
johnb432 2024-01-26 18:58:21 +01:00
commit 623ce0b0be
17 changed files with 252 additions and 51 deletions

View File

@ -7,8 +7,8 @@
* 0: The building(s) nearest this position are used <POSITION>
* 1: Limit the building search to those type of building <ARRAY>
* 2: Units that will be garrisoned <ARRAY>
* 3: Radius to fill building(s) <SCALAR> (default: 50)
* 4: 0: even filling, 1: building by building, 2: random filling <SCALAR> (default: 0)
* 3: Radius to fill building(s) <NUMBER> (default: 50)
* 4: 0: even filling, 1: building by building, 2: random filling <NUMBER> (default: 0)
* 5: True to fill building(s) from top to bottom <BOOL> (default: false) (note: only works with filling mode 0 and 1)
* 6: Teleport units <BOOL> (default: false)

View File

@ -7,7 +7,7 @@
* Arguments:
* 0: Arsenal display <DISPLAY>
* 1: Current panel control <CONTROL>
* 2: Current panel selection <SCALAR>
* 2: Current panel selection <NUMBER>
* 3: Item config entry <CONFIG>
*
* Return Value:

View File

@ -76,7 +76,7 @@ if ([_item, _vehicle] call FUNC(canLoadItemIn)) then {
[QEGVAR(common,fixFloating), _item, _item] call CBA_fnc_targetEvent;
};
},
LLSTRING(loadingItem),
format [LLSTRING(loadingItem), [_item, true] call FUNC(getNameItem), getText (configOf _vehicle >> "displayName")],
{
(_this select 0) call FUNC(canLoadItemIn)
},

View File

@ -58,7 +58,7 @@ if (GVAR(interactionParadrop)) exitWith {
[LSTRING(unlevelFlightWarning)] call EFUNC(common,displayTextStructured);
};
},
LLSTRING(unloadingItem),
format [LLSTRING(unloadingItem), [_item, true] call FUNC(getNameItem), getText (configOf GVAR(interactionVehicle) >> "displayName")],
{
(_this select 0) params ["", "_target"];
@ -109,7 +109,7 @@ if ([_item, GVAR(interactionVehicle), _unit] call FUNC(canUnloadItem)) then {
{
TRACE_1("unload fail",_this);
},
LLSTRING(unloadingItem),
format [LLSTRING(unloadingItem), [_item, true] call FUNC(getNameItem), getText (configOf GVAR(interactionVehicle) >> "displayName")],
{
(_this select 0) params ["_item", "_vehicle", "_unit"];

View File

@ -241,36 +241,12 @@
<Chinesesimp>&lt;br/&gt;%2卸载&lt;br/&gt;%1</Chinesesimp>
</Key>
<Key ID="STR_ACE_Cargo_LoadingItem">
<English>Loading Cargo</English>
<German>Belade</German>
<Portuguese>Carregando carga</Portuguese>
<Polish>Ładowanie cargo</Polish>
<Czech>Nakládám</Czech>
<Russian>Погрузка</Russian>
<Italian>Caricando</Italian>
<Spanish>Cargando</Spanish>
<French>Chargement de la cargaison</French>
<Japanese>カーゴへ積み込んでいます</Japanese>
<Korean>화물 싣기</Korean>
<Chinese>裝載貨物中</Chinese>
<Chinesesimp>正在装载货物</Chinesesimp>
<Turkish>Kargo Yükleniyor</Turkish>
<English>Loading %1 into %2...</English>
<Spanish>Cargando %1 en %2...</Spanish>
</Key>
<Key ID="STR_ACE_Cargo_UnloadingItem">
<English>Unloading Cargo</English>
<German>Entlade</German>
<Portuguese>Descarregando carga</Portuguese>
<Polish>Rozładowywanie cargo</Polish>
<Czech>Vykládám</Czech>
<Russian>Выгрузка</Russian>
<Italian>Scaricando</Italian>
<Spanish>Descargando</Spanish>
<French>Déchargement de la cargaison</French>
<Japanese>カーゴから降ろしています</Japanese>
<Korean>화물 내리기</Korean>
<Chinese>卸載貨物中</Chinese>
<Chinesesimp>正在卸载货物</Chinesesimp>
<Turkish>Kargo Boşaltılıyor</Turkish>
<English>Unloading %1 from %2...</English>
<Spanish>Descargando %1 de %2...</Spanish>
</Key>
<Key ID="STR_ACE_Cargo_LoadingFailed">
<English>%1&lt;br/&gt;could not be loaded</English>

View File

@ -5,7 +5,7 @@
*
* Arguments:
* 0: The Unit (usually the player) <OBJECT>
* 1: Force a return type <SCALAR, BOOLEAN>
* 1: Force a return type <NUMBER, BOOLEAN>
*
* Return Value:
* The return value <NUMBER>

View File

@ -0,0 +1 @@
z\ace\addons\compat_cup_units

View File

@ -0,0 +1,87 @@
#define HEARING(CLASSNAME) \
class CLASSNAME: ItemCore { \
ace_hearing_protection = 0.75; \
ace_hearing_lowerVolume = 0; \
}
#define HEARING_PARENT(CLASSNAME,PARENT) \
class CLASSNAME: PARENT { \
ace_hearing_protection = 0.75; \
ace_hearing_lowerVolume = 0; \
}
class CfgWeapons {
class ItemCore;
class CUP_H_PMC_Beanie_Khaki;
HEARING(CUP_H_BAF_DDPM_Mk6_CREW_PRR);
HEARING(CUP_H_BAF_DPM_Mk6_CREW_PRR);
HEARING(CUP_H_BAF_MTP_Mk6_CREW_PRR);
HEARING(CUP_H_CZ_Cap_Headphones);
HEARING(CUP_H_CZ_Cap_Headphones_des);
HEARING(CUP_H_CZ_Helmet05);
HEARING(CUP_H_CZ_Helmet07);
HEARING(CUP_H_CZ_Helmet08);
HEARING(CUP_H_CZ_Helmet09);
HEARING(CUP_H_CZ_Helmet10);
HEARING(CUP_H_FR_ECH);
HEARING(CUP_H_Ger_Beret_TankCommander_Blk);
HEARING(CUP_H_Ger_Beret_TankCommander_Grn);
HEARING(CUP_H_Ger_Cap_EP_Grn1);
HEARING(CUP_H_Ger_Cap_EP_Grn2);
HEARING(CUP_H_Ger_Cap_EP_Tan1);
HEARING(CUP_H_Ger_Cap_EP_Tan2);
HEARING(CUP_H_OpsCore_Black);
HEARING(CUP_H_OpsCore_Black_SF);
HEARING(CUP_H_OpsCore_Covered_AAF);
HEARING(CUP_H_OpsCore_Covered_AAF_SF);
HEARING(CUP_H_OpsCore_Covered_Fleck);
HEARING(CUP_H_OpsCore_Covered_Fleck_SF);
HEARING(CUP_H_OpsCore_Covered_MCAM);
HEARING(CUP_H_OpsCore_Covered_MCAM_SF);
HEARING(CUP_H_OpsCore_Covered_MCAM_US);
HEARING(CUP_H_OpsCore_Covered_MCAM_US_SF);
HEARING(CUP_H_OpsCore_Covered_MTP);
HEARING(CUP_H_OpsCore_Covered_MTP_SF);
HEARING(CUP_H_OpsCore_Covered_Tigerstripe);
HEARING(CUP_H_OpsCore_Covered_Tigerstripe_SF);
HEARING(CUP_H_OpsCore_Covered_Tropen);
HEARING(CUP_H_OpsCore_Covered_Tropen_SF);
HEARING(CUP_H_OpsCore_Covered_UCP);
HEARING(CUP_H_OpsCore_Covered_UCP_SF);
HEARING(CUP_H_OpsCore_Green);
HEARING(CUP_H_OpsCore_Green_SF);
HEARING(CUP_H_OpsCore_Grey);
HEARING(CUP_H_OpsCore_Grey_SF);
HEARING(CUP_H_OpsCore_Spray);
HEARING(CUP_H_OpsCore_Spray_SF);
HEARING(CUP_H_OpsCore_Spray_US);
HEARING(CUP_H_OpsCore_Spray_US_SF);
HEARING(CUP_H_OpsCore_Tan);
HEARING(CUP_H_OpsCore_Tan_SF);
HEARING_PARENT(CUP_H_PMC_Beanie_Headphones_Khaki,CUP_H_PMC_Beanie_Khaki);
HEARING_PARENT(CUP_H_PMC_Beanie_Headphones_Black,CUP_H_PMC_Beanie_Headphones_Khaki);
HEARING_PARENT(CUP_H_PMC_Beanie_Headphones_Winter,CUP_H_PMC_Beanie_Headphones_Khaki);
HEARING(CUP_H_PMC_Cap_Back_EP_Grey);
HEARING(CUP_H_PMC_Cap_Back_EP_Tan);
HEARING(CUP_H_PMC_Cap_EP_Grey);
HEARING(CUP_H_PMC_Cap_EP_Tan);
HEARING(CUP_H_PMC_EP_Headset);
HEARING(CUP_H_USArmy_HelmetMICH_earpro);
HEARING(CUP_H_USArmy_HelmetMICH_earpro_DCU);
HEARING(CUP_H_USArmy_HelmetMICH_earpro_ess);
HEARING(CUP_H_USArmy_HelmetMICH_earpro_ess_DCU);
HEARING(CUP_H_USArmy_HelmetMICH_earpro_ess_wdl);
HEARING(CUP_H_USArmy_HelmetMICH_earpro_wdl);
HEARING(CUP_H_USArmy_Helmet_ECH1_Black);
HEARING(CUP_H_USArmy_Helmet_ECH1_Green);
HEARING(CUP_H_USArmy_Helmet_ECH1_Sand);
HEARING(CUP_H_USArmy_Helmet_ECH2_Black);
HEARING(CUP_H_USArmy_Helmet_ECH2_GREEN);
HEARING(CUP_H_USArmy_Helmet_ECH2_Sand);
HEARING(CUP_H_USMC_Crew_Helmet);
HEARING(CUP_H_USMC_MICH2000_DEF_DES);
HEARING(CUP_H_USMC_MICH2000_DEF_ESS_DES);
HEARING(CUP_H_USMC_MICH2000_DEF_ESS_WDL);
HEARING(CUP_H_USMC_MICH2000_DEF_WDL);
};

View File

@ -0,0 +1,86 @@
class CfgVehicles {
class SoldierWB;
class Civilian_F;
class CUP_BAF_Soldier_DPM_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_BAF_Soldier_DDPM_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_BAF_Soldier_MTP_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_GER_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_NAPA_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_PMC_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_PMC_Soldier_Winter_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_RUS_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_TK_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_TKI_Insurgent_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_TKG_Guerrilla_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_USMC_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_FR_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Civil_Chernarus_Base: Civilian_F {
modelSides[] = {6};
};
class CUP_Creatures_Civil_Takistan_Base: Civilian_F {
modelSides[] = {6};
};
class CUP_Creatures_Military_ACR_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_CDF_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_UNO_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_OPFINS_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_RACS_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_SLA_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_USA_Soldier_ACU_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_USA_Soldier_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_HIL_Reservist_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_HIL_Recon_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_HIL_Man_Base: SoldierWB {
modelSides[] = {6};
};
class CUP_Creatures_Military_HIL_SF_Base: SoldierWB {
modelSides[] = {6};
};
};

View File

@ -0,0 +1,21 @@
#include "script_component.hpp"
class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"CUP_Creatures_People_LoadOrder",
"ace_nouniformrestrictions"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"Mike", "Jonpas"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,3 @@
#define SUBCOMPONENT nouniformrestrictions
#define SUBCOMPONENT_BEAUTIFIED No Uniform Restrictions
#include "..\script_component.hpp"

View File

@ -0,0 +1,18 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"CUP_Creatures_People_LoadOrder"};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"Mike", "Jonpas"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgWeapons.hpp"

View File

@ -0,0 +1,5 @@
#define COMPONENT compat_cup_units
#define COMPONENT_BEAUTIFIED CUP Units Compatibility
#include "\z\ace\addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -25,15 +25,8 @@ if (GVAR(plottingBoard_Shown) == 0) then {
_y set [4, 0];
};
} forEach GVAR(plottingBoard_markers);
};
if (((GVAR(mapTool_Shown) == 0) && {GVAR(plottingBoard_Shown) == 0}) || {
private _uniqueItems = ACE_player call EFUNC(common,uniqueItems);
!(("ACE_MapTools" in _uniqueItems) || {"ACE_PlottingBoard" in _uniqueItems})
}) exitWith {};
if (GVAR(plottingBoard_Shown) > 0) then {
} else {
if !([ACE_player, "ACE_PlottingBoard"] call EFUNC(common,hasItem)) exitWith {};
if (GVAR(plottingBoard_moveToMouse)) then {
GVAR(plottingBoard_pos) = _mapCtrl ctrlMapScreenToWorld getMousePosition;
GVAR(plottingBoard_moveToMouse) = false; // we only need to do this once after opening the map tool
@ -97,7 +90,7 @@ if (GVAR(plottingBoard_Shown) > 0) then {
} forEach GVAR(plottingBoard_markers);
};
if (GVAR(mapTool_Shown) > 0) then {
if ((GVAR(mapTool_Shown) > 0) && {[ACE_player, "ACE_MapTools"] call EFUNC(common,hasItem)}) then {
// Open map tools in center of screen when toggled to be shown
if (GVAR(mapTool_moveToMouse)) then {
GVAR(mapTool_pos) = _mapCtrl ctrlMapScreenToWorld getMousePosition;

View File

@ -7,10 +7,10 @@
* 0: The Unit <OBJECT>
* 1: Medication <STRING>
* 2: Time in system for the adjustment to reach its peak <NUMBER>
* 3: Duration the adjustment will have an effect <NUMVER>
* 4: Heart Rate Adjust <NUMVER>
* 5: Pain Suppress Adjust <NUMVER>
* 6: Flow Adjust <NUMVER>
* 3: Duration the adjustment will have an effect <NUMBER>
* 4: Heart Rate Adjust <NUMBER>
* 5: Pain Suppress Adjust <NUMBER>
* 6: Flow Adjust <NUMBER>
*
* Return Value:
* None

View File

@ -21,8 +21,16 @@ params ["_medic", "_patient", "_bodyPart"];
private _heartRate = 0;
if (alive _patient && {!([_patient, _bodyPart] call FUNC(hasTourniquetAppliedTo))}) then {
_heartRate = GET_HEART_RATE(_patient);
if (!([_patient, _bodyPart] call FUNC(hasTourniquetAppliedTo))) then {
_heartRate = switch (true) do {
case (alive _patient): {
GET_HEART_RATE(_patient)
};
case (alive (_patient getVariable [QEGVAR(medical,CPR_provider), objNull])): {
random [25, 30, 35] // fake heart rate because patient is dead and off state machine
};
default { 0 };
};
};
private _heartRateOutput = LSTRING(Check_Pulse_Output_5);

View File

@ -192,6 +192,9 @@ class FunctionFile:
if arg_default is None:
arg_default = ""
if ("SCALAR" in arg_types or "NUMVER" in arg_types):
self.feedback("Bad Arg Type \"{}\"".format(arg_types), 1)
arguments.append([arg_index, arg_name, arg_types, arg_default, arg_notes])
else:
# Notes about the above argument won't start with an index