From fa62ffe63d2ea5fde6765586567c75ef534d0390 Mon Sep 17 00:00:00 2001 From: ike709 Date: Sun, 6 Oct 2024 12:47:34 -0500 Subject: [PATCH 1/2] Mark `world.internet_address` as implemented --- DMCompiler/DMStandard/Types/World.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DMCompiler/DMStandard/Types/World.dm b/DMCompiler/DMStandard/Types/World.dm index 7d29fb9782..471272751c 100644 --- a/DMCompiler/DMStandard/Types/World.dm +++ b/DMCompiler/DMStandard/Types/World.dm @@ -33,7 +33,7 @@ var/address var/port = 0 as opendream_compiletimereadonly - var/internet_address = "127.0.0.1" as opendream_unimplemented + var/internet_address var/url as opendream_unimplemented var/visibility = 0 as opendream_unimplemented var/status as opendream_unimplemented From e516b2f588932e5b2f32fc1f6a8c5f9917a6932e Mon Sep 17 00:00:00 2001 From: ike709 Date: Sun, 6 Oct 2024 13:04:23 -0500 Subject: [PATCH 2/2] implement it for realsies --- OpenDreamRuntime/Objects/Types/DreamObjectWorld.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenDreamRuntime/Objects/Types/DreamObjectWorld.cs b/OpenDreamRuntime/Objects/Types/DreamObjectWorld.cs index 701e77a646..5110a0519b 100644 --- a/OpenDreamRuntime/Objects/Types/DreamObjectWorld.cs +++ b/OpenDreamRuntime/Objects/Types/DreamObjectWorld.cs @@ -17,7 +17,7 @@ public sealed class DreamObjectWorld : DreamObject { [Dependency] private readonly IBaseServer _server = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; - [Dependency] private readonly INetManager _netManager = default!; + [Dependency] private readonly NetManager _netManager = default!; [Dependency] private readonly IConfigurationManager _cfg = default!; private readonly ISawmill _sawmill = Logger.GetSawmill("opendream.world"); @@ -58,7 +58,7 @@ private bool DisplayIPv6 { } /// Tries to return the address of the server, as it appears over the internet. May return null. - private IPAddress? InternetAddress => null; //TODO: Implement this! + private IPAddress? InternetAddress => _netManager.ServerChannel?.RemoteEndPoint.Address ?? null; public DreamObjectWorld(DreamObjectDefinition objectDefinition) : base(objectDefinition) {