From 45579e04b876f79a0f02d4db6cb0eabda2a1aa1d Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Tue, 12 Dec 2017 22:29:02 -0700
Subject: [PATCH 01/23] Use svg for travis badge so we have retina images on
retina
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 2ad38b13..0f39a5d5 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@

- 

+ 

From 7d8a3c9b14e461d4bbc990c6673081297475632f Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 18:28:35 -0700
Subject: [PATCH 02/23] Why does anyone use TShock?
---
README.md | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 0f39a5d5..defdb0fa 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,17 @@
-[](#backers)
-[](#sponsors)
+TShock is a toolbox for Terraria servers and communities. TShock is trusted by hundreds of server owners to provide exploit patches, game updates, and more in a reliable and timely fashion.
-TShock is a server modification for Terraria, written in C#, and based upon the [Terraria Server API](https://github.com/NyxStudios/TerrariaAPI-Server). It uses JSON for configuration management, and offers several features not present in the Terraria Server normally.
+Why do people love TShock?
+
+* Server-side characters.
+ * Players can't cheat and hack-in items. They have to earn everything on the server.
+* Groups & Permissions
+ * Categorize who can do what. Give your donors special abilities, like infinite sand.
+* Customizable world settings
+ * Make Terraria your own with custom difficulty, spawn rates, regions, and more.
+* Fast acting bans and exploit defense make hackers have a bad time.
## :star: Quick Start
From 4fd525f839adfc93e896a9ec3c95517cf64a0869 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 18:53:20 -0700
Subject: [PATCH 03/23] Add basic new to tshock section
(The markdown preview system I'm using seems to be lying to me,
so I want to see what this looks like with gfm for one commit).
---
README.md | 60 ++++++++++++++++++++++++++++++++++---------------------
1 file changed, 37 insertions(+), 23 deletions(-)
diff --git a/README.md b/README.md
index defdb0fa..458bfb0c 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,51 @@



-
-TShock is a toolbox for Terraria servers and communities. TShock is trusted by hundreds of server owners to provide exploit patches, game updates, and more in a reliable and timely fashion.
+TShock is a toolbox for Terraria servers and communities. That toolbox is jam packed with anti-cheat tools, server-side characters, groups, permissions, item bans, tons of commands, and limitless potential. It's one of a kind.
-Why do people love TShock?
+* Download: [Stable](https://github.com/TShock/TShock/releases) or [Experimental](https://travis.tshock.co/).
+* Read [the documentation](https://tshock.readme.io/) to quickly get up to speed.
+* Join [Discord](https://discord.gg/XUJdH58) to get help, chat, and enjoy some swell Australian company.
+* Download [other plugins](https://tshock.co/xf/index.php?resources/) to supercharge your server.
-* Server-side characters.
- * Players can't cheat and hack-in items. They have to earn everything on the server.
-* Groups & Permissions
- * Categorize who can do what. Give your donors special abilities, like infinite sand.
-* Customizable world settings
- * Make Terraria your own with custom difficulty, spawn rates, regions, and more.
-* Fast acting bans and exploit defense make hackers have a bad time.
+----
-## :star: Quick Start
+## Table of Contents
-https://tshock.readme.io/docs/getting-started
+ * New to TShock?(#new-to-tshock)
+ * Code of conduct(#code-of-conduct)
-## Features
+## New to TShock?
-* MySQL support
-* Permissions
-* Multiple administrators
-* Anti-cheat
-* User registration
-* Reserved slots
-* User punishment (kicking, banning, muting)
-* Server side characters
-* JSON based configuration management
+1. Download [the latest stable version](https://github.com/TShock/TShock/releases) and `unzip` the folder using your favorite unzip tool. Make sure that all of the files in the zip get into one folder. This is where your server will be stored. The file structure looks like this:
+
+
+ GeoIP.dat
+ Newtonsoft.Json.dll
+ OTAPI.dll
+ ServerPlugins\
+ |------BCrypt.Net.dll
+ |------HttpServer.dll
+ |------Mono.Data.Sqlite.dll
+ |------MySql.Data.dll
+ |------TShockAPI.dll
+ TerrariaServer.exe
+ sqlite3.dll
+
+
+1. Start `TerrariaServer.exe` and TShock will boot. Answer the startup questions, and you should be ready to roll. In the background, TShock made some folders for you. We'll come back to those later.
+
+1. Startup Terraria. Connect to a `multiplayer` server via IP and enter `localhost` if you're doing this on your local computer. If you're doing it on another computer, you need its IP address.
+
+1. Look at the server console for the _auth code_. Type `/auth [code]` (example: `/auth 12345`), then a space, then the code you see in the console in your game chat. Instead of chatting, you'll run a command on the server. This one makes you temporary admin. All commands are prefixed with `/` or `!` (to make them silent).
+
+1. Use the in-game command `/user add [username] [password] owner` (example: `/user add shank ashes owner`) to create an account. This gives you owner rights on your server, which you can configure more to your liking later.
+
+1. Login to your newly created account with `/login [username] [password]` (example: `/login shank ashes`). You should see a login success message.
+
+1. Turn off the backdoor with `/auth` and your server is setup for initial use!
## Community
@@ -50,7 +65,6 @@ Please see the contributing file before sending pull requests.
## Download
-* [Github Releases](https://github.com/TShock/TShock/releases)
* [Development Builds](https://travis.tshock.co/)
* [Plugins](https://tshock.co/xf/index.php?resources/)
* [Very, very old versions of TShock](https://github.com/TShock/TShock/downloads)
From 486c6280197fbb6bceea76108c3f8ae3e1e7ae7c Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 18:55:07 -0700
Subject: [PATCH 04/23] How do Markdown links work?
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 458bfb0c..c7cff81c 100644
--- a/README.md
+++ b/README.md
@@ -14,8 +14,8 @@ TShock is a toolbox for Terraria servers and communities. That toolbox is jam pa
## Table of Contents
- * New to TShock?(#new-to-tshock)
- * Code of conduct(#code-of-conduct)
+ * [New to TShock?](#new-to-tshock)
+ * [Code of Conduct](#code-of-conduct)
## New to TShock?
From 71bf0ed084f42210e68ba8dcaa014129578acf81 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 19:53:04 -0700
Subject: [PATCH 05/23] Segregate out code of conduct; commit temporary changes
for preview
---
.github/CODE_OF_CONDUCT.md | 3 +
README.md | 111 +++++++++++--------------------------
2 files changed, 34 insertions(+), 80 deletions(-)
create mode 100644 .github/CODE_OF_CONDUCT.md
diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..4eacbbc4
--- /dev/null
+++ b/.github/CODE_OF_CONDUCT.md
@@ -0,0 +1,3 @@
+By participating in the TShock for Terraria community, all members will adhere to maintaining decorum with respect to all humans, in and out of the community. Members will not engage in discussion that inappropriately disparages or marginalizes any group of people or any individual. Members will not attempt to further or advance an agenda to the point of being overbearing or close minded (such as through spreading FUD). Members will not abuse services provided to them and will follow the guidance of community leaders on a situational basis about what abuse consists of. Members will adhere to United States and international law. If members notice a violation of this code of conduct, they will not engage but will instead contact the leadership team on either the forums or Discord.
+
+Do not attempt to circumvent or bypass the code of conduct by using clever logic or reasoning (e.g., insulting Facepunch members, because they weren't directly mentioned here).
\ No newline at end of file
diff --git a/README.md b/README.md
index c7cff81c..19307d5a 100644
--- a/README.md
+++ b/README.md
@@ -15,10 +15,12 @@ TShock is a toolbox for Terraria servers and communities. That toolbox is jam pa
## Table of Contents
* [New to TShock?](#new-to-tshock)
- * [Code of Conduct](#code-of-conduct)
+ * [Developer's Guide](#developers-guide)
## New to TShock?
+_These instructions assume Windows. If you're setting up on Linux or macOS, please refer to [the in-depth guide](https://tshock.readme.io/docs/getting-started) (and don't forget to install the *latest version* of `mono-complete` on Linux)._
+
1. Download [the latest stable version](https://github.com/TShock/TShock/releases) and `unzip` the folder using your favorite unzip tool. Make sure that all of the files in the zip get into one folder. This is where your server will be stored. The file structure looks like this:
@@ -41,100 +43,49 @@ TShock is a toolbox for Terraria servers and communities. That toolbox is jam pa
1. Look at the server console for the _auth code_. Type `/auth [code]` (example: `/auth 12345`), then a space, then the code you see in the console in your game chat. Instead of chatting, you'll run a command on the server. This one makes you temporary admin. All commands are prefixed with `/` or `!` (to make them silent).
-1. Use the in-game command `/user add [username] [password] owner` (example: `/user add shank ashes owner`) to create an account. This gives you owner rights on your server, which you can configure more to your liking later.
+1. Use the in-game command `/register [password]` (example: `/register lovely-ashes`) to create an account. This gives you owner rights on your server, which you can configure more to your liking later. Your `character name` is your `account name`.
1. Login to your newly created account with `/login [username] [password]` (example: `/login shank ashes`). You should see a login success message.
-1. Turn off the backdoor with `/auth` and your server is setup for initial use!
+1. Turn off the backdoor with `/auth-verify` and your server is setup for initial use. TShock also created several files inside a new `tshock` folder. These files include `config.json` (our big configuration file), `sscconfig.json` (the server side characters configuration file), and `tshock.sqlite`. Don't lose your `tshock.sqlite` or you'll have to re-setup TShock all over again.
-## Community
+1. You can now [customize your configuration](https://tshock.readme.io/docs/config-settings), build groups, ban items, and install more plugins.
-Feeling like helping out? Want to find an awesome server? Some awesome plugins?
+## Developer's Guide
-* [Website & Forums](https://tshock.co/xf/)
-* [Contribute to our docs on readme.io](https://tshock.readme.io/)
-* [Join our Discord chat (supports Android, iOS, Web, Mac, and Windows)](https://discord.gg/XUJdH58)
+Whether you want to contribute to TShock by sending a pull request, customize it to suit your own elfish desires, or want to build your own plugin, this is the best starting point. By the end of this, you'll be able to build TShock from source, start to finish. More than that, though, you'll know how to start on the path of becoming an expert TShock developer.
-### Code of Conduct
+But first, you need some background.
-> By participating in the TShock for Terraria community, all members will adhere to maintaining decorum with respect to all humans, in and out of the community. Members will not engage in discussion that inappropriately disparages or marginalizes any group of people or any individual. Members will not attempt to further or advance an agenda to the point of being overbearing or close minded (such as through spreading FUD). Members will not abuse services provided to them and will follow the guidance of community leaders on a situational basis about what abuse consists of. Members will adhere to United States and international law. If members notice a violation of this code of conduct, they will not engage but will instead contact the leadership team on either the forums or Discord.
+### Background
-> Do not attempt to circumvent or bypass the code of conduct by using clever logic or reasoning (e.g., insulting Facepunch members, because they weren't directly mentioned here).
+Terraria is a C# application written on the .NET framework using the XNA game framework. TShock is a mod for Terraria's server, which is also written in C# on the .NET framework. Some might compare TShock to hMod in the Minecraft world (the precursor to Bukkit and its server, CraftBukkit). This is a good comparison to make in how the underlying build process works. When the project started, TShock was injected directly into the decompiled source code for Terraria. Unlike Minecraft, Terraria is not obfuscated, which means that many variable names and inner workings are sanely-named out of the box. Now, TShock uses advanced techniques to operate.
-Please see the contributing file before sending pull requests.
+TShock is, first and foremost, a plugin written for the server variant of the Terraria API, an unofficial construct originally built by `bladecoding`. `TShock` has been colloquially used to refer to both the plugin as well as the server and plugin together. Similarly, the Terraria API's client version was abandoned long ago, and development of the `Server` API led to the abbreviation `TSAPI`, for `Terraria Server API`. The plugin `TShock` is executed by the [Terraria Server API](https://github.com/Pryaxis/TerrariaAPI-Server), which is in turn bound to the `Open Terraria API`, more commonly `OTAPI`. The [Open Terraria API](https://github.com/DeathCradle/Open-Terraria-API) is maintained by [DeathCradle](https://github.com/DeathCradle).
-## Download
+Now, the way that `TShock` runs on `TSAPI` through `OTAPI` can be summarized as the following:
-* [Development Builds](https://travis.tshock.co/)
-* [Plugins](https://tshock.co/xf/index.php?resources/)
-* [Very, very old versions of TShock](https://github.com/TShock/TShock/downloads)
+1. The Open Terraria API deeply integrates with Terraria by modifying the official server's binary directly. This is done through rewriting the Terraria bytecode, the [CIL code](https://en.wikipedia.org/wiki/Common_Intermediate_Language), using a patching tool designed by DeathCradle and tools from the Mono project. For `TSAPI`, additional modifications are done to support TSAPI specific features. This done through the `TShock Mintaka Patcher`.
+2. The `Terraria Server API` uses hooks provided by `OTAPI` to provide higher level hooks as well as legacy hooks for existing TSAPI applications.
+3. `TShock` is executed by `TSAPI`, uses hooks provided by both `TSAPI` and `OTAPI`, and provides even higher level hooks and support tools to other `TSAPI` plugins.
-## Backers
+With all of this in mind, the primary goal when compiling TShock is to remember that only the second and third layers are required to be interacted with. The first layer, `OTAPI`, is provided pre-compiled through NuGet. The second layer, `TSAPI`, is provided in the `TShock` repository through a git submodule.
-Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/tshock#backer)]
+Let's get started.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+## Building
-## Sponsors
+You need to get the source code. Using git, [clone this repository](https://help.github.com/articles/cloning-a-repository/).
-Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/tshock#sponsor)]
+The next set of instructions are the technical details to setup both the Terraria Server API and TShock. More importantly, the Terraria API steps here are written under the assumption that you are building TShock primarily. Before you start, you need to **initialize the git submodules** and then **update them**. You can do this in a graphical git client, or use the following commands.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ $ git submodule init
+ $ git submodule update
+
+### On Windows
+
+#### The Terraria Server API
+
+
+
+####
From 142c338c1a7a59eb090a759cea9a1f02c35e280a Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 19:58:29 -0700
Subject: [PATCH 06/23] It turns out "elvish" is spelled "elvish" not "elfish"
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 19307d5a..989869fc 100644
--- a/README.md
+++ b/README.md
@@ -53,7 +53,7 @@ _These instructions assume Windows. If you're setting up on Linux or macOS, plea
## Developer's Guide
-Whether you want to contribute to TShock by sending a pull request, customize it to suit your own elfish desires, or want to build your own plugin, this is the best starting point. By the end of this, you'll be able to build TShock from source, start to finish. More than that, though, you'll know how to start on the path of becoming an expert TShock developer.
+Whether you want to contribute to TShock by sending a pull request, customize it to suit your own elvish desires, or want to build your own plugin, this is the best starting point. By the end of this, you'll be able to build TShock from source, start to finish. More than that, though, you'll know how to start on the path of becoming an expert TShock developer.
But first, you need some background.
@@ -69,7 +69,7 @@ Now, the way that `TShock` runs on `TSAPI` through `OTAPI` can be summarized as
2. The `Terraria Server API` uses hooks provided by `OTAPI` to provide higher level hooks as well as legacy hooks for existing TSAPI applications.
3. `TShock` is executed by `TSAPI`, uses hooks provided by both `TSAPI` and `OTAPI`, and provides even higher level hooks and support tools to other `TSAPI` plugins.
-With all of this in mind, the primary goal when compiling TShock is to remember that only the second and third layers are required to be interacted with. The first layer, `OTAPI`, is provided pre-compiled through NuGet. The second layer, `TSAPI`, is provided in the `TShock` repository through a git submodule.
+With all of this in mind, the primary goal when compiling TShock is to remember that only the second and third layers are required to be interacted with. The first layer, `OTAPI`, is provided pre-compiled through NuGet. The second layer, `TSAPI`, is provided in the `TShock` repository through a git submodule. It's primary home is the [Terraria Server API repository](https://github.com/Pryaxis/TerrariaAPI-Server).
Let's get started.
From 7221d66dd07407bcd4c156a6946b9d2075e2c2fd Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 21:54:00 -0700
Subject: [PATCH 07/23] Update the instructions for Windows (fully!)
---
README.md | 34 +++++++++++++++++++++++++++++-----
1 file changed, 29 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 989869fc..778f3ebd 100644
--- a/README.md
+++ b/README.md
@@ -73,19 +73,43 @@ With all of this in mind, the primary goal when compiling TShock is to remember
Let's get started.
-## Building
+### Building
You need to get the source code. Using git, [clone this repository](https://help.github.com/articles/cloning-a-repository/).
-The next set of instructions are the technical details to setup both the Terraria Server API and TShock. More importantly, the Terraria API steps here are written under the assumption that you are building TShock primarily. Before you start, you need to **initialize the git submodules** and then **update them**. You can do this in a graphical git client, or use the following commands.
+The next set of instructions are the technical details to setup both the Terraria Server API and TShock. More importantly, the Terraria API steps here are written under the assumption that you are building TShock primarily. Before you start, you need to **initialize the git submodules** and then **update them**. You need to use the following commands to do this.
$ git submodule init
$ git submodule update
-### On Windows
+If you're using [GitHub Desktop](https://desktop.github.com), you need to perform additional steps. After cloning the TShock repository, go to the `Repository` menu and select `Open in Command Prompt`. If you don't have Git (not GitHub Desktop) installed, you can follow the prompts to to install Git for your command line. Once Git is installed, use this same process to get to the command prompt. Then, run the above commands.
-#### The Terraria Server API
+#### On Windows
+On Windows, you need to install [Visual Studio Community Edition](https://www.visualstudio.com/downloads/) or a better (more expensive) version of Visual Studio.
+##### The Terraria Server API
-####
+1. Open the `TShock.4.OTAPI.sln` solution in the `TerrariaServerAPI` folder.
+
+1. Set the `TShock.Modifications.Bootstrapper` project as the StartUp project, then build the solution.
+
+1. Build the solution in either debug or release mode, depending on your preference. NuGet will automatically fetch the appropriate packages as a result of its magical powers.
+
+1. Hit the "Start" button in Visual Studio to run the `TShock Mintaka Bootstrapper`.
+
+1. Watch the output window and make sure that a non-zero number of modifications ran. When it completes, you have successfully bootstrapped `TShock Mintaka`.
+
+1. Set the `TerrariaServerAPI` project as the StartUp project.
+
+1. Build the solution in either debug or release mode, depending on your preference.
+
+1. Close `TShock.4.OTAPI.sln` in Visual Studio.
+
+You need to do re-run the patcher any time OTAPI updates. You need to rebuild `TerrariaServerAPI` any time that the submodule in `TShock` gets changed, if you're doing this from inside the TShock repo. You also need to update the submodules (`git submodule update`) if they're out of date on a pull too.
+
+##### TShock
+
+1. Open the `TShockAPI.sln` solution in the root of the repository.
+
+1. Build the solution. It should correctly download NuGet packages automatically and build against the aforementioned `TerrariaServerAPI` project you just built.
From e4fdee317cb56ebaedb0b8179f345b04e47051bb Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 22:30:00 -0700
Subject: [PATCH 08/23] Commit changes before switching branches
---
README.md | 50 +++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 45 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 778f3ebd..472a0dfd 100644
--- a/README.md
+++ b/README.md
@@ -45,9 +45,9 @@ _These instructions assume Windows. If you're setting up on Linux or macOS, plea
1. Use the in-game command `/register [password]` (example: `/register lovely-ashes`) to create an account. This gives you owner rights on your server, which you can configure more to your liking later. Your `character name` is your `account name`.
-1. Login to your newly created account with `/login [username] [password]` (example: `/login shank ashes`). You should see a login success message.
+1. Login to your newly created account with `/login [account name] [password]` (example: `/login shank lovely-ashes`). You should see a login success message.
-1. Turn off the backdoor with `/auth-verify` and your server is setup for initial use. TShock also created several files inside a new `tshock` folder. These files include `config.json` (our big configuration file), `sscconfig.json` (the server side characters configuration file), and `tshock.sqlite`. Don't lose your `tshock.sqlite` or you'll have to re-setup TShock all over again.
+1. Turn off the setup system with `/auth-verify` and your server is setup for initial use. TShock also created several files inside a new `tshock` folder. These files include `config.json` (our big configuration file), `sscconfig.json` (the server side characters configuration file), and `tshock.sqlite`. Don't lose your `tshock.sqlite` or you'll have to re-setup TShock.
1. You can now [customize your configuration](https://tshock.readme.io/docs/config-settings), build groups, ban items, and install more plugins.
@@ -69,7 +69,7 @@ Now, the way that `TShock` runs on `TSAPI` through `OTAPI` can be summarized as
2. The `Terraria Server API` uses hooks provided by `OTAPI` to provide higher level hooks as well as legacy hooks for existing TSAPI applications.
3. `TShock` is executed by `TSAPI`, uses hooks provided by both `TSAPI` and `OTAPI`, and provides even higher level hooks and support tools to other `TSAPI` plugins.
-With all of this in mind, the primary goal when compiling TShock is to remember that only the second and third layers are required to be interacted with. The first layer, `OTAPI`, is provided pre-compiled through NuGet. The second layer, `TSAPI`, is provided in the `TShock` repository through a git submodule. It's primary home is the [Terraria Server API repository](https://github.com/Pryaxis/TerrariaAPI-Server).
+With all of this in mind, the primary goal when compiling TShock is to remember that only the second and third layers are required to be interacted with. The first layer, `OTAPI`, is provided pre-compiled through NuGet. The second layer, `TSAPI`, is provided in the `TShock` repository through a git submodule. Its primary home is the [Terraria Server API repository](https://github.com/Pryaxis/TerrariaAPI-Server).
Let's get started.
@@ -92,7 +92,7 @@ On Windows, you need to install [Visual Studio Community Edition](https://www.vi
1. Open the `TShock.4.OTAPI.sln` solution in the `TerrariaServerAPI` folder.
-1. Set the `TShock.Modifications.Bootstrapper` project as the StartUp project, then build the solution.
+1. Set the `TShock.Modifications.Bootstrapper` project as the StartUp project.
1. Build the solution in either debug or release mode, depending on your preference. NuGet will automatically fetch the appropriate packages as a result of its magical powers.
@@ -106,10 +106,50 @@ On Windows, you need to install [Visual Studio Community Edition](https://www.vi
1. Close `TShock.4.OTAPI.sln` in Visual Studio.
-You need to do re-run the patcher any time OTAPI updates. You need to rebuild `TerrariaServerAPI` any time that the submodule in `TShock` gets changed, if you're doing this from inside the TShock repo. You also need to update the submodules (`git submodule update`) if they're out of date on a pull too.
+You need to re-run the patcher any time `OTAPI` updates. You need to rebuild `TerrariaServerAPI` any time that the submodule in `TShock` gets changed, if you're doing this from inside the TShock repo. You also need to update the submodules (`git submodule update`) if they're out of date on a pull too.
##### TShock
1. Open the `TShockAPI.sln` solution in the root of the repository.
1. Build the solution. It should correctly download NuGet packages automatically and build against the aforementioned `TerrariaServerAPI` project you just built.
+
+#### On macOS
+
+1. Install [Homebrew](https://brew.sh) if you haven't already.
+
+1. Install mono:
+
+ $ brew install mono
+
+1. Verify that mono is available:
+
+ $ mono --version
+
+ Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Sun Sep 17 18:29:46 BST 2017)
+ ...
+
+1. Proceed to the [unix build steps](#unix-build-steps) to continue.
+
+#### On Linux
+
+1. **DO NOT** just install mono from your package manager unless told to do so. If you do and it's out of date, you probably won't be able to successfully develop for TShock.
+
+1. Follow the [official install instructions for mono](http://www.mono-project.com/download/). **DO** install `mono-complete` or you're missing components.
+
+#### On Unix
+
+1. You need to get NuGet. Download the latest `nuget.exe` from [NuGet](https://www.nuget.org/downloads).
+
+1. Make a `~/bin` folder if you don't have one.
+
+ $ mkdir ~/bin/
+
+##### The Terraria Server API
+
+1. Move into the `TerrariaServerAPI` project and then perform a NuGet restore.
+
+ $ cd ./TerrariaServerAPI/
+ $ mono ~/bin/nuget.exe restore
+
+1.
\ No newline at end of file
From 8451ef9fb77d76cf63da4c67263d8f9d5dcca99b Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 22:38:44 -0700
Subject: [PATCH 09/23] 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?
---
TShockAPI/Commands.cs | 36 ++++++++++++++++++------------------
TShockAPI/TShock.cs | 40 ++++++++++++++++++++--------------------
2 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs
index 4f2cba4c..1d8545ca 100644
--- a/TShockAPI/Commands.cs
+++ b/TShockAPI/Commands.cs
@@ -220,7 +220,7 @@ namespace TShockAPI
ChatCommands.Add(cmd);
};
- add(new Command(AuthToken, "auth")
+ add(new Command(SetupToken, "setup")
{
AllowServer = false,
HelpText = "Used to authenticate as superadmin when first setting up TShock."
@@ -4736,7 +4736,7 @@ namespace TShockAPI
}
IEnumerable cmdNames = from cmd in ChatCommands
- where cmd.CanRun(args.Player) && (cmd.Name != "auth" || TShock.AuthToken != 0)
+ where cmd.CanRun(args.Player) && (cmd.Name != "auth" || TShock.SetupToken != 0)
select Specifier + cmd.Name;
PaginationTools.SendPage(args.Player, pageNumber, PaginationTools.BuildLinesFromTerms(cmdNames),
@@ -4829,17 +4829,17 @@ namespace TShockAPI
);
}
- private static void AuthToken(CommandArgs args)
+ private static void SetupToken(CommandArgs args)
{
- if (TShock.AuthToken == 0)
+ if (TShock.SetupToken == 0)
{
if (args.Player.Group.Name == new SuperAdminGroup().Name)
- args.Player.SendInfoMessage("The auth system is already disabled.");
+ args.Player.SendInfoMessage("The initial setup system is already disabled.");
else
{
- args.Player.SendWarningMessage("The auth system is disabled. This incident has been logged.");
- TShock.Utils.ForceKick(args.Player, "Auth system is disabled.", true, true);
- TShock.Log.Warn("{0} attempted to use {1}auth even though it's disabled.", args.Player.IP, Specifier);
+ args.Player.SendWarningMessage("The initial setup system is disabled. This incident has been logged.");
+ TShock.Utils.ForceKick(args.Player, "The initial setup system is disabled.", true, true);
+ TShock.Log.Warn("{0} attempted to use the initial setup system even though it's disabled.", args.Player.IP);
return;
}
}
@@ -4847,28 +4847,28 @@ namespace TShockAPI
// If the user account is already a superadmin (permanent), disable the system
if (args.Player.IsLoggedIn && args.Player.tempGroup == null && args.Player.Group.Name == new SuperAdminGroup().Name)
{
- args.Player.SendSuccessMessage("Your new account has been verified, and the {0}auth system has been turned off.", Specifier);
+ args.Player.SendSuccessMessage("Your new account has been verified, and the {0}setup system has been turned off.", Specifier);
args.Player.SendSuccessMessage("You can always use the {0}user command to manage players.", Specifier);
- args.Player.SendSuccessMessage("The auth system will remain disabled as long as a superadmin exists (even if you delete auth.lck).");
+ args.Player.SendSuccessMessage("The setup system will remain disabled as long as a superadmin exists (even if you delete setup.lock).");
args.Player.SendSuccessMessage("Share your server, talk with other admins, and more on our forums -- https://tshock.co/");
args.Player.SendSuccessMessage("Thank you for using TShock for Terraria!");
- FileTools.CreateFile(Path.Combine(TShock.SavePath, "auth.lck"));
- File.Delete(Path.Combine(TShock.SavePath, "authcode.txt"));
- TShock.AuthToken = 0;
+ FileTools.CreateFile(Path.Combine(TShock.SavePath, "setup.lock"));
+ File.Delete(Path.Combine(TShock.SavePath, "setup-code.txt"));
+ TShock.SetupToken = 0;
return;
}
if (args.Parameters.Count == 0)
{
- args.Player.SendErrorMessage("You must provide an auth code!");
+ args.Player.SendErrorMessage("You must provide a setup code!");
return;
}
int givenCode;
- if (!Int32.TryParse(args.Parameters[0], out givenCode) || givenCode != TShock.AuthToken)
+ if (!Int32.TryParse(args.Parameters[0], out givenCode) || givenCode != TShock.SetupToken)
{
- args.Player.SendErrorMessage("Incorrect auth code. This incident has been logged.");
- TShock.Log.Warn(args.Player.IP + " attempted to use an incorrect auth code.");
+ args.Player.SendErrorMessage("Incorrect setup code. This incident has been logged.");
+ TShock.Log.Warn(args.Player.IP + " attempted to use an incorrect setup code.");
return;
}
@@ -4880,7 +4880,7 @@ namespace TShockAPI
args.Player.SendInfoMessage("{0}user add owner", Specifier);
args.Player.SendInfoMessage("Creates: with the password as part of the owner group.");
args.Player.SendInfoMessage("Please use {0}login after this process.", Specifier);
- args.Player.SendInfoMessage("If you understand, please {0}login now, and then type {0}auth.", Specifier);
+ args.Player.SendInfoMessage("If you understand, please {0}login now, and then type {0}setup.", Specifier);
return;
}
diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs
index 5d59dc8a..405cd887 100644
--- a/TShockAPI/TShock.cs
+++ b/TShockAPI/TShock.cs
@@ -841,8 +841,8 @@ namespace TShockAPI
CliParser.ParseFromSource(parms);
}
- /// AuthToken - The auth token used by the /auth system to grant temporary superadmin access to new admins.
- public static int AuthToken = -1;
+ /// SetupToken - The auth token used by the setup system to grant temporary superadmin access to new admins.
+ public static int SetupToken = -1;
private string _cliPassword = null;
/// OnPostInit - Fired when the server loads a map, to perform world specific operations.
@@ -861,41 +861,41 @@ namespace TShockAPI
Config.ServerPassword = _cliPassword;
}
- // Disable the auth system if "auth.lck" is present or a superadmin exists
- if (File.Exists(Path.Combine(SavePath, "auth.lck")) || UserAccounts.GetUserAccounts().Exists(u => u.Group == new SuperAdminGroup().Name))
+ // Disable the auth system if "setup.lock" is present or a superadmin exists
+ if (File.Exists(Path.Combine(SavePath, "setup.lock")) || UserAccounts.GetUserAccounts().Exists(u => u.Group == new SuperAdminGroup().Name))
{
- AuthToken = 0;
+ SetupToken = 0;
- if (File.Exists(Path.Combine(SavePath, "authcode.txt")))
+ if (File.Exists(Path.Combine(SavePath, "setup-code.txt")))
{
- Log.ConsoleInfo("A superadmin account has been detected in the user database, but authcode.txt is still present.");
- Log.ConsoleInfo("TShock will now disable the auth system and remove authcode.txt as it is no longer needed.");
- File.Delete(Path.Combine(SavePath, "authcode.txt"));
+ Log.ConsoleInfo("A superadmin account has been detected in the user database, but setup-code.txt is still present.");
+ Log.ConsoleInfo("TShock will now disable the initial setup system and remove setup-code.txt as it is no longer needed.");
+ File.Delete(Path.Combine(SavePath, "setup-code.txt"));
}
- if (!File.Exists(Path.Combine(SavePath, "auth.lck")))
+ if (!File.Exists(Path.Combine(SavePath, "setup.lock")))
{
// This avoids unnecessary database work, which can get ridiculously high on old servers as all users need to be fetched
- File.Create(Path.Combine(SavePath, "auth.lck"));
+ File.Create(Path.Combine(SavePath, "setup.lock"));
}
}
- else if (!File.Exists(Path.Combine(SavePath, "authcode.txt")))
+ else if (!File.Exists(Path.Combine(SavePath, "setup-code.txt")))
{
var r = new Random((int)DateTime.Now.ToBinary());
- AuthToken = r.Next(100000, 10000000);
+ SetupToken = r.Next(100000, 10000000);
Console.ForegroundColor = ConsoleColor.Yellow;
- Console.WriteLine("TShock Notice: To become SuperAdmin, join the game and type {0}auth {1}", Commands.Specifier, AuthToken);
- Console.WriteLine("This token will display until disabled by verification. ({0}auth)", Commands.Specifier);
+ Console.WriteLine("To setup the server, join the game and type {0}setup {1}", Commands.Specifier, SetupToken);
+ Console.WriteLine("This token will display until disabled by verification. ({0}setup)", Commands.Specifier);
Console.ResetColor();
- File.WriteAllText(Path.Combine(SavePath, "authcode.txt"), AuthToken.ToString());
+ File.WriteAllText(Path.Combine(SavePath, "setup-code.txt"), SetupToken.ToString());
}
else
{
- AuthToken = Convert.ToInt32(File.ReadAllText(Path.Combine(SavePath, "authcode.txt")));
+ SetupToken = Convert.ToInt32(File.ReadAllText(Path.Combine(SavePath, "setup-code.txt")));
Console.ForegroundColor = ConsoleColor.Yellow;
- Console.WriteLine("TShock Notice: authcode.txt is still present, and the AuthToken located in that file will be used.");
- Console.WriteLine("To become superadmin, join the game and type {0}auth {1}", Commands.Specifier, AuthToken);
- Console.WriteLine("This token will display until disabled by verification. ({0}auth)", Commands.Specifier);
+ Console.WriteLine("TShock Notice: setup-code.txt is still present, and the code located in that file will be used.");
+ Console.WriteLine("To setup the server, join the game and type {0}setup {1}", Commands.Specifier, SetupToken);
+ Console.WriteLine("This token will display until disabled by verification. ({0}setup)", Commands.Specifier);
Console.ResetColor();
}
From 0826a37fe8f88775f6c75b62814bf9161a5951bd Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 22:41:00 -0700
Subject: [PATCH 10/23] Update changelog
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b3c1b788..ad484a17 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
* Removed `/restart` command. (@hakusaro)
* Removed `Permissions.updateplugins` permission. (@hakusaro)
* Removed REST `/v3/server/restart/` route and `/server/restart/` route. (@hakusaro)
+* The "auth system" is now referred to as the initial setup system (what it actually is). This is better verbiage for basically all situations. Who really wants to turn off the "authentication system?" In addition, the system now makes it more clear what the point of it is, rather than that it grants permissions. (@hakusaro)
## TShock 4.3.25
* Fixed a critical exploit in the Terraria protocol that could cause massive unpreventable world corruption as well as a number of other problems. Thanks to @bartico6 for reporting. Fixed by the efforts of @QuiCM, @hakusaro, and tips in the right directioon from @bartico6.
From ffdcd34c9109df66a2ca920c35251fc5b0e174d3 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 22:45:41 -0700
Subject: [PATCH 11/23] Fix issue where setup system could re-enable itself
The current initial setup system would re-enable if setup.lock
was removed even if an account was in the database. This is
because when we switched to "owner" being the primary target
of the setup system, we failed to anticipate that an account with
superadmin would never exist in the database in an ideal
condition.
---
TShockAPI/TShock.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs
index 405cd887..eeec18c1 100644
--- a/TShockAPI/TShock.cs
+++ b/TShockAPI/TShock.cs
@@ -861,8 +861,8 @@ namespace TShockAPI
Config.ServerPassword = _cliPassword;
}
- // Disable the auth system if "setup.lock" is present or a superadmin exists
- if (File.Exists(Path.Combine(SavePath, "setup.lock")) || UserAccounts.GetUserAccounts().Exists(u => u.Group == new SuperAdminGroup().Name))
+ // Disable the auth system if "setup.lock" is present or a user account already exists
+ if (File.Exists(Path.Combine(SavePath, "setup.lock")) || (UserAccounts.GetUserAccounts().Count() > 0))
{
SetupToken = 0;
From d6dfbe4e7d1bd1e70de63f854a5989f43bea85ef Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 23:07:03 -0700
Subject: [PATCH 12/23] Updated readme with new setup system stuff
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 472a0dfd..11126856 100644
--- a/README.md
+++ b/README.md
@@ -41,13 +41,13 @@ _These instructions assume Windows. If you're setting up on Linux or macOS, plea
1. Startup Terraria. Connect to a `multiplayer` server via IP and enter `localhost` if you're doing this on your local computer. If you're doing it on another computer, you need its IP address.
-1. Look at the server console for the _auth code_. Type `/auth [code]` (example: `/auth 12345`), then a space, then the code you see in the console in your game chat. Instead of chatting, you'll run a command on the server. This one makes you temporary admin. All commands are prefixed with `/` or `!` (to make them silent).
+1. Look at the server console for the _setup code_. Type `/setup [code]` (example: `/setup 12345`), then a space, then the code you see in the console in your game chat. Instead of chatting, you'll run a command on the server. This one makes you temporary admin. All commands are prefixed with `/` or `!` (to make them silent).
1. Use the in-game command `/register [password]` (example: `/register lovely-ashes`) to create an account. This gives you owner rights on your server, which you can configure more to your liking later. Your `character name` is your `account name`.
1. Login to your newly created account with `/login [account name] [password]` (example: `/login shank lovely-ashes`). You should see a login success message.
-1. Turn off the setup system with `/auth-verify` and your server is setup for initial use. TShock also created several files inside a new `tshock` folder. These files include `config.json` (our big configuration file), `sscconfig.json` (the server side characters configuration file), and `tshock.sqlite`. Don't lose your `tshock.sqlite` or you'll have to re-setup TShock.
+1. Turn off the setup system with `/setup` and your server is setup for initial use. TShock also created several files inside a new `tshock` folder. These files include `config.json` (our big configuration file), `sscconfig.json` (the server side characters configuration file), and `tshock.sqlite`. Don't lose your `tshock.sqlite` or you'll have to re-setup TShock.
1. You can now [customize your configuration](https://tshock.readme.io/docs/config-settings), build groups, ban items, and install more plugins.
From b6bc57745f883f91fdf82f9150d5fcc61989a602 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 23:08:43 -0700
Subject: [PATCH 13/23] Alnitak is a star in the constellation Orion, part of
Orion's Belt
---
TShockAPI/TShock.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs
index 5d59dc8a..43d1e56c 100644
--- a/TShockAPI/TShock.cs
+++ b/TShockAPI/TShock.cs
@@ -57,7 +57,7 @@ namespace TShockAPI
/// VersionNum - The version number the TerrariaAPI will return back to the API. We just use the Assembly info.
public static readonly Version VersionNum = Assembly.GetExecutingAssembly().GetName().Version;
/// VersionCodename - The version codename is displayed when the server starts. Inspired by software codenames conventions.
- public static readonly string VersionCodename = "Mintaka";
+ public static readonly string VersionCodename = "Alnitak";
/// SavePath - This is the path TShock saves its data in. This path is relative to the TerrariaServer.exe (not in ServerPlugins).
public static string SavePath = "tshock";
From 3188f5d1eac362cd2311add63300336b4a05cef9 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 23:40:48 -0700
Subject: [PATCH 14/23] Finish dev docs for building; need to check anchor
links live
---
README.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 50 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 11126856..932d508a 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,16 @@ TShock is a toolbox for Terraria servers and communities. That toolbox is jam pa
* [New to TShock?](#new-to-tshock)
* [Developer's Guide](#developers-guide)
+ * [Background](#background)
+ * [Building](#building)
+ * [On Windows](#on-windows)
+ * [The Terraria Server API](#the-terraria-server-api-1)
+ * [TShock](#tshock-1)
+ * [On macOS](#on-macos)
+ * [On Linux](#on-linux)
+ * [On Unix](#on-unix)
+ * [The Terraria Server API](#the-terraria-server-api-2)
+ * [TShock](#tshock-2)
## New to TShock?
@@ -145,11 +155,48 @@ You need to re-run the patcher any time `OTAPI` updates. You need to rebuild `Te
$ mkdir ~/bin/
+1. Set an environment variable to store if you plan to build in debug or release.
+
+ $ export BUILD_MODE=Debug
+
+ or
+
+ $ export BUILD_MODE=Release
+
+
##### The Terraria Server API
-1. Move into the `TerrariaServerAPI` project and then perform a NuGet restore.
+1. Perform a NuGet restore in the directory above `TerrariaServerAPI`.
+
+ $ mono ~/bin/nuget.exe restore ./TerrariaServerAPI/
+
+1. Build the `TShock.4.OTAPI.sln` solution the configuration you chose:
+
+ $ xbuild ./TerrariaServerAPI/TShock.4.OTAPI.sln /p:Configuration=$BUILD_MODE
+
+1. Run the `TShock Mintaka Bootstrapper` with the TShock modifications. If you don't use `/bin/bash` as your primary shell, you might want to temporarily switch to it, or the bootstrapper may fail.
+
+ $ cd ./TerrariaServerAPI/TShock.Modifications.Bootstrapper/bin/$BUILD_MODE/
+ $ mono TShock.Modifications.Bootstrapper.exe -in=OTAPI.dll \
+ -mod=../../../TShock.Modifications.**/bin/$BUILD_MODE/TShock.Modifications.*.dll \
+ -o=Output/OTAPI.dll
+
+1. Verify that non-zero modifications ran successfully. Then, build the Terraria Server API executable.
+
+ $ cd ./../../../
+ $ xbuild ./TerrariaServerAPI/TerrariaServerAPI/TerrariaServerAPI.csproj \
+ /p:Configuration=$BUILD_MODE
+
+You need to re-run the patcher any time `OTAPI` updates. You need to rebuild `TerrariaServerAPI` any time that the submodule in `TShock` gets changed, if you're doing this from inside the TShock repo. You also need to update the submodules (`git submodule update`) if they're out of date on a pull too.
+
+##### TShock
+
+1. Perform a NuGet restore in `TShockAPI` folder that contains `TShockAPI.sln`.
- $ cd ./TerrariaServerAPI/
$ mono ~/bin/nuget.exe restore
-1.
\ No newline at end of file
+1. Build TShock in the `BUILD_MODE` you set earlier.
+
+ $ xbuild ./TShockAPI.sln /p:Configuration=
+
+You're done!
\ No newline at end of file
From 25c67c5d7cdff8634a9599301bcd457aa6132a12 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 23:42:38 -0700
Subject: [PATCH 15/23] Fix anchors on the readme
---
README.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 932d508a..d6e4c018 100644
--- a/README.md
+++ b/README.md
@@ -19,13 +19,13 @@ TShock is a toolbox for Terraria servers and communities. That toolbox is jam pa
* [Background](#background)
* [Building](#building)
* [On Windows](#on-windows)
- * [The Terraria Server API](#the-terraria-server-api-1)
- * [TShock](#tshock-1)
+ * [The Terraria Server API](#the-terraria-server-api)
+ * [TShock](#tshock)
* [On macOS](#on-macos)
* [On Linux](#on-linux)
* [On Unix](#on-unix)
- * [The Terraria Server API](#the-terraria-server-api-2)
- * [TShock](#tshock-2)
+ * [The Terraria Server API](#the-terraria-server-api-1)
+ * [TShock](#tshock-1)
## New to TShock?
@@ -197,6 +197,6 @@ You need to re-run the patcher any time `OTAPI` updates. You need to rebuild `Te
1. Build TShock in the `BUILD_MODE` you set earlier.
- $ xbuild ./TShockAPI.sln /p:Configuration=
+ $ xbuild ./TShockAPI.sln /p:Configuration=$BUILD_MODE
You're done!
\ No newline at end of file
From 2bd4636446d0c6dc6259f9ce3ab19a617b96dd7a Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Wed, 13 Dec 2017 23:55:35 -0700
Subject: [PATCH 16/23] Finalize readme update; prepare for code review
---
README.md | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d6e4c018..063f30a3 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,7 @@ TShock is a toolbox for Terraria servers and communities. That toolbox is jam pa
* [On Unix](#on-unix)
* [The Terraria Server API](#the-terraria-server-api-1)
* [TShock](#tshock-1)
+ * [Working with Terraria](#working-with-terraria)
## New to TShock?
@@ -199,4 +200,14 @@ You need to re-run the patcher any time `OTAPI` updates. You need to rebuild `Te
$ xbuild ./TShockAPI.sln /p:Configuration=$BUILD_MODE
-You're done!
\ No newline at end of file
+You're done!
+
+### Working with Terraria
+
+Working with Terraria in TShock and in other Terraria Server API plugins is different from most other APIs. Due to the nature of how OTAPI works, you have direct access to all public fields in the `Terraria` namespace. This means that you can access Terraria member methods directly. TShock and other plugins do this quite often, mostly to modify the game world, send data, and receive data. Calls to `Main` are one such example of direct access to Terraria. This is the equivalent to `net.minecraft.server` (NMS) calls in CraftBukkit.
+
+You might find yourself wondering where these fields are. Pryaxis provides the decompiled [Sources](https://github.com/pryaxis/Sources) to Terraria's server, updated with each release. Note that these decompiled servers do not re-compile. The process of fixing the decompiles has proven to be nearly impossible in a reasonable timeframe with the modern Terraria Server.
+
+Finally, you may be interested in developing other Terraria Server API plugins. The [TShockResources](https://github.com/TShockResources) organization has several plugins you can look at and build on. TShock is itself a plugin, and most plugins are open source. This gives you ample room to figure out where to go next.
+
+Need help? Join us on [#tshock-programming in Discord](https://discord.gg/ABtrBaY).
\ No newline at end of file
From 76b5ba6af55ff0153a560b9642ade986104ab8bb Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Thu, 14 Dec 2017 00:00:19 -0700
Subject: [PATCH 17/23] Update contributing guidelines & issue template
---
.github/CONTRIBUTING.md | 21 +++++----------------
.github/ISSUE_TEMPLATE.md | 18 ++++++++++++++----
2 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 01735e16..b28f0c83 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -8,18 +8,6 @@ Please follow these simple requirements before posting a bug report:
- How to reproduce the issue
- Screenshots of the issue (if applicable)
-### To build the source
-
-Note: This includes the API by default. If you need only the API, you need to cd into that folder and do the following with the .sln file for the API. For those new to C#, the .sln and .csproj files contain the necessary definitions to do a complete source build using Microsoft or Mono build tools.
-
-- Checkout the source.
-- Initialize the submodules: ```git submodule update --init```
-- Open the source in your favorite text editor that supports .NET building and press the build button OR
-- Run ```msbuild TShock.sln``` in the root of the cloned folder on Windows in a 'Developer Command Prompt' OR
-- Run ```xbuild TShock.sln``` in the root of the cloned folder on Unix.
-
-Need help? Drop by Discord and we'll be happy to explain it with more words, step by step.
-
### TShock Additions
If something is better suited to be a plugin for TShock, rather than a TShock core feature, it should not be added! Project scope is at times questionable, though, so create an issue on Github for discussion first. If an issue is completely outside of the scope of TShock, it will be made clear in that issue what it is.
@@ -33,13 +21,13 @@ _If a person makes a suggestion in Discord, capture the suggestion as a Github i
These guidelines are for all contributors.
* Create an issue first to suggest an improvement or feature addition to TShock.
-* Active developers will then give a go/no go for implementation. This is scope related: if an issue is within the scope of TShock, it will be tagged 'pr-wanted.'
-* After 'pr-wanted' has been added, an issue should be considered workable in a pull request fashion.
-* If you, as a developer, want to claim an issue for a PR, as soon as possible start work and note that in both the original issue and the new PR. The 'pr-wanted' tag will remain but the active PR will become the center for discussion for your implementation.
+* Active developers will then give a go/no go for implementation. This is scope related: if an issue is within the scope of TShock, it will be tagged 'Contribution Wanted.'
+* After 'Contribution Wanted' has been added, an issue should be considered workable in a pull request fashion.
+* If you, as a developer, want to claim an issue for a PR, as soon as possible start work and note that in both the original issue and the new PR. The 'Contribution Wanted' tag will remain but the active PR will become the center for discussion for your implementation.
* If a TShock core developer takes an issue, they'll be assigned to the issue. If your issue was taken by a TShock developer and you were actively developing it in a PR, you should _make it clear as soon as possible that a process error has been made_ so that the your development resources and our development resources aren't wasted.
* Please send a pull request with at least a sentence description and something meaningful as the title, not just the issue number you're fixing.
-_The pr-wanted tag indicates an issue should be implemented. If an issue has a developer assigned, it indicates that they're working on it. When in doubt, ask where an issue is before starting work (so you don't waste time)!_
+_The tag indicates an issue should be implemented. If an issue has a developer assigned, it indicates that they're working on it. When in doubt, ask where an issue is before starting work (so you don't waste time)!_
Even if you have write access to the repository, follow [Github flow](https://guides.github.com/introduction/flow/) when sending commits. Don't send commits directly to either ```master``` or ```general-devel``` unless those commits modify either the deploy scripts or non-code components. If it compiles, follow Github Flow.
@@ -56,6 +44,7 @@ Required:
- When using static methods on primitives, use the CLR type. E.g. ```String.Format``` instead of ```string.Format```.
- Always use properties, not public fields.
- Document deprecations and fail compilation if they're included with ```[Obsolete("Use blah instead of blahx...", true)]```.
+- Update the `CHANGELOG.md` file.
### Dev Team Guidelines
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 2b249480..e3d2f8c4 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,11 +1,21 @@
+!!!!!! PLEASE FILL IN THE TEMPLATE BELOW THANK YOU VERY MUCH !!!!!!
-## TShock version
+If you don't need help, delete this template and just post an issue (feature requests and discussions and the like).
+* TShock version:
+* TShock build number (if known):
-## Any stack traces that may have happened when the issue occurred
+#### Reproduction steps (if applicable)?
+1. Some step
+2. Some other step
+3. Some bigger step
+4. This is the problem
-## Steps to reproduce
+#### Any stack traces or error messages (if known)?
+```
+PUT SUPER LONG ERROR MESSAGES IN THE TICK MARKS
+```
-## Screenshots of the problem, if applicable
+#### Any screenshots?
\ No newline at end of file
From b2939e3cad7d10b9d77478e2c7c17be4214176d7 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Thu, 14 Dec 2017 00:02:24 -0700
Subject: [PATCH 18/23] Freshen the pull request template
---
.github/PULL_REQUEST_TEMPLATE.md | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 9e7b1cc8..4cf87d10 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1 +1,19 @@
+
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
+?????? HAVE YOU UPDATED THE CHANGELOG? ??????
\ No newline at end of file
From 7440995b4dd1c291e36013fb54a54796e402f35e Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Thu, 14 Dec 2017 00:03:56 -0700
Subject: [PATCH 19/23] Shuffle code of conduct a bit
---
.github/CODE_OF_CONDUCT.md | 4 ++--
README.md | 9 ++++++++-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md
index 4eacbbc4..990b9ed1 100644
--- a/.github/CODE_OF_CONDUCT.md
+++ b/.github/CODE_OF_CONDUCT.md
@@ -1,3 +1,3 @@
-By participating in the TShock for Terraria community, all members will adhere to maintaining decorum with respect to all humans, in and out of the community. Members will not engage in discussion that inappropriately disparages or marginalizes any group of people or any individual. Members will not attempt to further or advance an agenda to the point of being overbearing or close minded (such as through spreading FUD). Members will not abuse services provided to them and will follow the guidance of community leaders on a situational basis about what abuse consists of. Members will adhere to United States and international law. If members notice a violation of this code of conduct, they will not engage but will instead contact the leadership team on either the forums or Discord.
+> By participating in the TShock for Terraria community, all members will adhere to maintaining decorum with respect to all humans, in and out of the community. Members will not engage in discussion that inappropriately disparages or marginalizes any group of people or any individual. Members will not attempt to further or advance an agenda to the point of being overbearing or close minded (such as through spreading FUD). Members will not abuse services provided to them and will follow the guidance of community leaders on a situational basis about what abuse consists of. Members will adhere to United States and international law. If members notice a violation of this code of conduct, they will not engage but will instead contact the leadership team on either the forums or Discord.
-Do not attempt to circumvent or bypass the code of conduct by using clever logic or reasoning (e.g., insulting Facepunch members, because they weren't directly mentioned here).
\ No newline at end of file
+> Do not attempt to circumvent or bypass the code of conduct by using clever logic or reasoning (e.g., insulting Facepunch members, because they weren't directly mentioned here).
\ No newline at end of file
diff --git a/README.md b/README.md
index 063f30a3..9dbadb9a 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,7 @@ TShock is a toolbox for Terraria servers and communities. That toolbox is jam pa
* [The Terraria Server API](#the-terraria-server-api-1)
* [TShock](#tshock-1)
* [Working with Terraria](#working-with-terraria)
+ * [Code of Conduct](#code-of-conduct)
## New to TShock?
@@ -210,4 +211,10 @@ You might find yourself wondering where these fields are. Pryaxis provides the d
Finally, you may be interested in developing other Terraria Server API plugins. The [TShockResources](https://github.com/TShockResources) organization has several plugins you can look at and build on. TShock is itself a plugin, and most plugins are open source. This gives you ample room to figure out where to go next.
-Need help? Join us on [#tshock-programming in Discord](https://discord.gg/ABtrBaY).
\ No newline at end of file
+Need help? Join us on [#tshock-programming in Discord](https://discord.gg/ABtrBaY).
+
+## Code of Conduct
+
+> By participating in the TShock for Terraria community, all members will adhere to maintaining decorum with respect to all humans, in and out of the community. Members will not engage in discussion that inappropriately disparages or marginalizes any group of people or any individual. Members will not attempt to further or advance an agenda to the point of being overbearing or close minded (such as through spreading FUD). Members will not abuse services provided to them and will follow the guidance of community leaders on a situational basis about what abuse consists of. Members will adhere to United States and international law. If members notice a violation of this code of conduct, they will not engage but will instead contact the leadership team on either the forums or Discord.
+
+> Do not attempt to circumvent or bypass the code of conduct by using clever logic or reasoning (e.g., insulting Facepunch members, because they weren't directly mentioned here).
\ No newline at end of file
From 6dc125214e6433d69ced088494c56246f5d84903 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Thu, 14 Dec 2017 00:04:21 -0700
Subject: [PATCH 20/23] Minor tweak to issue template
---
.github/ISSUE_TEMPLATE.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index e3d2f8c4..5c4cc69f 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -18,4 +18,6 @@ If you don't need help, delete this template and just post an issue (feature req
PUT SUPER LONG ERROR MESSAGES IN THE TICK MARKS
```
-#### Any screenshots?
\ No newline at end of file
+#### Any screenshots?
+
+!!!!!! PLEASE FILL IN THE TEMPLATE ABOVE THANK YOU VERY MUCH !!!!!!
\ No newline at end of file
From 21c15da9b0bbe112f72893e1dbce516472493fe8 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Thu, 14 Dec 2017 00:12:53 -0700
Subject: [PATCH 21/23] Redirect linux users to the unix readme
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 9dbadb9a..6caab0cf 100644
--- a/README.md
+++ b/README.md
@@ -149,6 +149,8 @@ You need to re-run the patcher any time `OTAPI` updates. You need to rebuild `Te
1. Follow the [official install instructions for mono](http://www.mono-project.com/download/). **DO** install `mono-complete` or you're missing components.
+1. Proceed to the [unix build steps](#unix-build-steps) to continue.
+
#### On Unix
1. You need to get NuGet. Download the latest `nuget.exe` from [NuGet](https://www.nuget.org/downloads).
From fddc31cd6f0b05db79e016d0c3436c2ca18c2eb8 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Thu, 14 Dec 2017 00:18:50 -0700
Subject: [PATCH 22/23] Update submodule to latest TSAPI rev
---
TerrariaServerAPI | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/TerrariaServerAPI b/TerrariaServerAPI
index 2c25bb68..6b52da09 160000
--- a/TerrariaServerAPI
+++ b/TerrariaServerAPI
@@ -1 +1 @@
-Subproject commit 2c25bb68fde0e2c40a32d639ff79d614d3fb1580
+Subproject commit 6b52da09ea076c16413989664be197297c425548
From a6d1d9ab49c4bed07168d7ccd1db9cac6d78ec77 Mon Sep 17 00:00:00 2001
From: Lucas Nicodemus
Date: Thu, 14 Dec 2017 20:19:53 -0700
Subject: [PATCH 23/23] Update submodule; PacketTypes.TileKill -> PlaceChest
---
TShockAPI/GetDataHandlers.cs | 2 +-
TerrariaServerAPI | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs
index f3dc33e5..3fa71b4d 100644
--- a/TShockAPI/GetDataHandlers.cs
+++ b/TShockAPI/GetDataHandlers.cs
@@ -1230,7 +1230,7 @@ namespace TShockAPI
{ PacketTypes.ProjectileNew, HandleProjectileNew },
{ PacketTypes.TogglePvp, HandleTogglePvp },
{ PacketTypes.PlayerTeam, HandlePlayerTeam },
- { PacketTypes.TileKill, HandleTileKill },
+ { PacketTypes.PlaceChest, HandleTileKill },
{ PacketTypes.PlayerKillMe, HandlePlayerKillMe },
{ PacketTypes.LiquidSet, HandleLiquidSet },
{ PacketTypes.PlayerSpawn, HandleSpawn },
diff --git a/TerrariaServerAPI b/TerrariaServerAPI
index 6b52da09..28200f7d 160000
--- a/TerrariaServerAPI
+++ b/TerrariaServerAPI
@@ -1 +1 @@
-Subproject commit 6b52da09ea076c16413989664be197297c425548
+Subproject commit 28200f7d4447ee275e85856f97eee58fa156ffc4