| 1 |
--[[ Copyright (c) 2009 Edvin "Lego3" Linge |
| 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 = "electrolyser" |
| 23 |
object.thob = 46 |
| 24 |
object.research_category = "cure" |
| 25 |
object.research_fallback = 3 |
| 26 |
object.name = _S.object.electrolyser |
| 27 |
object.tooltip = _S.tooltip.objects.electrolyser |
| 28 |
object.ticks = false |
| 29 |
object.build_preview_animation = 930 |
| 30 |
object.default_strength = 10 |
| 31 |
object.crashed_animation = 3300 |
| 32 |
object.show_in_town_map = true |
| 33 |
object.smoke_animation = 3456 |
| 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 = 1262, |
| 40 |
} |
| 41 |
object.usage_animations = copy_north_to_south { |
| 42 |
north = { |
| 43 |
begin_use = { -- Patient invited onto machine |
| 44 |
["Standard Female Patient"] = 1266, |
| 45 |
["Standard Male Patient" ] = 1266, |
| 46 |
["Handyman" ] = 3546, |
| 47 |
}, |
| 48 |
in_use = { -- Patient gets electrocuted |
| 49 |
["Standard Female Patient"] = 1274, |
| 50 |
["Standard Male Patient" ] = 1274, |
| 51 |
["Handyman" ] = 3550, |
| 52 |
}, |
| 53 |
finish_use = { -- Patient sparks |
| 54 |
["Standard Female Patient"] = 1278, |
| 55 |
["Standard Male Patient" ] = 1278, |
| 56 |
["Handyman" ] = 3554, |
| 57 |
}, |
| 58 |
finish_use_2 = { -- Hair falls off |
| 59 |
["Standard Female Patient"] = 2940, |
| 60 |
["Standard Male Patient" ] = 1286, |
| 61 |
}, |
| 62 |
finish_use_3 = { -- Patient leaves machine |
| 63 |
["Standard Female Patient"] = 2944, |
| 64 |
["Standard Male Patient" ] = 1294, |
| 65 |
}, |
| 66 |
}, |
| 67 |
} |
| 68 |
|
| 69 |
object.orientations = { |
| 70 |
north = { |
| 71 |
render_attach_position = {-1, -1}, |
| 72 |
footprint = { {-2, -2, need_west_side = true}, {-1, -2}, {0, -2, need_east_side = true}, |
| 73 |
{-2, -1, complete_cell = true}, {-1, -1}, {0, -1, complete_cell = true}, |
| 74 |
{-2, 0, complete_cell = true}, {-1, 0}, {0, 0, complete_cell = true}, |
| 75 |
{-1, 1, only_passable = true, need_south_side = true} }, |
| 76 |
use_position = "passable", |
| 77 |
smoke_position = {0, 0}, |
| 78 |
}, |
| 79 |
east = { |
| 80 |
render_attach_position = {-1, -1}, |
| 81 |
footprint = { {-2, -2, need_north_side = true}, {-1, -2}, {0, -2, complete_cell = true}, |
| 82 |
{-2, -1}, {-1, -1}, {0, -1, complete_cell = true}, |
| 83 |
{-2, 0, need_south_side = true}, {-1, 0}, {0, 0, complete_cell = true}, |
| 84 |
{1, -1, only_passable = true, need_east_side = true} }, |
| 85 |
use_position = "passable", |
| 86 |
smoke_position = {0, 0}, |
| 87 |
}, |
| 88 |
} |
| 89 |
local anim_mgr = TheApp.animation_manager |
| 90 |
anim_mgr:setPatientMarker(object.idle_animations.north, {-1.3, -1.2}) |
| 91 |
|
| 92 |
return object |