Debian Codegraph @

CorsixTH/Lua/diseases/gastric_ejections.lua

raw
1 --[[ Copyright (c) 2009 Haico "brainball" van Roeden
2 Based on gut_rot.lua by Edvin "Lego3" Linge
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy of
5 this software and associated documentation files (the "Software"), to deal in
6 the Software without restriction, including without limitation the rights to
7 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 of the Software, and to permit persons to whom the Software is furnished to do
9 so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in all
12 copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 SOFTWARE. --]]
21
22 local disease = {}
23 disease.id = "gastric_ejections"
24 disease.expertise_id = 28
25 disease.non_visuals_id = 12
26 disease.name = _S.diseases.gastric_ejections.name
27 disease.cause = _S.diseases.gastric_ejections.cause
28 disease.symptoms = _S.diseases.gastric_ejections.symptoms
29 disease.cure = _S.diseases.gastric_ejections.cure
30 disease.cure_price = 650
31 disease.emergency_sound = "emerg032.wav"
32 disease.emergency_number = 15
33 disease.contagious = true
34 disease.initPatient = function(patient)
35 if math.random(0, 1) == 0 then
36 patient:setType("Standard Male Patient")
37 patient:setLayer(0, math.random(1, 5) * 2)
38 patient:setLayer(2, math.random(0, 2) * 2)
39 else
40 patient:setType("Standard Female Patient")
41 patient:setLayer(0, math.random(1, 4) * 2)
42 patient:setLayer(2, 0)
43 end
44 patient:setLayer(1, math.random(0, 3) * 2)
45 patient:setLayer(3, 0)
46 patient:setLayer(4, 0)
47 end
48 -- Diagnosis rooms are the rooms other than the GPs office which can be visited
49 -- to aid in diagnosis. The need not be visited, and if they are visited, the
50 -- order in which they are visited is not fixed.
51 disease.diagnosis_rooms = {
52 "general_diag",
53 "cardiogram",
54 "scanner",
55 "ultrascan",
56 "blood_machine",
57 "x_ray",
58 "psych",
59 "ward",
60 }
61 -- Treatment rooms are the rooms which must be visited, in the given order, to
62 -- cure the disease.
63 disease.treatment_rooms = {
64 "pharmacy",
65 }
66
67 return disease