Fix refuel documentation (#5547)

* Update refuel.md

* Update refuel-framework.md

* Fix refuel-framework.md

* Fix refuel.md

* Add version note

* Fix version note

* Fix hooks
This commit is contained in:
Dystopian 2017-10-24 15:39:32 +02:00 committed by jonpas
parent b45a7e2413
commit 1936343428
2 changed files with 42 additions and 17 deletions

View File

@ -19,12 +19,10 @@ This adds the option to refuel vehicles. The basic concept of refuel a vehicle i
## 2. Usage ## 2. Usage
### 2.1 Start refueling vehicles ### 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. - 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. - Walk close to the vehicle you want to refuel and follow the instructions on the screen to connect the nozzle.
- Select `Connect fuel nozzle`. - Refueling starts automatically after nozzle connecting if possible.
- Place the nozzle on the vehicle and interact with it.
- Select `Start fueling`. The vehicle is now being refuel.
Refueling takes some time which depends on its fuel tank size, the vehicle type and the module settings. 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`). - Interact with the nozzle <kbd>&nbsp;Win</kbd> (ACE3 default key bind `Interact Key`).
- Select `Stop fueling` if refueling is still under way. - 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. - 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. - Walk close to the fuel source and follow the instructions on the screen to return the nozzle.
- Select `Return fuel nozzle`.
### 2.3 Checking the remaining fuel ### 2.3 Checking the remaining fuel
- Interact with the fuel truck <kbd>&nbsp;Win</kbd> (ACE3 default key bind `Interact Key`). - 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. - A hint will display the remaining fuel in liters.
### 2.4 Checking the fuel counter ### 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`. - Select `Check fuel counter`.
- A hint will display the fueled amount in liters. - A hint will display the fueled amount in liters.
## 3. FAQ ## 3. FAQ
### Can I drop the nozzle? ### Can I drop the nozzle?
Yes, using the action menu. Yes, follow the instructions on the screen.
### Can I pick up a nozzle? ### Can I pick up a nozzle?
Yes, using the interact menu <kbd>&nbsp;Win</kbd> (ACE3 default key bind `Interact Key`). 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? ### 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. 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. While refueling, you can't move the fuel truck. Return the nozzle.
### How do I replenish the fuel supply on a fuel truck? ### How do I replenish the fuel supply on a fuel truck?

View File

@ -16,8 +16,15 @@ version:
```cpp ```cpp
class CfgVehicles { class CfgVehicles {
class MyFuturisticMBT { class MyFuelTruck {
ace_refuel_fuelCapacity = 3000; // set to correct path static model 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 | Arguments | Explanation
---| --------- | ----------- ---| --------- | -----------
0 | `can` | My jerry can object 0 | `can` | My jerry can object
The jerry can will have the default 20 liters volume. 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 | Arguments | Explanation
---| --------- | ----------- ---| --------- | -----------
0 | `can` | My jerry can object 0 | `can` | My jerry can object
1 | `200` | Vehicle class name 1 | `200` | Vehicle class name
The jerry can will now have a volume of 200 liters. 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 | Arguments | Explanation
---| --------- | ----------- ---| --------- | -----------
0 | `fuelTruck` | My fuel truck object 0 | `fuelTruck` | My fuel truck object
1 | `428` | New fuel supply 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