Skip to content

Commit 7cbded8

Browse files
committed
Update to playtest-20241116 engine.
1 parent d49b897 commit 7cbded8

35 files changed

+475
-1326
lines changed

.github/workflows/packaging.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-22.04
1515
steps:
1616
- name: Clone Repository
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818

1919
- name: Install .NET 6.0
20-
uses: actions/setup-dotnet@v3
20+
uses: actions/setup-dotnet@v4
2121
with:
2222
dotnet-version: '6.0.x'
2323

@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
make engine
3030
mkdir -p build/linux
31-
sudo apt install libfuse2
31+
sudo apt-get install -y desktop-file-utils
3232
./packaging/linux/buildpackage.sh "${GIT_TAG}" "${PWD}/build/linux"
3333
3434
- name: Upload Packages
@@ -42,13 +42,13 @@ jobs:
4242

4343
macos:
4444
name: macOS Disk Image
45-
runs-on: macos-11
45+
runs-on: macos-13
4646
steps:
4747
- name: Clone Repository
48-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
4949

5050
- name: Install .NET 6.0
51-
uses: actions/setup-dotnet@v3
51+
uses: actions/setup-dotnet@v4
5252
with:
5353
dotnet-version: '6.0.x'
5454

@@ -81,10 +81,10 @@ jobs:
8181
runs-on: ubuntu-22.04
8282
steps:
8383
- name: Clone Repository
84-
uses: actions/checkout@v3
84+
uses: actions/checkout@v4
8585

8686
- name: Install .NET 6.0
87-
uses: actions/setup-dotnet@v3
87+
uses: actions/setup-dotnet@v4
8888
with:
8989
dotnet-version: '6.0.x'
9090

@@ -107,4 +107,4 @@ jobs:
107107
tag: ${{ github.ref }}
108108
overwrite: true
109109
file_glob: true
110-
file: build/windows/*
110+
file: build/windows/*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#region Copyright & License Information
2+
/*
3+
* Copyright (c) The OpenRA Developers and Contributors
4+
* This file is part of OpenRA, which is free software. It is made
5+
* available to you under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation, either version 3 of
7+
* the License, or (at your option) any later version. For more
8+
* information, see COPYING.
9+
*/
10+
#endregion
11+
12+
using System.Collections.Generic;
13+
using System.IO;
14+
using System.Linq;
15+
using OpenRA.Mods.Common;
16+
using OpenRA.Mods.Common.FileSystem;
17+
using OpenRA.Mods.Common.Installer;
18+
19+
namespace OpenRA.Mods.Mobius.FileSystem
20+
{
21+
public class RemasterFileSystemLoader : IFileSystemLoader, IFileSystemExternalContent
22+
{
23+
[FieldLoader.Require]
24+
public readonly string RemasterDataMount = null;
25+
public readonly string InstallPromptMod = "remaster-content";
26+
public readonly Dictionary<string, string> Packages = null;
27+
public readonly Dictionary<string, string> RemasterPackages = null;
28+
29+
[FieldLoader.LoadUsing(nameof(LoadSources))]
30+
readonly Dictionary<string, ModContent.ModSource> sources = null;
31+
32+
static object LoadSources(MiniYaml yaml)
33+
{
34+
var ret = new Dictionary<string, ModContent.ModSource>();
35+
var sourcesNode = yaml.Nodes.Single(n => n.Key == "Sources");
36+
foreach (var s in sourcesNode.Value.Nodes)
37+
ret.Add(s.Key, new ModContent.ModSource(s.Value));
38+
39+
return ret;
40+
}
41+
42+
bool contentAvailable = true;
43+
44+
public void Mount(OpenRA.FileSystem.FileSystem fileSystem, ObjectCreator objectCreator)
45+
{
46+
if (Packages != null)
47+
foreach (var kv in Packages)
48+
fileSystem.Mount(kv.Key, kv.Value);
49+
50+
if (RemasterPackages == null)
51+
return;
52+
53+
foreach (var kv in sources)
54+
{
55+
var sourceResolver = objectCreator.CreateObject<ISourceResolver>($"{kv.Value.Type.Value}SourceResolver");
56+
var path = sourceResolver.FindSourcePath(kv.Value);
57+
if (path != null)
58+
{
59+
var dataPath = Path.Combine(path, "Data");
60+
if (!Directory.Exists(dataPath))
61+
{
62+
contentAvailable = false;
63+
continue;
64+
}
65+
66+
fileSystem.Mount(dataPath, RemasterDataMount);
67+
foreach (var p in RemasterPackages)
68+
{
69+
var package = fileSystem.OpenPackage(p.Key);
70+
if (package == null)
71+
{
72+
contentAvailable = false;
73+
continue;
74+
}
75+
76+
fileSystem.Mount(package, p.Value);
77+
}
78+
}
79+
}
80+
}
81+
82+
bool IFileSystemExternalContent.InstallContentIfRequired(ModData modData)
83+
{
84+
if (!contentAvailable)
85+
Game.InitializeMod(InstallPromptMod, new Arguments());
86+
87+
return !contentAvailable;
88+
}
89+
}
90+
}

OpenRA.Mods.Mobius/RemasterContentPromptLogic.cs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ public class RemasterContentPromptLogic : ChromeLogic
1818
[ObjectCreator.UseCtor]
1919
public RemasterContentPromptLogic(Widget widget, ModData modData)
2020
{
21-
widget.Get<LabelWidget>("VERSION_LABEL").Text = modData.Manifest.Metadata.Version;
2221
widget.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
2322
}
2423
}

OpenRA.Mods.Mobius/RemasterInstallPromptLoadScreen.cs

-24
This file was deleted.

OpenRA.Mods.Mobius/RemasterLoadScreen.cs

-27
This file was deleted.

OpenRA.Mods.Mobius/RemasterPackages.cs

-74
This file was deleted.

0 commit comments

Comments
 (0)