1
0
Fork 0

Updated the api.md file

mobile_bow_workaround
the-real-herowl 2023-12-10 00:26:21 +01:00 committed by the-real-herowl
parent 5bf6608483
commit 08241f6ea3
1 changed files with 14 additions and 10 deletions

View File

@ -1,13 +1,13 @@
### FOV API ### FOV API
<!-- TOC --> <!-- TOC -->
* [FOV API](#fov-api) * [FOV API](#fov-api)
* [Description](#description) * [Description](#description)
* [Troubleshooting](#troubleshooting) * [Troubleshooting](#troubleshooting)
* [Modifier Definition](#modifier-definition-) * [Modifier Definition](#modifier-definition-)
* [Global MCL_FOVAPI Tables](#global-mclfovapi-tables) * [Global MCL_FOVAPI Tables](#global-mclfovapi-tables)
* [Namespaces](#namespaces) * [Namespaces](#namespaces)
* [Functions](#functions) * [Functions](#functions)
<!-- TOC --> <!-- TOC -->
#### Description #### Description
@ -20,20 +20,24 @@ Use it to see what is going on.
#### Modifier Definition #### Modifier Definition
```lua ```lua
def = { def = {
modifer_name = name, name = name,
fov_factor = fov_factor, fov_factor = fov_factor,
time = time, time = time,
reset_time = reset_time,
is_multiplier = is_multiplier, is_multiplier = is_multiplier,
exclusive = exclusive, exclusive = exclusive,
on_start = on_start, on_start = on_start,
on_end = on_end, on_end = on_end,
} }
``` ```
* Modifier Name: The name of the Modifier, used to identify the specific modifier. Case sensitive. * Name: The name of the Modifier, used to identify the specific modifier. Case sensitive.
* FOV Factor: A float value defining the FOV to apply. Can be an absolute or percentage, depending on Exclusive and * FOV Factor: A float value defining the FOV to apply. Can be an absolute or percentage, depending on Exclusive and
Is_Multiplier. Is_Multiplier.
* Time: A float value defining the number of seconds to take when applying the FOV Factor. * Time: A float value defining the number of seconds to take when applying the FOV Factor.
Used to smoothly move between FOVs. Use 0 for an immediate FOV Shift. (Transition time.) Used to smoothly move between FOVs. Use 0 for an immediate FOV Shift. (Transition time.)
* Reset Time: A float value defining the number of seconds to take when removing the FOV Factor.
Used to smoothly move between FOVs. Use 0 for an immediate FOV Shift. (Reset transition time.)
*If not provided, defaults to **Time***
* Is Multiplier: A bool value used to specify if the FOV Factor is an absolute FOV value or if it should be a percentage * Is Multiplier: A bool value used to specify if the FOV Factor is an absolute FOV value or if it should be a percentage
of the current FOV. Defaults to `true` if not defined. of the current FOV. Defaults to `true` if not defined.
* Exclusive: A bool value used to specify whether the modifier will override all other FOV modifiers. An example of this * Exclusive: A bool value used to specify whether the modifier will override all other FOV modifiers. An example of this
@ -60,7 +64,7 @@ settings. (Expressed as a value usable in `player:set_fov`.)
`mcl_fovapi` is the default API Namespace. `mcl_fovapi` is the default API Namespace.
#### Functions #### Functions
`mcl_fovapi.register_modifier(name, fov_factor, time, is_multiplier, exclusive, on_start, on_end)` `mcl_fovapi.register_modifier(def)`
Used to register a new FOV Modifier for use. Must be called before applying said modifier to a player. Used to register a new FOV Modifier for use. Must be called before applying said modifier to a player.
See Modifier Definition for what the parameters are. See Modifier Definition for what the parameters are.