Skip to content

fix: package path should contain autorun - #1863

Merged
praydog merged 1 commit into
praydog:masterfrom
lingsamuel:fix-pkgpath
Oct 10, 2026
Merged

praydog merged 1 commit into
praydog:masterfrom
lingsamuel:fix-pkgpath

Conversation

@lingsamuel

Copy link
Copy Markdown
Contributor

["package"]["path"] contains autorun before the first script was executed.
But in run_script, it is using registry()["package_path"]:

    m_lua["package"]["path"] = m_lua.registry()["package_path"];

So the global package path doesn't contain autorun anymore, which makes dynamic require doesn't work.

Signed-off-by: LingSamuel <lingsamuelgrace@gmail.com>
@praydog
praydog merged commit d7d59ad into praydog:master Oct 10, 2026
onehoon added a commit to onehoon/REFramework that referenced this pull request Oct 11, 2026
* SDK/API: Fix get_ref_count being unsigned (< 0 are local-thread MO)

(cherry picked from commit 94a1218)

* C-Sharp API related fixes (praydog#1860)

* Fixed SynchronousUnload not calling PluginExitPoint

Previously the only time PluginExitPoint was called was when all the plugins were being unloaded (pressing the "Unload Scripts" button).
This meant that if a plugin was unloaded on its own (via SynchronousUnload), PluginExitPoint would not be called, which could lead to issues if the plugin was relying on that function to clean up resources.

* Fixed function signature of exported cimgui functions

cimgui was exporting suffixed igGetForegroundDrawList_Nil and igGetBackgroundDrawList_Nil functions,
however when attempting to call said functions from C# plugins they wouldn't be found (leading to game crash) due to the correct signature being
without the suffixes. To address this I added aliases igGetForegroundDrawList and igGetBackgroundDrawList that
call the same underlying c++ functions.

* Fix signed ref-count detection for local MOs

The engine uses negative ref counts to identify thread-local managed objects,
but the ABI exposes the value as unsigned. Cast it to int32_t before
comparison so local objects bypass the shared wrapper cache and pool,
preventing incorrect cross-thread reuse of thread-local objects.

(cherry picked from commit b47842c)

* fix: package path should contain autorun (praydog#1863)

Signed-off-by: LingSamuel <lingsamuelgrace@gmail.com>
(cherry picked from commit d7d59ad)

* Preserve the previous session log across restarts (praydog#1846)

re2_framework_log.txt was opened with truncate=true, so the previous
session's log was destroyed as soon as the framework was loaded. After a
crash this made it impossible to inspect the log of the session that
crashed: restarting the game, which is the first thing anyone does, had
already overwritten it.

Rename the existing log to re2_framework_log.prev.txt before creating the
logger, so the previous session survives a restart. All filesystem calls
use the std::error_code overloads, so a failure (e.g. a locked file)
quietly falls back to the old behaviour instead of blocking startup. At
most one previous session is kept: an existing .prev.txt is removed before
the rename.

(cherry picked from commit c36e8c4)

* .NET: Add console window display option

(cherry picked from commit d052e8f)

---------

Signed-off-by: LingSamuel <lingsamuelgrace@gmail.com>
Co-authored-by: praydog <praydog@praydog.com>
Co-authored-by: Gino <60258854+ZGako@users.noreply.github.com>
Co-authored-by: Sarasa Kisaragi <lingsamuelgrace@gmail.com>
Co-authored-by: wdre9 <15378433390@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants