You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/src/server/dump.server.ts
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ const HELPER_INFO = {
51
51
version: "0.1.0",
52
52
title: "PyOps dump helper",
53
53
author: "PyOps",
54
-
factorio_version: "2.0",
54
+
factorio_version: "2.1",
55
55
description:
56
56
"Enables pypostprocessing's planner (YAFC) integration during data dumps so TURD sub-techs and planner-friendly prototypes land in data-raw-dump.json. Enable ONLY while dumping - do not play with this mod active.",
57
57
dependencies: ["? pypostprocessing"],
@@ -64,6 +64,18 @@ const HELPER_DATA_LUA = `-- pypostprocessing's data-final-fixes checks this mark
64
64
data.data_crawler = "yafc pyops"
65
65
`;
66
66
67
+
constHELPER_DATA_UPDATES_LUA=`-- yafc.lua resets these globals before requiring their prototype modules again.
68
+
-- Factorio 2.1 keeps the modules cached, so the second require otherwise leaves
69
+
-- the reset tables empty and the planner integration crashes while iterating them.
70
+
for name in pairs(package.loaded) do
71
+
if string.find(name, "/scripts/digosaurus/digosaurus-prototypes", 1, true)
72
+
or string.find(name, "/scripts/biofluid/biofluid-prototypes", 1, true)
73
+
or string.find(name, "/prototypes/turd", 1, true) then
74
+
package.loaded[name] = nil
75
+
end
76
+
end
77
+
`;
78
+
67
79
constHELPER_FINAL_FIXES_LUA=`-- pypostprocessing's yafc.lua was written for YAFC's lenient Lua crawler; the
68
80
-- real engine validates prototypes. Patch up anything it left incomplete.
69
81
-- This mod is dump-only: never play with it enabled.
@@ -226,6 +238,7 @@ export async function writeHelperMod() {
0 commit comments