SimulationProcessTick
From sc2k-reverse
Jump to navigationJump to search
Every month is split into 25 ticks (otherwise known as days) that need to be processed before moving on to the next month, each tick processes different things in the Simulator:
Day | |
---|---|
1 | Calculate budget updates for the last month. If it's March or July and the "Subscription" newspaper option is selected, generate and show a non-alert newspaper. Update some of the calendar variables in the simulation state. Push the monthly graph stack back one month. |
2 | Update power consumption for cities over 50,000 (not really required after commits 2a3f72c and 020133b). |
3 | Updates things like crime and pollution and other components stored as 64x64 and 32x32 blocks of data. Possibly also determines what constitutes "downtown". |
4 | Growth tick, stepping (0, 0). |
5 | Growth tick, stepping (0, 1). |
6 | Growth tick, stepping (0, 2). |
7 | Growth tick, stepping (0, 3). |
8 | Growth tick, stepping (1, 0). |
9 | Growth tick, stepping (1, 1). |
10 | Growth tick, stepping (1, 2). |
11 | Growth tick, stepping (1, 3). |
12 | Growth tick, stepping (2, 0). |
13 | Growth tick, stepping (2, 1). Advance the season if it's March, June, September, or December. |
14 | Growth tick, stepping (2, 2). |
15 | Growth tick, stepping (2, 3). |
16 | Growth tick, stepping (3, 0). |
17 | Growth tick, stepping (3, 1). |
18 | Growth tick, stepping (3, 2). |
19 | Growth tick, stepping (3, 3). |
20 | Update traffic data for the month. |
21 | Update water consumption for cities over 50,000 (not really required after commits 2a3f72c and 020133b). |
22 | Update RCI demands. Theoretically do radioactive decay and forest growth (so rare it's practically a zero chance). Potentially display some Extra! newspapers depending on what's happening in the city and things like the national trend. Process new inventions if it's January. Update weather. Simulate the national and city economies. Update graphs. |
23 | Grant rewards for city progression, including military base proposal. Check for scenario victory/failure conditions. Check for city bankruptcy (funds hitting -$100,000). |
24 | Redraw the entire screen (not really required after commit 67b67c3). Do some MFC window updates/invalidates. |
25 | Do some more MFC window updates/invalidates. Determine upcoming city crisis and whether it's just a "residents demand XYZ" type crisis or a full-blown disaster. |