[WF-General] Entity creator improvements

Erik Hjortsberg erik.hjortsberg at iteam.se
Fri Sep 19 02:49:32 PDT 2008


Hi, as you've perhaps seen I've committed some improvements to the Entity Creator.
I added an option for randomizing the orientation of any new entities. It's a really nice thing to have when you're rapidly creating a lot of entities (like a forest).
I also added the ability to set a tool tip for each adapter. However, I think we need to set some InheritToolTip attributes in CEGUI in order for them to correctly show up. I haven't looked into it.
And finally I also added the ability to specify a default value for any adapter. It only works with string and numerical adapters so far, but it's quite good to have.

In addition I've added some more recipes for different trees. With them in place it's really easy to quickly create a new forest for example.

I've found an issue with how the preview Model is displayed though, see here: https://bugs.launchpad.net/ember/+bug/272044
I'm also a little bit concerned about how we now use the global lua scripting scope for placing our scripting code. Since it's the global scope we run the risk of interfering with other functionality, such as the gui methods and data. An option would be to use a completely separate virtual machine for the script editor, but that is quite expensive (since lua doesn't make any distinction between code and variables, so each new virtual machine would require a complete duplication of the lua memory structure). We'll have to think a little more about how to encapsulate the scripts used by the entity creator in a way that they still can reuse parts from each other and the main lua environment.

Another thing I've found is that we probably need to add some kind of grouping mechanism for the recipes. As the amount of recipes grow they will become unwieldy to search through. I'm thinking of just allowing the name of the recipe be in the form of "/trees/oak" and that would then be shown in as a hierarcy:
-trees
 -oak
 -birch

/erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.worldforge.org/pipermail/general/attachments/20080919/cbd9868f/attachment.html 


More information about the General mailing list