Commit graph

3631 commits

Author SHA1 Message Date
Chris
ce523e1436 Merge branch 'general-devel' into new-bans 2020-11-15 11:18:32 +10:30
Chris
fe5a7ec2e4 Disable STR debugging 2020-11-15 11:06:12 +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
4802ebed91 Make gem locks work properly. Closes #2140 and #2036 2020-11-13 19:04:53 +10:30
Chris
db10bf22e7 Refectoring continued - rename STS Handler to STR Handler 2020-11-13 18:50:54 +10:30
Chris
77fd8c9c9f Add calculated rollback rectangle for tile edits 2020-11-13 18:32:52 +10:30
Chris
ca38d64632 The great refactoring! Squares to Rectangles 2020-11-13 17:46:00 +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
Stealownz
8969ce4a94 Add Torch God's Favor to SSC
Closes #2031
2020-11-01 22:55:50 +08:00
Quinci135
253c239f86
Add missing comma 2020-10-14 15:45:43 -07:00
Quinci135
50e0bf0290
Added 1.4.1.0 player inflicted debuffs to bouncer
OnFire3/Hellfire - New magma stone debuff that deals 15 dps instead of 4 dps
Frostburn2/Frostbite - Frost armor new set bonus 25 dps instead of 8 dps
BoneWhipNPCDebuff - Debuff applied from new Spinal Tap whip
2020-10-14 15:21:16 -07:00
ZakFahey
90f519a1c6 Overwrite the config if any new fields are missing 2020-08-01 10:13:04 -07:00
ZakFahey
ccb2a00a71 Fix config file access errors when starting up multiple TShock servers at once
Use case would be multi-server networks. This commit ensures that sscconfig.json is read with FileShare.Read enabled and stops writing to config.json and sscconfig.json on server load immediately after reading it if the file already exists, which is a no-op since neither of the config files have changed at that point.
2020-07-27 10:05:28 -07:00
Edoan
838d55a737
Updated GravediggerShovel ID
Co-authored-by: Chris <2648373+QuiCM@users.noreply.github.com>
2020-07-07 21:49:08 -03:00
Edoan
c285b50d9f Add Graveyardigger's Shovel support 2020-07-05 13:17:08 -03:00
Patrikkk
530bc95123 RequestTileEntityInteractionHandler - Use object size for building perm check.
This commit will modify the RequestTileEntityInteractionHandler to use HasBuildPermissionForTileObject when checking for building permissions for Hat Rack and Display Doll to give an accurate response wether or not any part of the object has an overlapping protected region.
2020-06-27 10:22:03 +02:00
Lucas Nicodemus
0cfe670038
Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 21:57:00 -07:00
Patrikkk
05829dee3b Missing parenthesis from an if logic. Fix Tile placement reject. 2020-06-25 17:08:58 +02:00
Patrikkk
d4e4692d8b Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 13:41:14 +02:00
Patrikkk
c6723dbfa4
Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 01:52:06 +02:00
Patrikkk
89ab7be0f8 TileEntityInteraction - Pass TileEntity object instead of ID in args. 2020-06-25 01:51:30 +02:00
Patrikkk
b70f4fe96e
Merge branch 'general-devel' into displaydollsynchook 2020-06-25 01:42:58 +02:00
Patrikkk
38a1351d38 Register DisplayDollItemSyncHandler.
Moved the type check for 0 before itemSetDefaults to have less code run if the empty slots are clicked.
2020-06-25 01:42:22 +02:00
Chris
f1392cfa52
Merge branch 'general-devel' into patch-18 2020-06-24 15:08:52 +09:30
Patrikkk
90dd61e668 Moving the DisplayDollItemSync hook inside null check.
In crafted (hacked) packet sending, people could send the DisplayDollItemSync packet with an entity ID that is not actually a display doll. This would not happen in a normal scenario.
If they send the crafted packet, our hook would have been invoked and it would have contain a null TEDisplayDoll object since we tried to get the TileEntity object as a TEDisplayDoll object.
2020-06-21 15:03:08 +02:00
Patrikkk
64e61b8ed9 Add DisplayDollItemSyncHandler
In a previous PR I have added the tile entity request packet handler which checks for building permissions to prevent the unauthorized player to open a DisplayDoll and see its content.

