Merge branch 'general-devel' into patch-29

This commit is contained in:
stacey 2021-07-24 20:43:20 -04:00 committed by GitHub
commit b53f62a9c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 38 additions and 37 deletions

View file

@ -14,6 +14,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
## Upcoming changes ## Upcoming changes
* Fixed SendTileRectHandler not sending tile rect updates like Pylons/Mannequins to other clients. (@Stealownz) * Fixed SendTileRectHandler not sending tile rect updates like Pylons/Mannequins to other clients. (@Stealownz)
* Fix some typos that have been in the repository for over a lustrum. (@Killia0)
* Added a `tshock.npc.summonboss` permission check for Lunatic Cultist, players who do not have this permission will not be able to kill Cultist Archers/Devotees to summon the Lunatic Cultist. (@moisterrific) * Added a `tshock.npc.summonboss` permission check for Lunatic Cultist, players who do not have this permission will not be able to kill Cultist Archers/Devotees to summon the Lunatic Cultist. (@moisterrific)
## TShock 4.5.5 ## TShock 4.5.5

View file

@ -1724,7 +1724,7 @@ namespace TShockAPI
return; return;
} }
// This is neccessary to check in order to prevent special tiles such as // This is necessary to check in order to prevent special tiles such as
// queen bee larva, paintings etc that use this packet from being placed // queen bee larva, paintings etc that use this packet from being placed
// without selecting the right item. // without selecting the right item.
if (type != args.Player.TPlayer.inventory[args.Player.TPlayer.selectedItem].createTile) if (type != args.Player.TPlayer.inventory[args.Player.TPlayer.selectedItem].createTile)

View file

@ -50,7 +50,7 @@ namespace TShockAPI
public bool Silent { get; private set; } public bool Silent { get; private set; }
/// <summary> /// <summary>
/// Parameters passed to the arguement. Does not include the command name. /// Parameters passed to the argument. Does not include the command name.
/// IE '/kick "jerk face"' will only have 1 argument /// IE '/kick "jerk face"' will only have 1 argument
/// </summary> /// </summary>
public List<string> Parameters { get; private set; } public List<string> Parameters { get; private set; }
@ -939,7 +939,7 @@ namespace TShockAPI
} }
catch (UserAccountManagerException ex) catch (UserAccountManagerException ex)
{ {
args.Player.SendErrorMessage("Sorry, an error occured: " + ex.Message + "."); args.Player.SendErrorMessage("Sorry, an error occurred: " + ex.Message + ".");
TShock.Log.ConsoleError("PasswordUser returned an error: " + ex); TShock.Log.ConsoleError("PasswordUser returned an error: " + ex);
} }
} }
@ -1003,7 +1003,7 @@ namespace TShockAPI
} }
catch (UserAccountManagerException ex) catch (UserAccountManagerException ex)
{ {
args.Player.SendErrorMessage("Sorry, an error occured: " + ex.Message + "."); args.Player.SendErrorMessage("Sorry, an error occurred: " + ex.Message + ".");
TShock.Log.ConsoleError("RegisterUser returned an error: " + ex); TShock.Log.ConsoleError("RegisterUser returned an error: " + ex);
} }
} }
@ -1216,7 +1216,7 @@ namespace TShockAPI
if (DateTime.TryParse(account.LastAccessed, out LastSeen)) if (DateTime.TryParse(account.LastAccessed, out LastSeen))
{ {
LastSeen = DateTime.Parse(account.LastAccessed).ToLocalTime(); LastSeen = DateTime.Parse(account.LastAccessed).ToLocalTime();
args.Player.SendSuccessMessage("{0}'s last login occured {1} {2} UTC{3}.", account.Name, LastSeen.ToShortDateString(), args.Player.SendSuccessMessage("{0}'s last login occurred {1} {2} UTC{3}.", account.Name, LastSeen.ToShortDateString(),
LastSeen.ToShortTimeString(), Timezone); LastSeen.ToShortTimeString(), Timezone);
} }
@ -5518,7 +5518,7 @@ namespace TShockAPI
#endregion General Commands #endregion General Commands
#region Cheat Commands #region Game Commands
private static void Clear(CommandArgs args) private static void Clear(CommandArgs args)
{ {
@ -6472,6 +6472,6 @@ namespace TShockAPI
} }
} }
#endregion Cheat Comamnds #endregion Game Commands
} }
} }

View file

@ -425,14 +425,14 @@ namespace TShockAPI.DB
} }
catch (Exception ex) catch (Exception ex)
{ {
TShock.Log.Error($"An exception has occured during database transaction: {ex.Message}"); TShock.Log.Error($"An exception has occurred during database transaction: {ex.Message}");
try try
{ {
transaction.Rollback(); transaction.Rollback();
} }
catch (Exception rollbackEx) catch (Exception rollbackEx)
{ {
TShock.Log.Error($"An exception has occured during database rollback: {rollbackEx.Message}"); TShock.Log.Error($"An exception has occurred during database rollback: {rollbackEx.Message}");
} }
} }
} }

