Units automatically path around known hazards (eg static base defenses). Test using SAM and TRAN.
Todo: Ignore hazards when force-moving; Apply only to known enemy hazards; Implement more hazard classes Also add a few files I forgot from previous patches
This commit is contained in:
@@ -22,6 +22,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
@@ -53,11 +54,13 @@ namespace OpenRA.Traits
|
||||
public interface INotifyCapture { void OnCapture(Actor self, Actor captor); }
|
||||
public interface IAcceptSpy { void OnInfiltrate(Actor self, Actor spy); }
|
||||
public interface INotifyEnterCell { void OnEnterCell(Actor self, int2 cell); }
|
||||
public interface IProvideHazard { IEnumerable<HazardLayer.Hazard> HazardCells(Actor self); }
|
||||
public interface IAvoidHazard { string Type { get; } }
|
||||
|
||||
public interface ICustomTerrain
|
||||
{
|
||||
float GetCost(int2 p, UnitMovementType umt);
|
||||
float GetSpeedModifier(int2 p, UnitMovementType umt);
|
||||
float GetCost(int2 p, Actor forActor);
|
||||
float GetSpeedModifier(int2 p, Actor forActor);
|
||||
}
|
||||
|
||||
public interface IDisable { bool Disabled { get; } }
|
||||
|
||||
Reference in New Issue
Block a user