| 735 | } |
| 736 | |
| 737 | static int autochop_getLogCounts(lua_State *L) { |
| 738 | color_ostream *out = Lua::GetOutput(L); |
| 739 | if (!out) |
| 740 | out = &Core::getInstance().getConsole(); |
| 741 | DEBUG(control,*out).print("entering autochop_getNumLogs\n"); |
| 742 | int32_t usable_logs, inaccessible_logs; |
| 743 | vector<df::unit *> citizens; |
| 744 | Units::getCitizens(citizens, true); |
| 745 | scan_logs(*out, &usable_logs, citizens, &inaccessible_logs); |
| 746 | Lua::Push(L, usable_logs); |
| 747 | Lua::Push(L, inaccessible_logs); |
| 748 | return 2; |
| 749 | } |
| 750 | |
| 751 | static void push_burrow_config(lua_State *L, int id, bool chop = false, |
| 752 | bool clearcut = false, bool protect_brewable = false, |