1dirname = path.dirname(__file__)
2
3tribes:new_productionsite_type {
4   msgctxt = "empire_building",
5   name = "empire_tavern",
6   -- TRANSLATORS: This is a building name used in lists of buildings
7   descname = pgettext("empire_building", "Tavern"),
8   helptext_script = dirname .. "helptexts.lua",
9   icon = dirname .. "menu.png",
10   size = "medium",
11   enhancement = "empire_inn",
12
13   buildcost = {
14      planks = 2,
15      granite = 2,
16      marble = 1
17   },
18   return_on_dismantle = {
19      planks = 1,
20      granite = 1,
21      marble = 1
22   },
23
24   animations = {
25      idle = {
26         pictures = path.list_files(dirname .. "idle_??.png"),
27         hotspot = { 52, 58 },
28      },
29      working = {
30         pictures = path.list_files(dirname .. "idle_??.png"), -- TODO(GunChleoc): No animation yet.
31         hotspot = { 52, 58 },
32      },
33   },
34
35   aihints = {
36      basic_amount = 1,
37      prohibited_till = 570
38   },
39
40   working_positions = {
41      empire_innkeeper = 1
42   },
43
44   inputs = {
45      { name = "fish", amount = 5 },
46      { name = "meat", amount = 5 },
47      { name = "empire_bread", amount = 5 }
48   },
49   outputs = {
50      "ration"
51   },
52
53   programs = {
54      work = {
55         -- TRANSLATORS: Completed/Skipped/Did not start preparing a ration because ...
56         descname = _"preparing a ration",
57         actions = {
58            -- time total: 33
59            "return=skipped unless economy needs ration",
60            "consume=empire_bread,fish,meat",
61            "sleep=5000",
62            "playsound=sound/empire/taverns/ration 100",
63            "animate=working 18000",
64            "sleep=10000",
65            "produce=ration"
66         }
67      },
68   },
69}
70