View file

@ -168,7 +168,7 @@ namespace TShockAPI.DB
} }
/// <summary> /// <summary>
/// Delets the region from this world with a given ID. /// Deletes the region from this world with a given ID.
/// </summary> /// </summary>
/// <param name="id">The ID of the region to delete.</param> /// <param name="id">The ID of the region to delete.</param>
/// <returns>Whether the region was successfully deleted.</returns> /// <returns>Whether the region was successfully deleted.</returns>
@ -584,7 +584,7 @@ namespace TShockAPI.DB
/// </summary> /// </summary>
/// <param name="regionName">Region name</param> /// <param name="regionName">Region name</param>
/// <param name="newOwner">New owner's username</param> /// <param name="newOwner">New owner's username</param>
/// <returns>Whether the change was successfull</returns> /// <returns>Whether the change was successful</returns>
public bool ChangeOwner(string regionName, string newOwner) public bool ChangeOwner(string regionName, string newOwner)
{ {
var region = GetRegionByName(regionName); var region = GetRegionByName(regionName);
@ -604,7 +604,7 @@ namespace TShockAPI.DB
/// </summary> /// </summary>
/// <param name="regionName">Region name</param> /// <param name="regionName">Region name</param>
/// <param name="groupName">Group's name</param> /// <param name="groupName">Group's name</param>
/// <returns>Whether the change was successfull</returns> /// <returns>Whether the change was successful</returns>
public bool AllowGroup(string regionName, string groupName) public bool AllowGroup(string regionName, string groupName)
{ {
string mergedGroups = ""; string mergedGroups = "";
@ -646,7 +646,7 @@ namespace TShockAPI.DB
/// </summary> /// </summary>
/// <param name="regionName">Region name</param> /// <param name="regionName">Region name</param>
/// <param name="group">Group name</param> /// <param name="group">Group name</param>
/// <returns>Whether the change was successfull</returns> /// <returns>Whether the change was successful</returns>
public bool RemoveGroup(string regionName, string group) public bool RemoveGroup(string regionName, string group)
{ {
Region r = GetRegionByName(regionName); Region r = GetRegionByName(regionName);
@ -688,7 +688,7 @@ namespace TShockAPI.DB
/// </summary> /// </summary>
/// <param name="name">Region name</param> /// <param name="name">Region name</param>
/// <param name="z">New Z index</param> /// <param name="z">New Z index</param>
/// <returns>Whether the change was successfull</returns> /// <returns>Whether the change was successful</returns>
public bool SetZ(string name, int z) public bool SetZ(string name, int z)
{ {
try try

View file

@ -56,7 +56,7 @@ namespace TShockAPI.DB
{ {
int checkX=reader.Get<int>("X"); int checkX=reader.Get<int>("X");
int checkY=reader.Get<int>("Y"); int checkY=reader.Get<int>("Y");
//fix leftover inconsistancies //fix leftover inconsistencies
if (checkX==0) if (checkX==0)
checkX++; checkX++;
if (checkY==0) if (checkY==0)

View file

@ -378,7 +378,7 @@ namespace TShockAPI.DB
/// <summary>The hashed password for the user account.</summary> /// <summary>The hashed password for the user account.</summary>
public string Password { get; internal set; } public string Password { get; internal set; }
/// <summary>The user's saved Univerally Unique Identifier token.</summary> /// <summary>The user's saved Universally Unique Identifier token.</summary>
public string UUID { get; set; } public string UUID { get; set; }
/// <summary>The group object that the user account is a part of.</summary> /// <summary>The group object that the user account is a part of.</summary>

View file

@ -139,7 +139,7 @@ namespace TShockAPI.DB
/// <param name="warpName">The warp name.</param> /// <param name="warpName">The warp name.</param>
/// <param name="x">The X position.</param> /// <param name="x">The X position.</param>
/// <param name="y">The Y position.</param> /// <param name="y">The Y position.</param>
/// <returns>Whether the operation suceeded.</returns> /// <returns>Whether the operation succeeded.</returns>
public bool Position(string warpName, int x, int y) public bool Position(string warpName, int x, int y)
{ {
try try
@ -163,7 +163,7 @@ namespace TShockAPI.DB
/// </summary> /// </summary>
/// <param name="warpName">The warp name.</param> /// <param name="warpName">The warp name.</param>
/// <param name="state">The state.</param> /// <param name="state">The state.</param>
/// <returns>Whether the operation suceeded.</returns> /// <returns>Whether the operation succeeded.</returns>
public bool Hide(string warpName, bool state) public bool Hide(string warpName, bool state)
{ {
try try

View file

@ -346,7 +346,7 @@ namespace TShockAPI
/// </summary> /// </summary>
public Vector2 Velocity { get; set; } public Vector2 Velocity { get; set; }
/// <summary> /// <summary>
/// Original poisition of the player when using Potion of Return. /// Original position of the player when using Potion of Return.
/// </summary> /// </summary>
public Vector2? OriginalPos { get; set; } public Vector2? OriginalPos { get; set; }
/// <summary> /// <summary>
@ -770,7 +770,7 @@ namespace TShockAPI
{ {
/// <summary>The projectile's identity...?</summary> /// <summary>The projectile's identity...?</summary>
public int ProjectileIdentity; public int ProjectileIdentity;
/// <summary>The the player index of the projectile's owner (Main.players).</summary> /// <summary>The player index of the projectile's owner (Main.players).</summary>
public byte ProjectileOwner; public byte ProjectileOwner;
/// <summary>The index of the projectile in Main.projectile.</summary> /// <summary>The index of the projectile in Main.projectile.</summary>
public int ProjectileIndex; public int ProjectileIndex;
@ -1846,7 +1846,7 @@ namespace TShockAPI
/// </summary> /// </summary>
public byte ID { get; set; } public byte ID { get; set; }
/// <summary> /// <summary>
/// The direction the damage is occuring from /// The direction the damage is occurring from
/// </summary> /// </summary>
public byte Direction { get; set; } public byte Direction { get; set; }
/// <summary> /// <summary>
@ -1902,7 +1902,7 @@ namespace TShockAPI
/// </summary> /// </summary>
public byte Direction { get; set; } public byte Direction { get; set; }
/// <summary> /// <summary>
/// Amount of damage delt /// Amount of damage dealt
/// </summary> /// </summary>
public short Damage { get; set; } public short Damage { get; set; }
/// <summary> /// <summary>
@ -1989,7 +1989,7 @@ namespace TShockAPI
/// </summary> /// </summary>
public int Slot { get; set; } public int Slot { get; set; }
/// <summary> /// <summary>
/// Wether or not the slot that is being modified is a Dye slot. /// Whether or not the slot that is being modified is a Dye slot.
/// </summary> /// </summary>
public bool IsDye { get; set; } public bool IsDye { get; set; }
/// <summary> /// <summary>

View file

@ -273,7 +273,7 @@ namespace TShockAPI
/// <summary> /// <summary>
/// Clears the permission list and sets it to the list provided, /// Clears the permission list and sets it to the list provided,
/// will parse "!permssion" and add it to the negated permissions. /// will parse "!permission" and add it to the negated permissions.
/// </summary> /// </summary>
/// <param name="permission">The new list of permissions to associate with the group.</param> /// <param name="permission">The new list of permissions to associate with the group.</param>
public void SetPermission(List<string> permission) public void SetPermission(List<string> permission)

View file

@ -11,7 +11,7 @@ namespace TShockAPI.Handlers.NetModules
public class PylonHandler : INetModuleHandler public class PylonHandler : INetModuleHandler
{ {
/// <summary> /// <summary>
/// Event occuring /// Event occurring
/// </summary> /// </summary>
public SubPacketType PylonEventType { get; set; } public SubPacketType PylonEventType { get; set; }
/// <summary> /// <summary>

View file

@ -119,7 +119,7 @@ namespace TShockAPI
/// Writes a message to the log /// Writes a message to the log
/// </summary> /// </summary>
/// <param name="message">Message to write</param> /// <param name="message">Message to write</param>
/// <param name="level">LogLevel assosciated with the message</param> /// <param name="level">LogLevel associated with the message</param>
void Write(string message, TraceLevel level); void Write(string message, TraceLevel level);
/// <summary> /// <summary>

View file

@ -399,7 +399,7 @@ namespace TShockAPI
[Description("User can use Creative UI to set world time speed.")] [Description("User can use Creative UI to set world time speed.")]
public static readonly string journey_timespeed = "tshock.journey.time.setspeed"; public static readonly string journey_timespeed = "tshock.journey.time.setspeed";
[Description("User can use Creative UI to to toggle character godmode.")] [Description("User can use Creative UI to toggle character godmode.")]
public static readonly string journey_godmode = "tshock.journey.godmode"; public static readonly string journey_godmode = "tshock.journey.godmode";
[Description("User can use Creative UI to set world wind strength/seed.")] [Description("User can use Creative UI to set world wind strength/seed.")]

View file

@ -1117,7 +1117,7 @@ namespace TShockAPI
[Permission(RestPermissions.restmanagegroups)] [Permission(RestPermissions.restmanagegroups)]
[Noun("group", true, "The name of the new group.", typeof(String))] [Noun("group", true, "The name of the new group.", typeof(String))]
[Noun("parent", false, "The name of the parent group.", typeof(String))] [Noun("parent", false, "The name of the parent group.", typeof(String))]
[Noun("permissions", false, "A comma seperated list of permissions for the new group.", typeof(String))] [Noun("permissions", false, "A comma separated list of permissions for the new group.", typeof(String))]
[Noun("chatcolor", false, "A r,g,b string representing the color for this groups chat.", typeof(String))] [Noun("chatcolor", false, "A r,g,b string representing the color for this groups chat.", typeof(String))]
[Token] [Token]
private object GroupCreate(RestRequestArgs args) private object GroupCreate(RestRequestArgs args)
@ -1142,7 +1142,7 @@ namespace TShockAPI
[Noun("group", true, "The name of the group to modify.", typeof(String))] [Noun("group", true, "The name of the group to modify.", typeof(String))]
[Noun("parent", false, "The name of the new parent for this group.", typeof(String))] [Noun("parent", false, "The name of the new parent for this group.", typeof(String))]
[Noun("chatcolor", false, "The new chat color r,g,b.", typeof(String))] [Noun("chatcolor", false, "The new chat color r,g,b.", typeof(String))]
[Noun("permissions", false, "The new comma seperated list of permissions.", typeof(String))] [Noun("permissions", false, "The new comma separated list of permissions.", typeof(String))]
[Token] [Token]
private object GroupUpdate(RestRequestArgs args) private object GroupUpdate(RestRequestArgs args)
{ {

View file

@ -200,7 +200,7 @@ namespace TShockAPI.Sockets
this._listener.Stop(); this._listener.Stop();
// currently vanilla will stop listening when the slots are full, however it appears that this Netplay.IsListening // currently vanilla will stop listening when the slots are full, however it appears that this Netplay.IsListening
// flag is still set, making the server loop beleive it's still listening when it's actually not. // flag is still set, making the server loop believe it's still listening when it's actually not.
// clearing this flag when we actually have stopped will allow the ServerLoop to start listening again when // clearing this flag when we actually have stopped will allow the ServerLoop to start listening again when
// there are enough slots available. // there are enough slots available.
Netplay.IsListening = false; Netplay.IsListening = false;

View file

@ -1018,7 +1018,7 @@ namespace TShockAPI
} }
/// <summary> /// <summary>
/// Player Y cooridnate divided by 16. Supposed Y world coordinate. /// Player Y coordinate divided by 16. Supposed Y world coordinate.
/// </summary> /// </summary>
public int TileY public int TileY
{ {

View file

@ -182,12 +182,12 @@ namespace TShockAPI
public void RevertTiles(Dictionary<Vector2, ITile> tiles) public void RevertTiles(Dictionary<Vector2, ITile> tiles)
{ {
// Update Main.Tile first so that when tile sqaure is sent it is correct // Update Main.Tile first so that when tile square is sent it is correct
foreach (KeyValuePair<Vector2, ITile> entry in tiles) foreach (KeyValuePair<Vector2, ITile> entry in tiles)
{ {
Main.tile[(int)entry.Key.X, (int)entry.Key.Y] = entry.Value; Main.tile[(int)entry.Key.X, (int)entry.Key.Y] = entry.Value;
} }
// Send all players updated tile sqaures // Send all players updated tile squares
foreach (Vector2 coords in tiles.Keys) foreach (Vector2 coords in tiles.Keys)
{ {
All.SendTileSquare((int)coords.X, (int)coords.Y, 3); All.SendTileSquare((int)coords.X, (int)coords.Y, 3);

View file

@ -1614,7 +1614,7 @@ namespace TShockAPI
} }
/// <summary>OnProjectileSetDefaults - Called when a projectile sets the default attributes for itself.</summary> /// <summary>OnProjectileSetDefaults - Called when a projectile sets the default attributes for itself.</summary>
/// <param name="e">e - The SetDefaultsEventArgs object praameterized with Projectile and int.</param> /// <param name="e">e - The SetDefaultsEventArgs object parameterized with Projectile and int.</param>
private void OnProjectileSetDefaults(SetDefaultsEventArgs<Projectile, int> e) private void OnProjectileSetDefaults(SetDefaultsEventArgs<Projectile, int> e)
{ {
//tombstone fix. //tombstone fix.

View file

@ -141,7 +141,7 @@ namespace TShockAPI
} }
/// <summary> /// <summary>
/// Broadcasts a message from a Terraria playerplayer, not TShock /// Broadcasts a message from a Terraria player, not TShock
/// </summary> /// </summary>
/// <param name="ply">ply - the Terraria player index that will send the packet</param> /// <param name="ply">ply - the Terraria player index that will send the packet</param>
/// <param name="msg">msg - The message to send</param> /// <param name="msg">msg - The message to send</param>