Merge branch 'general-devel' into 1.4
This commit is contained in:
commit
96468871a0
3 changed files with 124 additions and 9 deletions
101
CHANGELOG.md
101
CHANGELOG.md
|
|
@ -3,6 +3,107 @@
|
|||
This is the rolling changelog for TShock for Terraria. Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large.
|
||||
|
||||
## Upcoming Changes
|
||||
* Added confused debuff to Bouncer for confusion applied from Brain of Confusion
|
||||
* API: Added return in OnNameCollision if hook has been handled. (@Patrikkk)
|
||||
* API: Added hooks for item, projectile and tile bans (@deadsurgeon42)
|
||||
* API: Changed `PlayerHooks` permission hook mechanisms to allow negation from hooks (@deadsurgeon42)
|
||||
* API: New WorldGrassSpread hook which shold allow corruption/crimson/hallow creep config options to work (@DeathCradle)
|
||||
* Fixed a missing case in UserManager exception handling, which caused a rather cryptic console error instead of the intended error message (@deadsurgeon42)
|
||||
* Fixed saving when one player is one the server and another one joins (@MarioE)
|
||||
* Fixed /spawnmob not spawning negative IDs (@MarioE)
|
||||
* Validated tile placement on PlaceObject; clients can no longer place frames, paintings etc with dirt blocks (@bartico6, @ProfessorXZ)
|
||||
* Updated to new stat tracking system with more data so we can actually make informed software decisions (Jordan Coulam)
|
||||
* Fixed /time display at the end of Terraria hours (@koneko-nyan)
|
||||
* Added a warning notifying users of the minimum memory required to run TShock (@bartico6)
|
||||
* Added /group rename to allow changing group names (@ColinBohn, @ProfessorXZ)
|
||||
* Added /region rename and OnRegionRenamed hook (@koneko-nyan, @deadsurgeon42)
|
||||
* Rebuilt /ban add. New syntax is /ban add <target> [time] [reason] where target is the target online player, offline player, or IP; where time is the time format or 0 for permanent; and where [reason] is the reason. (@hakusaro)
|
||||
* Removed /ban addip and /ban addtemp. Now covered under /ban add. (@hakusaro)
|
||||
* Added /su, which temporarily elevates players with the tshock.su permission to super admin. In addition added, a new group, owner, that is suggested for new users to setup TShock with as opposed to superadmin. Finally, /su is implemented such that a 10 minute timeout will occur preventing people from just camping with it on. (@hakusaro)
|
||||
* Added /sudo, which runs a command as the superadmin group. If a user fails to execute a command but can sudo, they'll be told that they can override the permission check with sudo. Much better than just telling them to run /su and then re-run the command. (@hakusaro)
|
||||
* Fixed /savessc not bothering to save ssc data for people who bypass ssc. (@hakusaro)
|
||||
* Default permission sets for new databases are more modern. (@hakusaro)
|
||||
* Added the ability to ban by account name instead of just banning a character name assuming its an account name. (@hakusaro)
|
||||
* Fixed a bug in the CommandLineParser which caused some command lines to fail (@QuicM)
|
||||
* Renamed TShock.DB.User to TShock.DB.UserAccount, including all the related methods, classes and events. (@Ryozuki)
|
||||
* Update OTAPI to 2.0.0.31, which also updates Newtonsoft.Json to 10.0.3 (@Ryozuki)
|
||||
* Fixed DumpItems() from trying to dump older versions of certain items (negative item IDs). (@Zaicon)
|
||||
* Added the `/dump-reference-data` command, which when run, runs Utils.Dump() and outputs Terraria reference data to the server folder. (@hakusaro)
|
||||
* Added DateTime datatype support for both MySQL and SQLite. (@Ryozuki)
|
||||
* Fixed builds to not require a specific version of OTAPI and to not fail when in Release mode (@bartico6)
|
||||
* Update Assembly Company to Pryaxis (@Ryozuki)
|
||||
* Removed `/restart` command. (@hakusaro)
|
||||
* Removed `Permissions.updateplugins` permission. (@hakusaro)
|
||||
* Removed REST `/v3/server/restart/` route and `/server/restart/` route. (@hakusaro)
|
||||
* The "auth system" is now referred to as the initial setup system (what it actually is). This is better verbiage for basically all situations. Who really wants to turn off the "authentication system?" In addition, the system now makes it more clear what the point of it is, rather than that it grants permissions. (@hakusaro)
|
||||
* `GetDataHandlers.SendTileSquare` hook now sends a `TSPlayer` and a `MemoryStream` of raw data. (@hakusaro)
|
||||
* Added `GetDataHandlers.HealOtherPlayer` hook. (@hakusaro)
|
||||
* Added `GetDataHandlers.PlaceObject` hook. (@hakusaro)
|
||||
* `GetDataHandlers.KillMe` now sends a `TSPlayer` and a `PlayerDeathReason`. (@hakusaro)
|
||||
* Added `GetDataHandlers.ProjectileKill` hook. (@hakusaro)
|
||||
* Removed `TShock.CheckProjectilePermission`. (@hakusaro)
|
||||
* Added `TSPlayer` object to `GetDataHandlers.LiquidSetEventArgs`. (@hakusaro)
|
||||
* Removed `TShock.StartInvasion` for public use (moved to Utils and marked internal). (@hakusaro)
|
||||
* Fixed invasions started by TShock not reporting size correctly and probably not working at all. (@hakusaro)
|
||||
* Removed `GetDataHandlers.TileKill` and replaced it with `GetDataHandlers.PlaceChest` as the packet originally designated as tile kill is now only used for chests. (@hakusaro)
|
||||
* Added `TSPlayer` to `GetDataHandlers.NPCHome`. (@hakusaro)
|
||||
* Added `TSPlayer` to `GetDataHandlers.ChestItemChanged`. (@hakusaro)
|
||||
* Fixed chest item changes not triggering any range checks, tile checks, or correct chest checks. (@hakusaro)
|
||||
* Added `TSPlayer` to `GetDataHandlers.PlayerBuff`. (@hakusaro)
|
||||
* Added `TSPlayer` and `PlayerDeathReason` to `GetDataHandlers.PlayerDamage`. (@hakusaro)
|
||||
* Added `TSPlayer` to `GetDataHandlers.NPCStrike`. (@hakusaro)
|
||||
* Added `TSPlayer` to `GetDataHandlers.PlayerAnimation`. (@hakusaro)
|
||||
* Added `GetDataHandlers.MassWireOperation` hook and related arguments. (@hakusaro)
|
||||
* Added `GetDataHandlers.PlaceTileEntity` hook and related arguments. (@hakusaro)
|
||||
* Added `TSPlayer` to `GetDataHandlers.GemLockToggle`. (@hakusaro)
|
||||
* Added `GetDataHandlers.PlaceItemFrame` hook and related arguments. (@hakusaro)
|
||||
* Added `TSPlayer.IsBouncerThrottled()`. (@hakusaro)
|
||||
* Added `TSPlayer.IsBeingDisabled()` and removed `TShock.CheckIgnores(TSPlayer)`. (@hakusaro)
|
||||
* Added `TSPlayer.CheckIgnores()` and removed `TShock.CheckIgnores(TSPlayer)`. (@hakusaro)
|
||||
* Hooks inside TShock can now be registered with their `Register` method and can be prioritized according to the TShock HandlerList system. (@hakusaro)
|
||||
* Fix message requiring login not using the command specifier set in the config file. (@hakusaro)
|
||||
* Move `TShock.CheckRangePermission()` to `TSPlayer.IsInRange` which **returns the opposite** of what the previous method did (see updated docs). (@hakusaro)
|
||||
* Move `TShock.CheckSpawn` to `Utils.IsInSpawn`. (@hakusaro)
|
||||
* Replace `TShock.CheckTilePermission` with `TSPlayer.HasBuildPermission`, `TSPlayer.HasPaintPermission`, and `TSPlayer.HasModifiedIceSuccessfully` respectively. (@hakusaro)
|
||||
* Fix stack hack detection being inconsistent between two different check points. Moved `TShock.HackedInventory` to `TSPlayer.HasHackedItemStacks`. Added `GetDataHandlers.GetDataHandledEventArgs` which is where most hooks will inherit from in the future. (@hakusaro)
|
||||
* All `GetDataHandlers` hooks now inherit from `GetDataHandledEventArgs` which includes a `TSPlayer` and a `MemoryStream` of raw data. (@hakusaro)
|
||||
* Removed _all obsolete methods in TShock marked obsolete prior to this version (all of them)_ (@hakusaro).
|
||||
* Removed broken noclip detection and attempted prevention. TShock wasn't doing a good job at stopping noclip. It's always worse to claim that you do something that you can't/don't do, so removing this is better than keeping broken detection in. (@hakusaro)
|
||||
* Replaced `Utils.FindPlayer` with `TSPlayer.FindByNameOrID` to more appropriately be object orientated. (@hakusaro)
|
||||
* Moved `Utils.Kick()` to `TSPlayer` since its first argument was a `TSPlayer` object. (@hakusaro)
|
||||
* Removed `Utils.ForceKick()`. (@hakusaro)
|
||||
* Removed `Utils.GetPlayerIP()`. (@hakusaro)
|
||||
* Moved `Utils.Ban()` to `TSPlayer.Ban()`. (@hakusaro)
|
||||
* Moved `Utils.SendMultipleMatchError()` to `TSPlayer.SendMultipleMatchError`. (@hakusaro)
|
||||
* Removed `Utils.GetPlayers()`. Iterate over the TSPlayers on the server and make your own list.
|
||||
* Removed `Utils.HasBanExpired()` and replaced with `Bans.RemoveBanIfExpired()`. (@hakusaro)
|
||||
* Removed `Utils.SendFileToUser()` and replaced with `TSPlayer.SendFileTextAsMessage()`. (@hakusaro)
|
||||
* Removed `Utils.GetGroup()` also have you seen `Groups.GetGroupByName()`? (@hakusaro)
|
||||
* `Utils.MaxChests()` is now `Utils.HasWorldReachedMaxChests()`. (@hakusaro)
|
||||
* `Utils.GetIPv4Address()` is now `Utils.GetIPv4AddressFromHostname()`. (@hakusaro)
|
||||
* Fixed the disappearing problem when placing tile entities. (@mistzzt)
|
||||
* Removed the stat tracking system. (@hakusaro)
|
||||
* Fixed erroneous kicks and bans when using `KickOnMediumcoreDeath` and `BanOnMediumcoreDeath` options. (@DankRank)
|
||||
* Removed `TSPlayer.InitSpawn` field. (@DankRank)
|
||||
* `OnPlayerSpawn`'s player ID field is now `PlayerId`. (@DankRank)
|
||||
* Fixed null reference console spam in non-SSC mode (@QuiCM)
|
||||
* `Utils.TryParseTime` can now take spaces (e.g., `3d 5h 2m 3s`) (@QuiCM)
|
||||
* Enabled banning unregistered users (@QuiCM)
|
||||
* Added filtering and validation on packet 96 (Teleport player through portal) (@QuiCM)
|
||||
* Update tracker now uses TLS (@pandabear41)
|
||||
* When deleting an user account, any player logged in to that account is now logged out properly (@Enerdy)
|
||||
* Add NPCAddBuff data handler and bouncer (@AxeelAnder)
|
||||
* Improved config file documentation (@Enerdy)
|
||||
* Add PlayerZone data handler and bouncer (@AxeelAnder)
|
||||
* Update sqlite binaries to 32bit 3.27.2 for Windows (@hakusaro)
|
||||
* Fix banned armour checks not clearing properly (thanks @tysonstrange)
|
||||
* Added warning message on invalid group comand (@hakusaro, thanks to IcyPhoenix, nuLLzy & Cy on Discord)
|
||||
* Moved item bans subsystem to isolated file/contained mini-plugin & reorganized codebase accordingly. (@hakusaro)
|
||||
* Moved bouncer checks for item bans in OnTileEdit to item bans subsystem. (@hakusaro)
|
||||
* Compatibility with Terraria 1.4.0.2 (@AxeelAnder, @Patrikkk)
|
||||
* Multiple fields got slightly renamed.
|
||||
* Modifying ToggleExpert command. Main.expertMode is no longer settable. Using a Main.GameMode int property comparsion.
|
||||
* GameCulture no longer has static fields to get local language. Using methods to return/compare language.
|
||||
|
||||
## TShock 4.3.26
|
||||
* Removed the stat tracking system. (@hakusaro)
|
||||
|
|
|
|||
|
|
@ -297,15 +297,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
// Using the actuation accessory can lead to actuator hacking
|
||||
if (TShock.Itembans.ItemIsBanned("Actuator", args.Player) && args.Player.TPlayer.autoActuator)
|
||||
{
|
||||
args.Player.SendTileSquare(tileX, tileY, 1);
|
||||
args.Player.SendErrorMessage("You do not have permission to place actuators.");
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
if (TShock.Itembans.ItemIsBanned(EnglishLanguage.GetItemNameById(selectedItem.netID), args.Player) || editData >= (action == EditAction.PlaceTile ? Main.maxTileSets : Main.maxWallTypes))
|
||||
if (editData >= (action == EditAction.PlaceTile ? Main.maxTileSets : Main.maxWallTypes))
|
||||
{
|
||||
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||
args.Handled = true;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ namespace TShockAPI
|
|||
ServerApi.Hooks.GameUpdate.Register(plugin, OnGameUpdate);
|
||||
GetDataHandlers.PlayerUpdate += OnPlayerUpdate;
|
||||
GetDataHandlers.ChestItemChange += OnChestItemChange;
|
||||
GetDataHandlers.TileEdit += OnTileEdit;
|
||||
}
|
||||
|
||||
/// <summary>Called on the game update loop (the XNA tickrate).</summary>
|
||||
|
|
@ -192,6 +193,27 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
internal void OnTileEdit(object sender, TileEditEventArgs args)
|
||||
{
|
||||
if (args.Action == EditAction.PlaceTile || args.Action == EditAction.PlaceWall)
|
||||
{
|
||||
if (args.Player.TPlayer.autoActuator && DataModel.ItemIsBanned("Actuator", args.Player))
|
||||
{
|
||||
args.Player.SendTileSquare(args.X, args.Y, 1);
|
||||
args.Player.SendErrorMessage("You do not have permission to place actuators.");
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (DataModel.ItemIsBanned(EnglishLanguage.GetItemNameById(args.Player.SelectedItem.netID), args.Player))
|
||||
{
|
||||
args.Player.SendTileSquare(args.X, args.Y, 4);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UnTaint(TSPlayer player)
|
||||
{
|
||||
player.IsDisabledForBannedWearable = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue