37 lines
1 KiB
C#
37 lines
1 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Terraria.WorldBuilding.GenShape
|
|
// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83
|
|
// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
namespace Terraria.WorldBuilding
|
|
{
|
|
public abstract class GenShape : GenBase
|
|
{
|
|
private ShapeData _outputData;
|
|
protected bool _quitOnFail;
|
|
|
|
public abstract bool Perform(Point origin, GenAction action);
|
|
|
|
protected bool UnitApply(GenAction action, Point origin, int x, int y, params object[] args)
|
|
{
|
|
if (this._outputData != null)
|
|
this._outputData.Add(x - origin.X, y - origin.Y);
|
|
return action.Apply(origin, x, y, args);
|
|
}
|
|
|
|
public GenShape Output(ShapeData outputData)
|
|
{
|
|
this._outputData = outputData;
|
|
return this;
|
|
}
|
|
|
|
public GenShape QuitOnFail(bool value = true)
|
|
{
|
|
this._quitOnFail = value;
|
|
return this;
|
|
}
|
|
}
|
|
}
|