Add support for custom locations to legacy map importer

For example, to place actors with changed footprint correctly.
Use it to ensure correct positioning of several RA and TD structures as well as TD tiberium trees.
This commit is contained in:
reaperrr
2016-05-30 22:55:20 +02:00
parent b5a67444e7
commit 57ff4822fc
3 changed files with 36 additions and 5 deletions

View File

@@ -126,6 +126,17 @@ namespace OpenRA.Mods.RA.UtilityCommands
return input.ToLowerInvariant();
}
public override CPos ParseActorLocation(string input, int loc)
{
var newLoc = new CPos(loc % MapSize, loc / MapSize);
var vectorDown = new CVec(0, 1);
if (input == "tsla" || input == "agun" || input == "gap" || input == "apwr" || input == "iron")
newLoc += vectorDown;
return newLoc;
}
public override void LoadPlayer(IniFile file, string section)
{
string color;