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

Method doComIn

MicropolisCore/src/MicropolisEngine/src/zone.cpp:809–824  ·  view source on GitHub ↗

* Handle immigration of commercial zone. * @param pos Position of the commercial zone. * @param pop Population ? * @param value Land value corrected for pollution. */

Source from the content-addressed store, hash-verified

807 * @param value Land value corrected for pollution.
808 */
809void Micropolis::doComIn(const Position &pos, int pop, int value)
810{
811 short z;
812
813 z = landValueMap.worldGet(pos.posX, pos.posY);
814 z = z >>5;
815
816 if (pop > z) {
817 return;
818 }
819
820 if (pop < 5) {
821 comPlop(pos, pop, value);
822 incRateOfGrowth(pos, 8);
823 }
824}
825
826/**
827 * Handle emigration of commercial zone.

Callers

nothing calls this directly

Calls 1

worldGetMethod · 0.80

Tested by

no test coverage detected