Commit graph

4259 commits

Author SHA1 Message Date
Chris
f99b7ec359
Allow time parser to take spaces
So you can pass in `10h 5m 2s` instead of `10h+5m+2s`.
Works for things like `10h +5m -2s` as well
2018-05-22 10:10:22 +09:30
Hussein Farran
2d1eebfade
Merge pull request #1622 from ivanbiljan/regions
Separate out region related code
2018-05-07 10:12:44 -04:00
Lucas Nicodemus
c06e000997
Merge branch 'general-devel' into regions 2018-05-06 09:07:15 -06:00
Ivan
9ee692d93f Implement IDisposable on RegionHandler 2018-05-06 14:45:31 +02:00
Ivan
4d241381be Replace RegionHandler.OnGameUpdate with RegionHandler.OnPlayerUpdate 2018-05-06 12:18:06 +02:00
Lucas Nicodemus
0c0890eb13
Add support for probot's noresponse bot 2018-05-05 01:10:50 -06:00
Chris
423abb15c2
Merge pull request #1621 from DankRank/playerid-rename
Rename PlayerID to PlayerId in SpawnEventArgs
2018-04-30 00:11:26 +00:00
Ivan
0dab238fd3 Fix invalid area checks 2018-04-30 00:36:30 +02:00
Ivan
e954d98a54 Fix incorrect RegionHandler comment 2018-04-29 21:32:14 +02:00
Ivan
c71ed3953f Move OnGemLockToggle to RegionHandler 2018-04-29 21:03:04 +02:00
Ivan
44dfc570ab Merge remote-tracking branch 'upstream/general-devel' into regions 2018-04-29 18:39:12 +02:00
Ivan
ec78a070a7 Move Region related code into a separate subsystem 2018-04-29 18:33:07 +02:00
Egor
a21eb31438 Update changelog 2018-04-27 20:11:43 +03:00
Egor
d5da93563e s/PlayerID/PlayerId 2018-04-27 19:52:20 +03:00
Chris
a1f7179b46
Merge pull request #1620 from DankRank/mediumcorekick
Make Kick/BanOnMediumcoreDeath behave like their Hardcore equvivalents
2018-04-27 16:07:59 +00:00
Egor
fd83748b9f Change banning admin name for hardcore bans to "TShock"
Also added some comments and formatting
2018-04-27 10:19:26 +03:00
Egor
1eae5ae671 Remove TSPlayer.InitSpawn 2018-04-27 08:41:57 +03:00
Egor
9ac3dfa228 Make Kick/BanOnMediumcoreDeath behave like their Hardcore equvivalents
fixes #1618
2018-04-27 05:44:22 +03:00
Lucas Nicodemus
691aa043a9
Merge pull request #1619 from DankRank/redundant-setteam
Don't send PlayerTeam packet twice in SetTeam
2018-04-26 19:11:26 -06:00
Egor
ec44ae6ff6 Don't send PlayerTeam packet twice in SetTeam 2018-04-26 22:29:41 +03:00
Chris
035e9d114b
Merge pull request #1617 from Pryaxis/nostats
Remove the stat tracker
2018-04-20 00:29:29 +00:00
Lucas Nicodemus
3f58274ef4 Remove the stat tracker
The stat tracker has been offline for the last several weeks/months and
nobody has done anything to fix that. Because of that, GDPR, and the
fact that we haven't used it, we're discarding it.
2018-04-19 18:22:52 -06:00
Lucas Nicodemus
7e22ce40e0
Merge pull request #1616 from Ryozuki/patch-2
Remove a stray semicolon from inside the python file
2018-04-19 10:06:44 -06:00
Edgar
8ea9a7d3b9
remove a semicolon 2018-04-19 18:05:40 +02:00
Lucas Nicodemus
6f292bd112
Merge pull request #1613 from Ryozuki/patch-1
TShockAPI.sln -> TShock.sln in readme.md
2018-04-19 09:47:11 -06:00
Edgar
733d9aec57
TShockAPI.sln -> TShock.sln in readme.md 2018-04-19 16:18:30 +02:00
Lucas Nicodemus
6619e60f18
Merge pull request #1608 from Pryaxis/Ijwu-patch-1
Update .gitignore to exclude more visual studio files
2018-03-06 15:41:46 -07:00
Hussein Farran
0cc94918fa
Update .gitignore
Ignore visual studio cruft
2018-03-06 17:38:41 -05:00
Chris
8d45222af3
Merge pull request #1603 from mistzzt/fix-tile-entity
Fix tile entity placing
2018-02-19 01:52:41 +00:00
Ziteng Wang
6266b47fb3 Fix tile entity placing 2018-02-18 16:35:26 -08:00
Chris
f100f2d543
Merge pull request #1602 from Pryaxis/revert-1583-noip
Revert "Remove IP reset code in TShock init"
2018-02-19 08:30:15 +10:30
Lucas Nicodemus
4605e24c59
Revert "Remove IP reset code in TShock init" 2018-02-18 09:14:49 -07:00
Chris
9a99671b76
Merge pull request #1594 from Pryaxis/2018
Update repo to 2018 🎉
2018-01-01 09:32:52 +00:00
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
0c585d04a7
Merge pull request #1593 from mistzzt/fix-tile-square
Fix tile square checking in Bouncer
2018-01-01 01:46:49 -07:00
Ziteng Wang
01a85a0758 Fix tile square checking in Bouncer 2018-01-01 16:40:07 +08:00
Chris
e39c9e9eb8
Merge pull request #1591 from Pryaxis/oop
Fragments: Clean up the Utils.cs file.
2018-01-01 06:47:46 +00:00
Lucas Nicodemus
2846ad915f Change default motd format to use new colors
Since we just removed the old color format, we probably shouldn't ship
the old motd that still uses legacy colors to people.
2017-12-31 01:41:16 -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
cb2ed84038 Revert "Add TSPlayer.ActivePlayers"
This reverts commit 17cfdc3a16.
2017-12-31 01:25:05 -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
17cfdc3a16 Add TSPlayer.ActivePlayers 2017-12-31 01:13:03 -07:00
Lucas Nicodemus
4eebaf6c44 Rename methods that were ambiguous in meaning.
This renames some methods in the Utils class to better reflect what they
do or what they provide back. It should be clearer what these methods
are for now than before.
2017-12-29 08:50:48 -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
17d151b8f8 Move HasBanExpired to Bans.RemoveBanIfExpired().
The ban system needs a full rewrite anyway, but this move removes
something from Utils, puts it closer to its operating point, simplifies
the method, and clarifies what it actually does.
2017-12-29 08:32:45 -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