The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: neroden on April 21, 2010, 03:39:41 pm

Title: [Fixed] Factories with fields not upgrading properly
Post by: neroden on April 21, 2010, 03:39:41 pm
When a Cattle Farm (or whatever) gets "upgraded", it ends up with a production of 1.  The fields aren't getting linked to the upgraded factory properly, I'm guessing.
Title: Re: Factories with fields not upgrading properly
Post by: neroden on April 22, 2010, 02:51:17 pm
OK, I see what's going on here.  When the fields get built originally, the factory production gets increased to go along with them.  (Under the comment "// Knightly : adjust production base and storage capacities").

When the factory gets upgraded, the base gets replaced, production level gets reset, it's still tied to the fields, but the fields are *never checked* to increase the base factory production.

There's a number of ways to handle this.  However, the fact is that "later" cattle farms probably demand different numbers of fields with different production levels.  So the correct thing to do is almost certainly to destroy all the existing fields and spawn a set of new fields.

Alternately, the existing fields could be walked to add their capacity to the upgraded cattle farm.... but this prevents any upgrade in fields and also prevents any increase in number of fields, so it seems wrong.
Title: Re: Factories with fields not upgrading properly
Post by: jamespetts on April 22, 2010, 08:50:47 pm
Neroden,

thank you for the report - fixed as you suggest in the -devel branch.