mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cargo - Add ability to disabled rename on object level (#8740)
* Rename can be disabled on object level - Added ability to stop renaming on object level _Needs testing_ * Fixed extra () * Forgot one of the ) * Update cargo-framework.md Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
f21a5e49d7
commit
00f35a3dae
@ -101,7 +101,7 @@ GVAR(objectActions) = [
|
|||||||
{(_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad))]) in [true, 1]} &&
|
{(_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad))]) in [true, 1]} &&
|
||||||
{alive _target} &&
|
{alive _target} &&
|
||||||
{[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} &&
|
{[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} &&
|
||||||
{(getNumber ((configOf _target) >> QGVAR(noRename))) == 0}
|
{(_target getVariable [QGVAR(noRename), getNumber (configOf _target >> QGVAR(noRename))]) in [false, 0]}
|
||||||
}
|
}
|
||||||
] call EFUNC(interact_menu,createAction),
|
] call EFUNC(interact_menu,createAction),
|
||||||
[QGVAR(load), localize LSTRING(loadObject), "a3\ui_f\data\IGUI\Cfg\Actions\loadVehicle_ca.paa",
|
[QGVAR(load), localize LSTRING(loadObject), "a3\ui_f\data\IGUI\Cfg\Actions\loadVehicle_ca.paa",
|
||||||
|
@ -28,8 +28,8 @@ class CfgVehicles {
|
|||||||
### 1.2 Making an object loadable
|
### 1.2 Making an object loadable
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
class staticBananaLauncher {
|
class CfgVehicles {
|
||||||
class yourVehicleBaseClass {
|
class staticBananaLauncher {
|
||||||
ace_cargo_size = 4; // Cargo space the object takes
|
ace_cargo_size = 4; // Cargo space the object takes
|
||||||
ace_cargo_canLoad = 1; // Enables the object to be loaded (1-yes, 0-no)
|
ace_cargo_canLoad = 1; // Enables the object to be loaded (1-yes, 0-no)
|
||||||
ace_cargo_noRename = 1; // Blocks renaming object (1-blocked, 0-allowed)
|
ace_cargo_noRename = 1; // Blocks renaming object (1-blocked, 0-allowed)
|
||||||
@ -162,3 +162,9 @@ Note first arg can be a in-game object or a classname of an object type.
|
|||||||
* ["ACE_Wheel", vehicle, 2] call ace_cargo_fnc_removeCargoItem
|
* ["ACE_Wheel", vehicle, 2] call ace_cargo_fnc_removeCargoItem
|
||||||
* [crate_7, truck] call ace_cargo_fnc_removeCargoItem
|
* [crate_7, truck] call ace_cargo_fnc_removeCargoItem
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 4.7 Disable cargo renaming via script
|
||||||
|
|
||||||
|
```sqf
|
||||||
|
cargoBox setVariable ["ace_cargo_noRename", true]
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user