Teardown-Issue-Tracker-Maintainers / Teardown-Issue-Tracker

A public repo for the community to track issues/bugs/feature requests in Teardown.
12 stars 5 forks source link

[Documentation] Scripting API XML rename a parameter #197

Closed CrazyFluffyPony closed 2 years ago

CrazyFluffyPony commented 2 years ago

Document to improve

"end" is not a valid parameter name in Lua (because it's a keyword).

https://www.teardowngame.com/modding/api.xml

<function name="QueryPath">
    <input name="start" type="table" optional="false" desc="World space start point"/>
    <input name="end" type="table" optional="false" desc="World space target point"/>
    <input name="maxDist" type="number" optional="true" desc="Maximum path length before giving up. Default is infinite."/>
    <input name="targetRadius" type="number" optional="true" desc="Maximum allowed distance to target in meters. Default is 2.0"/>
</function>

Enhancement

Rename parameter name to "target" which would match the wording used in the parameters description.

tuxedolabs commented 2 years ago

Parameter name is only for documentation and not meant to be used, but sure... should be something else