1dirname = path.dirname(__file__)
2
3tribes:new_productionsite_type {
4   msgctxt = "empire_building",
5   name = "empire_sawmill",
6   -- TRANSLATORS: This is a building name used in lists of buildings
7   descname = pgettext("empire_building", "Sawmill"),
8   helptext_script = dirname .. "helptexts.lua",
9   icon = dirname .. "menu.png",
10   size = "medium",
11
12   buildcost = {
13      log = 2,
14      granite = 1,
15      planks = 1
16   },
17   return_on_dismantle = {
18      log = 1,
19      granite = 1
20   },
21
22   animations = {
23      idle = {
24         pictures = path.list_files(dirname .. "idle_??.png"),
25         hotspot = { 54, 70 },
26      },
27      working = {
28         pictures = path.list_files(dirname .. "idle_??.png"), -- TODO(GunChleoc): No animation yet.
29         hotspot = { 54, 70 },
30      },
31   },
32
33   aihints = {
34      basic_amount = 2,
35      very_weak_ai_limit = 2,
36      weak_ai_limit = 2
37   },
38
39   working_positions = {
40      empire_carpenter = 1
41   },
42
43   inputs = {
44      { name = "log", amount = 8 }
45   },
46   outputs = {
47      "planks"
48   },
49
50   programs = {
51      work = {
52         -- TRANSLATORS: Completed/Skipped/Did not start sawing logs because ...
53         descname = _"sawing logs",
54         actions = {
55            "return=skipped unless economy needs planks",
56            "consume=log:2",
57            "sleep=16500", -- Much faster than barbarians' wood hardener
58            "playsound=sound/sawmill/sawmill 180",
59            "animate=working 20000", -- Much faster than barbarians' wood hardener
60            "produce=planks"
61         }
62      },
63   },
64}
65