diff --git a/Makefile b/Makefile
index d9538aeafb..edae366d1e 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@
############################## TOOLCHAIN ###############################
#
-CSC = gmcs
+CSC = dmcs
CSFLAGS = -nologo -warn:4 -debug:full -optimize- -codepage:utf8 -unsafe -warnaserror
DEFINE = DEBUG;TRACE
COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll thirdparty/ICSharpCode.SharpZipLib.dll thirdparty/FuzzyLogicLibrary.dll thirdparty/Mono.Nat.dll
diff --git a/OpenRA.Editor/OpenRA.Editor.csproj b/OpenRA.Editor/OpenRA.Editor.csproj
index 2b4313d66a..bfc8defc90 100644
--- a/OpenRA.Editor/OpenRA.Editor.csproj
+++ b/OpenRA.Editor/OpenRA.Editor.csproj
@@ -10,7 +10,6 @@
Properties
OpenRA.Editor
OpenRA.Editor
- v3.5
512
OpenRA.Editor.Icon.ico
@@ -60,13 +59,13 @@
- 3.5
+ 4.0
- 3.5
+ 4.0
- 3.5
+ 4.0
diff --git a/OpenRA.FileFormats/Exts.cs b/OpenRA.FileFormats/Exts.cs
index 8cc5ec979e..d7d6b499d9 100755
--- a/OpenRA.FileFormats/Exts.cs
+++ b/OpenRA.FileFormats/Exts.cs
@@ -35,6 +35,8 @@ namespace OpenRA
fn(ee);
}
+ public static Lazy Lazy(Func p) { return new Lazy(p); }
+
public static IEnumerable GetNamespaces(this Assembly a)
{
return a.GetTypes().Select(t => t.Namespace).Distinct().Where(n => n != null);
diff --git a/OpenRA.FileFormats/OpenRA.FileFormats.csproj b/OpenRA.FileFormats/OpenRA.FileFormats.csproj
index ce1a3bbf70..a7c51d8e76 100644
--- a/OpenRA.FileFormats/OpenRA.FileFormats.csproj
+++ b/OpenRA.FileFormats/OpenRA.FileFormats.csproj
@@ -15,7 +15,6 @@
3.5
- v3.5
publish\
true
Disk
@@ -58,7 +57,7 @@
- 3.5
+ 4.0
@@ -114,7 +113,6 @@
-
diff --git a/OpenRA.FileFormats/Platform.cs b/OpenRA.FileFormats/Platform.cs
index 93ce4479bb..ba07eb512b 100644
--- a/OpenRA.FileFormats/Platform.cs
+++ b/OpenRA.FileFormats/Platform.cs
@@ -22,7 +22,7 @@ namespace OpenRA
{
public static PlatformType CurrentPlatform { get { return currentPlatform.Value; } }
- static Lazy currentPlatform = Lazy.New((Func)GetCurrentPlatform);
+ static Lazy currentPlatform = new Lazy(GetCurrentPlatform);
static PlatformType GetCurrentPlatform()
{
diff --git a/OpenRA.FileFormats/Primitives/Lazy.cs b/OpenRA.FileFormats/Primitives/Lazy.cs
deleted file mode 100644
index c21343ff84..0000000000
--- a/OpenRA.FileFormats/Primitives/Lazy.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-#region Copyright & License Information
-/*
- * Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
- * This file is part of OpenRA, which is free software. It is made
- * available to you under the terms of the GNU General Public License
- * as published by the Free Software Foundation. For more information,
- * see COPYING.
- */
-#endregion
-
-using System;
-
-namespace OpenRA.FileFormats
-{
- public class Lazy
- {
- Func p;
- T value;
-
- public Lazy(Func p)
- {
- if (p == null)
- throw new ArgumentNullException();
-
- this.p = p;
- }
-
- public T Value
- {
- get
- {
- if (p == null)
- return value;
-
- value = p();
- p = null;
- return value;
- }
- }
-
- public T Force() { return Value; }
- }
-
- public static class Lazy
- {
- public static Lazy New(Func p) { return new Lazy(p); }
- }
-}
diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs
index 5e3a65c928..0af70a2b15 100755
--- a/OpenRA.Game/Actor.cs
+++ b/OpenRA.Game/Actor.cs
@@ -62,7 +62,7 @@ namespace OpenRA
if (initDict.Contains())
Owner = init.Get();
- occupySpace = Lazy.New(() => TraitOrDefault());
+ occupySpace = Exts.Lazy(() => TraitOrDefault());
if (name != null)
{
@@ -74,14 +74,14 @@ namespace OpenRA
AddTrait(trait.Create(init));
}
- facing = Lazy.New(() => TraitOrDefault());
- health = Lazy.New(() => TraitOrDefault());
- effectiveOwner = Lazy.New(() => TraitOrDefault());
+ facing = Exts.Lazy(() => TraitOrDefault());
+ health = Exts.Lazy(() => TraitOrDefault());
+ effectiveOwner = Exts.Lazy(() => TraitOrDefault());
applyIRender = (x, wr) => x.Render(this, wr);
applyRenderModifier = (m, p, wr) => p.ModifyRender(this, wr, m);
- Bounds = Lazy.New(() =>
+ Bounds = Exts.Lazy(() =>
{
var si = Info.Traits.GetOrDefault();
var size = (si != null && si.Bounds != null) ? new int2(si.Bounds[0], si.Bounds[1]) :
diff --git a/OpenRA.Game/GameRules/SoundInfo.cs b/OpenRA.Game/GameRules/SoundInfo.cs
index dcfde842ab..d7e923ec1d 100644
--- a/OpenRA.Game/GameRules/SoundInfo.cs
+++ b/OpenRA.Game/GameRules/SoundInfo.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
@@ -34,8 +35,8 @@ namespace OpenRA.GameRules
: new Dictionary();
}
- public readonly OpenRA.FileFormats.Lazy> VoicePools;
- public readonly OpenRA.FileFormats.Lazy> NotificationsPools;
+ public readonly Lazy> VoicePools;
+ public readonly Lazy> NotificationsPools;
public SoundInfo( MiniYaml y )
{
@@ -45,8 +46,8 @@ namespace OpenRA.GameRules
Voices = Load(y, "Voices");
Notifications = Load(y, "Notifications");
- VoicePools = Lazy.New(() => Voices.ToDictionary( a => a.Key, a => new SoundPool(a.Value) ));
- NotificationsPools = Lazy.New(() => Notifications.ToDictionary( a => a.Key, a => new SoundPool(a.Value) ));
+ VoicePools = Exts.Lazy(() => Voices.ToDictionary(a => a.Key, a => new SoundPool(a.Value)));
+ NotificationsPools = Exts.Lazy(() => Notifications.ToDictionary( a => a.Key, a => new SoundPool(a.Value) ));
}
}
diff --git a/OpenRA.Game/Graphics/WorldRenderer.cs b/OpenRA.Game/Graphics/WorldRenderer.cs
index 22cbf4f597..d84b9a3841 100644
--- a/OpenRA.Game/Graphics/WorldRenderer.cs
+++ b/OpenRA.Game/Graphics/WorldRenderer.cs
@@ -56,7 +56,7 @@ namespace OpenRA.Graphics
Theater = new Theater(world.TileSet);
terrainRenderer = new TerrainRenderer(world, this);
- devTrait = Lazy.New(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait() : null);
+ devTrait = new Lazy(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait() : null);
}
PaletteReference CreatePaletteReference(string name)
diff --git a/OpenRA.Game/Map.cs b/OpenRA.Game/Map.cs
index bf1f26d78a..5ea4d855a5 100644
--- a/OpenRA.Game/Map.cs
+++ b/OpenRA.Game/Map.cs
@@ -123,10 +123,10 @@ namespace OpenRA
MapSize = new int2(1, 1),
Tileset = tileset.Id,
Options = new MapOptions(),
- MapResources = Lazy.New(() => new TileReference[1, 1]),
- MapTiles = Lazy.New(() => new TileReference[1, 1] { { tileRef } }),
- Actors = Lazy.New(() => new Dictionary()),
- Smudges = Lazy.New(() => new List())
+ MapResources = Exts.Lazy(() => new TileReference[1, 1]),
+ MapTiles = Exts.Lazy(() => new TileReference[1, 1] { { tileRef } }),
+ Actors = Exts.Lazy(() => new Dictionary()),
+ Smudges = Exts.Lazy(() => new List())
};
return map;
@@ -185,7 +185,7 @@ namespace OpenRA
Players.Add(player.Name, player);
}
- Actors = Lazy.New(() =>
+ Actors = Exts.Lazy(() =>
{
var ret = new Dictionary();
foreach (var kv in yaml.NodesDict["Actors"].NodesDict)
@@ -194,7 +194,7 @@ namespace OpenRA
});
// Smudges
- Smudges = Lazy.New(() =>
+ Smudges = Exts.Lazy(() =>
{
var ret = new List();
foreach (var kv in yaml.NodesDict["Smudges"].NodesDict)
@@ -217,8 +217,8 @@ namespace OpenRA
CustomTerrain = new string[MapSize.X, MapSize.Y];
- MapTiles = Lazy.New(() => LoadMapTiles());
- MapResources = Lazy.New(() => LoadResourceTiles());
+ MapTiles = Exts.Lazy(() => LoadMapTiles());
+ MapResources = Exts.Lazy(() => LoadResourceTiles());
// The Uid is calculated from the data on-disk, so
// format changes must be flushed to disk.
@@ -418,8 +418,8 @@ namespace OpenRA
var oldMapTiles = MapTiles.Value;
var oldMapResources = MapResources.Value;
- MapTiles = Lazy.New(() => Exts.ResizeArray(oldMapTiles, oldMapTiles[0, 0], width, height));
- MapResources = Lazy.New(() => Exts.ResizeArray(oldMapResources, oldMapResources[0, 0], width, height));
+ MapTiles = Exts.Lazy(() => Exts.ResizeArray(oldMapTiles, oldMapTiles[0, 0], width, height));
+ MapResources = Exts.Lazy(() => Exts.ResizeArray(oldMapResources, oldMapResources[0, 0], width, height));
MapSize = new int2(width, height);
}
diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj
index f3e8158449..f0f1f03a64 100644
--- a/OpenRA.Game/OpenRA.Game.csproj
+++ b/OpenRA.Game/OpenRA.Game.csproj
@@ -16,7 +16,6 @@
false
- v3.5
OpenRA.ico
publish\
true
diff --git a/OpenRA.Game/Widgets/ButtonWidget.cs b/OpenRA.Game/Widgets/ButtonWidget.cs
index 4e182d62f5..6c1820d461 100644
--- a/OpenRA.Game/Widgets/ButtonWidget.cs
+++ b/OpenRA.Game/Widgets/ButtonWidget.cs
@@ -63,7 +63,7 @@ namespace OpenRA.Widgets
OnKeyPress = _ => OnClick();
IsDisabled = () => Disabled;
IsHighlighted = () => Highlighted;
- tooltipContainer = Lazy.New(() =>
+ tooltipContainer = Exts.Lazy(() =>
Ui.Root.Get(TooltipContainer));
}
@@ -95,7 +95,7 @@ namespace OpenRA.Widgets
TooltipTemplate = other.TooltipTemplate;
TooltipText = other.TooltipText;
TooltipContainer = other.TooltipContainer;
- tooltipContainer = Lazy.New(() =>
+ tooltipContainer = Exts.Lazy(() =>
Ui.Root.Get(TooltipContainer));
}
diff --git a/OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs b/OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs
index 09d0a906bb..8531b6ab00 100644
--- a/OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs
+++ b/OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using System;
using OpenRA.FileFormats;
using OpenRA.Network;
@@ -23,7 +24,7 @@ namespace OpenRA.Widgets
public ClientTooltipRegionWidget()
{
- tooltipContainer = Lazy.New(() => Ui.Root.Get(TooltipContainer));
+ tooltipContainer = Exts.Lazy(() => Ui.Root.Get(TooltipContainer));
}
protected ClientTooltipRegionWidget(ClientTooltipRegionWidget other)
@@ -31,7 +32,7 @@ namespace OpenRA.Widgets
{
Template = other.Template;
TooltipContainer = other.TooltipContainer;
- tooltipContainer = Lazy.New(() => Ui.Root.Get(TooltipContainer));
+ tooltipContainer = Exts.Lazy(() => Ui.Root.Get(TooltipContainer));
orderManager = other.orderManager;
clientIndex = other.clientIndex;
}
diff --git a/OpenRA.Game/Widgets/MapPreviewWidget.cs b/OpenRA.Game/Widgets/MapPreviewWidget.cs
index dd4eb9e876..c1d6f69038 100644
--- a/OpenRA.Game/Widgets/MapPreviewWidget.cs
+++ b/OpenRA.Game/Widgets/MapPreviewWidget.cs
@@ -37,7 +37,7 @@ namespace OpenRA.Widgets
public MapPreviewWidget()
{
- tooltipContainer = Lazy.New(() => Ui.Root.Get(TooltipContainer));
+ tooltipContainer = Exts.Lazy(() => Ui.Root.Get(TooltipContainer));
}
protected MapPreviewWidget(MapPreviewWidget other)
@@ -48,7 +48,7 @@ namespace OpenRA.Widgets
ShowSpawnPoints = other.ShowSpawnPoints;
TooltipTemplate = other.TooltipTemplate;
TooltipContainer = other.TooltipContainer;
- tooltipContainer = Lazy.New(() => Ui.Root.Get(TooltipContainer));
+ tooltipContainer = Exts.Lazy(() => Ui.Root.Get(TooltipContainer));
}
public override Widget Clone() { return new MapPreviewWidget(this); }
diff --git a/OpenRA.Game/Widgets/ViewportControllerWidget.cs b/OpenRA.Game/Widgets/ViewportControllerWidget.cs
index 06b63e7da0..bb1eec757c 100644
--- a/OpenRA.Game/Widgets/ViewportControllerWidget.cs
+++ b/OpenRA.Game/Widgets/ViewportControllerWidget.cs
@@ -64,7 +64,7 @@ namespace OpenRA.Widgets
{
this.world = world;
this.worldRenderer = worldRenderer;
- tooltipContainer = Lazy.New(() =>
+ tooltipContainer = Exts.Lazy(() =>
Ui.Root.Get(TooltipContainer));
}
diff --git a/OpenRA.Irc/OpenRA.Irc.csproj b/OpenRA.Irc/OpenRA.Irc.csproj
index afdc1fca9c..1db8cd5f44 100644
--- a/OpenRA.Irc/OpenRA.Irc.csproj
+++ b/OpenRA.Irc/OpenRA.Irc.csproj
@@ -9,10 +9,11 @@
Properties
OpenRA.Irc
OpenRA.Irc
- v3.5
512
+ 12.0.0
+ 2.0
true
@@ -47,11 +48,11 @@
- {bdaeab25-991e-46a7-af1e-4f0e03358daa}
+ {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}
OpenRA.FileFormats
- {0dfb103f-2962-400f-8c6d-e2c28ccba633}
+ {0DFB103F-2962-400F-8C6D-E2C28CCBA633}
OpenRA.Game
diff --git a/OpenRA.Lint/OpenRA.Lint.csproj b/OpenRA.Lint/OpenRA.Lint.csproj
index cff0dbe68b..b02f098c63 100644
--- a/OpenRA.Lint/OpenRA.Lint.csproj
+++ b/OpenRA.Lint/OpenRA.Lint.csproj
@@ -10,7 +10,6 @@
Properties
OpenRA
OpenRA.Lint
- v3.5
512
@@ -57,14 +56,14 @@
- 3.5
+ 4.0
- 3.5
+ 4.0
- 3.5
+ 4.0
diff --git a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj
index ff0533880f..eabb73cd5d 100644
--- a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj
+++ b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj
@@ -10,7 +10,6 @@
Properties
OpenRA.Mods.Cnc
OpenRA.Mods.Cnc
- v3.5
512
@@ -59,13 +58,13 @@
- 3.5
+ 4.0
- 3.5
+ 4.0
- 3.5
+ 4.0
diff --git a/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs b/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs
index 8d2c4cb97e..9ce8c24f35 100644
--- a/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs
+++ b/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using System;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Mods.RA;
@@ -32,7 +33,7 @@ namespace OpenRA.Mods.Cnc.Widgets
{
this.world = world;
- tabsWidget = Lazy.New(() =>
+ tabsWidget = Exts.Lazy(() =>
Ui.Root.Get(info.ProductionTabsWidget));
}
diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs
old mode 100755
new mode 100644
index 3e299090c8..ab594a290f
--- a/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs
+++ b/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
@@ -65,7 +66,7 @@ namespace OpenRA.Mods.Cnc.Widgets
{
this.World = world;
this.worldRenderer = worldRenderer;
- tooltipContainer = Lazy.New(() =>
+ tooltipContainer = Exts.Lazy(() =>
Ui.Root.Get(TooltipContainer));
cantBuild = new Animation("clock");
diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs
index d5ea98871d..b927360740 100644
--- a/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs
+++ b/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs
@@ -86,7 +86,7 @@ namespace OpenRA.Mods.Cnc.Widgets
// Only visible if the production palette has icons to display
IsVisible = () => queueGroup != null && Groups[queueGroup].Tabs.Count > 0;
- paletteWidget = Lazy.New(() => Ui.Root.Get(PaletteWidget));
+ paletteWidget = Exts.Lazy(() => Ui.Root.Get(PaletteWidget));
}
public bool SelectNextTab(bool reverse)
diff --git a/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs b/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs
old mode 100755
new mode 100644
index 8bfcaf7ccc..e5551c989c
--- a/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs
+++ b/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
@@ -48,7 +49,7 @@ namespace OpenRA.Mods.Cnc.Widgets
{
this.worldRenderer = worldRenderer;
spm = world.LocalPlayer.PlayerActor.Trait();
- tooltipContainer = Lazy.New(() =>
+ tooltipContainer = Exts.Lazy(() =>
Ui.Root.Get(TooltipContainer));
icon = new Animation("icon");
diff --git a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
index 4a22d8c937..c590c9343b 100644
--- a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
+++ b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
@@ -10,7 +10,6 @@
Properties
OpenRA.Mods.D2k
OpenRA.Mods.D2k
- v3.5
512
@@ -63,13 +62,13 @@
- 3.5
+ 4.0
- 3.5
+ 4.0
- 3.5
+ 4.0
diff --git a/OpenRA.Mods.RA/Armament.cs b/OpenRA.Mods.RA/Armament.cs
index 9d669e4a26..c60f1ce4d1 100644
--- a/OpenRA.Mods.RA/Armament.cs
+++ b/OpenRA.Mods.RA/Armament.cs
@@ -58,6 +58,7 @@ namespace OpenRA.Mods.RA
public readonly ArmamentInfo Info;
public readonly WeaponInfo Weapon;
public readonly Barrel[] Barrels;
+
public readonly Actor self;
Lazy Turret;
Lazy Coords;
@@ -74,9 +75,9 @@ namespace OpenRA.Mods.RA
Info = info;
// We can't resolve these until runtime
- Turret = Lazy.New(() => self.TraitsImplementing().FirstOrDefault(t => t.Name == info.Turret));
- Coords = Lazy.New(() => self.Trait());
- limitedAmmo = Lazy.New(() => self.TraitOrDefault());
+ Turret = Exts.Lazy(() => self.TraitsImplementing().FirstOrDefault(t => t.Name == info.Turret));
+ Coords = Exts.Lazy(() => self.Trait());
+ limitedAmmo = Exts.Lazy(() => self.TraitOrDefault());
Weapon = Rules.Weapons[info.Weapon.ToLowerInvariant()];
Burst = Weapon.Burst;
diff --git a/OpenRA.Mods.RA/Attack/AttackBase.cs b/OpenRA.Mods.RA/Attack/AttackBase.cs
index 4c8661058d..7f12530398 100644
--- a/OpenRA.Mods.RA/Attack/AttackBase.cs
+++ b/OpenRA.Mods.RA/Attack/AttackBase.cs
@@ -45,13 +45,13 @@ namespace OpenRA.Mods.RA
this.self = self;
this.info = info;
- var armaments = Lazy.New(() => self.TraitsImplementing()
+ var armaments = Exts.Lazy(() => self.TraitsImplementing()
.Where(a => info.Armaments.Contains(a.Info.Name)));
GetArmaments = () => armaments.Value;
- facing = Lazy.New(() => self.TraitOrDefault());
- building = Lazy.New(() => self.TraitOrDefault());
+ facing = Exts.Lazy(() => self.TraitOrDefault());
+ building = Exts.Lazy(() => self.TraitOrDefault());
}
protected virtual bool CanAttack(Actor self, Target target)
diff --git a/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs b/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs
index 254e5391a6..66fab04cb1 100644
--- a/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs
+++ b/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs
@@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA
: base(self, info)
{
this.info = info;
- coords = Lazy.New(() => self.Trait());
+ coords = Exts.Lazy(() => self.Trait());
armaments = new List();
muzzles = new List();
paxFacing = new Dictionary();
diff --git a/OpenRA.Mods.RA/CombatDebugOverlay.cs b/OpenRA.Mods.RA/CombatDebugOverlay.cs
index b8bb74d926..3b6c930805 100644
--- a/OpenRA.Mods.RA/CombatDebugOverlay.cs
+++ b/OpenRA.Mods.RA/CombatDebugOverlay.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using System;
using System.Collections.Generic;
using System.Drawing;
using OpenRA.FileFormats;
@@ -30,9 +31,9 @@ namespace OpenRA.Mods.RA
public CombatDebugOverlay(Actor self)
{
- attack = Lazy.New(() => self.TraitOrDefault());
- coords = Lazy.New(() => self.Trait());
- health = Lazy.New(() => self.TraitOrDefault());
+ attack = Exts.Lazy(() => self.TraitOrDefault());
+ coords = Exts.Lazy(() => self.Trait());
+ health = Exts.Lazy(() => self.TraitOrDefault());
var localPlayer = self.World.LocalPlayer;
devMode = localPlayer != null ? localPlayer.PlayerActor.Trait() : null;
diff --git a/OpenRA.Mods.RA/Effects/GpsDot.cs b/OpenRA.Mods.RA/Effects/GpsDot.cs
index edbe4fc485..0a81ba268a 100644
--- a/OpenRA.Mods.RA/Effects/GpsDot.cs
+++ b/OpenRA.Mods.RA/Effects/GpsDot.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using System;
using System.Collections.Generic;
using OpenRA.Effects;
using OpenRA.FileFormats;
@@ -51,10 +52,10 @@ namespace OpenRA.Mods.RA.Effects
self.World.AddFrameEndTask(w => w.Add(this));
- huf = Lazy.New(() => self.TraitOrDefault());
- fuf = Lazy.New(() => self.TraitOrDefault());
- disguise = Lazy.New(() => self.TraitOrDefault());
- cloak = Lazy.New(() => self.TraitOrDefault());
+ huf = Exts.Lazy(() => self.TraitOrDefault());
+ fuf = Exts.Lazy(() => self.TraitOrDefault());
+ disguise = Exts.Lazy(() => self.TraitOrDefault());
+ cloak = Exts.Lazy(() => self.TraitOrDefault());
watcher = new Cache(p => p.PlayerActor.Trait());
frozen = new Cache(p => p.PlayerActor.Trait());
diff --git a/OpenRA.Mods.RA/Modifiers/FrozenUnderFog.cs b/OpenRA.Mods.RA/Modifiers/FrozenUnderFog.cs
index 5c9ba0410b..3b149dd423 100644
--- a/OpenRA.Mods.RA/Modifiers/FrozenUnderFog.cs
+++ b/OpenRA.Mods.RA/Modifiers/FrozenUnderFog.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
@@ -41,9 +42,9 @@ namespace OpenRA.Mods.RA
// Spawned actors (e.g. building husks) shouldn't be revealed
startsRevealed = info.StartsRevealed && !init.Contains();
footprint = FootprintUtils.Tiles(init.self);
- tooltip = Lazy.New(() => init.self.TraitsImplementing().FirstOrDefault());
- tooltip = Lazy.New(() => init.self.TraitsImplementing().FirstOrDefault());
- health = Lazy.New(() => init.self.TraitOrDefault());
+ tooltip = Exts.Lazy(() => init.self.TraitsImplementing().FirstOrDefault());
+ tooltip = Exts.Lazy(() => init.self.TraitsImplementing().FirstOrDefault());
+ health = Exts.Lazy(() => init.self.TraitOrDefault());
frozen = new Dictionary();
visible = init.world.Players.ToDictionary(p => p, p => false);
diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
index 91ed4ab7b0..663be2fdd8 100644
--- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
+++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
@@ -10,7 +10,6 @@
Properties
OpenRA.Mods.RA
OpenRA.Mods.RA
- v3.5
512
diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs
old mode 100755
new mode 100644
index 7369dfc21e..ad3fe1c4aa
--- a/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs
+++ b/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
@@ -34,7 +35,7 @@ namespace OpenRA.Mods.RA
{
self = init.self;
DevMode = init.self.Trait();
- RadarPings = Lazy.New(() => init.world.WorldActor.TraitOrDefault());
+ RadarPings = Exts.Lazy(() => init.world.WorldActor.TraitOrDefault());
init.world.ActorAdded += ActorAdded;
init.world.ActorRemoved += ActorRemoved;
diff --git a/OpenRA.Mods.RA/Widgets/ResourceBarWidget.cs b/OpenRA.Mods.RA/Widgets/ResourceBarWidget.cs
old mode 100755
new mode 100644
index 84ec4f1693..2c9704c7a7
--- a/OpenRA.Mods.RA/Widgets/ResourceBarWidget.cs
+++ b/OpenRA.Mods.RA/Widgets/ResourceBarWidget.cs
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.RA.Widgets
[ObjectCreator.UseCtor]
public ResourceBarWidget(World world)
{
- tooltipContainer = Lazy.New(() =>
+ tooltipContainer = Exts.Lazy(() =>
Ui.Root.Get(TooltipContainer));
}
diff --git a/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj b/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj
index 86528ddc37..0b96fc4947 100644
--- a/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj
+++ b/OpenRA.Mods.TS/OpenRA.Mods.TS.csproj
@@ -9,7 +9,6 @@
Library
OpenRA.Mods.TS
OpenRA.Mods.TS
- v3.5
true
@@ -64,8 +63,8 @@
-->
- mkdir "$(SolutionDir)mods/ts/"
-copy "$(TargetPath)" "$(SolutionDir)mods/ts/"
+ mkdir "$(SolutionDir)mods/ts/"
+copy "$(TargetPath)" "$(SolutionDir)mods/ts/"
cd "$(SolutionDir)"
\ No newline at end of file
diff --git a/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj b/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj
index fd95732782..83873fd597 100644
--- a/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj
+++ b/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj
@@ -10,7 +10,6 @@
Properties
OpenRA.Renderer.Cg
OpenRA.Renderer.Cg
- v3.5
512
diff --git a/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj b/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj
index 5c2079d64c..7c70a811ee 100644
--- a/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj
+++ b/OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj
@@ -9,7 +9,6 @@
Library
OpenRA.Renderer.Glsl
OpenRA.Renderer.Gl
- v3.5
3.5
diff --git a/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj b/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj
index 7383d4c86e..484ae28e5b 100644
--- a/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj
+++ b/OpenRA.Renderer.Null/OpenRA.Renderer.Null.csproj
@@ -10,7 +10,6 @@
Properties
OpenRA.Renderer.Null
OpenRA.Renderer.Null
- v3.5
512
diff --git a/OpenRA.Renderer.Sdl2/OpenRA.Renderer.Sdl2.csproj b/OpenRA.Renderer.Sdl2/OpenRA.Renderer.Sdl2.csproj
index 4a36941eed..7c5036b38e 100644
--- a/OpenRA.Renderer.Sdl2/OpenRA.Renderer.Sdl2.csproj
+++ b/OpenRA.Renderer.Sdl2/OpenRA.Renderer.Sdl2.csproj
@@ -9,7 +9,6 @@
Library
OpenRA.Renderer.Sdl2
OpenRA.Renderer.Sdl2
- v3.5
True
diff --git a/OpenRA.Renderer.SdlCommon/OpenRA.Renderer.SdlCommon.csproj b/OpenRA.Renderer.SdlCommon/OpenRA.Renderer.SdlCommon.csproj
index 659ddfe69a..2f6e4fa41b 100644
--- a/OpenRA.Renderer.SdlCommon/OpenRA.Renderer.SdlCommon.csproj
+++ b/OpenRA.Renderer.SdlCommon/OpenRA.Renderer.SdlCommon.csproj
@@ -9,7 +9,6 @@
Library
OpenRA.Renderer.SdlCommon
OpenRA.Renderer.SdlCommon
- v3.5
3.5
@@ -50,6 +49,7 @@
4
false
AllRules.ruleset
+ true
diff --git a/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj b/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj
index 8315d2841b..49a647393e 100644
--- a/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj
+++ b/OpenRA.TilesetBuilder/OpenRA.TilesetBuilder.csproj
@@ -10,7 +10,6 @@
Properties
OpenRA.TilesetBuilder
OpenRA.TilesetBuilder
- v3.5
512
tilesetbuilder_icon copy.ico
@@ -60,13 +59,13 @@
- 3.5
+ 4.0
- 3.5
+ 4.0
- 3.5
+ 4.0
diff --git a/OpenRA.Utility/LegacyMapImporter.cs b/OpenRA.Utility/LegacyMapImporter.cs
index aa0c0edf73..dbf4962d06 100644
--- a/OpenRA.Utility/LegacyMapImporter.cs
+++ b/OpenRA.Utility/LegacyMapImporter.cs
@@ -141,10 +141,10 @@ namespace OpenRA.Utility
map.Bounds = Rectangle.FromLTRB(offsetX, offsetY, offsetX + width, offsetY + height);
map.Selectable = true;
- map.Smudges = Lazy.New(() => new List());
- map.Actors = Lazy.New(() => new Dictionary());
- map.MapResources = Lazy.New(() => new TileReference[mapSize, mapSize]);
- map.MapTiles = Lazy.New(() => new TileReference[mapSize, mapSize]);
+ map.Smudges = Exts.Lazy(() => new List());
+ map.Actors = Exts.Lazy(() => new Dictionary());
+ map.MapResources = Exts.Lazy(() => new TileReference[mapSize, mapSize]);
+ map.MapTiles = Exts.Lazy(() => new TileReference[mapSize, mapSize]);
map.Options = new MapOptions();
diff --git a/OpenRA.Utility/OpenRA.Utility.csproj b/OpenRA.Utility/OpenRA.Utility.csproj
index 3fa93c808b..2b88792ff5 100644
--- a/OpenRA.Utility/OpenRA.Utility.csproj
+++ b/OpenRA.Utility/OpenRA.Utility.csproj
@@ -10,7 +10,6 @@
Properties
OpenRA.Utility
OpenRA.Utility
- v3.5
512
@@ -56,15 +55,15 @@
- 3.5
+ 4.0
- 3.5
+ 4.0
- 3.5
+ 4.0
diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi
index 225b556ddf..d944541afb 100644
--- a/packaging/windows/OpenRA.nsi
+++ b/packaging/windows/OpenRA.nsi
@@ -138,18 +138,18 @@ Section "-DotNet" DotNet
IfErrors error 0
IntCmp $0 1 0 error 0
ClearErrors
- ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" "SP"
+ ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0" "SP"
IfErrors error 0
IntCmp $0 1 done error done
- error:
- MessageBox MB_YESNO ".NET Framework v3.5 SP1 or later is required to run OpenRA. $\n \
+ error:
+ MessageBox MB_YESNO ".NET Framework v4.0 or later is required to run OpenRA. $\n \
Do you wish for the installer to launch your web browser in order to download and install it?" \
IDYES download IDNO error2
download:
- ExecShell "open" "http://www.microsoft.com/downloads/en/details.aspx?familyid=ab99342f-5d1a-413d-8319-81da479ab0d7"
+ ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=17113"
Goto done
error2:
- MessageBox MB_OK "Installation will continue but be aware that OpenRA will not run unless .NET v3.5 SP1 \
+ MessageBox MB_OK "Installation will continue, but be aware that OpenRA will not run unless .NET v4.0 \
or later is installed."
done:
SectionEnd