| 1 |
--[[ Copyright (c) 2009 Manuel König |
| 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 = "x_ray" |
| 23 |
object.thob = 27 |
| 24 |
object.research_category = "diagnosis" |
| 25 |
object.research_fallback = 39 |
| 26 |
object.name = _S.object.x_ray |
| 27 |
object.tooltip = _S.tooltip.objects.x_ray |
| 28 |
object.ticks = false |
| 29 |
object.build_preview_animation = 5076 |
| 30 |
object.default_strength = 12 |
| 31 |
object.crashed_animation = 3384 |
| 32 |
object.show_in_town_map = true |
| 33 |
object.smoke_animation = 3440 |
| 34 |
local function copy_north_to_south(t) |
| 35 |
t.south = t.north |
| 36 |
return t |
| 37 |
end |
| 38 |
|
| 39 |
object.idle_animations = copy_north_to_south { |
| 40 |
north = 1988, |
| 41 |
} |
| 42 |
|
| 43 |
object.usage_animations = copy_north_to_south { |
| 44 |
north = { |
| 45 |
begin_use = { -- Patient walks into X-ray |
| 46 |
["Standard Male Patient"] = 1964, |
| 47 |
["Standard Female Patient"] = 2948, |
| 48 |
["Slack Female Patient"] = 2948, |
| 49 |
["Slack Male Patient"] = 5178, |
| 50 |
["Elvis Patient"] = 5120, |
| 51 |
["Chewbacca Patient"] = 5132, |
| 52 |
["Invisible Patient"] = 614, |
| 53 |
["Handyman"] = 3558, |
| 54 |
}, |
| 55 |
in_use = { -- Radiation |
| 56 |
["Standard Male Patient"] = 1960, |
| 57 |
["Standard Female Patient"] = 2952, |
| 58 |
["Slack Female Patient"] = 2952, |
| 59 |
["Slack Male Patient"] = 5174, |
| 60 |
["Elvis Patient"] = 5128, |
| 61 |
["Chewbacca Patient"] = 610, |
| 62 |
["Invisible Patient"] = 5140, |
| 63 |
["Handyman"] = 3562, |
| 64 |
}, |
| 65 |
finish_use = { -- Patient walks away |
| 66 |
["Standard Male Patient"] = 1992, |
| 67 |
["Standard Female Patient"] = 2956, |
| 68 |
["Slack Female Patient"] = 2956, |
| 69 |
["Slack Male Patient"] = 5182, |
| 70 |
["Elvis Patient"] = 5124, |
| 71 |
["Chewbacca Patient"] = 5136, -- or 5138? |
| 72 |
["Invisible Patient"] = 618, |
| 73 |
["Handyman"] = 3562, -- TODO: Another glitch in the original. This sprite is missing. |
| 74 |
}, |
| 75 |
}, |
| 76 |
} |
| 77 |
|
| 78 |
object.orientations = { |
| 79 |
north = { |
| 80 |
use_position = {1, -1}, |
| 81 |
render_attach_position = {-1, -1}, |
| 82 |
footprint = { {-2, -2}, {-1, -2}, |
| 83 |
{-2, -1}, {-1, -1}, {0, -1}, {1, -1, only_passable = true}, |
| 84 |
{-2, 0}, {-1, 0}, {0, 0} }, |
| 85 |
smoke_position = {0, 0}, |
| 86 |
}, |
| 87 |
east = { |
| 88 |
use_position = {-1, 1}, |
| 89 |
render_attach_position = {-1, -1}, |
| 90 |
footprint = { {-2, -2}, {-1, -2}, {0, -2}, |
| 91 |
{-2, -1}, {-1, -1}, {0, -1}, |
| 92 |
{-1, 0}, {0, 0}, |
| 93 |
{-1, 1, only_passable = true} }, |
| 94 |
smoke_position = {0, 0}, |
| 95 |
}, |
| 96 |
} |
| 97 |
local anim_mgr = TheApp.animation_manager |
| 98 |
anim_mgr:setPatientMarker(object.idle_animations.north, {-2, -2}) |
| 99 |
|
| 100 |
local kf0 = {59, -4, "px"} |
| 101 |
local kf1 = {55, -8, "px"} |
| 102 |
local kf2 = {51, -8, "px"} |
| 103 |
local kf3 = {47, -11, "px"} |
| 104 |
local kf4 = {43, -12, "px"} |
| 105 |
local kf5 = {43, -13, "px"} |
| 106 |
local kf6 = {39, -15, "px"} |
| 107 |
local kf7 = {34, -18, "px"} |
| 108 |
local kf8 = {31, -20, "px"} |
| 109 |
local kf9 = {29, -21, "px"} |
| 110 |
local kf10 = {24, -23, "px"} |
| 111 |
local kf11 = {18, -27, "px"} |
| 112 |
local kf12 = {15, -33, "px"} |
| 113 |
local kf13 = {14, -34, "px"} |
| 114 |
local kf14 = {6, -36, "px"} |
| 115 |
|
| 116 |
anim_mgr:setStaffMarker(3558, 0, kf0, 1, kf1, 2, kf2, 3, kf3, 4, kf4, 5, kf5, |
| 117 |
6, kf6, 7, kf7, 8, kf8, 9, kf9, 10, kf10, 11, kf11, 12, kf12, 13, kf13, |
| 118 |
14, kf14) |
| 119 |
anim_mgr:setStaffMarker(3562, kf14) |
| 120 |
|
| 121 |
return object |