Commit graph

450 commits

Author SHA1 Message Date
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
Chris
39e13f74d6 Remove TShock.Itembans in favour of TShock.ItemBans 2020-11-13 19:22:10 +10:30
Chris
f513ec24ad Add extra accessory slots to TSPlayer.Accessories 2020-11-13 17:44:54 +10:30
Chris
7122e5fb9a Update TSPlayer to allow sending tile rectangles 2020-11-13 17:44:27 +10:30
Rustly
01bae0475d apply the rest of fixes for snake flute, prevent players from seeing the npc perm error on join 2020-06-15 13:32:42 -05:00
Chris
d46f534533 Standardize permission rejection messages 2020-06-02 10:18:40 +09:30
Chris
badba523e7
Merge branch 'general-devel' into projectilestruct-addition 2020-06-01 19:12:38 +09:30
Chris
9fb27543b9 Some refactoring from feedback 2020-06-01 18:35:58 +09:30
Chris
36089d96bb Fix doors for real this time.
Should also fix tile entities (such as item frames, pylons) and other tile objects.
Further, fixes a longstanding issue with SendTileSquare that resulted in half squares being sent instead of full squares, causing visual bugs and desyncs most noticeable with doors
2020-06-01 15:12:45 +09:30
Patrikkk
9934a3935d ProjectileStruct - Adding extra data
Can we store the type of the recent projectile as well? This could be used in my upcoming PR regarding the golf packet where I check for recently created projectiles, and their types. Having only the index is not useful in this scenario, because the projectile can already be killed, so cannot access the Main.projectile array to get the projectile type.

Can this be public instead of internal? Developers could make good use of it, instead of having to implement their own version of RecentProjectiles in their plugins.
2020-05-30 11:22:50 +02:00
Chris
d4a0f47e45 WIP - splitting STS into new class and processing methods 2020-05-29 14:05:43 +09:30
Chris
6e4b6e1f5e Fix paint permission check 2020-05-29 13:58:44 +09:30
Zack
9209ac0b73
Apply suggestions from code review
Co-authored-by: Lucas Nicodemus <shank@shanked.me>
2020-05-24 04:19:00 -04:00