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

Материал из MassMeta
Перейти к навигации Перейти к поиску
imported>Hughgent
Нет описания правки
imported>Factoryman942
(h)
Строка 5: Строка 5:
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.


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.
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:


[https://github.com/tgstation/TerraGov-Marine-Corps https://github.com/tgstation/TerraGov-Marine-Corps]
[[Image:image24.png.png|center|frame|[https://github.com/tgstation/TerraGov-Marine-Corps https://github.com/tgstation/TerraGov-Marine-Corps]]]
 
[[Image:image24.png.png|top]]


This will take you to the Github page. You’ll need to make an account if you don’t have one already.
This will take you to the Github page. You’ll need to make an account if you don’t have one already.
Строка 28: Строка 26:




[[Image:image26.png.png|top]]
[[Image:image26.png.png|right|border|600px]]


With this done, we want to take a step back and get two outside programs.
With this done, we want to take a step back and get two outside programs.
Строка 47: Строка 45:
Since you installed Gitkraken, we’ve got an easy button to use in Gitkraken.
Since you installed Gitkraken, we’ve got an easy button to use in Gitkraken.


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


[[Image:image31.png.png|top]]
[[Image:image31.png.png|top]]

Версия от 17:45, 27 июля 2019

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

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


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.

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:

Файл:Image24.png.png
https://github.com/tgstation/TerraGov-Marine-Corps

This will take you to the Github page. You’ll need to make an account if you don’t have one already.

Файл:Image14.png.png

Signed up or in? Great!

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

(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.)

This will take a moment, then it will bring you to your own personal Fork of the TGMC “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.)


Файл:Image26.png.png

With this done, we want to take a step back and get two outside programs.

  1. GitKraken
    1. This is for advanced users of Github.
    2. Allows for much greater control of branches.
    3. As the opening paragraph stated, ask for help with this program.
  2. Sublime
    1. Fantastically powerful and highly recommended.
    2. Can search the entire folder structure and each files contents for words.


With Gitkraken and Sublime installed. We’re almost ready to start making changes.

We need to get our fork of the TGMC repository on our computer.

Since you installed Gitkraken, we’ve got an easy button to use in Gitkraken.

Ошибка создания миниатюры: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127

This will download the Forked Repository to your computer all ripe for modifying.

You can decide where it is put on your computer, but the default Documents/Github/ is perfectly fine.

So we are ready to do some changes!

Let’s do something simple. Let’s alter the lobby music.

First we need to find where the lobby music is. And to do that, we should set up Sublime. So open Sublime then open the folder where you downloaded the Repository.

Файл:Image19.png.png

Now Sublime looks a little like this.

We’re gonna use a super nice command called “Find in Files” CTRL+SHIFT+F

This will open up a search bar at the bottom

Файл:Image30.png.png

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.

Scrolling down we see that the lobby music is selected in this file.

Time to get our edit on!

Let’s just remove DawsonChristian.ogg from the available selection. Double clicking the yellow text opens the relevant file.

We find the list of music files.

Remove DawsonChristian.ogg from the list.

And save our work. CTRL+S

At this point, we can look at Gitkraken, and things have changed!

We can see that we’ve changed one file, and what the specific change was. Red for removal, green for addition.

Oh boy! All done right?

Wrong! These changes have only happened on your computer.

So I should just get this online right away?

Wrong again! We have to TEST our changes to make sure they work.

First. Open Byond as if you were going to play a game. We need to be logged into Byond.

Файл:Image4.png.png

Online? Good.

Second, open this file via double click.

Файл:Image28.png.png

Third, Compile and host the game.

This will take a moment.

Файл:Image21.png.png

Not compiling? Make sure your Byond client is up to date with the Beta Branch. No errors? Thank goodness, this has passed the first check.

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!

Файл:Image8.png.png

Oh snap, you’re in game and you’re an admin! Hooray it works! Test your feature/game balance/thing you want.

(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.)

No need to keep Byond and dream maker open, back to Github Desktop.

We need to make a “Branch” for our change. We don’t want to change our master if we can help it.

(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.)

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

Give your update a name and a brief description in the bottom left corner.

And hit that “Commit to No-Clown-Musak” button.

Next we need to publish the branch moving our changes online to our fork

Файл:Image33.png.png

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.

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.)

The title should be a one sentence summary, at most.

The description should give detail, and ingame examples if possible via screenshots hosted on an image hosting website. I recommend imgur.com

Hit the big green “Create pull request” button and jobs a good one!

Bask in the glow of accomplishing something grand!

See it on Discord in the #github channel!

Realize you’ve made a terrible mistake!

Файл:Image10.png.png

Phew, integrity saved!

And that’s the basics of Contributing to TGMC

Remember, the #dev-general and #coding are the places to be for more in depth questions, moral support,