1dirname = path.dirname(__file__)
2
3tribes:new_productionsite_type {
4   msgctxt = "barbarians_building",
5   name = "barbarians_barracks",
6   -- TRANSLATORS: This is a building name used in lists of buildings
7   descname = pgettext("barbarians_building", "Barracks"),
8   helptext_script = dirname .. "helptexts.lua",
9   icon = dirname .. "menu.png",
10   size = "medium",
11
12   buildcost = {
13      log = 4,
14      granite = 2,
15      grout = 4,
16      reed = 1
17   },
18   return_on_dismantle = {
19      log = 2,
20      granite = 1,
21      grout = 1
22   },
23
24   animations = {
25      idle = { -- TODO(GunChleoc): make animations
26         pictures = path.list_files(dirname .. "idle_??.png"),
27         hotspot = { 50, 38 },
28      },
29      build = { -- TODO(GunChleoc): make animations
30         pictures = path.list_files(dirname .. "build_??.png"),
31         hotspot = { 50, 38 },
32      },
33      working = { -- TODO(GunChleoc): make animations
34         pictures = path.list_files(dirname .. "working_??.png"),
35         hotspot = { 50, 38 },
36      }
37   },
38
39   aihints = {
40      very_weak_ai_limit = 1,
41      weak_ai_limit = 2,
42      prohibited_till = 920
43   },
44
45   working_positions = {
46      barbarians_trainer = 1
47   },
48
49   inputs = {
50      { name = "ax", amount = 8 },
51      { name = "barbarians_recruit", amount = 8 }
52   },
53   outputs = {
54      "barbarians_soldier",
55   },
56
57   programs = {
58      work = {
59         -- TRANSLATORS: Completed/Skipped/Did not start recruiting soldier because ...
60         descname = pgettext("barbarians_building", "recruiting soldier"),
61         actions = {
62            "return=skipped unless economy needs barbarians_soldier",
63            "consume=ax barbarians_recruit",
64            "sleep=15000",
65            "animate=working 15000",
66            "recruit=barbarians_soldier"
67         }
68      },
69   }
70}
71