Commit Graph

6481 Commits

Author SHA1 Message Date
c1e151ac19 Improved the expression parser's optimizer.
Added optimizers for Conditional, For, SimpleFor and While.
Improved the Sequence optimizer.
Removed the optimizer TODOs from Break and Return.
2011-11-24 21:00:09 +01:00
05b427316d Changed signature of the optimize() method to return an RValue. 2011-11-24 20:50:07 +01:00
7cbb7da80b Added the ternary operator. 2011-11-24 20:04:42 +01:00
9456c9e58f Expression parser improvements
- Fixed calling nullary functions.
- Improved error reporting for missing functions
- Added random() and randint(max)
- Improved Sequence.optimize() to eliminate statements with no effect
- Adjusted a comment
2011-11-24 11:05:41 +01:00
adf326e2bf Renamed some variables and adjusted some comments in ArbitraryShape. 2011-11-24 11:01:24 +01:00
d69b04caf5 Added some element comments to ArbitraryShape. 2011-11-24 04:06:14 +01:00
dfb729d5f1 Added license blocks and element comments to all expression parser classes.
Also updated some terminology
2011-11-24 03:55:06 +01:00
71287299b5 Added a simple for loop to the expression parser.
Syntax: for (counter = first, last) { body }
Also added a test case.
2011-11-24 02:35:19 +01:00
7e13b60a51 Cleanup 2011-11-23 04:48:40 +01:00
1a57f6e95d Added return, break and continue. 2011-11-22 18:51:19 +01:00
efc2209c0f Prevented overwriting built-in constants. 2011-11-22 17:47:44 +01:00
5ef9df7feb Made it possible to leave parts of a for statement empty. 2011-11-22 16:56:41 +01:00
e6e31d0b93 Moved some code around 2011-11-22 16:35:56 +01:00
effbf9f79c Added for loops to the expression parser, java style.
Also:
- Added a test case for for
- Fixed Identifiable.id() for the runtime Nodes and added missing elements to the list in Identifiable.java.
- Factored keyword and character consumption into a common function.
2011-11-22 16:08:15 +01:00
f217be0bdf Added while loops to the expression parser.
Also added a test case.
Iterations are currently limited to 256 maximum.
2011-11-22 06:16:23 +01:00
aa43975e34 Added support for if/else to the expression parser. Basically same syntax as Java.
Also added a test case.
2011-11-22 05:12:32 +01:00
5071885d10 Expression parser: Extended the index range of the megabuf function and renamed it to gmegabuf 2011-11-22 02:33:01 +01:00
c6fee413dc Changed BukkitWorld.killMobs, so it compiles with the latest RB again.
Also increased forward compatibility as a side-effect.
2011-11-21 06:21:21 +01:00
19194ccb88 Made //butcher apply to enderdragons 2011-11-20 19:31:13 -05:00
0c9c213e4e Added support for assignable function results.
Also:
- Added megabuf(index) as a first, temporary example
- Introduced a new Node class at the top of the hierarchy for the runtime.
- RValue and LValue are now interfaces
- Narrowed down some exception declarations
- Optimized the optimizer for functions
2011-11-20 17:41:38 +01:00
7812d8f5f8 Cleanup and refactorings 2011-11-20 06:02:54 +01:00
feee529095 Improved error reporting for number format errors. 2011-11-20 05:31:18 +01:00
cf30a63018 Further cleanup of input handlers.
Slight deviation from previous behaviour:
Wand and navigation wand can no longer be used as ordinary tool binds.
However, these are already blocked elsewhere anyway, so it is unimportant.
2011-11-20 02:00:12 +01:00
71d302c893 Removed fix for issue #376, since the problem appears to have been fixed on the CraftBukkit side now.
Also cleaned up the input handlers a bit.
2011-11-20 01:45:25 +01:00
1194f4448e Fixed the unused Polygonal2DSelection(List, int, int) constructor. 2011-11-19 15:09:28 +01:00
13f36757c2 Fixed compass teleporting twice on cliff edges 2011-11-16 16:54:05 +01:00
927cab001e Fixed a few bugs with permissions resolver loading. 2011-11-15 20:38:23 -08:00
86dfa3dce8 Cleaned up WorldEditPlayerListener.onPlayerInteract. 2011-11-13 15:17:08 +01:00
a3946dc8c4 Typo fix.
Thanks, Moo0
2011-11-13 15:00:41 +01:00
c29856f5a8 Added a registration method that returns information about successfully registered commands 2011-11-11 15:47:50 -08:00
256897f473 Added seperate permissions for jumpto/thru commands and tools 2011-11-11 15:39:42 -08:00
0a4cbd435f The permissions resolver needs to be loaded! 2011-11-10 19:36:57 -08:00
ae3adae8a8 Disabled fast lighting until the issues are resolved. 2011-11-09 02:49:24 +01:00
04b7f40f46 Renamed some local variables in WorldEdit.getblock.
Also added a note about a potential concurrency problem i stumbled upon.
2011-11-05 18:09:50 +01:00
af1c600fc9 Non-leaf blocks should no longer show up as leaves in the inventory when using block bags. 2011-11-05 17:58:51 +01:00
e72f84f08f Leaves can now be stored in a block bag. 2011-11-04 19:39:05 +01:00
3ed5841863 The block bag fetch/place mapping is now taken from BlockType.getBlockBagItem. 2011-11-04 16:56:53 +01:00
7beac92232 Added a deprecated delegate for storeDroppedBlock. 2011-11-04 16:39:56 +01:00
2d0880e38d Piston extension and moving piece now put nothing into the blockbag. 2011-11-04 13:53:21 +01:00
8e368ceef1 Employed a set of consistent rules for getDroppedBlock(type, data) and renamed it to getBlockBagItem. 2011-11-04 13:27:51 +01:00
d9b8285a35 Made ItemType.usesDamageValue a bit more sane. 2011-11-03 18:34:20 +01:00
ff39121fc8 Begun adding support for data/damage values to the blockbag. 2011-11-03 15:51:23 +01:00
429bfe9faa Added BlockType.getDroppedBlock(int type, int data)
It currently still ignores the data value, but there's a framework in place to add data values.
2011-11-03 15:51:22 +01:00
04803de8b1 Fixed some NPE's for block types not in BlockType. 2011-11-02 22:51:48 -07:00
4c05050d73 Improved /we version output for dev builds. 2011-11-02 17:23:45 +01:00
a51bc28756 Added true and false constants to the expression parser. 2011-11-02 15:29:55 +01:00
c2cd587a9b Added support for functions that take LValues and added rotate(x&,y&,angle) 2011-11-02 03:41:35 +01:00
ff03d03fd7 Cleanup 2011-11-02 03:41:22 +01:00
187896c5ed Made //deform round the results before lookup and fixed some potential issues. 2011-11-02 03:39:02 +01:00
2edf3559d8 EditSession: Split off a queueFinal, which contains only blocks that can be attached to other attached blocks.
This a speed improvement, since the recursive attachment checker turned out to be quite slow.
2011-11-01 21:58:50 +01:00