/////////////////////////////////////////////////////////////////////
| 2598 | |
| 2599 | ////////////////////////////////////////////////////////////////////////// |
| 2600 | void CScriptSystem::DumpStateToFile(const char* filename) |
| 2601 | { |
| 2602 | CHECK_STACK(L); |
| 2603 | SRecursiveLuaDumpToFile sink(filename); |
| 2604 | if (sink.file) |
| 2605 | { |
| 2606 | std::set<void*> tables; |
| 2607 | RecursiveTableDump(this, L, LUA_GLOBALSINDEX, 0, &sink, tables); |
| 2608 | |
| 2609 | #ifdef DEBUG_LUA_STATE |
| 2610 | { |
| 2611 | CHECK_STACK(L); |
| 2612 | for (std::set<CScriptTable*>::iterator it = gAllScriptTables.begin(); it != gAllScriptTables.end(); ++it) |
| 2613 | { |
| 2614 | CScriptTable* pTable = *it; |
| 2615 | |
| 2616 | ScriptHandle handle; |
| 2617 | if (pTable->GetValue("id", handle) && gEnv->pEntitySystem) |
| 2618 | { |
| 2619 | EntityId id = handle.n; |
| 2620 | IEntity* pEntity = gEnv->pEntitySystem->GetEntity(id); |
| 2621 | char str[256]; |
| 2622 | cry_sprintf(str, "*Entity: %s", pEntity->GetEntityTextDescription()); |
| 2623 | sink.OnBeginTable(0, str, 0); |
| 2624 | } |
| 2625 | else |
| 2626 | sink.OnBeginTable(0, "*Unknown Table", 0); |
| 2627 | |
| 2628 | pTable->PushRef(); |
| 2629 | RecursiveTableDump(this, L, lua_gettop(L), 1, &sink, tables); |
| 2630 | lua_pop(L, 1); |
| 2631 | sink.OnEndTable(0); |
| 2632 | } |
| 2633 | } |
| 2634 | #endif |
| 2635 | } |
| 2636 | } |
| 2637 | |
| 2638 | ////////////////////////////////////////////////////////////////////////// |
| 2639 | void CScriptSystem::SerializeTimers(ISerialize* pSer) |
no test coverage detected