equal
deleted
inserted
replaced
1 #summary Lua library documentation: Utils 
1 #summary Lua library documentation: Utils 
2 #labels !LuaLibrary 
2 #labels !LuaLibrary 
3 = Lua library: `Utils` = 
3 = Lua library: `Utils` = 
4 

5 **NOTE: Documentation of this library is incomplete, some functions are still undocumented.** 

6 
4 
7 This library includes miscellaneous functions to use, they are all independent of each other and can be used everywhere. 
5 This library includes miscellaneous functions to use, they are all independent of each other and can be used everywhere. 
8 
6 
9 == `gearIsInBox(gear, x, y, w, h)` == 
7 == `gearIsInBox(gear, x, y, w, h)` == 
10 
8 
12 
10 
13 
11 
14 == `gearIsInCircle(gear, x, y, r, useRadius)` == 
12 == `gearIsInCircle(gear, x, y, r, useRadius)` == 
15 
13 
16 Returns whether the gear is inside a circle with x and y being the centre point and r being the radius of the circle. The boolean useRadius determine whether only the centre point of the gear will be used or the radius of the gear will be checked too. 
14 Returns whether the gear is inside a circle with x and y being the centre point and r being the radius of the circle. The boolean useRadius determine whether only the centre point of the gear will be used or the radius of the gear will be checked too. 

15 

16 == `fillMap(flush)` == 

17 Completely fill the current map with land. Requires `MapGen` to be set to `mgDrawn`. `FlushPoints()` will be called at the end, unless `flush` is set to `false`. 

18 

19 == `eraseMap(flush)` == 

20 Completely erase all land from drawn maps. Requires `MapGen` to be set to `mgDrawn`. `FlushPoints()` will be called at the end, unless `flush` is set to `false`. 