Debian Codegraph @

CorsixTH/Lua/objects/loo.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 = "loo"
23 object.thob = 51
24 object.name = _S.object.toilet
25 object.tooltip = _S.tooltip.objects.toilet
26 object.ticks = false
27 object.build_preview_animation = 5098
28 object.dynamic_info = true
29 local function copy_north_to_south(t)
30 t.south = t.north
31 return t
32 end
33 object.idle_animations = copy_north_to_south {
34 north = 1760,
35 }
36 object.usage_animations = copy_north_to_south {
37 north = {
38 begin_use = {
39 ["Standard Male Patient" ] = 1712,
40 ["Standard Female Patient" ] = 3132,
41 ["Slack Female Patient" ] = 3132,
42 ["Transparent Male Patient" ] = 4388,
43 ["Slack Male Patient" ] = 4292,
44 ["Invisible Patient" ] = 4256,
45 ["Alternate Male Patient" ] = 4520,
46 ["Transparent Female Patient"] = 4432,
47 ["Chewbacca Patient" ] = 4158,
48 ["Elvis Patient" ] = 950,
49 ["Alien Male Patient" ] = 1712,
50 ["Alien Female Patient" ] = 3132,
51 },
52 begin_use_2 = {
53 ["Standard Male Patient" ] = 1716,
54 ["Standard Female Patient" ] = 3136,
55 ["Slack Female Patient" ] = 3136,
56 ["Transparent Male Patient" ] = 4392,
57 ["Slack Male Patient" ] = 4296,
58 ["Invisible Patient" ] = 4260,
59 ["Alternate Male Patient" ] = 4524,
60 ["Transparent Female Patient"] = 4436,
61 ["Chewbacca Patient" ] = 4162,
62 ["Elvis Patient" ] = 954,
63 ["Alien Male Patient" ] = 1716,
64 ["Alien Female Patient" ] = 3136,
65 },
66 in_use = {
67 ["Standard Male Patient" ] = {1728, 1732},
68 ["Standard Female Patient" ] = 3144,
69 ["Slack Female Patient" ] = 3144,
70 ["Transparent Male Patient" ] = 4400,
71 ["Slack Male Patient" ] = 4308, -- 4304 is bugged for layer 0, 6
72 ["Invisible Patient" ] = 4272,
73 ["Alternate Male Patient" ] = 4528,
74 ["Transparent Female Patient"] = 4440,
75 ["Chewbacca Patient" ] = 4170,
76 ["Elvis Patient" ] = 962,
77 ["Alien Male Patient" ] = {1728, 1732},
78 ["Alien Female Patient" ] = 3144,
79 },
80 finish_use = {
81 ["Standard Male Patient" ] = 1740,
82 ["Standard Female Patient" ] = 3152,
83 ["Slack Female Patient" ] = 3152,
84 ["Transparent Male Patient" ] = 4404,
85 ["Slack Male Patient" ] = 4316,
86 ["Invisible Patient" ] = 4280,
87 ["Alternate Male Patient" ] = 4536,
88 ["Transparent Female Patient"] = 4444,
89 ["Chewbacca Patient" ] = 4174,
90 ["Elvis Patient" ] = 966,
91 ["Alien Male Patient" ] = 1740,
92 ["Alien Female Patient" ] = 3152,
93 },
94 finish_use_2 = {
95 ["Standard Male Patient" ] = 1744,
96 ["Standard Female Patient" ] = 3156,
97 ["Slack Female Patient" ] = 3156,
98 ["Transparent Male Patient" ] = 4408,
99 ["Slack Male Patient" ] = 4320,
100 ["Invisible Patient" ] = 4284,
101 ["Alternate Male Patient" ] = 4540,
102 ["Transparent Female Patient"] = 4448,
103 ["Chewbacca Patient" ] = 4740,
104 ["Elvis Patient" ] = 1158,
105 ["Alien Male Patient" ] = 1744,
106 ["Alien Female Patient" ] = 3156,
107 },
108 },
109 }
110 local anim_mgr = TheApp.animation_manager
111 local kf1, kf2 = {0, 0}, {-0.1, -0.9}
112 anim_mgr:setPatientMarker(object.usage_animations.north.begin_use, 1, kf1, 6, kf2)
113 kf1 = {-0.1, -0.9}
114 anim_mgr:setPatientMarker(object.usage_animations.north.begin_use_2, kf1)
115 anim_mgr:setPatientMarker(object.usage_animations.north.in_use, kf1)
116 anim_mgr:setPatientMarker(object.usage_animations.north.finish_use, kf1)
117 kf1, kf2 = {-0.1, -0.9}, {0, 0}
118 anim_mgr:setPatientMarker(object.usage_animations.north.finish_use_2, 0, kf1, 1, kf1, 6, kf2)
119
120 object.orientations = {
121 north = {
122 footprint = { {0, 0, complete_cell = true}, {0, 1, only_passable = true} },
123 use_position = "passable",
124 use_animate_from_use_position = true,
125 },
126 east = {
127 footprint = { {0, 0, complete_cell = true}, {1, 0, only_passable = true} },
128 use_position = "passable",
129 use_animate_from_use_position = true,
130 },
131 }
132
133 return object