| 1 |
--[[ Copyright (c) 2011 Manuel "Roujin" Wolf |
| 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 = "dna_fixer" |
| 23 |
object.thob = 23 |
| 24 |
object.research_fallback = 8 |
| 25 |
object.research_category = "cure" |
| 26 |
object.name = _S.object.dna_fixer |
| 27 |
object.tooltip = _S.tooltip.objects.dna_fixer |
| 28 |
object.ticks = false |
| 29 |
object.build_preview_animation = 5070 |
| 30 |
object.default_strength = 7 |
| 31 |
object.crashed_animation = 3376 -- TODO correct? |
| 32 |
object.show_in_town_map = true |
| 33 |
object.smoke_animation = 3444 |
| 34 |
local function copy_north_to_south(t) |
| 35 |
t.south = t.north |
| 36 |
return t |
| 37 |
end |
| 38 |
|
| 39 |
-- 2350 another idle? |
| 40 |
-- 3848, 3850, 3852 sparks during transformation? |
| 41 |
-- TODO: No repair animation?? |
| 42 |
object.idle_animations = copy_north_to_south { |
| 43 |
north = 3840, |
| 44 |
} |
| 45 |
object.usage_animations = copy_north_to_south { |
| 46 |
north = { -- NB: SOME (not all) of the animations are provided for east rather than north. There the mirror / mirror_morph flag is used. |
| 47 |
begin_use = { |
| 48 |
["Standard Female Patient"] = 3614, |
| 49 |
["Standard Male Patient" ] = 3614, |
| 50 |
}, |
| 51 |
in_use = { -- TODO fix the object being displayed in front of the other anim |
| 52 |
["Standard Female Patient"] = {"morph", 3594, 1150, mirror_morph = true, object_visible = true, length = 10}, -- 3594 (normal) morph to 1150 (mirrored) |
| 53 |
["Standard Male Patient" ] = {"morph", 3594, 3618, mirror_morph = true, object_visible = true, length = 10}, -- 3594 (normal) morph to 3618 (mirrored) |
| 54 |
}, |
| 55 |
finish_use = { -- Patient leaves machine, mirrored |
| 56 |
["Standard Female Patient"] = {1154, mirror = true}, |
| 57 |
["Standard Male Patient" ] = {3622, mirror = true}, |
| 58 |
}, |
| 59 |
}, |
| 60 |
} |
| 61 |
|
| 62 |
object.orientations = { |
| 63 |
north = { |
| 64 |
footprint = { {-2, -1, complete_cell = true}, {-1, -1, complete_cell = true}, |
| 65 |
{0, -1}, |
| 66 |
{-2, 0, complete_cell = true}, {-1, 0}, {0, 0, need_south_side = true}, |
| 67 |
{-1, 1, only_passable = true} }, |
| 68 |
use_position = "passable", |
| 69 |
early_list = true, |
| 70 |
smoke_position = {0, 0} |
| 71 |
}, |
| 72 |
east = { |
| 73 |
footprint = { {-1, -2, complete_cell = true}, {0, -2, complete_cell = true}, |
| 74 |
{-1, -1, complete_cell = true}, {0, -1, complete_cell = true}, |
| 75 |
{-1, 0}, {0, 0}, |
| 76 |
{1, -1, only_passable = true} }, |
| 77 |
use_position = "passable", |
| 78 |
smoke_position = {0, 0} |
| 79 |
}, |
| 80 |
} |
| 81 |
|
| 82 |
-- TODO |
| 83 |
--local anim_mgr = TheApp.animation_manager |
| 84 |
--anim_mgr:setMarker(object.idle_animations.north, {-1.3, -1.2}) |
| 85 |
|
| 86 |
return object |