Compare commits

..

14 Commits

Author SHA1 Message Date
Paul Chote
f1b548c258 Add setup-dotnet action. 2020-12-23 13:33:25 +00:00
Paul Chote
565828efe4 Mono packaging fixes. 2020-12-22 21:48:14 +00:00
teinarss
600ab46302 and back again 2020-12-22 19:21:44 +01:00
teinarss
d1c5c112d5 blah 2020-12-22 19:16:15 +01:00
teinarss
0f0b9afc97 ee 2020-12-22 18:33:04 +01:00
teinarss
3774ba0928 Add support for dotnet core for Windows 2020-12-22 16:56:24 +01:00
Matthias Mailänder
09db4a0e25 Enable debug mode by default. 2020-12-15 23:06:05 +01:00
Trevor Nichols
a85da9d86c Implement loader for MegV3 file format 2020-12-15 11:11:05 +01:00
Paul Chote
920d00bbae Use nearest-neighbour scaling in --debug-chrome-regions utility command. 2020-12-14 22:38:25 +01:00
Ivaylo Draganov
62475279ee Remove unneeded chrome yaml declarations 2020-12-14 20:52:38 +01:00
Matthias Mailänder
d8e979d283 Remove dead code. 2020-12-14 20:38:50 +01:00
Paul Chote
299b8880dd Fix api output directory. 2020-12-14 18:33:35 +01:00
Paul Chote
61027e4067 Fix docs.openra.net repository reference. 2020-12-14 18:33:35 +01:00
Paul Chote
a7249c10dc Fix docs.openra.net documentation workflow. 2020-12-13 15:35:31 +01:00
154 changed files with 1305 additions and 3269 deletions

View File

@@ -18,7 +18,6 @@ jobs:
run: |
mono --version
make check
mono ~/.nuget/packages/nunit.consolerunner/3.11.1/tools/nunit3-console.exe --noresult bin/OpenRA.Test.dll
- name: Check Mods
run: |
@@ -27,19 +26,26 @@ jobs:
make test
windows:
name: Windows (Framework 4.7)
name: Windows (Net 5.0)
runs-on: windows-2019
steps:
- name: Clone Repository
uses: actions/checkout@v2
- name: Install .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Check Code
shell: powershell
run: |
# Work around runtime failures on the GH Actions runner
dotnet nuget locals all --clear
.\make.ps1 check
Invoke-Expression "$home\.nuget\packages\nunit.consolerunner\3.11.1\tools\nunit3-console.exe --noresult bin/OpenRA.Test.dll"
dotnet build OpenRA.Test\OpenRA.Test.csproj -c Debug --nologo -p:TargetPlatform=win-x64
dotnet test bin\OpenRA.Test.dll --test-adapter-path:.
- name: Check Mods
run: |

View File

@@ -15,15 +15,17 @@ jobs:
if: github.repository == 'openra/openra'
steps:
- name: Download Packages
env:
GIT_TAG: ${{ github.event.inputs.tag }}
run: |
wget -q "https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.tag }}/OpenRA-${{ github.event.inputs.tag }}-x64.exe"
wget -q "https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.tag }}/OpenRA-${{ github.event.inputs.tag }}-x64-winportable.zip" -O "OpenRA-${{ github.event.inputs.tag }}-x64-win-itch.zip"
wget -q "https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.tag }}/OpenRA-${{ github.event.inputs.tag }}.dmg"
wget -q "https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.tag }}/OpenRA-Dune-2000-x86_64.AppImage"
wget -q "https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.tag }}/OpenRA-Red-Alert-x86_64.AppImage"
wget -q "https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.tag }}/OpenRA-Tiberian-Dawn-x86_64.AppImage"
wget -q "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.event.inputs.tag }}/packaging/.itch.toml"
zip -u "OpenRA-${{ github.event.inputs.tag }}-x64-win-itch.zip" .itch.toml
wget -q "https://github.com/${{ github.repository }}/releases/download/${GIT_TAG}/OpenRA-${GIT_TAG}-x64.exe"
wget -q "https://github.com/${{ github.repository }}/releases/download/${GIT_TAG}/OpenRA-${GIT_TAG}-x64-winportable.zip" -O "OpenRA-${GIT_TAG}-x64-win-itch.zip"
wget -q "https://github.com${{ github.repository }}/releases/download/${GIT_TAG}/OpenRA-${GIT_TAG}.dmg"
wget -q "https://github.com/${{ github.repository }}/releases/download/${GIT_TAG}/OpenRA-Dune-2000-x86_64.AppImage"
wget -q "https://github.com/${{ github.repository }}/releases/download/${GIT_TAG}/OpenRA-Red-Alert-x86_64.AppImage"
wget -q "https://github.com/${{ github.repository }}/releases/download/${GIT_TAG}/OpenRA-Tiberian-Dawn-x86_64.AppImage"
wget -q "https://raw.githubusercontent.com/${{ github.repository }}/${GIT_TAG}/packaging/.itch.toml"
zip -u "OpenRA-${GIT_TAG}-x64-win-itch.zip" .itch.toml
- name: Publish Windows Installer
uses: josephbmanley/butler-publish-itchio-action@master
@@ -33,7 +35,7 @@ jobs:
ITCH_GAME: openra
ITCH_USER: openra-developers
VERSION: ${{ github.event.inputs.tag }}
PACKAGE: OpenRA-${{ github.event.inputs.tag }}}-x64.exe
PACKAGE: OpenRA-${{ github.event.inputs.tag }}}-x64.exe"
- name: Publish Windows Itch Bundle
uses: josephbmanley/butler-publish-itchio-action@master
@@ -53,7 +55,7 @@ jobs:
ITCH_GAME: openra
ITCH_USER: openra-developers
VERSION: ${{ github.event.inputs.tag }}
PACKAGE: OpenRA-${{ github.event.inputs.tag }}}.dmg
PACKAGE: OpenRA-${{ github.event.inputs.tag }}}.dmg"
- name: Publish RA AppImage
uses: josephbmanley/butler-publish-itchio-action@master

View File

