GSOC Day 21 – Order Fixes, Start of Property Listing


I worked today to tidy up the panelOrder changes I had made and to make a function in cache.py designed to get orders more readable.

Although I was unable to think of any good ways to change the function’s structure and improve it that way, I did remove some unnecessary abstraction and extra code that made it difficult to debug the function yesterday.

I then worked on adding a panel that would show unimplemented order parameter types on the orders panel. This way, ruleset designers will at least be able to tell easily when they’re using an order parameter that the client does not yet support, so they will be able to send me or Mithro a message that they need it fixed.

Then, I started looking at panelInfo, which, in its tp03 form, looks like a rather simple little display of object properties. Of course, since properties have changed dramatically from their tp03 form, it will require pretty much a complete re-write. I would like to add some nice tree-style layout to it, with links to references and other fancy features, once the basic information is displayed. I got a good start on the basic information today, writing a method to generically display the internals of the properties in a sort of tree form.

Here’s what it looks like for now:

Positional
    Position
        vector
            x: -1974689356
            y: 849843644
            z: 0
        relative: 0
    Velocity
        vector
            x: 0
            y: 0
            z: 0
        relative: 0
    Size
        size: 2

Media
    Icon
        url: common/object-icons/planet
    Media
        url: common-2d/foreign/freeorion/planet-small/animation/barren1

Ownership
    Owner
        type: 7
        id: 2

Orders
    Order Queue
        queueid: 11
        numorders: 0
        ordertypes: [0, 2]

Resources
    Resource List
        resources: [(1, 0, 0, 0), (2, 1, 0, 0)]

Orders2
    Order Queue 2
        queueid: 0
        numorders: 0
        ordertypes: []

I’m definitely going to want to change the function a bit tomorrow, so it can display more useful information about things like resources (actually interpreting the reference rather than just showing the numbers).

Advertisements

~ by greywhind on June 12, 2009.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: