src/town.h
branchgamebalance
changeset 9890 37b56728c471
parent 9889 cfd2278f9099
child 9894 70d78ac95d6c
equal deleted inserted replaced
9889:cfd2278f9099 9890:37b56728c471
    89 	void SetActivity(T level)
    89 	void SetActivity(T level)
    90 	{
    90 	{
    91 		DEBUG(eco, 7, "Setting EAL of town %d [0x%x] to %f", index, xy, (double)level);
    91 		DEBUG(eco, 7, "Setting EAL of town %d [0x%x] to %f", index, xy, (double)level);
    92 		m_activity_level = level;
    92 		m_activity_level = level;
    93 	}
    93 	}
       
    94 
       
    95 	byte GetWealthLevel() const
       
    96 	{
       
    97 		FixedT<int32, 16> level = GetActivity() * 10;
       
    98 		if (level <  7) return 0;
       
    99 		if (level <  9) return 1;
       
   100 		if (level < 12) return 2;
       
   101 		if (level < 15) return 3;
       
   102 		return 4;
       
   103 	}
    94 };
   104 };
    95 
   105 
    96 uint32 GetWorldPopulation(void);
   106 uint32 GetWorldPopulation(void);
    97 
   107 
    98 void UpdateTownVirtCoord(Town *t);
   108 void UpdateTownVirtCoord(Town *t);