1dirname = path.dirname(__file__) 2 3tribes:new_productionsite_type { 4 msgctxt = "empire_building", 5 name = "empire_armorsmithy", 6 -- TRANSLATORS: This is a building name used in lists of buildings 7 descname = pgettext("empire_building", "Armor Smithy"), 8 helptext_script = dirname .. "helptexts.lua", 9 icon = dirname .. "menu.png", 10 size = "medium", 11 12 buildcost = { 13 log = 2, 14 granite = 2, 15 marble = 2, 16 marble_column = 3 17 }, 18 return_on_dismantle = { 19 granite = 1, 20 marble = 1, 21 marble_column = 2 22 }, 23 24 animations = { 25 idle = { 26 pictures = path.list_files(dirname .. "idle_??.png"), 27 hotspot = { 50, 62 }, 28 }, 29 build = { 30 pictures = path.list_files(dirname .. "build_??.png"), 31 hotspot = { 50, 62 }, 32 }, 33 unoccupied = { 34 pictures = path.list_files(dirname .. "unoccupied_??.png"), 35 hotspot = { 50, 62 }, 36 }, 37 working = { 38 pictures = path.list_files(dirname .. "working_??.png"), 39 hotspot = { 50, 62 }, 40 fps = 5 41 }, 42 }, 43 44 aihints = { 45 prohibited_till = 1400, 46 }, 47 48 working_positions = { 49 empire_armorsmith = 1 50 }, 51 52 inputs = { 53 { name = "coal", amount = 8 }, 54 { name = "iron", amount = 8 }, 55 { name = "gold", amount = 8 }, 56 { name = "cloth", amount = 8 } 57 }, 58 outputs = { 59 "armor_helmet", 60 "armor", 61 "armor_chain", 62 "armor_gilded" 63 }, 64 65 programs = { 66 work = { 67 -- TRANSLATORS: Completed/Skipped/Did not start working because ... 68 descname = _"working", 69 actions = { 70 "call=produce_armor_helmet", 71 "call=produce_armor", 72 "call=produce_armor_chain", 73 "call=produce_armor_helmet", 74 "call=produce_armor_gilded", 75 } 76 }, 77 produce_armor_helmet = { 78 -- TRANSLATORS: Completed/Skipped/Did not start forging a helmet because ... 79 descname = _"forging a helmet", 80 actions = { 81 -- time total: 67 + 3.6 82 "return=skipped unless economy needs armor_helmet", 83 "consume=iron coal", 84 "sleep=47000", 85 "animate=working 20000", 86 "produce=armor_helmet" 87 } 88 }, 89 produce_armor = { 90 -- TRANSLATORS: Completed/Skipped/Did not start forging a suit of armor because ... 91 descname = _"forging a suit of armor", 92 actions = { 93 -- time total: 77 + 3.6 94 "return=skipped unless economy needs armor", 95 "consume=iron coal cloth", 96 "sleep=32000", 97 "animate=working 45000", 98 "produce=armor" 99 } 100 }, 101 produce_armor_chain = { 102 -- TRANSLATORS: Completed/Skipped/Did not start forging a suit of chain armor because ... 103 descname = _"forging a suit of chain armor", 104 actions = { 105 -- time total: 77 + 3.6 106 "return=skipped unless economy needs armor_chain", 107 "consume=iron:2 coal cloth", 108 "sleep=32000", 109 "animate=working 45000", 110 "produce=armor_chain" 111 } 112 }, 113 produce_armor_gilded = { 114 -- TRANSLATORS: Completed/Skipped/Did not start forging a suit of gilded armor because ... 115 descname = _"forging a suit of gilded armor", 116 actions = { 117 -- time total: 77 + 3.6 118 "return=skipped unless economy needs armor_gilded", 119 "consume=iron:2 coal:2 cloth gold", 120 "sleep=32000", 121 "animate=working 45000", 122 "produce=armor_gilded" 123 } 124 }, 125 }, 126} 127