Open gkykc opened 6 years ago
It has happened again. I changed the country name 'Pacific-Russia' to 'Siberia' and the following code kept existing in the /classes/adjudicatorPreGame.php file:
'Pacific-Russia' => array('East Siberia' => 'Army','Kamchatka' => 'Fleet','Yakutsk' => 'Army'),
Interestingly, moments before I changed the country name 'Pacific-Russia' to 'Siberia', I changed the province name 'East Siberia' to 'Norilsk'. Hence, between the moment that I changed the province name of East Siberia and I changed the country name of Pacific-Russia, the code SHOULD have read the following:
'Pacific-Russia' => array('Norilsk' => 'Army','Kamchatka' => 'Fleet','Yakutsk' => 'Army'),
But that is not the line of code that kept existing after the change in the country name of Pacific-Russia. That is curious. Maybe this will help you to identify what exactly is the problem.
The dev/units.php needs a rewrite. adjucatorPregame.php has the units hardcoded by countryname and not by countryID. The complete tool is more a "hack", as writing a adjucatorPregame.php for new variants is really easy, but not very save to allow on a life-install used by many players. I will change this once I have some time.
Interestingly, the bug disappeared by itself after I gave Siberia units. Or did you solve it?
When working on the variant World Diplomacy X, I changed the country name "Kenya" to "Japan" and "Near-East" to "Near East". After these changes, the following code still existed in the /classes/adjudicatorPreGame.php file, while it should have been deleted:
'Kenya' => array('Kenya' =>'Army' , 'Uganda' =>'Army' , 'Tanzania' =>'Fleet'), 'Near-East' => array('Iraq' =>'Army' , 'Saudi Arabia' =>'Army' , 'Syria' =>'Army' ),
But Japan and Near-East were added as countries in this file, too.
This is the only place where the duplicates emerged; in all other places, "Kenya" and "Near-East" were not recognized as powers anymore.
It is noteworthy here that I have changed multiple different country names, and that didn't cause duplicates to emerge. I don't know why the duplicates emerged in some cases while they didn't in others.