Commit graph

991 commits

Author SHA1 Message Date
quake1337
78b72df79d Address JourneyMode Godmode issues
- Add /ungodme to allow unstucking godmode for involuntarily godmodded
  characters
- Warn player about disabling Godmode before disconnecting
- Minor change to command format to reduce code copypaste.
2021-04-16 10:14:46 +02:00
quake1337
4a28d6779f Update casing & remove using static
- god_power -> godPower
- Remove using static on GameContent.CreativePowers, instead fully
  qualify the nested class.
2021-04-16 07:01:11 +02:00
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
c72e64fa5e Add silent command support to spawnboss 2021-04-13 15:15:49 +09:30
Stealownz
4159f6c186 Update firework command to include extra parameter in NewProjectile 2021-04-05 09:49:41 +08:00
Nova4334
709997b728 Rewriting /grow; Adding /wallow 2021-03-21 01:59:44 +01:00
Terrabade
0f42b42d87 Change serverinfo "WinVer" to "Operating system" 2021-02-07 21:19:16 +00:00
Chris
9423febd0a Refactor for new configuration 2020-12-03 17:43:10 +10:30
Chris
514d7ac041 Refactored for 'ticket number' naming
Added 'ban help identifiers' to list known identifiers
Fixed some typos and restructured some logic
2020-11-29 16:22:37 +10:30
Chris
d68b1ed5ad Remove ban conversion command as it now happens automatically 2020-11-29 15:19:14 +10:30
Chris
29170e62a6 Rename unique ID -> ticket number
Also get ban conversion to execute cleanly and clean up after itself
2020-11-29 15:17:49 +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
Patrikkk
ce07c284cf Command.cs - Multiple minor changes. 2020-06-18 14:18:25 +02:00
moisterrific
2c1833342e
Add martians to validEvents response message 2020-06-06 22:54:14 -04:00
Chris
d46f534533 Standardize permission rejection messages 2020-06-02 10:18:40 +09:30
moisterrific
1cb72718c2
Add more bosses to /spawnboss
Add more bosses that has health bars/map icons to the command parameters. Added Lunatic Cultist to /spawnboss "all". Did not include Dark Mage or Ogre bosses since they have two different tier versions. Also added some abbreviations to existing bosses.
2020-05-30 17:57:16 -04:00
Lucas Nicodemus
efeb8b6167
Merge branch 'general-devel' into patch-6 2020-05-30 00:11:18 -07:00
Lucas Nicodemus
f82ab41a25
Add /sync command to alleviate door related sadness
Run /sync if your doors disappear. This will resync your local client
with the server state. For more information, please see the associated
changelog entry.
2020-05-29 21:04:48 -07:00
moisterrific
1f045c9a92
Update /spawnboss to include the 2 new bosses
Added Empress of Light and Queen Slime to the list of bosses that can be spawned individually and "all". Also removed the queen case because there are two bosses with queen in their name now.
2020-05-26 15:53:58 -04:00
Lucas Nicodemus
38fb33feb8
Merge branch 'general-devel' of github.com:Pryaxis/TShock into general-devel 2020-05-23 23:34:57 -07:00
Lucas Nicodemus
cdb1953f36
Clean up world save to be less alarmist 2020-05-23 23:33:16 -07:00
Axeel
535c9a2a7e
Fix wind command (#1879)
* Fix wind command
2020-05-24 13:39:50 +08:00
Lucas Nicodemus
f25ed62599
Make setup system less confusing to new players 2020-05-20 15:36:27 -07:00
鱼鱼
946d54b69e fix player spawn stuff 2020-05-20 21:27:49 +08:00
Lucas Nicodemus
dea5e0f8f8
Remove reference to obsolete forums in setup
Thanks to @Retrograde-i486 for pointing this out! Fixes #1793.
2020-05-20 00:25:13 -07:00
Lucas Nicodemus
145885beb3
Remove /confuse command 2020-05-19 22:26:45 -07:00
Chris
6ecdf8545f Consolidated a number of world event commands into one master command
`worldevent` is now the root for the following:
Meteor, fullmoon, bloodmoon, eclipse, invasions, sandstorm, rain.
Added a new set of permission nodes to represent world events: `tshock.world.events.*`
2020-05-20 00:11:04 +09:30
Chris
a178b31333 Fixes world mode some more 2020-05-19 23:04:23 +09:30
Asada shinon
31f9c57080 Quick Command ID Fix 2020-05-19 19:02:40 +08:00
Chris
240b6b71b0 Change toggleexpert command to change the world mode 2020-05-19 13:20:45 +09:30
Lucas Nicodemus
d8747c34e9
Rename /bloodmoon to /tbloodmoon 2020-05-18 18:25:07 -07:00
Lucas Nicodemus
1078b579c4
Incorporate @Patrikkk's changes over Axeel's
The TSAPI that Patrikkk has does not contain public fields for the
referenced GameMode types.
2020-05-17 11:58:21 -07:00
鱼鱼
01cf85c9ad use GameModeID instead of other consts 2020-05-17 21:46:03 +08:00
鱼鱼
1ed95c737e pass compile; add void vault code 2020-05-17 21:38:47 +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
Lucas Nicodemus
76150e2500
Provide warning message on invalid group command
This fixes #1742 where users could run group commands that didn't exist
and the server would silently fail rather than giving an error.
2020-05-13 21:10:01 -07:00
Lucas Nicodemus
70dd72443d Update copyright to 2019 again
Fixes #1658, most likely.
2019-03-29 17:16:37 -07:00
Chris
1d306994fe
Minor adjustments to the ban add subcommand
Should fix #1609
2018-05-22 10:24:14 +09:30
Lucas Nicodemus
569b350cea Update to Pryaxis, 2018 part 2
If there's one thing I learned in this exercise, it's that letting
people add random python scripts to the repo like gpltext.py that
promise to be easier than find and replace is a bad idea.
2018-01-01 02:20:56 -07:00
Lucas Nicodemus
8d934ef08f Update to 2018 2018-01-01 02:17:21 -07:00
Lucas Nicodemus
df4da817b6 Rename Utils.ActivePlayers to something better.
Issues related to ICollections being null led to reverting migrating
this to TSPlayer until a better solution is uncovered.
2017-12-31 01:30:13 -07:00
Lucas Nicodemus
a5cad284a8 Revert "Remove Utils.ActivePlayers"
This reverts commit b613fdcda6.
2017-12-31 01:28:21 -07:00
Lucas Nicodemus
43ddb73112 Revert "Migrate calls from Players.Length to ActivePlayers"
This reverts commit 521283c36b.
2017-12-31 01:24:54 -07:00
Lucas Nicodemus
521283c36b Migrate calls from Players.Length to ActivePlayers
As pointed out by @QuiCM, TShock.Players is actually an array and not a
smarter collection, so length will return the total collection size and
not the active players. An earlier commit was added that gives TSPlayer
an ICollection<TSPlayer> that contains only active players. This is now
the basis of determining the number of active players on the server.
2017-12-31 01:13:33 -07:00
Lucas Nicodemus
332e6b2518 Remove Utils.GetGroup().
This method duplicates Groups.GetGroupByName().
2017-12-29 08:45:29 -07:00
Lucas Nicodemus
3ac52091ea Move SendFileToUser to TSP.SendFileTextAsMessage.
This is not a great method, but it's actually the only method in TShock
that interpolates the %map% and %players% variables and it used in at
least three places in the codebase. Since it's already so specialized,
it's not worth changing it to take an actual File object, in my humble
opinion.

This also clarifies what the method does and what makes it special, as
opposed to being fairly generic.
2017-12-29 08:40:44 -07:00
Lucas Nicodemus
f06d1fd238 Remove Utils.GetPlayers().
This is a public method that only has two uses in TShock and both of
them are listing players to a player. A foreach isn't rocket science and
this method was originally created just because there was no good object
to iterate on (e.g., a TSPlayer array).
2017-12-29 08:26:51 -07:00