Updated the example mod

This commit is contained in:
penev92 2022-12-30 00:31:52 +02:00 committed by Matthias Mailänder
parent 7c17829b96
commit 2b8e5175de
8 changed files with 44 additions and 46 deletions

View File

@ -1,40 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<LangVersion>7.3</LangVersion>
<DebugSymbols>true</DebugSymbols>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<OutputPath>../engine/bin</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<PlatformTarget>AnyCPU</PlatformTarget>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>../engine/OpenRA.ruleset</CodeAnalysisRuleSet>
<EngineRootPath>../engine</EngineRootPath>
</PropertyGroup>
<Import Project="$(EngineRootPath)/Directory.Build.props" />
<ItemGroup>
<!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
<Compile Include="**/*.cs" Exclude="$(DefaultItemExcludes)" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../engine/OpenRA.Game/OpenRA.Game.csproj">
<ProjectReference Include="$(EngineRootPath)/OpenRA.Game/OpenRA.Game.csproj">
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="../engine/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj">
<ProjectReference Include="$(EngineRootPath)/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj">
<Private>False</Private>
</ProjectReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../engine/stylecop.json" />
</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'">
<Analyzer Remove="@(Analyzer)" />
<ItemGroup>
<None Include="$(EngineRootPath)/AUTHORS">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Target>
</Project>

View File

@ -17,7 +17,7 @@ namespace OpenRA.Mods.Example.Widgets.Logic
public class TemplateMenuLogic : ChromeLogic
{
[ObjectCreator.UseCtor]
public TemplateMenuLogic(Widget widget, World world, ModData modData)
public TemplateMenuLogic(Widget widget)
{
widget.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
}

View File

@ -1,2 +0,0 @@
english:
english: English

View File

@ -0,0 +1,2 @@
# Game speeds:
Normal = Normal

Binary file not shown.

View File

@ -22,5 +22,8 @@ Players:
OwnsWorld: True
NonCombatant: True
Faction: example
PlayerReference@Multi0:
Name: Multi0
Playable: True
Actors:

View File

@ -37,7 +37,8 @@ Notifications:
example|audio/notifications.yaml
Translations:
example|english.yaml
common|languages/en.ftl
example|languages/en.ftl
Hotkeys:
common|hotkeys/game.yaml
@ -66,11 +67,19 @@ MapGrid:
SpriteFormats: ShpTS
SoundFormats: Wav
TerrainFormat: DefaultTerrain
SpriteSequenceFormat: DefaultSpriteSequence
ModelSequenceFormat: PlaceholderModelSequence
DefaultOrderGenerator: UnitOrderGenerator
GameSpeeds:
DefaultSpeed: default
Speeds:
default:
Name: Normal
Timestep: 40

View File

@ -16,6 +16,7 @@ World:
CursorPalette: true
ShadowIndex:
Selection:
ControlGroups:
DummyActor:
BodyOrientation: