Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » New Waypoint System
New Waypoint System Sun, 29 April 2012 18:29 Go 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
Yet another semi-big system change, so a new thread for reference.

Waypoints are now grouped into:

Common/Waypoints
Contains the classic Waypoint definition with a few modifications, and the new IWaypointTask interface and it's implementations. These implementations (ColoniseTask, LoadTask, etc) are plain data containing objects used by the client to set waypoint orders (Task name, amounts, time, etc). Still lacks in depth implementations as they are a bare port of the old waypoint Enum.

Server/Waypoints
Contains the WaypointExtension class, which adds a server specific operation for the Waypoint class to load a proper IWaypointTaskWorker implementation (all located here) to actually carry out the tasks. These worker classes are an extended port of the previous WaypointTasks class, and now contain validation and full execution, including Star ownership exchange and fleet cleanup when appropiate, in favour of grouping such things logically instead of the server handling them all "blind" (like fleet cleanup).

So, to create a new waypioint task:

1. Create a NamehereTask that implements IWaypointTask in Common/Waypoints with order/client data.
2. Add it to the SetTask() method in Common/Waypoints/Waypoint.cs
3. Create a NamehereTaskWorker that implements IWaypoinTaskWorker in Server/Waypoints to carry out the procedure.
4. Add it to the LoadWorker() method in Server/Waypoints/Waypoint.cs

That's it, it should be auto loaded and executed when appropiate.

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: Mon Apr 29 06:07:51 EDT 2024