Some more error checking for class names and tangible IDs
This commit is contained in:
@@ -58,11 +58,17 @@ eng::string World::tangible_ids_debug_string() const {
|
||||
}
|
||||
|
||||
eng::string World::tangibles_near_debug_string(int64_t actor, int64_t distance) {
|
||||
assert(stack_is_clear());
|
||||
lua_State *L = state();
|
||||
LuaVar tangibles, database, mt;
|
||||
LuaExtStack LS(L, tangibles, database);
|
||||
LS.rawget(tangibles, LuaRegistry, "tangibles");
|
||||
eng::ostringstream result;
|
||||
util::IdVector tans;
|
||||
get_near(actor, distance, true, false, true, &tans);
|
||||
for (int64_t id : tans) {
|
||||
const Tangible *tan = tangible_get(id);
|
||||
LS.rawget(database, tangibles, id);
|
||||
AnimState state = tan->anim_queue_.get_final_everything();
|
||||
result << id << ": " << state.debug_string() << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user