Merge pull request #6872 from Mailaender/check-map-rules
Fixed Fort Lonestar and Drop Zone maps and added a test to check map rule loading
This commit is contained in:
31
OpenRA.Mods.RA/Lint/CheckMapRules.cs
Normal file
31
OpenRA.Mods.RA/Lint/CheckMapRules.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2014 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 OpenRA.Traits;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA
|
||||||
|
{
|
||||||
|
public class CheckMapRules : ILintPass
|
||||||
|
{
|
||||||
|
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Game.modData.RulesetCache.LoadMapRules(map);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
emitError(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -494,6 +494,7 @@
|
|||||||
<Compile Include="UtilityCommands\ActorStatsExport.cs" />
|
<Compile Include="UtilityCommands\ActorStatsExport.cs" />
|
||||||
<Compile Include="UtilityCommands\ExportCharacterSeparatedRules.cs" />
|
<Compile Include="UtilityCommands\ExportCharacterSeparatedRules.cs" />
|
||||||
<Compile Include="UtilityCommands\Extensions.cs" />
|
<Compile Include="UtilityCommands\Extensions.cs" />
|
||||||
|
<Compile Include="Lint\CheckMapRules.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
||||||
|
|||||||
@@ -203,35 +203,26 @@ Rules:
|
|||||||
CrateSpawner:
|
CrateSpawner:
|
||||||
Maximum: 4
|
Maximum: 4
|
||||||
SpawnInterval: 5
|
SpawnInterval: 5
|
||||||
|
CrateActors: unitcrate
|
||||||
-SpawnMPUnits:
|
-SpawnMPUnits:
|
||||||
-MPStartLocations:
|
-MPStartLocations:
|
||||||
CRATE:
|
UNITCRATE:
|
||||||
-HealUnitsCrateAction:
|
Inherits: ^Crate
|
||||||
-LevelUpCrateAction:
|
|
||||||
-GiveMcvCrateAction:
|
|
||||||
-RevealMapCrateAction:
|
|
||||||
-HideMapCrateAction:
|
|
||||||
-GrantUpgradeCrateAction@cloak:
|
|
||||||
-ExplodeCrateAction@nuke:
|
|
||||||
-ExplodeCrateAction@boom:
|
|
||||||
-ExplodeCrateAction@fire:
|
|
||||||
-SupportPowerCrateAction@parabombs:
|
|
||||||
-GiveCashCrateAction:
|
|
||||||
GiveUnitCrateAction@stnk:
|
GiveUnitCrateAction@stnk:
|
||||||
SelectionShares: 4
|
SelectionShares: 4
|
||||||
Unit: stnk
|
Units: stnk
|
||||||
GiveUnitCrateAction@bike:
|
GiveUnitCrateAction@bike:
|
||||||
SelectionShares: 6
|
SelectionShares: 6
|
||||||
Unit: bike
|
Units: bike
|
||||||
GiveUnitCrateAction@htnk:
|
GiveUnitCrateAction@htnk:
|
||||||
SelectionShares: 1
|
SelectionShares: 1
|
||||||
Unit: htnk
|
Units: htnk
|
||||||
GiveUnitCrateAction@e5:
|
GiveUnitCrateAction@e5:
|
||||||
SelectionShares: 1
|
SelectionShares: 1
|
||||||
Unit: e5
|
Units: e5
|
||||||
GiveUnitCrateAction@e1:
|
GiveUnitCrateAction@e1:
|
||||||
SelectionShares: 1
|
SelectionShares: 1
|
||||||
Unit: e1
|
Units: e1
|
||||||
APC:
|
APC:
|
||||||
Health:
|
Health:
|
||||||
HP: 1000
|
HP: 1000
|
||||||
|
|||||||
@@ -294,21 +294,11 @@ Rules:
|
|||||||
CrateSpawner:
|
CrateSpawner:
|
||||||
Maximum: 3
|
Maximum: 3
|
||||||
SpawnInterval: 5
|
SpawnInterval: 5
|
||||||
|
CrateActors: unitcrate
|
||||||
-SpawnMPUnits:
|
-SpawnMPUnits:
|
||||||
-MPStartLocations:
|
-MPStartLocations:
|
||||||
CRATE:
|
UNITCRATE:
|
||||||
-LevelUpCrateAction:
|
Inherits: ^Crate
|
||||||
-GiveMcvCrateAction:
|
|
||||||
-RevealMapCrateAction:
|
|
||||||
-HideMapCrateAction:
|
|
||||||
-ExplodeCrateAction@nuke:
|
|
||||||
-ExplodeCrateAction@boom:
|
|
||||||
-ExplodeCrateAction@fire:
|
|
||||||
-SupportPowerCrateAction@parabombs:
|
|
||||||
-GiveCashCrateAction:
|
|
||||||
-DuplicateUnitCrateAction:
|
|
||||||
-GiveUnitCrateAction@squadlight:
|
|
||||||
-GiveUnitCrateAction@squadheavysoviet:
|
|
||||||
GiveUnitCrateAction@ttnk:
|
GiveUnitCrateAction@ttnk:
|
||||||
SelectionShares: 4
|
SelectionShares: 4
|
||||||
Units: ttnk
|
Units: ttnk
|
||||||
|
|||||||
@@ -208,23 +208,11 @@ Rules:
|
|||||||
Maximum: 3
|
Maximum: 3
|
||||||
SpawnInterval: 5
|
SpawnInterval: 5
|
||||||
WaterChance: 1
|
WaterChance: 1
|
||||||
|
CrateActors: unitcrate
|
||||||
-SpawnMPUnits:
|
-SpawnMPUnits:
|
||||||
-MPStartLocations:
|
-MPStartLocations:
|
||||||
CRATE:
|
UNITCRATE:
|
||||||
-LevelUpCrateAction:
|
Inherits: ^Crate
|
||||||
-GiveMcvCrateAction:
|
|
||||||
-GiveUnitCrateAction@jeep:
|
|
||||||
-GiveUnitCrateAction@1tnk:
|
|
||||||
-RevealMapCrateAction:
|
|
||||||
-HideMapCrateAction:
|
|
||||||
-ExplodeCrateAction@nuke:
|
|
||||||
-ExplodeCrateAction@boom:
|
|
||||||
-ExplodeCrateAction@fire:
|
|
||||||
-SupportPowerCrateAction@parabombs:
|
|
||||||
-GiveCashCrateAction:
|
|
||||||
-DuplicateUnitCrateAction:
|
|
||||||
-GiveUnitCrateAction@squadlight:
|
|
||||||
-GiveUnitCrateAction@squadheavyallies:
|
|
||||||
GiveUnitCrateAction@pt:
|
GiveUnitCrateAction@pt:
|
||||||
SelectionShares: 7
|
SelectionShares: 7
|
||||||
Units: pt
|
Units: pt
|
||||||
|
|||||||
@@ -189,21 +189,11 @@ Rules:
|
|||||||
CrateSpawner:
|
CrateSpawner:
|
||||||
Maximum: 3
|
Maximum: 3
|
||||||
SpawnInterval: 5
|
SpawnInterval: 5
|
||||||
|
CrateActors: unitcrate
|
||||||
-SpawnMPUnits:
|
-SpawnMPUnits:
|
||||||
-MPStartLocations:
|
-MPStartLocations:
|
||||||
CRATE:
|
UNITCRATE:
|
||||||
-LevelUpCrateAction:
|
Inherits: ^Crate
|
||||||
-GiveMcvCrateAction:
|
|
||||||
-RevealMapCrateAction:
|
|
||||||
-HideMapCrateAction:
|
|
||||||
-ExplodeCrateAction@nuke:
|
|
||||||
-ExplodeCrateAction@boom:
|
|
||||||
-ExplodeCrateAction@fire:
|
|
||||||
-SupportPowerCrateAction@parabombs:
|
|
||||||
-GiveCashCrateAction:
|
|
||||||
-DuplicateUnitCrateAction:
|
|
||||||
-GiveUnitCrateAction@squadlight:
|
|
||||||
-GiveUnitCrateAction@squadheavysoviet:
|
|
||||||
GiveUnitCrateAction@ttnk:
|
GiveUnitCrateAction@ttnk:
|
||||||
SelectionShares: 4
|
SelectionShares: 4
|
||||||
Units: ttnk
|
Units: ttnk
|
||||||
|
|||||||
@@ -482,32 +482,24 @@ Rules:
|
|||||||
CrateSpawner:
|
CrateSpawner:
|
||||||
Maximum: 1
|
Maximum: 1
|
||||||
SpawnInterval: 100
|
SpawnInterval: 100
|
||||||
|
CrateActors: fortcrate
|
||||||
-SpawnMPUnits:
|
-SpawnMPUnits:
|
||||||
-MPStartLocations:
|
-MPStartLocations:
|
||||||
LuaScript:
|
LuaScript:
|
||||||
Scripts: fort-lonestar.lua
|
Scripts: fort-lonestar.lua
|
||||||
CRATE:
|
FORTCRATE:
|
||||||
-LevelUpCrateAction:
|
Inherits: ^Crate
|
||||||
-GiveMcvCrateAction:
|
|
||||||
-RevealMapCrateAction:
|
|
||||||
-HideMapCrateAction:
|
|
||||||
-ExplodeCrateAction@nuke:
|
|
||||||
-ExplodeCrateAction@boom:
|
|
||||||
-ExplodeCrateAction@fire:
|
|
||||||
-GiveUnitCrateAction@jeep:
|
|
||||||
-GiveUnitCrateAction@arty:
|
|
||||||
-GiveUnitCrateAction@v2rl:
|
|
||||||
-GiveUnitCrateAction@1tnk:
|
|
||||||
-GiveUnitCrateAction@2tnk:
|
|
||||||
-GiveUnitCrateAction@3tnk:
|
|
||||||
-GiveUnitCrateAction@4tnk:
|
|
||||||
SupportPowerCrateAction@parabombs:
|
SupportPowerCrateAction@parabombs:
|
||||||
SelectionShares: 30
|
SelectionShares: 30
|
||||||
|
Proxy: powerproxy.parabombs
|
||||||
|
Effect: parabombs
|
||||||
HealUnitsCrateAction:
|
HealUnitsCrateAction:
|
||||||
SelectionShares: 30
|
SelectionShares: 30
|
||||||
|
Notification: heal2.aud
|
||||||
|
Effect: heal
|
||||||
GiveCashCrateAction:
|
GiveCashCrateAction:
|
||||||
Amount: 400
|
Amount: 400
|
||||||
UseCashTick: yes
|
UseCashTick: true
|
||||||
SelectionShares: 30
|
SelectionShares: 30
|
||||||
GiveUnitCrateAction@e7:
|
GiveUnitCrateAction@e7:
|
||||||
Units: e7
|
Units: e7
|
||||||
|
|||||||
Reference in New Issue
Block a user