Inline variables.
This commit is contained in:
committed by
Gustas
parent
51bbfc39b0
commit
55ff0ac1f4
@@ -150,7 +150,8 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Log.Write("debug", "Failed to load rules for `{0}` with error: {1}", Title, e.Message);
|
Log.Write("debug", $"Failed to load rules for `{Title}` with error:");
|
||||||
|
Log.Write("debug", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldActorInfo = modData.DefaultRules.Actors[SystemActors.World];
|
WorldActorInfo = modData.DefaultRules.Actors[SystemActors.World];
|
||||||
@@ -463,7 +464,8 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Log.Write("debug", "Failed parsing mapserver minimap response: {0}", e);
|
Log.Write("debug", "Failed parsing mapserver minimap response:");
|
||||||
|
Log.Write("debug", e);
|
||||||
newData.Preview = null;
|
newData.Preview = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -477,7 +479,8 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Log.Write("debug", "Failed parsing mapserver response: {0}", e);
|
Log.Write("debug", "Failed parsing mapserver response:");
|
||||||
|
Log.Write("debug", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit updated data before running the callbacks
|
// Commit updated data before running the callbacks
|
||||||
@@ -544,7 +547,7 @@ namespace OpenRA
|
|||||||
await response.ReadAsStreamWithProgress(fileStream, OnDownloadProgress, CancellationToken.None);
|
await response.ReadAsStreamWithProgress(fileStream, OnDownloadProgress, CancellationToken.None);
|
||||||
|
|
||||||
mapInstallPackage.Update(mapFilename, fileStream.ToArray());
|
mapInstallPackage.Update(mapFilename, fileStream.ToArray());
|
||||||
Log.Write("debug", "Downloaded map to '{0}'", mapFilename);
|
Log.Write("debug", $"Downloaded map to '{mapFilename}'");
|
||||||
|
|
||||||
var package = mapInstallPackage.OpenPackage(mapFilename, modData.ModFiles);
|
var package = mapInstallPackage.OpenPackage(mapFilename, modData.ModFiles);
|
||||||
if (package == null)
|
if (package == null)
|
||||||
@@ -557,7 +560,8 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Log.Write("debug", "Map installation failed with error: {0}", e);
|
Log.Write("debug", "Map installation failed with error:");
|
||||||
|
Log.Write("debug", e);
|
||||||
innerData.Status = MapStatus.DownloadError;
|
innerData.Status = MapStatus.DownloadError;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ namespace OpenRA.Mods.Common.Scripting
|
|||||||
[Desc("Returns true if this is a shellmap and the player has paused animations.")]
|
[Desc("Returns true if this is a shellmap and the player has paused animations.")]
|
||||||
public bool IsPausedShellmap => Context.World.Type == WorldType.Shellmap && gameSettings.PauseShellmap;
|
public bool IsPausedShellmap => Context.World.Type == WorldType.Shellmap && gameSettings.PauseShellmap;
|
||||||
|
|
||||||
[Desc("Returns the value of a `ScriptLobbyDropdown` selected in the game lobby.")]
|
[Desc("Returns the value of a `" + nameof(ScriptLobbyDropdown) + "` selected in the game lobby.")]
|
||||||
public LuaValue LobbyOption(string id)
|
public LuaValue LobbyOption(string id)
|
||||||
{
|
{
|
||||||
var option = Context.World.WorldActor.TraitsImplementing<ScriptLobbyDropdown>()
|
var option = Context.World.WorldActor.TraitsImplementing<ScriptLobbyDropdown>()
|
||||||
@@ -110,7 +110,7 @@ namespace OpenRA.Mods.Common.Scripting
|
|||||||
|
|
||||||
if (option == null)
|
if (option == null)
|
||||||
{
|
{
|
||||||
Log.Write("lua", "A ScriptLobbyDropdown with ID `" + id + "` was not found.");
|
Log.Write("lua", $"A {nameof(ScriptLobbyDropdown)} with ID `{id}` was not found.");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user