1dirname = path.dirname(__file__)
2
3animations = {
4   idle = {
5      pictures = path.list_files(dirname .. "idle_??.png"),
6      hotspot = { 9, 23 },
7      fps = 10
8   },
9   hacking = {
10      pictures = path.list_files(dirname .. "hacking_??.png"),
11      hotspot = { 8, 23 },
12      fps = 10
13   }
14}
15add_directional_animation(animations, "walk", dirname, "walk", {9, 22}, 10)
16add_directional_animation(animations, "walkload", dirname, "walkload", {8, 25}, 10)
17
18
19tribes:new_worker_type {
20   msgctxt = "empire_worker",
21   name = "empire_stonemason",
22   -- TRANSLATORS: This is a worker name used in lists of workers
23   descname = pgettext("empire_worker", "Stonemason"),
24   helptext_script = dirname .. "helptexts.lua",
25   icon = dirname .. "menu.png",
26   vision_range = 2,
27
28   buildcost = {
29      empire_carrier = 1,
30      pick = 1
31   },
32
33   programs = {
34      cut_granite = {
35         "findobject=attrib:rocks radius:6",
36         "walk=object",
37         "playsound=sound/stonecutting/stonecutter 220",
38         "animate=hacking 17500",
39         "callobject=shrink",
40         "createware=granite",
41         "return"
42      },
43      cut_marble = {
44         "findobject=attrib:rocks radius:6",
45         "walk=object",
46         "playsound=sound/stonecutting/stonecutter 220",
47         "animate=hacking 17500",
48         "callobject=shrink",
49         "createware=marble",
50         "return"
51      }
52   },
53
54   animations = animations,
55}
56