Terraria 1.4.0.5 Source Code

This commit is contained in:
MikeyIsBaeYT 2021-10-26 12:45:26 -04:00
commit 05205f009e
1059 changed files with 563450 additions and 0 deletions

View file

@ -0,0 +1,39 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.AnchorDataModule
// 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 Terraria.DataStructures;
namespace Terraria.Modules
{
public class AnchorDataModule
{
public AnchorData top;
public AnchorData bottom;
public AnchorData left;
public AnchorData right;
public bool wall;
public AnchorDataModule(AnchorDataModule copyFrom = null)
{
if (copyFrom == null)
{
this.top = new AnchorData();
this.bottom = new AnchorData();
this.left = new AnchorData();
this.right = new AnchorData();
this.wall = false;
}
else
{
this.top = copyFrom.top;
this.bottom = copyFrom.bottom;
this.left = copyFrom.left;
this.right = copyFrom.right;
this.wall = copyFrom.wall;
}
}
}
}

View file

@ -0,0 +1,68 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.AnchorTypesModule
// 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 System;
namespace Terraria.Modules
{
public class AnchorTypesModule
{
public int[] tileValid;
public int[] tileInvalid;
public int[] tileAlternates;
public int[] wallValid;
public AnchorTypesModule(AnchorTypesModule copyFrom = null)
{
if (copyFrom == null)
{
this.tileValid = (int[]) null;
this.tileInvalid = (int[]) null;
this.tileAlternates = (int[]) null;
this.wallValid = (int[]) null;
}
else
{
if (copyFrom.tileValid == null)
{
this.tileValid = (int[]) null;
}
else
{
this.tileValid = new int[copyFrom.tileValid.Length];
Array.Copy((Array) copyFrom.tileValid, (Array) this.tileValid, this.tileValid.Length);
}
if (copyFrom.tileInvalid == null)
{
this.tileInvalid = (int[]) null;
}
else
{
this.tileInvalid = new int[copyFrom.tileInvalid.Length];
Array.Copy((Array) copyFrom.tileInvalid, (Array) this.tileInvalid, this.tileInvalid.Length);
}
if (copyFrom.tileAlternates == null)
{
this.tileAlternates = (int[]) null;
}
else
{
this.tileAlternates = new int[copyFrom.tileAlternates.Length];
Array.Copy((Array) copyFrom.tileAlternates, (Array) this.tileAlternates, this.tileAlternates.Length);
}
if (copyFrom.wallValid == null)
{
this.wallValid = (int[]) null;
}
else
{
this.wallValid = new int[copyFrom.wallValid.Length];
Array.Copy((Array) copyFrom.wallValid, (Array) this.wallValid, this.wallValid.Length);
}
}
}
}
}

View file

@ -0,0 +1,28 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.LiquidDeathModule
// 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
namespace Terraria.Modules
{
public class LiquidDeathModule
{
public bool water;
public bool lava;
public LiquidDeathModule(LiquidDeathModule copyFrom = null)
{
if (copyFrom == null)
{
this.water = false;
this.lava = false;
}
else
{
this.water = copyFrom.water;
this.lava = copyFrom.lava;
}
}
}
}

View file

@ -0,0 +1,30 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.LiquidPlacementModule
// 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 Terraria.Enums;
namespace Terraria.Modules
{
public class LiquidPlacementModule
{
public LiquidPlacement water;
public LiquidPlacement lava;
public LiquidPlacementModule(LiquidPlacementModule copyFrom = null)
{
if (copyFrom == null)
{
this.water = LiquidPlacement.Allowed;
this.lava = LiquidPlacement.Allowed;
}
else
{
this.water = copyFrom.water;
this.lava = copyFrom.lava;
}
}
}
}

View file

@ -0,0 +1,32 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.TileObjectAlternatesModule
// 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 System.Collections.Generic;
using Terraria.ObjectData;
namespace Terraria.Modules
{
public class TileObjectAlternatesModule
{
public List<TileObjectData> data;
public TileObjectAlternatesModule(TileObjectAlternatesModule copyFrom = null)
{
if (copyFrom == null)
this.data = (List<TileObjectData>) null;
else if (copyFrom.data == null)
{
this.data = (List<TileObjectData>) null;
}
else
{
this.data = new List<TileObjectData>(copyFrom.data.Count);
for (int index = 0; index < copyFrom.data.Count; ++index)
this.data.Add(new TileObjectData(copyFrom.data[index]));
}
}
}
}

View file

@ -0,0 +1,43 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.TileObjectBaseModule
// 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 Terraria.DataStructures;
using Terraria.Enums;
namespace Terraria.Modules
{
public class TileObjectBaseModule
{
public int width;
public int height;
public Point16 origin;
public TileObjectDirection direction;
public int randomRange;
public bool flattenAnchors;
public TileObjectBaseModule(TileObjectBaseModule copyFrom = null)
{
if (copyFrom == null)
{
this.width = 1;
this.height = 1;
this.origin = Point16.Zero;
this.direction = TileObjectDirection.None;
this.randomRange = 0;
this.flattenAnchors = false;
}
else
{
this.width = copyFrom.width;
this.height = copyFrom.height;
this.origin = copyFrom.origin;
this.direction = copyFrom.direction;
this.randomRange = copyFrom.randomRange;
this.flattenAnchors = copyFrom.flattenAnchors;
}
}
}
}

