Esempio n. 1
0
const gint *quote_we_receive(void)
{
	static gint we_receive[NO_RESOURCE];

	resource_table_get_amount(RESOURCETABLE(want_table), we_receive);
	return we_receive;
}
Esempio n. 2
0
gboolean can_submit_quote(void)
{
	gint want_quote[NO_RESOURCE];
	gint give_quote[NO_RESOURCE];

	resource_table_get_amount(RESOURCETABLE(want_table), want_quote);
	resource_table_get_amount(RESOURCETABLE(give_table), give_quote);

	if (resource_count(want_quote) == 0
	    && resource_count(give_quote) == 0)
		return FALSE;

	return !quote_view_trade_exists(QUOTEVIEW(quoteview), give_quote,
					want_quote)
	    && !player_is_viewer(my_player_num());
}
Esempio n. 3
0
const gint *quote_we_supply(void)
{
	static gint we_supply[NO_RESOURCE];

	resource_table_get_amount(RESOURCETABLE(give_table), we_supply);
	return we_supply;
}
Esempio n. 4
0
void discard_get_list(gint * discards)
{
	if (discard.dlg != NULL)
		resource_table_get_amount(RESOURCETABLE
					  (discard.resource_widget),
					  discards);
	else
		memset(discards, 0, sizeof(discards));
}
Esempio n. 5
0
void plenty_resources(gint * resources)
{
	resource_table_get_amount(RESOURCETABLE(plenty.resource_widget),
				  resources);
}