implemented more code for adding more pegs, but still a lot of work to do on pathfinding, targeting, map etc.

This commit is contained in:
2026-07-02 03:15:15 -04:00
parent 909f466f92
commit cbdca6f3cb
16 changed files with 170 additions and 50 deletions
+3 -3
View File
@@ -18,7 +18,6 @@ public partial class BasicMovement : PegAction
public override Tween CreateAnimation(Peg PEG)
{
GD.Print(PEG._address);
PegController pegController = PEG._pegController;
Map map = pegController._playArea._map;
Vector2I cell = PEG._path[0];
@@ -33,7 +32,7 @@ public partial class BasicMovement : PegAction
public override void DoImmediately(Peg PEG)
{
List<Vector2I> path = PEG.GetBestPath();
List<Vector2I> path = PEG.GetBestPath(true);
PegController pegController = PEG._pegController;
Map map = pegController._playArea._map;
if (path?.Count == 0)
@@ -48,7 +47,8 @@ public partial class BasicMovement : PegAction
public override bool MeetsCriteria(Peg PEG)
{
return base.MeetsCriteria(PEG) && PEG._address.Y > PEG._pegController._playArea._map._firstOpenRow;
List<Vector2I> bestPath = PEG.GetBestPath(true);
return base.MeetsCriteria(PEG) && bestPath.Count > 0 && (int)PEG._pegController._playArea._map.GetCellTileData(bestPath[0]).GetCustomData("disposition") != -PEG._disposition;
}