Merge pull request #3093 from Mailaender/ralint-sequences

Added RALint check for missing sequence definitions and fixed them in d2k mod
This commit is contained in:
Chris Forbes
2013-04-18 14:32:10 -07:00
7 changed files with 104 additions and 16 deletions

View File

@@ -0,0 +1,38 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 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. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
{
class CheckSequences : ILintPass
{
public void Run(Action<string> emitError, Action<string> emitWarning)
{
var sequences = Game.modData.Manifest.Sequences
.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal);
foreach (var actorInfo in Rules.Info)
foreach (var renderInfo in actorInfo.Value.Traits.WithInterface<RenderSimpleInfo>())
{
var image = renderInfo.Image ?? actorInfo.Value.Name;
if (!sequences.Any(s => s.Key == image.ToLower()) && !actorInfo.Value.Name.Contains("^"))
emitWarning("Sprite image {0} from actor {1} has no sequence definition.".F(image, actorInfo.Value.Name));
}
}
}
}

View File

@@ -426,6 +426,7 @@
<Compile Include="RepairsBridges.cs" /> <Compile Include="RepairsBridges.cs" />
<Compile Include="Activities\RepairBridge.cs" /> <Compile Include="Activities\RepairBridge.cs" />
<Compile Include="BridgeHut.cs" /> <Compile Include="BridgeHut.cs" />
<Compile Include="Lint\CheckSequences.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj"> <ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">

BIN
mods/d2k/bits/mpspawn.shp Normal file

Binary file not shown.

BIN
mods/d2k/bits/waypoint.shp Normal file

Binary file not shown.

View File

@@ -25,14 +25,14 @@ Background@INSTALL_PANEL:
Y:90 Y:90
Width:PARENT_RIGHT Width:PARENT_RIGHT
Height:25 Height:25
Text:It requires the original Dune 2000 (and still some Red Alert) game content. Text:It requires the original Dune 2000 assets whose fileformats differ from other C&C games.
Align:Center Align:Center
Label@DESC3: Label@DESC3:
X:0 X:0
Y:130 Y:130
Width:PARENT_RIGHT Width:PARENT_RIGHT
Height:25 Height:25
Text:The easiest way is to simply click download to get already prepared files and restart. Text:The easiest way is to simply click download to fetch already prepared files and restart.
Align:Center Align:Center
Label@DESC4: Label@DESC4:
X:0 X:0

View File

@@ -4,7 +4,7 @@
Facings: 32 Facings: 32
laserfire: laserfire:
idle: veh-hit2 idle: miniboom
Start: 0 Start: 0
Length: * Length: *
@@ -65,10 +65,10 @@ trike:
unload: unload:
Start: 0 Start: 0
Facings: 32 Facings: 32
muzzle: minigun muzzle: minimuzzle
Start: 0 Start: 0
Length: 6 Length: 1
Facings: 8 Facings: 32
quad: quad:
idle: idle:
@@ -77,10 +77,10 @@ quad:
unload: unload:
Start: 0 Start: 0
Facings: 32 Facings: 32
muzzle: minigun muzzle: minimuzzle
Start: 0 Start: 0
Length: 6 Length: 1
Facings: 8 Facings: 32
siegetank: siegetank:
idle: idle:
@@ -1038,10 +1038,10 @@ raider:
unload: unload:
Start: 0 Start: 0
Facings: 32 Facings: 32
muzzle: minigun muzzle: minimuzzle
Start: 0 Start: 0
Length: 6 Length: 1
Facings: 8 Facings: 32
deviatortank: deviatortank:
idle: idle:
@@ -1275,6 +1275,40 @@ palacec:
damaged-idle: damaged-idle:
Start: 1 Start: 1
starportc:
idle:
Start: 0
active:
Start: 0
Length: 1
damaged-idle:
Start: 1
damaged-active:
Start: 1
make: starportmake
Start: 0
Length: *
heavyc:
idle:
Start: 0
Length: 1
make: heavymake
Start: 0
Length: *
damaged-idle:
Start: 0
build-top:
Start: 1
Length: 1
damaged-build-top:
Start: 2
Length: 1
idle-top:
Start: 1
damaged-idle-top:
Start: 2
bombs: bombs:
open: open:
Start: 0 Start: 0
@@ -1290,3 +1324,17 @@ parach:
idle: idle:
Start: 5 Start: 5
Length: 11 Length: 11
mpspawn:
idle:
Start: 0
Length: *
waypoint:
idle:
Start: 0
Length: *
sietch:
idle:
Start: 0

View File

@@ -105,7 +105,7 @@ Slung:
Angle: .15 Angle: .15
Proximity: true Proximity: true
Inaccuracy: 12 Inaccuracy: 12
Image: DRAGON Image: MISSILE
Warhead: Warhead:
Spread: 6 Spread: 6
Versus: Versus:
@@ -235,7 +235,6 @@ TowerMissile:
Inaccuracy: 12 Inaccuracy: 12
Image: MISSILE2 Image: MISSILE2
ROT: 10 ROT: 10
Trail: smokey
Speed: 45 Speed: 45
RangeLimit: 50 RangeLimit: 50
Warhead: Warhead:
@@ -406,8 +405,10 @@ Sound:
ROF: 85 ROF: 85
Range: 8.5 Range: 8.5
Report: SONIC1 Report: SONIC1
#Charges: yes Projectile: LaserZap
Projectile: TeslaZap BeamRadius: 1
BeamDuration: 8
UsePlayerColor: true
Warhead: Warhead:
Spread: 1 Spread: 1
Versus: Versus: