Merge branch 'general-devel' into h/betterlogs

This commit is contained in:
Lucas Nicodemus 2020-05-19 23:02:46 -07:00 committed by GitHub
commit e6df3edeec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 137 deletions

View file

@ -57,6 +57,26 @@
"doc",
"test"
]
},
{
"login": "ndragon798",
"name": "Nathan Easton",
"avatar_url": "https://avatars2.githubusercontent.com/u/10368650?v=4",
"profile": "http://www.nathaneaston.com/",
"contributions": [
"code"
]
},
{
"login": "Ristellise",
"name": "Shinon",
"avatar_url": "https://avatars2.githubusercontent.com/u/7894419?v=4",
"profile": "https://github.com/Ristellise",
"contributions": [
"test",
"code",
"doc"
]
}
],
"contributorsPerLine": 7,

View file

@ -4,6 +4,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
## Upcoming changes
* Debug logging now provides ConsoleDebug and ILog has been updated to support the concept of debug logs. Debug logs are now controlled by `config.json` instead of by preprocessor debug flag. (@hakusaro)
* Removed `/confuse` command and Terraria player data resync from @Zidonuke. (@hakusaro)
## TShock 4.4.0 (Pre-release 3)
* Fixed `/worldmode` command to correctly target world mode. (@Ristellise)

View file

@ -261,6 +261,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://sgkoi.dev"><img src="https://avatars2.githubusercontent.com/u/9637711?v=4" width="100px;" alt=""/><br /><sub><b>Stargazing Koishi</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=sgkoishi" title="Code">💻</a> <a href="#infra-sgkoishi" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center"><a href="https://github.com/AxeelAnder"><img src="https://avatars2.githubusercontent.com/u/25691207?v=4" width="100px;" alt=""/><br /><sub><b>Axeel</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=AxeelAnder" title="Documentation">📖</a> <a href="#projectManagement-AxeelAnder" title="Project Management">📆</a></td>
<td align="center"><a href="https://aurora-gaming.org/"><img src="https://avatars0.githubusercontent.com/u/58985873?v=4" width="100px;" alt=""/><br /><sub><b>Patrikkk</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=Patrikkk" title="Code">💻</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Patrikkk" title="Documentation">📖</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Patrikkk" title="Tests">⚠️</a></td>
<td align="center"><a href="http://www.nathaneaston.com/"><img src="https://avatars2.githubusercontent.com/u/10368650?v=4" width="100px;" alt=""/><br /><sub><b>Nathan Easton</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=ndragon798" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Ristellise"><img src="https://avatars2.githubusercontent.com/u/7894419?v=4" width="100px;" alt=""/><br /><sub><b>Shinon</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=Ristellise" title="Tests">⚠️</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Ristellise" title="Code">💻</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Ristellise" title="Documentation">📖</a></td>
</tr>
</table>

View file

@ -77,6 +77,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://sgkoi.dev"><img src="https://avatars2.githubusercontent.com/u/9637711?v=4" width="100px;" alt=""/><br /><sub><b>Stargazing Koishi</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=sgkoishi" title="Code">💻</a> <a href="#infra-sgkoishi" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center"><a href="https://github.com/AxeelAnder"><img src="https://avatars2.githubusercontent.com/u/25691207?v=4" width="100px;" alt=""/><br /><sub><b>Axeel</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=AxeelAnder" title="Documentation">📖</a> <a href="#projectManagement-AxeelAnder" title="Project Management">📆</a></td>
<td align="center"><a href="https://aurora-gaming.org/"><img src="https://avatars0.githubusercontent.com/u/58985873?v=4" width="100px;" alt=""/><br /><sub><b>Patrikkk</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=Patrikkk" title="Code">💻</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Patrikkk" title="Documentation">📖</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Patrikkk" title="Tests">⚠️</a></td>
<td align="center"><a href="http://www.nathaneaston.com/"><img src="https://avatars2.githubusercontent.com/u/10368650?v=4" width="100px;" alt=""/><br /><sub><b>Nathan Easton</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=ndragon798" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Ristellise"><img src="https://avatars2.githubusercontent.com/u/7894419?v=4" width="100px;" alt=""/><br /><sub><b>Shinon</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=Ristellise" title="Tests">⚠️</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Ristellise" title="Code">💻</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Ristellise" title="Documentation">📖</a></td>
</tr>
</table>

View file

