Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Builtins/world_config.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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) == "")
8 changes: 5 additions & 3 deletions OpenDreamRuntime/Procs/Native/DreamProcNativeWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@
// 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 string strValue) {
Comment thread Fixed
return new DreamValue(strValue);
} else {
return DreamValue.Null;
}

return DreamValue.EmptyString;
case "ban":
case "keyban":
case "ipban":
Expand Down
Loading