Classes

Concepts

Libraries

advertisement »

ambientSounds »

bitser »

contentPoints »

eventBoxText »

factValidity »

frameBuffer »

officeBuildingInserter »

priorityRenderer »

randomEvents »

scaling »

spritesheetParser »

statusIcons »

test3 »

util »

Objects

registerBook

Description

Register a new book from the provided book data.

Arguments

1 table data

the book data to register.

Example

-- taken from game/book_controller.lua


bookController.registerBook({
	id = "software_book_1", -- the ID of the book

	display = _T("SOFTWARE_BOOK_1_NAME", "Software: Introduction to algorithms"),
	icon = "book_software",
	description = {
		{text = _T("SOFTWARE_BOOK_1_DESCRIPTION_1", "A collection of books that introduce and explain various common problem-solving algorithms."), font = "pix16"}
	},
	skillBoost = {id = "software", boost = 0.1}, -- skill to boost when the book is purchased & positioned on a bookshelf

	cost = 500 -- the cost of the book

})