| 758 | } |
| 759 | |
| 760 | static int preserve_rooms_getDebugState(lua_State *L) { |
| 761 | color_ostream *out = Lua::GetOutput(L); |
| 762 | if (!out) |
| 763 | out = &Core::getInstance().getConsole(); |
| 764 | DEBUG(control,*out).print("preserve_rooms_getDebugState\n"); |
| 765 | |
| 766 | unordered_map<string, string> ret; |
| 767 | ret.emplace("bedroom", serialize_zone_assignments(last_known_assignments_bedroom)); |
| 768 | ret.emplace("office", serialize_zone_assignments(last_known_assignments_office)); |
| 769 | ret.emplace("dining", serialize_zone_assignments(last_known_assignments_dining)); |
| 770 | ret.emplace("tomb", serialize_zone_assignments(last_known_assignments_tomb)); |
| 771 | ret.emplace("pending", serialize_associations(pending_reassignment)); |
| 772 | ret.emplace("reserved", serialize_associations(reserved_zones)); |
| 773 | ret.emplace("noble", serialize_noble_map(noble_zones)); |
| 774 | Lua::Push(L, ret); |
| 775 | |
| 776 | return 1; |
| 777 | } |
| 778 | |
| 779 | DFHACK_PLUGIN_LUA_FUNCTIONS{ |
| 780 | DFHACK_LUA_FUNCTION(preserve_rooms_cycle), |
nothing calls this directly
no test coverage detected