summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/world.cpp5
-rw-r--r--src/world.hpp3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/world.cpp b/src/world.cpp
index bdc74218..c0a6cc39 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -262,6 +262,11 @@ void world::finish_scripts()
obj->destroy_script_post();
}
+struct world::script_status world::script_status() const
+{
+ return { _script_initialized, _script_finalized };
+}
+
shared_ptr_wrapper<critter> world::ensure_player_character(object_id& id)
{
return ensure_player_character(id, make_player_proto());
diff --git a/src/world.hpp b/src/world.hpp
index 2a3a26f1..fe434e17 100644
--- a/src/world.hpp
+++ b/src/world.hpp
@@ -103,8 +103,11 @@ public:
shared_ptr_wrapper<critter> ensure_player_character(object_id& id);
static critter_proto make_player_proto();
+ struct script_status { bool initialized, finalized; };
void init_scripts();
void finish_scripts();
+ struct script_status script_status() const;
+
bool is_teardown() const;
object_id object_counter() const { return _object_counter; }
[[nodiscard]] object_id make_id() { return ++_object_counter; }