TGMC:Guide to contributing: различия между версиями

Материал из MassMeta
Перейти к навигации Перейти к поиску
imported>Novaepee
imported>Novaepee
 
(не показано 13 промежуточных версий этого же участника)
Строка 1: Строка 1:
{{TGMC}}
{{TGMC}}
{{Speech
|name=The New "Coder"
|text=Hey, I want to put in this feature that will revolutionized the game! So where do I start?
|image=[[File:Generic_assistant2.png|64px|right]]
}}


You poor, poor soul.  
You poor, poor soul.  
Строка 5: Строка 11:
Let’s get you on your way to contributing. This isn’t the guide for hardcore coders. This is for the guy who just wants a thing tweaked. If you’re really into making big feature changes, talk in the #Dev-General channel and get the people there to help you.
Let’s get you on your way to contributing. This isn’t the guide for hardcore coders. This is for the guy who just wants a thing tweaked. If you’re really into making big feature changes, talk in the #Dev-General channel and get the people there to help you.


=What you need to get=
=Prerequisite=
 
You will be getting:


*A GitHub account
* A GitHub account (https://github.com/)
*GitKraken
* Visual studio code ( https://code.visualstudio.com/ )
*Visual Studio Code
* Git (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* Dream maker (already installed if you have BYOND)
* Coder socks (https://www.scientificworldinfo.com/2021/11/know-all-about-programmer-socks.html)
*<s>A BLOOD CONTRACT TO SELL YOUR SOUL</s>
*<s>A BLOOD CONTRACT TO SELL YOUR SOUL</s>
GitKraken is old; throw it away and embrace the light that is Visual studio code.


Since you’re reading this you’re already on the Discord. Head on over to the #coding channel and look at the top for this link:
==Terms==
; '''Fork''' : A fork is a personal copy of another user's repository that lives on your account. Forks allow you to freely make changes to a project without affecting the original. Forks remain attached to the original, allowing you to submit a pull request to the original author to update with your changes. You can also keep your fork up to date by pulling in updates from the original.)


[[Image:image24.png.png|center|frame|[https://github.com/tgstation/TerraGov-Marine-Corps https://github.com/tgstation/TerraGov-Marine-Corps]]]
; '''Repository''' :A repository is the most basic element of GitHub. They're easiest to imagine as a project's folder. A repository contains all of the project files (including documentation), and stores each file's revision history. Repositories can have multiple collaborators and can be either public or private.


This will take you to the Github page. You’ll need to make an account if you don’t have one already.
; '''Branch''' : A branch is a parallel version of a repository. It is contained within the repository, but does not affect the primary or master branch allowing you to work freely without disrupting the "live" version. When you've made the changes you want to make, you can merge your branch back into the master branch to publish your changes.


[[Image:image14.png.png|center|frame]]
; '''Pull Request''' : Pull requests are proposed changes to a repository submitted by a user and accepted or rejected by a repository's collaborators. Like issues, pull requests each have their own discussion forum.


Signed up or in? Great!
[[File:Magic_of_git.png|center]]


The first thing you need to do is “Fork” this Github. This is the fork button.
=Your own TGMC fork=


; '''Fork''' : A fork is a personal copy of another user's repository that lives on your account. Forks allow you to freely make changes to a project without affecting the original. Forks remain attached to the original, allowing you to submit a pull request to the original author to update with your changes. You can also keep your fork up to date by pulling in updates from the original.)
Once you are connected on github, go to https://github.com/tgstation/TerraGov-Marine-Corps and click on fork.  


[[Image:image12.png.png|center|frame]]
[[File:TGMC_bravemole_contributing_guidePicture1.png|center]]


This will take a moment, then it will bring you to your own personal Fork of the TGMC “Repository”
This will give you your own copy of the TGMC code, where you test your stuff without interfering with the common repository.


; '''Repository''' : A repository is the most basic element of GitHub. They're easiest to imagine as a project's folder. A repository contains all of the project files (including documentation), and stores each file's revision history. Repositories can have multiple collaborators and can be either public or private.)
=Cloning the code=


Go to your repositories in GitHub and click on TGMC.


[[Image:image26.png.png|right|border|600px]]
[[File:TGMC_bravemole_contributing_guidePicture2.png|center]]


With this done, we want to take a step back and get two outside programs.
You want to copy the HTTPS address of your fork, so click on code, then HTTPS and copy the link.


# [https://www.gitkraken.com/git-client GitKraken]
[[File:TGMC_bravemole_contributing_guidePicture3.png|center]]
## This is for advanced users of Github.
## Allows for much greater control of branches.
## As the opening paragraph stated, ask for help with this program.
# [https://code.visualstudio.com/Download/ Visual Studio Code]
## Very noob friendly. No coding knowledge required to use the basics.
## Fast and can be customized to your heart's desire.
## Can search the entire folder structure and each files contents for words.
## Every plugin you could ever think of.


That’s everything we needed to do on the GitHub side, let’s switch to VSC (Visual studio code).


With Gitkraken and VS installed, we’re almost ready to start making changes.
This should be the starting window on VSC, click on clone git repository, paste the repo link on the command line that appeared, and press enter.


We need to get our fork of the TGMC repository on our computer.
[[File:TGMC_bravemole_contributing_guidePicture4.png|center]]
It will ask you where to save the cloned files, so choose whatever folder you want (like My documents, or whatever).


Since you installed Gitkraken, we’ve got an easy button to use in Gitkraken.
If for some reason you don’t have clone git repo in the start menu, you need to open a new terminal, and type git clone the_url like so:


[[Image:image11.png.png|center|border|916px]]
[[File:TGMC_bravemole_contributing_guidePicture5.png|center]]


[[Image:image31.png.png|center|frame]]
The files will be saved in C:\user\bsouchu in this exemple.


This will download the Forked Repository to your computer all ripe for modifying.
After the cloning, click on open folder and find where the files were saved.


You can decide where it is put on your computer, but the default Documents/Github/ is perfectly fine.  
[[File:TGMC_bravemole_contributing_guidePicture6.png|center]]


So we are ready to do some changes!
=Needed extensions=


=Coding and Making some Change!=
Now that you have access to your private version of the code, you need some VSC extensions to be able work on the code properly.


Let’s do something simple. Let’s alter the lobby music.
Go to extensions, then type @recommended in the search bar, and install everything there (Note: the list might change).


First we need to find where the lobby music is. And to do that, we should set up VS. So open VS then open the folder where you downloaded the Repository.
[[File:TGMC_bravemole_contributing_guidePicture7.png|center]]


[[Image:image6.png.png|center|frame]]
Reboot your VSC so all the changes are considered.


[[Image:image19.png.png|center|frame]]
=Adding the public remote=


This is your side panel. The file explorer is currently displayed.
A remote is a git repository. In VSC, you want to have access to your private fork (which we will name here '''origin''') to make changes to your version to the code, but also have access to the common public repo (the '''upstream''') so you can pull the latest version of the code (AKA, always have the updated version).


[[Image:image32.png.png|center|frame]]
Go to source control, remote, this should look like this:
[[File:TGMC_bravemole_contributing_guidePicture8.png|center]]


{{Speech
And we want to add the upstream remote:
|name=The New "Coder"
|text=Oh, my God. How am I supposed to find what I need?
[[File:TGMC_bravemole_contributing_guidePicture9.png|center]]
|image=[[File:Generic_assistant2.png|64px|right]]
}}


To search for text within files, either click the magnifying glass or press <code>CTRL+SHIFT+F</code>.
[[File:TGMC_bravemole_contributing_guidePicture10.png|center]]


[[Image:image27.png.png|center|frame]]
You now have access to the public repo.


This will replace your file explorer with a search panel. Typing in the text we want to search for and hitting enter, we get a BIG amount of text with every instance of the word “music” highlighted, along with a small amount of the surrounding text to give it context.
''If in the weird situation that you do not see any branches at all like this:''


Scrolling down we see that the lobby music is selected in this file.
[[File:TGMC_bravemole_guide_Nada.png|center]]


[[Image:image5.png.png|1200px|top]]
''Hover your mouse over the upsteam to find the fetch button.''


# Figure 1
[[File:TGMC_bravemole_guide_Nada2.png|center]]
## Number of matching words inside a file.
# Figure 2
## File names. More specifically, this file is where we want to go. Everything indented below a file name are the matches.
# Figure 3
## Our first match inside this file. All of this is where you do the work, the editor. Something something gaze into the abyss.


The list of lobby songs.
Let’s get the master branch from it (use the right click on master, chose switch to branch):


[[Image:image23.png.png|top]]
[[File:TGMC_bravemole_contributing_guidePicture11.png|center]]
And name it master upstream.


Let’s just remove DawsonChristian.ogg from the available selection, even though that is complete heresy of the highest magnitude.
[[File:TGMC_bravemole_contributing_guidePicture12.png|center]]


[[Image:image1.png.png|top]]
This should look like something like this, click on the star to make it your preferred branch so it’s always at the top:


And save our work. <code>CTRL+S</code>
[[File:TGMC_bravemole_contributing_guidePicture13.png|center]]


At this point, we can look at Gitkraken, and things have changed!
You then want to delete your master branch that is coming from origin (Never ever use this master, you ONLY need the master from upstream).


[[Image:image7.png.png|1200px|top]]
So right click on master, Delete Branch.  


We can see that we’ve changed one file, and what the specific change was. Red for removal, green for addition.
Rename your master_upstream to master; to do that, right click on master upstream, rename Branch.


=Test Your Change!=
=Making modification to the code=


{{Speech
{{Speech
|name=The New "Coder"
|name=The New "Coder"
|text=Oh boy! All done right?
|text=Finally! I can get to CODE NEW FEATURES! Is this the start?
|image=[[File:Generic_assistant2.png|64px|right]]
|image=[[File:Generic_assistant2.png|64px|right]]
}}
}}


Wrong! These changes have only happened on your computer.
You first want to make modification on the latest version of the code; having an outdated code means you’re surely have merge conflicts as soon as your PR is opened, which is pain.


You want to fetch (ask what the updates are) on the master branch (this is the upstream one, so it will directly fetch the latest server code version).


{{Speech
[[File:TGMC_bravemole_contributing_guidePicture14.png|center]]
|name=The New "Coder"
|text=So I should just get this online right away?
|image=[[File:Generic_assistant2.png|64px|right]]
}}


Wrong again! We have to '''TEST''' our changes to make sure they work.
If your master version is out of date, the branch will change color. You now must pull to apply those new changes to your master (In this example, the master branch is 3 commits behind upstream master).


There are two ways to compile and test your changes. Both requiring you to boot up Byond. Open Byond as if you were going to play a game. We need to be logged into Byond.
[[File:TGMC_bravemole_contributing_guidePicture15.png|center]]
'''Never make changes to the master branch'''


[[Image:image4.png.png|center|frame]]
Every time you want to make a modification to the code, you must first make a new branch.


==Testing Through Dream Maker==
[[File:TGMC_bravemole_contributing_guidePicture16.png|center]]


First, open this file via double click.
Make sure you are making a branch from master, if you are not, click on the arrow pointing to the left to chose which branch to branch out.  


[[Image:image28.png.png|center|frame]]
[[File:TGMC_bravemole_contributing_guidePicture17.png|center]]
Name your branch, press enter.


Second, Compile and host the game.
[[File:TGMC_bravemole_contributing_guidePicture18.png|center]]


[[Image:image2.png.png|center|frame]]
Create branch and switch on it.


This will take a moment.
Switching to a branch means your modification will apply to this branch and not the others. You can always switch to another branch by right clicking on it in the branch menu.


[[Image:image21.png.png|center|frame]]
[[File:TGMC_bravemole_contributing_guidePicture19.png|center]]


{{Speech
You can now make changes to the code!
|name=The New "Coder"
|text=Oh, my god. The thing is not compiling. It's all broken! I've messed up!
|image=[[File:Generic_assistant2.png|64px|right]]
}}
 
 
Don't worry, make sure your Byond client is up to date with the Beta Branch. You can find versions of Byond client, should you or others ever need it!, clink on this [http://www.byond.com/download/build/ link] that Byond have given us.
 
No errors? Thank goodness, this has passed the first check.
 
[[Image:image9.png.png|top]]
 
Now you've got the game ready to host, hit that green button to start your local "server" then the yellow button above it to join!
 
==Testing Through Visual Studio Code==
 
In the Visual Studio Code, you can press F5, then select Byond as your environment.


[[File:Contribute_test_1.png]]
Let’s say I want to make the tp44 fire with a 2 second delay (nerfing the revolver is a tradition on TGMC). Let’s go to revolvers.dm (Use the shortcut CTRL-e, then type revolver, then chose the guns/revolvers.dm one.)


[[File:Contribute_test_2.png]]
Do your changes and hit CTRL-s to save the file.


[[File:Contribute_test_3.png]]
==Accidently saving in your master==
 
Again, it will take a while to compile.


{{Speech
{{Speech
|name=The New "Coder"
|name=The New "Coder"
|text=Oh, my god. The thing is not compiling. It's all broken! I've messed up!
|text=OH FUCK!! I SAVED IN MASTER! HOW DO I FIX!?
|image=[[File:Generic_assistant2.png|64px|right]]
|image=[[File:Generic_assistant2.png|64px|right]]
}}
}}


We have all made mistakes when we save changes in the master. Always double check if you are switch in the correct branch by looking at where the check mark is at.


Don't worry, make sure your Byond client is up to date with the Beta Branch. You can find versions of Byond client, should you or others ever need it!, clink on this [http://www.byond.com/download/build/ link] that Byond have given us.
[[File:Saving_in_master1.png|center]]


No errors? Thank goodness, this has passed the first check.
This is not what you want the check mark to be.


==Time to Test!==
[[File:Saving_in_master2.png|center]]


[[Image:image8.png.png|1200px|top]]
This is definitely what you don't want your master to look like.


Oh snap, you’re in game and you’re an admin! Hooray it works! Test your feature/game balance/thing you want.
[[File:Saving_in_master3.png|center]]


(in our case, we would keep running and re-running the game to start the lobby music multiple times. Each time checking that the clown.ogg music doesn’t get played.)
Do not worry; this can be saved. Toggle down your master to see this UI.


=Making a Branch and a Git=
[[File:Saving_in_master4.png|center]]


No need to keep Byond and dream maker open, back to Github Desktop.
Right click on the previous commit before the screw-up commit you made.


==Making a Branch==
[[File:Saving_in_master5.png|center]]


We need to make a “Branch” for our change. We don’t want to change our master if we can help it.
On the top of VSC, it will pop up a new menu. Click on soft reset. If you click on hard reset, you will lose out on all the work you have done.


; '''Branch''' : A branch is a parallel version of a repository. It is contained within the repository, but does not affect the primary or master branch allowing you to work freely without disrupting the "live" version. When you've made the changes you want to make, you can merge your branch back into the master branch to publish your changes.
[[File:Saving_in_master6.png|center]]


[[Image:image25.png.png|top]]
You will see this under your source control. Right click and unstage.


[[Image:image3.png.png|top]]
[[File:Saving_in_master7.png|center]]


[[Image:image29.png.png|top]]
After you've unstage, switch branch to the one that is not your master and not remake this mistake again.


Our changes are good, but first, we need to “Commit” them to the branch.
=Testing your code=


Give your update a name and a brief description in the bottom right corner.
You can now test your modifications. That is very easy, you just need to hit F5! (or got to run and debug and click this button).  


And hit that “Commit to No-Clown-Musak” button.
[[File:TGMC_bravemole_contributing_guidePicture20.png|center]]
This will compile (the first compilation takes some time) and automatically launch the game; you’ll be able to join/observe with full access to admin/host powers.


==Making and Managing a Git==
With VSC come a very powerful debugger which allows access to all variables of the call stack (if you don’t understand those terms, that’s fine). Just keep in mind that if the game '''freezes''', it’s not a crash; it’s a runtime, AKA an error/exception. To resume the game from such a freeze, you must  go back to VSC and use the control panel.


Next we need to publish the branch moving our changes online to our fork
Hit the resume button (not present on this screenshot).


[[Image:Gitkrakenpush.PNG|top]]
[[File:TGMC_bravemole_contributing_guidePicture21.png|center]]
 
Once you are happy with your tests, it’s time to make the PR.


[[Image:image18.png.png|top]]
=Committing, publishing, and making a pull request=
 
It’s now online! Let’s go to our Github fork on the Github website.
 
We’ve even got a nifty button all ready for us.
 
[[Image:image13.png.png|top]]
 
Now is the time to give our “Pull Request” a proper name and description.
 
; '''Pull Request''' : Pull requests are proposed changes to a repository submitted by a user and accepted or rejected by a repository's collaborators. Like issues, pull requests each have their own discussion forum.


[[Image:image16.png.png|top]]
You’ll notice a blue 1 on source control, this means that you have a changed file that was not committed to the branch (A commit is like a snapshot of your code in a branch at a given moment, you can go back and forth between commits like you can go back and forth between branches).


The title should be a one sentence summary, at most.
[[File:TGMC_bravemole_contributing_guidePicture22.png|center]]


The description should give detail, and ingame examples if possible via screenshots hosted on an image hosting website. I recommend [https://imgur.com/ imgur.com]
Type a sensible commit message and commit your changes:


Hit the big green “Create pull request” button and jobs a good one!
[[File:TGMC_bravemole_contributing_guidePicture23.png|center]]


Bask in the glow of accomplishing something grand!
Note that it is a very good habit to commit every time you made a consequent change. If your PR is adding 3 features, it’s maybe a good idea to have 3 commits. That way, if your 2 first features are working but the third is breaking everything, you can go back to a version where at least 2 features are working.


[[Image:image22.png.png|top]]
After that, you want to publish your branch (aka, put your branch on the internet).  


See it on Discord in the #github channel!
[[File:TGMC_bravemole_contributing_guidePicture24.png|center]]


[[Image:image20.png.png|top]]
And push on origin.
You can now go to https://github.com/tgstation/TerraGov-Marine-Corps/pulls and make a PR (pull request)


Realize you’ve made a terrible mistake!
[[File:TGMC_bravemole_contributing_guidePicture25.png|center]]
Fill out the pull request form, don’t forget to have a proper changelog:
[[File:TGMC_bravemole_contributing_guidePicture26.png|center]]


[[Image:image10.png.png|top]]
Hit pull request, and voilà! You’re done.


[[Image:image17.png.png|top]]
[[File:TGMC_bravemole_contributing_guidePicture27.png|center]]
It will also appear in the #github channel on discord:


Phew, integrity saved!
[[File:TGMC_bravemole_contributing_guidePicture28.png|center]]
The github server is now making some test on your code:


And that’s the basics of Contributing to TGMC
[[File:TGMC_bravemole_contributing_guidePicture29.png|center]]
If something is red, click on it to look at what the error is.


Remember, the #dev-general and #coding are the places to be for more in depth questions, moral support,
=Push modifications to a pull request=


=A video!=
Maintainers will now be able to review your pull request. Be patient, this make takes a while, a pinging them will not result in a faster review.
Guess what, Now there is a video of how to make a gun!


https://youtu.be/o-OvS4tC0N4
If your PR has review requests, or if you just want to make changes to it, you just need to make new commits and push them.


If you follow the general steps in this video. you can make your own guns!
[[File:TGMC_bravemole_contributing_guidePicture30.png|center]]
<br>
[[File:TGMC_bravemole_contributing_guidePicture31.png|center]]

Текущая версия от 07:29, 29 июня 2023

Файл:DMCA Logo.png This page is a part of the TGMC wiki.

TGMC is a project based on the CM-SS13 codebase.


 
The New "Coder" говорит:
"Hey, I want to put in this feature that will revolutionized the game! So where do I start?"

You poor, poor soul.

Let’s get you on your way to contributing. This isn’t the guide for hardcore coders. This is for the guy who just wants a thing tweaked. If you’re really into making big feature changes, talk in the #Dev-General channel and get the people there to help you.

Prerequisite[править | править код]

GitKraken is old; throw it away and embrace the light that is Visual studio code.

Terms[править | править код]

Fork
A fork is a personal copy of another user's repository that lives on your account. Forks allow you to freely make changes to a project without affecting the original. Forks remain attached to the original, allowing you to submit a pull request to the original author to update with your changes. You can also keep your fork up to date by pulling in updates from the original.)
Repository
A repository is the most basic element of GitHub. They're easiest to imagine as a project's folder. A repository contains all of the project files (including documentation), and stores each file's revision history. Repositories can have multiple collaborators and can be either public or private.
Branch
A branch is a parallel version of a repository. It is contained within the repository, but does not affect the primary or master branch allowing you to work freely without disrupting the "live" version. When you've made the changes you want to make, you can merge your branch back into the master branch to publish your changes.
Pull Request
Pull requests are proposed changes to a repository submitted by a user and accepted or rejected by a repository's collaborators. Like issues, pull requests each have their own discussion forum.

Your own TGMC fork[править | править код]

Once you are connected on github, go to https://github.com/tgstation/TerraGov-Marine-Corps and click on fork.

This will give you your own copy of the TGMC code, where you test your stuff without interfering with the common repository.

Cloning the code[править | править код]

Go to your repositories in GitHub and click on TGMC.

You want to copy the HTTPS address of your fork, so click on code, then HTTPS and copy the link.

That’s everything we needed to do on the GitHub side, let’s switch to VSC (Visual studio code).

This should be the starting window on VSC, click on clone git repository, paste the repo link on the command line that appeared, and press enter.

It will ask you where to save the cloned files, so choose whatever folder you want (like My documents, or whatever).

If for some reason you don’t have clone git repo in the start menu, you need to open a new terminal, and type git clone the_url like so:

The files will be saved in C:\user\bsouchu in this exemple.

After the cloning, click on open folder and find where the files were saved.

Needed extensions[править | править код]

Now that you have access to your private version of the code, you need some VSC extensions to be able work on the code properly.

Go to extensions, then type @recommended in the search bar, and install everything there (Note: the list might change).

Reboot your VSC so all the changes are considered.

Adding the public remote[править | править код]

A remote is a git repository. In VSC, you want to have access to your private fork (which we will name here origin) to make changes to your version to the code, but also have access to the common public repo (the upstream) so you can pull the latest version of the code (AKA, always have the updated version).

Go to source control, remote, this should look like this:

And we want to add the upstream remote:

You now have access to the public repo.

If in the weird situation that you do not see any branches at all like this:

Hover your mouse over the upsteam to find the fetch button.

Let’s get the master branch from it (use the right click on master, chose switch to branch):

And name it master upstream.

This should look like something like this, click on the star to make it your preferred branch so it’s always at the top:

You then want to delete your master branch that is coming from origin (Never ever use this master, you ONLY need the master from upstream).

So right click on master, Delete Branch.

Rename your master_upstream to master; to do that, right click on master upstream, rename Branch.

Making modification to the code[править | править код]

 
The New "Coder" говорит:
"Finally! I can get to CODE NEW FEATURES! Is this the start?"

You first want to make modification on the latest version of the code; having an outdated code means you’re surely have merge conflicts as soon as your PR is opened, which is pain.

You want to fetch (ask what the updates are) on the master branch (this is the upstream one, so it will directly fetch the latest server code version).

If your master version is out of date, the branch will change color. You now must pull to apply those new changes to your master (In this example, the master branch is 3 commits behind upstream master).

Never make changes to the master branch

Every time you want to make a modification to the code, you must first make a new branch.

Make sure you are making a branch from master, if you are not, click on the arrow pointing to the left to chose which branch to branch out.

Name your branch, press enter.

Create branch and switch on it.

Switching to a branch means your modification will apply to this branch and not the others. You can always switch to another branch by right clicking on it in the branch menu.

You can now make changes to the code!

Let’s say I want to make the tp44 fire with a 2 second delay (nerfing the revolver is a tradition on TGMC). Let’s go to revolvers.dm (Use the shortcut CTRL-e, then type revolver, then chose the guns/revolvers.dm one.)

Do your changes and hit CTRL-s to save the file.

Accidently saving in your master[править | править код]

 
The New "Coder" говорит:
"OH FUCK!! I SAVED IN MASTER! HOW DO I FIX!?"

We have all made mistakes when we save changes in the master. Always double check if you are switch in the correct branch by looking at where the check mark is at.

This is not what you want the check mark to be.

This is definitely what you don't want your master to look like.

Do not worry; this can be saved. Toggle down your master to see this UI.

Right click on the previous commit before the screw-up commit you made.

On the top of VSC, it will pop up a new menu. Click on soft reset. If you click on hard reset, you will lose out on all the work you have done.

You will see this under your source control. Right click and unstage.

After you've unstage, switch branch to the one that is not your master and not remake this mistake again.

Testing your code[править | править код]

You can now test your modifications. That is very easy, you just need to hit F5! (or got to run and debug and click this button).

This will compile (the first compilation takes some time) and automatically launch the game; you’ll be able to join/observe with full access to admin/host powers.

With VSC come a very powerful debugger which allows access to all variables of the call stack (if you don’t understand those terms, that’s fine). Just keep in mind that if the game freezes, it’s not a crash; it’s a runtime, AKA an error/exception. To resume the game from such a freeze, you must go back to VSC and use the control panel.

Hit the resume button (not present on this screenshot).

Once you are happy with your tests, it’s time to make the PR.

Committing, publishing, and making a pull request[править | править код]

You’ll notice a blue 1 on source control, this means that you have a changed file that was not committed to the branch (A commit is like a snapshot of your code in a branch at a given moment, you can go back and forth between commits like you can go back and forth between branches).

Type a sensible commit message and commit your changes:

Note that it is a very good habit to commit every time you made a consequent change. If your PR is adding 3 features, it’s maybe a good idea to have 3 commits. That way, if your 2 first features are working but the third is breaking everything, you can go back to a version where at least 2 features are working.

After that, you want to publish your branch (aka, put your branch on the internet).

And push on origin. You can now go to https://github.com/tgstation/TerraGov-Marine-Corps/pulls and make a PR (pull request)

Fill out the pull request form, don’t forget to have a proper changelog:

Hit pull request, and voilà! You’re done.

It will also appear in the #github channel on discord:

The github server is now making some test on your code:

If something is red, click on it to look at what the error is.

Push modifications to a pull request[править | править код]

Maintainers will now be able to review your pull request. Be patient, this make takes a while, a pinging them will not result in a faster review.

If your PR has review requests, or if you just want to make changes to it, you just need to make new commits and push them.