Updated to the latest Terraria version#10
Conversation
Ijwu
left a comment
There was a problem hiding this comment.
I'm a jerk and I dislike unnecessary colons. There are other items that should be thought about as well.
| public override string ToString() | ||
| { | ||
| return string.Format("[CompleteConnectionandSpawn]"); | ||
| return $"[CompleteConnectionandSpawn:]"; |
There was a problem hiding this comment.
What's going on here? You like colons, georg?
| public override string ToString() | ||
| { | ||
| return string.Format("[ContinueConnecting2]"); | ||
| return $"[ContinueConnecting2:]"; |
There was a problem hiding this comment.
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.
@Ijwu Yes, yes I did. I used MultiSimplicity
| public override string ToString() | ||
| { | ||
| return $"[CrystalInvaionWipeAll]"; | ||
| return $"[CrystalInvasionWipeAll:]"; |
| public override string ToString() | ||
| { | ||
| return string.Format("[Deprecated]"); | ||
| return $"[Deprecated:]"; |
| /// <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.
This and Var2 could be more aptly named. (Like they were before, haha)
| public override string ToString() | ||
| { | ||
| return string.Format("[SocialHandshake]"); | ||
| return $"[SocialHandshake:]"; |
| public override string ToString() | ||
| { | ||
| return string.Format("[TeleportationPotion]"); | ||
| return $"[TeleportationPotion:]"; |
| public override string ToString() | ||
| { | ||
| return string.Format("[ToggleBirthdayParty]"); | ||
| return $"[ToggleBirthdayParty:]"; |
| namespace Multiplicity.Packets | ||
| { | ||
| [Flags] | ||
| public enum PlayerControlFlags : byte |
There was a problem hiding this comment.
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.
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.