Remove broken Server.ExternalPort setting.
This commit is contained in:
@@ -135,7 +135,7 @@ namespace OpenRA.Server
|
|||||||
randomSeed = (int)DateTime.Now.ToBinary();
|
randomSeed = (int)DateTime.Now.ToBinary();
|
||||||
|
|
||||||
if (UPnP.Status == UPnPStatus.Enabled)
|
if (UPnP.Status == UPnPStatus.Enabled)
|
||||||
UPnP.ForwardPort(Settings.ListenPort, Settings.ExternalPort).Wait();
|
UPnP.ForwardPort(Settings.ListenPort, Settings.ListenPort).Wait();
|
||||||
|
|
||||||
foreach (var trait in modData.Manifest.ServerTraits)
|
foreach (var trait in modData.Manifest.ServerTraits)
|
||||||
serverTraits.Add(modData.ObjectCreator.CreateObject<ServerTrait>(trait));
|
serverTraits.Add(modData.ObjectCreator.CreateObject<ServerTrait>(trait));
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ using System.Collections.Generic;
|
|||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Linq.Expressions;
|
|
||||||
using OpenRA.Graphics;
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
@@ -42,9 +41,6 @@ namespace OpenRA
|
|||||||
[Desc("Sets the internal port.")]
|
[Desc("Sets the internal port.")]
|
||||||
public int ListenPort = 1234;
|
public int ListenPort = 1234;
|
||||||
|
|
||||||
[Desc("Sets the port advertised to the master server.")]
|
|
||||||
public int ExternalPort = 1234;
|
|
||||||
|
|
||||||
[Desc("Reports the game to the master server list.")]
|
[Desc("Reports the game to the master server list.")]
|
||||||
public bool AdvertiseOnline = true;
|
public bool AdvertiseOnline = true;
|
||||||
|
|
||||||
|
|||||||
@@ -97,10 +97,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
advertiseOnline = Game.Settings.Server.AdvertiseOnline;
|
advertiseOnline = Game.Settings.Server.AdvertiseOnline;
|
||||||
|
|
||||||
var externalPort = panel.Get<TextFieldWidget>("EXTERNAL_PORT");
|
|
||||||
externalPort.Text = settings.Server.ExternalPort.ToString();
|
|
||||||
externalPort.IsDisabled = () => !advertiseOnline;
|
|
||||||
|
|
||||||
var advertiseCheckbox = panel.Get<CheckboxWidget>("ADVERTISE_CHECKBOX");
|
var advertiseCheckbox = panel.Get<CheckboxWidget>("ADVERTISE_CHECKBOX");
|
||||||
advertiseCheckbox.IsChecked = () => advertiseOnline;
|
advertiseCheckbox.IsChecked = () => advertiseOnline;
|
||||||
advertiseCheckbox.OnClick = () =>
|
advertiseCheckbox.OnClick = () =>
|
||||||
@@ -182,20 +178,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
void CreateAndJoin()
|
void CreateAndJoin()
|
||||||
{
|
{
|
||||||
var name = Settings.SanitizedServerName(panel.Get<TextFieldWidget>("SERVER_NAME").Text);
|
var name = Settings.SanitizedServerName(panel.Get<TextFieldWidget>("SERVER_NAME").Text);
|
||||||
int listenPort, externalPort;
|
int listenPort;
|
||||||
if (!Exts.TryParseIntegerInvariant(panel.Get<TextFieldWidget>("LISTEN_PORT").Text, out listenPort))
|
if (!Exts.TryParseIntegerInvariant(panel.Get<TextFieldWidget>("LISTEN_PORT").Text, out listenPort))
|
||||||
listenPort = 1234;
|
listenPort = 1234;
|
||||||
|
|
||||||
if (!Exts.TryParseIntegerInvariant(panel.Get<TextFieldWidget>("EXTERNAL_PORT").Text, out externalPort))
|
|
||||||
externalPort = 1234;
|
|
||||||
|
|
||||||
var passwordField = panel.GetOrNull<PasswordFieldWidget>("PASSWORD");
|
var passwordField = panel.GetOrNull<PasswordFieldWidget>("PASSWORD");
|
||||||
var password = passwordField != null ? passwordField.Text : "";
|
var password = passwordField != null ? passwordField.Text : "";
|
||||||
|
|
||||||
// Save new settings
|
// Save new settings
|
||||||
Game.Settings.Server.Name = name;
|
Game.Settings.Server.Name = name;
|
||||||
Game.Settings.Server.ListenPort = listenPort;
|
Game.Settings.Server.ListenPort = listenPort;
|
||||||
Game.Settings.Server.ExternalPort = externalPort;
|
|
||||||
Game.Settings.Server.AdvertiseOnline = advertiseOnline;
|
Game.Settings.Server.AdvertiseOnline = advertiseOnline;
|
||||||
Game.Settings.Server.Map = preview.Uid;
|
Game.Settings.Server.Map = preview.Uid;
|
||||||
Game.Settings.Server.Password = password;
|
Game.Settings.Server.Password = password;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Container@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
X: (WINDOW_RIGHT - WIDTH) / 2
|
X: (WINDOW_RIGHT - WIDTH) / 2
|
||||||
Y: (WINDOW_BOTTOM - HEIGHT - 15) / 2
|
Y: (WINDOW_BOTTOM - HEIGHT - 15) / 2
|
||||||
Width: 530
|
Width: 530
|
||||||
Height: 314
|
Height: 275
|
||||||
Children:
|
Children:
|
||||||
Label@TITLE:
|
Label@TITLE:
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
@@ -63,47 +63,33 @@ Container@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
MaxLength: 5
|
MaxLength: 5
|
||||||
Text: 1234
|
Text: 1234
|
||||||
Checkbox@ADVERTISE_CHECKBOX:
|
Checkbox@ADVERTISE_CHECKBOX:
|
||||||
X: 15
|
X: 180
|
||||||
Y: 121
|
Y: 87
|
||||||
Width: 150
|
Width: 150
|
||||||
Height: 20
|
Height: 20
|
||||||
Font: Regular
|
Font: Regular
|
||||||
Text: Advertise Online
|
Text: Advertise Online
|
||||||
Label@EXTERNAL_PORT_LABEL:
|
|
||||||
X: 180
|
|
||||||
Y: 119
|
|
||||||
Width: 90
|
|
||||||
Height: 25
|
|
||||||
Align: Right
|
|
||||||
Text: External Port:
|
|
||||||
TextField@EXTERNAL_PORT:
|
|
||||||
X: 275
|
|
||||||
Y: 120
|
|
||||||
Width: 50
|
|
||||||
MaxLength: 5
|
|
||||||
Height: 25
|
|
||||||
Text: 1234
|
|
||||||
Label@NOTICES_HEADER_A:
|
Label@NOTICES_HEADER_A:
|
||||||
X: 15
|
X: 15
|
||||||
Y: 165
|
Y: 125
|
||||||
Height: 25
|
Height: 25
|
||||||
Align: Left
|
Align: Left
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Label@NOTICES_HEADER_B:
|
Label@NOTICES_HEADER_B:
|
||||||
X: 15
|
X: 15
|
||||||
Y: 165
|
Y: 125
|
||||||
Height: 25
|
Height: 25
|
||||||
Align: Left
|
Align: Left
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Label@NOTICES_HEADER_C:
|
Label@NOTICES_HEADER_C:
|
||||||
X: 15
|
X: 15
|
||||||
Y: 165
|
Y: 125
|
||||||
Height: 25
|
Height: 25
|
||||||
Align: Left
|
Align: Left
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Container@NOTICES_LAN:
|
Container@NOTICES_LAN:
|
||||||
X: 20
|
X: 20
|
||||||
Y: 185
|
Y: 145
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
Height: PARENT_BOTTOM
|
Height: PARENT_BOTTOM
|
||||||
Children:
|
Children:
|
||||||
@@ -137,7 +123,7 @@ Container@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
Text: manually configure port forwarding on your router.
|
Text: manually configure port forwarding on your router.
|
||||||
Container@NOTICES_NO_UPNP:
|
Container@NOTICES_NO_UPNP:
|
||||||
X: 20
|
X: 20
|
||||||
Y: 185
|
Y: 145
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
Height: PARENT_BOTTOM
|
Height: PARENT_BOTTOM
|
||||||
Children:
|
Children:
|
||||||
@@ -168,7 +154,7 @@ Container@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
Height: 25
|
Height: 25
|
||||||
Font: Tiny
|
Font: Tiny
|
||||||
Align: Left
|
Align: Left
|
||||||
Text: connections from the External Port to your local IP and Port.
|
Text: connections to your local IP and Port.
|
||||||
Label@SETTINGS_A:
|
Label@SETTINGS_A:
|
||||||
Y: 48
|
Y: 48
|
||||||
Width: 305
|
Width: 305
|
||||||
@@ -186,7 +172,7 @@ Container@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
Text: Advanced tab of the OpenRA settings menu.
|
Text: Advanced tab of the OpenRA settings menu.
|
||||||
Container@NOTICES_UPNP:
|
Container@NOTICES_UPNP:
|
||||||
X: 20
|
X: 20
|
||||||
Y: 185
|
Y: 145
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
Height: PARENT_BOTTOM
|
Height: PARENT_BOTTOM
|
||||||
Children:
|
Children:
|
||||||
@@ -253,18 +239,18 @@ Container@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
Height: 25
|
Height: 25
|
||||||
Font: Tiny
|
Font: Tiny
|
||||||
Align: Center
|
Align: Center
|
||||||
Button@MAP_BUTTON:
|
|
||||||
X: PARENT_RIGHT - 189
|
|
||||||
Y: PARENT_BOTTOM - 40
|
|
||||||
Width: 174
|
|
||||||
Height: 25
|
|
||||||
Text: Change Map
|
|
||||||
Button@BACK_BUTTON:
|
Button@BACK_BUTTON:
|
||||||
Key: return
|
Key: return
|
||||||
Y: PARENT_BOTTOM - 36
|
Y: PARENT_BOTTOM - 36
|
||||||
Width: 140
|
Width: 140
|
||||||
Height: 35
|
Height: 35
|
||||||
Text: Back
|
Text: Back
|
||||||
|
Button@MAP_BUTTON:
|
||||||
|
X: PARENT_RIGHT - WIDTH - 150
|
||||||
|
Y: PARENT_BOTTOM - 36
|
||||||
|
Width: 140
|
||||||
|
Height: 35
|
||||||
|
Text: Change Map
|
||||||
Button@CREATE_BUTTON:
|
Button@CREATE_BUTTON:
|
||||||
Key: return
|
Key: return
|
||||||
X: PARENT_RIGHT - WIDTH
|
X: PARENT_RIGHT - WIDTH
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Background@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
X: (WINDOW_RIGHT - WIDTH)/2
|
X: (WINDOW_RIGHT - WIDTH)/2
|
||||||
Y: (WINDOW_BOTTOM - HEIGHT)/2
|
Y: (WINDOW_BOTTOM - HEIGHT)/2
|
||||||
Width: 530
|
Width: 530
|
||||||
Height: 345
|
Height: 315
|
||||||
Children:
|
Children:
|
||||||
Label@TITLE:
|
Label@TITLE:
|
||||||
Y: 15
|
Y: 15
|
||||||
@@ -58,47 +58,33 @@ Background@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
MaxLength: 5
|
MaxLength: 5
|
||||||
Text: 1234
|
Text: 1234
|
||||||
Checkbox@ADVERTISE_CHECKBOX:
|
Checkbox@ADVERTISE_CHECKBOX:
|
||||||
X: 20
|
X: 180
|
||||||
Y: 151
|
Y: 117
|
||||||
Width: 150
|
Width: 150
|
||||||
Height: 20
|
Height: 20
|
||||||
Font: Regular
|
Font: Regular
|
||||||
Text: Advertise Online
|
Text: Advertise Online
|
||||||
Label@EXTERNAL_PORT_LABEL:
|
|
||||||
X: 180
|
|
||||||
Y: 149
|
|
||||||
Width: 90
|
|
||||||
Height: 25
|
|
||||||
Align: Right
|
|
||||||
Text: External Port:
|
|
||||||
TextField@EXTERNAL_PORT:
|
|
||||||
X: 275
|
|
||||||
Y: 150
|
|
||||||
Width: 50
|
|
||||||
MaxLength: 5
|
|
||||||
Height: 25
|
|
||||||
Text: 1234
|
|
||||||
Label@NOTICES_HEADER_A:
|
Label@NOTICES_HEADER_A:
|
||||||
X: 20
|
X: 20
|
||||||
Y: 185
|
Y: 155
|
||||||
Height: 25
|
Height: 25
|
||||||
Align: Left
|
Align: Left
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Label@NOTICES_HEADER_B:
|
Label@NOTICES_HEADER_B:
|
||||||
X: 20
|
X: 20
|
||||||
Y: 185
|
Y: 155
|
||||||
Height: 25
|
Height: 25
|
||||||
Align: Left
|
Align: Left
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Label@NOTICES_HEADER_C:
|
Label@NOTICES_HEADER_C:
|
||||||
X: 20
|
X: 20
|
||||||
Y: 185
|
Y: 155
|
||||||
Height: 25
|
Height: 25
|
||||||
Align: Left
|
Align: Left
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Container@NOTICES_LAN:
|
Container@NOTICES_LAN:
|
||||||
X: 25
|
X: 25
|
||||||
Y: 205
|
Y: 175
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
Height: PARENT_BOTTOM
|
Height: PARENT_BOTTOM
|
||||||
Children:
|
Children:
|
||||||
@@ -132,7 +118,7 @@ Background@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
Text: manually configure port forwarding on your router.
|
Text: manually configure port forwarding on your router.
|
||||||
Container@NOTICES_NO_UPNP:
|
Container@NOTICES_NO_UPNP:
|
||||||
X: 25
|
X: 25
|
||||||
Y: 205
|
Y: 175
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
Height: PARENT_BOTTOM
|
Height: PARENT_BOTTOM
|
||||||
Children:
|
Children:
|
||||||
@@ -163,7 +149,7 @@ Background@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
Height: 25
|
Height: 25
|
||||||
Font: Tiny
|
Font: Tiny
|
||||||
Align: Left
|
Align: Left
|
||||||
Text: connections from the External Port to your local IP and Port.
|
Text: connections to your local IP and Port.
|
||||||
Label@SETTINGS_A:
|
Label@SETTINGS_A:
|
||||||
Y: 48
|
Y: 48
|
||||||
Width: 305
|
Width: 305
|
||||||
@@ -181,7 +167,7 @@ Background@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
Text: Advanced tab of the OpenRA settings menu.
|
Text: Advanced tab of the OpenRA settings menu.
|
||||||
Container@NOTICES_UPNP:
|
Container@NOTICES_UPNP:
|
||||||
X: 25
|
X: 25
|
||||||
Y: 205
|
Y: 175
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
Height: PARENT_BOTTOM
|
Height: PARENT_BOTTOM
|
||||||
Children:
|
Children:
|
||||||
@@ -249,25 +235,25 @@ Background@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
Font: Tiny
|
Font: Tiny
|
||||||
Align: Center
|
Align: Center
|
||||||
Button@MAP_BUTTON:
|
Button@MAP_BUTTON:
|
||||||
X: PARENT_RIGHT - 194
|
X: 20
|
||||||
Y: 268
|
Y: PARENT_BOTTOM - 45
|
||||||
Width: 174
|
Width: 120
|
||||||
Height: 25
|
Height: 25
|
||||||
Text: Change Map
|
Text: Change Map
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Button@BACK_BUTTON:
|
Button@BACK_BUTTON:
|
||||||
X: PARENT_RIGHT - 194
|
X: PARENT_RIGHT - WIDTH - 20
|
||||||
Y: PARENT_BOTTOM - 45
|
Y: PARENT_BOTTOM - 45
|
||||||
Width: 174
|
Width: 120
|
||||||
Height: 25
|
Height: 25
|
||||||
Text: Back
|
Text: Back
|
||||||
Font: Bold
|
Font: Bold
|
||||||
Key: escape
|
Key: escape
|
||||||
Button@CREATE_BUTTON:
|
Button@CREATE_BUTTON:
|
||||||
Key: return
|
Key: return
|
||||||
X: 20
|
X: PARENT_RIGHT - 2*WIDTH - 30
|
||||||
Y: PARENT_BOTTOM - 45
|
Y: PARENT_BOTTOM - 45
|
||||||
Width: 174
|
Width: 120
|
||||||
Height: 25
|
Height: 25
|
||||||
Text: Create
|
Text: Create
|
||||||
Font: Bold
|
Font: Bold
|
||||||
|
|||||||
Reference in New Issue
Block a user