-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated to the latest Terraria version #10
base: general-devel
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a jerk and I dislike unnecessary colons. There are other items that should be thought about as well.
@@ -28,7 +30,7 @@ public CompleteConnectionandSpawn(BinaryReader br) | |||
|
|||
public override string ToString() | |||
{ | |||
return string.Format("[CompleteConnectionandSpawn]"); | |||
return $"[CompleteConnectionandSpawn:]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's going on here? You like colons, georg?
@@ -28,7 +30,7 @@ public ContinueConnecting2(BinaryReader br) | |||
|
|||
public override string ToString() | |||
{ | |||
return string.Format("[ContinueConnecting2]"); | |||
return $"[ContinueConnecting2:]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your colons allude to further content, but that content does not exist.
did you auto-gen these classes? lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ijwu Yes, yes I did. I used MultiSimplicity
} | ||
|
||
public override string ToString() | ||
{ | ||
return $"[CrystalInvaionWipeAll]"; | ||
return $"[CrystalInvasionWipeAll:]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, I'm a pedantic asshole
} | ||
|
||
public override string ToString() | ||
{ | ||
return string.Format("[Deprecated]"); | ||
return $"[Deprecated:]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just the worst
/// <summary> | ||
/// Gets or sets the Var1 - KillTile (Fail: Bool), PlaceTile (Type: Byte), KillWall (Fail: Bool), PlaceWall (Type: Byte), KillTileNoItem (Fail: Bool), SlopeTile (Slope: Byte)| | ||
/// </summary> | ||
public short Var1 { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and Var2
could be more aptly named. (Like they were before, haha)
@@ -28,7 +30,7 @@ public SocialHandshake(BinaryReader br) | |||
|
|||
public override string ToString() | |||
{ | |||
return string.Format("[SocialHandshake]"); | |||
return $"[SocialHandshake:]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:
@@ -28,7 +30,7 @@ public TeleportationPotion(BinaryReader br) | |||
|
|||
public override string ToString() | |||
{ | |||
return string.Format("[TeleportationPotion]"); | |||
return $"[TeleportationPotion:]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:
@@ -28,7 +30,7 @@ public ToggleBirthdayParty(BinaryReader br) | |||
|
|||
public override string ToString() | |||
{ | |||
return string.Format("[ToggleBirthdayParty]"); | |||
return $"[ToggleBirthdayParty:]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the one colon to rule them all
|
||
namespace Multiplicity.Packets | ||
{ | ||
[Flags] | ||
public enum PlayerControlFlags : byte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of these flags makes it somewhat harder to determine which controls a player is pressing. I'd rather use the built-in flag comparisons in C# rather than the bitflag checking extensions.
Plus, these flags add some semantics to the bit places. I think they should be returned and utilized.
@@ -102,14 +107,27 @@ public class WorldInfo : TerrariaPacket | |||
/// </summary> | |||
public byte EventInfo2 { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I mentioned using the bitflags in my previous comment about the player controls. It could be useful to have a Flags enum for things like this as well. This isn't strictly relevant to this PR, but this could be added later on. Let's keep it in mind.
Updated to the latest Terraria version 2
Mass updated most packets to bring them in-line with the latest Terraria version.