@ -337,10 +337,6 @@ namespace TShockAPI
{
HelpText = "Annoys a player for an amount of time."
});
add(new Command(Permissions.annoy, Confuse, "confuse")
{
HelpText = "Confuses a player for an amount of time."
});
add(new Command(Permissions.annoy, Rocket, "rocket")
{
HelpText = "Rockets a player upwards. Requires SSC."
@ -5208,26 +5204,6 @@ namespace TShockAPI
}
}
private static void Confuse(CommandArgs args)
{
if (args.Parameters.Count != 1)
{
args.Player.SendErrorMessage("Invalid syntax! Proper syntax: {0}confuse <player>", Specifier);
return;
}
var players = TSPlayer.FindByNameOrID(args.Parameters[0]);
if (players.Count == 0)
args.Player.SendErrorMessage("Invalid player!");
else if (players.Count > 1)
args.Player.SendMultipleMatchError(players.Select(p => p.Name));
else
{
var ply = players[0];
ply.Confused = !ply.Confused;
args.Player.SendSuccessMessage("{0} is {1} confused.", ply.Name, ply.Confused ? "now" : "no longer");
}
}
private static void Rocket(CommandArgs args)
{
if (args.Parameters.Count != 1)

View file

@ -2128,119 +2128,7 @@ namespace TShockAPI
if (OnPlayerUpdate(args.Player, args.Data, playerID, controls, miscData1, miscData2, miscData3, selectedItem, position, velocity, originalPosition, homePosition))
return true;
if (controls.IsUsingItem)
{
// Reimplementation of normal Terraria stuff?
if (args.TPlayer.inventory[selectedItem].Name == "Mana Crystal" && args.Player.TPlayer.statManaMax <= 180)
{
args.Player.TPlayer.statMana += 20;
args.Player.TPlayer.statManaMax += 20;
args.Player.PlayerData.maxMana += 20;
}
else if (args.TPlayer.inventory[selectedItem].Name == "Life Crystal" && args.Player.TPlayer.statLifeMax <= 380)
{
args.TPlayer.statLife += 20;
args.TPlayer.statLifeMax += 20;
args.Player.PlayerData.maxHealth += 20;
}
else if (args.TPlayer.inventory[selectedItem].Name == "Life Fruit" && args.Player.TPlayer.statLifeMax >= 400 && args.Player.TPlayer.statLifeMax <= 495)
{
args.TPlayer.statLife += 5;
args.TPlayer.statLifeMax += 5;
args.Player.PlayerData.maxHealth += 5;
}
}
// Where we rebuild sync data for Terraria?
args.TPlayer.selectedItem = selectedItem;
args.TPlayer.position = position;
args.TPlayer.oldVelocity = args.TPlayer.velocity;
args.TPlayer.velocity = velocity;
args.TPlayer.fallStart = (int)(position.Y / 16f);
args.TPlayer.controlUp = false;
args.TPlayer.controlDown = false;
args.TPlayer.controlLeft = false;
args.TPlayer.controlRight = false;
args.TPlayer.controlJump = false;
args.TPlayer.controlUseItem = false;
args.TPlayer.pulley = miscData1.IsUsingPulley;
if (miscData1.IsUsingPulley)
args.TPlayer.pulleyDir = (byte)(miscData1.PulleyDirection ? 2 : 1);
if (miscData1.IsVortexStealthActive)
args.TPlayer.vortexStealthActive = true;
else
args.TPlayer.vortexStealthActive = false;
args.TPlayer.gravDir = miscData1.GravityDirection ? 1f : -1f;
args.TPlayer.direction = -1;
if (controls.MoveUp)
{
args.TPlayer.controlUp = true;
}
if (controls.MoveDown)
{
args.TPlayer.controlDown = true;
}
if (controls.MoveLeft)
{
args.TPlayer.controlLeft = true;
}
if (controls.MoveRight)
{
args.TPlayer.controlRight = true;
}
if (controls.Jump)
{
args.TPlayer.controlJump = true;
}
if (controls.IsUsingItem)
{
args.TPlayer.controlUseItem = true;
}
if (controls.FaceDirection)
{
args.TPlayer.direction = 1;
}
else
{
args.TPlayer.direction = -1;
}
if (args.Player.Confused && Main.ServerSideCharacter && args.Player.IsLoggedIn)
{
if (args.TPlayer.controlUp)
{
args.TPlayer.controlDown = true;
args.TPlayer.controlUp = false;
}
else if (args.TPlayer.controlDown)
{
args.TPlayer.controlDown = false;
args.TPlayer.controlUp = true;
}
if (args.TPlayer.controlLeft)
{
args.TPlayer.controlRight = true;
args.TPlayer.controlLeft = false;
}
else if (args.TPlayer.controlRight)
{
args.TPlayer.controlRight = false;
args.TPlayer.controlLeft = true;
}
args.TPlayer.Update(args.TPlayer.whoAmI);
NetMessage.SendData((int)PacketTypes.PlayerUpdate, -1, -1, NetworkText.Empty, args.Player.Index);
return true;
}
NetMessage.SendData((int)PacketTypes.PlayerUpdate, -1, args.Player.Index, NetworkText.Empty, args.Player.Index);
return true;
return false;
}
private static bool HandlePlayerHp(GetDataHandlerArgs args)