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:
38
OpenRA.Mods.RA/Lint/CheckSequences.cs
Normal file
38
OpenRA.Mods.RA/Lint/CheckSequences.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -426,6 +426,7 @@
|
||||
<Compile Include="RepairsBridges.cs" />
|
||||
<Compile Include="Activities\RepairBridge.cs" />
|
||||
<Compile Include="BridgeHut.cs" />
|
||||
<Compile Include="Lint\CheckSequences.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
|
||||
BIN
mods/d2k/bits/mpspawn.shp
Normal file
BIN
mods/d2k/bits/mpspawn.shp
Normal file
Binary file not shown.
BIN
mods/d2k/bits/waypoint.shp
Normal file
BIN
mods/d2k/bits/waypoint.shp
Normal file
Binary file not shown.
@@ -25,14 +25,14 @@ Background@INSTALL_PANEL:
|
||||
Y:90
|
||||
Width:PARENT_RIGHT
|
||||
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
|
||||
Label@DESC3:
|
||||
X:0
|
||||
Y:130
|
||||
Width:PARENT_RIGHT
|
||||
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
|
||||
Label@DESC4:
|
||||
X:0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Facings: 32
|
||||
|
||||
laserfire:
|
||||
idle: veh-hit2
|
||||
idle: miniboom
|
||||
Start: 0
|
||||
Length: *
|
||||
|
||||
@@ -65,10 +65,10 @@ trike:
|
||||
unload:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
muzzle: minigun
|
||||
muzzle: minimuzzle
|
||||
Start: 0
|
||||
Length: 6
|
||||
Facings: 8
|
||||
Length: 1
|
||||
Facings: 32
|
||||
|
||||
quad:
|
||||
idle:
|
||||
@@ -77,10 +77,10 @@ quad:
|
||||
unload:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
muzzle: minigun
|
||||
muzzle: minimuzzle
|
||||
Start: 0
|
||||
Length: 6
|
||||
Facings: 8
|
||||
Length: 1
|
||||
Facings: 32
|
||||
|
||||
siegetank:
|
||||
idle:
|
||||
@@ -1038,10 +1038,10 @@ raider:
|
||||
unload:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
muzzle: minigun
|
||||
muzzle: minimuzzle
|
||||
Start: 0
|
||||
Length: 6
|
||||
Facings: 8
|
||||
Length: 1
|
||||
Facings: 32
|
||||
|
||||
deviatortank:
|
||||
idle:
|
||||
@@ -1275,6 +1275,40 @@ palacec:
|
||||
damaged-idle:
|
||||
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:
|
||||
open:
|
||||
Start: 0
|
||||
@@ -1290,3 +1324,17 @@ parach:
|
||||
idle:
|
||||
Start: 5
|
||||
Length: 11
|
||||
|
||||
mpspawn:
|
||||
idle:
|
||||
Start: 0
|
||||
Length: *
|
||||
|
||||
waypoint:
|
||||
idle:
|
||||
Start: 0
|
||||
Length: *
|
||||
|
||||
sietch:
|
||||
idle:
|
||||
Start: 0
|
||||
@@ -105,7 +105,7 @@ Slung:
|
||||
Angle: .15
|
||||
Proximity: true
|
||||
Inaccuracy: 12
|
||||
Image: DRAGON
|
||||
Image: MISSILE
|
||||
Warhead:
|
||||
Spread: 6
|
||||
Versus:
|
||||
@@ -235,7 +235,6 @@ TowerMissile:
|
||||
Inaccuracy: 12
|
||||
Image: MISSILE2
|
||||
ROT: 10
|
||||
Trail: smokey
|
||||
Speed: 45
|
||||
RangeLimit: 50
|
||||
Warhead:
|
||||
@@ -406,8 +405,10 @@ Sound:
|
||||
ROF: 85
|
||||
Range: 8.5
|
||||
Report: SONIC1
|
||||
#Charges: yes
|
||||
Projectile: TeslaZap
|
||||
Projectile: LaserZap
|
||||
BeamRadius: 1
|
||||
BeamDuration: 8
|
||||
UsePlayerColor: true
|
||||
Warhead:
|
||||
Spread: 1
|
||||
Versus:
|
||||
|
||||
Reference in New Issue
Block a user