Documented 0.9.21 functions onGirderPlacement and onRubberPlacement.
--- a/LuaAPI.wiki Wed Dec 03 01:42:49 2014 +0000
+++ b/LuaAPI.wiki Wed Dec 03 01:59:50 2014 +0000
@@ -254,6 +254,35 @@
<blockquote>This function is called when a hedgehog is restored (unhidden).<blockquote>
+=== <tt>onGirderPlacement(frameIdx, centerX, centerY)</tt> (0.9.21) ===
+This function is called when a girder has been placed.
+
+`frameIdx` is an integer and declares the length and orientation of the girder:
+|| `frameIdx` || length || orientation ||
+|| 0 || short || horizontal ||
+|| 1 || short || decreasing right ||
+|| 2 || short || vertical ||
+|| 3 || short || increasing right ||
+|| 4 || long || horizontal ||
+|| 5 || long || decreasing right ||
+|| 6 || long || vertical ||
+|| 7 || long || increasing right ||
+
+`centerX` and `centerY` are the coordinates of the girder’s center.
+
+=== <tt>onRubberPlacement(frameIdx, centerX, centerY)</tt> (0.9.21) ===
+This function is called when a rubber has been placed.
+
+`frameIdx` is an integer which stands for the orientation of the rubber.
+
+|| `frameIdx` || orientation ||
+|| 0 || horizontal ||
+|| 1 || decreasing right ||
+|| 2 || vertical ||
+|| 3 || increasing right ||
+
+`centerX` and `centerY` are the coordinates of the rubber’s center.
+
== Functions for creating gears ==
=== <tt>!AddGear(x, y, gearType, state, dx, dy, timer)</tt> ===