Commit graph

182 commits

Author SHA1 Message Date
Patrikkk
0fa8ae13d7 Implement FoodPlatter placing event.
This is called when a player is placing a fruit (item) in a plate.
Adding checks to see if they have permission to place or replace a fruit in the item.
Checks if they are within range. And a check to see if they are legitimately placing the item from their hand, and not by sending a raw packet.
2020-05-28 19:24:28 +02:00
Olink
56b695b80b Add initial support for Journey mode in SSC. 2020-05-25 02:24:03 -04:00
Chris
c2e3f65a2a Add modeling to new projectile handling 2020-05-18 15:47:31 +09:30
Chris
db84a9fc8f Adds models for the random bitsbyte data received in packet 13 - player update 2020-05-18 14:42:29 +09:30
鱼鱼
43f586cde5 Merge branch 'general-devel' of https://github.com/Pryaxis/TShock
 Conflicts:
	CHANGELOG.md
	TShockAPI/GetDataHandlers.cs
	TShockAPI/TShock.cs
2020-05-17 21:38:07 +08:00
Lucas Nicodemus
b5f95d5918
Fragments: Separate out item bans (#1595)
* Remove commented out warning disable

* Add initial ItemBans segregation infrastructure

* Add shell for initial OnSecondUpdate stuff

* Add comments yo

* Remove duplicated logic

* Split out more item ban code

This part of the fragments work is primarily aimed at reducing the
complexity of OnSecondUpdate in TShock and moving that check out into
the ItemBans subsytem.

Of major note in this is the removal of "check", which was a string
variable that tracked state and replacement of many of the item ban
activities with sane private methods that are at least somewhat
sensible. Obviously there's a lot to be desired in this system and I'm
really going for a run here by trying to continue a branch from so long
ago that I barely even remember the whole point of existence.

Still to do: GetDataHandlers related item ban code needs to be moved
into its own hook in the ItemBan system. Finally, there is a downside to
some of this: we're basically iterating over players again and again if
we keep this pattern up, which is kinda lame for complexity purposes.

* alt j: comment changes

* Move item ban check out of main playerupdate check

Separates out item ban logic from the rest of GetDataHandlers so that
item bans is more isolated in terms of what fragments is asking for.

* alt-j: convert indentation to tabs

* alt-j: fix botching source code

* Move item ban related chest checks out of gdh

* Remove chest item change detection from item bans

It doesn't do anything. If a user removes an item from a chest, it
bypasses this check. If a user adds an item to a chest, the server seems
to persist the change anyway, even if the event is handled. That's a bug
for sure, but fundamentally, it's not the item ban system's fault.

* Revert "Remove chest item change detection from item bans"

This reverts commit 758541ac5c4d4096df2db05ba2a398968113e1e4.

* Fix logic issues related to item ban handling

Re-implements chest item handling and correctly handles events and
returns after setting handled event state.

* Remove TSPlayer.HasProjectilePermission

In infinite wisdom, it turns out this is not a good method for TSPlayer
to have. It just checks the states of things as per what the item ban
system says is banned and then creates implicit relationships to the
projectile ban system.

Doing this effectively knocks down another external reference to the
item ban system outside of the context of the implementation for the
system itself and its related hooks.

This commit also adds context around what the heck is going on with some
of our more interesting checks as per discussions in Telegram with @Ijwu
and @QuiCM.

* Update changelog

* Remove useless ref to Projectile.SetDefaults

* Change item ban to ban based on ID not strings

I think I was so confused as to why we were passing strings everywhere
that I just felt inclined to continue the trend in previous commits.
2020-05-16 16:27:34 -07:00
Chris
1dc320dbae Update to Newtonsoft JSON v10.0.3 for parity with OTAPI/TSAPI 2019-03-30 15:47:14 +10:30
Lucas Nicodemus
f3e33b7ad7 Remove the stat tracker
The stat tracker has been offline for the last several weeks/months and
nobody has done anything to fix that. Because of that, GDPR, and the
fact that we haven't used it, we're discarding it.
2019-03-29 17:46:44 -07:00
Ivan
44dfc570ab Merge remote-tracking branch 'upstream/general-devel' into regions 2018-04-29 18:39:12 +02:00
Ivan
ec78a070a7 Move Region related code into a separate subsystem 2018-04-29 18:33:07 +02:00
Lucas Nicodemus
3f58274ef4 Remove the stat tracker
The stat tracker has been offline for the last several weeks/months and
nobody has done anything to fix that. Because of that, GDPR, and the
fact that we haven't used it, we're discarding it.
2018-04-19 18:22:52 -06:00
Lucas Nicodemus
9b8aaceb12 Merge remote-tracking branch 'origin/general-devel' into fragments 2017-12-10 23:45:03 -07:00
quake1337
1f79e14bd7 Make TShock pull OTAPI from the correct folder on build 2017-12-11 01:12:27 +01:00
Lucas Nicodemus
54c33a5a09 Merge remote-tracking branch 'origin/general-devel' into fragments 2017-12-09 10:33:55 -07:00
Ryozuki
055d25330c update otapi 2017-12-09 17:57:33 +01:00
Lucas Nicodemus
e782a07564 Move SendTileSquare handling for Bouncer into Bouncer 2017-12-05 02:32:33 -07:00
Leo Li
0753e6d213 Add more HintPaths for OTAPI
This will help msbuild to find missing libraries when create release
with `/p:Configuration=Release`.

With this patch, the searching order will be:
  - If OTAPI with same configuration found, use that.
  - Else if OTAPI with Release configuration found, use that.
  - Else use OTAPI with Debug configuration.
2017-07-23 20:42:42 -07:00
ZIT WANG
930607a142 Add Localization support
* Add EnglishLanguage type to store English texts
* Itemban now store English item name
* Command `/i` `/give` `/sm` `/tpnpc` can use both English and current language input
2017-04-21 21:58:37 +08:00
White
fc7460c7d5 Added and implemented a basic command-line parser.
This replaces the switch-case in HandleCommandLine and HandleCommandLinePostConfigLoad
2017-03-13 11:43:41 +10:30
White
b3a2b24daa Updated the Stat Tracker to use System.Net.Http types.
Very similar to the previous Update Manager changes. The stat tracker now uses asynchronous threaded calls and manages exceptions better
2017-03-06 21:35:14 +10:30
White
c0a679b3f3 Forgot csproj 2017-01-06 13:57:02 +10:30
Luke
703a31580e Build script alterations, submodule update 2016-12-10 21:54:43 +10:00
Lucas Nicodemus
e4313b6433
Update to latest stuff from death 2016-12-06 20:34:12 -07:00
Lucas Nicodemus
678f6c7cf8
Update to Mintaka (thanks @enerdy) 2016-12-06 17:36:44 -07:00
Lucas Nicodemus
a8b4bf1d95
Remove PacketBufferer
The packet bufferer was obsolete.
2016-10-23 06:02:27 -06:00
George
a5a63cc68c Updated project to use NuGet where possible 2016-05-25 22:43:45 +01:00
Tyler Watson
4eca66a024 Removed ThreadPool threads in favour of plain threads.
See
NyxStudios/TerrariaAPI-Server@b1d62b6cbd
for details.
2016-05-10 23:46:44 +10:00
White
7dbebb2b9a Moved TSServerPlayer and PlayerData classes into their own files 2016-01-10 13:01:11 +10:30
Tyler Watson
f7826f681a Removed debug cruft from csproj 2015-09-12 18:13:40 +10:00
Tyler Watson
34f28bace3 TShock 4.3.10 - APIVersion 1.22 2015-09-12 18:08:10 +10:00
White
d15b0fd59c Fixed compilation errors with PacketBuffer.
Updated submodule
2015-07-04 22:17:36 +09:30
White
e33b6ebebc Now targets NET 4.5, so the solution actually compiles.
Fixed an issue where /user password sets a blank string in the database
Fixed an issue where /password <old> <new> wouldn't update the user's password
2015-05-27 18:29:29 +09:30
MarioE
d5fb8726cc Extend NetItem 2015-05-04 22:11:10 -04:00
Lucas Nicodemus
630c045397 Move resources to "prebuilts" folder. Fixes #904 2015-05-01 09:34:42 -06:00
Lucas Nicodemus
782b59f2b3 Add BCrypt reference to csproj file 2015-04-13 08:18:31 -06:00
Lucas Nicodemus
eb7e167008 Make 1.14k warnings appear for debug compilers
Launch on warning (LOW) is a strategy of nuclear weapon retaliation that gained recognition during the Cold War between the United States and the Soviet Union. With the invention of intercontinental ballistic missiles (ICBMs), launch on warning became an integral part of mutually assured destruction (MAD) theory. Under this strategy, a retaliatory strike is launched upon warning of enemy nuclear attack, while its missiles are still in the air, and before detonation occurs.
2015-04-13 00:29:47 -06:00
Lucas Nicodemus
6431edbf39 Remove deprecated Log methods 2015-04-12 22:15:07 -06:00
Zack Piispanen
406abce30c Add hooks for Region creation/deletion. Add hooks for Region Enter/Leave. Add member to TSPlayer displaying current region. Set private setters in AccountHooks. 2015-03-01 22:27:49 -05:00
Lucas Nicodemus
78c6f4db84 Come on VS save the csproj please 2015-02-28 19:17:24 -07:00
Lucas Nicodemus
db6c09787d Use less obsolete code
Disable XML comment warnings for the love of god
Fix some random tab/space conflict indentation
2015-02-28 19:09:02 -07:00
Lucas Nicodemus
0459dfca11 Adds SQL logging from WhiteX's fork; closes #869 2015-02-25 15:33:35 -07:00
Lucas Nicodemus
91d5fab27d Add account create & delete hooks 2015-02-21 22:35:05 -07:00
Zack
7a8422de5c Add tile banning, because such whine, much desire (doge).
I am sure this will result in someone whining for wall banning as well, but that can wait another couple of months.
2014-07-27 20:57:17 -04:00
Zack
915e791406 Initial work to move all Server Side Character code to its own module. 2014-07-10 21:09:32 -04:00
MarioE
5e74037a3a Remove any sort of Raptor interconnection -- should have been in some sort of separate plugin anyhow 2014-06-25 01:22:32 -04:00
Zack Piispanen
84d8049ac6 Add projectile bans and the commands needed to set them up. 2014-04-11 13:44:47 -04:00
MarioE
9f7055b806 Merge with upstream 2013-11-10 14:40:16 -05:00
Zack Piispanen
d56e02bb4e Add TSAPI as a submodule to the TShock repo, and reference it in the TShock project instead of an exe. 2013-11-10 08:44:30 -05:00
Zack Piispanen
bd2f98c203 Re-add Stat Tracker. Disabled while we set up the backend. 2013-11-06 23:41:50 -05:00
MarioE
3e9aee3414 Begin Raptor compatibility 2013-10-30 22:34:09 -04:00