diff --git a/Content.Tests/DMProject/Tests/Builtins/world_config.dm b/Content.Tests/DMProject/Tests/Builtins/world_config.dm index 6a2e77c639..2367bf53e3 100644 --- a/Content.Tests/DMProject/Tests/Builtins/world_config.dm +++ b/Content.Tests/DMProject/Tests/Builtins/world_config.dm @@ -17,4 +17,4 @@ world.SetConfig("env", env_var, env_value) world.SetConfig("env", env_var, 17) - ASSERT(world.GetConfig("env", env_var) == null) + ASSERT(world.GetConfig("env", env_var) == "") diff --git a/OpenDreamRuntime/Procs/Native/DreamProcNativeWorld.cs b/OpenDreamRuntime/Procs/Native/DreamProcNativeWorld.cs index fe91969015..9996fa558e 100644 --- a/OpenDreamRuntime/Procs/Native/DreamProcNativeWorld.cs +++ b/OpenDreamRuntime/Procs/Native/DreamProcNativeWorld.cs @@ -98,11 +98,13 @@ public static DreamValue NativeProc_GetConfig(NativeProc.Bundle bundle, DreamObj // DM ref says: "If no parameter is specified, a list of the names of all available parameters is returned." // but apparently it's actually just null for "env". return DreamValue.Null; - } else if (param.TryGetValueAsString(out var paramString) && Environment.GetEnvironmentVariable(paramString) is string strValue) { + } + + if (param.TryGetValueAsString(out var paramString) && Environment.GetEnvironmentVariable(paramString) is { } strValue) { return new DreamValue(strValue); - } else { - return DreamValue.Null; } + + return DreamValue.EmptyString; case "ban": case "keyban": case "ipban":