-
Notifications
You must be signed in to change notification settings - Fork 0
Milestone 0.05
09/23/12 - 10/14/12
- [DONE] find out why aliases can't use variables declared through normal chat input and fix that. (09/24/12)
This occured when the
-lang
parameter was used, which would always create a newScriptEngine
instance. Wrote anEngineController
that manages a pool of engines to assure no accidental instantiation.ScriptEnvironment
can now manage multipleBindings
to differentiate between cui and file context. Also bindings now use GLOBAL_SCOPE although I'm unsure if this achieves anything.
- [DONE] refactor VectorTurtle to use the new systems. (09/25/12)
VectorTurtle now uses the new editing system and is parseable. Also added the
remember
keyword to both turtle dialects to remember the current position, which can then be returned to by callingreset
. I didn't use the ITurtle interface though as I'm unsure if I should use it at all in it's current state. Maybe I should extend Turtle instead, but that would require support for overloaded commands in turtle script - which I'll need anyway for stuff likeblock <string>"block name"
block <integer>blockId
.
- [DONE] check out the weather code and fix the issues (when rain is stopped there still is thunder; on reconnect it immediately starts raining again) (09/27/12)
09/27/12: 10 megaderps and rising! I worked with the ClientWorld the entire time. As it turns out that was doubleplusungood and I'm now asking myself if I should simply mess with the server directly. I asked on #mcp-modding for help about my concurrent modification problem and they pointed out that I shouldn't mess with the server, especially not from the client thread. One guy said I should treat them as different computers - which I absolutely agree with - and exclusively communicate through packets. Thing is there are only a few packet types a client is allowed to send. Even if there was an adequate packet, changing loads of blocks by sending loads of packets sounds inefficient. mcscript has to work from the server thread. This is usually the case for chat commands, but so far the ScriptEnvironment's update method used ModLoader to get called every tick. ModLoader though calls from the client thread...
I think I have to modify the IntegratedServer code to call my update routine. Dedicated servers use bukkit anyway and there are a lot of plugins (worldedit?) that are way better implemented and maintained. Mod compatibility will probably go to hell if I do this, but I'll deal with that later.
So I changed one line of code. Bad thing is it's mc code. I added this to the start of
net.minecraft.src.IntegratedServer.tick()
:
xde.lincore.mcscript.env.ScriptEnvironment.getInstance().onTick();
- write java-docs for all wrapper and edit types that belong to the scripting framework
- write java-docs for everything else when you feel like it :~)
- [DONE] separate the script-interface from minecraft code. (10/11/12)
the spi now uses the Facade classes in .minecraft. Should that become a problem it should be easy to introduce an abstracting interface.
- [DONE] move all code that accesses minecraft code to .mcscript.minecraft. (10/07/12)
I wrote a bunch of Facade classes that encapsulate minecraft class accesses.
- [DONE] delete unneccessary/defunct code in .selection. (10/22/12)
- [DONE] clean up imports. (09/26/12)
Project->Source->Clean Up
for the win!
- write more unit tests. I mean it!
10/07/12 I wrote two, I think... does that count?
- [DONE] Update to Minecraft 1.3.2 (09/27/12)
It was less painful than I imagined. I reobfuscated the files and tried the mod on my normal minecraft.jar - it works! Happy.
- Implement callback on value changes in Config and extend clients to validate all changes.
10/07/12 I'm not doing this, as implementing it would cause another wave of refactoring that I'm not really in the mood for right now.
- [DONE] find a way to bind aliases to inventory items and implement that. (10/23/12)
I added a magic wand item with differently colored subtypes that players can bind scripts to. The bindings aren't saved yet and I noticed a few bugs that need to be ironed out.
- [DONE] add ui functionality to switch between single- and multi-threaded script execution, list running scripts and kill script threads. (10/11/12)
/env scripts list
now lists all running scripts with their respective thread ids and/env scripts kill <id>
attempts to interrupt the thread that runs the script. The code can handle single- and multithreading, but since I don't see any benefits from singlethreaded mode and the code is not designed to switch modes while running, I did not implement an option to change it ingame. It can be changed by modifying the value ofmulti-threading
in<minecraft-dir>/mods/mcscript/config/main.cfg
- test ScriptGlobals, establish standard-names for important variables like bounds and selection and rewrite the scripts to make use of them
- find out if and how to invoke functions of running scripts and implement it.
- add functionality to get syntax help and expected arguments from a script and add a method for scripts to easily validate their arguments.
- add a scriptable selection type
- implement the Pattern type, defining the blocks to fill a selection with
- implement the Modifier type, allowing to modify a selection by distinct rules (subtract, skew etc.)
- implement the Brush type, combining Selection and Pattern.
- add variables, String literals and procedures to turtle speak and a method to select the block to draw with.
- use a new type TsArgument as TsStatement arguments instead of Float for String support.