Cargo - Add documentation on adding cargo via config (#9994)

* Fix bag of holdings in cargo

* Update CfgVehicles.hpp

* Update CfgVehicles.hpp

* Revert space changes
This commit is contained in:
johnb432 2024-05-22 03:16:05 +02:00 committed by GitHub
parent a31608073e
commit db2bf60c28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 10 deletions

View File

@ -48,15 +48,7 @@ class CfgVehicles {
class Car: LandVehicle {
GVAR(space) = 4;
GVAR(hasCargo) = 1;
class ACE_Cargo {
/*
class Cargo {
class ACE_medicalSupplyCrate {
type = "ACE_medicalSupplyCrate";
amount = 1;
};
};*/
};
class ADDON {};
};
class Tank: LandVehicle {
@ -75,7 +67,7 @@ class CfgVehicles {
GVAR(hasCargo) = 1;
};
// HEMTTs - Default at 10, some variants are altered based on model size and/or expected level of free space inside.
// HEMTTs - Default at 30, some variants are altered based on model size and/or expected level of free space inside.
class Truck_01_base_F: Truck_F {
GVAR(space) = 30;
};
@ -523,6 +515,7 @@ class CfgVehicles {
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
};
GVAR(space) = 3;
GVAR(hasCargo) = 1;
GVAR(size) = 3;

View File

@ -47,6 +47,24 @@ class CfgVehicles {
<p>ace_cargo_hasCargo and ace_cargo_canLoad are only needed if you aren't inheriting from any of BI base classes or if you are trying to disable loading for a specific vehicle / object.</p>
</div>
### 1.3 Adding predefined cargo via config
```cpp
class CfgVehicles {
class yourVehicleClass {
ace_cargo_space = 4; // Add if necessary
ace_cargo_hasCargo = 1; // Add if necessary
class ace_cargo {
class cargo {
class ACE_medicalSupplyCrate { // Doesn't have to have the same name as the item you're adding
type = "ACE_medicalSupplyCrate";
amount = 1;
};
};
};
};
};
```
## 2. Events