Skip to content

Commit 797d52e

Browse files
committed
Replacing AdditionalPreprocessorSymbols with DebugReload
1 parent 207b28c commit 797d52e

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

Common/Configs/Config.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public class Config : ModConfig
3333
[DefaultValue(true)]
3434
public bool SaveWorld;
3535

36-
public List<string> AdditionalPreprocessorSymbols;
36+
[DefaultValue(false)]
37+
public bool DebugReload;
3738

3839
[Header("ExtraInfo")]
3940

Core/Features/Publicizer/CompileSystem.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ public override void Load()
135135
}
136136
}
137137

138-
// Adding any additional preprocessor symbols from the config
139-
if (Conf.C.AdditionalPreprocessorSymbols != null)
138+
if (Conf.C.DebugReload)
140139
{
141-
preprocessorSymbols = [.. preprocessorSymbols, .. Conf.C.AdditionalPreprocessorSymbols];
140+
preprocessorSymbols.Append("DEBUG");
142141
}
143142

144143
// Normal RoslynCompiler method with suppressed assembly version warnings

Localization/en-US_Mods.ModReloader.hjson

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ Configs: {
126126
Label: Additional Preprocessor Symbols
127127
Tooltip: ""
128128
}
129+
130+
DebugReload: {
131+
Tooltip: ""
132+
Label: Debug Reload
133+
}
129134
}
130135

131136
WorldSize: {

Localization/zh-Hans_Mods.ModReloader.hjson

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ Configs: {
122122
// Label: Additional Preprocessor Symbols
123123
// Tooltip: ""
124124
}
125+
126+
DebugReload: {
127+
// Tooltip: ""
128+
// Label: Debug Reload
129+
}
125130
}
126131

127132
WorldSize: {

0 commit comments

Comments
 (0)