CryptoCode
-
Posts
2 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Articles
Store
Posts posted by CryptoCode
-
-
Area Maker
in Other
Hello all
This is a simple script that generates the code for Area objects to use in your own scripts
https://github.com/d1g1talcypher/areamaker
Area Maker
in Other
Posted · Edited by CryptoCode
I updated the code to include an "inclusive" mode.
By default, and if you were to manually create the Area object as you normally would, the northern and eastern boundaries are not included. This is an implementation decision on Java's part in how they handle shapes, and is thus reflected in the way EpicBot's Area class works.
Since I found this unintuitive, I added the option to "include" the boundaries. To make this work, when inclusive mode is enabled, the set of Tiles output is NOT identical to the set of Tiles selected; rather I generated a new set of Tiles that build an Area that includes the selected Tiles.
I feel this option is more intuitive, and allows you to define Areas more predictably.
Feedback is appreciated!