Check for producee's IOccupySpaceInfo for production completation.
This commit is contained in:
committed by
reaperrr
parent
f9ef41f165
commit
7a9d04395a
@@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
foreach (var init in inits)
|
foreach (var init in inits)
|
||||||
td.Add(init);
|
td.Add(init);
|
||||||
|
|
||||||
if (exitinfo != null && self.OccupiesSpace != null)
|
if (exitinfo != null && self.OccupiesSpace != null && producee.HasTraitInfo<IOccupySpaceInfo>())
|
||||||
{
|
{
|
||||||
exit = self.Location + exitinfo.ExitCell;
|
exit = self.Location + exitinfo.ExitCell;
|
||||||
var spawn = self.CenterPosition + exitinfo.SpawnOffset;
|
var spawn = self.CenterPosition + exitinfo.SpawnOffset;
|
||||||
@@ -124,7 +124,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
// Pick a spawn/exit point pair
|
// Pick a spawn/exit point pair
|
||||||
var exit = SelectExit(self, producee, productionType);
|
var exit = SelectExit(self, producee, productionType);
|
||||||
|
|
||||||
if (exit != null || self.OccupiesSpace == null)
|
if (exit != null || self.OccupiesSpace == null || !producee.HasTraitInfo<IOccupySpaceInfo>())
|
||||||
{
|
{
|
||||||
DoProduction(self, producee, exit == null ? null : exit.Info, productionType, inits);
|
DoProduction(self, producee, exit == null ? null : exit.Info, productionType, inits);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user