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\ExportCharacterSeparatedRules.cs" />
|
||||
<Compile Include="UtilityCommands\Extensions.cs" />
|
||||
<Compile Include="Lint\CheckMapRules.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
||||
|
||||
@@ -203,35 +203,26 @@ Rules:
|
||||
CrateSpawner:
|
||||
Maximum: 4
|
||||
SpawnInterval: 5
|
||||
CrateActors: unitcrate
|
||||
-SpawnMPUnits:
|
||||
-MPStartLocations:
|
||||
CRATE:
|
||||
-HealUnitsCrateAction:
|
||||
-LevelUpCrateAction:
|
||||
-GiveMcvCrateAction:
|
||||
-RevealMapCrateAction:
|
||||
-HideMapCrateAction:
|
||||
-GrantUpgradeCrateAction@cloak:
|
||||
-ExplodeCrateAction@nuke:
|
||||
-ExplodeCrateAction@boom:
|
||||
-ExplodeCrateAction@fire:
|
||||
-SupportPowerCrateAction@parabombs:
|
||||
-GiveCashCrateAction:
|
||||
UNITCRATE:
|
||||
Inherits: ^Crate
|
||||
GiveUnitCrateAction@stnk:
|
||||
SelectionShares: 4
|
||||
Unit: stnk
|
||||
Units: stnk
|
||||
GiveUnitCrateAction@bike:
|
||||
SelectionShares: 6
|
||||
Unit: bike
|
||||
Units: bike
|
||||
GiveUnitCrateAction@htnk:
|
||||
SelectionShares: 1
|
||||
Unit: htnk
|
||||
Units: htnk
|
||||
GiveUnitCrateAction@e5:
|
||||
SelectionShares: 1
|
||||
Unit: e5
|
||||
Units: e5
|
||||
GiveUnitCrateAction@e1:
|
||||
SelectionShares: 1
|
||||
Unit: e1
|
||||
Units: e1
|
||||
APC:
|
||||
Health:
|
||||
HP: 1000
|
||||
|
||||
@@ -294,21 +294,11 @@ Rules:
|
||||
CrateSpawner:
|
||||
Maximum: 3
|
||||
SpawnInterval: 5
|
||||
CrateActors: unitcrate
|
||||
-SpawnMPUnits:
|
||||
-MPStartLocations:
|
||||
CRATE:
|
||||
-LevelUpCrateAction:
|
||||
-GiveMcvCrateAction:
|
||||
-RevealMapCrateAction:
|
||||
-HideMapCrateAction:
|
||||
-ExplodeCrateAction@nuke:
|
||||
-ExplodeCrateAction@boom:
|
||||
-ExplodeCrateAction@fire:
|
||||
-SupportPowerCrateAction@parabombs:
|
||||
-GiveCashCrateAction:
|
||||
-DuplicateUnitCrateAction:
|
||||
-GiveUnitCrateAction@squadlight:
|
||||
-GiveUnitCrateAction@squadheavysoviet:
|
||||
UNITCRATE:
|
||||
Inherits: ^Crate
|
||||
GiveUnitCrateAction@ttnk:
|
||||
SelectionShares: 4
|
||||
Units: ttnk
|
||||
|
||||
@@ -208,23 +208,11 @@ Rules:
|
||||
Maximum: 3
|
||||
SpawnInterval: 5
|
||||
WaterChance: 1
|
||||
CrateActors: unitcrate
|
||||
-SpawnMPUnits:
|
||||
-MPStartLocations:
|
||||
CRATE:
|
||||
-LevelUpCrateAction:
|
||||
-GiveMcvCrateAction:
|
||||
-GiveUnitCrateAction@jeep:
|
||||
-GiveUnitCrateAction@1tnk:
|
||||
-RevealMapCrateAction:
|
||||
-HideMapCrateAction:
|
||||
-ExplodeCrateAction@nuke:
|
||||
-ExplodeCrateAction@boom:
|
||||
-ExplodeCrateAction@fire:
|
||||
-SupportPowerCrateAction@parabombs:
|
||||
-GiveCashCrateAction:
|
||||
-DuplicateUnitCrateAction:
|
||||
-GiveUnitCrateAction@squadlight:
|
||||
-GiveUnitCrateAction@squadheavyallies:
|
||||
UNITCRATE:
|
||||
Inherits: ^Crate
|
||||
GiveUnitCrateAction@pt:
|
||||
SelectionShares: 7
|
||||
Units: pt
|
||||
|
||||
@@ -189,21 +189,11 @@ Rules:
|
||||
CrateSpawner:
|
||||
Maximum: 3
|
||||
SpawnInterval: 5
|
||||
CrateActors: unitcrate
|
||||
-SpawnMPUnits:
|
||||
-MPStartLocations:
|
||||
CRATE:
|
||||
-LevelUpCrateAction:
|
||||
-GiveMcvCrateAction:
|
||||
-RevealMapCrateAction:
|
||||
-HideMapCrateAction:
|
||||
-ExplodeCrateAction@nuke:
|
||||
-ExplodeCrateAction@boom:
|
||||
-ExplodeCrateAction@fire:
|
||||
-SupportPowerCrateAction@parabombs:
|
||||
-GiveCashCrateAction:
|
||||
-DuplicateUnitCrateAction:
|
||||
-GiveUnitCrateAction@squadlight:
|
||||
-GiveUnitCrateAction@squadheavysoviet:
|
||||
UNITCRATE:
|
||||
Inherits: ^Crate
|
||||
GiveUnitCrateAction@ttnk:
|
||||
SelectionShares: 4
|
||||
Units: ttnk
|
||||
|
||||
@@ -482,32 +482,24 @@ Rules:
|
||||
CrateSpawner:
|
||||
Maximum: 1
|
||||
SpawnInterval: 100
|
||||
CrateActors: fortcrate
|
||||
-SpawnMPUnits:
|
||||
-MPStartLocations:
|
||||
LuaScript:
|
||||
Scripts: fort-lonestar.lua
|
||||
CRATE:
|
||||
-LevelUpCrateAction:
|
||||
-GiveMcvCrateAction:
|
||||
-RevealMapCrateAction:
|
||||
-HideMapCrateAction:
|
||||
-ExplodeCrateAction@nuke:
|
||||
-ExplodeCrateAction@boom:
|
||||
-ExplodeCrateAction@fire:
|
||||
-GiveUnitCrateAction@jeep:
|
||||
-GiveUnitCrateAction@arty:
|
||||
-GiveUnitCrateAction@v2rl:
|
||||
-GiveUnitCrateAction@1tnk:
|
||||
-GiveUnitCrateAction@2tnk:
|
||||
-GiveUnitCrateAction@3tnk:
|
||||
-GiveUnitCrateAction@4tnk:
|
||||
FORTCRATE:
|
||||
Inherits: ^Crate
|
||||
SupportPowerCrateAction@parabombs:
|
||||
SelectionShares: 30
|
||||
Proxy: powerproxy.parabombs
|
||||
Effect: parabombs
|
||||
HealUnitsCrateAction:
|
||||
SelectionShares: 30
|
||||
Notification: heal2.aud
|
||||
Effect: heal
|
||||
GiveCashCrateAction:
|
||||
Amount: 400
|
||||
UseCashTick: yes
|
||||
UseCashTick: true
|
||||
SelectionShares: 30
|
||||
GiveUnitCrateAction@e7:
|
||||
Units: e7
|
||||
|
||||
Reference in New Issue
Block a user