Some output now going through PrintBuffer
This commit is contained in:
@@ -182,6 +182,10 @@ public:
|
||||
//
|
||||
void invoke(const Invocation &inv);
|
||||
|
||||
// Get the PrintBuffer of the actor.
|
||||
//
|
||||
const PrintBuffer *get_printbuffer(int64_t actor_id);
|
||||
|
||||
// Update the source database from disk.
|
||||
//
|
||||
// Special case: if the source pointer is nullptr, does not update.
|
||||
@@ -225,11 +229,16 @@ public:
|
||||
// * lthread_actor_id: current actor
|
||||
// * lthread_place_id: current place
|
||||
// * lthread_use_ppool: true if we should use the player ID pool.
|
||||
// * lthread_prints_: a stringstream which will collect 'print' statements.
|
||||
//
|
||||
// As soon as the lua code stops executing, these variables are
|
||||
// cleared.
|
||||
//
|
||||
void set_lthread_state(int64_t actor_id, int64_t place_id, bool ppool);
|
||||
void clear_lthread_state();
|
||||
void open_lthread_state(int64_t actor_id, int64_t place_id, bool ppool, bool prints);
|
||||
void close_lthread_state();
|
||||
|
||||
std::ostream *lthread_print_stream() const;
|
||||
|
||||
// Allocate a single ID.
|
||||
//
|
||||
@@ -448,6 +457,7 @@ private:
|
||||
int64_t lthread_actor_id_;
|
||||
int64_t lthread_place_id_;
|
||||
int64_t lthread_use_ppool_;
|
||||
std::unique_ptr<std::ostringstream> lthread_prints_;
|
||||
|
||||
friend class Tangible;
|
||||
friend int lfn_tangible_animate(lua_State *L);
|
||||
|
||||
Reference in New Issue
Block a user