Ejemplo 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;
}
Ejemplo 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());
}
Ejemplo 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;
}
Ejemplo 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));
}
Ejemplo n.º 5
0
void plenty_resources(gint * resources)
{
	resource_table_get_amount(RESOURCETABLE(plenty.resource_widget),
				  resources);
}