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. --
Full description:
Manages all things related to research for one hospital.
Method Index
- addResearchPoints(points)
- addResearchPointsForAutopsy(target_room_id)
- afterLoad(old, new)
- checkAutomaticDiscovery(month)
- concentrateResearch(disease_id)
- discoverDisease(disease)
- discoverObject(object, automatic)
- getResearchRequired(thing)
- improveDrug(drug)
- improveMachine(machine)
- initResearch()
- nextResearch(category)
- redistributeResearchPoints()
- researchCost()
- setResearchConcentration()
- updateMachinesDynamicInfo(machine_id)
Member Index
- drain
- hospital
- level_config
- research_policy
- research_progress
- world
function ResearchDepartment:ResearchDepartment(hospital)
Parameters:
| Name | Type | Description |
|---|---|---|
| hospital | ? | ? |
Declared on: line 37 of Lua/research_department.lua.
function ResearchDepartment:addResearchPoints(points)
Add some more research points to research progress.
It will be divided according to the research policy into the different research areas.
Parameters:
| Name | Type | Description |
|---|---|---|
| points | integer | The total amount of points before applying any level specific divisors to add to research. |
Declared on: line 357 of Lua/research_department.lua.
function ResearchDepartment:addResearchPointsForAutopsy(target_room_id)
This function will give research points to the treatment of the illness of an autopsied patient.
Parameters:
| Name | Type | Description |
|---|---|---|
| target_room_id | string | The name of the room |
Declared on: line 330 of Lua/research_department.lua.
function ResearchDepartment:afterLoad(old, new)
Parameters:
| Name | Type | Description |
|---|---|---|
| old | ? | ? |
| new | ? | ? |
Declared on: line 714 of Lua/research_department.lua.
function ResearchDepartment:checkAutomaticDiscovery(month)
Parameters:
| Name | Type | Description |
|---|---|---|
| month | ? | ? |
Declared on: line 131 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:
| Name | Type | Description |
|---|---|---|
| disease_id | ? | The id of the disease to focus on. -- |
Declared on: line 649 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:
| Name | Type | Description |
|---|---|---|
| disease | ? | The disease to discover, a table from world.available_diseases -- |
Declared on: line 600 of Lua/research_department.lua.
function ResearchDepartment:discoverObject(object, automatic)
Called when it is time to discover an object. This may currently only
happen from research.
Parameters:
| Name | Type | Description |
|---|---|---|
| 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 546 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:
| Name | Type | Description |
|---|---|---|
| thing | ? | The thing to check, either a drug or an object. -- |
Declared on: line 291 of Lua/research_department.lua.
function ResearchDepartment:improveDrug(drug)
Called when it is time to improve a drug's strength or cost.
Parameters:
| Name | Type | Description |
|---|---|---|
| drug | ? | The drug to improve, table taken from world.available_diseases -- |
Declared on: line 403 of Lua/research_department.lua.
function ResearchDepartment:improveMachine(machine)
Called when it is time to improve a machine's strength or cost.
Parameters:
| Name | Type | Description |
|---|---|---|
| machine | ? | The machine to improve, table taken from TheApp.objects -- |
Declared on: line 479 of Lua/research_department.lua.
function ResearchDepartment:initResearch()
Initialize research for the level.
Declared on: line 48 of Lua/research_department.lua.
function ResearchDepartment:nextResearch(category)
Finds out what to research next in the given research area.
Parameters:
| Name | Type | Description |
|---|---|---|
| category | ? | The research area. One of cure, diagnosis, drugs, improvements and specialisation -- |
Declared on: line 218 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 157 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 621 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 143 of Lua/research_department.lua.
function ResearchDepartment:updateMachinesDynamicInfo(machine_id)
Updates the dynamic info for each matching machine found in the player's
hospital rooms.
Parameters:
| Name | Type | Description |
|---|---|---|
| machine_id | ? | The machine ID for determining matches. -- |
Declared on: line 529 of Lua/research_department.lua.