Skip to content

Commit ac2a05c

Browse files
committed
fix developer being removed on LAN
1 parent fe0a66d commit ac2a05c

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

Intersect.Client.Core/Core/ClientContext.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ internal sealed partial class ClientContext : ApplicationContext<ClientContext,
2424
{
2525
internal static bool IsSinglePlayer { get; set; }
2626

27-
private bool _forceDeveloper;
28-
2927
private IPlatformRunner? mPlatformRunner;
30-
private bool _isDeveloper;
3128

3229
internal ClientContext(
3330
Assembly entryAssembly,
@@ -44,7 +41,7 @@ IPacketHelper packetHelper
4441
try
4542
{
4643
var address = Dns.GetHostAddresses(hostNameOrAddress).FirstOrDefault();
47-
_forceDeveloper = !(address?.IsPublic() ?? true);
44+
IsDeveloper = !(address?.IsPublic() ?? true);
4845
}
4946
catch (SocketException socketException)
5047
{
@@ -59,7 +56,7 @@ IPacketHelper packetHelper
5956
"Failed to resolve host '{HostNameOrAddress}'",
6057
hostNameOrAddress
6158
);
62-
_forceDeveloper = true;
59+
IsDeveloper = true;
6360
}
6461

6562
_ = FactoryRegistry<IPluginContext>.RegisterFactory(new ClientPluginContext.Factory());
@@ -72,7 +69,6 @@ private void PermissionSetOnPermissionSetUpdated(PermissionSet permissionSet)
7269
return;
7370
}
7471

75-
IsDeveloper = permissionSet.IsGranted(Permission.EngineVersion);
7672
PermissionsChanged?.Invoke(permissionSet);
7773
}
7874

@@ -83,11 +79,7 @@ private void PermissionSetOnActivePermissionSetChanged(string activePermissionSe
8379

8480
public event PermissionSetChangedHandler? PermissionsChanged;
8581

86-
public bool IsDeveloper
87-
{
88-
get => _isDeveloper || _forceDeveloper;
89-
private set => _isDeveloper = value;
90-
}
82+
public bool IsDeveloper { get; private set; }
9183

9284
protected override bool UsesMainThread => true;
9385

Intersect.Client.Core/Interface/Shared/VersionPanel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public VersionPanel(Base parent, string name = nameof(VersionPanel)) : base(pare
3636

3737
private void ApplicationContextOnPermissionsChanged(PermissionSet permissionSet)
3838
{
39-
_engineVersionLabel.IsVisibleInParent = permissionSet.IsGranted(Permission.EngineVersion);
39+
_engineVersionLabel.IsVisibleInParent = permissionSet.IsGranted(Permission.EngineVersion) || ApplicationContext.CurrentContext.IsDeveloper;
4040
}
4141

4242
protected override void Layout(Framework.Gwen.Skin.Base skin)

0 commit comments

Comments
 (0)