Skip to content

Commit

Permalink
Removed namespace from XNA types, allowing it to be used without a us…
Browse files Browse the repository at this point in the history
…ing statement.

Added PacketTypes.cs, which must be updated for all the new packets.
  • Loading branch information
White committed Jul 4, 2015
1 parent f47acc2 commit d2b2987
Show file tree
Hide file tree
Showing 100 changed files with 3,861 additions and 3,826 deletions.
15 changes: 15 additions & 0 deletions IPackedVector.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;

public interface IPackedVector
{
void PackFromVector4(Vector4 vector);
Vector4 ToVector4();
}
public interface IPackedVector<TPacked> : IPackedVector
{
TPacked PackedValue
{
get;
set;
}
}
80 changes: 80 additions & 0 deletions PacketTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
using System;
public enum PacketTypes
{
ConnectRequest = 1,
Disconnect,
ContinueConnecting,
PlayerInfo,
PlayerSlot,
ContinueConnecting2,
WorldInfo,
TileGetSection,
Status,
TileSendSection,
TileFrameSection,
PlayerSpawn,
PlayerUpdate,
PlayerActive,
SyncPlayers,
PlayerHp,
Tile,
TimeSet,
DoorUse,
TileSendSquare,
ItemDrop,
ItemOwner,
NpcUpdate,
NpcItemStrike,
ChatText,
PlayerDamage,
ProjectileNew,
NpcStrike,
ProjectileDestroy,
TogglePvp,
ChestGetContents,
ChestItem,
ChestOpen,
TileKill,
EffectHeal,
Zones,
PasswordRequired,
PasswordSend,
ItemUnknown,
NpcTalk,
PlayerAnimation,
PlayerMana,
EffectMana,
PlayerKillMe,
PlayerTeam,
SignRead,
SignNew,
LiquidSet,
PlayerSpawnSelf,
PlayerBuff,
NpcSpecial,
ChestUnlock,
NpcAddBuff,
NpcUpdateBuff,
PlayerAddBuff,
UpdateNPCName,
UpdateGoodEvil,
PlayHarp,
HitSwitch,
UpdateNPCHome,
SpawnBossorInvasion,
PlayerDodge,
PaintTile,
PaintWall,
Teleport,
PlayerHealOther,
Placeholder,
ClientUUID,
ChestName,
CatchNPC,
ReleaseNPC,
SetShop,
TeleportationPotion,
AnglerQuest,
CompleteAnglerQuest,
NumberOfAnglerQuestsCompleted,
}
2 changes: 1 addition & 1 deletion Terraria/Chest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria.DataStructures;
using Terraria.GameContent.Achievements;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/Cloud.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;

namespace Terraria
Expand Down
2 changes: 1 addition & 1 deletion Terraria/Collision.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;

Expand Down
2 changes: 1 addition & 1 deletion Terraria/CombatText.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;

namespace Terraria
Expand Down
2 changes: 1 addition & 1 deletion Terraria/DataStructures/DrawAnimation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;

Expand Down
2 changes: 1 addition & 1 deletion Terraria/DataStructures/DrawAnimationVertical.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;

Expand Down
2 changes: 1 addition & 1 deletion Terraria/DataStructures/DrillDebugDraw.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;

namespace Terraria.DataStructures
Expand Down
2 changes: 1 addition & 1 deletion Terraria/DataStructures/Point16.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;

namespace Terraria.DataStructures
Expand Down
2 changes: 1 addition & 1 deletion Terraria/DelegateMethods.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria.ID;

Expand Down
2 changes: 1 addition & 1 deletion Terraria/Dust.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//using XNA;
//
//using System;
//using Terraria.GameContent;

Expand Down
2 changes: 1 addition & 1 deletion Terraria/Entity.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;

namespace Terraria
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/CampsiteBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.World.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/CaveHouseBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using Terraria.GameContent.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/CorruptionPitBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.ID;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/DesertBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using Terraria;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/EnchantedSwordBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using Terraria;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/GraniteBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using Terraria;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/HiveBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.World.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/HoneyPatchBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.World.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/MahoganyTreeBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using Terraria;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/MarbleBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.ID;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/MiningExplosivesBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.GameContent.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Biomes/ThinIceBiome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using Terraria.World.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Events/BlameNPCTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Events/CultistRitual.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.ID;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Events/MoonlordDeathDrama.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using Terraria;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Events/ScreenDarkness.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;

Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Events/ScreenObstruction.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;

Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Generation/ActionGrass.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.World.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Generation/ActionPlaceStatue.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.DataStructures;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Generation/ActionStalagtite.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.World.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Generation/ActionVines.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.World.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Generation/ShapeBranch.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Generation/ShapeFloodFill.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using Terraria;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Generation/ShapeRoot.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.World.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Generation/ShapeRunner.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.World.Generation;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Generation/TrackGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;
using Terraria.ID;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/PortalHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/GameContent/Tile_Entities/TETrainingDummy.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using System.IO;
Expand Down
2 changes: 1 addition & 1 deletion Terraria/Gore.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//using XNA;
//
//using System;
//using Terraria.GameContent;

Expand Down
2 changes: 1 addition & 1 deletion Terraria/ID/Colors.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using Terraria;

Expand Down
2 changes: 1 addition & 1 deletion Terraria/ID/NPCID.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;

Expand Down
6 changes: 3 additions & 3 deletions Terraria/IO/FileMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static FileMetadata Read(BinaryReader reader, FileType expectedType)
if (fileMetadatum.Type != expectedType)
{
string[] name = new string[] { "Expected type \"", Enum.GetName(typeof(FileType), expectedType), "\" but found \"", Enum.GetName(typeof(FileType), fileMetadatum.Type), "\"." };
throw new FileFormatException(string.Concat(name));
throw new Exception("FileFormatException: " + string.Concat(name));
}
return fileMetadatum;
}
Expand All @@ -55,7 +55,7 @@ private void Read(BinaryReader reader)
ulong num = reader.ReadUInt64();
if ((num & 72057594037927935L) != 27981915666277746L)
{
throw new FileFormatException("Expected Re-Logic file format.");
throw new Exception("FileFormatException: Expected Re-Logic file format.");
}
byte num1 = (byte)(num >> 56 & (long)255);
FileType fileType = FileType.None;
Expand All @@ -75,7 +75,7 @@ private void Read(BinaryReader reader)
}
if (fileType == FileType.None)
{
throw new FileFormatException("Found invalid file type.");
throw new Exception("FileFormatException: Found invalid file type.");
}
this.Type = fileType;
this.Revision = reader.ReadUInt32();
Expand Down
2 changes: 1 addition & 1 deletion Terraria/IO/PlayerFileData.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XNA;

using System;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down
Loading

0 comments on commit d2b2987

Please sign in to comment.