Skip to content

Commit

Permalink
Fix some event names on wiki (#5254)
Browse files Browse the repository at this point in the history
* Fix some event names on wiki

* Switch callable events to functions
  • Loading branch information
PabstMirror authored Jun 8, 2017
1 parent 225d15d commit 847832c
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 20 deletions.
2 changes: 1 addition & 1 deletion addons/cargo/functions/fnc_loadItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Example:
* [object, vehicle] call ace_cargo_fnc_loadItem
*
* Public: No
* Public: Yes
*/
#include "script_component.hpp"

Expand Down
5 changes: 3 additions & 2 deletions addons/cargo/functions/fnc_unloadItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
* Arguments:
* 0: Item <OBJECT or STRING>
* 1: Vehicle <OBJECT>
* 2: Unloader <OBJECT> (default: objNull)
*
* Return Value:
* Object unloaded <BOOL>
* Object was unloaded <BOOL>
*
* Example:
* [object, vehicle] call ace_cargo_fnc_unloadItem
*
* Public: No
* Public: Yes
*/
#include "script_component.hpp"

Expand Down
50 changes: 37 additions & 13 deletions docs/wiki/framework/cargo-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,10 @@ class staticBananaLauncher {

### 2.1 Listenable

Event Name | Description | Passed Parameter(s) | Locality
Event Name | Passed Parameter(s) | Locality | Description
---------- | ----------- | ------------------- | --------
`cargoLoaded` | Cargo has been loaded | ` [_item, _vehicle]` | Global
`cargoUnloaded` | Cargo has been unloaded | `[_item, _vehicle]` | Global
`cargoAddedByClass` | Cargo items have been added | `[_itemClass, _vehicle, _amount]` | Global

### 2.2 Callable

Event Name | Description | Passed Parameter(s) | Locality
---------- | ----------- | ------------------- | --------
`LoadCargo` | Load object into vehicle. | `[_object, _vehicle, _showHint]` | Local
`UnloadCargo` | Unload object from vehicle. | `[_object, _vehicle]` | Local
`AddCargoByClass` | Adds a cargo item to the vehicle. | `[_itemClass, _vehicle, _amount, _showHint]` | Local

`ace_cargoLoaded` | [_item, _vehicle] | Global | Cargo has been Loaded into vehicle
`ace_cargoUnloaded` | [_item, _vehicle] | Global | Cargo has been Unloaded from vehicle

## 3. Scripting

Expand All @@ -70,3 +60,37 @@ To disable cargo for a mission object use:
```cpp
this setVariable ["ace_cargo_size", -1];
```

### 3.2 Add cargo to vehicle

`ace_cargo_fnc_loadItem` (Also callable from cba event `ace_loadCargo`)
Note first arg can be a in-game object or a classname of an object type.

```cpp
* Arguments:
* 0: Item <OBJECT or STRING>
* 1: Vehicle <OBJECT>
*
* Return Value:
* Object loaded <BOOL>
*
* Example:
* [object, vehicle] call ace_cargo_fnc_loadItem
```

### 3.3 Unload cargo from vehicle

`ace_cargo_fnc_unloadItem` (Also callable from cba event `ace_unloadCargo`)

```cpp
* Arguments:
* 0: Item <OBJECT or STRING>
* 1: Vehicle <OBJECT>
* 2: Unloader <OBJECT> (default: objNull)
*
* Return Value:
* Object was unloaded <BOOL>
*
* Example:
* [object, vehicle] call ace_cargo_fnc_unloadItem
```
4 changes: 2 additions & 2 deletions docs/wiki/framework/goggles-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ class CfgGlasses {
Event Name | Description | Passed Parameter(s) | Locality
---------- | ----------- | ------------------- | --------
`GlassesChanged` | Glasses Changed | `[_glassesClass]` | Local
`GlassesCracked` | Glasses Cracked | `[_unit]` | Local
`ace_glassesChanged` | Glasses Changed | `[_unit, _glassesClass]` | Local
`ace_glassesCracked` | Glasses Cracked | `[_unit]` | Local
2 changes: 1 addition & 1 deletion docs/wiki/framework/overpressure-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ class CfgWeapons {

Event Name | Description | Passed Parameter(s) | Locality
---------- | ----------- | ------------------- | --------
`overpressure` | Overpressure damage inflicted | `[_firer, _position, _direction, _weapon]` | Target
`ace_overpressure` | Overpressure damage inflicted | `[_firer, _posASL, _direction, _weapon, _magazine, _ammo]` | Target
2 changes: 1 addition & 1 deletion docs/wiki/framework/reloadlaunchers-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ class CfgWeapons {
Event Name | Description | Passed Parameter(s) | Locality
---------- | ----------- | ------------------- | --------
`reloadLauncher` | Launcher reloaded | `[_unit, _target, _weapon, _magazine]` | Target
`ace_reloadlaunchers_reloadLauncher` | Launcher reloaded | `[_unit, _target, _weapon, _magazine]` | Target

0 comments on commit 847832c

Please sign in to comment.