Rename modchooser to modcontent.

This commit is contained in:
Paul Chote
2017-04-13 21:15:43 +00:00
parent ff088323b5
commit 84db123b93
19 changed files with 22 additions and 37 deletions

View File

@@ -313,12 +313,11 @@ dependencies: $(os-dependencies)
all-dependencies: cli-dependencies windows-dependencies osx-dependencies all-dependencies: cli-dependencies windows-dependencies osx-dependencies
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modchooser/mod.yaml mods/all/mod.yaml version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modcontent/mod.yaml mods/all/mod.yaml
@for i in $? ; do \ @for i in $? ; do \
awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \ awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \
awk '{sub("\tmodchooser:.*$$","\tmodchooser: $(VERSION)"); print $0}' $${i}.tmp > $${i}.tmp2 && \ awk '{sub("/[^/]*: User$$", "/$(VERSION): User"); print $0}' $${i}.tmp > $${i} && \
awk '{sub("/[^/]*: User$$", "/$(VERSION): User"); print $0}' $${i}.tmp2 > $${i} && \ rm $${i}.tmp; \
rm $${i}.tmp $${i}.tmp2; \
done done
docs: utility mods version docs: utility mods version
@@ -344,7 +343,7 @@ install-core: default
@$(CP_R) mods/ra "$(DATA_INSTALL_DIR)/mods/" @$(CP_R) mods/ra "$(DATA_INSTALL_DIR)/mods/"
@$(CP_R) mods/d2k "$(DATA_INSTALL_DIR)/mods/" @$(CP_R) mods/d2k "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_PROGRAM) $(mod_d2k_TARGET) "$(DATA_INSTALL_DIR)/mods/d2k" @$(INSTALL_PROGRAM) $(mod_d2k_TARGET) "$(DATA_INSTALL_DIR)/mods/d2k"
@$(CP_R) mods/modchooser "$(DATA_INSTALL_DIR)/mods/" @$(CP_R) mods/modcontent "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_DATA) "global mix database.dat" "$(DATA_INSTALL_DIR)/global mix database.dat" @$(INSTALL_DATA) "global mix database.dat" "$(DATA_INSTALL_DIR)/global mix database.dat"
@$(INSTALL_DATA) "GeoLite2-Country.mmdb.gz" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb.gz" @$(INSTALL_DATA) "GeoLite2-Country.mmdb.gz" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb.gz"

View File

@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.LoadScreens
var content = selectedMod.Get<ModContent>(Game.ModData.ObjectCreator); var content = selectedMod.Get<ModContent>(Game.ModData.ObjectCreator);
Ui.LoadWidget("MODCHOOSER_BACKGROUND", Ui.Root, new WidgetArgs()); Ui.LoadWidget("MODCONTENT_BACKGROUND", Ui.Root, new WidgetArgs());
if (!IsModInstalled(content)) if (!IsModInstalled(content))
{ {

View File

@@ -85,7 +85,7 @@ namespace OpenRA
public readonly string InstallPromptMessage; public readonly string InstallPromptMessage;
public readonly string QuickDownload; public readonly string QuickDownload;
public readonly string HeaderMessage; public readonly string HeaderMessage;
public readonly string ContentInstallerMod = "modchooser"; public readonly string ContentInstallerMod = "modcontent";
[FieldLoader.LoadUsing("LoadPackages")] [FieldLoader.LoadUsing("LoadPackages")]
public readonly Dictionary<string, ModPackage> Packages = new Dictionary<string, ModPackage>(); public readonly Dictionary<string, ModPackage> Packages = new Dictionary<string, ModPackage>();

View File

@@ -93,7 +93,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
// so we can't do this inside the input handler. // so we can't do this inside the input handler.
Game.RunAfterTick(() => Game.RunAfterTick(() =>
{ {
Game.InitializeMod("modchooser", new Arguments(new[] { "Content.Mod=" + modData.Manifest.Id })); Game.InitializeMod("modcontent", new Arguments(new[] { "Content.Mod=" + modData.Manifest.Id }));
}); });
}; };
@@ -287,7 +287,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{ {
// Send the mod and engine version to support version-filtered news (update prompts) // Send the mod and engine version to support version-filtered news (update prompts)
newsURL += "?version={0}&mod={1}&modversion={2}".F( newsURL += "?version={0}&mod={1}&modversion={2}".F(
Uri.EscapeUriString(Game.Mods["modchooser"].Metadata.Version), Uri.EscapeUriString(Game.Mods["modcontent"].Metadata.Version),
Uri.EscapeUriString(Game.ModData.Manifest.Id), Uri.EscapeUriString(Game.ModData.Manifest.Id),
Uri.EscapeUriString(Game.ModData.Manifest.Metadata.Version)); Uri.EscapeUriString(Game.ModData.Manifest.Metadata.Version));

View File

@@ -326,7 +326,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}; };
var queryURL = services.ServerList + "games?version={0}&mod={1}&modversion={2}".F( var queryURL = services.ServerList + "games?version={0}&mod={1}&modversion={2}".F(
Uri.EscapeUriString(Game.Mods["modchooser"].Metadata.Version), Uri.EscapeUriString(Game.Mods["modcontent"].Metadata.Version),
Uri.EscapeUriString(Game.ModData.Manifest.Id), Uri.EscapeUriString(Game.ModData.Manifest.Id),
Uri.EscapeUriString(Game.ModData.Manifest.Metadata.Version)); Uri.EscapeUriString(Game.ModData.Manifest.Metadata.Version));

