Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » New Waypoint System
Re: New Waypoint System Fri, 04 May 2012 23:34 Go to previous messageGo to previous message
Aeglos is currently offline Aeglos

 
Chief Warrant Officer 1
Stars! Nova developer
Stars! Nova developer

Messages: 142
Registered: May 2011
Location: Chile
I have them partially working on my local copy... but i'm not entierely happy with the cleanliness of the system.

The thing is this:

Most Tasks need access to ServerData because they modify several things from several collections, and cosider data from several empires (Like invasions for example; need both Races). Hence the TaskWorkers which can't exist on Nova/Common because it can't reference Nova/Server where ServerData exists.

Now, in the case of manual cargo via xfer dialog, the waypoint is properly created, but we are working with Tasks, not TaskWorkers so there is no "clean" way of applying the task to the client state to immediatly display the results of the manual cargo modification. I had to drop in a piece of code that is pretty out of place to do so and defeats the purpose of havint that code contained in the TaskWorkers.

What i'm thinking is merging the TaskWorkers from Nova/Server into the Tasks in Nova/Common, and change the interface to use two EmpireDatas instead of a ServerData. That way they can work in both Client & Server without resorting to the tricks I placed there.

Unless some task needs to take into account more than 2 empires, which I can't think of any at the moment (Since there is always one instigator and one target).

EDIT:

Yes, that approach was much more cleaner and better, and I'm pretty happy with it. I plan to make some refactorings and comments here and there, but I've commited it in the meanwhile if you want to play with it. Cargo Transfer dialog is working now too.

Things that need improvement:
* Cargo transfer dialog creates waypoint commands that appear on the waypoint list. Have to somehow omit them from there (or perhaps not?)
* Waypoint 1 and 0 load cargo controls need to be done.
* Test some more Razz


[Updated on: Sat, 05 May 2012 00:45]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Some important-ish changes.
Next Topic: Orders
Goto Forum:
  


Current Time: Wed May 15 18:16:36 EDT 2024