Skip to content

Commit 4b33744

Browse files
committed
When a script indirectly requires itself, re-run it instead of returning nil.
This matches Factorio's behavior.
1 parent c0e4ce5 commit 4b33744

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

Yafc.Parser/LuaContext.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ private int Require(IntPtr lua) {
404404
GetReg(value);
405405
return 1;
406406
}
407-
required[argument] = LUA_REFNIL;
408407
logger.Information("Require {RequiredFile}", requiredFile.mod + "/" + requiredFile.path);
409408
byte[] bytes = FactorioDataSource.ReadModFile(requiredFile.mod, requiredFile.path);
410409
if (bytes != null) {

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Date:
1818
Bugfixes:
1919
- Fix a possible threading race while destroying textures, which could cause an illegal access crash.
2020
- Fix a loading error when mods use non-ASCII characters in their settings.
21+
- Fix errors when loading KuxOrbitalCannon and Deadlock SE bridge
2122
----------------------------------------------------------------------------------------------------------------------
2223
Version 0.7.3
2324
Date: July 21st 2024

0 commit comments

Comments
 (0)