Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Need to move away from using names as IDs
Re: Need to move away from using names as IDs |
Fri, 24 June 2011 21:28 |
|
Aeglos | | | Messages: 142
Registered: May 2011 Location: Chile | |
|
Yes, this also extends to races. Sorting everything manually by "RaceName/some#" is cumbersome and hard to mantain. Preferably this variable should be as automatic as possible.
The Item base class has a Key property which returns an already formed <Owner/Name> string for use on collections but it's used mostly on the Design Manager for now and that still poses problems. But it's a starting point. Players are also already asigned a number at game creation.
We can either use something like racename+playernumber to identify each empire, or generate a unique empire number and use racename+empirenumber, which I'm leaning towards to in case we want to implement multiple players per empire as Evil suggested. That solves the duplicate race issue I believe.
EmpireData should hold ShipDesignID (0 to 16), StarbaseDesignID (o to 10) and FleetID (0 to 512) counters to use as part of the unique keys for designs and fleets, and to also keep track of the amount of them.
I'd rather not do this myself yet though, as the refactoring I'm doing now is big enough. If someone else does it I'll still merge it ot the branch and update any conflicts that may arise.
EDIT: This also extends to the methods of comparison we are using now. We use Race.Name to check for ownership everywhere, we should change it to the new ID method we choose to apply, as Owner should be a Key ID and not a simple race name.
[Updated on: Fri, 24 June 2011 22:34] Report message to a moderator
|
|
|
|
|
Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Fri, 24 June 2011 21:28
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Daniel on Sat, 25 June 2011 07:28
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Sat, 25 June 2011 07:17
|
|
|
Re: Need to move away from using names as IDs
By: Daniel on Sat, 25 June 2011 18:35
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Sat, 25 June 2011 23:15
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Mon, 27 June 2011 05:49
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Mon, 27 June 2011 06:04
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Daniel on Mon, 27 June 2011 07:09
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Tue, 28 June 2011 18:42
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Wed, 29 June 2011 02:06
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Wed, 29 June 2011 06:29
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Wed, 29 June 2011 06:54
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Wed, 29 June 2011 17:03
|
|
|
Re: Need to move away from using names as IDs
By: Daniel on Fri, 01 July 2011 07:56
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Daniel on Sat, 09 July 2011 03:15
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Fri, 01 July 2011 15:15
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Daniel on Sun, 03 July 2011 17:50
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Mon, 04 July 2011 03:25
|
|
|
Re: Need to move away from using names as IDs
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Wed, 06 July 2011 20:55
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Thu, 07 July 2011 00:20
|
|
|
Re: Need to move away from using names as IDs
By: Aeglos on Sat, 09 July 2011 04:06
|
|
|
Re: Need to move away from using names as IDs
By: Daniel on Sat, 09 July 2011 04:37
|
|
|
Re: Need to move away from using names as IDs
By: Daniel on Sat, 09 July 2011 07:48
|
Goto Forum:
Current Time: Thu May 02 10:25:23 EDT 2024
|