CTP2 Bureau
The Modding
Knowledgebase
Apolyton CTP2 section
Apolyton CTP2 files
Apolyton CTP2 forums
Source Code Project SVN

Actions

Pages

Recent Changes Search

Create a new page:

AE Modding Wiki : Functions : GetStoredProduction

New SLIC-function: GetStoredProduction(city_t)

Returns the stored production of a city.

//----------------------------------------------------------------------------
//
// Authored   : Maq
//
// Name       : Slic_GetStoredProduction
//
// Description: Function to find out how much production a city has stored.
//
// Parameters : SlicArg 0: city
//
// Globals    : -
//
// Returns    : SFN_ERROR		: execution result
//
//----------------------------------------------------------------------------
SFN_ERROR Slic_GetStoredProduction::Call(SlicArgList *args)
{
	if(args->Count() != 1)
		return SFN_ERROR_NUM_ARGS;

	Unit city;
	if(!args->GetCity(0, city)) {
		return SFN_ERROR_TYPE_BUILTIN;
	}

	m_result.m_int = city.GetStoredCityProduction();

	return SFN_ERROR_OK;
}
Page last modified on July 17, 2009, at 06:19 PM
  Administration
AE Modding Wiki built with PmWiki Design: BureauBert
Share this page:  VK Facebook Twitter LiveJournal OK MR Google+ LinkedIn tumblr Pinterest Blogger Digg Evernote