-
Notifications
You must be signed in to change notification settings - Fork 15
How to Submit a New Plugin
肝帝熙恩 edited this page Jan 10, 2025
·
11 revisions
- Fork the repository on GitHub to your account.
- Clone the forked repository to your local machine. For example, you can use the built-in Git tools in Visual Studio (VS) to perform the clone operation.
- Navigate to the
src
directory. This is where plugin source code resides. - Create a new folder for your plugin:
- The folder name must match your plugin's name and project name. If they differ, modify them to be the same.
- Ensure the name is in English.
- Copy your code files and the
.csproj
file into this new folder.
- In Visual Studio, right-click the solution and select Add > Existing Project.
- Select the
.csproj
file in your plugin folder and click Open.
- Right-click your project and select Edit Project File.
- Add the following content to your project file:
<Project Sdk="Microsoft.NET.Sdk"> <Import Project="..\..\template.targets" /> </Project>
- Save the file.
- Note: This step is required only if your plugin has no dependencies other than TShock.
-
Add a
README
file for your plugin:- For Chinese content, name it
README.md
. - For English, name it
README.en-US.md
. - For Spanish, name it
README.es-ES.md
. Note that it should been-US
, noten_US
.
Language File Name Example Deutsch de-DE
English (PT) en-PT
Español es-ES
Français (FR) fr-FR
Français (QC) fr-QC
Bahasa Indonesia id-ID
Italiano it-IT
日本語 ja-JP
Polski pl-PL
Português (BR) pt-BR
Português (PT) pt-PT
Русский (RU) ru-RU
Русский (UA) ru-UA
Tokipona tok
Türkçe tr-TR
English (US) en-US
- Ensure the formatting follows existing examples for consistency.
- For Chinese content, name it
-
Add a
manifest.json
file. Here’s an example:
{
"README.en-US": {
"Description": "World Reversal and Placing Mines Anywhere"
},
"README.es-ES": {
"Description": "Inversión del Mundo y Colocación de Minas en Cualquier Lugar"
},
"README": {
"Description": "世界反转和全图放置地雷插件"
}
}
- Minimum requirement: Include both Chinese and English descriptions.
- Use the following format for your plugin version:
public override Version Version => new Version();
- When updating your plugin:
- Document update notes in the
README
. - Update the version number.
- Document update notes in the
- Avoid using Chinese characters in variable names.
- Do not use dangerous features or backdoors.
- Minimize the use of multithreading.
- Consider using LazyAPI for improved functionality (refer to another guide).
- For internationalization (i18n):
- Use LazyAPI to support i18n for configuration files.
- Refer to a separate guide for details.
- In Visual Studio, click Git > Commit or Stash.
- Add your changes by clicking the "+" button.
- Write a commit message summarizing your updates.
- Push or synchronize your changes to your forked repository.
You'll find that you have additional content compared to the source repository.
Title | Applicable Labels | Description |
---|---|---|
Plugin/Feature | Feat, Add, feature, feat, add | For adding new plugins or features. |
Bug Fix | fix, Fix, 修复 | For fixing bugs. |
Documentation | README, 文档 | For documentation updates. |
Update | update, Update, 更新 | For general updates. |
Workflow | Workflow, Action, 工作流 | For workflow-related updates. |
- If you are submitting a documentation update, use the title
README
and select a corresponding label, such asREADME
or文档
. - Refer to the table above to choose the correct title and label based on your submission type.