@@ -8,30 +8,6 @@ on:
- 'devtest-*'
jobs:
source:
name: Source Tarball
runs-on: ubuntu-20.04
steps:
- name: Clone Repository
uses: actions/checkout@v2
- name: Prepare Environment
run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> ${GITHUB_ENV}
- name: Package Source
run: |
mkdir -p build/source
./packaging/source/buildpackage.sh "${GIT_TAG}" "${PWD}/build/source"
- name: Upload Packages
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
overwrite: true
file_glob: true
file: build/source/*
linux:
name: Linux AppImages
runs-on: ubuntu-20.04
@@ -93,11 +69,15 @@ jobs:
- name: Clone Repository
uses: actions/checkout@v2
- name: Install .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Prepare Environment
run: |
echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> ${GITHUB_ENV}
sudo apt-get update
sudo apt-get install nsis
sudo apt install nsis wine64
- name: Package Installers
run: |

20
.vscode/launch.json vendored
View File

@@ -11,8 +11,9 @@
"type": "mono"
},
"request": "launch",
"program": "${workspaceRoot}/bin/OpenRA.exe",
"args": ["Game.Mod=cnc", "Engine.EngineDir=.."],
"program": "${workspaceRoot}/OpenRA.Game.exe",
"cwd": "${workspaceRoot}",
"args": ["Game.Mod=cnc"],
"preLaunchTask": "build",
},
{
@@ -25,8 +26,9 @@
"type": "mono"
},
"request": "launch",
"program": "${workspaceRoot}/bin/OpenRA.exe",
"args": ["Game.Mod=ra", "Engine.EngineDir=.."],
"program": "${workspaceRoot}/OpenRA.Game.exe",
"cwd": "${workspaceRoot}",
"args": ["Game.Mod=ra"],
"preLaunchTask": "build",
},
{
@@ -39,8 +41,9 @@
"type": "mono"
},
"request": "launch",
"program": "${workspaceRoot}/bin/OpenRA.exe",
"args": ["Game.Mod=d2k", "Engine.EngineDir=.."],
"program": "${workspaceRoot}/OpenRA.Game.exe",
"cwd": "${workspaceRoot}",
"args": ["Game.Mod=d2k"],
"preLaunchTask": "build",
},
{
@@ -53,8 +56,9 @@
"type": "mono"
},
"request": "launch",
"program": "${workspaceRoot}/bin/OpenRA.exe",
"args": ["Game.Mod=ts", "Engine.EngineDir=.."],
"program": "${workspaceRoot}/OpenRA.Game.exe",
"cwd": "${workspaceRoot}",
"args": ["Game.Mod=ts"],
"preLaunchTask": "build",
},
]

View File

@@ -8,18 +8,16 @@ Windows
Compiling OpenRA requires the following dependencies:
* [Windows PowerShell >= 4.0](http://microsoft.com/powershell) (included by default in recent Windows 10 versions)
* [.NET Framework 4.7.2 (Developer Pack)](https://dotnet.microsoft.com/download/dotnet-framework/net472) (or via Visual Studio 2017)
* [.NET Core 2.2 SDK](https://dotnet.microsoft.com/download/dotnet-core/2.2) (or via Visual Studio 2017)
* [.NET 5 SDK](https://dotnet.microsoft.com/download/dotnet/5.0) (or via Visual Studio)
To compile OpenRA, open the `OpenRA.sln` solution in the main folder, build it from the command-line with MSBuild or use the Makefile analogue command `make all` scripted in PowerShell syntax.
To compile OpenRA, open the `OpenRA.sln` solution in the main folder, build it from the command-line with `dotnet` or use the Makefile analogue command `make all` scripted in PowerShell syntax.
Run the game with `launch-game.cmd`. It can be handed arguments that specify the exact mod one wishes to run, for example, run `launch-game.cmd Game.Mod=ra` to launch Red Alert, `launch-game.cmd Game.Mod=cnc` to start Tiberian dawn or `launch-game.cmd Game.Mod=d2k` to launch Dune 2000.
Linux
=====
Mono, version 5.18 or later, is required to compile OpenRA. You can add the [upstream mono repository](https://www.mono-project.com/download/stable/#download-lin) for your distro to obtain the latest version if your system packages are not sufficient.
Mono, version 6.4 or later, is required to compile OpenRA. You can add the [upstream mono repository](https://www.mono-project.com/download/stable/#download-lin) for your distro to obtain the latest version if your system packages are not sufficient.
To compile OpenRA, run `make` from the command line. After this one can run the game with `./launch-game.sh`. It is also possible to specify the mod you wish to run from the command line, e.g. with `./launch-game.sh Game.Mod=ts` if you wish to try the experimental Tiberian Sun mod.
@@ -99,7 +97,7 @@ macOS
=====
Before compiling OpenRA you must install the following dependencies:
* [Mono >= 5.18](https://www.mono-project.com/download/stable/#download-mac)
* [Mono >= 6.4](https://www.mono-project.com/download/stable/#download-mac)
To compile OpenRA, run `make` from the command line. Run with `./launch-game.sh`.

View File

@@ -15,10 +15,6 @@
# to compile and install Red Alert, Tiberian Dawn, and Dune 2000, run:
# make [prefix=/foo] [bindir=/bar/bin] install
#
# to compile and install Red Alert, Tiberian Dawn, and Dune 2000
# using system libraries for native dependencies, run:
# make [prefix=/foo] [bindir=/bar/bin] TARGETPLATFORM=unix-generic install
#
# to install Linux startup scripts, desktop files, icons, and MIME metadata
# make install-linux-shortcuts
#
@@ -32,14 +28,14 @@
############################## TOOLCHAIN ###############################
#
# List of .NET assemblies that we can guarantee exist
WHITELISTED_OPENRA_ASSEMBLIES = OpenRA.exe OpenRA.Utility.exe OpenRA.Server.exe OpenRA.Platforms.Default.dll OpenRA.Game.dll OpenRA.Mods.Common.dll OpenRA.Mods.Cnc.dll OpenRA.Mods.D2k.dll
WHITELISTED_OPENRA_ASSEMBLIES = OpenRA.dll OpenRA.Utility.dll OpenRA.Server.dll OpenRA.Platforms.Default.dll OpenRA.Game.dll OpenRA.Mods.Common.dll OpenRA.Mods.Cnc.dll OpenRA.Mods.D2k.dll
# These are explicitly shipped alongside our core files by the packaging script
WHITELISTED_THIRDPARTY_ASSEMBLIES = ICSharpCode.SharpZipLib.dll FuzzyLogicLibrary.dll Eluant.dll BeaconLib.dll Open.Nat.dll SDL2-CS.dll OpenAL-CS.Core.dll DiscordRPC.dll Newtonsoft.Json.dll
# These are shipped in our custom minimal mono runtime and also available in the full system-installed .NET/mono stack
# This list *must* be kept in sync with the files packaged by the AppImageSupport and OpenRALauncherOSX repositories
WHITELISTED_CORE_ASSEMBLIES = mscorlib.dll System.dll System.Configuration.dll System.Core.dll System.Numerics.dll System.Security.dll System.Xml.dll Mono.Security.dll netstandard.dll
WHITELISTED_CORE_ASSEMBLIES = mscorlib.dll System.dll System.Configuration.dll System.Core.dll System.Numerics.dll System.Security.dll System.Xml.dll Mono.Security.dll netstandard.dll Microsoft.Win32.Registry.dll System.Security.AccessControl.dll System.Security.Principal.Windows.dll System.Xml.Linq.dll System.Runtime.Serialization.dll
######################### UTILITIES/SETTINGS ###########################
#
@@ -52,6 +48,10 @@ bindir ?= $(prefix)/bin
libdir ?= $(prefix)/lib
gameinstalldir ?= $(libdir)/openra
BIN_INSTALL_DIR = $(DESTDIR)$(bindir)
DATA_INSTALL_DIR = $(DESTDIR)$(datadir)
OPENRA_INSTALL_DIR = $(DESTDIR)$(gameinstalldir)
# Toolchain
CWD = $(shell pwd)
MSBUILD = msbuild -verbosity:m -nologo
@@ -61,8 +61,7 @@ RM_R = $(RM) -r
RM_F = $(RM) -f
RM_RF = $(RM) -rf
# Only for use in target version:
VERSION := $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || (c=$$(git rev-parse --short HEAD 2>/dev/null) && echo git-$$c))
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
# Detect target platform for dependencies if not given by the user
ifndef TARGETPLATFORM
@@ -79,13 +78,13 @@ endif
endif
endif
OPENRA_UTILITY = ENGINE_DIR=".." $(MONO) --debug bin/OpenRA.Utility.exe
OPENRA_UTILITY = ENGINE_DIR=".." $(MONO) --debug bin/OpenRA.Utility.dll
##################### DEVELOPMENT BUILDS AND TESTS #####################
#
all:
@command -v $(firstword $(MSBUILD)) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 5.18."; exit 1)
@$(MSBUILD) -t:Build -restore -p:Configuration=Release -p:TargetPlatform=$(TARGETPLATFORM)
@$(MSBUILD) -t:Build -restore -p:Configuration=Release -p:TargetPlatform=$(TARGETPLATFORM) -p:Mono=true -p:DefineConstants="MONO"
ifeq ($(TARGETPLATFORM), unix-generic)
@./configure-system-libraries.sh
endif
@@ -93,16 +92,13 @@ endif
clean:
@-$(RM_RF) ./bin ./*/bin ./*/obj
@$(MSBUILD) -t:Clean
@$(MSBUILD) -t:Clean -p:Mono=true
@-$(RM_F) IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
check:
@echo
@echo "Compiling in debug mode..."
@$(MSBUILD) -t:build -restore -p:Configuration=Debug -p:TargetPlatform=$(TARGETPLATFORM)
ifeq ($(TARGETPLATFORM), unix-generic)
@./configure-system-libraries.sh
endif
@$(MSBUILD) -t:build -restore -p:Configuration=Debug -p:TargetPlatform=$(TARGETPLATFORM) -p:Mono=true -p:DefineConstants="MONO"
@echo
@echo "Checking runtime assemblies..."
@$(OPENRA_UTILITY) all --check-runtime-assemblies $(WHITELISTED_OPENRA_ASSEMBLIES) $(WHITELISTED_THIRDPARTY_ASSEMBLIES) $(WHITELISTED_CORE_ASSEMBLIES)
@@ -137,21 +133,18 @@ test: all
############# LOCAL INSTALLATION AND DOWNSTREAM PACKAGING ##############
#
version: 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
ifeq ($(VERSION),)
$(error Unable to determine new version (requires git or override of variable VERSION))
endif
@sh -c '. ./packaging/functions.sh; set_engine_version "$(VERSION)" .'
@sh -c '. ./packaging/functions.sh; set_mod_version "$(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'
@sh -c '. ./packaging/functions.sh; set_engine_version $(VERSION) .'
@sh -c '. ./packaging/functions.sh; set_mod_version $(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'
install:
@sh -c '. ./packaging/functions.sh; install_assemblies_mono $(CWD) $(DESTDIR)$(gameinstalldir) $(TARGETPLATFORM) True True True'
@sh -c '. ./packaging/functions.sh; install_data $(CWD) $(DESTDIR)$(gameinstalldir) cnc d2k ra'
@sh -c '. ./packaging/functions.sh; install_assemblies_mono $(CWD) $(OPENRA_INSTALL_DIR) $(TARGETPLATFORM) True True True'
@sh -c '. ./packaging/functions.sh; install_data $(CWD) $(OPENRA_INSTALL_DIR) cnc d2k ra'
install-linux-shortcuts:
@sh -c '. ./packaging/functions.sh; install_linux_shortcuts $(CWD) "$(DESTDIR)" "$(gameinstalldir)" "$(bindir)" "$(datadir)" "$(shell head -n1 VERSION)" cnc d2k ra'
@sh -c '. ./packaging/functions.sh; install_linux_shortcuts $(CWD) $(OPENRA_INSTALL_DIR) $(BIN_INSTALL_DIR) $(DATA_INSTALL_DIR) $(VERSION) cnc d2k ra'
install-linux-appdata:
@sh -c '. ./packaging/functions.sh; install_linux_appdata $(CWD) "$(DESTDIR)" "$(datadir)" cnc d2k ra'
@sh -c '. ./packaging/functions.sh; install_linux_appdata $(CWD) $(DATA_INSTALL_DIR) cnc d2k ra'
help:
@echo 'to compile, run:'
@@ -167,11 +160,7 @@ help:
@echo ' make test'
@echo
@echo 'to compile and install Red Alert, Tiberian Dawn, and Dune 2000 run:'
@echo ' make [prefix=/foo] [TARGETPLATFORM=unix-generic] install'
@echo
@echo 'to compile and install Red Alert, Tiberian Dawn, and Dune 2000'
@echo 'using system libraries for native dependencies, run:'
@echo ' make [prefix=/foo] [bindir=/bar/bin] TARGETPLATFORM=unix-generic install'
@echo ' make [prefix=/foo] install'
@echo
@echo 'to install Linux startup scripts, desktop files, icons, and MIME metadata'
@echo ' make install-linux-shortcuts'

View File

@@ -297,6 +297,7 @@ namespace OpenRA
EngineVersion = "Unknown";
Console.WriteLine("Engine version is {0}", EngineVersion);
Console.WriteLine("Runtime: {0}", Platform.RuntimeVersion);
// Special case handling of Game.Mod argument: if it matches a real filesystem path
// then we use this to override the mod search path, and replace it with the mod id
@@ -329,9 +330,16 @@ namespace OpenRA
try
{
var rendererPath = Path.Combine(Platform.BinDir, "OpenRA.Platforms." + p + ".dll");
var assembly = Assembly.LoadFile(rendererPath);
#if !MONO
var loader = new AssemblyLoader(rendererPath);
var platformType = loader.LoadDefaultAssembly().GetTypes().SingleOrDefault(t => typeof(IPlatform).IsAssignableFrom(t));
#else
var assembly = Assembly.LoadFile(rendererPath);
var platformType = assembly.GetTypes().SingleOrDefault(t => typeof(IPlatform).IsAssignableFrom(t));
#endif
if (platformType == null)
throw new InvalidOperationException("Platform dll must include exactly one IPlatform implementation.");

View File

@@ -123,7 +123,6 @@ namespace OpenRA
DisplayFactionId = runtimePlayer.DisplayFaction.InternalName,
Color = runtimePlayer.Color,
Team = client.Team,
Handicap = client.Handicap,
SpawnPoint = runtimePlayer.SpawnPoint,
IsRandomFaction = runtimePlayer.Faction.InternalName != client.Faction,
IsRandomSpawnPoint = runtimePlayer.DisplaySpawnPoint == 0,
@@ -167,7 +166,6 @@ namespace OpenRA
/// <summary>The team ID on start-up, or 0 if the player is not part of a team.</summary>
public int Team;
public int SpawnPoint;
public int Handicap;
/// <summary>True if the faction was chosen at random; otherwise, false.</summary>
public bool IsRandomFaction;

View File

@@ -166,7 +166,6 @@ namespace OpenRA
public void QueryRemoteMapDetails(string repositoryUrl, IEnumerable<string> uids, Action<MapPreview> mapDetailsReceived = null, Action queryFailed = null)
{
var maps = uids.Distinct()
.Where(uid => uid != null)
.Select(uid => previews[uid])
.Where(p => p.Status == MapStatus.Unavailable)
.ToDictionary(p => p.Uid, p => p);

View File

@@ -50,9 +50,6 @@ namespace OpenRA
public bool LockTeam = false;
public int Team = 0;
public bool LockHandicap = false;
public int Handicap = 0;
public string[] Allies = { };
public string[] Enemies = { };

View File

@@ -25,7 +25,6 @@ namespace OpenRA.Network
public readonly string Faction;
public readonly int SpawnPoint;
public readonly int Team;
public readonly int Handicap;
public readonly string Slot;
public readonly string Bot;
public readonly bool IsAdmin;
@@ -40,7 +39,6 @@ namespace OpenRA.Network
Faction = client.Faction;
SpawnPoint = client.SpawnPoint;
Team = client.Team;
Handicap = client.Handicap;
Slot = client.Slot;
Bot = client.Bot;
IsAdmin = client.IsAdmin;
@@ -55,7 +53,6 @@ namespace OpenRA.Network
client.Faction = Faction;
client.SpawnPoint = SpawnPoint;
client.Team = Team;
client.Handicap = Handicap;
client.Slot = Slot;
client.Bot = Bot;
client.IsAdmin = IsAdmin;

View File

@@ -144,7 +144,6 @@ namespace OpenRA.Network
public ClientState State = ClientState.Invalid;
public int Team;
public int Handicap;
public string Slot; // Slot ID, or null for observer
public string Bot; // Bot type, null for real clients
public int BotControllerClientIndex; // who added the bot to the slot
@@ -194,7 +193,6 @@ namespace OpenRA.Network
public bool LockFaction;
public bool LockColor;
public bool LockTeam;
public bool LockHandicap;
public bool LockSpawn;
public bool Required;

View File

@@ -15,6 +15,7 @@ using System.IO;
using System.Linq;
using System.Reflection;
using OpenRA.Primitives;
using OpenRA.Support;
namespace OpenRA
{
@@ -41,26 +42,49 @@ namespace OpenRA
var resolvedPath = FileSystem.FileSystem.ResolveAssemblyPath(path, manifest, mods);
if (resolvedPath == null)
throw new FileNotFoundException("Assembly `{0}` not found.".F(path));
#if !MONO
var loader = new AssemblyLoader(resolvedPath);
var platformType = loader.LoadDefaultAssembly();
assemblyList.Add(platformType);
// .NET doesn't provide any way of querying the metadata of an assembly without either:
// (a) loading duplicate data into the application domain, breaking the world.
// (b) crashing if the assembly has already been loaded.
// We can't check the internal name of the assembly, so we'll work off the data instead
var hash = CryptoUtil.SHA1Hash(File.ReadAllBytes(resolvedPath));
if (!ResolvedAssemblies.TryGetValue(hash, out var assembly))
{
assembly = Assembly.LoadFile(resolvedPath);
ResolvedAssemblies.Add(hash, assembly);
}
assemblyList.Add(assembly);
#else
LoadAssembly(assemblyList, resolvedPath);
#endif
}
AppDomain.CurrentDomain.AssemblyResolve += ResolveAssembly;
assemblies = assemblyList.SelectMany(asm => asm.GetNamespaces().Select(ns => (asm, ns))).ToArray();
}
void LoadAssembly(List<Assembly> assemblyList, string resolvedPath)
{
// .NET doesn't provide any way of querying the metadata of an assembly without either:
// (a) loading duplicate data into the application domain, breaking the world.
// (b) crashing if the assembly has already been loaded.
// We can't check the internal name of the assembly, so we'll work off the data instead
var hash = CryptoUtil.SHA1Hash(File.ReadAllBytes(resolvedPath));
if (!ResolvedAssemblies.TryGetValue(hash, out var assembly))
{
assembly = Assembly.LoadFile(resolvedPath);
ResolvedAssemblies.Add(hash, assembly);
// Allow mods to use libraries.
var assemblyPath = Path.GetDirectoryName(resolvedPath);
if (assemblyPath != null)
{
foreach (var referencedAssembly in assembly.GetReferencedAssemblies())
{
var depedencyPath = Path.Combine(assemblyPath, referencedAssembly.Name + ".dll");
if (File.Exists(depedencyPath))
LoadAssembly(assemblyList, depedencyPath);
}
}
}
assemblyList.Add(assembly);
}
Assembly ResolveAssembly(object sender, ResolveEventArgs e)
{
foreach (var a in AppDomain.CurrentDomain.GetAssemblies())

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net472</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -39,6 +39,11 @@
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
</ItemGroup>
<ItemGroup Condition="'$(Mono)' == ''">
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0-preview.3-runtime.20214.6" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
</ItemGroup>
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'">
<!-- Disable code style analysis on Release builds to improve compile-time performance -->
<ItemGroup Condition="'$(Configuration)'=='Release'">

View File

@@ -58,7 +58,6 @@ namespace OpenRA
public readonly bool Playable = true;
public readonly int ClientIndex;
public readonly CPos HomeLocation;
public readonly int Handicap;
public readonly PlayerReference PlayerReference;
public readonly bool IsBot;
public readonly string BotType;
@@ -181,8 +180,6 @@ namespace OpenRA
HomeLocation = assignSpawnPoints?.AssignHomeLocation(world, client, playerRandom) ?? pr.HomeLocation;
SpawnPoint = assignSpawnPoints?.SpawnPointForPlayer(this) ?? client.SpawnPoint;
DisplaySpawnPoint = client.SpawnPoint;
Handicap = client.Handicap;
}
else
{
@@ -198,7 +195,6 @@ namespace OpenRA
DisplayFaction = ResolveDisplayFaction(world, pr.Faction);
HomeLocation = pr.HomeLocation;
SpawnPoint = DisplaySpawnPoint = 0;
Handicap = pr.Handicap;
}
if (!spectating)

View File

@@ -93,8 +93,6 @@ namespace OpenRA.Server
c.SpawnPoint = pr.Spawn;
if (pr.LockTeam)
c.Team = pr.Team;
if (pr.LockHandicap)
c.Team = pr.Handicap;
c.Color = pr.LockColor ? pr.Color : c.PreferredColor;
}
@@ -439,7 +437,6 @@ namespace OpenRA.Server
Faction = "Random",
SpawnPoint = 0,
Team = 0,
Handicap = 0,
State = Session.ClientState.Invalid,
};

View File

@@ -256,8 +256,6 @@ namespace OpenRA
public int IntroductionPromptVersion = 0;
public MPGameFilters MPGameFilters = MPGameFilters.Waiting | MPGameFilters.Empty | MPGameFilters.Protected | MPGameFilters.Started;
public bool PauseShellmap = false;
}
public class Settings

View File

@@ -0,0 +1,362 @@
#region Copyright & License Information
/*
* Copyright 2007-2020 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
// Not used/usable on Mono. Only used for Dotnet Core. Based on https://github.com/natemcmaster/DotNetCorePlugins
#if !MONO
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Loader;
using Microsoft.Extensions.DependencyModel;
namespace OpenRA.Support
{
public class AssemblyLoader
{
readonly string mainAssembly;
readonly AssemblyLoadContext context;
public Assembly LoadDefaultAssembly() => context.LoadFromAssemblyPath(mainAssembly);
public AssemblyLoader(string assemblyFile)
{
mainAssembly = assemblyFile;
var baseDir = Path.GetDirectoryName(assemblyFile);
context = CreateLoadContext(baseDir, assemblyFile);
}
static AssemblyLoadContext CreateLoadContext(string baseDir, string assemblyFile)
{
var depsJsonFile = Path.Combine(baseDir, Path.GetFileNameWithoutExtension(assemblyFile) + ".deps.json");
var builder = new AssemblyLoadContextBuilder();
builder.TryAddDependencyContext(depsJsonFile, out _);
builder.SetBaseDirectory(baseDir);
return builder.Build();
}
}
public class AssemblyLoadContextBuilder
{
readonly Dictionary<string, ManagedLibrary> managedLibraries = new Dictionary<string, ManagedLibrary>(StringComparer.Ordinal);
readonly Dictionary<string, NativeLibrary> nativeLibraries = new Dictionary<string, NativeLibrary>(StringComparer.Ordinal);
string basePath;
public AssemblyLoadContext Build()
{
return new ManagedLoadContext(basePath, managedLibraries, nativeLibraries);
}
public AssemblyLoadContextBuilder SetBaseDirectory(string path)
{
if (string.IsNullOrEmpty(path))
throw new ArgumentException("Argument must not be null or empty.", nameof(path));
if (!Path.IsPathRooted(path))
throw new ArgumentException("Argument must be a full path.", nameof(path));
basePath = path;
return this;
}
public AssemblyLoadContextBuilder AddManagedLibrary(ManagedLibrary library)
{
managedLibraries.Add(library.Name.Name, library);
return this;
}
public AssemblyLoadContextBuilder AddNativeLibrary(NativeLibrary library)
{
ValidateRelativePath(library.AppLocalPath);
nativeLibraries.Add(library.Name, library);
return this;
}
static void ValidateRelativePath(string probingPath)
{
if (string.IsNullOrEmpty(probingPath))
throw new ArgumentException("Value must not be null or empty.", nameof(probingPath));
if (Path.IsPathRooted(probingPath))
throw new ArgumentException("Argument must be a relative path.", nameof(probingPath));
}
}
class ManagedLoadContext : AssemblyLoadContext
{
readonly string basePath;
readonly Dictionary<string, ManagedLibrary> managedAssemblies;
readonly Dictionary<string, NativeLibrary> nativeLibraries;
static readonly string[] NativeLibraryExtensions;
static readonly string[] NativeLibraryPrefixes;
static readonly string[] ManagedAssemblyExtensions =
{
".dll",
".ni.dll",
".exe",
".ni.exe"
};
static ManagedLoadContext()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
NativeLibraryPrefixes = new[] { "" };
NativeLibraryExtensions = new[] { ".dll" };
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
NativeLibraryPrefixes = new[] { "", "lib", };
NativeLibraryExtensions = new[] { ".dylib" };
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
NativeLibraryPrefixes = new[] { "", "lib" };
NativeLibraryExtensions = new[] { ".so", ".so.1" };
}
else
{
NativeLibraryPrefixes = Array.Empty<string>();
NativeLibraryExtensions = Array.Empty<string>();
}
}
public ManagedLoadContext(string baseDirectory, Dictionary<string, ManagedLibrary> managedAssemblies, Dictionary<string, NativeLibrary> nativeLibraries)
{
basePath = baseDirectory ?? throw new ArgumentNullException(nameof(baseDirectory));
this.managedAssemblies = managedAssemblies ?? throw new ArgumentNullException(nameof(managedAssemblies));
this.nativeLibraries = nativeLibraries ?? throw new ArgumentNullException(nameof(nativeLibraries));
}
protected override Assembly Load(AssemblyName assemblyName)
{
// If default context is preferred, check first for types in the default context unless the dependency has been declared as private
try
{
var defaultAssembly = Default.LoadFromAssemblyName(assemblyName);
if (defaultAssembly != null)
return null;
}
catch
{
// Swallow errors in loading from the default context
}
if (managedAssemblies.TryGetValue(assemblyName.Name, out var library) && SearchForLibrary(library, out var path))
return LoadFromAssemblyPath(path);
return null;
}
protected override IntPtr LoadUnmanagedDll(string unmanagedDllName)
{
foreach (var prefix in NativeLibraryPrefixes)
if (nativeLibraries.TryGetValue(prefix + unmanagedDllName, out var library) && SearchForLibrary(library, prefix, out var path))
return LoadUnmanagedDllFromPath(path);
return base.LoadUnmanagedDll(unmanagedDllName);
}
bool SearchForLibrary(ManagedLibrary library, out string path)
{
// 1. Search in base path
foreach (var ext in ManagedAssemblyExtensions)
{
var local = Path.Combine(basePath, library.Name.Name + ext);
if (File.Exists(local))
{
path = local;
return true;
}
}
path = null;
return false;
}
bool SearchForLibrary(NativeLibrary library, string prefix, out string path)
{
// 1. Search in base path
foreach (var ext in NativeLibraryExtensions)
{
var candidate = Path.Combine(basePath, $"{prefix}{library.Name}{ext}");
if (File.Exists(candidate))
{
path = candidate;
return true;
}
}
// 2. Search in base path + app local (for portable deployments of netcoreapp)
var local = Path.Combine(basePath, library.AppLocalPath);
if (File.Exists(local))
{
path = local;
return true;
}
path = null;
return false;
}
}
public class ManagedLibrary
{
public AssemblyName Name { get; private set; }
public static ManagedLibrary CreateFromPackage(string assetPath)
{
return new ManagedLibrary
{
Name = new AssemblyName(Path.GetFileNameWithoutExtension(assetPath))
};
}
}
public class NativeLibrary
{
public string Name { get; private set; }
public string AppLocalPath { get; private set; }
public static NativeLibrary CreateFromPackage(string assetPath)
{
return new NativeLibrary
{
Name = Path.GetFileNameWithoutExtension(assetPath),
AppLocalPath = assetPath
};
}
}
public static class DependencyContextExtensions
{
public static AssemblyLoadContextBuilder TryAddDependencyContext(this AssemblyLoadContextBuilder builder, string depsFilePath, out Exception error)
{
error = null;
try
{
builder.AddDependencyContext(depsFilePath);
}
catch (Exception ex)
{
error = ex;
}
return builder;
}
public static AssemblyLoadContextBuilder AddDependencyContext(this AssemblyLoadContextBuilder builder, string depsFilePath)
{
var reader = new DependencyContextJsonReader();
using (var file = File.OpenRead(depsFilePath))
{
var deps = reader.Read(file);
builder.SetBaseDirectory(Path.GetDirectoryName(depsFilePath));
builder.AddDependencyContext(deps);
}
return builder;
}
static string GetFallbackRid()
{
string ridBase;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
ridBase = "win10";
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
ridBase = "linux";
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
ridBase = "osx.10.12";
else
return "any";
switch (RuntimeInformation.OSArchitecture)
{
case Architecture.X86:
return ridBase + "-x86";
case Architecture.X64:
return ridBase + "-x64";
case Architecture.Arm:
return ridBase + "-arm";
case Architecture.Arm64:
return ridBase + "-arm64";
}
return ridBase;
}
public static AssemblyLoadContextBuilder AddDependencyContext(this AssemblyLoadContextBuilder builder, DependencyContext dependencyContext)
{
var ridGraph = dependencyContext.RuntimeGraph.Any()
? dependencyContext.RuntimeGraph
: DependencyContext.Default.RuntimeGraph;
var rid = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier();
var fallbackRid = GetFallbackRid();
var fallbackGraph = ridGraph.FirstOrDefault(g => g.Runtime == rid)
?? ridGraph.FirstOrDefault(g => g.Runtime == fallbackRid)
?? new RuntimeFallbacks("any");
foreach (var managed in dependencyContext.ResolveRuntimeAssemblies(fallbackGraph))
builder.AddManagedLibrary(managed);
foreach (var native in dependencyContext.ResolveNativeAssets(fallbackGraph))
builder.AddNativeLibrary(native);
return builder;
}
static IEnumerable<ManagedLibrary> ResolveRuntimeAssemblies(this DependencyContext depContext, RuntimeFallbacks runtimeGraph)
{
var rids = GetRids(runtimeGraph);
return from library in depContext.RuntimeLibraries
from assetPath in SelectAssets(rids, library.RuntimeAssemblyGroups)
select ManagedLibrary.CreateFromPackage(assetPath);
}
static IEnumerable<NativeLibrary> ResolveNativeAssets(this DependencyContext depContext, RuntimeFallbacks runtimeGraph)
{
var rids = GetRids(runtimeGraph);
return from library in depContext.RuntimeLibraries
from assetPath in SelectAssets(rids, library.NativeLibraryGroups)
where !assetPath.EndsWith(".a", StringComparison.Ordinal)
select NativeLibrary.CreateFromPackage(assetPath);
}
static IEnumerable<string> GetRids(RuntimeFallbacks runtimeGraph)
{
return Enumerable.Concat(new[] { runtimeGraph.Runtime }, runtimeGraph?.Fallbacks ?? Enumerable.Empty<string>());
}
static IEnumerable<string> SelectAssets(IEnumerable<string> rids, IEnumerable<RuntimeAssetGroup> groups)
{
foreach (var rid in rids)
{
var group = groups.FirstOrDefault(g => g.Runtime == rid);
if (group != null)
return group.AssetPaths;
}
return groups.GetDefaultAssets();
}
}
}
#endif

View File

@@ -32,7 +32,6 @@ namespace OpenRA
readonly List<IEffect> effects = new List<IEffect>();
readonly List<IEffect> unpartitionedEffects = new List<IEffect>();
readonly List<ISync> syncedEffects = new List<ISync>();
readonly GameSettings gameSettings;
readonly Queue<Action<World>> frameEndActions = new Queue<Action<World>>();
@@ -227,7 +226,6 @@ namespace OpenRA
};
RulesContainTemporaryBlocker = map.Rules.Actors.Any(a => a.Value.HasTraitInfo<ITemporaryBlockerInfo>());
gameSettings = Game.Settings.Game;
}
public void AddToMaps(Actor self, IOccupySpace ios)
@@ -426,9 +424,7 @@ namespace OpenRA
wasLoadingGameSave = false;
}
// Allow users to pause the shellmap via the settings menu
// Some traits initialize important state during the first tick, so we must allow it to tick at least once
if (!Paused && (Type != WorldType.Shellmap || !gameSettings.PauseShellmap || WorldTick == 0))
if (!Paused)
{
WorldTick++;

View File

@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<TargetFramework Condition="'$(Mono)' == ''">net5.0</TargetFramework>
<TargetFramework Condition="'$(Mono)' != ''">netstandard2.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -17,6 +18,8 @@
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<Configurations>Release;Debug</Configurations>
<AssemblyName>OpenRA</AssemblyName>
<IsPublishable Condition="'$(CopyGenericLauncher)' == 'False'">false</IsPublishable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup>
<TargetPlatform Condition="$([MSBuild]::IsOsPlatform('Windows'))">win-x64</TargetPlatform>

View File

@@ -32,11 +32,6 @@ namespace OpenRA.Mods.Cnc.FileFormats
public static class AudReader
{
public static byte[] LoadSound(byte[] raw, ref int index)
{
return ImaAdpcmReader.LoadImaAdpcmSound(raw, ref index);
}
public static float SoundLength(Stream s)
{
var sampleRate = s.ReadUInt16();

View File

@@ -0,0 +1,138 @@
#region Copyright & License Information
/*
* Copyright 2007-2020 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using OpenRA.FileSystem;
using OpenRA.Primitives;
namespace OpenRA.Mods.Cnc.FileSystem
{
/// <summary>
/// This class supports loading unencrypted V3 .meg files using
/// reference documentation from here https://modtools.petrolution.net/docs/MegFileFormat
/// </summary>
public class MegV3Loader : IPackageLoader
{
const uint UnencryptedMegID = 0xFFFFFFFF;
// Float value 0.99, but it is simpler to read and compare as an integer
const uint MegVersion = 0x3F7D70A4;
public bool TryParsePackage(Stream s, string filename, OpenRA.FileSystem.FileSystem context, out IReadOnlyPackage package)
{
var position = s.Position;
var id = s.ReadUInt32();
var version = s.ReadUInt32();
s.Position = position;
if (id != UnencryptedMegID || version != MegVersion)
{
package = null;
return false;
}
package = new MegFile(s, filename);
return true;
}
public sealed class MegFile : IReadOnlyPackage
{
readonly Stream s;
readonly Dictionary<string, (uint Offset, int Length)> contents = new Dictionary<string, (uint Offset, int Length)>();
public MegFile(Stream s, string filename)
{
Name = filename;
this.s = s;
var id = s.ReadUInt32();
var version = s.ReadUInt32();
if (id != UnencryptedMegID || version != MegVersion)
throw new Exception("Invalid file signature for meg file");
var headerSize = s.ReadUInt32();
var numStrings = s.ReadUInt32();
var numFiles = s.ReadUInt32();
var stringsSize = s.ReadUInt32();
var stringsStart = s.Position;
var filenames = new List<string>();
// The file names are an indexed array of strings
for (var i = 0; i < numStrings; i++)
{
var length = s.ReadUInt16();
filenames.Add(s.ReadASCII(length));
}
// The header indicates where we should be, so verify it
if (s.Position != stringsSize + stringsStart)
throw new Exception("File name table in .meg file inconsistent");
// Now we load each file entry and associated info
for (var i = 0; i < numFiles; i++)
{
// Ignore flags, crc, index
s.Position += 10;
var size = s.ReadUInt32();
var offset = s.ReadUInt32();
var nameIndex = s.ReadUInt16();
contents[filenames[nameIndex]] = (offset, (int)size);
}
if (s.Position != headerSize)
throw new Exception("Expected to be at data start offset");
}
public string Name { get; }
public IEnumerable<string> Contents => contents.Keys;
public bool Contains(string filename)
{
return contents.ContainsKey(filename);
}
public void Dispose()
{
s.Dispose();
}
public Stream GetStream(string filename)
{
// Look up the index of the filename
if (!contents.TryGetValue(filename, out var index))
return null;
return SegmentStream.CreateWithoutOwningStream(s, index.Offset, index.Length);
}
public IReadOnlyPackage OpenPackage(string filename, OpenRA.FileSystem.FileSystem context)
{
var childStream = GetStream(filename);
if (childStream == null)
return null;
if (context.TryParsePackage(childStream, filename, out var package))
return package;
childStream.Dispose();
return null;
}
}
}
}

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<LangVersion>7.3</LangVersion>
@@ -11,6 +11,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<IsPublishable Condition="'$(CopyCncDll)' == 'False'">false</IsPublishable>
</PropertyGroup>
<ItemGroup>
<!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
@@ -37,4 +38,4 @@
<Analyzer Remove="@(Analyzer)" />
</ItemGroup>
</Target>
</Project>
</Project>

View File

@@ -82,9 +82,6 @@ namespace OpenRA.Mods.Cnc.Traits
protected override bool CanAttack(Actor self, in Target target)
{
if (IsTraitPaused)
return false;
if (state == PopupState.Closed)
{
state = PopupState.Transitioning;
@@ -106,9 +103,6 @@ namespace OpenRA.Mods.Cnc.Traits
void INotifyIdle.TickIdle(Actor self)
{
if (IsTraitDisabled || IsTraitPaused)
return;
if (state == PopupState.Open && idleTicks++ > info.CloseDelay)
{
var facingOffset = new WVec(0, -1024, 0).Rotate(WRot.FromYaw(info.DefaultFacing));

View File

@@ -120,7 +120,7 @@ namespace OpenRA.Mods.Cnc.Traits
protected override void Tick(World world)
{
// Cancel the OG if we can't use the power
if (!manager.Powers.TryGetValue(order, out var p) || !p.Active || !p.Ready)
if (!manager.Powers.ContainsKey(order))
world.CancelInputMode();
}

View File

@@ -174,7 +174,7 @@ namespace OpenRA.Mods.Cnc.Traits
protected override void Tick(World world)
{
// Cancel the OG if we can't use the power
if (!manager.Powers.TryGetValue(order, out var p) || !p.Active || !p.Ready)
if (!manager.Powers.ContainsKey(order))
world.CancelInputMode();
}
@@ -274,7 +274,7 @@ namespace OpenRA.Mods.Cnc.Traits
protected override void Tick(World world)
{
// Cancel the OG if we can't use the power
if (!manager.Powers.TryGetValue(order, out var p) || !p.Active || !p.Ready)
if (!manager.Powers.ContainsKey(order))
world.CancelInputMode();
}

View File

@@ -142,13 +142,6 @@ namespace OpenRA.Mods.Common.Activities
// We don't know where the target actually is, so move to where we last saw it
if (useLastVisibleTarget)
{
// HACK: Bot players ignore the standard visibility checks in target.Recalculate,
// which means that targetIsHiddenActor is always false, allowing lastVisibleMaximumRange
// to be assigned zero range by attackAircraft.GetMaximumRangeVersusTarget for e.g. cloaked actors.
// Catch and cancel this edge case to avoid the aircraft stopping mid-air!
if (self.Owner.IsBot && lastVisibleMaximumRange == WDist.Zero)
return true;
// We've reached the assumed position but it is not there - give up
if (checkTarget.IsInRange(pos, lastVisibleMaximumRange))
return true;

View File

@@ -72,7 +72,8 @@ namespace OpenRA.Mods.Common.Effects
return;
var exit = building.NearestExitOrDefault(targetLineNodes[0]);
targetLineNodes.Insert(0, building.CenterPosition + (exit?.Info.SpawnOffset ?? WVec.Zero));
var exitPos = exit != null ? building.World.Map.CenterOfCell(building.Location + exit.Info.ExitCell) : building.CenterPosition;
targetLineNodes.Insert(0, exitPos);
}
IEnumerable<IRenderable> IEffect.Render(WorldRenderer wr) { return SpriteRenderable.None; }

View File

@@ -319,7 +319,7 @@ namespace OpenRA.Mods.Common.FileFormats
// Annoyingly, the complete table is not applied until the frame
// *after* the one that contains the 8th chunk.
// Do we have a set of partial lookup tables ready to apply?
if (currentChunkBuffer == chunkBufferParts && chunkBufferParts != 0)
if (currentChunkBuffer == chunkBufferParts)
{
if (!cbpIsCompressed)
cbf = (byte[])cbp.Clone();

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<LangVersion>7.3</LangVersion>
@@ -11,6 +11,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<ItemGroup>
<!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
@@ -24,6 +25,7 @@
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Private>False</Private>
</ProjectReference>
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="OpenRA-FuzzyLogicLibrary" Version="1.0.1" />
<PackageReference Include="DiscordRichPresence" Version="1.0.150" />
<PackageReference Include="rix0rrr.BeaconLib" Version="1.0.2" />

View File

@@ -21,14 +21,12 @@ namespace OpenRA.Mods.Common.Scripting
{
readonly SpawnMapActors sma;
readonly World world;
readonly GameSettings gameSettings;
public MapGlobal(ScriptContext context)
: base(context)
{
sma = context.World.WorldActor.Trait<SpawnMapActors>();
world = context.World;
gameSettings = Game.Settings.Game;
// Register map actors as globals (yuck!)
foreach (var kv in sma.Actors)
@@ -111,9 +109,6 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Returns true if there is only one human player.")]
public bool IsSinglePlayer { get { return Context.World.LobbyInfo.NonBotPlayers.Count() == 1; } }
[Desc("Returns true if this is a shellmap and the player has paused animations.")]
public bool IsPausedShellmap { get { return Context.World.Type == WorldType.Shellmap && gameSettings.PauseShellmap; } }
[Desc("Returns the value of a `ScriptLobbyDropdown` selected in the game lobby.")]
public LuaValue LobbyOption(string id)
{

View File

@@ -9,8 +9,6 @@
*/
#endregion
using Eluant;
using OpenRA.Primitives;
using OpenRA.Scripting;
using OpenRA.Traits;
@@ -36,18 +34,10 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Maximum health of the actor.")]
public int MaxHealth { get { return health.MaxHP; } }
[Desc("Kill the actor. damageTypes may be omitted, specified as a string, or as table of strings.")]
public void Kill(object damageTypes = null)
[Desc("Kill the actor.")]
public void Kill()
{
Damage damage;
if (damageTypes is string d)
damage = new Damage(health.MaxHP, new BitSet<DamageType>(new[] { d }));
else if (damageTypes is LuaTable t && t.TryGetClrValue(out string[] ds))
damage = new Damage(health.MaxHP, new BitSet<DamageType>(ds));
else
damage = new Damage(health.MaxHP);
health.InflictDamage(Self, Self, damage, true);
health.InflictDamage(Self, Self, new Damage(health.MaxHP), true);
}
}
}

