File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -51,16 +51,7 @@ COLOR_DARKGRAY = COLOR_DARKGREY
5151
5252-- Events
5353
54- if dfhack .is_core_context then
55- SC_WORLD_LOADED = 0
56- SC_WORLD_UNLOADED = 1
57- SC_MAP_LOADED = 2
58- SC_MAP_UNLOADED = 3
59- SC_VIEWSCREEN_CHANGED = 4
60- SC_CORE_INITIALIZED = 5
61- SC_PAUSED = 7
62- SC_UNPAUSED = 8
63- end
54+
6455
6556-- User-changeable options
6657
@@ -494,8 +485,7 @@ function dfhack.run_command(...) end
494485
495486function dfhack .getSavePath () end
496487
497- if dfhack .is_core_context then
498-
488+
499489
500490-- Feed the table back to the require() mechanism.
501491return dfhack
Original file line number Diff line number Diff line change @@ -178,6 +178,9 @@ def parse_lua_files(files)
178178 # Remove `_ENV` as it is problematic.
179179 file . gsub! ( /^.*_ENV.*$/ , '' )
180180
181+ # Remove all if statements, conditional logic is hard (for now).
182+ file . gsub! ( /^if[\s \S ]+?(^end)/ , '' )
183+
181184 # Remove local functions entirely, they are not needed.
182185 file . gsub! ( /(?:local\s +function\s +)(.*\( [^)]*\) )[\s \S ]+?(?:^end)/ , '' )
183186
You can’t perform that action at this time.
0 commit comments