Debian Codegraph @

CorsixTH/Lua/diseases/alien_dna.lua

raw
1 --[[ Copyright (c) 2011 Manuel "Roujin" Wolf
2
3 Permission is hereby granted, free of charge, to any person obtaining a copy of
4 this software and associated documentation files (the "Software"), to deal in
5 the Software without restriction, including without limitation the rights to
6 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 of the Software, and to permit persons to whom the Software is furnished to do
8 so, subject to the following conditions:
9
10 The above copyright notice and this permission notice shall be included in all
11 copies or substantial portions of the Software.
12
13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 SOFTWARE. --]]
20
21 local disease = {}
22 disease.id = "alien_dna"
23 disease.expertise_id = 8
24 disease.visuals_id = 6
25 disease.name = _S.diseases.alien_dna.name
26 disease.cause = _S.diseases.alien_dna.cause
27 disease.symptoms = _S.diseases.alien_dna.symptoms
28 disease.cure = _S.diseases.alien_dna.cure
29 disease.cure_price = 2000
30 disease.emergency_sound = "emerg020.wav"
31 disease.emergency_number = 16
32 disease.contagious = false
33 disease.must_stand = TheApp.config.alien_dna_must_stand -- Alien Patients are forced to stand while queueing because of missing animation
34 disease.only_emergency = TheApp.config.alien_dna_only_by_emergency -- TODO implement (there are no normal door animations, so they cannot go to GP)
35 disease.initPatient = function(patient)
36 local which = math.random(0, 1) -- male or female?
37 patient:setType((which == 0) and "Alien Male Patient" or "Alien Female Patient")
38 patient.change_into = (which == 0) and "Standard Male Patient" or "Standard Female Patient"
39 if which == 0 then
40 patient:setLayer(0, math.random(1, 5) * 2) -- 5 variations for males
41 patient:setLayer(2, math.random(0, 1) * 2) -- + alternate shoes
42 else
43 patient:setLayer(0, math.random(2, 4) * 2) -- NB: for layer0 = 2 head is missing in death animation, so it's not used
44 patient:setLayer(2, 0)
45 end
46 patient:setLayer(1, math.random(0, 3) * 2) -- 3 clothes variations for both genders
47 patient:setLayer(3, 0)
48 patient:setLayer(4, 0)
49 patient.should_knock_on_doors = TheApp.config.alien_dna_can_knock_on_doors
50 end
51
52 -- Diagnosis rooms are the rooms other than the GPs office which can be visited
53 -- to aid in diagnosis. The need not be visited, and if they are visited, the
54 -- order in which they are visited is not fixed.
55 disease.diagnosis_rooms = {
56 }
57 -- Treatment rooms are the rooms which must be visited, in the given order, to
58 -- cure the disease.
59 disease.treatment_rooms = {
60 "dna_fixer",
61 }
62 -- If a machine is required a small icon should appear in the drug casebook.
63 disease.requires_machine = true
64
65 return disease