# HG changeset patch # User almikes@aol.com # Date 1417571990 0 # Node ID 1e7586c110f62cce227f04e11d0a4035f3425518 # Parent aee281298267ebb167274d96729b82bf0b38e4cc Documented 0.9.21 functions onGirderPlacement and onRubberPlacement. diff -r aee281298267 -r 1e7586c110f6 LuaAPI.wiki --- 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 @@
This function is called when a hedgehog is restored (unhidden).+=== onGirderPlacement(frameIdx, centerX, centerY) (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. + +=== onRubberPlacement(frameIdx, centerX, centerY) (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 == === !AddGear(x, y, gearType, state, dx, dy, timer) ===