Classes

Concepts

Libraries

advertisement »

ambientSounds »

bitser »

contentPoints »

eventBoxText »

factValidity »

frameBuffer »

officeBuildingInserter »

priorityRenderer »

randomEvents »

scaling »

spritesheetParser »

statusIcons »

test3 »

util »

Objects

registerNew

Description

Registers a new platform part.

Arguments

1 table data

the data to register.

2 string inherit

the ID of another part type to inherit. (optional)

Example

platformParts:registerNew({
	id = "cpu_1",
	partType = platformParts.TYPES.CPU,
	display = _T("PLATFORM_CPU_1", "CPU - tier 1"),
	quad = "platform_cpu_1",
	price = 10,
	attractiveness = 10,
	gameScale = 2,
	devDifficulty = 0.2,
	devTime = 40,
	devCostMult = 1,
	progression = {
		{year = 1987, month = 1, scale = 0.5},
		{year = 1988, month = 1, scale = 0.6},
		{year = 1989, month = 1, scale = 0.7},
		{year = 1990, month = 1, scale = 0.8},
		{year = 1991, month = 1, scale = 0.9},
		{year = 1992, month = 1, scale = 1},
		{year = 1995, month = 1, scale = 1.1},
		{year = 1996, month = 1, scale = 1.2},
		{year = 1999, month = 1, scale = 1.3},
		{year = 2002, month = 1, scale = 1.4},
		{year = 2005, month = 1, scale = 1.5},
		{year = 2007, month = 1, scale = 1.5},
		{year = 2009, month = 1, scale = 1.7},
		{year = 2010, month = 1, scale = 1.8},
		{year = 2011, month = 1, scale = 1.9},
		{year = 2012, month = 1, scale = 2},
	}
})