This Handler is being added to prevent *Hackers* from modifying a DisplayDoll through direct/crafted packet sending, or by sending raw byte data to the server.
In a valid enviroment, the player couldn't even get to see the content of the doll in the first place, to then try to modify it's items.

Because of this,  I do not bother with making sure the player gets their item back.
2020-06-19 14:21:45 +02:00
Patrikkk
408eaf4383 Add TEDisplayDoll object to the event args. 2020-06-19 14:16:27 +02:00
Patrikkk
69f232b12a Adding DisplayDollItemSync event.
An event that is called when a player modifies the slot of a DisplayDoll (Mannequin).

I was trying to think from a developer friendly perspective here.
Instead of passing seperate variables for type/stack/prefix, thought I pass an Item object.
As well as, instead of having devs who work with this hook figure out and implement how to get the Item of the DisplayDoll, I just provide it in the hook.
I can imagine this being used for creative purposes in plugins.
2020-06-19 14:07:39 +02:00
Patrikkk
27525e9d1f
Merge branch 'general-devel' into commandscleanup 2020-06-18 23:57:55 +02:00
Patrikkk
972483340a
Merge branch 'general-devel' into addtileentityinteraction 2020-06-18 23:57:40 +02:00
Rustly
0a01ae6d83
Merge branch 'general-devel' into general-devel 2020-06-18 16:53:14 -05:00
Patrikkk
bb20626203 Add building permission checks for Hat Rack modification.
Keeping this code format to have the code be friendly with us in future updates, as well as display proper rejection message to the players.
2020-06-18 17:32:08 +02:00
Patrikkk
c418dda42c Add RequestTileEntityInteractionHandler. Check Mannequin modif perms.
Users can no longer open a Mannequin if they do not have building permissions at the position of the Mannequin.
(Mannequins work as a chest since 1.4)
2020-06-18 17:08:14 +02:00
Patrikkk
3012c92370 GetDataHandlers - Add RequestTileEntityInteraction hook. 2020-06-18 16:48:22 +02:00
Patrikkk
11a2a3e21b GetDataHandler - Code formatting. Modify order of Handler to respect PacketType value. 2020-06-18 16:34:33 +02:00
Patrikkk
d9ccf9fe60
Merge branch 'general-devel' into commandscleanup 2020-06-18 16:21:02 +02:00
Patrikkk
b19e95b99d
Merge branch 'general-devel' into removebouldercheck 2020-06-18 16:09:21 +02:00
Patrikkk
d0b845b279
Merge branch 'general-devel' into patch-18 2020-06-18 16:08:01 +02:00
Patrikkk
ce07c284cf Command.cs - Multiple minor changes. 2020-06-18 14:18:25 +02:00
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
Rustly
013ef4ce98 fix snake rope thingy 2020-06-15 12:37:49 -05:00
Patrikkk
865748fedf
Merge branch 'general-devel' into removebouldercheck 2020-06-13 22:58:36 +02:00
stacey
4949410cfa
minor grammar update 2020-06-13 13:26:34 -04:00
stacey
067006a092
Add clarity to !HasPermission error messages
And a few other minor formatting/grammar changes.
2020-06-13 13:13:46 -04:00
stacey
5b44c9dd84
Fix formatting...again 2020-06-13 10:41:02 -04:00
stacey
45b6daff0f
Merge branch 'general-devel' into patch-18 2020-06-13 10:36:42 -04:00
Patrikkk
a80e88b85b
Merge branch 'general-devel' into ontileeditcleanup 2020-06-13 12:13:20 +02:00
Patrikkk
2ed9e320c1 Bouncer OnTileEdit - Remove redundant Boulder placement check 2020-06-13 11:58:36 +02:00