scm_c_define_module ("dungeon-master", init_dungeon_master_module, NULL);
}
+void add_to_load_path (std::string path)
+{
+ // Add path to %load-path variable, needed for modules created in mods
+ std::string exp = "(add-to-load-path \"" + path + "\")";
+ scm_c_eval_string (exp.c_str ());
+}
+
void load_dmaster_mods ()
{
scm_init_guile ();
for (const std::string &path : paths)
{
mods_path = path + PATH_DELIM + "mods";
+ add_to_load_path (mods_path);
mods_dir = opendir (mods_path.c_str ());
if (mods_dir != NULL)
{