1,2) Seems to be working for me. At least this prints three lines with the correct count (and same for .inputs)
game = wl.Game()
b = game:get_building_description("barbarians", "deeper_coalmine")
for name, count in pairs(b.working_positions) do
print(name, count)
end
print(b.nr_working_positions) -- outputs 3
3, 4) Did not start on this. Do you want to try it or should I give it a shot?
5) Added a bunch of comments. Getting the parameters of the building programs (or the worker programs for that matter) is complicated and I have no clear concept on how it can be done right now easily without wrapping every supported program - which is more work than keeping the hardcoding up to date.
Okay, I did some work here now.
1,2) Seems to be working for me. At least this prints three lines with the correct count (and same for .inputs) building_ description( "barbarians" , "deeper_coalmine") working_ positions) do nr_working_ positions) -- outputs 3
game = wl.Game()
b = game:get_
for name, count in pairs(b.
print(name, count)
end
print(b.
3, 4) Did not start on this. Do you want to try it or should I give it a shot?
5) Added a bunch of comments. Getting the parameters of the building programs (or the worker programs for that matter) is complicated and I have no clear concept on how it can be done right now easily without wrapping every supported program - which is more work than keeping the hardcoding up to date.