Commit graph

885 commits

Author SHA1 Message Date
Lucas Nicodemus
d50ebfea37 Merge remote-tracking branch 'drunderscore/feature/bouncer-reject-out-of-bounds-npc-talk' into general-devel 2021-12-04 22:35:37 -08:00
James Puleo
4dab0802a1
Added the OnSignRead handler in GetDataHandlers, and added the
`SignRead` event.

Added check to ensure the sign being read is within world bounds (x >= 0
&& y >= 0 && x < Main.maxTilesX && y < Main.maxTilesY)
2021-12-03 21:11:23 -05:00
James Puleo
97f33fea63
Added check to HandleNpcTalk to ensure the passed NPC index is within
bounds (>= -1 && < `Main.maxNPCs`).
2021-12-03 19:57:46 -05:00
tru321
0b1da29cf8
Update GetDataHandlers.cs 2021-12-01 14:35:02 +08:00
tru321
a2a13ce494
Added DataHandler for NpcTalk
This should stopping unregistered and logged out players to interact with NPC. Which prevent them smuggling or duplicating items via NPC items slot.
2021-12-01 13:44:41 +08:00
AkjaHAsLk1IALk0MasH
85a4656274 Added values for AI[]. 2021-11-26 23:52:05 +07:00
Arthri
a1eaf285cd Merge remote-tracking branch 'parent/general-devel' into fix-invalid-place-style 2021-11-24 09:21:40 +08:00
Arthri
aa5cb13247 Fix bad XML(no opening <summary) 2021-11-23 17:12:49 +08:00
Armano den Boef
1329813f59
Merge branch 'Pryaxis:general-devel' into patch-1 2021-08-25 12:39:04 +02:00
Chris
09a2947cf4
Merge branch 'general-devel' into fix-invalid-groups 2021-08-25 19:16:57 +09:30
Armano den Boef
5bcd37949b
Editing the return in HandleSpecial; Fixes #2436. 2021-08-23 22:58:56 +02:00
Arthri
335c1ddb50 Add entry for Ice Rod 2021-08-18 18:40:04 +08:00
Arthri
638b7cc54f Remove multiblock tiles 2021-08-18 17:39:28 +08:00
Arthri
a0cd2849ed Add missing entries to ExtraneousPlaceStyles 2021-08-18 17:15:36 +08:00
quake1337
b32058ac51
Remove the test method from Utils, re-route checks to GroupManager 2021-08-07 13:56:52 +02:00
Chris
c3a074336d
Merge branch 'general-devel' into feature/force-character-gamemodes 2021-08-02 20:05:59 +09:30
quake1337
91376ae087
Merge branch 'general-devel' into fix-invalid-groups 2021-07-31 16:38:12 +02:00
stacey
b53f62a9c6
Merge branch 'general-devel' into patch-29 2021-07-24 20:43:20 -04:00
James Puleo
a40effd55e
Introduce SoftcoreOnly config option to allow only softcore characters
to connect.
2021-07-24 20:22:22 -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
10e0b33e82
Add Lunatic Cultist summon permission check
Didn't bother adding the broadcast stuff bc there's 4 cultists and it'll prob spam the chat if multiple players kill them at around the same time
2021-07-16 14:19:37 -04:00
quake1337
c759af6d49 Minor update.
- AssertGroupValid now both sends the message and kicks the player
  depending on input parameter.
- /login and DataHandler code is now an identical assert check.
2021-07-13 21:53:54 +02:00
quake1337
48370d74b7 Missing group safeguards.
- Server will no longer start up when the guest or default groups cannot
  be located.
- Players joining with unknown groups assigned to them will be
  disconnected with an error
2021-07-13 21:33:35 +02:00
stacey
2a6bc51dd6
Change EoL summon to be more consistent w/ config
now this should be more in line with how other boss summons are currently handled, also made the sundial user messages better thx to quake's suggestions
2021-07-11 23:11:28 -04:00
stacey
65bbd80ca6
Add perm check for EoL + Sundial ForceTime check
If the player does not have permission to summon bosses, they should not be able to kill Prismatic Lacewing, which summons the Empress of Light. 
Using the Enchanted Sundial while ForceTime is set to day or night (via config) will conflict with TShock's continued attempts to set it back to day or night, this makes the world appear very glitchy.
2021-07-04 21:33:48 -04:00
Lucas Nicodemus
1a2281865d Remove now defunct comment 2021-05-28 23:55:27 -07:00
Lucas Nicodemus
580b6d7c61 Add OnDoorUse hook/event in GetDataHandlers 2021-05-28 23:53:29 -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
Quinci135
5581bf5e45 Fix torchflags
UsingBiomeTorches: Whether or not the player has the torchgod biometorches ability enabled
HappyFunTorchTime: Whether or not the player has fought the torchgod before (for logic that checks for torchgod spawning)
unlockedBiomeTorches: Whether or not the player has the torchgod biome torches ability unlocked
2021-05-23 04:48:01 -07:00
Lucas Nicodemus
6856c867dd Use correct value to read usingBiomeTorches in GDH
This fixes a ridiculous typo in GetDataHandlers where we were setting
the UsingBiomeTorches flag based on having unlocked biome torches,
rather than actually being used. Thanks to @Arthri for the tip!
2021-05-23 03:21: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
James Puleo
b3cf5f4e43
Implement additional teleport permissions.
This adds the follows permissions to the following items:
- tshock.tp.tppotion:   Teleportation Potion
- tshock.tp.magicconch:  Magic Conch
- tshock.tp.demonconch: Demon Conch
2021-05-11 14:17:36 -04:00
Chris
76ea1760fd
Merge branch 'general-devel' into pscheck 2021-04-22 13:16:40 +09:30
quake1337
207b43e772 Update /godmode to use JourneyMode Godmode power.
- Previous Bouncer checks for GodMode (namely, Hurt) were removed.
- The command now uses the GodmodePower from core Terraria
- The toggle powers (which this command will now make use of) are now
  reset on disconnect to prevent accidentally "gifting" godmode to an
  unsuspecting player.
2021-04-16 06:11:26 +02:00
Chris
3664b81c3f
Merge branch 'general-devel' into pscheck 2021-04-13 16:32:14 +09:30
Stealownz
bc32eab4c8 Update GetDataHandler.HandleProjectileNew to include HasBannerIdToRespondTo 2021-04-05 10:45:41 +08:00
Chris
85fbf593c9 Implement place style checks, courtesy of @AgaSpace 2021-03-22 10:29:09 +10:30
Chris
9423febd0a Refactor for new configuration 2020-12-03 17:43:10 +10:30
Chris
3776a71a20 Handle SyncExtraValue all the time
This may prevent platinum coin duping
2020-12-03 14:26:13 +10:30
Chris
ca38d64632 The great refactoring! Squares to Rectangles 2020-11-13 17:46:00 +10:30
Stealownz
8969ce4a94 Add Torch God's Favor to SSC
Closes #2031
2020-11-01 22:55:50 +08:00
Patrikkk
d4e4692d8b Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 13:41:14 +02:00
Patrikkk
89ab7be0f8 TileEntityInteraction - Pass TileEntity object instead of ID in args. 2020-06-25 01:51:30 +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
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
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
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
stacey
067006a092
Add clarity to !HasPermission error messages
And a few other minor formatting/grammar changes.
2020-06-13 13:13:46 -04:00