On 14.04.2013 03:06, Michael T. Pope wrote:
> On Sat, 13 Apr 2013 03:37:15 PM Michael Vehrs wrote:
>    
>> Using the name option helps. I think I have sorted out the main
>> compatibility problem. At least units seem to be producing stuff.
>>      
> Confirmed, and I am trying to sort out the name/hang problem.
>
> However, I am concerned by the null unit type problem.  The fix obviously
> works, but as you correctly comment, the problem should never happen.
> This type of thing usually happens when reading is incomplete, and can be
> often be solved by deferring the operation a bit.  Do you think creating
> WorkLocation.readChildren and doing the production type fixups at the end of
> that would avoid the null-type workarounds?
>
> Cheers,
> Mike Pope
>    

No, that would not help in this case. We serialize objects as follows:

tile -> colony on that tile -> work locations in the colony

Since the colony tiles surround the colony, some of the work tiles will 
not have been serialized when their corresponding colony tiles are 
serialized. To fix this properly, we will have to defer setting the 
production type until all tiles have been read. I suggest adding a 
suitable method to the Game class.


Regards

Michael


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to