View File

@@ -52,16 +52,6 @@ namespace OpenRA.Mods.Common.Scripting
}
}
[Desc("The player's handicap level.")]
public int Handicap
{
get
{
var c = Player.World.LobbyInfo.Clients.FirstOrDefault(i => i.Index == Player.ClientIndex);
return c?.Handicap ?? 0;
}
}
[Desc("Returns true if the player is a bot.")]
public bool IsBot { get { return Player.IsBot; } }

View File

@@ -43,7 +43,6 @@ namespace OpenRA.Mods.Common.Server
{ "name", Name },
{ "faction", Faction },
{ "team", Team },
{ "handicap", Handicap },
{ "spawn", Spawn },
{ "clear_spawn", ClearPlayerSpawn },
{ "color", PlayerColor },
@@ -246,7 +245,6 @@ namespace OpenRA.Mods.Common.Server
client.Slot = null;
client.SpawnPoint = 0;
client.Team = 0;
client.Handicap = 0;
client.Color = Color.White;
server.SyncLobbyClients();
CheckAutoStart(server);
@@ -379,7 +377,6 @@ namespace OpenRA.Mods.Common.Server
Faction = "Random",
SpawnPoint = 0,
Team = 0,
Handicap = 0,
State = Session.ClientState.NotReady,
BotControllerClientIndex = controllerClientIndex
};
@@ -739,7 +736,6 @@ namespace OpenRA.Mods.Common.Server
targetClient.Slot = null;
targetClient.SpawnPoint = 0;
targetClient.Team = 0;
targetClient.Handicap = 0;
targetClient.Color = Color.White;
targetClient.State = Session.ClientState.NotReady;
server.SendMessage("{0} moved {1} to spectators.".F(client.Name, targetClient.Name));
@@ -828,42 +824,6 @@ namespace OpenRA.Mods.Common.Server
}
}
static bool Handicap(S server, Connection conn, Session.Client client, string s)
{
lock (server.LobbyInfo)
{
var parts = s.Split(' ');
var targetClient = server.LobbyInfo.ClientWithIndex(Exts.ParseIntegerInvariant(parts[0]));
// Only the host can change other client's info
if (targetClient.Index != client.Index && !client.IsAdmin)
return true;
// Map has disabled handicap changes
if (server.LobbyInfo.Slots[targetClient.Slot].LockHandicap)
return true;
if (!Exts.TryParseIntegerInvariant(parts[1], out var handicap))
{
Log.Write("server", "Invalid handicap: {0}", s);
return false;
}
// Handicaps may be set between 0 - 95% in steps of 5%
var options = Enumerable.Range(0, 20).Select(i => 5 * i);
if (!options.Contains(handicap))
{
Log.Write("server", "Invalid handicap: {0}", s);
return false;
}
targetClient.Handicap = handicap;
server.SyncLobbyClients();
return true;
}
}
static bool ClearPlayerSpawn(S server, Connection conn, Session.Client client, string s)
{
var spawnPoint = Exts.ParseIntegerInvariant(s);
@@ -1043,7 +1003,6 @@ namespace OpenRA.Mods.Common.Server
LockFaction = pr.LockFaction,
LockColor = pr.LockColor,
LockTeam = pr.LockTeam,
LockHandicap = pr.LockHandicap,
LockSpawn = pr.LockSpawn,
Required = pr.Required,
};

