Merge branch 'general-devel' into feature/force-character-gamemodes
This commit is contained in:
commit
c3a074336d
20 changed files with 103 additions and 51 deletions
|
|
@ -15,6 +15,11 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
|||
## Upcoming changes
|
||||
* Fixed SendTileRectHandler not sending tile rect updates like Pylons/Mannequins to other clients. (@Stealownz)
|
||||
* Introduced `SoftcoreOnly` config option to allow only softcore characters to connect. (@drunderscore)
|
||||
* 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 more usage examples for the `ban` command under `ban help examples` to explain how users can ban: offline players by account, offline players by IP, and online players by player index - useful for banning hard to type character names. (@moisterrific)
|
||||
* Changed `/login` and `/register` to provide login help depending on if UUID login is enabled or disabled, and whether or not a player can login via any username or not. In addition, the message parameters will now be differentiated by colour instead of `<>` (@moisterrific, @hakusaro)
|
||||
* Added a new `DisablePrimeBombs` config option (`false` by default). Highly recommended to set this to `true` in order to prevent griefing on servers doing a `for the worthy` play-through, since the prime bombs on this seed can destroy most tiles and bypass region protection. (@moisterrific)
|
||||
|
||||
## TShock 4.5.5
|
||||
* Changed the world autosave message so that it no longer warns of a "potential lag spike." (@hakusaro)
|
||||
|
|
@ -33,7 +38,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
|||
* Correct rejection message in LandGolfBallInCupHandler to output the proper expected player id. (@drunderscore)
|
||||
* Clarified the error mesage that the console is presented if a rate-limit is reached over REST to indicate that "tokens" actually refers to rate-limit tokens, and not auth tokens, and added a hint as to what config setting determines this. (@hakusaro, @patsore)
|
||||
* Fixed an issue where, when the console was redirected, input was disabled and commands didn't work, in TSAPI. You can now pass `-disable-commands` to disable the input thread, but by default, it will be enabled. Fixes [#1450](https://github.com/Pryaxis/TShock/issues/1450). (@DeathCradle, @QuiCM)
|
||||
* Added `summonboss` permission check for Prismatic Lacewing. Players who do not have said permission will be unable to kill this critter, as it will summon the Empress of Light. Also added support for the `AnonymousBossInvasions` config option, if this is set to `false` it will now broadcast the name of the player who summoned her. (@moisterrific)
|
||||
* Added `summonboss` permission check for Empress of Light. Players who do not have this permission will be unable to kill Prismatic Lacewings. Also added support for the `AnonymousBossInvasions` config option, if this is set to `false` it will now broadcast the name of the player who summoned her. (@moisterrific)
|
||||
* Added `ForceTime` config setting check for Enchanted Sundial usage. If `ForceTime` is set to anything other than `normal`, Sundial use will be rejected as this would lead to very janky game behavior. Additionally, players with `cfgreload` permission will be advised to change it back to `normal` in order to use sundial. (@moisterrific, @bartico6)
|
||||
* Added `%onlineplayers%` and `%serverslots%` placeholders for MOTD. The default MOTD message was also updated to use this. (@moisterrific, @bartico6)
|
||||
* Fixed Bouncer inconsistently using `TilePlacementValid` when validating tile coordinates, which could cause a DoS attack due to unexpectedly large world framing. The list below shows the corrected methods within Bouncer. This was assigned [GHSA-jq4j-v8pr-jv7j](https://github.com/Pryaxis/TShock/security/advisories/GHSA-jq4j-v8pr-jv7j). (@drunderscore)
|
||||
|
|
|
|||
|
|
@ -1724,7 +1724,7 @@ namespace TShockAPI
|
|||
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
|
||||
// without selecting the right item.
|
||||
if (type != args.Player.TPlayer.inventory[args.Player.TPlayer.selectedItem].createTile)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace TShockAPI
|
|||
public bool Silent { get; private set; }
|
||||
|
||||
/// <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
|
||||
/// </summary>
|
||||
public List<string> Parameters { get; private set; }
|
||||
|
|
@ -807,10 +807,15 @@ namespace TShockAPI
|
|||
}
|
||||
else
|
||||
{
|
||||
args.Player.SendErrorMessage("Syntax: {0}login - Logs in using your UUID and character name", Specifier);
|
||||
args.Player.SendErrorMessage(" {0}login <password> - Logs in using your password and character name", Specifier);
|
||||
args.Player.SendErrorMessage(" {0}login <username> <password> - Logs in using your username and password", Specifier);
|
||||
args.Player.SendErrorMessage("If you forgot your password, there is no way to recover it.");
|
||||
if (!TShock.Config.Settings.DisableUUIDLogin)
|
||||
args.Player.SendMessage($"{Specifier}login - Logs in using your UUID and character name.", Color.White);
|
||||
|
||||
if (TShock.Config.Settings.AllowLoginAnyUsername)
|
||||
args.Player.SendMessage($"{Specifier}login {"username".Color(Utils.GreenHighlight)} {"password".Color(Utils.BoldHighlight)} - Logs in using your username and password.", Color.White);
|
||||
else
|
||||
args.Player.SendMessage($"{Specifier}login {"password".Color(Utils.BoldHighlight)} - Logs in using your password and character name.", Color.White);
|
||||
|
||||
args.Player.SendWarningMessage("If you forgot your password, there is no way to recover it.");
|
||||
return;
|
||||
}
|
||||
try
|
||||
|
|
@ -939,7 +944,7 @@ namespace TShockAPI
|
|||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -991,6 +996,15 @@ namespace TShockAPI
|
|||
{
|
||||
args.Player.SendSuccessMessage("Account \"{0}\" has been registered.", account.Name);
|
||||
args.Player.SendSuccessMessage("Your password is {0}.", echoPassword);
|
||||
|
||||
if (!TShock.Config.Settings.DisableUUIDLogin)
|
||||
args.Player.SendMessage($"Type {Specifier}login to sign in to your account using your UUID.", Color.White);
|
||||
|
||||
if (TShock.Config.Settings.AllowLoginAnyUsername)
|
||||
args.Player.SendMessage($"Type {Specifier}login \"{account.Name.Color(Utils.GreenHighlight)}\" {echoPassword.Color(Utils.BoldHighlight)} to sign in to your account.", Color.White);
|
||||
else
|
||||
args.Player.SendMessage($"Type {Specifier}login {echoPassword.Color(Utils.BoldHighlight)} to sign in to your account.", Color.White);
|
||||
|
||||
TShock.UserAccounts.AddUserAccount(account);
|
||||
TShock.Log.ConsoleInfo("{0} registered an account: \"{1}\".", args.Player.Name, account.Name);
|
||||
}
|
||||
|
|
@ -1003,7 +1017,7 @@ namespace TShockAPI
|
|||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -1216,7 +1230,7 @@ namespace TShockAPI
|
|||
if (DateTime.TryParse(account.LastAccessed, out LastSeen))
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
@ -1303,7 +1317,7 @@ namespace TShockAPI
|
|||
args.Player.SendMessage($"ban {"list".Color(Utils.RedHighlight)}", Color.White);
|
||||
args.Player.SendMessage($"ban {"details".Color(Utils.RedHighlight)} <Ban ID>", Color.White);
|
||||
args.Player.SendMessage($"Quick usage: {"ban add".Color(Utils.BoldHighlight)} {args.Player.Name.Color(Utils.RedHighlight)} \"Griefing\"", Color.White);
|
||||
args.Player.SendMessage($"For more info, use {"ban help".Color(Utils.BoldHighlight)} {"command".Color(Utils.RedHighlight)}", Color.White);
|
||||
args.Player.SendMessage($"For more info, use {"ban help".Color(Utils.BoldHighlight)} {"command".Color(Utils.RedHighlight)} or {"ban help".Color(Utils.BoldHighlight)} {"examples".Color(Utils.RedHighlight)}", Color.White);
|
||||
}
|
||||
|
||||
void MoreHelp(string cmd)
|
||||
|
|
@ -1327,7 +1341,7 @@ namespace TShockAPI
|
|||
args.Player.SendMessage("", Color.White);
|
||||
args.Player.SendMessage("Ban Del Syntax", Color.White);
|
||||
args.Player.SendMessage($"{"ban del".Color(Utils.BoldHighlight)} <{"Ticket Number".Color(Utils.RedHighlight)}>", Color.White);
|
||||
args.Player.SendMessage($"- {"Ticket Number".Color(Utils.RedHighlight)}s are provided when you add a ban, and can also be viewed with the {"ban list".Color(Utils.BoldHighlight)} command.", Color.White);
|
||||
args.Player.SendMessage($"- {"Ticket Numbers".Color(Utils.RedHighlight)} are provided when you add a ban, and can also be viewed with the {"ban list".Color(Utils.BoldHighlight)} command.", Color.White);
|
||||
args.Player.SendMessage($"Example usage: {"ban del".Color(Utils.BoldHighlight)} {"12345".Color(Utils.RedHighlight)}", Color.White);
|
||||
break;
|
||||
|
||||
|
|
@ -1343,14 +1357,14 @@ namespace TShockAPI
|
|||
args.Player.SendMessage("", Color.White);
|
||||
args.Player.SendMessage("Ban Details Syntax", Color.White);
|
||||
args.Player.SendMessage($"{"ban details".Color(Utils.BoldHighlight)} <{"Ticket Number".Color(Utils.RedHighlight)}>", Color.White);
|
||||
args.Player.SendMessage($"- {"Ticket Number".Color(Utils.RedHighlight)}s are provided when you add a ban, and can be found with the {"ban list".Color(Utils.BoldHighlight)} command.", Color.White);
|
||||
args.Player.SendMessage($"- {"Ticket Numbers".Color(Utils.RedHighlight)} are provided when you add a ban, and can be found with the {"ban list".Color(Utils.BoldHighlight)} command.", Color.White);
|
||||
args.Player.SendMessage($"Example usage: {"ban details".Color(Utils.BoldHighlight)} {"12345".Color(Utils.RedHighlight)}", Color.White);
|
||||
break;
|
||||
|
||||
case "identifiers":
|
||||
if (!PaginationTools.TryParsePageNumber(args.Parameters, 2, args.Player, out int pageNumber))
|
||||
{
|
||||
args.Player.SendMessage($"Invalid page number. Page number should be numeric.", Color.White);
|
||||
args.Player.SendMessage($"Invalid page number. Page number must be numeric.", Color.White);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1368,10 +1382,23 @@ namespace TShockAPI
|
|||
LineTextColor = Color.White
|
||||
});
|
||||
break;
|
||||
|
||||
case "examples":
|
||||
args.Player.SendMessage("", Color.White);
|
||||
args.Player.SendMessage("Ban Usage Examples", Color.White);
|
||||
args.Player.SendMessage("- Ban an offline player by account name", Color.White);
|
||||
args.Player.SendMessage($" {Specifier}{"ban add".Color(Utils.BoldHighlight)} \"{"acc:".Color(Utils.RedHighlight)}{args.Player.Account.Color(Utils.RedHighlight)}\" {"\"Multiple accounts are not allowed\"".Color(Utils.BoldHighlight)} (Permanently bans this account name)", Color.White);
|
||||
args.Player.SendMessage("- Ban an offline player by IP address", Color.White);
|
||||
args.Player.SendMessage($" {Specifier}{"ai".Color(Utils.BoldHighlight)} \"{args.Player.Account.Color(Utils.RedHighlight)}\" (Find the IP associated with the offline target's account)", Color.White);
|
||||
args.Player.SendMessage($" {Specifier}{"ban add".Color(Utils.BoldHighlight)} {"ip:".Color(Utils.RedHighlight)}{args.Player.IP.Color(Utils.RedHighlight)} {"\"Griefing\"".Color(Utils.BoldHighlight)} {"-e".Color(Utils.GreenHighlight)} (Permanently bans this IP address)", Color.White);
|
||||
args.Player.SendMessage($"- Ban an online player by index (Useful for hard to type names)", Color.White);
|
||||
args.Player.SendMessage($" {Specifier}{"who".Color(Utils.BoldHighlight)} {"-i".Color(Utils.GreenHighlight)} (Find the player index for the target)", Color.White);
|
||||
args.Player.SendMessage($" {Specifier}{"ban add".Color(Utils.BoldHighlight)} {"tsi:".Color(Utils.RedHighlight)}{args.Player.Index.Color(Utils.RedHighlight)} {"\"Trolling\"".Color(Utils.BoldHighlight)} {"-a -u -ip".Color(Utils.GreenHighlight)} (Permanently bans the online player by Account, UUID, and IP)", Color.White);
|
||||
// Ban by account ID when?
|
||||
break;
|
||||
|
||||
default:
|
||||
args.Player.SendMessage($"Unknown ban command. Try {"add".Color(Utils.RedHighlight)}, {"del".Color(Utils.RedHighlight)}, {"list".Color(Utils.RedHighlight)}, or {"details".Color(Utils.RedHighlight)}.", Color.White);
|
||||
break;
|
||||
args.Player.SendMessage($"Unknown ban command. Try {"ban help".Color(Utils.BoldHighlight)} {"add".Color(Utils.RedHighlight)}, {"del".Color(Utils.RedHighlight)}, {"list".Color(Utils.RedHighlight)}, {"details".Color(Utils.RedHighlight)}, {"identifiers".Color(Utils.RedHighlight)}, or {"examples".Color(Utils.RedHighlight)}.", Color.White); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5518,7 +5545,7 @@ namespace TShockAPI
|
|||
|
||||
#endregion General Commands
|
||||
|
||||
#region Cheat Commands
|
||||
#region Game Commands
|
||||
|
||||
private static void Clear(CommandArgs args)
|
||||
{
|
||||
|
|
@ -6472,6 +6499,6 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
#endregion Cheat Comamnds
|
||||
#endregion Game Commands
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,6 +160,12 @@ namespace TShockAPI.Configuration
|
|||
/// <summary>Disables tombstone dropping during death for all players.</summary>
|
||||
[Description("Disables tombstone dropping during death for all players.")]
|
||||
public bool DisableTombstones = true;
|
||||
|
||||
/// <summary>
|
||||
/// Disables Skeletron Prime Bombs from spawning, useful for preventing unwanted world destruction on for the worthy seed world.
|
||||
/// </summary>
|
||||
[Description("Disables Skeletron Prime Bombs from spawning, useful for preventing unwanted world destruction on for the worthy seed world.")]
|
||||
public bool DisablePrimeBombs;
|
||||
|
||||
/// <summary>Forces the world time to be normal, day, or night.</summary>
|
||||
[Description("Forces the world time to be normal, day, or night.")]
|
||||
|
|
|
|||
|
|
@ -425,14 +425,14 @@ namespace TShockAPI.DB
|
|||
}
|
||||
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
|
||||
{
|
||||
transaction.Rollback();
|
||||
}
|
||||
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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delets the region from this world with a given ID.
|
||||
/// Deletes the region from this world with a given ID.
|
||||
/// </summary>
|
||||
/// <param name="id">The ID of the region to delete.</param>
|
||||
/// <returns>Whether the region was successfully deleted.</returns>
|
||||
|
|
@ -584,7 +584,7 @@ namespace TShockAPI.DB
|
|||
/// </summary>
|
||||
/// <param name="regionName">Region name</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)
|
||||
{
|
||||
var region = GetRegionByName(regionName);
|
||||
|
|
@ -604,7 +604,7 @@ namespace TShockAPI.DB
|
|||
/// </summary>
|
||||
/// <param name="regionName">Region 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)
|
||||
{
|
||||
string mergedGroups = "";
|
||||
|
|
@ -646,7 +646,7 @@ namespace TShockAPI.DB
|
|||
/// </summary>
|
||||
/// <param name="regionName">Region 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)
|
||||
{
|
||||
Region r = GetRegionByName(regionName);
|
||||
|
|
@ -688,7 +688,7 @@ namespace TShockAPI.DB
|
|||
/// </summary>
|
||||
/// <param name="name">Region name</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)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace TShockAPI.DB
|
|||
{
|
||||
int checkX=reader.Get<int>("X");
|
||||
int checkY=reader.Get<int>("Y");
|
||||
//fix leftover inconsistancies
|
||||
//fix leftover inconsistencies
|
||||
if (checkX==0)
|
||||
checkX++;
|
||||
if (checkY==0)
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ namespace TShockAPI.DB
|
|||
/// <summary>The hashed password for the user account.</summary>
|
||||
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; }
|
||||
|
||||
/// <summary>The group object that the user account is a part of.</summary>
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ namespace TShockAPI.DB
|
|||
/// <param name="warpName">The warp name.</param>
|
||||
/// <param name="x">The X 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)
|
||||
{
|
||||
try
|
||||
|
|
@ -163,7 +163,7 @@ namespace TShockAPI.DB
|
|||
/// </summary>
|
||||
/// <param name="warpName">The warp name.</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)
|
||||
{
|
||||
try
|
||||
|
|
@ -216,4 +216,4 @@ namespace TShockAPI.DB
|
|||
IsPrivate = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public Vector2 Velocity { get; set; }
|
||||
/// <summary>
|
||||
/// Original poisition of the player when using Potion of Return.
|
||||
/// Original position of the player when using Potion of Return.
|
||||
/// </summary>
|
||||
public Vector2? OriginalPos { get; set; }
|
||||
/// <summary>
|
||||
|
|
@ -770,7 +770,7 @@ namespace TShockAPI
|
|||
{
|
||||
/// <summary>The projectile's identity...?</summary>
|
||||
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;
|
||||
/// <summary>The index of the projectile in Main.projectile.</summary>
|
||||
public int ProjectileIndex;
|
||||
|
|
@ -1846,7 +1846,7 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public byte ID { get; set; }
|
||||
/// <summary>
|
||||
/// The direction the damage is occuring from
|
||||
/// The direction the damage is occurring from
|
||||
/// </summary>
|
||||
public byte Direction { get; set; }
|
||||
/// <summary>
|
||||
|
|
@ -1902,7 +1902,7 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public byte Direction { get; set; }
|
||||
/// <summary>
|
||||
/// Amount of damage delt
|
||||
/// Amount of damage dealt
|
||||
/// </summary>
|
||||
public short Damage { get; set; }
|
||||
/// <summary>
|
||||
|
|
@ -1989,7 +1989,7 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public int Slot { get; set; }
|
||||
/// <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>
|
||||
public bool IsDye { get; set; }
|
||||
/// <summary>
|
||||
|
|
@ -2835,6 +2835,17 @@ namespace TShockAPI
|
|||
else
|
||||
TShock.Utils.SendLogs(string.Format($"{args.Player.Name} summoned the Empress of Light!"), Color.PaleVioletRed, args.Player);
|
||||
}
|
||||
|
||||
if (Main.npc[id].netID == NPCID.CultistDevote || Main.npc[id].netID == NPCID.CultistArcherBlue)
|
||||
{
|
||||
if (!args.Player.HasPermission(Permissions.summonboss))
|
||||
{
|
||||
args.Player.SendErrorMessage("You do not have permission to summon the Lunatic Cultist!");
|
||||
args.Player.SendData(PacketTypes.NpcUpdate, "", id);
|
||||
TShock.Log.ConsoleDebug($"GetDataHandlers / HandleNpcStrike rejected Cultist summon from {args.Player.Name}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ namespace TShockAPI
|
|||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// <param name="permission">The new list of permissions to associate with the group.</param>
|
||||
public void SetPermission(List<string> permission)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace TShockAPI.Handlers.NetModules
|
|||
public class PylonHandler : INetModuleHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Event occuring
|
||||
/// Event occurring
|
||||
/// </summary>
|
||||
public SubPacketType PylonEventType { get; set; }
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ namespace TShockAPI
|
|||
/// Writes a message to the log
|
||||
/// </summary>
|
||||
/// <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);
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -152,4 +152,4 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
void Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -399,7 +399,7 @@ namespace TShockAPI
|
|||
[Description("User can use Creative UI to set world time speed.")]
|
||||
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";
|
||||
|
||||
[Description("User can use Creative UI to set world wind strength/seed.")]
|
||||
|
|
|
|||
|
|
@ -1117,7 +1117,7 @@ namespace TShockAPI
|
|||
[Permission(RestPermissions.restmanagegroups)]
|
||||
[Noun("group", true, "The name of the new 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))]
|
||||
[Token]
|
||||
private object GroupCreate(RestRequestArgs args)
|
||||
|
|
@ -1142,7 +1142,7 @@ namespace TShockAPI
|
|||
[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("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]
|
||||
private object GroupUpdate(RestRequestArgs args)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ namespace TShockAPI.Sockets
|
|||
this._listener.Stop();
|
||||
|
||||
// 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
|
||||
// there are enough slots available.
|
||||
Netplay.IsListening = false;
|
||||
|
|
|
|||
|
|
@ -1018,7 +1018,7 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Player Y cooridnate divided by 16. Supposed Y world coordinate.
|
||||
/// Player Y coordinate divided by 16. Supposed Y world coordinate.
|
||||
/// </summary>
|
||||
public int TileY
|
||||
{
|
||||
|
|
|
|||
|
|
@ -182,12 +182,12 @@ namespace TShockAPI
|
|||
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
All.SendTileSquare((int)coords.X, (int)coords.Y, 3);
|
||||
|
|
|
|||
|
|
@ -1614,19 +1614,22 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
//tombstone fix.
|
||||
if (e.Info == 43 || (e.Info >= 201 && e.Info <= 205) || (e.Info >= 527 && e.Info <= 531))
|
||||
if (e.Info == ProjectileID.Tombstone || (e.Info >= ProjectileID.GraveMarker && e.Info <= ProjectileID.Obelisk) || (e.Info >= ProjectileID.RichGravestone1 && e.Info <= ProjectileID.RichGravestone5))
|
||||
if (Config.Settings.DisableTombstones)
|
||||
e.Object.SetDefaults(0);
|
||||
if (e.Info == 75)
|
||||
if (e.Info == ProjectileID.HappyBomb)
|
||||
if (Config.Settings.DisableClownBombs)
|
||||
e.Object.SetDefaults(0);
|
||||
if (e.Info == 109)
|
||||
if (e.Info == ProjectileID.SnowBallHostile)
|
||||
if (Config.Settings.DisableSnowBalls)
|
||||
e.Object.SetDefaults(0);
|
||||
if (e.Info == ProjectileID.BombSkeletronPrime)
|
||||
if (Config.Settings.DisablePrimeBombs)
|
||||
e.Object.SetDefaults(0);
|
||||
}
|
||||
|
||||
/// <summary>NetHooks_SendData - Fired when the server sends data.</summary>
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Broadcasts a message from a Terraria playerplayer, not TShock
|
||||
/// Broadcasts a message from a Terraria player, not TShock
|
||||
/// </summary>
|
||||
/// <param name="ply">ply - the Terraria player index that will send the packet</param>
|
||||
/// <param name="msg">msg - The message to send</param>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue