Fix cargo loading/unloading.

- Fix the unloading subcell bug, letting us have units move to directly adjacent cells.
- Have the cursor change to a deploy-blocked cursor if the transport can't unload due to terrain type.
- Add RenderTransport for transport door opening.
- Remove turning/opening in general.
This commit is contained in:
ScottNZ
2014-02-10 22:49:41 +13:00
parent ea1d1320be
commit 025de83d3a
11 changed files with 182 additions and 97 deletions

View File

@@ -285,7 +285,7 @@ namespace OpenRA.Mods.RA.Missions
self.QueueActivity(new Move.Move(reinforcementsEntryPoint.Location));
self.QueueActivity(new RemoveSelf());
}));
lst.QueueActivity(new UnloadCargo(true));
lst.QueueActivity(new UnloadCargo(lst, true));
lst.QueueActivity(new Transform(lst, "lst.unselectable.nocargo") { SkipMakeAnims = true });
}
@@ -342,7 +342,7 @@ namespace OpenRA.Mods.RA.Missions
}));
lst.QueueActivity(new Move.Move(spyReinforcementsUnloadPoint.Location));
lst.QueueActivity(new Wait(10));
lst.QueueActivity(new UnloadCargo(true));
lst.QueueActivity(new UnloadCargo(lst, true));
lst.QueueActivity(new Transform(lst, "lst.unselectable.nocargo") { SkipMakeAnims = true });
}

View File

@@ -224,7 +224,7 @@ namespace OpenRA.Mods.RA.Missions
chinook.QueueActivity(new HeliFly(chinook, Target.FromPos(lz.CenterPosition + offset))); // no reservation of hpad but it's not needed
chinook.QueueActivity(new Turn(0));
chinook.QueueActivity(new HeliLand(false));
chinook.QueueActivity(new UnloadCargo(true));
chinook.QueueActivity(new UnloadCargo(chinook, true));
chinook.QueueActivity(new Wait(150));
chinook.QueueActivity(new HeliFly(chinook, Target.FromCell(entry)));
chinook.QueueActivity(new RemoveSelf());
@@ -313,7 +313,7 @@ namespace OpenRA.Mods.RA.Missions
{
var cargo = self.Trait<Cargo>();
if (!cargo.IsEmpty(self) && !(self.GetCurrentActivity() is UnloadCargo))
self.QueueActivity(false, new UnloadCargo(true));
self.QueueActivity(false, new UnloadCargo(self, true));
}
}
}

View File

@@ -63,7 +63,7 @@ namespace OpenRA.Mods.RA.Missions
chinook.QueueActivity(new HeliFly(chinook, Target.FromCell(lz)));
chinook.QueueActivity(new Turn(0));
chinook.QueueActivity(new HeliLand(true));
chinook.QueueActivity(new UnloadCargo(true));
chinook.QueueActivity(new UnloadCargo(chinook, true));
chinook.QueueActivity(new CallFunc(() => afterUnload(unit)));
chinook.QueueActivity(new Wait(150));
chinook.QueueActivity(new HeliFly(chinook, Target.FromCell(exit)));