diff --git a/Content.Tests/DMProject/Tests/Builtins/world_opendream_topic_port.dm b/Content.Tests/DMProject/Tests/Builtins/world_opendream_topic_port.dm new file mode 100644 index 0000000000..a815651f3f --- /dev/null +++ b/Content.Tests/DMProject/Tests/Builtins/world_opendream_topic_port.dm @@ -0,0 +1,3 @@ + +/proc/RunTest() + ASSERT(isnum(world.opendream_topic_port)) diff --git a/Content.Tests/DMProject/Tests/Builtins/world_system_type.dm b/Content.Tests/DMProject/Tests/Builtins/world_system_type.dm new file mode 100644 index 0000000000..ea9ce6b505 --- /dev/null +++ b/Content.Tests/DMProject/Tests/Builtins/world_system_type.dm @@ -0,0 +1,3 @@ + +/proc/RunTest() + ASSERT(istext(world.system_type) && length(world.system_type)) diff --git a/DMCompiler/DMStandard/Defines.dm b/DMCompiler/DMStandard/Defines.dm index fcd13bf77d..148660d34c 100644 --- a/DMCompiler/DMStandard/Defines.dm +++ b/DMCompiler/DMStandard/Defines.dm @@ -60,8 +60,8 @@ #define SYNC_STEPS 3 //world.system_type -#define UNIX 0 -#define MS_WINDOWS 1 +#define UNIX "UNIX" +#define MS_WINDOWS "MS_WINDOWS" //Icon blending functions #define ICON_ADD 0 diff --git a/OpenDreamRuntime/Objects/Types/DreamObjectWorld.cs b/OpenDreamRuntime/Objects/Types/DreamObjectWorld.cs index 2582437476..0dd50ac411 100644 --- a/OpenDreamRuntime/Objects/Types/DreamObjectWorld.cs +++ b/OpenDreamRuntime/Objects/Types/DreamObjectWorld.cs @@ -214,9 +214,9 @@ protected override bool TryGetVar(string varName, out DreamValue value) { case "system_type": //system_type value should match the defines in Defines.dm if (Environment.OSVersion.Platform is PlatformID.Unix or PlatformID.MacOSX or PlatformID.Other) - value = new DreamValue(0); + value = new DreamValue("UNIX"); else - value = new DreamValue(1); //Windows + value = new DreamValue("MS_WINDOWS"); //Windows return true;