CorsixTH Lua Documentation

ResearchDepartment Class

Notes about research speed. Original game times at 20 % in all categories with a medium doctor at level 3: Slicer discovered in about 120 days. (10000 points) Pump improved in about 60 days. (30000 points * 20 % as first improvement) Invisibility improved in about 90 days. (10000 points) Note that the original requires a nurse and a pharmacy before drugs get improved. On the other hand it appears that the research is stored for future use anyway. --

Declared on: line 21 of Lua/research_department.lua.
Full description:
Manages all things related to research for one hospital.

Method Index

Member Index

function ResearchDepartment:addResearchPoints(points, autopsy_room)

Add some more research points to research progress. If autopsy_room is specified points are not used. Instead research progresses according to the level config for autopsies. Otherwise they will be divided according to the research policy into the different research areas.

Parameters:

NameTypeDescription
points integer The total amount of points (before applying any level specific divisors to add to research.
autopsy_room string If a specific room should get points following an autopsy, then this is the id of that room.

Declared on: line 327 of Lua/research_department.lua.

function ResearchDepartment:concentrateResearch(disease_id)

Concentrates research on a given disease. Concentrating on a machine will improve it if it's been discovered and help researching it otherwise. Concentrating on a drug will improve the drug provided the pharmacy is discovered. Otherwise it will research the cabinet. TODO: Make it possible to concentrate on psychological diseases if the psychiatry hasn't been discovered.

Parameters:

NameTypeDescription
disease_id ? The id of the disease to focus on. --

Declared on: line 620 of Lua/research_department.lua.

function ResearchDepartment:discoverDisease(disease)

Called when it is time to discover a disease (i.e. after diagnosis in the GP)

Parameters:

NameTypeDescription
disease ? The disease to discover, a table from world.available_diseases --

Declared on: line 556 of Lua/research_department.lua.

function ResearchDepartment:discoverObject(object, automatic)

Called when it is time to discoer an object. This may currently only happen from research.

Parameters:

NameTypeDescription
object ? The object to discover, a table from TheApp.objects
automatic ? If true the discovery was not made by the player's research department. --

Declared on: line 500 of Lua/research_department.lua.

function ResearchDepartment:getResearchRequired(thing)

Returns how many points are required to discover something about the given thing. It may be an object or a drug, being improved or researched. If this thing cannot be processed nil is returned.

Parameters:

NameTypeDescription
thing ? The thing to check, either a drug or an object. --

Declared on: line 287 of Lua/research_department.lua.

function ResearchDepartment:improveDrug(drug)

Called when it is time to improve a drug's strength or cost.

Parameters:

NameTypeDescription
drug ? The drug to improve, table taken from world.available_diseases --

Declared on: line 410 of Lua/research_department.lua.

function ResearchDepartment:improveMachine(machine)

Called when it is time to improve a machine's strength or cost.

Parameters:

NameTypeDescription
machine ? The machine to improve, table taken from TheApp.objects --

Declared on: line 450 of Lua/research_department.lua.

function ResearchDepartment:nextResearch(category)

Finds out what to research next in the given research area.

Parameters:

NameTypeDescription
category ? The research area. One of cure, diagnosis, drugs, improvements and specialisation --

Declared on: line 213 of Lua/research_department.lua.

function ResearchDepartment:redistributeResearchPoints()

Function that redistributes research points from a finished category to

all the other categories.

Declared on: line 156 of Lua/research_department.lua.

function ResearchDepartment:researchCost()

It also costs to research. TODO: This is now just $3 per day and doctor (if at 100%), what should it be? --

Declared on: line 592 of Lua/research_department.lua.

function ResearchDepartment:setResearchConcentration()

Find a disease (if it exists) on which research can be concentrated and concentrate on it.

Declared on: line 142 of Lua/research_department.lua.

Page generated on Sat Feb 07, 2015 at 18:38:28 by LDocGen.