MCPcopy Create free account
hub / github.com/DFHack/dfhack / preserve_rooms_getDebugState

Function preserve_rooms_getDebugState

plugins/preserve-rooms.cpp:760–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

758}
759
760static 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
779DFHACK_PLUGIN_LUA_FUNCTIONS{
780 DFHACK_LUA_FUNCTION(preserve_rooms_cycle),

Callers

nothing calls this directly

Calls 5

serialize_associationsFunction · 0.85
serialize_noble_mapFunction · 0.85
PushFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected