1dirname = path.dirname(__file__)
2
3tribes:new_productionsite_type {
4   msgctxt = "barbarians_building",
5   name = "barbarians_cattlefarm",
6   -- TRANSLATORS: This is a building name used in lists of buildings
7   descname = pgettext("barbarians_building", "Cattle Farm"),
8   helptext_script = dirname .. "helptexts.lua",
9   icon = dirname .. "menu.png",
10   size = "big",
11
12   buildcost = {
13      log = 2,
14      granite = 2,
15      blackwood = 1
16   },
17   return_on_dismantle = {
18      granite = 1,
19      blackwood = 1
20   },
21
22   animations = {
23      idle = {
24         pictures = path.list_files(dirname .. "idle_??.png"),
25         hotspot = { 57, 80 },
26      },
27      working = {
28         pictures = path.list_files(dirname .. "idle_??.png"), -- TODO(GunChleoc): No animation yet.
29         hotspot = { 57, 80 },
30      },
31   },
32
33   aihints = {
34      prohibited_till = 610,
35   },
36
37   working_positions = {
38      barbarians_cattlebreeder = 1
39   },
40
41   inputs = {
42      { name = "water", amount = 8 },
43      { name = "wheat", amount = 8 }
44   },
45   outputs = {
46      "barbarians_ox"
47   },
48
49   programs = {
50      work = {
51         -- TRANSLATORS: Completed/Skipped/Did not start rearing cattle because ...
52         descname = pgettext("barbarians_building", "rearing cattle"),
53         actions = {
54            "return=skipped unless economy needs barbarians_ox",
55            "consume=wheat water",
56            "sleep=15000",
57            "playsound=sound/farm/ox 192",
58            "animate=working 15000", -- Animation of feeding the cattle
59            "recruit=barbarians_ox"
60         }
61      },
62   },
63}
64