calculations.lua¶
Functions used for the ingame help windows.
- programs_wares_count(tribe, building, ware_description)¶
Examines the production site programs and returns three tables.
- Parameters:
tribe – The
wl.map.TribeDescription
for the tribe that consumes the warebuilding – The
wl.map.BuildingDescription
ware_description – A
wl.map.WareDecription
- Returns (in this order):
An
array
of program_names this production site hasA
table
of{program_name,wares_count}
A
table
of{program_name,formatted_string(s)}
- programs_workers_count(tribe, building, worker_description)¶
Examines the production site programs and returns three tables.
- Parameters:
tribe – The
wl.map.TribeDescription
for the tribe that consumes the warebuilding – The
wl.map.BuildingDescription
worker_description – A
wl.map.WorkerDecription
- Returns (in this order):
An
array
of program_names this production site hasA
table
of{program_name,workers_count}
A
table
of{program_name,formatted_string(s)}