void Simple::renderUi(Engine &engine) { Layer::renderUi( engine ); Tile* lastTile = _currentTile(); if( lastTile ) { SenatePtr senate = lastTile->overlay<Senate>(); if( senate.isValid() ) { _d->senateInfo.draw( _lastCursorPos(), Engine::instance(), senate ); } } }
void Forum::Impl::removeMoney(PlayerCityPtr city) { SenatePtr senate; SenateList senates = city::statistic::getObjects<Senate>( city, object::senate ); if( !senates.empty() ) senate = senates.front(); int maxMoney = city->treasury().money(); if( maxMoney > 0 ) { ForumList forums = city::statistic::getObjects<Forum>( city ); if( senate.isValid() ) maxMoney /= 2; maxMoney /= forums.size(); events::GameEventPtr e = events::Payment::create( econ::Issue::moneyStolen, -maxMoney ); e->dispatch(); } }