Commit graph

462 commits

Author SHA1 Message Date
AkjaHAsLk1IALk0MasH
3647bbaf54 Added a reason for the KillPlayer and DamagePlayer methods.
Added overloads that have a cause in the parameters (`PlayerDeathReason`)
2023-05-14 09:20:20 +07:00
AkjaHAsLk1IALk0MasH
fa9e4419bd Added documentation to the withMsg parameter in the SetPvP method. 2023-05-14 09:16:14 +07:00
AkjaHAsLk1IALk0MasH
c047b0e87d Added the Client property.
The `Client` property gets data from the array `Terraria.Netplay.Clients`.
2023-05-14 09:14:43 +07:00
AkjaHAsLk1IALk0MasH
6d4682ed7e Updated the GodMode field.
* Changed the GodMode field to a property that is controlled by the journey mode.
- Removed the call to godmode in `Commands.ToggleGodMode`.
2023-05-14 09:11:18 +07:00
ATFGK
95d157fd5d
Fix Terra Blade triggered MaxProjDamage, other net changes (#2852)
* update

* update

* update

* Update changelog.md

* Update changelog.md

Fixed syntax errors.

* Update SpawnMsg.cs

Use insteadUpperCamelCase

* Update changelog.md

* Update TSPlayer.cs

* Update TSPlayer.cs

Missing letters due to input method problems.

* Update `docs/changelog.md`

Co-authored-by: James Puleo <james@jame.xyz>
2022-12-05 21:45:37 -08:00
SGKoishi
770b177426
Rewording update 2022-11-04 20:40:07 -07:00
punchready
4f22d6a11e
Fix item giving
Previously this would potentially drop too many items on the ground if the inventory doesn't have enough free slots.
2022-11-01 01:29:46 +01:00
Lucas Nicodemus
61e36d0abd
Move GiveItemsDirectly config item to tshock config
Due to an issue that stops the SSC config persister thing from working,
I moved the config item that's new back to the config file. I tried
applying the patches from
https://github.com/Pryaxis/TShock/pull/2354/commits but these didn't
actually resolve the issue. I'm keeping the commits here but I'm not
sure they help.

The core problem is this: if you add a new config file item to the ssc
config, the ssc config is overwritten with the default config items
instead of being merged automatically with the new items. This is a
critical issue as it means that SSC is disabled on all servers that had
it enabled and results in "data misplacement" which is alarming enough
to cause users to think they had data loss, which is not ideal.

Until the issue with the SSC config is resolved, I'm not willing or
confident to change it.
2022-10-31 16:18:39 -07:00
Janet Blackquill
7198a47e82 Add ability for items given to players to be inserted directly into their inventory instead of spawned as an item drop 2022-10-28 15:04:53 -04:00
SGKoishi
f8c0f0ce15
i18n most texts 2022-10-24 21:16:28 -07:00
Lucas Nicodemus
1523b0d67c
Internationalizify more commands
This is most of commands through to projectile bans.
2022-10-22 18:23:40 -07:00
James Puleo
9dbe8c9e40
Check loadout slots for hacked item stacks 2022-10-22 17:37:00 -04:00
Luke
d6caeb15cc Fix hard/mediumcore ban on death
Removed the force parameter since it is of no use.
2022-10-07 18:42:31 +10:00
Luke
aa0bd7deb2 Merge branch 'general-devel' into otapi3 2022-09-06 22:23:34 +10:00
Anzhelika
b19a928fd8 PlayerHasBuildPermission hook (#8) 2022-07-24 19:23:10 -04:00
Lucas Nicodemus
49a2dce59e Merge remote-tracking branch 'origin/general-devel' into otapi3 2022-04-01 01:14:01 -07:00
gohjoseph
516add7803 Fix GiveItem not working if the player is in lava 2022-03-21 01:17:30 +08:00
Lucas Nicodemus
acde508c53 Merge branch 'general-devel' into otapi3 2022-02-28 00:15:06 -08:00
Patrikkk
1b96ed8992 Adding EntitySource parameter to the used at NewNPC and NewItem methods.
I've decided to use the DebugCommand entity source for anything server related, as it makes the most sense as source. Feel free to discuss.
2022-02-25 04:42:16 +01:00
Lucas Nicodemus
78169c87cb Merge remote-tracking branch 'origin/general-devel' into otapi3 2022-02-16 18:44:33 -08:00
0x3fcf1bbd
c6b04053a3
Removed clamping as the game does it itself. 2022-02-16 12:12:50 +01:00
0x3fcf1bbd
9bc936053b
Fixed STR width & length clamping being incorrect.
The main game should however clamp it itself too before sending, so there shouldn't be issues.
2022-02-16 11:32:43 +01:00
0x3fcf1bbd
874b3b2746 Reverted STS change, added STSC, fixed STS/STSC usage. 2022-02-01 16:00:05 +01:00
0x3fcf1bbd
af99c4cb8d
Fixed STS not being centered.
Inferring from the usage of it, this method was expected by its callers to be a square centered around the given coordinates (x, y), hence this being a fix.
2022-01-26 14:17:27 +01:00
Lucas Nicodemus
dfaad68106 Merge branch 'general-devel' into otapi3 2021-12-08 22:55:11 -08:00
James Puleo
fe3a59f84a
Fixed rejection check inside of HandlePaintTile to account for the
Paint Sprayer (or Architect Gizmo Pack) being inside your inventory,
rather than on an accessory slot.
2021-12-07 02:42:27 -05:00
Luke
cec53c780f Merge branch 'general-devel' into otapi3 2021-11-27 17:53:28 +10:00
Zoom L1
f98df0e4a3
Merge pull request #2447 from AgaSpace/patch-1
Add the ability to change the player's pvp mode
2021-11-23 22:52:47 -08:00
Luke
8edd0393e5 Initial OTAPI3 port
TODO: sqlite
2021-11-23 20:49:41 +10:00
stacey
2b50cbc7b9
Merge branch 'general-devel' into general-devel 2021-09-13 09:52:46 -04:00
Armano den Boef
ccea7b7d57
Return loopback IP if RealPlayer is false 2021-08-09 01:32:17 +02:00
stacey
7e4f05eb9c add colours to annoy
and add silent support
2021-08-06 16:29:20 -04:00
Killia0
154bee58f1 Typo fixes on comments/strings
My first PR contribution to TShock is spellcheck huh, frankly I don't know why but hey I could spare the time for this and caught some stuff.
2021-07-16 14:53:37 -04:00
stacey
d61ebb4111
Update TSPlayer.cs 2021-07-16 12:20:13 -04:00
stacey
1e9804a13d
Separate current player count and max server slots 2021-07-15 16:12:36 -04:00
stacey
b8b86a42fd
Add space after comma so names look less clustered 2021-07-15 15:51:14 -04:00
stacey
b88d1f562f
Add player count support for MOTD 2021-07-15 15:48:27 -04:00
Lucas Nicodemus
da163b80ac Allow operators to disable build permission notices
This commit allows server operators to disable build permission failure
notices. This is because some servers wish to have a "silent" operation
mode where the server doesn't send out these messages to users. This
makes sense, e.g., when the server is a "museum" and isn't intended to
be changed.
2021-06-12 23:53:17 -07:00
Lucas Nicodemus
fd97c2268a Send success messages as Color.LightGreen
Basically Color.Green looks ugly and Color.LightGreen looks less ugly. I
could see changing the default to something like pure green, but I think
this might cause people to be like "yo why is this so bright."

Now arguably this should be configurable but I'm not going to
revolutionize the world by abandoning far more important work to allow
more artful messages. I just think that Color.Green is ugly enough that
I can't tolerate it.
2021-06-12 13:22:56 -07:00
Lucas Nicodemus
e73ce17130 Add fallback for finding players using tsi & tsn
This commit adds a fallback to address problems with FindByNameOrID
potentially returning ambiguous results. Now, in response to a multiple
match error, a player can specify tsi:[number] or tsn:[exact name] to
match a user ID or name exactly. This behaves analogous to the old
behavior of the search method.
2021-05-25 19:25:30 -07:00
Lucas Nicodemus
09fe254f17 Change TSPlayer.FindByNameOrID to keep searching
Currently, the TSPlayer FindbyNameOrID method aborts if it finds an
"exact match" based on this criteria:

1. If the player ID is on the server, it must be the thing we're looking
   for. Therefore, return that.

2. If the case sensitive "exact match" is on the server that isn't an
   ID, that must be what we're looking for. Therefore, return that.

3. Just yolo and downcase everything and return any number of matching
   players next.

This commit changes the behavior because some players have been joining
servers with ambiguous names, like `1`. In the current system, this
player is difficult to query because they're an "ID" and therefore an
exact match will be returned even if a player name exists that matches
the criteria.

This also alleviates the issue of a case exact match falling down the
same trap. It's ambiguous enough in all of these situations that an
admin should just be using a player ID instead.`
2021-05-25 18:39:56 -07:00
Lucas Nicodemus
68ae73ffef Warn players if bypass SSC permission is enabled
If a player has the tshock.ignore.ssc permission, odds are that they may
want to know that their data isn't being saved or not. This change
allows users to be notified if they have SSC data stored in the DB but
they aren't having it loaded due to the aforementioned permission.

This permission causes great confusion, but we can't really change it
because we would break existing setups. This is an easy change that
gives people a reason why they suddenly "have no items."

This new option can be turned off in the config file for SSC if it's not
desired.

This change also modifies some of the log messages so that it's clear
why the SSC save didn't occur for a given player.
2021-05-21 01:16:04 -07:00
stacey
e0c9f45038
Add %specifier% to SendFileTextAsMessage 2021-05-14 12:58:16 -04:00
Chris
01fc41968d Refactor wallow command & update changelog 2021-04-19 22:04:41 +09:30
Luke
71e2ae1b31 Corrected UUID InsertBan in TSPlayer
Pointed out thanks to this discussion: https://github.com/Pryaxis/TShock/discussions/2268#discussioncomment-598331
2021-04-12 17:35:46 +10:00
Chris
e23509de75 Removed stoned and frozen from disable 2021-03-23 11:35:26 +10:30
Chris
9423febd0a Refactor for new configuration 2020-12-03 17:43:10 +10:30
Chris
3e6cdb3c71 Remove ban immunity at the command level.
Ban immunity will be managed when a ban is validated
2020-11-29 14:26:25 +10:30
Chris
cde4cc5f04 Ban rewrite and various other adjustments 2020-11-26 17:20:19 +10:30
Chris
56de9f6684 Ban rewrite 2020-11-15 11:05:04 +10:30