fix #18 -- harvs built at weap choose a proc when trying to return now
This commit is contained in:
@@ -25,11 +25,16 @@ namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
if( NextActivity != null )
|
||||
return NextActivity;
|
||||
|
||||
var proc = self.traits.Get<Harvester>().LinkedProc;
|
||||
|
||||
if (proc == null)
|
||||
return new Wait(10) { NextActivity = this };
|
||||
|
||||
var harv = self.traits.Get<Harvester>();
|
||||
|
||||
if (harv.LinkedProc == null)
|
||||
harv.ChooseNewProc(self, null);
|
||||
|
||||
if (harv.LinkedProc == null)
|
||||
return new Wait(25) { NextActivity = this };
|
||||
|
||||
var proc = harv.LinkedProc;
|
||||
|
||||
if( self.Location != proc.Location + proc.traits.Get<IAcceptOre>().DeliverOffset )
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.RA
|
||||
self.QueueActivity( new CallFunc( () => ChooseNewProc(self, null)));
|
||||
}
|
||||
|
||||
void ChooseNewProc(Actor self, Actor ignore)
|
||||
public void ChooseNewProc(Actor self, Actor ignore)
|
||||
{
|
||||
LinkedProc = ClosestProc(self, ignore);
|
||||
if (LinkedProc != null)
|
||||
|
||||
Reference in New Issue
Block a user