Merge branch 'master' into release-3.11.0

This commit is contained in:
jonpas 2017-10-24 15:40:38 +02:00
commit c2c1ae538a
5 changed files with 54 additions and 21 deletions

View File

@ -30,8 +30,8 @@ private _carriedItem = _unit getVariable [QGVAR(carriedObject), objNull];
//disabled for persons
if (_carriedItem isKindOf "CAManBase") exitWith {false};
private _position = getPosATL _carriedItem;
private _maxHeight = (_unit modelToWorldVisual [0,0,0]) select 2;
private _position = getPosASL _carriedItem;
private _maxHeight = (_unit modelToWorldVisualWorld [0, 0, 0]) select 2;
_position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5)) max _maxHeight];
@ -39,7 +39,7 @@ _position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5))
detach _carriedItem;
// Uses this method of selecting position because setPosATL did not have immediate effect
private _positionChange = _position vectorDiff (getPosATL _carriedItem);
private _positionChange = _position vectorDiff (getPosASL _carriedItem);
private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _carriedItem);
_selectionPosition = _selectionPosition vectorAdd _positionChange;
_carriedItem attachTo [_unit, _selectionPosition];

View File

@ -57,7 +57,7 @@ if (["ace_fastroping"] call EFUNC(common,isModLoaded) && {_hasFRIES > 1}) then {
GVAR(comboBoxes) = [];
{
private _combo = _display ctrlCreate ["ctrlCombo", -1];
private _combo = _display ctrlCreate [QGVAR(CtrlCombo), -1];
private _picturePos = ctrlPosition (_display displayCtrl ID_PICTURE_AIRCRAFT);
private _uiPos = getArray (_x >> "UIposition");
_combo ctrlSetPosition [

View File

@ -1,3 +1,11 @@
// combo box that looks good + doesn't get cut off
class RscCombo;
class GVAR(CtrlCombo): RscCombo {
arrowEmpty = "\a3\3DEN\Data\Controls\ctrlCombo\arrowEmpty_ca.paa";
arrowFull = "\a3\3DEN\Data\Controls\ctrlCombo\arrowFull_ca.paa";
colorSelectBackground[] = {"(profileNamespace getVariable ['GUI_BCG_RGB_R', 0.13])","(profileNamespace getVariable ['GUI_BCG_RGB_G', 0.54])","(profileNamespace getVariable ['GUI_BCG_RGB_B', 0.21])",1};
};
class IGUIBack;
class RscCheckBox;
class RscListBox;

View File

@ -19,12 +19,10 @@ This adds the option to refuel vehicles. The basic concept of refuel a vehicle i
## 2. Usage
### 2.1 Start refueling vehicles
- Interact with the fuel truck <kbd>&nbsp;Win</kbd> (ACE3 default key bind `Interact Key`).
- Interact with the fuel source <kbd>&nbsp;Win</kbd> (ACE3 default key bind `Interact Key`).
- Select `Take fuel nozzle`. Your character will holster his weapon and receive a fuel nozzle.
- Walk to the vehicle you want to refuel and interact with it.
- Select `Connect fuel nozzle`.
- Place the nozzle on the vehicle and interact with it.
- Select `Start fueling`. The vehicle is now being refuel.
- Walk close to the vehicle you want to refuel and follow the instructions on the screen to connect the nozzle.
- Refueling starts automatically after nozzle connecting if possible.
Refueling takes some time which depends on its fuel tank size, the vehicle type and the module settings.
@ -32,8 +30,7 @@ Refueling takes some time which depends on its fuel tank size, the vehicle type
- Interact with the nozzle <kbd>&nbsp;Win</kbd> (ACE3 default key bind `Interact Key`).
- Select `Stop fueling` if refueling is still under way.
- Select `Take fuel nozzle` which is only possible after stopping. Your character will holster his weapon and pick up the fuel nozzle.
- Walk to the fuel truck and interact with it.
- Select `Return fuel nozzle`.
- Walk close to the fuel source and follow the instructions on the screen to return the nozzle.
### 2.3 Checking the remaining fuel
- Interact with the fuel truck <kbd>&nbsp;Win</kbd> (ACE3 default key bind `Interact Key`).
@ -41,14 +38,14 @@ Refueling takes some time which depends on its fuel tank size, the vehicle type
- A hint will display the remaining fuel in liters.
### 2.4 Checking the fuel counter
- Interact with the fuel truck <kbd>&nbsp;Win</kbd> (ACE3 default key bind `Interact Key`).
- Interact with the fuel source <kbd>&nbsp;Win</kbd> (ACE3 default key bind `Interact Key`).
- Select `Check fuel counter`.
- A hint will display the fueled amount in liters.
## 3. FAQ
### Can I drop the nozzle?
Yes, using the action menu.
Yes, follow the instructions on the screen.
### Can I pick up a nozzle?
Yes, using the interact menu <kbd>&nbsp;Win</kbd> (ACE3 default key bind `Interact Key`).
@ -56,7 +53,7 @@ Yes, using the interact menu <kbd>⊞&nbsp;Win</kbd> (ACE3 default key bind `Int
### The nozzle was dropped. What's wrong?
You can only use the nozzle within a close distance from its source. You may need to park closer.
### The engine of the fuel truck is broken. Why?
### The engine of the fuel truck can't be on. Why?
While refueling, you can't move the fuel truck. Return the nozzle.
### How do I replenish the fuel supply on a fuel truck?

View File

@ -16,8 +16,15 @@ version:
```cpp
class CfgVehicles {
class MyFuturisticMBT {
ace_refuel_fuelCapacity = 3000; // set to correct path static model
class MyFuelTruck {
ace_refuel_fuelCargo = 3000; // Fuel cargo
ace_refuel_hooks[] = {{0.38,-3.17,-.7},{-0.41,-3.17,-.7}}; // Nozzle hooks positions
};
class MyCar {
ace_refuel_fuelCapacity = 100; // Fuel tank volume
};
class MyElectricCar {
ace_refuel_canReceive = 0; // For vehicles which can't be refueled
};
};
```
@ -62,7 +69,7 @@ class CfgVehicles {
| Arguments | Explanation
---| --------- | -----------
0 | `can` | My jerry can object
0 | `can` | My jerry can object
The jerry can will have the default 20 liters volume.
@ -72,8 +79,8 @@ The jerry can will have the default 20 liters volume.
| Arguments | Explanation
---| --------- | -----------
0 | `can` | My jerry can object
1 | `200` | Vehicle class name
0 | `can` | My jerry can object
1 | `200` | Vehicle class name
The jerry can will now have a volume of 200 liters.
@ -93,5 +100,26 @@ The jerry can will now have a volume of 200 liters.
| Arguments | Explanation
---| --------- | -----------
0 | `fuelTruck` | My fuel truck object
1 | `428` | New fuel supply
0 | `fuelTruck` | My fuel truck object
1 | `428` | New fuel supply
### 2.4 Make an object into a refuel source
*Added in ACE3 3.11.0*
`ace_refuel_fnc_makeSource`
| Arguments | Type | Optional (default value)
---| --------- | ---- | ------------------------
0 | Fuel Source | Object | Required
1 | Amount (in liters) | Number | Optional (default: `0`)
2 | Hooks positions | Array | Optional (default: `[[0,0,0]]`)
**R** | None | None | Return value
#### 2.4.1 Example
`[cursorObject, 100] call ace_refuel_fnc_makeSource`
| Arguments | Explanation
---| --------- | -----------
0 | `cursorObject` | Fuel source object
1 | `100` | Fuel supply