Polish map editor code

This commit is contained in:
Gustas
2024-08-16 17:53:49 +03:00
committed by Paul Chote
parent 7775b42b59
commit b073155018
7 changed files with 42 additions and 54 deletions

View File

@@ -189,22 +189,6 @@ namespace OpenRA.Mods.Common.Traits
return ++CurrentToken;
}
public void MoveActor(EditorActorPreview preview, CPos location)
{
editorLayer.Remove(preview);
preview.ReplaceInit(new LocationInit(location));
var ios = preview.Info.TraitInfoOrDefault<IOccupySpaceInfo>();
if (ios != null && ios.SharesCell)
{
var actorSubCell = editorLayer.FreeSubCellAt(location);
if (actorSubCell != SubCell.Invalid)
preview.ReplaceInit(new SubCellInit(actorSubCell));
}
preview.UpdateFromMove();
editorLayer.Add(preview);
}
public int SetTerrainTemplate(WorldRenderer wr, TerrainTemplateInfo template)
{
terrainOrResourceCell = wr.Viewport.ViewToWorld(wr.Viewport.WorldToViewPx(Viewport.LastMousePos));