| 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 = "desk" |
| 23 |
object.thob = 1 |
| 24 |
object.name = _S.object.desk |
| 25 |
object.tooltip = _S.tooltip.objects.desk |
| 26 |
object.ticks = false |
| 27 |
object.build_preview_animation = 900 |
| 28 |
object.show_in_town_map = true |
| 29 |
object.idle_animations = { |
| 30 |
north = 48, |
| 31 |
east = 50, |
| 32 |
} |
| 33 |
object.usage_animations = { |
| 34 |
north = { |
| 35 |
begin_use = { |
| 36 |
Doctor = 56, |
| 37 |
Nurse = 3240, |
| 38 |
}, |
| 39 |
in_use = { |
| 40 |
-- Note: 72 (normal usage) should happen a lot more often than 718 (head |
| 41 |
-- scratching), hence it appears in the list many times. |
| 42 |
Doctor = {72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 718}, |
| 43 |
Nurse = 3256, |
| 44 |
}, |
| 45 |
finish_use = { |
| 46 |
Doctor = 64, |
| 47 |
Nurse = 3248, |
| 48 |
}, |
| 49 |
}, |
| 50 |
east = { |
| 51 |
begin_use = { |
| 52 |
Doctor = 58, |
| 53 |
Nurse = 3242, |
| 54 |
}, |
| 55 |
in_use = { |
| 56 |
Doctor = 74, -- No analogue to 718 :( |
| 57 |
Nurse = 3258, |
| 58 |
}, |
| 59 |
finish_use = { |
| 60 |
Doctor = 66, |
| 61 |
Nurse = 3250, |
| 62 |
}, |
| 63 |
}, |
| 64 |
} |
| 65 |
local anim_mgr = TheApp.animation_manager |
| 66 |
local kf1, kf2, kf3 = {0, 0}, {-1, -0.3}, {-0.9, -0.1} |
| 67 |
anim_mgr:setStaffMarker( 56, 0, kf1, 10, kf2, 13, kf3) |
| 68 |
anim_mgr:setStaffMarker(3240, 0, kf1, 10, kf2, 13, kf3) |
| 69 |
anim_mgr:setStaffMarker( 72, kf3) |
| 70 |
anim_mgr:setStaffMarker( 718, kf3) |
| 71 |
anim_mgr:setStaffMarker(3256, kf3) |
| 72 |
anim_mgr:setStaffMarker( 64, 0, kf3, 3, kf2, 12, kf1) |
| 73 |
anim_mgr:setStaffMarker(3248, 0, kf3, 3, kf2, 12, kf1) |
| 74 |
kf1, kf2, kf3 = {-1, 0}, {-1, -1.1}, {-0.8, -0.9} |
| 75 |
anim_mgr:setStaffMarker( 58, 0, kf1, 9, kf2, 11, kf3) |
| 76 |
anim_mgr:setStaffMarker(3242, 0, kf1, 9, kf2, 11, kf3) |
| 77 |
kf1 = {-0.7, -1} |
| 78 |
anim_mgr:setStaffMarker( 74, kf1) |
| 79 |
anim_mgr:setStaffMarker(3258, kf1) |
| 80 |
kf2, kf1 = {-0.8, -1}, {-1, -2} |
| 81 |
anim_mgr:setStaffMarker( 66, 0, kf3, 3, kf2, 8, kf1) |
| 82 |
anim_mgr:setStaffMarker(3250, 0, kf3, 3, kf2, 8, kf1) |
| 83 |
|
| 84 |
object.orientations = { |
| 85 |
north = { |
| 86 |
footprint = { {-2, -1, complete_cell = true}, {-1, -1, complete_cell = true}, |
| 87 |
{-1, 0, complete_cell = true}, {0, -1, need_north_side = true}, |
| 88 |
{0, 0, only_passable = true} }, |
| 89 |
render_attach_position = {0, -1}, |
| 90 |
use_position = "passable", |
| 91 |
}, |
| 92 |
east = { |
| 93 |
footprint = { {0, -2, need_east_side = true}, {-1, -1, complete_cell = true}, |
| 94 |
{0, -1, complete_cell = true}, {-1, 0, only_passable = true}, |
| 95 |
{0, 0, complete_cell = true}, {-1, -2, only_passable = true}}, |
| 96 |
render_attach_position = {0, -1}, |
| 97 |
use_position = {-1, 0}, |
| 98 |
finish_use_position = {-1, -2}, |
| 99 |
}, |
| 100 |
south = { |
| 101 |
footprint = { {0, -1, only_passable = true}, {-2, 0, need_south_side = true}, |
| 102 |
{-1, -1, complete_cell = true}, {-1, 0, complete_cell = true}, |
| 103 |
{0, 0, complete_cell = true}, {-2, -1, only_passable = true} }, |
| 104 |
render_attach_position = {-2, 0}, |
| 105 |
use_position = {0, -1}, |
| 106 |
finish_use_position = {-2, -1}, |
| 107 |
}, |
| 108 |
west = { |
| 109 |
footprint = { {-1, -2, complete_cell = true}, {0, 0, only_passable = true}, |
| 110 |
{-1, -1, complete_cell = true}, {0, -1, complete_cell = true}, |
| 111 |
{-1, 0, need_west_side = true} }, |
| 112 |
render_attach_position = {-1, 0}, |
| 113 |
use_position = "passable", |
| 114 |
}, |
| 115 |
} |
| 116 |
|
| 117 |
return object |