Commit graph

1024 commits

Author SHA1 Message Date
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
Lucas Nicodemus
48393d60c7 Move SendMultipleMatchError to TSPlayer.
This is a great method for a player to have and not for the Utils class
to have.
2017-12-29 08:15:04 -07:00
Lucas Nicodemus
afdedee1c4 Change Utils.Reload to not take a player.
There are two occasions in the codebase when Utils.Reload is called and
we're competent enough that we can just call the event when the reload
happens. Unrelated note, but shouldn't this event be called prior to
reloading? I've kept it the same to preserve existing behavior, but I
think it should probably happen before the reload event takes place.

Either way, I think this is fine.
2017-12-29 08:04:20 -07:00
Lucas Nicodemus
f74a0f6a70 Merge remote-tracking branch 'origin/general-devel' into oop 2017-12-27 19:03:03 -07:00
Lucas Nicodemus
9e91db9ea4 Removed force kick for attempting to use setup
On many servers, players are tricked into running the /auth or /setup
command to get them kicked. This is stupid. Since the system is disabled
anyway, we don't need to kick them.
2017-12-27 17:43:21 -07:00
Lucas Nicodemus
f79c6a2962 Move Utils.Kick to TSPlayer.Kick 2017-12-27 13:00:13 -07:00
Lucas Nicodemus
b613fdcda6 Remove Utils.ActivePlayers
Duplicated what an array already stored and told us, but added code and
was obscure. It predated TSPlayers existing.
2017-12-26 21:14:16 -07:00
Lucas Nicodemus
11920cde48 Move Utils.FindPlayer -> TSPlayer.FindByNameOrID.
This makes TShock more OOP like (get the matching players from the
player as opposed to getting the players from a random class that
shouldn't exist).
2017-12-26 20:53:00 -07:00
Lucas Nicodemus
903bd5bb75 Migrate AddBan2 calls to AddBan
No more deprecation warnings on this release #yolo
2017-12-26 20:05:52 -07:00
Lucas Nicodemus
8e5ee7d286 Renamed IgnoreActionsForClearingTrashCan to conform w/ changes
This just changes IgnoreActionsForClearingTrashCan to meet the
same naming scheme for the rest of the old ignore checks. For
consistency. Consistency is nice.
2017-12-20 17:33:18 -07:00
Lucas Nicodemus
4e186e7375 Replace TSPlayer.IgnoreActionsForDisabledArmor -> boolean
TSPlayer.IgnoreActionsForBannedArmor was useless because it only
stored the last armor/dye a player had. Replaced with a boolean.
2017-12-20 17:29:10 -07:00
Lucas Nicodemus
7efcfd055f Replace TSPlayer.IgnoreActionsForCheating w/ boolean
This replaces IgnoreActionsForCheating in TSPlayer with a new
IsDisabledForStackDetection field that tracks the same basic data.

The previous way we did this was storing a string as the "reason"
why a player was disabled for cheating, but it only stored the last
hacked item stack that caused the check to fail. Since we already
have OnSecondUpdate which notifies on _all_ items, we don't need
to store this info in such a useless way anyway. They'll find out
in one second what they need to remove in a more alarmist way.
2017-12-20 17:19:14 -07:00
Lucas Nicodemus
1ef28dfe0d Replace TSPlayer.IgnoreActionsForInventory => IsDisabledForSSC.
This is the first commit in a series to rewrite CheckIgnores()
into whatever its replacement becomes.

IgnoreActionsForInventory was probably used by the SSC system prior
to when we had in-game support for SSC (ergo, when we just checked
to make sure you had removed all items before joining and worked
our way up in inventory data to track it). I could be wrong about
this though.

Now, IsDisabledForSSC tracks only if a player is shut down due to
SSC, rather than a reason that gets broadcast.
2017-12-20 17:01:55 -07:00
Lucas Nicodemus
0afcf0d248 Merge remote-tracking branch 'origin/general-devel' into fragments 2017-12-17 00:45:02 -07:00
Lucas Nicodemus
b71458b293 Fix /setup not working with owner groups; update readme 2017-12-16 20:37:43 -07:00
Lucas Nicodemus
3f22c52698 Move StartInvasion() out of the TShock main class 2017-12-14 07:56:41 -07:00
Lucas Nicodemus
8451ef9fb7 Switch the "auth system" to "initial system" everywhere.
This is better verbiage. If you think about it, you never really
want the "authentication system" to shut off. Doesn't that mean
that the server doesn't authenticate people anymore?
2017-12-13 22:38:44 -07:00
Lucas Nicodemus
611fb6b418 Remove /restart command. Fixes #1454. 2017-12-11 15:45:42 -07:00