Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 2.88 KB

CONTRIBUTING.md

File metadata and controls

58 lines (39 loc) · 2.88 KB

Contribution guidelines

Before you create a pull request, please review the following guidelines for your contribution. Thank you in advance

Your files use tab indendation (keep tabs) of size 4

In our project, we use tab indentation with a size of 4. Please have you settings abide this rule.

Note: Most editors support our provided .editorconfig file, but certain functionalities (for example ones provided by plugins or addons) sometimes do not abide it. Please be careful and considerate with your actions!

For Visual Studio:

Tools -> Options
Text Editor -> C# -> Tabs
Settings:
	Indenting: Smart
	Tab size: 4
	Indent size: 4
	Keep tabs CHECKED

Example Visual Studio

For Notepad++:

Tools -> Preferences
Language -> C#
Settings:
	[Default]
	Tab size: 4
	Replace by space UNCHECKED

Example notepad++

If you use another editor, please find these settings yourself and adjust them accordingly.

You edit in the tModLoader solution

The chance is very slim that you need either of the other workspaces. If you did use them, please be absolutely sure that you had to work in them. If you are unsure, feel free to ask us before proposing your contribution.

To open this workspace, navigate to solutions/ and open tModLoader.sln

Example solution

You use our code patcher, so you only commit patches

In this project we work with our own code patcher. This is so that we do not publish the entire Terraria codebase (which isn't allowed), but we can still open-source our code.

To open our code patcher, run setup.bat from the main directory. If you've worked in the tModLoader workspace, you press 'Diff tModLoader' This will create new patches containing your changes in the patches/ folder

Example patcher

You inspect your diffs (patches)

Before you propose your contribution, inspect your patches. Please make sure that file formatting didn't mess up (this can happen with certain plugins and addons!)

Diff example

Helpful tips for contributions

Because tModLoader is a big project, we want to make sure contributions don't introduce unecessary code or code that is fundamentally flawed by design. But please don't be discouraged! If you are unsure about your contribution, still feel free to propose it and in your proposal ask us for feedback. If you do, please add "WIP:" in the title of your proposal. It is also helpful if you are specific about what you want feedback on. We will always try to provide you feedback in a passive and helpful manner.