1dirname = path.dirname(__file__)
2
3tribes:new_productionsite_type {
4   msgctxt = "barbarians_building",
5   name = "barbarians_farm",
6   -- TRANSLATORS: This is a building name used in lists of buildings
7   descname = pgettext("barbarians_building", "Farm"),
8   helptext_script = dirname .. "helptexts.lua",
9   icon = dirname .. "menu.png",
10   size = "big",
11
12   buildcost = {
13      log = 4,
14      blackwood = 1,
15      granite = 3
16   },
17   return_on_dismantle = {
18      log = 1,
19      blackwood = 1,
20      granite = 2
21   },
22
23   animations = {
24      idle = {
25         pictures = path.list_files(dirname .. "idle_??.png"),
26         hotspot = { 69, 76 },
27      },
28      build = {
29         pictures = path.list_files(dirname .. "build_??.png"),
30         hotspot = { 69, 76 },
31      },
32      unoccupied = {
33         pictures = path.list_files(dirname .. "unoccupied_??.png"),
34         hotspot = { 69, 76 },
35      },
36      working = {
37         pictures = path.list_files(dirname .. "working_??.png"),
38         hotspot = { 69, 76 },
39      },
40   },
41
42   aihints = {
43      space_consumer = true,
44      prohibited_till = 400,
45      very_weak_ai_limit = 1,
46      weak_ai_limit = 3
47   },
48
49   working_positions = {
50      barbarians_farmer = 1
51   },
52
53   outputs = {
54      "wheat"
55   },
56
57   indicate_workarea_overlaps = {
58      barbarians_rangers_hut = false,
59      barbarians_farm = false,
60      barbarians_reed_yard = false,
61   },
62
63   programs = {
64      work = {
65         -- TRANSLATORS: Completed/Skipped/Did not start working because ...
66         descname = _"working",
67         actions = {
68            "call=plant",
69            "call=harvest",
70         }
71      },
72      plant = {
73         -- TRANSLATORS: Completed/Skipped/Did not start planting wheat because ...
74         descname = _"planting wheat",
75         actions = {
76            "callworker=plant",
77            "animate=working 7000",
78            "sleep=3000"
79         }
80      },
81      harvest = {
82         -- TRANSLATORS: Completed/Skipped/Did not start harvesting wheat because ...
83         descname = _"harvesting wheat",
84         actions = {
85            "callworker=harvest",
86            "animate=working 3000",
87            "sleep=1000"
88         }
89      },
90   },
91   out_of_resource_notification = {
92      -- Translators: Short for "Out of ..." for a resource
93      title = _"No Fields",
94      heading = _"Out of Fields",
95      message = pgettext("barbarians_building", "The farmer working at this farm has no cleared soil to plant his seeds."),
96      productivity_threshold = 30
97   },
98}
99