Terraria 1.3.5.3 Source Code
This commit is contained in:
commit
4b21dac4b6
503 changed files with 409032 additions and 0 deletions
41
World/Generation/GenSearch.cs
Normal file
41
World/Generation/GenSearch.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
// Decompiled with JetBrains decompiler
|
||||
// Type: Terraria.World.Generation.GenSearch
|
||||
// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08
|
||||
// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Terraria.World.Generation
|
||||
{
|
||||
public abstract class GenSearch : GenBase
|
||||
{
|
||||
public static Point NOT_FOUND = new Point(int.MaxValue, int.MaxValue);
|
||||
private bool _requireAll = true;
|
||||
private GenCondition[] _conditions;
|
||||
|
||||
public GenSearch Conditions(params GenCondition[] conditions)
|
||||
{
|
||||
this._conditions = conditions;
|
||||
return this;
|
||||
}
|
||||
|
||||
public abstract Point Find(Point origin);
|
||||
|
||||
protected bool Check(int x, int y)
|
||||
{
|
||||
for (int index = 0; index < this._conditions.Length; ++index)
|
||||
{
|
||||
if (this._requireAll ^ this._conditions[index].IsValid(x, y))
|
||||
return !this._requireAll;
|
||||
}
|
||||
return this._requireAll;
|
||||
}
|
||||
|
||||
public GenSearch RequireAll(bool mode)
|
||||
{
|
||||
this._requireAll = mode;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue