> From: Lone_Wolf via Freecol-developers 
> <freecol-developers@lists.sourceforge.net>
> Sent: 07 September 2022 10:47
>
> [...]
>
> I strongly suggest to look at the code used for production in buildings .
>
> The data the formulae used there are based on is found in bug tickets 
> created by me.
>
> Analysis is also found in those tickets and mpope took care of the 
> actual coding.
>
> You will find lots of weird things / exceptions and inconsistenties in 
> the formulae, but all have been verified thoroughly .
>
> The data that was collected for outdoors production sofar has strong 
> indications they are worse and may reveal dependencies that are 
> illogical and mentioned nowhere in col1 documentation .

Yes, I have used the building tests continuously while working on the code. I 
have also considered unifying the code for building and colony tile production, 
but currently it's less complicated to just have two different implementation 
of the calculations (BuildingProductionCalculator and TileProductionCalculator):

https://github.com/FreeCol/freecol/commit/3bdda582bd5ed78bd586f31304db868ecb558c09


I have also fixed an interesting bug that prevented experts from getting the 
extra production bonus on resources:

https://github.com/FreeCol/freecol/commit/2bdcec888d191692eb44d26425f804807d36f9e7


I'm not done doing the rewrite. The ProductionCache needs to be updated as well 
... and a lot of old production methods should just be removed.


Best wishes,
Stian Grenborgen

_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to