terraria-source-code/GameContent/Generation/ActionPlaceStatue.cs
2021-10-27 18:03:19 -04:00

26 lines
1 KiB
C#

// Decompiled with JetBrains decompiler
// Type: Terraria.GameContent.Generation.ActionPlaceStatue
// 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;
using Terraria.DataStructures;
using Terraria.World.Generation;
namespace Terraria.GameContent.Generation
{
public class ActionPlaceStatue : GenAction
{
private int _statueIndex;
public ActionPlaceStatue(int index = -1) => this._statueIndex = index;
public override bool Apply(Point origin, int x, int y, params object[] args)
{
Point16 point16 = this._statueIndex != -1 ? WorldGen.statueList[this._statueIndex] : WorldGen.statueList[GenBase._random.Next(2, WorldGen.statueList.Length)];
WorldGen.PlaceTile(x, y, (int) point16.X, true, style: ((int) point16.Y));
return this.UnitApply(origin, x, y, args);
}
}
}