1dirname = path.dirname(__file__) 2 3tribes:new_worker_type { 4 msgctxt = "barbarians_worker", 5 name = "barbarians_geologist", 6 -- TRANSLATORS: This is a worker name used in lists of workers 7 descname = pgettext("barbarians_worker", "Geologist"), 8 helptext_script = dirname .. "helptexts.lua", 9 animation_directory = dirname, 10 icon = dirname .. "menu.png", 11 vision_range = 2, 12 13 buildcost = { 14 barbarians_carrier = 1, 15 hammer = 1 16 }, 17 18 programs = { 19 -- Expedition is the main program 20 -- The specialized geologist command walks the geologist around his starting 21 -- location, executing the search program from time to time. 22 expedition = { 23 "repeatsearch=15 5 search" 24 }, 25 -- Search program, executed when we have found a place to hack on 26 search = { 27 "animate=hack 5000", 28 "animate=idle 2000", 29 "playsound=sound/hammering/geologist_hammer 192", 30 "animate=hack 3000", 31 "findresources" 32 } 33 }, 34 35 spritesheets = { 36 idle = { 37 fps = 10, 38 frames = 10, 39 rows = 4, 40 columns = 3, 41 hotspot = { 9, 21 } 42 }, 43 walk = { 44 fps = 10, 45 frames = 10, 46 rows = 4, 47 columns = 3, 48 directional = true, 49 hotspot = { 9, 21 } 50 }, 51 hack = { 52 fps = 10, 53 frames = 10, 54 rows = 4, 55 columns = 3, 56 hotspot = { 11, 18 } 57 } 58 } 59} 60