[go: up one dir, main page]

File: building.lua

package info (click to toggle)
tome 2.3.11-ah-2
  • links: PTS, VCS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 18,976 kB
  • ctags: 12,278
  • sloc: ansic: 145,042; sh: 212; makefile: 70
file content (15 lines) | stat: -rw-r--r-- 381 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
__building_actions = {}

function add_building_action(a)
	assert(a.index, "No building action index")
	assert(a.action, "No building action action")
	__building_actions[a.index] = a.action
end

function __bact_activate(bact)
	if __building_actions[bact] then
		return __building_actions[bact]()
	end
end

add_hook_script(HOOK_BUILDING_ACTION, "__bact_activate", "__bact_activate")