| 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 = "cast_remover" |
| 23 |
object.thob = 24 |
| 24 |
object.research_category = "cure" |
| 25 |
object.research_fallback = 9 |
| 26 |
object.name = _S.object.cast_remover |
| 27 |
object.tooltip = _S.tooltip.objects.cast_remover |
| 28 |
object.ticks = false |
| 29 |
object.build_preview_animation = 5072 |
| 30 |
object.default_strength = 10 |
| 31 |
object.crashed_animation = 3388 |
| 32 |
object.show_in_town_map = true |
| 33 |
object.smoke_animation = 3468 |
| 34 |
local function copy_north_to_south(t) |
| 35 |
t.south = t.north |
| 36 |
return t |
| 37 |
end |
| 38 |
object.idle_animations = copy_north_to_south { |
| 39 |
north = 2492, |
| 40 |
} |
| 41 |
object.walk_in_to_use = true -- This is only considered by use_object, not multi_use_object. |
| 42 |
object.usage_animations = copy_north_to_south { |
| 43 |
north = { |
| 44 |
in_use = {["Handyman"] = 3514}, |
| 45 |
}, |
| 46 |
} |
| 47 |
|
| 48 |
local anim_mgr = TheApp.animation_manager |
| 49 |
anim_mgr:setStaffMarker(object.usage_animations.north.in_use.Handyman, {-1, -38, "px"}) |
| 50 |
|
| 51 |
object.multi_usage_animations = { |
| 52 |
["Alternate Male Patient - Nurse"] = copy_north_to_south { |
| 53 |
north = { |
| 54 |
begin_use = 2720, -- Patient invited onto machine |
| 55 |
begin_use_2 = 2696, -- Machine closes |
| 56 |
begin_use_3 = 2692, -- Nurse introduces the almighty black bucket |
| 57 |
in_use = 2688, -- The machine spits in the bucket |
| 58 |
finish_use = 3662, -- Nurse takes the bucket again (different tile than 3658!) |
| 59 |
finish_use_2 = 3658, -- The machine opens and the patient stands up |
| 60 |
}, |
| 61 |
}, |
| 62 |
["Standard Female Patient - Nurse"] = copy_north_to_south { |
| 63 |
north = { |
| 64 |
begin_use = 4658, -- Patient invited onto machine |
| 65 |
begin_use_2 = 4666, -- Machine closes |
| 66 |
begin_use_3 = 4670, -- Nurse introduces the almighty black bucket |
| 67 |
in_use = 4674, -- The machine spits in the bucket |
| 68 |
finish_use = 5112, -- Nurse takes the bucket again |
| 69 |
finish_use_2 = 4682, -- The machine opens up and patient leaves |
| 70 |
}, |
| 71 |
}, |
| 72 |
} |
| 73 |
|
| 74 |
local kf1, kf2, kf3 = {-10, -5, "px"}, {-11, -7, "px"}, {-15, -12, "px"} |
| 75 |
local kf4, kf5, kf6 = {-20, -14, "px"}, {-26, -18, "px"}, {-31, -17, "px"} |
| 76 |
local kf7 = {-35, -17, "px"} |
| 77 |
anim_mgr:setPatientMarker({2720, 4658}, 0, kf1, 1, kf2, 2, kf3, 3, kf4, 4, kf5, |
| 78 |
5, kf6, 6, kf7, 7, kf7) |
| 79 |
kf1 = {29, -18, "px"} |
| 80 |
anim_mgr:setStaffMarker({2720, 4658}, kf1) |
| 81 |
|
| 82 |
anim_mgr:setPatientMarker({2696, 4666}, kf7) |
| 83 |
anim_mgr:setStaffMarker({2696, 4666}, kf1) |
| 84 |
|
| 85 |
anim_mgr:setPatientMarker({2692, 4670}, kf7) |
| 86 |
local kf8, kf9, kf10 = {19, -20, "px"}, {11, -18, "px"}, {5, -13, "px"} |
| 87 |
local kf11, kf12, kf13 = {-4, -4, "px"}, {5, -4, "px"}, {14, -8, "px"} |
| 88 |
local kf14, kf15, kf16 = {19, -10, "px"}, {27, -17, "px"}, {29, -17, "px"} |
| 89 |
kf2, kf3, kf4, kf5 = {31, -19, "px"}, {22, -20, "px"}, {16, -23, "px"}, {11, -22, "px"} |
| 90 |
kf6 = {16, -20, "px"} |
| 91 |
anim_mgr:setStaffMarker({2692, 4670}, 0, kf2, 1, kf3, 2, kf4, 3, kf5, 6, kf5, |
| 92 |
7, kf6, 8, kf8, 9, kf9, 10, kf10, 11, kf10, 12, kf11, 15, kf11, 16, kf12, |
| 93 |
17, kf13, 18, kf14, 19, kf15, 20, kf16) |
| 94 |
|
| 95 |
anim_mgr:setPatientMarker({2688, 4676}, kf7) |
| 96 |
anim_mgr:setStaffMarker({2688, 4674}, kf1) |
| 97 |
|
| 98 |
anim_mgr:setPatientMarker({3662, 5112}, kf7) |
| 99 |
local kf17, kf18, kf19 = {17, -23, "px"}, {11, -21, "px"}, {15, -19, "px"} |
| 100 |
local kf20, kf21, kf22 = {19, -21, "px"}, {27, -19, "px"}, {31, -17, "px"} |
| 101 |
local kf23, kf24, kf25 = {38, -16, "px"}, {42, -13, "px"}, {49, -8, "px"} |
| 102 |
local kf26, kf27, kf28 = {52, -8, "px"}, {55, -7, "px"}, {59, -4, "px"} |
| 103 |
kf2, kf3, kf4, kf5 = {30, -17, "px"}, {27, -14, "px"}, {23, -15, "px"}, {20, -11, "px"} |
| 104 |
kf6, kf8, kf9, kf10 = {15, -9, "px"}, {10, -7, "px"}, {-2, -5, "px"}, {3, -7, "px"} |
| 105 |
kf11, kf12, kf13, kf14 = {8, -10, "px"}, {14, -13, "px"}, {22, -14, "px"}, {27, -16, "px"} |
| 106 |
kf15, kf16, kf1 = {31, -14, "px"}, {27, -20, "px"}, {24, -20, "px"} |
| 107 |
anim_mgr:setStaffMarker({3662, 5112}, 0, kf2, 1, kf3, 2, kf4, 3, kf5, 4, kf6, |
| 108 |
5, kf8, 6, kf9, 9, kf9, 10, kf10, 11, kf11, 12, kf12, 13, kf13, 14, kf14, |
| 109 |
15, kf15, 16, kf16, 17, kf1, 18, kf17, 20, kf18, 23, kf18, 24, kf19, 25, |
| 110 |
kf20, 26, kf1, 27, kf21, 28, kf22, 29, kf23, 30, kf24, 31, kf25, 32, kf26, |
| 111 |
33, kf27, 34, kf28) |
| 112 |
|
| 113 |
kf2, kf3, kf4, kf5 = {-26, -16, "px"}, {-17, -11, "px"}, {-9, -10, "px"}, {-7, -9, "px"} |
| 114 |
anim_mgr:setPatientMarker({3658, 4682}, 0, kf7, 11, kf7, 12, kf2, 13, kf3, |
| 115 |
14, kf4, 15, kf5) |
| 116 |
kf6 = {62, 1, "px"} |
| 117 |
anim_mgr:setStaffMarker({3658, 4682}, kf6) |
| 118 |
|
| 119 |
|
| 120 |
object.orientations = { |
| 121 |
north = { |
| 122 |
use_position = {0, 0}, |
| 123 |
handyman_position = {{0, -2}, {-1, -1}}, |
| 124 |
walk_in_tile = {0, -1}, |
| 125 |
use_position_secondary = {0, -1}, |
| 126 |
finish_use_position_secondary = {1, -1}, |
| 127 |
footprint = { {-1, -1, complete_cell = true}, {0, -1, only_passable = true}, {1, -1, only_passable = true}, |
| 128 |
{-1, 0, complete_cell = true}, {0, 0, only_passable = true, complete_cell = true}, |
| 129 |
{-1, 1, only_passable = true, need_west_side = true}, |
| 130 |
{-1, -2, only_passable = true, invisible = true, optional = true}, |
| 131 |
{-2, -1, only_passable = true, invisible = true, optional = true} }, |
| 132 |
render_attach_position = {-1, 1}, |
| 133 |
smoke_position = {0, 0}, |
| 134 |
}, |
| 135 |
east = { |
| 136 |
use_position = {0, 0}, |
| 137 |
handyman_position = {{-1, -1}, {-2, 0}}, |
| 138 |
walk_in_tile = {-1, 0}, |
| 139 |
use_position_secondary = {-1, 0}, |
| 140 |
finish_use_position_secondary = {-1, 1}, |
| 141 |
footprint = { {-1, -1}, {0, -1, complete_cell = true}, {1, -1, only_passable = true, need_north_side = true}, |
| 142 |
{-1, 0, only_passable = true}, {0, 0, only_passable = true, complete_cell = true}, |
| 143 |
{-1, 1, only_passable = true}, |
| 144 |
{-2, -1, only_passable = true, invisible = true, optional = true}, |
| 145 |
{-1, -2, only_passable = true, invisible = true, optional = true} }, |
| 146 |
early_list = true, |
| 147 |
smoke_position = {0, 0}, |
| 148 |
}, |
| 149 |
} |
| 150 |
anim_mgr:setPatientMarker(object.idle_animations.north, {-1.6, -0.8}) |
| 151 |
|
| 152 |
return object |