Edited wiki page LuaAPI through web user interface.
authorhenrik.rostedt
Sat, 11 Dec 2010 23:58:34 +0000
changeset 68 fd230628d72c
parent 67 eecbb1c261bb
child 69 48f6e6c0076d
Edited wiki page LuaAPI through web user interface.
LuaAPI.wiki
--- a/LuaAPI.wiki	Wed Dec 08 21:10:16 2010 +0000
+++ b/LuaAPI.wiki	Sat Dec 11 23:58:34 2010 +0000
@@ -57,7 +57,7 @@
 <blockquote>This function is called on every game tick, i.e. 1000 times a second.
 </blockquote>
 
-=== <tt>onNewTurn()</tt> ===
+=== <tt>onNewTurn()</tt> (dev) ===
 
 <blockquote>This function calls at the start of every turn.
 </blockquote>
@@ -71,7 +71,7 @@
 <blockquote>This function is called when a new gear is deleted. Useful in
 combination with <tt>!GetGearType(gearUid)</tt>.
 </blockquote>
-=== <tt>onGearDamage(gearUid, damage)</tt> ===
+=== <tt>onGearDamage(gearUid, damage)</tt> (dev) ===
 
 <blockquote>This function is called when a gear is damaged.
 </blockquote>
@@ -84,7 +84,7 @@
             !AddCaption(!GetHogName(gear) .. ' took ' .. damage .. ' points of damage')
         end
     end</code>
-=== <tt>onGearResurrect(gearUid)</tt> ===
+=== <tt>onGearResurrect(gearUid) (dev)</tt> ===
 
 <blockquote>This function is called when a gear is resurrected. CPU Hogs will resurrect if gfAISurvival is included in !GameFlags. Alternatively, specific gears can have heResurrectable set to true via !SetEffect.
 </blockquote>
@@ -203,7 +203,7 @@
 <blockquote>returns the bot level from 0 to 5. 0 means human player.
 </blockquote>
 
-=== <tt>!GetVisualGearValues(vgUid)</tt> ===
+=== <tt>!GetVisualGearValues(vgUid)</tt> (dev) ===
 
 <blockquote>This returns the typically set visual gear values, useful if manipulating things like smoke or bubbles or circles.  It returns the following values:
 X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint 
@@ -225,7 +225,7 @@
 <code lang="lua">    gear = !AddGear(…)
     !DeleteGear(gear) -- Delete the newly created gear.</code>
 
-=== <tt>!DeleteVisualGear(vgUid)</tt> ===
+=== <tt>!DeleteVisualGear(vgUid)</tt> (dev) ===
 
 <blockquote>Deletes a Visual Gear.  Note, most visual gears delete themselves.</blockquote>
 Example:
@@ -234,7 +234,7 @@
     !DeleteVisualGear(vgear) -- Delete the newly created visual gear.</code>
 
 
-=== <tt>!SetVisualGearValues(vgUid, X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint)</tt> ===
+=== <tt>!SetVisualGearValues(vgUid, X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint)</tt> (dev) ===
 
 <blockquote>This allows manipulation of many of the visual gear values.  Calling GetVisualGearValues first is recommended on most visual gears unless you are controlling all the key values.  In the case of vgtCircle, the visual gear values are mapped as follows.  X, Y: position.  State: radius. Timer: Thickness.  FrameTicks: pulsation speed (0 to disable).  dX, dY: min/max pulsation opacity (0-255). Tint: colour, RGBA.
 Most visual gears require little to no modification of parameters.
@@ -373,11 +373,16 @@
 <blockquote>Returns a randomly generated number in the range of 0 to number - 1.  This random number uses the game seed, so is synchronised, and thus safe for multiplayer and saved games.  Use GetRandom for anything that could impact the engine state.  For example, a visual gear can use the Lua random, but adding a regular gear should use GetRandom.
 </blockquote>
 
-=== <tt>!SetWind(windSpeed)</tt> (development) ===
+=== <tt>!SetWind(windSpeed)</tt> (dev) ===
 
 <blockquote>Sets the current wind in the range of -100 to 100. Use together with gfDisableWind for full control.
 </blockquote>
 
+=== <tt>!GetDataPath()</tt> (dev) ===
+
+<blockquote>Returns the path to the data directory, used when adding libraries.
+</blockquote>
+
 == Debugging Functions ==
 
 === <tt>!WriteLnToConsole(string)</tt> (0.9.14) ===