| 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 = "bed" |
| 23 |
object.thob = 8 |
| 24 |
object.research_category = "diagnosis" |
| 25 |
object.name = _S.object.bed |
| 26 |
object.tooltip = _S.tooltip.objects.bed |
| 27 |
object.ticks = false |
| 28 |
object.build_preview_animation = 910 |
| 29 |
object.show_in_town_map = true |
| 30 |
object.idle_animations = { |
| 31 |
north = 2644, |
| 32 |
east = 2646, |
| 33 |
} |
| 34 |
|
| 35 |
object.usage_animations = { |
| 36 |
north = { |
| 37 |
begin_use = { -- Patient lies down |
| 38 |
["Standard Male Patient"] = 4686, |
| 39 |
["Standard Female Patient"] = 4710, |
| 40 |
}, |
| 41 |
in_use = { -- Use "animation" |
| 42 |
["Standard Male Patient"] = 4694, |
| 43 |
["Standard Female Patient"] = 4718, |
| 44 |
}, |
| 45 |
finish_use = { -- Patient stands up again |
| 46 |
["Standard Male Patient"] = 4702, |
| 47 |
["Standard Female Patient"] = 4726, |
| 48 |
}, |
| 49 |
}, |
| 50 |
east = { |
| 51 |
begin_use = { -- Patient lies down |
| 52 |
["Standard Male Patient"] = 4688, |
| 53 |
["Standard Female Patient"] = 4712, |
| 54 |
}, |
| 55 |
in_use = { -- Use "animation" |
| 56 |
["Standard Male Patient"] = 4696, |
| 57 |
["Standard Female Patient"] = 4720, |
| 58 |
}, |
| 59 |
finish_use = { -- Patient stands up again |
| 60 |
["Standard Male Patient"] = 4704, |
| 61 |
["Standard Female Patient"] = 4728, |
| 62 |
}, |
| 63 |
}, |
| 64 |
} |
| 65 |
|
| 66 |
local anim_mgr = TheApp.animation_manager |
| 67 |
local kf1, kf2, kf3 = {1, -1}, {0.4, -1}, {-0.3, -1} |
| 68 |
anim_mgr:setPatientMarker(object.usage_animations.north.begin_use, 0, kf1, 4, kf2, 12, kf2, 18, kf3) |
| 69 |
anim_mgr:setPatientMarker(object.usage_animations.north.in_use, kf3) |
| 70 |
anim_mgr:setPatientMarker(object.usage_animations.north.finish_use, 0, kf3, 6, kf3, 12, kf2, 14, kf1) |
| 71 |
-- TODO: The other direction setPatientMarker |
| 72 |
|
| 73 |
object.orientations = { |
| 74 |
north = { |
| 75 |
footprint = { {1, -1, only_passable = true}, {-1, -1, complete_cell = true}, |
| 76 |
{0, -1, complete_cell = true}, {-1, 0, complete_cell = true}, |
| 77 |
{0, 0, complete_cell = true} }, |
| 78 |
use_position = {1, -1}, |
| 79 |
early_list = true, |
| 80 |
}, |
| 81 |
east = { |
| 82 |
footprint = { {0, 1, only_passable = true}, {-1, -1, complete_cell = true}, |
| 83 |
{0, -1, complete_cell = true}, {-1, 0, complete_cell = true}, |
| 84 |
{0, 0, complete_cell = true} }, |
| 85 |
use_position = {0, 1}, |
| 86 |
early_list = true, |
| 87 |
}, |
| 88 |
south = { |
| 89 |
footprint = { {1, 0, only_passable = true}, {-1, -1, complete_cell = true}, |
| 90 |
{0, -1, complete_cell = true}, {-1, 0, complete_cell = true}, |
| 91 |
{0, 0, complete_cell = true} }, |
| 92 |
use_position = {1, 0}, |
| 93 |
render_attach_position = {{-2,0},{-1,0},{0,0},{0,-1,}}, |
| 94 |
}, |
| 95 |
west = { |
| 96 |
footprint = { {-1, 1, only_passable = true}, {-1, -1, complete_cell = true}, |
| 97 |
{0, -1, complete_cell = true}, {-1, 0, complete_cell = true}, |
| 98 |
{0, 0, complete_cell = true} }, |
| 99 |
use_position = {-1, 1}, |
| 100 |
}, |
| 101 |
} |
| 102 |
|
| 103 |
return object |