# HG changeset patch
# User almikes@aol.com
# Date 1422220414 0
# Node ID b7dd77a7d356386af73d38fd9821d2d34495f0ac
# Parent b77ffc789732a88e1d19301fb4f325e894ca4789
Add GetFlightTime and SetFlightTime
diff -r b77ffc789732 -r b7dd77a7d356 LuaAPI.wiki
--- a/LuaAPI.wiki Sun Jan 25 20:39:22 2015 +0000
+++ b/LuaAPI.wiki Sun Jan 25 21:13:34 2015 +0000
@@ -402,7 +402,12 @@
Returns radius for the specified gear.
=== !GetGearVelocity(gearUid) ===
-Returns a tuple of dx,dy values for the specified gear
+Returns a tuple of dx,dy values for the specified gear.
+
+=== !GetFlightTime(gearUid) ===
+Returns the `FlightTime` of the specified gear. The `FlightTime` is a gear varialbe used to store a general time interval. The precise meaning of the `FlightTime` depends on the gear type.
+
+For example: The `FlightTime` of a hedgehog (`gtHedgehog`) is the time since they last have stood on solid ground. For most projectile gear types (i.e. `gtShell`), it stores the time after it has been launched.
=== !GetGearElasticity(gearUid) ===
Returns the elasticity of the specified gear. Useful for determining if a hog is on a rope or not. If a hog is attached to a rope, or is busy firing one, the elasticity of the rope will be non-zero.
@@ -609,6 +614,9 @@
=== !SetGearVelocity(gearUid, dx, dy) ===
Gives the specified gear the velocity of `dx`, `dy`.
+=== !SetFlightTime(gearUid, flighttime) ===
+Sets the `FlightTime` of the given gear to `flighttime`. The meaning of `FlightTime` is explained in the section `GetFlightTime`.
+
=== !SetAmmo(ammoType, count, probability, delay, numberInCrate) ===
This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the `onAmmoStoreInit()` event handler.