Debian Codegraph @

CorsixTH/Lua/objects/screen.lua

raw
1 --[[ Copyright (c) 2009 Peter "Corsix" Cawley
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 object = {}
22 object.id = "screen"
23 object.thob = 16
24 object.name = _S.object.screen
25 object.tooltip = _S.tooltip.objects.screen
26 object.ticks = false
27 object.build_preview_animation = 926
28 object.show_in_town_map = true
29 -- More than one idle animation exists, but we can only set one to the object
30 object.idle_animations = {
31 north = 1022,
32 }
33 object.orientations = {
34 north = {
35 footprint = { {-1, -1, only_passable = true}, {-1, 0}, {0, -1}, {0, 0} },
36 render_attach_position = {-1, 0},
37 use_position = "passable",
38 },
39 }
40
41 -- Animation numbers below correspond to non-operating theatre uses only
42 -- See surgeon_screen.lua for that room
43 object.usage_animations = {
44 north = {
45 in_use = {
46 ["Elvis Patient"] = 946, -- specifically, transformation
47 ["Standard Male Patient"] = {
48 undress = 1048,
49 dress = 1052,
50 },
51 ["Standard Female Patient"] = {
52 undress = 2848,
53 dress = 2844,
54 },
55 },
56 },
57 }
58
59
60 local anim_mgr = TheApp.animation_manager
61 local kf1, kf2, kf3 = {-1, -1}, {-0.9, -0.8}, {-0.6, -0.6}
62 local anims = { object.idle_animations.north, 1204 } -- idle anims
63 anim_mgr:setPatientMarker(anims, kf1)
64 anim_mgr:setStaffMarker(anims, kf1)
65
66 anims = object.usage_animations.north.in_use
67 anim_mgr:setPatientMarker(anims["Elvis Patient"],
68 0, kf1, 6, kf1, 7, kf2, 11, kf2, 12, kf1, 24, kf1, 28, kf3, 32, kf3, 36, kf1, 43, kf1)
69 anim_mgr:setPatientMarker(anims["Standard Male Patient"].undress,
70 0, kf1, 7, kf1, 8, kf2, 12, kf2, 13, kf1)
71 anim_mgr:setPatientMarker(anims["Standard Male Patient"].dress,
72 0, kf1, 10, kf1, 11, kf2, 21, kf2, 22, kf1)
73 anim_mgr:setPatientMarker(anims["Standard Female Patient"].undress,
74 0, kf1, 2, kf2, 3, kf2, 9, kf2, 11, kf1, 17, kf1, 18, kf2, 25, kf2, 26, kf1)
75 anim_mgr:setPatientMarker(anims["Standard Female Patient"].dress,
76 0, kf1, 2, kf1, 3, kf2, 12, kf2, 13, kf1)
77
78 return object