Commit a4ffdab6 authored by Ryan Grupp's avatar Ryan Grupp
Browse files

Update documentation

parent c10a3edd
......@@ -44,6 +44,7 @@ You're now free to make edits to this file however you wish. __Note: Do not edit
| [\_core\_](#module-core) | |
| [Ambient Sounds](#module-ambient-sounds) | ✓ |
| [Car Radio](#module-car-radio) | |
| [CBRN](#module-cbrn) | ✓ |
| [Components](#module-components) | |
| [LZ Select](#module-lz-select) | |
| [Spectrum Device](#module-spectrum-device) | ✓ |
......@@ -159,6 +160,21 @@ Arguments:
### Module - CBRN
CBRN module adds NBC threats to the mission, and ways for player to protect themselves from it.
<br>
<br>
### Module - Components
<dl>
......@@ -433,6 +449,33 @@ Arguments:
Spectrum Device module manipulates the device of the same name, displaying signals based on their location.
<dl>
<dd><h4>Config Reference</h4></dd>
<dd>
<details>
<summary><strong>tsm_configuration.hpp</strong></summary>
| __Config Setting__ | __Type__ | __Description__ |
| ------------------------- | -------- | --------------- |
| scanRange | Array | Frequency range for the device to display. If 2 elements, the minimum and the maximum. If no elements, use range from attached antenna. |
| requireAntenna | Integer | If the device should require an attached antenna to operate. |
| selectionRange | Float | Width of the selection range as a percentage of the full display width. |
| angleRestriction | Integer | Cone in front of the device it can detect signals, outside of which the signal is non-existent. `360` to disable. |
| angleDegradation | Float | The percentage of power displayed that a signal emits, at off angle the maximum amount. |
| updateFrequency | Float | How often the device display updates, in seconds. |
| maxDistance | Integer | Max distance at which a signal can be detected, in meters. |
| hookAllPowerVarsByDefault | Integer | Auto creates variable names to modify it's signal power:<ul><li>__0__ - Disable _(default)_</li><li>__1__ - Auto-create variables</li></ul>
| garbageCollectTimer | Integer | Number of seconds between between checking for dead signals, and removing them from the global process list, `-1` disables. |
| monitorSelectedSignals | Integer | Enables the signal selection monitor thread to call events on change:<ul><li>__0__ - Disable _(default)_</li><li>__1__ - Monitor Signals</li></ul> |
<br>
<br>
</details>
</dd>
</dl>
<br>
<dl>
<dd><h4>Function Reference</h4></dd>
......@@ -478,6 +521,44 @@ Arguments:
<dd>
<details>
<summary><strong>tsm_spectrum_device_fnc_getSignalsInSelection</strong></summary>
Returns an array of all signals inside of the spectrum device selection area. _(Should run local to the player.)_
Arguments:
* __None__
```sqf
private _signals = call tsm_spectrum_device_fnc_getSignalsInSelection;
```
<br>
<br>
</details>
</dd>
<dd>
<details>
<summary><strong>tsm_spectrum_device_fnc_getSignalInSelectionClosest</strong></summary>
Returns the signal closest to the center of the spectrum device selection area. Returns nil if no signals in in selection. _(Should run local to the player.)_
Arguments:
* __None__
```sqf
private _signal = call tsm_spectrum_device_fnc_getSignalInSelectionClosest;
```
<br>
<br>
</details>
</dd>
<dd>
<details>
<summary><strong>tsm_spectrum_device_fnc_noise</strong></summary>
......@@ -514,6 +595,43 @@ call tsm_spectrum_device_fnc_noiseStop;
</details>
</dd>
</dl>
<br>
<dl>
<dd><h4>Event Reference</h4></dd>
<dd>
<details>
<summary><strong>tsm_spectrum_device_signalMonitorChanged</strong></summary>
Called whenever the signal closest to the center of the selection range changes. _(Only functions when `monitorSelectedSignals` is set to `1` in configuration.)_
Arguments:
* __Old Signal__ <sub>_(array|boolean)_</sub>
* The signal previous in the center of the range, otherwise `false` if there was none.
* __New Signal__ <sub>_(array|boolean)_</sub>
* The signal that is now in the center of the range, otherwise `false` if there is none.
```sqf
['tsm_spectrum_device_signalMonitorChanged', {
params ['_old', '_new'];
if (_new isEqualTo 'CT_2') exitWith {
true call fnc_play_song;
};
if (_old isEqualTo 'CT_2') exitWith {
call fnc_stop_song;
};
}] call CBA_fnc_addEventHandler;
```
<br>
<br>
</details>
</dd>
</dl>
<br>
<br>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment