CityBudget: do not change funds when generating a map

initial funds are now set when player clicks Play button

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@602 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-03-23 15:46:05 +00:00
parent 0b8efea513
commit 2c69407d47
3 changed files with 6 additions and 2 deletions

View file

@ -60,8 +60,6 @@ public class MapGenerator
public void generateSomeCity(long r)
{
//FIXME- initial funds should be set by caller
engine.budget.totalFunds = GameLevel.getStartingFunds(engine.gameLevel);
generateMap(r);
engine.fireWholeMapChanged();
}

View file

@ -2613,4 +2613,9 @@ public class Micropolis
spend(delta);
}
}
public void setFunds(int totalFunds)
{
budget.totalFunds = totalFunds;
}
}

View file

@ -192,6 +192,7 @@ public class NewCityDialog extends JDialog
private void onPlayClicked()
{
engine.setGameLevel(getSelectedGameLevel());
engine.setFunds(GameLevel.getStartingFunds(engine.gameLevel));
startPlaying(engine, null);
}