View file

@ -0,0 +1,62 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.TileObjectCoordinatesModule
// 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 System;
using Terraria.DataStructures;
namespace Terraria.Modules
{
public class TileObjectCoordinatesModule
{
public int width;
public int[] heights;
public int padding;
public Point16 paddingFix;
public int styleWidth;
public int styleHeight;
public bool calculated;
public int drawStyleOffset;
public TileObjectCoordinatesModule(TileObjectCoordinatesModule copyFrom = null, int[] drawHeight = null)
{
if (copyFrom == null)
{
this.width = 0;
this.padding = 0;
this.paddingFix = Point16.Zero;
this.styleWidth = 0;
this.drawStyleOffset = 0;
this.styleHeight = 0;
this.calculated = false;
this.heights = drawHeight;
}
else
{
this.width = copyFrom.width;
this.padding = copyFrom.padding;
this.paddingFix = copyFrom.paddingFix;
this.drawStyleOffset = copyFrom.drawStyleOffset;
this.styleWidth = copyFrom.styleWidth;
this.styleHeight = copyFrom.styleHeight;
this.calculated = copyFrom.calculated;
if (drawHeight == null)
{
if (copyFrom.heights == null)
{
this.heights = (int[]) null;
}
else
{
this.heights = new int[copyFrom.heights.Length];
Array.Copy((Array) copyFrom.heights, (Array) this.heights, this.heights.Length);
}
}
else
this.heights = drawHeight;
}
}
}
}

View file

@ -0,0 +1,37 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.TileObjectDrawModule
// 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
namespace Terraria.Modules
{
public class TileObjectDrawModule
{
public int xOffset;
public int yOffset;
public bool flipHorizontal;
public bool flipVertical;
public int stepDown;
public TileObjectDrawModule(TileObjectDrawModule copyFrom = null)
{
if (copyFrom == null)
{
this.xOffset = 0;
this.yOffset = 0;
this.flipHorizontal = false;
this.flipVertical = false;
this.stepDown = 0;
}
else
{
this.xOffset = copyFrom.xOffset;
this.yOffset = copyFrom.yOffset;
this.flipHorizontal = copyFrom.flipHorizontal;
this.flipVertical = copyFrom.flipVertical;
this.stepDown = copyFrom.stepDown;
}
}
}
}

View file

@ -0,0 +1,43 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.TileObjectStyleModule
// 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
namespace Terraria.Modules
{
public class TileObjectStyleModule
{
public int style;
public bool horizontal;
public int styleWrapLimit;
public int styleMultiplier;
public int styleLineSkip;
public int? styleWrapLimitVisualOverride;
public int? styleLineSkipVisualoverride;
public TileObjectStyleModule(TileObjectStyleModule copyFrom = null)
{
if (copyFrom == null)
{
this.style = 0;
this.horizontal = false;
this.styleWrapLimit = 0;
this.styleWrapLimitVisualOverride = new int?();
this.styleLineSkipVisualoverride = new int?();
this.styleMultiplier = 1;
this.styleLineSkip = 1;
}
else
{
this.style = copyFrom.style;
this.horizontal = copyFrom.horizontal;
this.styleWrapLimit = copyFrom.styleWrapLimit;
this.styleMultiplier = copyFrom.styleMultiplier;
this.styleLineSkip = copyFrom.styleLineSkip;
this.styleWrapLimitVisualOverride = copyFrom.styleWrapLimitVisualOverride;
this.styleLineSkipVisualoverride = copyFrom.styleLineSkipVisualoverride;
}
}
}
}

View file

@ -0,0 +1,32 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.TileObjectSubTilesModule
// 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 System.Collections.Generic;
using Terraria.ObjectData;
namespace Terraria.Modules
{
public class TileObjectSubTilesModule
{
public List<TileObjectData> data;
public TileObjectSubTilesModule(TileObjectSubTilesModule copyFrom = null, List<TileObjectData> newData = null)
{
if (copyFrom == null)
this.data = (List<TileObjectData>) null;
else if (copyFrom.data == null)
{
this.data = (List<TileObjectData>) null;
}
else
{
this.data = new List<TileObjectData>(copyFrom.data.Count);
for (int index = 0; index < this.data.Count; ++index)
this.data.Add(new TileObjectData(copyFrom.data[index]));
}
}
}
}

View file

@ -0,0 +1,36 @@
// Decompiled with JetBrains decompiler
// Type: Terraria.Modules.TilePlacementHooksModule
// 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 Terraria.DataStructures;
namespace Terraria.Modules
{
public class TilePlacementHooksModule
{
public PlacementHook check;
public PlacementHook postPlaceEveryone;
public PlacementHook postPlaceMyPlayer;
public PlacementHook placeOverride;
public TilePlacementHooksModule(TilePlacementHooksModule copyFrom = null)
{
if (copyFrom == null)
{
this.check = new PlacementHook();
this.postPlaceEveryone = new PlacementHook();
this.postPlaceMyPlayer = new PlacementHook();
this.placeOverride = new PlacementHook();
}
else
{
this.check = copyFrom.check;
this.postPlaceEveryone = copyFrom.postPlaceEveryone;
this.postPlaceMyPlayer = copyFrom.postPlaceMyPlayer;
this.placeOverride = copyFrom.placeOverride;
}
}
}
}