branch | gamebalance |
changeset 9890 | 37b56728c471 |
parent 9889 | cfd2278f9099 |
child 9894 | 70d78ac95d6c |
--- a/src/town.h Wed Mar 14 10:00:56 2007 +0000 +++ b/src/town.h Wed Mar 14 11:15:58 2007 +0000 @@ -91,6 +91,16 @@ DEBUG(eco, 7, "Setting EAL of town %d [0x%x] to %f", index, xy, (double)level); m_activity_level = level; } + + byte GetWealthLevel() const + { + FixedT<int32, 16> level = GetActivity() * 10; + if (level < 7) return 0; + if (level < 9) return 1; + if (level < 12) return 2; + if (level < 15) return 3; + return 4; + } }; uint32 GetWorldPopulation(void);