View File

@@ -22,6 +22,9 @@ namespace OpenRA.Mods.Common.Server
{
lock (server.LobbyInfo)
{
if (server.LobbyInfo.ClientWithIndex(conn.PlayerIndex).IsAdmin)
return;
var defaults = new Session.Global();
LobbyCommands.LoadMapSettings(server, defaults, server.Map.Rules);

View File

@@ -348,11 +348,8 @@ namespace OpenRA.Mods.Common.Traits
return chosenTarget;
var targetsInRange = self.World.FindActorsInCircle(self.CenterPosition, scanRange)
.Select(Target.FromActor);
if (allowMove || ab.Info.TargetFrozenActors)
targetsInRange = targetsInRange
.Concat(self.Owner.FrozenActorLayer.FrozenActorsInCircle(self.World, self.CenterPosition, scanRange)
.Select(Target.FromActor)
.Concat(self.Owner.FrozenActorLayer.FrozenActorsInCircle(self.World, self.CenterPosition, scanRange)
.Select(Target.FromFrozenActor));
foreach (var target in targetsInRange)

View File

@@ -53,7 +53,8 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
if (AttackOrFleeFuzzy.Default.CanAttack(owner.Units, enemyUnits))
{
owner.Bot.QueueOrder(new Order("AttackMove", null, Target.FromCell(owner.World, owner.TargetActor.Location), false, groupedActors: owner.Units.ToArray()));
foreach (var u in owner.Units)
owner.Bot.QueueOrder(new Order("AttackMove", u, Target.FromCell(owner.World, owner.TargetActor.Location), false));
// We have gathered sufficient units. Attack the nearest enemy unit.
owner.FuzzyStateMachine.ChangeState(owner, new GroundUnitsAttackMoveState(), true);
@@ -123,9 +124,8 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
// Since units have different movement speeds, they get separated while approaching the target.
// Let them regroup into tighter formation.
owner.Bot.QueueOrder(new Order("Stop", leader, false));
var units = owner.Units.Where(a => !ownUnits.Contains(a)).ToArray();
owner.Bot.QueueOrder(new Order("AttackMove", null, Target.FromCell(owner.World, leader.Location), false, groupedActors: units));
foreach (var unit in owner.Units.Where(a => !ownUnits.Contains(a)))
owner.Bot.QueueOrder(new Order("AttackMove", unit, Target.FromCell(owner.World, leader.Location), false));
}
else
{
@@ -138,7 +138,8 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
owner.FuzzyStateMachine.ChangeState(owner, new GroundUnitsAttackState(), true);
}
else
owner.Bot.QueueOrder(new Order("AttackMove", null, Target.FromCell(owner.World, owner.TargetActor.Location), false, groupedActors: owner.Units.ToArray()));
foreach (var a in owner.Units)
owner.Bot.QueueOrder(new Order("AttackMove", a, Target.FromCell(owner.World, owner.TargetActor.Location), false));
}
if (ShouldFlee(owner))

View File

@@ -78,7 +78,8 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
if (AttackOrFleeFuzzy.Default.CanAttack(owner.Units, enemyUnits))
{
owner.Bot.QueueOrder(new Order("AttackMove", null, Target.FromCell(owner.World, owner.TargetActor.Location), false, groupedActors: owner.Units.ToArray()));
foreach (var u in owner.Units)
owner.Bot.QueueOrder(new Order("AttackMove", u, Target.FromCell(owner.World, owner.TargetActor.Location), false));
// We have gathered sufficient units. Attack the nearest enemy unit.
owner.FuzzyStateMachine.ChangeState(owner, new NavyUnitsAttackMoveState(), true);
@@ -148,9 +149,8 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
// Since units have different movement speeds, they get separated while approaching the target.
// Let them regroup into tighter formation.
owner.Bot.QueueOrder(new Order("Stop", leader, false));
var units = owner.Units.Where(a => !ownUnits.Contains(a)).ToArray();
owner.Bot.QueueOrder(new Order("AttackMove", null, Target.FromCell(owner.World, leader.Location), false, groupedActors: units));
foreach (var unit in owner.Units.Where(a => !ownUnits.Contains(a)))
owner.Bot.QueueOrder(new Order("AttackMove", unit, Target.FromCell(owner.World, leader.Location), false));
}
else
{
@@ -163,7 +163,8 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
owner.FuzzyStateMachine.ChangeState(owner, new NavyUnitsAttackState(), true);
}
else
owner.Bot.QueueOrder(new Order("AttackMove", null, Target.FromCell(owner.World, owner.TargetActor.Location), false, groupedActors: owner.Units.ToArray()));
foreach (var a in owner.Units)
owner.Bot.QueueOrder(new Order("AttackMove", a, Target.FromCell(owner.World, owner.TargetActor.Location), false));
}
if (ShouldFlee(owner))

View File

@@ -55,7 +55,10 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
Backoff--;
}
else
owner.Bot.QueueOrder(new Order("AttackMove", null, Target.FromCell(owner.World, owner.TargetActor.Location), false, groupedActors: owner.Units.ToArray()));
{
foreach (var a in owner.Units)
owner.Bot.QueueOrder(new Order("AttackMove", a, Target.FromCell(owner.World, owner.TargetActor.Location), false));
}
}
public void Deactivate(Squad owner) { }

View File

@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
// This is important because p may have side-effects that trigger a desync if not
// called on the same exits in the same order!
var all = Exits(actor, productionType)
.OrderByDescending(e => e.Info.Priority)
.OrderBy(e => e.Info.Priority)
.ThenBy(e => (actor.World.Map.CenterOfCell(actor.Location + e.Info.ExitCell) - pos).LengthSquared)
.ToList();

View File

@@ -1,40 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2020 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Modifies the damage applied to this actor based on the owner's handicap.")]
public class HandicapDamageMultiplierInfo : TraitInfo
{
public override object Create(ActorInitializer init) { return new HandicapDamageMultiplier(init.Self); }
}
public class HandicapDamageMultiplier : IDamageModifier
{
readonly Actor self;
public HandicapDamageMultiplier(Actor self)
{
this.self = self;
}
int IDamageModifier.GetDamageModifier(Actor attacker, Damage damage)
{
// Equivalent to the health handicap from C&C3:
// 5% handicap = 95% health = 105% damage
// 50% handicap = 50% health = 200% damage
// 95% handicap = 5% health = 2000% damage
return 10000 / (100 - self.Owner.Handicap);
}
}
}

View File

@@ -1,40 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2020 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Modifies the damage applied by this actor based on the owner's handicap.")]
public class HandicapFirepowerMultiplierInfo : TraitInfo
{
public override object Create(ActorInitializer init) { return new HandicapFirepowerMultiplier(init.Self); }
}
public class HandicapFirepowerMultiplier : IFirepowerModifier
{
readonly Actor self;
public HandicapFirepowerMultiplier(Actor self)
{
this.self = self;
}
int IFirepowerModifier.GetFirepowerModifier()
{
// Equivalent to the firepower handicap from C&C3:
// 5% handicap = 95% firepower
// 50% handicap = 50% firepower
// 95% handicap = 5% firepower
return 100 - self.Owner.Handicap;
}
}
}

View File

@@ -1,32 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2020 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Modifies the production time of this actor based on the producer's handicap.")]
public class HandicapProductionTimeMultiplierInfo : TraitInfo<HandicapProductionTimeMultiplier>, IProductionTimeModifierInfo
{
int IProductionTimeModifierInfo.GetProductionTimeModifier(TechTree techTree, string queue)
{
// Equivalent to the build speed handicap from C&C3:
// 5% handicap = 105% build time
// 50% handicap = 150% build time
// 95% handicap = 195% build time
return 100 + techTree.Owner.Handicap;
}
}
public class HandicapProductionTimeMultiplier { }
}

View File

