add me (jongleur1983) to AUTHORS
#14558: MovingToRefinery takes actor instead of CPos DeliveryOffset (previously added by the harvester) is now taken into account by the AutoCarryable fix whitespaces
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -109,6 +109,7 @@ Also thanks to:
|
|||||||
* Paul Dovydaitis (pdovy)
|
* Paul Dovydaitis (pdovy)
|
||||||
* Pavlos Touboulidis (pav)
|
* Pavlos Touboulidis (pav)
|
||||||
* Pedro Ferreira Ramos (bateramos)
|
* Pedro Ferreira Ramos (bateramos)
|
||||||
|
* Peter Amrehn (jongleur1983)
|
||||||
* Pizzaoverhead
|
* Pizzaoverhead
|
||||||
* Pi Delport (pjdelport)
|
* Pi Delport (pjdelport)
|
||||||
* Psydev
|
* Psydev
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
{
|
{
|
||||||
var notify = self.TraitsImplementing<INotifyHarvesterAction>();
|
var notify = self.TraitsImplementing<INotifyHarvesterAction>();
|
||||||
foreach (var n in notify)
|
foreach (var n in notify)
|
||||||
n.MovingToRefinery(self, proc.Location + iao.DeliveryOffset, this);
|
n.MovingToRefinery(self, proc, this);
|
||||||
|
|
||||||
return ActivityUtils.SequenceActivities(movement.MoveTo(proc.Location + iao.DeliveryOffset, 0), this);
|
return ActivityUtils.SequenceActivities(movement.MoveTo(proc.Location + iao.DeliveryOffset, 0), this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,13 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
public WDist MinimumDistance { get { return info.MinDistance; } }
|
public WDist MinimumDistance { get { return info.MinDistance; } }
|
||||||
|
|
||||||
void INotifyHarvesterAction.MovingToResources(Actor self, CPos targetCell, Activity next) { RequestTransport(self, targetCell, next); }
|
void INotifyHarvesterAction.MovingToResources(Actor self, CPos targetCell, Activity next) { RequestTransport(self, targetCell, next); }
|
||||||
void INotifyHarvesterAction.MovingToRefinery(Actor self, CPos targetCell, Activity next) { RequestTransport(self, targetCell, next); }
|
|
||||||
|
void INotifyHarvesterAction.MovingToRefinery(Actor self, Actor refineryActor, Activity next)
|
||||||
|
{
|
||||||
|
var iao = refineryActor.Trait<IAcceptResources>();
|
||||||
|
RequestTransport(self, refineryActor.Location + iao.DeliveryOffset, next);
|
||||||
|
}
|
||||||
|
|
||||||
void INotifyHarvesterAction.MovementCancelled(Actor self) { MovementCancelled(self); }
|
void INotifyHarvesterAction.MovementCancelled(Actor self) { MovementCancelled(self); }
|
||||||
|
|
||||||
// We do not handle Harvested notification
|
// We do not handle Harvested notification
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
void INotifyHarvesterAction.MovingToResources(Actor self, CPos targetCell, Activity next) { }
|
void INotifyHarvesterAction.MovingToResources(Actor self, CPos targetCell, Activity next) { }
|
||||||
|
|
||||||
void INotifyHarvesterAction.MovingToRefinery(Actor self, CPos targetCell, Activity next) { }
|
void INotifyHarvesterAction.MovingToRefinery(Actor self, Actor refineryActor, Activity next) { }
|
||||||
|
|
||||||
void INotifyHarvesterAction.MovementCancelled(Actor self) { }
|
void INotifyHarvesterAction.MovementCancelled(Actor self) { }
|
||||||
|
|
||||||
|
|||||||
@@ -413,8 +413,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
var deliver = new DeliverResources(self);
|
var deliver = new DeliverResources(self);
|
||||||
self.QueueActivity(deliver);
|
self.QueueActivity(deliver);
|
||||||
|
|
||||||
foreach (var n in notify)
|
if (order.Target.Type == TargetType.Actor)
|
||||||
n.MovingToRefinery(self, order.Target.Actor.Location, deliver);
|
foreach (var n in notify)
|
||||||
|
n.MovingToRefinery(self, order.Target.Actor, deliver);
|
||||||
}
|
}
|
||||||
else if (order.OrderString == "Stop" || order.OrderString == "Move")
|
else if (order.OrderString == "Stop" || order.OrderString == "Move")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
|||||||
}
|
}
|
||||||
|
|
||||||
void INotifyHarvesterAction.MovingToResources(Actor self, CPos targetCell, Activity next) { }
|
void INotifyHarvesterAction.MovingToResources(Actor self, CPos targetCell, Activity next) { }
|
||||||
void INotifyHarvesterAction.MovingToRefinery(Actor self, CPos targetCell, Activity next) { }
|
void INotifyHarvesterAction.MovingToRefinery(Actor self, Actor refineryActor, Activity next) { }
|
||||||
void INotifyHarvesterAction.MovementCancelled(Actor self) { }
|
void INotifyHarvesterAction.MovementCancelled(Actor self) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void MovingToResources(Actor self, CPos targetCell, Activity next) { }
|
public void MovingToResources(Actor self, CPos targetCell, Activity next) { }
|
||||||
public void MovingToRefinery(Actor self, CPos targetCell, Activity next) { }
|
public void MovingToRefinery(Actor self, Actor targetRefinery, Activity next) { }
|
||||||
public void MovementCancelled(Actor self) { }
|
public void MovementCancelled(Actor self) { }
|
||||||
public void Docked() { }
|
public void Docked() { }
|
||||||
public void Undocked() { }
|
public void Undocked() { }
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
public interface INotifyHarvesterAction
|
public interface INotifyHarvesterAction
|
||||||
{
|
{
|
||||||
void MovingToResources(Actor self, CPos targetCell, Activity next);
|
void MovingToResources(Actor self, CPos targetCell, Activity next);
|
||||||
void MovingToRefinery(Actor self, CPos targetCell, Activity next);
|
void MovingToRefinery(Actor self, Actor refineryActor, Activity next);
|
||||||
void MovementCancelled(Actor self);
|
void MovementCancelled(Actor self);
|
||||||
void Harvested(Actor self, ResourceType resource);
|
void Harvested(Actor self, ResourceType resource);
|
||||||
void Docked();
|
void Docked();
|
||||||
|
|||||||
Reference in New Issue
Block a user