Remove runtime mod merging. Closes #3421.
This commit is contained in:
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Cnc
|
||||
Renderer r;
|
||||
NullInputHandler nih = new NullInputHandler();
|
||||
|
||||
public void Init(Dictionary<string, string> info)
|
||||
public void Init(Manifest m, Dictionary<string, string> info)
|
||||
{
|
||||
loadInfo = info;
|
||||
|
||||
@@ -63,6 +63,8 @@ namespace OpenRA.Mods.Cnc
|
||||
|
||||
brightBlock = new Sprite(s, new Rectangle(320, 0, 16, 35), TextureChannel.Alpha);
|
||||
dimBlock = new Sprite(s, new Rectangle(336, 0, 16, 35), TextureChannel.Alpha);
|
||||
|
||||
versionText = m.Mod.Version;
|
||||
}
|
||||
|
||||
bool setup;
|
||||
@@ -93,7 +95,6 @@ namespace OpenRA.Mods.Cnc
|
||||
loadingPos = new float2((bounds.Width - loadingFont.Measure(loadingText).X) / 2, barY);
|
||||
|
||||
versionFont = r.Fonts["Regular"];
|
||||
versionText = WidgetUtils.ActiveModVersion();
|
||||
var versionSize = versionFont.Measure(versionText);
|
||||
versionPos = new float2(bounds.Width - 107 - versionSize.X / 2, 115 - versionSize.Y / 2);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
var mpe = world.WorldActor.Trait<CncMenuPaletteEffect>();
|
||||
mpe.Fade(CncMenuPaletteEffect.EffectType.Desaturated);
|
||||
|
||||
menu.Get<LabelWidget>("VERSION_LABEL").GetText = WidgetUtils.ActiveModVersion;
|
||||
menu.Get<LabelWidget>("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version;
|
||||
|
||||
bool hideButtons = false;
|
||||
menu.Get("MENU_BUTTONS").IsVisible = () => !hideButtons;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
{
|
||||
try
|
||||
{
|
||||
var path = new string[] { Platform.SupportDir, "Content", WidgetUtils.ActiveModId() }.Aggregate(Path.Combine);
|
||||
var path = new string[] { Platform.SupportDir, "Content", Game.modData.Manifest.Mod.Id }.Aggregate(Path.Combine);
|
||||
FileSystem.Mount(Path.Combine(path, "scores.mix"));
|
||||
FileSystem.Mount(Path.Combine(path, "transit.mix"));
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
.Fade(CncMenuPaletteEffect.EffectType.Desaturated);
|
||||
|
||||
rootMenu = widget.Get("MENU_BACKGROUND");
|
||||
rootMenu.Get<LabelWidget>("VERSION_LABEL").GetText = WidgetUtils.ActiveModVersion;
|
||||
rootMenu.Get<LabelWidget>("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version;
|
||||
|
||||
// Menu buttons
|
||||
var mainMenu = widget.Get("MAIN_MENU");
|
||||
|
||||
Reference in New Issue
Block a user