View File

@@ -74,16 +74,12 @@ function Version-Command
if ($version -ne $null) if ($version -ne $null)
{ {
$mods = @("mods/ra/mod.yaml", "mods/cnc/mod.yaml", "mods/d2k/mod.yaml", "mods/ts/mod.yaml", "mods/modchooser/mod.yaml", "mods/all/mod.yaml") $mods = @("mods/ra/mod.yaml", "mods/cnc/mod.yaml", "mods/d2k/mod.yaml", "mods/ts/mod.yaml", "mods/modcontent/mod.yaml", "mods/all/mod.yaml")
foreach ($mod in $mods) foreach ($mod in $mods)
{ {
$replacement = (gc $mod) -Replace "Version:.*", ("Version: {0}" -f $version) $replacement = (gc $mod) -Replace "Version:.*", ("Version: {0}" -f $version)
sc $mod $replacement sc $mod $replacement
# The tab is a workaround for not replacing inside of "Packages:"
$replacement = (gc $mod) -Replace " modchooser:.*", (" modchooser: {0}" -f $version)
sc $mod $replacement
$prefix = $(gc $mod) | Where { $_.ToString().EndsWith(": User") } $prefix = $(gc $mod) | Where { $_.ToString().EndsWith(": User") }
if ($prefix -and $prefix.LastIndexOf("/") -ne -1) if ($prefix -and $prefix.LastIndexOf("/") -ne -1)
{ {

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -155,7 +155,7 @@ panel-rule: chrome.png
background: chrome.png background: chrome.png
background:0,0,1024,480 background:0,0,1024,480
modchooser: chrome.png modcontent: chrome.png
logo: 0,576,280,128 logo: 0,576,280,128
leftarrow:384,512,20,64 leftarrow:384,512,20,64
rightarrow:404,512,20,64 rightarrow:404,512,20,64

View File

@@ -56,7 +56,7 @@ Background@CONTENT_PANEL:
Y: 1 Y: 1
Width: 20 Width: 20
Height: 20 Height: 20
ImageCollection: modchooser ImageCollection: modcontent
ImageName: cdicon ImageName: cdicon
TooltipContainer: TOOLTIP_CONTAINER TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: DISC_TOOLTIP TooltipTemplate: DISC_TOOLTIP
@@ -341,7 +341,7 @@ Background@CONTENT_PROMPT_PANEL:
Font: Bold Font: Bold
Key: escape Key: escape
Background@MODCHOOSER_BACKGROUND: Background@MODCONTENT_BACKGROUND:
Background: background Background: background
Width: WINDOW_RIGHT Width: WINDOW_RIGHT
Height: WINDOW_BOTTOM Height: WINDOW_BOTTOM

View File

@@ -6,30 +6,30 @@ Metadata:
Packages: Packages:
. .
./mods/modchooser: modchooser ./mods/modcontent: modcontent
./mods/common: common ./mods/common: common
Cursors: Cursors:
modchooser|cursors.yaml modcontent|cursors.yaml
Chrome: Chrome:
modchooser|chrome.yaml modcontent|chrome.yaml
Assemblies: Assemblies:
common|OpenRA.Mods.Common.dll common|OpenRA.Mods.Common.dll
ChromeLayout: ChromeLayout:
modchooser|content.yaml modcontent|content.yaml
Notifications: Notifications:
modchooser|notifications.yaml modcontent|notifications.yaml
LoadScreen: ModContentLoadScreen LoadScreen: ModContentLoadScreen
Image: ./mods/modchooser/chrome.png Image: ./mods/modcontent/chrome.png
ChromeMetrics: ChromeMetrics:
common|metrics.yaml common|metrics.yaml
modchooser|metrics.yaml modcontent|metrics.yaml
Fonts: Fonts:
Regular: Regular:

View File

@@ -26,10 +26,6 @@
</description> </description>
<screenshots> <screenshots>
<screenshot type="default"> <screenshot type="default">
<image>http://www.openra.net/images/appdata/modchooser.png</image>
<caption>Mod selection screen</caption>
</screenshot>
<screenshot>
<image>http://www.openra.net/images/appdata/ingame-ra.png</image> <image>http://www.openra.net/images/appdata/ingame-ra.png</image>
<caption>Red Alert mod</caption> <caption>Red Alert mod</caption>
</screenshot> </screenshot>

View File

@@ -33,7 +33,7 @@ markdown Lua-API.md > Lua-API.html
# List of files that are packaged on all platforms # List of files that are packaged on all platforms
FILES=('OpenRA.Game.exe' 'OpenRA.Game.exe.config' 'OpenRA.Utility.exe' 'OpenRA.Server.exe' FILES=('OpenRA.Game.exe' 'OpenRA.Game.exe.config' 'OpenRA.Utility.exe' 'OpenRA.Server.exe'
'OpenRA.Platforms.Default.dll' \ 'OpenRA.Platforms.Default.dll' \
'lua' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \ 'lua' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modcontent' \
'AUTHORS' 'COPYING' 'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \ 'AUTHORS' 'COPYING' 'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \
'global mix database.dat' 'GeoLite2-Country.mmdb.gz') 'global mix database.dat' 'GeoLite2-Country.mmdb.gz')

View File

@@ -79,7 +79,7 @@ Section "Game" GAME
File /r "${SRCDIR}\mods\cnc" File /r "${SRCDIR}\mods\cnc"
File /r "${SRCDIR}\mods\d2k" File /r "${SRCDIR}\mods\d2k"
File /r "${SRCDIR}\mods\ra" File /r "${SRCDIR}\mods\ra"
File /r "${SRCDIR}\mods\modchooser" File /r "${SRCDIR}\mods\modcontent"
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
File "${SRCDIR}\OpenRA.exe" File "${SRCDIR}\OpenRA.exe"

View File

@@ -7,12 +7,6 @@ call OpenRA.Utility.exe
echo Enter --exit to exit echo Enter --exit to exit
set /P mod=Please enter a modname: OpenRA.Utility.exe set /P mod=Please enter a modname: OpenRA.Utility.exe
if /I "%mod%" EQU "--exit" (exit) if /I "%mod%" EQU "--exit" (exit)
if /I "%mod%" EQU "modchooser" (
echo.
echo Sorry, this mod isn't available at the moment!
echo.
goto choosemod
)
if /I "%mod%" EQU "ra" (goto help) if /I "%mod%" EQU "ra" (goto help)
if /I "%mod%" EQU "cnc" (goto help) if /I "%mod%" EQU "cnc" (goto help)
if /I "%mod%" EQU "ts" (goto help) if /I "%mod%" EQU "ts" (goto help)