caranha / Koudou

Modular small community simulator
GNU General Public License v3.0
2 stars 2 forks source link

Can not change the capacity of evacuation center with evacuation_centers.json #58

Open HouShikon opened 3 months ago

HouShikon commented 3 months ago

The capacity of evacuation centers stay the same number even if make changes in evacuation_centers.json. I changed all the capacity in evacuation_centers.json

image

But the result in evacuation.csv shows all the evac_capacity are still 200

image

I'm not sure it is a bug or I just looked in wrong file.

caranha commented 3 months ago

First find the place in the code where evacuation centers are initialized. Where is it? Is the information correct at this stage? Where is the data being read from?

Depending on whether the information is correct at initialization, the next step of debugging will be different.

HouShikon commented 3 months ago

After checking with the code, I realized every time I changed the JSON, I need to delete the map cache and rebuild the map. That's where I forgot to do. This issue can be closed

caranha commented 3 months ago

You should not need to delete the map cache manually. This should be done programmatically.

Please check the part of the code that loads the map cache, you should add code to this part of the program to check the timestamp of the map cache file, and the time stamp of the JSON, and if the time stamp of the JSON is newer than the time stamp of the map cache, the map cache should be re-created.

The issue cannot be closed quite yet. :-)