mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cargo - Add load time coefficient setting (#6618)
* Add loadTimeCoefficient setting * Call settingChanged function * Normalize load coefficient
This commit is contained in:
parent
9972f5374f
commit
c95877d823
@ -39,7 +39,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
|
||||
private _size = [_object] call FUNC(getSizeItem);
|
||||
|
||||
[
|
||||
5 * _size,
|
||||
GVAR(loadTimeCoefficient) * 5 * _size,
|
||||
[_object, _vehicle],
|
||||
{
|
||||
[objNull, _this select 0 select 0, true] call EFUNC(common,claim);
|
||||
@ -54,7 +54,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
|
||||
} else {
|
||||
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
|
||||
|
||||
[[LSTRING(LoadingFailed), _displayName], 3.0] call EFUNC(common,displayTextStructured);
|
||||
[[LSTRING(LoadingFailed), _displayName], 3] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
_return
|
||||
|
@ -70,7 +70,7 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then
|
||||
private _size = [_item] call FUNC(getSizeItem);
|
||||
|
||||
[
|
||||
5 * _size,
|
||||
GVAR(loadTimeCoefficient) * 5 * _size,
|
||||
[_item, GVAR(interactionVehicle), ACE_player],
|
||||
{["ace_unloadCargo", _this select 0] call CBA_fnc_localEvent},
|
||||
{},
|
||||
@ -82,5 +82,5 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then
|
||||
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
private _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||
|
||||
[[LSTRING(UnloadingFailed), _displayName], 3.0] call EFUNC(common,displayTextStructured);
|
||||
[[LSTRING(UnloadingFailed), _displayName], 3] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
@ -1,19 +1,26 @@
|
||||
// CBA Settings [ADDON: ace_cargo]:
|
||||
|
||||
[
|
||||
QGVAR(enable), "CHECKBOX",
|
||||
[LSTRING(ModuleSettings_enable), LSTRING(ModuleSettings_enable_Description)],
|
||||
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize LSTRING(openMenu)],
|
||||
true, // default value
|
||||
true, // isGlobal
|
||||
[LELSTRING(OptionsMenu,CategoryLogistics), LLSTRING(openMenu)],
|
||||
true,
|
||||
true,
|
||||
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
||||
] call CBA_settings_fnc_init;
|
||||
|
||||
[
|
||||
QGVAR(loadTimeCoefficient), "SLIDER",
|
||||
[LSTRING(loadTimeCoefficient), LSTRING(loadTimeCoefficient_description)],
|
||||
[LELSTRING(OptionsMenu,CategoryLogistics), LLSTRING(openMenu)],
|
||||
[0, 3, 1, 1],
|
||||
true,
|
||||
{[QGVAR(loadTimeCoefficient), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
||||
] call CBA_settings_fnc_init;
|
||||
|
||||
[
|
||||
QGVAR(paradropTimeCoefficent), "SLIDER",
|
||||
[LSTRING(paradropTimeCoefficent), LSTRING(paradropTimeCoefficent_description)],
|
||||
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize LSTRING(openMenu)],
|
||||
[0,10,2.5,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
|
||||
true, // isGlobal
|
||||
{[QGVAR(paradropTimeCoefficent), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
||||
[LELSTRING(OptionsMenu,CategoryLogistics), LLSTRING(openMenu)],
|
||||
[0, 10, 2.5, 1],
|
||||
true,
|
||||
{[QGVAR(paradropTimeCoefficent), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
||||
] call CBA_settings_fnc_init;
|
||||
|
@ -291,7 +291,7 @@
|
||||
<Chinesesimp>此架飞机并无保持水平飞行</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_paradropTimeCoefficent">
|
||||
<English>Paradrop Time Coffecient</English>
|
||||
<English>Paradrop Time Coefficient</English>
|
||||
<German>Türlast Zeitfaktor</German>
|
||||
<Japanese>空中投下までの時間係数</Japanese>
|
||||
<Italian>Coefficente Tempo Lancio Paracadute</Italian>
|
||||
@ -312,5 +312,11 @@
|
||||
<Polish>Modyfikator wskazujący jak dużo czasu potrzeba by zrzucić przedmiot na spadochronie.</Polish>
|
||||
<Korean>화물을 공중 투하 하는데 얼마나 걸리는 시간 설정</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_loadTimeCoefficient">
|
||||
<English>Load Time Coefficient</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_loadTimeCoefficient_description">
|
||||
<English>Modifies how long it takes to load/unload items.\nTime, in seconds, is 5 times the size of the item multiplied by this value.</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user