@@ -412,11 +412,8 @@ namespace OpenRA.Mods.Common.Traits
var hasPlayedSound = false;
BeginProduction(new ProductionItem(this, order.TargetString, cost, playerPower, () => self.World.AddFrameEndTask(_ =>
{
// Make sure the item hasn't been invalidated between the ProductionItem ticking and this FrameEndTask running
if (!Queue.Any(i => i.Done && i.Item == unit.Name))
return;
var isBuilding = unit.HasTraitInfo<BuildingInfo>();
if (isBuilding && !hasPlayedSound)
hasPlayedSound = Game.Sound.PlayNotification(rules, self.Owner, "Speech", Info.ReadyAudio, self.Owner.Faction.InternalName);
else if (!isBuilding)

View File

@@ -106,8 +106,6 @@ namespace OpenRA.Mods.Common.Traits
return ret;
}
public Player Owner { get { return player; } }
class Watcher
{
public readonly string Key;

View File

@@ -29,10 +29,8 @@ namespace OpenRA.Mods.Common.Traits.Render
public readonly string DefaultAttackSequence = null;
[SequenceReference(dictionaryReference: LintDictionaryReference.Values)]
[Desc("Attack sequence to use for each armament.",
"A dictionary of [armament name]: [sequence name(s)].",
"Multiple sequence names can be defined to specify per-burst animations.")]
public readonly Dictionary<string, string[]> AttackSequences = new Dictionary<string, string[]>();
[Desc("Attack sequence to use for each armament.")]
public readonly Dictionary<string, string> AttackSequences = new Dictionary<string, string>();
[SequenceReference]
public readonly string[] IdleSequences = { };
@@ -135,21 +133,11 @@ namespace OpenRA.Mods.Common.Traits.Render
}
}
void Attacking(Actor self, Armament a, Barrel barrel)
public void Attacking(Actor self, in Target target, Armament a)
{
var info = GetDisplayInfo();
var sequence = info.DefaultAttackSequence;
if (info.AttackSequences.TryGetValue(a.Info.Name, out var sequences) && sequences.Length > 0)
{
sequence = sequences[0];
// Find the sequence corresponding to this barrel/burst.
if (barrel != null && sequences.Length > 1)
for (var i = 0; i < sequences.Length; i++)
if (a.Barrels[i] == barrel)
sequence = sequences[i];
}
if (!info.AttackSequences.TryGetValue(a.Info.Name, out var sequence))
sequence = info.DefaultAttackSequence;
if (!string.IsNullOrEmpty(sequence) && DefaultAnimation.HasSequence(NormalizeInfantrySequence(self, sequence)))
{
@@ -160,9 +148,12 @@ namespace OpenRA.Mods.Common.Traits.Render
void INotifyAttack.PreparingAttack(Actor self, in Target target, Armament a, Barrel barrel)
{
// Lambdas can't use 'in' variables, so capture a copy for later
var attackTarget = target;
// HACK: The FrameEndTask makes sure that this runs after Tick(), preventing that from
// overriding the animation when an infantry unit stops to attack
self.World.AddFrameEndTask(_ => Attacking(self, a, barrel));
self.World.AddFrameEndTask(_ => Attacking(self, attackTarget, a));
}
void INotifyAttack.Attacking(Actor self, in Target target, Armament a, Barrel barrel) { }

View File

@@ -137,7 +137,7 @@ namespace OpenRA.Mods.Common.Traits
protected override void Tick(World world)
{
// Cancel the OG if we can't use the power
if (!manager.Powers.TryGetValue(order, out var p) || !p.Active || !p.Ready)
if (!manager.Powers.ContainsKey(order))
world.CancelInputMode();
}

View File

@@ -106,7 +106,7 @@ namespace OpenRA.Mods.Common.Traits
void IOrderGenerator.Tick(World world)
{
// Cancel the OG if we can't use the power
if (!manager.Powers.TryGetValue(order, out var p) || !p.Active || !p.Ready)
if (!manager.Powers.ContainsKey(order))
world.CancelInputMode();
}

View File

@@ -309,7 +309,7 @@ namespace OpenRA.Mods.Common.Traits
protected override void Tick(World world)
{
// Cancel the OG if we can't use the power
if (!manager.Powers.TryGetValue(order, out var p) || !p.Active || !p.Ready)
if (!manager.Powers.ContainsKey(order))
world.CancelInputMode();
}

View File

@@ -64,7 +64,6 @@ namespace OpenRA.Mods.Common.Traits
DisplayFactionId = clientFaction.InternalName,
Color = client.Color,
Team = client.Team,
Handicap = client.Handicap,
SpawnPoint = resolvedSpawnPoint,
IsRandomFaction = clientFaction.RandomFactionMembers.Any(),
IsRandomSpawnPoint = client.SpawnPoint == 0,

View File

@@ -214,10 +214,6 @@ namespace OpenRA.Mods.Common.Traits
if (factionInit != null && factionInit.Value == Owner.Faction)
return false;
var healthInit = init as HealthInit;
if (healthInit != null && healthInit.Value == 100)
return false;
// TODO: Other default values will need to be filtered
// here after we have built a properties panel
return true;

View File

@@ -218,9 +218,6 @@ namespace OpenRA.Mods.Common
if (t.IsGenericType && t.GetGenericTypeDefinition().GetInterfaces().Any(e => e.IsGenericType && e.GetGenericTypeDefinition() == typeof(IEnumerable<>)))
return "Collection of {0}".F(FriendlyTypeName(t.GetGenericArguments().First()));
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable<>))
return "{0} (optional)".F(t.GetGenericArguments().Select(FriendlyTypeName).First());
if (t == typeof(int) || t == typeof(uint))
return "Integer";

View File

@@ -104,6 +104,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
" for (var j = 0; j < ctx.canvas.height / 4; j++)",
" for (var i = j % 2; i < ctx.canvas.width / 4; i += 2)",
" ctx.fillRect(4 * i, 4 * j, 4, 4);",
" ctx.imageSmoothingEnabled = false;",
" ctx.drawImage(image, 0, 0, c.width, c.height);",
" ctx.strokeStyle = \"#ffff00\";",
" ctx.lineWidth = 1;",

View File

@@ -268,8 +268,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
case "delete":
{
// Yaml path may be specified relative to a named directory (e.g. ^SupportDir) or the detected disc path
var sourcePath = i.Value.Value.StartsWith("^") ? Platform.ResolvePath(i.Value.Value) : Path.Combine(path, i.Value.Value);
var sourcePath = Path.Combine(path, i.Value.Value);
// Try as an absolute path
if (!File.Exists(sourcePath))
sourcePath = Platform.ResolvePath(i.Value.Value);
Log.Write("debug", "Deleting {0}", sourcePath);
File.Delete(sourcePath);
@@ -322,8 +325,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
static void ExtractFromPackage(ExtractionType type, string path, MiniYaml actionYaml, List<string> extractedFiles, Action<string> updateMessage)
{
// Yaml path may be specified relative to a named directory (e.g. ^SupportDir) or the detected disc path
var sourcePath = actionYaml.Value.StartsWith("^") ? Platform.ResolvePath(actionYaml.Value) : Path.Combine(path, actionYaml.Value);
var sourcePath = Path.Combine(path, actionYaml.Value);
// Try as an absolute path
if (!File.Exists(sourcePath))
sourcePath = Platform.ResolvePath(actionYaml.Value);
using (var source = File.OpenRead(sourcePath))
{
@@ -378,8 +384,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
static void ExtractFromMSCab(string path, MiniYaml actionYaml, List<string> extractedFiles, Action<string> updateMessage)
{
// Yaml path may be specified relative to a named directory (e.g. ^SupportDir) or the detected disc path
var sourcePath = actionYaml.Value.StartsWith("^") ? Platform.ResolvePath(actionYaml.Value) : Path.Combine(path, actionYaml.Value);
var sourcePath = Path.Combine(path, actionYaml.Value);
// Try as an absolute path
if (!File.Exists(sourcePath))
sourcePath = Platform.ResolvePath(actionYaml.Value);
using (var source = File.OpenRead(sourcePath))
{
@@ -409,8 +418,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
static void ExtractFromISCab(string path, MiniYaml actionYaml, List<string> extractedFiles, Action<string> updateMessage)
{
// Yaml path may be specified relative to a named directory (e.g. ^SupportDir) or the detected disc path
var sourcePath = actionYaml.Value.StartsWith("^") ? Platform.ResolvePath(actionYaml.Value) : Path.Combine(path, actionYaml.Value);
var sourcePath = Path.Combine(path, actionYaml.Value);
// Try as an absolute path
if (!File.Exists(sourcePath))
sourcePath = Platform.ResolvePath(actionYaml.Value);
var volumeNode = actionYaml.Nodes.FirstOrDefault(n => n.Key == "Volumes");
if (volumeNode == null)

View File

@@ -624,7 +624,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
LobbyUtils.SetupEditableColorWidget(template, slot, client, orderManager, shellmapWorld, colorPreview);
LobbyUtils.SetupEditableFactionWidget(template, slot, client, orderManager, factions);
LobbyUtils.SetupEditableTeamWidget(template, slot, client, orderManager, map);
LobbyUtils.SetupEditableHandicapWidget(template, slot, client, orderManager, map);
LobbyUtils.SetupEditableSpawnWidget(template, slot, client, orderManager, map);
LobbyUtils.SetupEditableReadyWidget(template, slot, client, orderManager, map);
}
@@ -641,7 +640,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (isHost)
{
LobbyUtils.SetupEditableTeamWidget(template, slot, client, orderManager, map);
LobbyUtils.SetupEditableHandicapWidget(template, slot, client, orderManager, map);
LobbyUtils.SetupEditableSpawnWidget(template, slot, client, orderManager, map);
LobbyUtils.SetupPlayerActionWidget(template, slot, client, orderManager, worldRenderer,
lobby, () => panel = PanelType.Kick, () => panel = PanelType.Players);
@@ -650,7 +648,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
LobbyUtils.SetupNameWidget(template, slot, client, orderManager, worldRenderer);
LobbyUtils.SetupTeamWidget(template, slot, client);
LobbyUtils.SetupHandicapWidget(template, slot, client);
LobbyUtils.SetupSpawnWidget(template, slot, client);
}
@@ -755,6 +752,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
void UpdateDiscordStatus()
{
var mapTitle = map.Title;
var numberOfPlayers = 0;
var slots = 0;
@@ -773,11 +771,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
}
// Add extra slots to keep the join button active for spectators
if (numberOfPlayers == slots && orderManager.LobbyInfo.GlobalSettings.AllowSpectators)
slots = numberOfPlayers + 1;
var details = map.Title + " - " + orderManager.LobbyInfo.GlobalSettings.ServerName;
if (updateDiscordStatus)
{
string secret = null;
@@ -788,8 +781,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
var state = skirmishMode ? DiscordState.InSkirmishLobby : DiscordState.InMultiplayerLobby;
DiscordService.UpdateStatus(state, mapTitle, secret, numberOfPlayers, slots);
DiscordService.UpdateStatus(state, details, secret, numberOfPlayers, slots);
updateDiscordStatus = false;
}
else
@@ -797,7 +790,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (!skirmishMode)
DiscordService.UpdatePlayers(numberOfPlayers, slots);
DiscordService.UpdateDetails(details);
DiscordService.UpdateDetails(mapTitle);
}
}
@@ -813,8 +806,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
Ui.CloseWindow();
var state = skirmishMode ? DiscordState.PlayingSkirmish : DiscordState.PlayingMultiplayer;
var details = map.Title + " - " + orderManager.LobbyInfo.GlobalSettings.ServerName;
DiscordService.UpdateStatus(state, details);
DiscordService.UpdateStatus(state);
onStart();
}

View File

@@ -146,25 +146,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
dropdown.ShowDropDown("TEAM_DROPDOWN_TEMPLATE", 150, options, setupItem);
}
public static void ShowHandicapDropDown(DropDownButtonWidget dropdown, Session.Client client,
OrderManager orderManager)
{
Func<int, ScrollItemWidget, ScrollItemWidget> setupItem = (ii, itemTemplate) =>
{
var item = ScrollItemWidget.Setup(itemTemplate,
() => client.Handicap == ii,
() => orderManager.IssueOrder(Order.Command("handicap {0} {1}".F(client.Index, ii))));
var label = "{0}%".F(ii);
item.Get<LabelWidget>("LABEL").GetText = () => label;
return item;
};
// Handicaps may be set between 0 - 95% in steps of 5%
var options = Enumerable.Range(0, 20).Select(i => 5 * i);
dropdown.ShowDropDown("TEAM_DROPDOWN_TEMPLATE", 150, options, setupItem);
}
public static void ShowSpawnDropDown(DropDownButtonWidget dropdown, Session.Client client,
OrderManager orderManager, IEnumerable<int> spawnPoints)
{
@@ -581,29 +562,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
HideChildWidget(parent, "TEAM_DROPDOWN");
}
public static void SetupEditableHandicapWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager, MapPreview map)
{
var dropdown = parent.Get<DropDownButtonWidget>("HANDICAP_DROPDOWN");
dropdown.IsVisible = () => true;
dropdown.IsDisabled = () => s.LockTeam || orderManager.LocalClient.IsReady;
dropdown.OnMouseDown = _ => ShowHandicapDropDown(dropdown, c, orderManager);
var handicapLabel = new CachedTransform<int, string>(h => "{0}%".F(h));
dropdown.GetText = () => handicapLabel.Update(c.Handicap);
HideChildWidget(parent, "HANDICAP");
}
public static void SetupHandicapWidget(Widget parent, Session.Slot s, Session.Client c)
{
var team = parent.Get<LabelWidget>("HANDICAP");
team.IsVisible = () => true;
var handicapLabel = new CachedTransform<int, string>(h => "{0}%".F(h));
team.GetText = () => handicapLabel.Update(c.Handicap);
HideChildWidget(parent, "HANDICAP_DROPDOWN");
}
public static void SetupEditableSpawnWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager, MapPreview map)
{
var dropdown = parent.Get<DropDownButtonWidget>("SPAWN_DROPDOWN");

View File

@@ -43,12 +43,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
this.modData = modData;
this.onSelect = onSelect;
var approving = new Action(() =>
{
Ui.CloseWindow();
onSelect?.Invoke(selectedUid);
});
var approving = new Action(() => { Ui.CloseWindow(); onSelect(selectedUid); });
var canceling = new Action(() => { Ui.CloseWindow(); onExit(); });
var okButton = widget.Get<ButtonWidget>("BUTTON_OK");

View File

@@ -334,24 +334,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic
List<GameServer> games = null;
if (i.Error == null)
{
games = new List<GameServer>();
try
{
var data = Encoding.UTF8.GetString(i.Result);
var yaml = MiniYaml.FromString(data);
foreach (var node in yaml)
{
try
{
var gs = new GameServer(node.Value);
if (gs.Address != null)
games.Add(gs);
}
catch
{
// Ignore any invalid games advertised.
}
}
games = yaml.Select(a => new GameServer(a.Value))
.Where(gs => gs.Address != null)
.ToList();
}
catch
{

View File

@@ -246,8 +246,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
BindCheckboxPref(panel, "FRAME_LIMIT_CHECKBOX", ds, "CapFramerate");
BindIntSliderPref(panel, "FRAME_LIMIT_SLIDER", ds, "MaxFramerate");
BindCheckboxPref(panel, "PLAYER_STANCE_COLORS_CHECKBOX", gs, "UsePlayerStanceColors");
if (panel.GetOrNull<CheckboxWidget>("PAUSE_SHELLMAP_CHECKBOX") != null)
BindCheckboxPref(panel, "PAUSE_SHELLMAP_CHECKBOX", gs, "PauseShellmap");
var languageDropDownButton = panel.GetOrNull<DropDownButtonWidget>("LANGUAGE_DROPDOWNBUTTON");
if (languageDropDownButton != null)

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<LangVersion>7.3</LangVersion>
@@ -11,6 +11,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<IsPublishable Condition="'$(CopyD2kDll)' == 'False'">false</IsPublishable>
</PropertyGroup>
<ItemGroup>
<!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
@@ -37,4 +38,4 @@
<Analyzer Remove="@(Analyzer)" />
</ItemGroup>
</Target>
</Project>
</Project>

View File

@@ -86,8 +86,7 @@ namespace OpenRA.Mods.D2k.Traits.Buildings
// Fill the footprint with random variants
foreach (var c in info.Tiles(self.Location))
{
// Only place on allowed terrain types
if (!map.Contains(c) || map.CustomTerrain[c] != byte.MaxValue || !info.TerrainTypes.Contains(map.GetTerrainInfo(c).Type))
if (!map.Contains(c) || map.CustomTerrain[c] != byte.MaxValue)
continue;
// Don't place under other buildings (or their bib)
@@ -103,9 +102,7 @@ namespace OpenRA.Mods.D2k.Traits.Buildings
for (var i = 0; i < template.TilesCount; i++)
{
var c = self.Location + new CVec(i % template.Size.X, i / template.Size.X);
// Only place on allowed terrain types
if (!map.Contains(c) || map.CustomTerrain[c] != byte.MaxValue || !info.TerrainTypes.Contains(map.GetTerrainInfo(c).Type))
if (!map.Contains(c) || map.CustomTerrain[c] != byte.MaxValue)
continue;
// Don't place under other buildings (or their bib)

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<LangVersion>7.3</LangVersion>
@@ -11,6 +11,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup>
<TargetPlatform Condition="$([MSBuild]::IsOsPlatform('Windows'))">win-x64</TargetPlatform>

View File

@@ -59,7 +59,6 @@ namespace OpenRA.Platforms.Default
Name = "ThreadedGraphicsContext RenderThread",
IsBackground = true
};
renderThread.SetApartmentState(ApartmentState.STA);
lock (syncObject)
{
// Start and wait for the rendering thread to have initialized before returning.

View File

@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<TargetFramework Condition="'$(Mono)' == ''">net5.0</TargetFramework>
<TargetFramework Condition="'$(Mono)' != ''">netstandard2.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<UseVSHostingProcess>false</UseVSHostingProcess>

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>7.3</LangVersion>
<DebugSymbols>true</DebugSymbols>
@@ -10,6 +10,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<IsPublishable>false</IsPublishable>
</PropertyGroup>
<ItemGroup>
<!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
@@ -22,14 +23,12 @@
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj" />
<ProjectReference Include="..\OpenRA.Mods.Common\OpenRA.Mods.Common.csproj">
<Private>False</Private>
<Private>True</Private>
</ProjectReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit.Console" Version="3.11.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0-beta.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
@@ -40,4 +39,4 @@
<Analyzer Remove="@(Analyzer)" />
</ItemGroup>
</Target>
</Project>
</Project>

View File

@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<TargetFramework Condition="'$(Mono)' == ''">net5.0</TargetFramework>
<TargetFramework Condition="'$(Mono)' != ''">netstandard2.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<UseVSHostingProcess>false</UseVSHostingProcess>

View File

@@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>winexe</OutputType>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<ApplicationIcon>$(LauncherIcon)</ApplicationIcon>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -10,14 +12,12 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<OutputPath>../bin</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<PlatformTarget>AnyCPU</PlatformTarget>
<ExternalConsole>false</ExternalConsole>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<Configurations>Release;Debug</Configurations>
<AssemblyName>$(LauncherName)</AssemblyName>
<ApplicationIcon>$(LauncherIcon)</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
@@ -47,7 +47,7 @@
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenRA-SDL2-CS" Version="1.0.28" />
<PackageReference Include="OpenRA-SDL2-CS" Version="1.0.27" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj" />

View File

@@ -58,9 +58,7 @@ Global
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release|Any CPU.Build.0 = Release|Any CPU
{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}.Release|Any CPU.Build.0 = Release|Any CPU
{54DAE0E0-3125-49D3-992E-A0E931EB5FC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54DAE0E0-3125-49D3-992E-A0E931EB5FC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54DAE0E0-3125-49D3-992E-A0E931EB5FC8}.Release|Any CPU.ActiveCfg = Release|Any CPU

View File

@@ -25,7 +25,7 @@ ShareAnonymizedIPs="${ShareAnonymizedIPs:-"True"}"
SupportDir="${SupportDir:-""}"
while true; do
mono --debug bin/OpenRA.Server.exe Engine.EngineDir=".." Game.Mod="$Mod" \
mono --debug bin/OpenRA.Server.dll Engine.EngineDir=".." Game.Mod="$Mod" \
Server.Name="$Name" \
Server.ListenPort="$ListenPort" \
Server.AdvertiseOnline="$AdvertiseOnline" \

View File

@@ -25,7 +25,7 @@ then
fi
# Launch the engine with the appropriate arguments
mono bin/OpenRA.exe Engine.EngineDir=".." Engine.LaunchPath="$MODLAUNCHER" $MODARG "$@"
mono --debug bin/OpenRA.dll Engine.EngineDir=".." Engine.LaunchPath="$MODLAUNCHER" $MODARG "$@"
# Show a crash dialog if something went wrong
if [ $? != 0 ] && [ $? != 1 ]; then

View File

@@ -10,7 +10,7 @@ function All-Command
return
}
dotnet build /p:Configuration=Release /nologo
dotnet build -c Release --nologo -p:TargetPlatform=win-x64
if ($lastexitcode -ne 0)
{
Write-Host "Build failed. If just the development tools failed to build, try installing Visual Studio. You may also still be able to run the game." -ForegroundColor Red
@@ -24,8 +24,7 @@ function All-Command
{
echo "Downloading IP2Location GeoIP database."
$target = Join-Path $pwd.ToString() "IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP"
[Net.ServicePointManager]::SecurityProtocol = 'Tls12'
(New-Object System.Net.WebClient).DownloadFile("https://github.com/OpenRA/GeoIP-Database/releases/download/monthly/IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP", $target)
(New-Object System.Net.WebClient).DownloadFile("https://download.ip2location.com/lite/IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP", $target)
}
}
@@ -37,8 +36,9 @@ function Clean-Command
}
dotnet clean /nologo
Remove-Item ./bin -Recurse -ErrorAction Ignore
Remove-Item ./*/obj -Recurse -ErrorAction Ignore
rm ./bin -r
rm ./*/bin -r
rm ./*/obj -r
Write-Host "Clean complete." -ForegroundColor Green
}
@@ -99,19 +99,19 @@ function Test-Command
Write-Host "Testing mods..." -ForegroundColor Cyan
Write-Host "Testing Tiberian Sun mod MiniYAML..." -ForegroundColor Cyan
InvokeCommand "$utilityPath ts --check-yaml"
Invoke-Expression "$utilityPath ts --check-yaml"
Write-Host "Testing Dune 2000 mod MiniYAML..." -ForegroundColor Cyan
InvokeCommand "$utilityPath d2k --check-yaml"
Invoke-Expression "$utilityPath d2k --check-yaml"
Write-Host "Testing Tiberian Dawn mod MiniYAML..." -ForegroundColor Cyan
InvokeCommand "$utilityPath cnc --check-yaml"
Invoke-Expression "$utilityPath cnc --check-yaml"
Write-Host "Testing Red Alert mod MiniYAML..." -ForegroundColor Cyan
InvokeCommand "$utilityPath ra --check-yaml"
Invoke-Expression "$utilityPath ra --check-yaml"
}
function Check-Command
{
Write-Host "Compiling in debug configuration..." -ForegroundColor Cyan
dotnet build /p:Configuration=Debug /nologo
dotnet build -c Debug --nologo -p:TargetPlatform=win-x64
if ($lastexitcode -ne 0)
{
Write-Host "Build failed." -ForegroundColor Red
@@ -120,10 +120,10 @@ function Check-Command
if ((CheckForUtility) -eq 0)
{
Write-Host "Checking for explicit interface violations..." -ForegroundColor Cyan
InvokeCommand "$utilityPath all --check-explicit-interfaces"
Invoke-Expression "$utilityPath all --check-explicit-interfaces"
Write-Host "Checking for incorrect conditional trait interface overrides..." -ForegroundColor Cyan
InvokeCommand "$utilityPath all --check-conditional-trait-interface-overrides"
Invoke-Expression "$utilityPath all --check-conditional-trait-interface-overrides"
}
}
@@ -152,6 +152,20 @@ function Check-Scripts-Command
}
}
function Docs-Command
{
if ((CheckForUtility) -eq 1)
{
return
}
./make.ps1 version
Invoke-Expression "$utilityPath all --docs" | Out-File -Encoding "UTF8" DOCUMENTATION.md
Invoke-Expression "$utilityPath all --weapon-docs" | Out-File -Encoding "UTF8" WEAPONS.md
Invoke-Expression "$utilityPath all --lua-docs" | Out-File -Encoding "UTF8" Lua-API.md
Invoke-Expression "$utilityPath all --settings-docs" | Out-File -Encoding "UTF8" Settings.md
}
function CheckForUtility
{
if (Test-Path $utilityPath)
@@ -187,20 +201,6 @@ function WaitForInput
}
}
function InvokeCommand
{
param($expression)
# $? is the return value of the called expression
# Invoke-Expression itself will always succeed, even if the invoked expression fails
# So temporarily store the return value in $success
$expression += '; $success = $?'
Invoke-Expression $expression
if ($success -eq $False)
{
exit 1
}
}
###############################################################
############################ Main #############################
###############################################################
@@ -223,6 +223,7 @@ if ($args.Length -eq 0)
Write-Host " test, t Tests the default mods for errors."
Write-Host " check, ck Checks .cs files for StyleCop violations."
Write-Host " check-scripts, cs Checks .lua files for syntax errors."
Write-Host " docs Generates the trait and Lua API documentation."
Write-Host ""
$command = (Read-Host "Enter command").Split(' ', 2)
}
@@ -248,6 +249,7 @@ switch ($execute)
{"test", "t" -contains $_} { Test-Command }
{"check", "ck" -contains $_} { Check-Command }
{"check-scripts", "cs" -contains $_} { Check-Scripts-Command }
"docs" { Docs-Command }
Default { Write-Host ("Invalid command '{0}'" -f $command) }
}

View File

@@ -366,23 +366,18 @@ scrollpanel-decorations:
Inherits: ^Chrome
Regions:
down: 836, 17, 16, 16
down-pressed: 836, 17, 16, 16
down-disabled: 853, 17, 16, 16
up: 870, 17, 16, 16
up-pressed: 870, 17, 16, 16
up-disabled: 887, 17, 16, 16
right: 904, 17, 16, 16
right-pressed: 904, 17, 16, 16
right-disabled: 921, 17, 16, 16
left: 938, 17, 16, 16
left-pressed: 938, 17, 16, 16
left-disabled: 955, 17, 16, 16
dropdown-decorations:
Inherits: ^Chrome
Regions:
marker: 836, 17, 16, 16
marker-pressed: 836, 17, 16, 16
marker-disabled: 853, 17, 16, 16
dropdown-separators:

View File

@@ -20,13 +20,12 @@ Container@LOBBY_MUSIC_BIN:
Height: 25
Text: Track
Font: Bold
Label@LENGTH:
X: PARENT_RIGHT - 80
Label@TYPE:
X: PARENT_RIGHT - 63
Height: 25
Width: 50
Text: Length
Font: Bold
Align: Right
Background@CONTROLS:
Background: panel-transparent
Width: 308

View File

@@ -23,21 +23,21 @@ Container@LOBBY_OPTIONS_BIN:
Height: 34
Children:
Checkbox@A:
Width: 220
Width: 175
Height: 20
Font: Regular
Visible: False
TooltipContainer: TOOLTIP_CONTAINER
Checkbox@B:
X: 225
Width: 220
X: 195
Width: 175
Height: 20
Font: Regular
Visible: False
TooltipContainer: TOOLTIP_CONTAINER
Checkbox@C:
X: 450
Width: 190
X: 375
Width: 175
Height: 20
Font: Regular
Visible: False
@@ -47,26 +47,26 @@ Container@LOBBY_OPTIONS_BIN:
Width: PARENT_RIGHT
Children:
Label@A_DESC:
Width: 140
Width: 80
Height: 25
Align: Right
Visible: False
DropDownButton@A:
X: 145
Width: 180
X: 85
Width: 160
Height: 25
Font: Regular
Visible: False
TooltipContainer: TOOLTIP_CONTAINER
Label@B_DESC:
X: PARENT_RIGHT - WIDTH - 203
Width: 140
X: PARENT_RIGHT - WIDTH - 183
Width: 160
Height: 25
Align: Right
Visible: False
DropDownButton@B:
X: PARENT_RIGHT - WIDTH - 18
Width: 180
Width: 160
Height: 25
Font: Regular
Visible: False

View File

@@ -16,41 +16,34 @@ Container@LOBBY_PLAYER_BIN:
Font: Bold
Label@COLOR:
X: 210
Width: 94
Width: 76
Height: 25
Text: Color
Align: Center
Font: Bold
Label@FACTION:
X: 309
X: 291
Width: 120
Height: 25
Text: Faction
Align: Center
Font: Bold
Label@TEAM:
X: 460-25
X: 416
Width: 50
Height: 25
Text: Team
Align: Center
Font: Bold
Label@HANDICAP:
X: 491
Width: 75
Height: 25
Text: Handicap
Align: Center
Font: Bold
Label@SPAWN:
X: 571
X: 471
Width: 50
Height: 25
Text: Spawn
Align: Left
Font: Bold
Label@STATUS:
X: 627
X: 527
Width: 20
Height: 25
Text: Ready
@@ -115,7 +108,7 @@ Container@LOBBY_PLAYER_BIN:
Visible: false
DropDownButton@COLOR:
X: 210
Width: 94
Width: 76
Height: 25
Font: Regular
IgnoreChildMouseOver: true
@@ -126,7 +119,7 @@ Container@LOBBY_PLAYER_BIN:
Width: PARENT_RIGHT - 35
Height: PARENT_BOTTOM - 12
DropDownButton@FACTION:
X: 309
X: 291
Width: 120
Height: 25
Font: Regular
@@ -145,24 +138,17 @@ Container@LOBBY_PLAYER_BIN:
Height: 25
Text: Faction
DropDownButton@TEAM_DROPDOWN:
X: 435
X: 416
Width: 50
Height: 25
Font: Regular
DropDownButton@HANDICAP_DROPDOWN:
X: 491
Width: 75
Height: 25
Font: Regular
TooltipContainer: TOOLTIP_CONTAINER
TooltipText: A handicap decreases the combat effectiveness of the player's forces
DropDownButton@SPAWN_DROPDOWN:
X: 571
X: 471
Width: 50
Height: 25
Font: Regular
Image@STATUS_IMAGE:
X: 629
X: 529
Y: 4
Width: 20
Height: 20
@@ -170,7 +156,7 @@ Container@LOBBY_PLAYER_BIN:
ImageName: checked
Visible: false
Checkbox@STATUS_CHECKBOX:
X: 627
X: 527
Y: 2
Width: 20
Height: 20
@@ -238,10 +224,10 @@ Container@LOBBY_PLAYER_BIN:
ColorBlock@COLORBLOCK:
X: 215
Y: 6
Width: 59
Width: 41
Height: 13
Container@FACTION:
X: 309
X: 291
Width: 120
Height: 25
Children:
@@ -256,41 +242,29 @@ Container@LOBBY_PLAYER_BIN:
Height: 25
Text: Faction
Label@TEAM:
X: 435
X: 416
Width: 25
Height: 25
Align: Center
Label@SPAWN:
X: 471
Width: 25
Height: 25
Align: Center
DropDownButton@TEAM_DROPDOWN:
X: 435
X: 416
Width: 50
Height: 25
Font: Regular
Visible: false
Label@HANDICAP:
X: 491
Width: 50
Height: 25
Align: Center
DropDownButton@HANDICAP_DROPDOWN:
X: 491
Width: 75
Height: 25
Font: Regular
TooltipContainer: TOOLTIP_CONTAINER
TooltipText: A handicap decreases the combat effectiveness of the player's forces
Label@SPAWN:
X: 571
Width: 25
Height: 25
Align: Center
DropDownButton@SPAWN_DROPDOWN:
X: 571
X: 471
Width: 50
Height: 25
Font: Regular
Visible: false
Image@STATUS_IMAGE:
X: 629
X: 529
Y: 4
Width: 20
Height: 20
@@ -317,7 +291,7 @@ Container@LOBBY_PLAYER_BIN:
Visible: false
Button@JOIN:
X: 210
Width: 438
Width: 338
Height: 25
Text: Play in this slot
Font: Regular
@@ -366,13 +340,13 @@ Container@LOBBY_PLAYER_BIN:
Template: ANONYMOUS_PLAYER_TOOLTIP
Label@SPECTATOR:
X: 210
Width: 441
Width: 341
Height: 25
Text: Spectator
Align: Center
Font: Bold
Image@STATUS_IMAGE:
X: 629
X: 529
Y: 4
Width: 20
Height: 20
@@ -380,7 +354,7 @@ Container@LOBBY_PLAYER_BIN:
ImageName: checked
Visible: false
Checkbox@STATUS_CHECKBOX:
X: 627
X: 527
Y: 2
Width: 20
Height: 20
@@ -447,13 +421,13 @@ Container@LOBBY_PLAYER_BIN:
Template: ANONYMOUS_PLAYER_TOOLTIP
Label@SPECTATOR:
X: 210
Width: 441
Width: 341
Height: 25
Text: Spectator
Align: Center
Font: Bold
Image@STATUS_IMAGE:
X: 627
X: 527
Y: 4
Width: 20
Height: 20
@@ -474,7 +448,7 @@ Container@LOBBY_PLAYER_BIN:
Text: Allow Spectators?
Button@SPECTATE:
X: 210
Width: 438
Width: 338
Height: 25
Text: Spectate
Font: Regular

View File

@@ -9,32 +9,32 @@ Container@LOBBY_SERVERS_BIN:
Children:
Label@NAME:
X: 5
Width: 355
Width: 255
Height: 25
Text: Server
Align: Center
Font: Bold
Label@PLAYERS:
X: 390
X: 290
Width: 85
Height: 25
Text: Players
Font: Bold
Label@LOCATION:
X: 480
X: 380
Width: 110
Height: 25
Text: Location
Font: Bold
Label@STATUS:
X: 595
X: 495
Width: 50
Height: 25
Text: Status
Font: Bold
LogicTicker@NOTICE_WATCHER:
Container@NOTICE_CONTAINER:
Width: PARENT_RIGHT
Width: 582
Height: 19
Children:
Background@bg:
@@ -87,12 +87,12 @@ Container@LOBBY_SERVERS_BIN:
Children:
LabelWithTooltip@TITLE:
X: 5
Width: 345
Width: 245
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Image@PASSWORD_PROTECTED:
X: 372
X: 272
Y: 6
Width: 12
Height: 13
@@ -101,7 +101,7 @@ Container@LOBBY_SERVERS_BIN:
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires Password
Image@REQUIRES_AUTHENTICATION:
X: 372
X: 272
Y: 6
Width: 12
Height: 13
@@ -110,17 +110,17 @@ Container@LOBBY_SERVERS_BIN:
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires OpenRA forum account
LabelWithTooltip@PLAYERS:
X: 390
X: 290
Width: 85
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Label@LOCATION:
X: 480
X: 380
Width: 110
Height: 25
Label@STATUS:
X: 595
X: 495
Width: 50
Height: 25
Label@PROGRESS_LABEL:
@@ -132,12 +132,12 @@ Container@LOBBY_SERVERS_BIN:
Visible: false
DropDownButton@FILTERS_DROPDOWNBUTTON:
Y: PARENT_BOTTOM + 5
Width: 180
Width: 151
Height: 25
Text: Filter Games
Font: Bold
Button@RELOAD_BUTTON:
X: 185
X: 156
Y: PARENT_BOTTOM + 5
Width: 26
Height: 25

View File

@@ -2,7 +2,7 @@ Container@SERVER_LOBBY:
Logic: LobbyLogic
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - 560) / 2
Width: 900
Width: 800
Height: 575
Children:
ColorPreviewManager@COLOR_MANAGER:
@@ -25,57 +25,55 @@ Container@SERVER_LOBBY:
DropDownButton@SLOTS_DROPDOWNBUTTON:
X: 15
Y: 254
Width: 211
Width: 182
Height: 25
Text: Slot Admin
Container@SKIRMISH_TABS:
X: 697 - WIDTH
Width: 465
Visible: False
Children:
Button@PLAYERS_TAB:
X: 202
Y: 248
Width: 151
Width: 129
Height: 31
Text: Players
Button@OPTIONS_TAB:
X: 157
X: 336
Y: 248
Width: 151
Width: 128
Height: 31
Text: Options
Button@MUSIC_TAB:
X: 314
X: 469
Y: 248
Width: 151
Width: 128
Height: 31
Text: Music
Container@MULTIPLAYER_TABS:
X: 697 - WIDTH
Width: 465
Visible: False
Children:
Button@PLAYERS_TAB:
X: 202
Y: 248
Width: 112
Width: 95
Height: 31
Text: Players
Button@OPTIONS_TAB:
X: 118
X: 302
Y: 248
Width: 112
Width: 95
Height: 31
Text: Options
Button@MUSIC_TAB:
X: 236
X: 402
Y: 248
Width: 112
Width: 95
Height: 31
Text: Music
Button@SERVERS_TAB:
X: 354
X: 502
Y: 248
Width: 111
Width: 95
Height: 31
Text: Servers
Button@CHANGEMAP_BUTTON:
@@ -87,7 +85,7 @@ Container@SERVER_LOBBY:
Container@TOP_PANELS_ROOT:
X: 15
Y: 30
Width: 682
Width: 582
Height: 219
Container@LOBBYCHAT:
X: 15

View File

@@ -2,7 +2,7 @@ Container@MAPCHOOSER_PANEL:
Logic: MapChooserLogic
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - 560) / 2
Width: 900
Width: 800
Height: 575
Children:
Label@TITLE:
@@ -64,7 +64,7 @@ Container@MAPCHOOSER_PANEL:
ScrollPanel@MAP_LIST:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
ItemSpacing: 1
Children:
Container@USER_MAPS_TAB:
X: 15
Y: 45
@@ -74,18 +74,18 @@ Container@MAPCHOOSER_PANEL:
ScrollPanel@MAP_LIST:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
ItemSpacing: 1
Children:
ScrollItem@MAP_TEMPLATE:
Width: 210
Height: 262
X: 1
Width: 183
Height: 232
X: 2
Visible: false
Children:
MapPreview@PREVIEW:
X: (PARENT_RIGHT - WIDTH) / 2
Y: 3
Width: 204
Height: 204
Y: 4
Width: 173
Height: 173
IgnoreMouseOver: true
IgnoreMouseInput: true
Label@TITLE:

View File

@@ -2,7 +2,7 @@ Container@MULTIPLAYER_PANEL:
Logic: MultiplayerLogic
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - 560) / 2
Width: 900
Width: 800
Height: 575
Children:
Label@TITLE:
@@ -25,25 +25,25 @@ Container@MULTIPLAYER_PANEL:
Children:
Label@NAME:
X: 5
Width: 355
Width: 255
Height: 25
Text: Server
Align: Center
Font: Bold
Label@PLAYERS:
X: 390
X: 290
Width: 85
Height: 25
Text: Players
Font: Bold
Label@LOCATION:
X: 480
X: 380
Width: 110
Height: 25
Text: Location
Font: Bold
Label@STATUS:
X: 595
X: 495
Width: 50
Height: 25
Text: Status
@@ -52,7 +52,7 @@ Container@MULTIPLAYER_PANEL:
Container@NOTICE_CONTAINER:
X: 15
Y: 30
Width: 682
Width: 582
Height: 19
Children:
Background@bg:
@@ -84,7 +84,7 @@ Container@MULTIPLAYER_PANEL:
ScrollPanel@SERVER_LIST:
X: 15
Y: 30
Width: 682
Width: 582
Height: PARENT_BOTTOM - 75
TopBottomSpacing: 2
Children:
@@ -107,12 +107,12 @@ Container@MULTIPLAYER_PANEL:
Children:
LabelWithTooltip@TITLE:
X: 5
Width: 345
Width: 245
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Image@PASSWORD_PROTECTED:
X: 372
X: 272
Y: 6
Width: 12
Height: 13
@@ -121,7 +121,7 @@ Container@MULTIPLAYER_PANEL:
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires Password
Image@REQUIRES_AUTHENTICATION:
X: 372
X: 272
Y: 6
Width: 12
Height: 13
@@ -130,23 +130,23 @@ Container@MULTIPLAYER_PANEL:
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires OpenRA forum account
LabelWithTooltip@PLAYERS:
X: 390
X: 290
Width: 85
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Label@LOCATION:
X: 480
X: 380
Width: 110
Height: 25
Label@STATUS:
X: 595
X: 495
Width: 50
Height: 25
Label@PROGRESS_LABEL:
X: 15
Y: 31 + (PARENT_BOTTOM - 75 - HEIGHT) / 2
Width: 682
Width: 582
Height: 25
Font: Bold
Align: Center
@@ -231,20 +231,20 @@ Container@MULTIPLAYER_PANEL:
Children:
LogicTicker@ANIMATION:
Label@PLAYER_COUNT:
X: 248
X: 198
Y: PARENT_BOTTOM - 40
Width: 189
Height: 25
Align: Center
Font: Bold
Button@DIRECTCONNECT_BUTTON:
X: 487
X: 387
Y: PARENT_BOTTOM - 40
Width: 100
Height: 25
Text: Direct IP
Button@CREATE_BUTTON:
X: 592
X: 492
Y: PARENT_BOTTOM - 40
Width: 105
Height: 25

View File

@@ -552,7 +552,7 @@ Actors:
Health: 99
Actor171: hosp
Location: 55,28
Owner: GDI
Owner: Civilians
Actor172: mtnk
Location: 51,40
Owner: GDI

View File

@@ -67,7 +67,7 @@ HELI:
TurnSpeed: 28
Speed: 180
Health:
HP: 12500
HP: 12000
Armor:
Type: Light
RevealsShroud:

View File

@@ -187,11 +187,6 @@
AttackMove:
AssaultMoveCondition: assault-move
^PlayerHandicaps:
HandicapFirepowerMultiplier:
HandicapDamageMultiplier:
HandicapProductionTimeMultiplier:
^AcceptsCloakCrate:
Cloak:
InitialDelay: 15
@@ -229,7 +224,6 @@
Inherits@1: ^ExistsInWorld
Inherits@3: ^ClassicFacingSpriteActor
Inherits@selection: ^SelectableCombatUnit
Inherits@handicaps: ^PlayerHandicaps
Huntable:
OwnerLostAction:
Action: Kill
@@ -275,7 +269,6 @@
Inherits@1: ^ExistsInWorld
Inherits@3: ^ClassicFacingSpriteActor
Inherits@selection: ^SelectableCombatUnit
Inherits@handicaps: ^PlayerHandicaps
Huntable:
OwnerLostAction:
Action: Kill
@@ -330,7 +323,6 @@
Inherits@1: ^ExistsInWorld
Inherits@3: ^SpriteActor
Inherits@selection: ^SelectableCombatUnit
Inherits@handicaps: ^PlayerHandicaps
Huntable:
OwnerLostAction:
Action: Kill
@@ -500,7 +492,6 @@
Inherits@2: ^SpriteActor
Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
Inherits@selection: ^SelectableCombatUnit
Inherits@handicaps: ^PlayerHandicaps
Huntable:
OwnerLostAction:
Action: Kill
@@ -555,12 +546,11 @@
Inherits@2: ^SpriteActor
Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
Inherits@selection: ^SelectableCombatUnit
Inherits@handicaps: ^PlayerHandicaps
Huntable:
Health:
HP: 40000
HP: 30000
Armor:
Type: Light
Type: Wood
RevealsShroud:
Range: 6c0
Mobile:
@@ -611,7 +601,6 @@
^Plane:
Inherits@1: ^ExistsInWorld
Inherits@2: ^ClassicFacingSpriteActor
Inherits@handicaps: ^PlayerHandicaps
Huntable:
OwnerLostAction:
Action: Kill
@@ -637,7 +626,6 @@
Inherits@1: ^ExistsInWorld
Inherits@3: ^SpriteActor
Inherits@selection: ^SelectableCombatUnit
Inherits@handicaps: ^PlayerHandicaps
Huntable:
OwnerLostAction:
Action: Kill
@@ -665,7 +653,6 @@
Inherits@2: ^SpriteActor
Inherits@shape: ^1x1Shape
Inherits@selection: ^SelectableBuilding
Inherits@handicaps: ^PlayerHandicaps
Huntable:
OwnerLostAction:
Action: Kill
@@ -681,8 +668,8 @@
ActorPreviewPlaceBuildingPreview:
OverridePalette: placebuilding
SoundOnDamageTransition:
DamagedSounds: xplobig4.aud
DestroyedSounds: crumble.aud, xplobig4.aud
DamagedSounds: xplos.aud
DestroyedSounds: crumble.aud
WithSpriteBody:
Explodes:
Type: Footprint
@@ -1005,9 +992,9 @@
Inherits@1: ^ClassicFacingSpriteActor
Interactable:
Health:
HP: 28000
HP: 14000
Armor:
Type: Heavy
Type: Light
HiddenUnderFog:
Type: CenterPosition
AlwaysVisibleRelationships: None
@@ -1042,14 +1029,14 @@
Sequence: 1
IsDecoration: True
ChangesHealth:
Step: -200
Step: -100
StartIfBelow: 101
Delay: 6
^LightHusk:
Inherits: ^Husk
Health:
HP: 4000
HP: 2000
^HelicopterHusk:
Inherits: ^CommonHuskDefaults

View File

@@ -80,9 +80,6 @@ HARV:
EffectiveOwnerFromOwner: true
WithHarvestAnimation:
WithDockingAnimation:
Explodes@EMPTY:
Weapon: UnitExplodeHarvEmpty
EmptyWeapon: UnitExplodeHarvEmpty
Explodes:
RequiresCondition: !no-tiberium
Weapon: TiberiumExplosion
@@ -163,9 +160,6 @@ APC:
Types: Infantry
MaxWeight: 5
LoadingCondition: notmobile
Explodes:
Weapon: UnitExplodeBig
EmptyWeapon: UnitExplodeBig
SpawnActorOnDeath:
Actor: APC.Husk
OwnerType: InternalName
@@ -460,9 +454,6 @@ MTNK:
AttackTurreted:
WithMuzzleOverlay:
WithSpriteTurret:
Explodes:
Weapon: UnitExplodeBig
EmptyWeapon: UnitExplodeBig
SpawnActorOnDeath:
Actor: MTNK.Husk
OwnerType: InternalName
@@ -521,9 +512,6 @@ HTNK:
Delay: 10
StartIfBelow: 50
DamageCooldown: 200
Explodes:
Weapon: UnitExplodeMech
EmptyWeapon: UnitExplodeMech
SpawnActorOnDeath:
Actor: HTNK.Husk
OwnerType: InternalName
@@ -572,9 +560,6 @@ MSAM:
TargetFrozenActors: True
ForceFireIgnoresActors: True
WithSpriteTurret:
Explodes:
Weapon: UnitExplodeMech
EmptyWeapon: UnitExplodeMech
SpawnActorOnDeath:
Actor: MSAM.Husk
OwnerType: InternalName
@@ -644,7 +629,7 @@ STNK:
Inherits@EXPERIENCE: ^GainsExperience
Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove
Valued:
Cost: 900
Cost: 1000
Tooltip:
Name: Stealth Tank
UpdatesPlayerStatistics:
@@ -663,7 +648,7 @@ STNK:
Health:
HP: 15000
Repairable:
HpPerStep: 758
HpPerStep: 682
Armor:
Type: Light
RevealsShroud:

View File

@@ -40,7 +40,6 @@
120mm:
Inherits: ^BallisticWeapon
Report: tnkfire4.aud
120mmDual:
Inherits: ^BallisticWeapon

View File

@@ -33,7 +33,7 @@ FlametankExplode:
DamageTypes: Prone50Percent, TriggerProne, FireDeath
Warhead@2Eff: CreateEffect
Explosions: big_napalm
ImpactSounds: flamer2.aud
ImpactSounds: xplobig6.aud
Warhead@3Smu: LeaveSmudge
SmudgeType: Scorch
@@ -74,26 +74,8 @@ UnitExplodeSmall:
Explosions: big_frag
ImpactSounds: xplobig4.aud
UnitExplodeBig:
Inherits: ^DamagingExplosionHE
Warhead@2Eff: CreateEffect
Explosions: big_frag
ImpactSounds: xplobig6.aud
UnitExplodeMech:
Inherits: ^DamagingExplosionHE
Warhead@2Eff: CreateEffect
Explosions: poof
ImpactSounds: xplosml2.aud
UnitExplodeHarvEmpty:
Inherits: ^DamagingExplosionHE
Warhead@2Eff: CreateEffect
Explosions: building
ImpactSounds: xplos.aud
UnitExplodeStealthTank:
Inherits: UnitExplodeBig
Inherits: UnitExplodeSmall
Warhead@1Dam: SpreadDamage
InvalidTargets: StealthTank

View File

@@ -65,7 +65,6 @@ Rockets:
BikeRockets:
Inherits: ^MissileWeapon
ReloadDelay: 60
Burst: 2
BurstDelays: 10
Projectile: Missile
@@ -130,7 +129,6 @@ MammothMissiles:
Heavy: 44
Warhead@3Eff: CreateEffect
Explosions: small_poof
ImpactSounds: xplobig4.aud
Warhead@4EffAir: CreateEffect
Explosions: small_building
@@ -165,7 +163,6 @@ MammothMissiles:
Heavy: 48
Warhead@3Eff: CreateEffect
Explosions: med_frag
ImpactSounds: xplobig4.aud
227mm.stnk:
Inherits: ^MissileWeapon
@@ -216,7 +213,6 @@ BoatMissile:
DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath
Warhead@3Eff: CreateEffect
Explosions: small_poof
ImpactSounds: xplobig4.aud
Warhead@4EffAir: CreateEffect
Explosions: small_building

View File

@@ -1,7 +1,7 @@
Sniper:
Report: ramgun2.aud
ValidTargets: Ground, Infantry
InvalidTargets: Vehicle, Water, Structure, Wall, Husk, Creep
InvalidTargets: Vehicle, Water, Structure, Wall, Husk
ReloadDelay: 40
Range: 8c0
Projectile: Bullet
@@ -72,7 +72,7 @@ HeliAGGun:
Damage: 2000
Versus:
None: 100
Wood: 75
Wood: 50
Light: 75
Heavy: 25
DamageTypes: Prone80Percent, TriggerProne, RippedApartDeath
@@ -175,6 +175,6 @@ APCGun.AA:
Warhead@1Dam: SpreadDamage
ValidTargets: Air
Versus:
Light: 125
Light: 140
Warhead@2Eff: CreateEffect
Explosions: small_poof

View File

@@ -20,13 +20,12 @@ Container@LOBBY_MUSIC_BIN:
Height: 25
Text: Track
Font: Bold
Label@LENGTH:
X: PARENT_RIGHT - 80
Label@TYPE:
X: PARENT_RIGHT - 63
Height: 25
Width: 50
Text: Length
Font: Bold
Align: Right
Background@CONTROLS:
Background: dialog3
Width: 268

View File

@@ -23,19 +23,19 @@ Container@LOBBY_OPTIONS_BIN:
Height: 30
Children:
Checkbox@A:
Width: 220
Width: 175
Height: 20
Visible: False
TooltipContainer: TOOLTIP_CONTAINER
Checkbox@B:
X: 225
Width: 220
X: 190
Width: 175
Height: 20
Visible: False
TooltipContainer: TOOLTIP_CONTAINER
Checkbox@C:
X: 450
Width: 190
X: 375
Width: 175
Height: 20
Visible: False
TooltipContainer: TOOLTIP_CONTAINER
@@ -44,25 +44,25 @@ Container@LOBBY_OPTIONS_BIN:
Width: PARENT_RIGHT
Children:
Label@A_DESC:
Width: 140
Width: 90
Height: 25
Align: Right
Visible: False
DropDownButton@A:
X: 145
Width: 180
X: 95
Width: 160
Height: 25
Visible: False
TooltipContainer: TOOLTIP_CONTAINER
Label@B_DESC:
X: PARENT_RIGHT - WIDTH - 203
Width: 140
X: PARENT_RIGHT - WIDTH - 183
Width: 160
Height: 25
Align: Right
Visible: False
DropDownButton@B:
X: PARENT_RIGHT - WIDTH - 18
Width: 180
Width: 160
Height: 25
Font: Regular
Visible: False

View File

@@ -23,34 +23,27 @@ Container@LOBBY_PLAYER_BIN:
Font: Bold
Label@LABEL_LOBBY_FACTION:
X: 270
Width: 140
Width: 130
Height: 25
Text: Faction
Align: Center
Font: Bold
Label@LABEL_LOBBY_TEAM:
X: 420
X: 410
Width: 48
Height: 25
Text: Team
Align: Center
Font: Bold
Label@LABEL_LOBBY_HANDICAP:
X: 478
Width: 72
Height: 25
Text: Handicap
Align: Center
Font: Bold
Label@LABEL_LOBBY_SPAWN:
X: 560
X: 468
Width: 48
Height: 25
Text: Spawn
Align: Center
Font: Bold
Label@LABEL_LOBBY_STATUS:
X: 617
X: 525
Width: 20
Height: 25
Text: Ready
@@ -125,7 +118,7 @@ Container@LOBBY_PLAYER_BIN:
Height: PARENT_BOTTOM - 12
DropDownButton@FACTION:
X: 270
Width: 140
Width: 130
Height: 25
IgnoreChildMouseOver: true
TooltipContainer: TOOLTIP_CONTAINER
@@ -142,29 +135,23 @@ Container@LOBBY_PLAYER_BIN:
Height: 25
Text: Faction
DropDownButton@TEAM_DROPDOWN:
X: 420
X: 410
Width: 48
Height: 25
Text: Team
DropDownButton@HANDICAP_DROPDOWN:
X: 478
Width: 72
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipText: A handicap decreases the combat effectiveness of the player's forces
DropDownButton@SPAWN_DROPDOWN:
X: 560
X: 468
Width: 48
Height: 25
Text: Spawn
Checkbox@STATUS_CHECKBOX:
X: 617
X: 525
Y: 2
Width: 20
Height: 20
Visible: false
Image@STATUS_IMAGE:
X: 619
X: 527
Y: 4
Width: 20
Height: 20
@@ -238,7 +225,7 @@ Container@LOBBY_PLAYER_BIN:
Height: 13
Container@FACTION:
X: 270
Width: 160
Width: 150
Height: 25
Children:
Image@FACTIONFLAG:
@@ -252,39 +239,28 @@ Container@LOBBY_PLAYER_BIN:
Height: 25
Text: Faction
Label@TEAM:
X: 420
X: 410
Width: 23
Height: 25
Text: Team
Align: Center
DropDownButton@TEAM_DROPDOWN:
X: 420
Width: 48
Height: 25
Visible: false
Label@HANDICAP:
X: 478
Width: 47
Height: 25
Align: Center
DropDownButton@HANDICAP_DROPDOWN:
X: 478
Width: 72
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipText: A handicap decreases the combat effectiveness of the player's forces
Label@SPAWN:
X: 560
X: 468
Width: 23
Height: 25
Align: Center
DropDownButton@TEAM_DROPDOWN:
X: 410
Width: 48
Height: 25
Visible: false
DropDownButton@SPAWN_DROPDOWN:
X: 560
X: 468
Width: 48
Height: 25
Visible: false
Image@STATUS_IMAGE:
X: 619
X: 527
Y: 4
Width: 20
Height: 20
@@ -311,7 +287,7 @@ Container@LOBBY_PLAYER_BIN:
Button@JOIN:
X: 190
Text: Play in this slot
Width: 418
Width: 326
Height: 25
Container@TEMPLATE_EDITABLE_SPECTATOR:
X: 5
@@ -357,19 +333,19 @@ Container@LOBBY_PLAYER_BIN:
Template: ANONYMOUS_PLAYER_TOOLTIP
Label@SPECTATOR:
X: 190
Width: 418
Width: 326
Height: 25
Text: Spectator
Align: Center
Font: Bold
Checkbox@STATUS_CHECKBOX:
X: 617
X: 525
Y: 2
Width: 20
Height: 20
Visible: false
Image@STATUS_IMAGE:
X: 619
X: 527
Y: 4
Width: 20
Height: 20
@@ -438,13 +414,13 @@ Container@LOBBY_PLAYER_BIN:
Template: ANONYMOUS_PLAYER_TOOLTIP
Label@SPECTATOR:
X: 190
Width: 418
Width: 326
Height: 25
Text: Spectator
Align: Center
Font: Bold
Image@STATUS_IMAGE:
X: 619
X: 527
Y: 4
Width: 20
Height: 20
@@ -465,7 +441,7 @@ Container@LOBBY_PLAYER_BIN:
Text: Allow Spectators?
Button@SPECTATE:
X: 190
Width: 418
Width: 326
Height: 25
Text: Spectate
Font: Regular

View File

@@ -9,32 +9,32 @@ Container@LOBBY_SERVERS_BIN:
Children:
Label@NAME:
X: 5
Width: 347
Width: 255
Height: 25
Text: Server
Align: Center
Font: Bold
Label@PLAYERS:
X: 382
X: 290
Width: 85
Height: 25
Text: Players
Font: Bold
Label@LOCATION:
X: 472
X: 380
Width: 110
Height: 25
Text: Location
Font: Bold
Label@STATUS:
X: 587
X: 495
Width: 50
Height: 25
Text: Status
Font: Bold
LogicTicker@NOTICE_WATCHER:
Background@NOTICE_CONTAINER:
Width: PARENT_RIGHT
Width: 583
Height: 20
Background: dialog2
Children:
@@ -83,12 +83,12 @@ Container@LOBBY_SERVERS_BIN:
Children:
LabelWithTooltip@TITLE:
X: 5
Width: 337
Width: 245
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Image@PASSWORD_PROTECTED:
X: 364
X: 272
Y: 6
Width: 12
Height: 13
@@ -97,7 +97,7 @@ Container@LOBBY_SERVERS_BIN:
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires Password
Image@REQUIRES_AUTHENTICATION:
X: 364
X: 272
Y: 6
Width: 12
Height: 13
@@ -106,17 +106,17 @@ Container@LOBBY_SERVERS_BIN:
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires OpenRA forum account
LabelWithTooltip@PLAYERS:
X: 382
X: 290
Width: 85
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Label@LOCATION:
X: 472
X: 380
Width: 110
Height: 25
Label@STATUS:
X: 587
X: 495
Width: 50
Height: 25
Label@PROGRESS_LABEL:
@@ -128,12 +128,12 @@ Container@LOBBY_SERVERS_BIN:
Visible: false
DropDownButton@FILTERS_DROPDOWNBUTTON:
Y: PARENT_BOTTOM + 5
Width: 154
Width: 147
Height: 25
Text: Filter Games
Font: Bold
Button@RELOAD_BUTTON:
X: 159
X: 152
Y: PARENT_BOTTOM + 5
Width: 26
Height: 25

View File

@@ -2,7 +2,7 @@ Background@SERVER_LOBBY:
Logic: LobbyLogic
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 900
Width: 808
Height: 600
Children:
ColorPreviewManager@COLOR_MANAGER:
@@ -20,71 +20,69 @@ Background@SERVER_LOBBY:
DropDownButton@SLOTS_DROPDOWNBUTTON:
X: 20
Y: 291
Width: 185
Width: 178
Height: 25
Font: Bold
Text: Slot Admin
Container@SKIRMISH_TABS:
X: 695 - WIDTH
Width: 486
Visible: False
Children:
Button@PLAYERS_TAB:
X: 203
Y: 285
Width: 162
Width: 134
Height: 31
Font: Bold
Text: Players
Button@OPTIONS_TAB:
X: 162
X: 337
Y: 285
Width: 162
Width: 133
Height: 31
Font: Bold
Text: Options
Button@MUSIC_TAB:
X: 2*162
X: 470
Y: 285
Width: 162
Width: 133
Height: 31
Font: Bold
Text: Music
Container@MULTIPLAYER_TABS:
X: 695 - WIDTH
Width: 486
Visible: False
Children:
Button@PLAYERS_TAB:
X: 203
Y: 285
Width: 121
Width: 100
Height: 31
Font: Bold
Text: Players
Button@OPTIONS_TAB:
X: 121
X: 303
Y: 285
Width: 122
Width: 100
Height: 31
Font: Bold
Text: Options
Button@MUSIC_TAB:
X: 243
X: 403
Y: 285
Width: 121
Width: 100
Height: 31
Font: Bold
Text: Music
Button@SERVERS_TAB:
X: 364
X: 503
Y: 285
Width: 122
Width: 100
Height: 31
Font: Bold
Text: Servers
Container@TOP_PANELS_ROOT:
X: 20
Y: 67
Width: 675
Width: 583
Height: 219
Button@CHANGEMAP_BUTTON:
X: PARENT_RIGHT - WIDTH - 20

View File

@@ -2,7 +2,7 @@ Background@MAPCHOOSER_PANEL:
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Logic: MapChooserLogic
Width: 900
Width: 808
Height: 600
Children:
Label@MAPCHOOSER_TITLE:
@@ -47,16 +47,16 @@ Background@MAPCHOOSER_PANEL:
Height: PARENT_BOTTOM
Children:
ScrollItem@MAP_TEMPLATE:
Width: 208
Height: 266
Width: 185
Height: 243
X: 2
Visible: false
Children:
MapPreview@PREVIEW:
X: (PARENT_RIGHT - WIDTH) / 2
Y: 3
Width: 202
Height: 202
Width: 179
Height: 179
IgnoreMouseOver: true
IgnoreMouseInput: true
Label@TITLE:

View File

@@ -2,7 +2,7 @@ Background@MULTIPLAYER_PANEL:
Logic: MultiplayerLogic
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 900
Width: 808
Height: 600
Children:
Label@TITLE:
@@ -20,25 +20,25 @@ Background@MULTIPLAYER_PANEL:
Children:
Label@NAME:
X: 5
Width: 347
Width: 255
Height: 25
Text: Server
Align: Center
Font: Bold
Label@PLAYERS:
X: 382
X: 290
Width: 85
Height: 25
Text: Players
Font: Bold
Label@LOCATION:
X: 472
X: 380
Width: 110
Height: 25
Text: Location
Font: Bold
Label@STATUS:
X: 587
X: 495
Width: 50
Height: 25
Text: Status
@@ -47,7 +47,7 @@ Background@MULTIPLAYER_PANEL:
Background@NOTICE_CONTAINER:
X: 20
Y: 67
Width: 675
Width: 583
Height: 20
Background: dialog2
Children:
@@ -75,7 +75,7 @@ Background@MULTIPLAYER_PANEL:
ScrollPanel@SERVER_LIST:
X: 20
Y: 67
Width: 675
Width: 583
Height: PARENT_BOTTOM - 119
TopBottomSpacing: 2
Children:
@@ -99,12 +99,12 @@ Background@MULTIPLAYER_PANEL:
Children:
LabelWithTooltip@TITLE:
X: 5
Width: 337
Width: 245
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Image@PASSWORD_PROTECTED:
X: 364
X: 272
Y: 6
Width: 12
Height: 13
@@ -113,7 +113,7 @@ Background@MULTIPLAYER_PANEL:
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires Password
Image@REQUIRES_AUTHENTICATION:
X: 364
X: 272
Y: 6
Width: 12
Height: 13
@@ -122,23 +122,23 @@ Background@MULTIPLAYER_PANEL:
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires OpenRA forum account
LabelWithTooltip@PLAYERS:
X: 382
X: 290
Width: 85
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Label@LOCATION:
X: 472
X: 380
Width: 110
Height: 25
Label@STATUS:
X: 587
X: 495
Width: 50
Height: 25
Label@PROGRESS_LABEL:
X: 20
Y: 67 + (PARENT_BOTTOM - 119 - HEIGHT) / 2
Width: 675
Width: 582
Height: 25
Font: Bold
Align: Center
@@ -225,21 +225,21 @@ Background@MULTIPLAYER_PANEL:
Children:
LogicTicker@ANIMATION:
Label@PLAYER_COUNT:
X: 254
X: 208
Y: PARENT_BOTTOM - HEIGHT - 20
Width: 190
Height: 25
Align: Center
Font: Bold
Button@DIRECTCONNECT_BUTTON:
X: 490
X: 398
Y: PARENT_BOTTOM - HEIGHT - 20
Width: 100
Height: 25
Text: Direct IP
Font: Bold
Button@CREATE_BUTTON:
X: 595
X: 503
Y: PARENT_BOTTOM - HEIGHT - 20
Width: 100
Height: 25

View File

@@ -188,19 +188,12 @@ Background@SETTINGS_PANEL:
Font: Regular
Text: Increase Cursor Size
Checkbox@PLAYER_STANCE_COLORS_CHECKBOX:
X: 195
X: 310
Y: 133
Width: 200
Height: 20
Font: Regular
Text: Player Stance Colors
Checkbox@PAUSE_SHELLMAP_CHECKBOX:
X: 375
Y: 133
Width: 200
Height: 20
Font: Regular
Text: Pause Menu Background
Label@VIDEO_TITLE:
Y: 190
Width: PARENT_RIGHT

View File

@@ -62,10 +62,10 @@ Speech:
Sounds:
DefaultVariant: .WAV
Notifications:
RadarUp: RADRON1
RadarUp: MULTI1
RadarDown:
DisablePower: POWRDN1
EnablePower: POWRUP1
DisablePower: POWRUP1
EnablePower: POWRDN1
CashTickUp: CASHTIK1
CashTickDown: CASHTIK1
LevelUp: SCORTIK1

View File

@@ -23,34 +23,27 @@ Container@LOBBY_PLAYER_BIN:
Font: Bold
Label@LABEL_LOBBY_FACTION:
X: 270
Width: 140
Width: 130
Height: 25
Text: Faction
Align: Center
Font: Bold
Label@LABEL_LOBBY_TEAM:
X: 420
X: 410
Width: 48
Height: 25
Text: Team
Align: Center
Font: Bold
Label@LABEL_LOBBY_HANDICAP:
X: 478
Width: 72
Height: 25
Text: Handicap
Align: Center
Font: Bold
Label@LABEL_LOBBY_SPAWN:
X: 560
X: 468
Width: 48
Height: 25
Text: Spawn
Align: Center
Font: Bold
Label@LABEL_LOBBY_STATUS:
X: 617
X: 525
Width: 20
Height: 25
Text: Ready
@@ -125,7 +118,7 @@ Container@LOBBY_PLAYER_BIN:
Height: PARENT_BOTTOM - 12
DropDownButton@FACTION:
X: 270
Width: 140
Width: 130
Height: 25
IgnoreChildMouseOver: true
TooltipContainer: TOOLTIP_CONTAINER
@@ -142,29 +135,23 @@ Container@LOBBY_PLAYER_BIN:
Height: 25
Text: Faction
DropDownButton@TEAM_DROPDOWN:
X: 420
X: 410
Width: 48
Height: 25
Text: Team
DropDownButton@HANDICAP_DROPDOWN:
X: 478
Width: 72
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipText: A handicap decreases the combat effectiveness of the player's forces
DropDownButton@SPAWN_DROPDOWN:
X: 560
X: 468
Width: 48
Height: 25
Text: Spawn
Checkbox@STATUS_CHECKBOX:
X: 617
X: 525
Y: 2
Width: 20
Height: 20
Visible: false
Image@STATUS_IMAGE:
X: 619
X: 527
Y: 4
Width: 20
Height: 20
@@ -238,7 +225,7 @@ Container@LOBBY_PLAYER_BIN:
Height: 13
Container@FACTION:
X: 270
Width: 170
Width: 160
Height: 25
Children:
Image@FACTIONFLAG:
@@ -248,43 +235,32 @@ Container@LOBBY_PLAYER_BIN:
Height: 23
Label@FACTIONNAME:
X: 34
Width: 70
Width: 60
Height: 25
Text: Faction
Label@TEAM:
X: 420
X: 410
Width: 23
Height: 25
Align: Center
Text: Team
DropDownButton@TEAM_DROPDOWN:
X: 420
Width: 48
Height: 25
Visible: false
Label@HANDICAP:
X: 478
Width: 47
Height: 25
Align: Center
DropDownButton@HANDICAP_DROPDOWN:
X: 478
Width: 72
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipText: A handicap decreases the combat effectiveness of the player's forces
Label@SPAWN:
X: 560
X: 468
Width: 23
Height: 25
Align: Center
DropDownButton@TEAM_DROPDOWN:
X: 410
Width: 48
Height: 25
Visible: false
DropDownButton@SPAWN_DROPDOWN:
X: 560
X: 468
Width: 48
Height: 25
Visible: false
Image@STATUS_IMAGE:
X: 619
X: 527
Y: 4
Width: 20
Height: 20
@@ -310,7 +286,7 @@ Container@LOBBY_PLAYER_BIN:
Visible: false
Button@JOIN:
X: 190
Width: 418
Width: 326
Height: 25
Text: Play in this slot
Container@TEMPLATE_EDITABLE_SPECTATOR:
@@ -357,19 +333,19 @@ Container@LOBBY_PLAYER_BIN:
Template: ANONYMOUS_PLAYER_TOOLTIP
Label@SPECTATOR:
X: 190
Width: 418
Width: 326
Height: 25
Text: Spectator
Align: Center
Font: Bold
Checkbox@STATUS_CHECKBOX:
X: 617
X: 525
Y: 2
Width: 20
Height: 20
Visible: false
Image@STATUS_IMAGE:
X: 619
X: 527
Y: 4
Width: 20
Height: 20
@@ -438,13 +414,13 @@ Container@LOBBY_PLAYER_BIN:
Template: ANONYMOUS_PLAYER_TOOLTIP
Label@SPECTATOR:
X: 190
Width: 418
Width: 326
Height: 25
Text: Spectator
Align: Center
Font: Bold
Image@STATUS_IMAGE:
X: 619
X: 527
Y: 4
Width: 20
Height: 20
@@ -465,7 +441,7 @@ Container@LOBBY_PLAYER_BIN:
Font: Regular
Button@SPECTATE:
X: 190
Width: 418
Width: 326
Height: 25
Text: Spectate
Font: Regular

View File

@@ -147,10 +147,8 @@ speed = 5
Tick = function()
ticks = ticks + 1
if ticks > 1 or not Map.IsPausedShellmap then
local t = (ticks + 45) % (360 * speed) * (math.pi / 180) / speed;
Camera.Position = viewportOrigin + WVec.New(19200 * math.sin(t), 28800 * math.cos(t), 0)
end
local t = (ticks + 45) % (360 * speed) * (math.pi / 180) / speed;
Camera.Position = viewportOrigin + WVec.New(19200 * math.sin(t), 28800 * math.cos(t), 0)
end
WorldLoaded = function()

View File

@@ -249,7 +249,7 @@ ModContent:
Required: true
Download: patch106
music: Game Music
TestFiles: ^SupportDir|Content/d2k/v2/Music/AMBUSH.AUD, ^SupportDir|Content/d2k/v2/Music/WAITGAME.AUD
TestFiles: ^SupportDir|Content/d2k/v2/Music/AMBUSH.AUD
Sources: d2k-a, d2k-a-linux, d2k-b, d2k-b-linux, d2k-c, d2k-c-linux, d2k-d, d2k-d-linux, d2k-e, d2k-e-linux, gruntmods
movies: Campaign Briefings
TestFiles: ^SupportDir|Content/d2k/v2/Movies/A_BR01_E.VQA

View File

@@ -184,16 +184,10 @@
AttackMoveCondition: attack-move
AssaultMoveCondition: assault-move
^PlayerHandicaps:
HandicapFirepowerMultiplier:
HandicapDamageMultiplier:
HandicapProductionTimeMultiplier:
^Vehicle:
Inherits@1: ^ExistsInWorld
Inherits@2: ^SpriteActor
Inherits@selection: ^SelectableCombatUnit
Inherits@handicaps: ^PlayerHandicaps
Tooltip:
GenericName: Unit
Huntable:
@@ -304,7 +298,6 @@
Inherits@2: ^GainsExperience
Inherits@3: ^SpriteActor
Inherits@selection: ^SelectableCombatUnit
Inherits@handicaps: ^PlayerHandicaps
Tooltip:
GenericName: Unit
Huntable:
@@ -373,7 +366,6 @@
^Plane:
Inherits@1: ^ExistsInWorld
Inherits@2: ^SpriteActor
Inherits@handicaps: ^PlayerHandicaps
Interactable:
Tooltip:
GenericName: Unit
@@ -399,7 +391,6 @@
Inherits@1: ^ExistsInWorld
Inherits@2: ^SpriteActor
Inherits@selection: ^SelectableBuilding
Inherits@handicaps: ^PlayerHandicaps
Tooltip:
GenericName: Structure
Huntable:

Some files were not shown because too many files have changed in this diff Show More