MCPcopy Create free account
hub / github.com/SimHacker/micropolis / setYear

Method setYear

MicropolisCore/src/MicropolisEngine/src/utilities.cpp:272–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270
271
272void Micropolis::setYear(int year)
273{
274 // Must prevent year from going negative, since it screws up the non-floored modulo arithmetic.
275 if (year < startingYear) {
276 year = startingYear;
277 }
278
279 year = (year - startingYear) - (cityTime / 48);
280 cityTime += year * 48;
281 doTimeStuff();
282}
283
284
285/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected