Exemple #1
0
//--------- Begin of function FirmMarket::next_day ---------//
//
void FirmMarket::next_day()
{
	//----- call next_day() of the base class -----//

	Firm::next_day();

	//---- update trade link to harbors to towns -----//

	update_trade_link();

	//-------- input goods ----------//

	if( info.game_date%PROCESS_GOODS_INTERVAL == firm_recno%PROCESS_GOODS_INTERVAL )
	{
		input_goods(50);								// input maximum 50 qty of goods per day
		set_next_output_firm();						// set next output firm
	}

	//-------- sell goods --------//

	sell_goods();

	//------- free up unused slots -------//

	//### begin alex 24/10 ###//
	//if( info.game_date%30 == firm_recno%30 )
	//	free_unused_slot();
	//#### end alex 24/10 ####//
}
Exemple #2
0
//--------- Begin of function FirmMine::next_day ---------//
//
void FirmMine::next_day()
{
	//----- call next_day() of the base class -----//

	Firm::next_day();

	//----------- update population -------------//

	recruit_worker();

	//-------- train up the skill ------------//

	update_worker();

	//---------------------------------------//

	if( info.game_date%PROCESS_GOODS_INTERVAL == firm_recno%PROCESS_GOODS_INTERVAL )		// produce raw materials once every 3 days
	{
		produce_raw();
		set_next_output_firm();						// set next output firm
	}
}
Exemple #3
0
//--------- Begin of function FirmFactory::next_day ---------//
//
void FirmFactory::next_day()
{
	//----- call next_day() of the base class -----//

	Firm::next_day();

	//----------- update population -------------//

	recruit_worker();

	//-------- train up the skill ------------//

	update_worker();

	//--------- daily manufacturing activities ---------//

	if( info.game_date%PROCESS_GOODS_INTERVAL == firm_recno%PROCESS_GOODS_INTERVAL )
	{
		input_raw();
		production();
		set_next_output_firm();						// set next output firm
	}
}