Add WorldRenderer parameter to WorldLoaded.
This commit is contained in:
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.RA
|
||||
World world;
|
||||
public bool Visible;
|
||||
|
||||
public void WorldLoaded(World w)
|
||||
public void WorldLoaded(World w, WorldRenderer wr)
|
||||
{
|
||||
this.world = w;
|
||||
this.refreshTick = 0;
|
||||
|
||||
@@ -14,6 +14,7 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.RA.Move;
|
||||
using OpenRA.Support;
|
||||
using OpenRA.Traits;
|
||||
@@ -27,7 +28,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
Dictionary<uint, MovementClassDomainIndex> domainIndexes;
|
||||
|
||||
public void WorldLoaded(World world)
|
||||
public void WorldLoaded(World world, WorldRenderer wr)
|
||||
{
|
||||
domainIndexes = new Dictionary<uint, MovementClassDomainIndex>();
|
||||
var movementClasses = new HashSet<uint>(
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
@@ -30,7 +31,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public PlayMusicOnMapLoad(PlayMusicOnMapLoadInfo info) { Info = info; }
|
||||
|
||||
public void WorldLoaded(World w) { PlayMusic(); }
|
||||
public void WorldLoaded(World w, WorldRenderer wr) { PlayMusic(); }
|
||||
|
||||
void PlayMusic()
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
@@ -34,7 +35,7 @@ namespace OpenRA.Mods.RA
|
||||
}
|
||||
}
|
||||
|
||||
public void WorldLoaded(OpenRA.World w)
|
||||
public void WorldLoaded(OpenRA.World w, WorldRenderer wr)
|
||||
{
|
||||
// NOTE(jsd): 32 seems a sane default initial capacity for the total # of harvesters in a game. Purely a guesstimate.
|
||||
claimByCell = new Dictionary<CPos, ResourceClaim>(32);
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.RA
|
||||
smudgeSprites = Info.Types.Select(x => Game.modData.SpriteLoader.LoadAllSprites(x)).ToArray();
|
||||
}
|
||||
|
||||
public void WorldLoaded(World w)
|
||||
public void WorldLoaded(World w, WorldRenderer wr)
|
||||
{
|
||||
world = w;
|
||||
tiles = new Dictionary<CPos, TileReference<byte, byte>>();
|
||||
|
||||
Reference in New Issue
Block a user