1dirname = path.dirname(__file__)
2
3tribes:new_productionsite_type {
4   msgctxt = "frisians_building",
5   name = "frisians_coalmine_deep",
6   -- TRANSLATORS: This is a building name used in lists of buildings
7   descname = pgettext("frisians_building", "Deep Coal Mine"),
8   helptext_script = dirname .. "helptexts.lua",
9   icon = dirname .. "menu.png",
10   size = "mine",
11
12   enhancement_cost = {
13      brick = 2,
14      granite = 1,
15      log = 1,
16      reed = 2
17   },
18   return_on_dismantle_on_enhanced = {
19      brick = 1,
20      log = 1,
21      reed = 1
22   },
23
24   spritesheets = {
25      idle = {
26         directory = dirname,
27         basename = "idle",
28         hotspot = {28, 74},
29         frames = 10,
30         columns = 5,
31         rows = 2,
32         fps = 10
33      },
34      working = {
35         directory = dirname,
36         basename = "working",
37         hotspot = {28, 74},
38         frames = 10,
39         columns = 5,
40         rows = 2,
41         fps = 10
42      },
43      empty = {
44         directory = dirname,
45         basename = "empty",
46         hotspot = {28, 74},
47         frames = 10,
48         columns = 5,
49         rows = 2,
50         fps = 10
51      }
52   },
53   animations = {
54      unoccupied = {
55         directory = dirname,
56         basename = "unoccupied",
57         hotspot = {28, 57}
58      }
59   },
60
61   aihints = {
62      mines = "coal",
63   },
64
65   working_positions = {
66      frisians_miner = 1,
67      frisians_miner_master = 1,
68   },
69
70   indicate_workarea_overlaps = {
71      frisians_coalmine = false,
72      frisians_coalmine_deep = false,
73   },
74
75   inputs = {
76      { name = "meal", amount = 8 }
77   },
78   outputs = {
79      "coal"
80   },
81
82   programs = {
83      work = {
84         -- TRANSLATORS: Completed/Skipped/Did not start mining coal because ...
85         descname = _"mining coal",
86         actions = {
87            "return=skipped unless economy needs coal",
88            "consume=meal",
89            "sleep=39900",
90            "call=mine_produce",
91            "call=mine_produce",
92            "call=mine_produce",
93            "call=mine_produce",
94            "call=mine_produce",
95            "call=mine_produce",
96            "call=mine_produce",
97         }
98      },
99      mine_produce = {
100         descname = _"mining coal",
101         actions = {
102            "animate=working 8700",
103            "mine=coal 3 100 10 5",
104            "produce=coal",
105         }
106      },
107      encyclopedia = {
108         -- just a dummy program to fix encyclopedia
109         descname = "encyclopedia",
110         actions = {
111            "consume=meal",
112            "produce=coal:7",
113         }
114      },
115   },
116   out_of_resource_notification = {
117      -- Translators: Short for "Out of ..." for a resource
118      title = _"No Coal",
119      heading = _"Main Coal Vein Exhausted",
120      message =
121         pgettext("frisians_building", "This coal mine’s main vein is exhausted. Expect strongly diminished returns on investment. This mine can’t be enhanced any further, so you should consider dismantling or destroying it."),
122   },
123}
124