Resolving icon conflicts

From /tg/station 13 Wiki
Jump to: navigation, search
Guide to contributing to the game > Guide to spriting

Automatic icon conflict resolver

Use as a Git Hook

  1. Install the hook: Open the tools/hooks folder and double-click Install.bat
    • Linux users: run tools/hooks/install.sh

Once complete, the icon merger script will automatically run every time you git merge. The console log will indicate if it was successful or if further action is needed.

Resolve conflicts on an in-progress merge

If you are using a Git GUI which does not run the hook on merge, you can also run the conflict resolver on an in-progress merge by request:

  1. Open the tools/dmi folder and double-click Resolve Icon Conflicts.bat
    • Linux users: run tools/hooks/dmi.merge --posthoc

The console log will indicate if it was successful or if further action is needed.

Manually resolving icon conflicts (oranges's guide)

Assuming the following layout of your git repository:

  • origin : points to your own fork of tgstation
  • upstream : points to the tgstation repository itself

If you don't understand this, read this entire book through: https://git-scm.com/book/en/v2

git is a powertool and if you don't train yourself you will lose figurative fingers (and real code and hours of work)

that said, if you get stuck, come find us on the irc, I'll do my best to help you, assuming you can follow simple instructions

checkout your branch for the feature

   git checkout {yourbranch}

Side note, if one of you actually tries to checkout a branch named {yourbranch} I'll cry, substitute your actual branch name in here

make sure you have the latest copy of your branch (in case you worked on it at work (implying you're employed lol) or something)

   git pull

Copy your icon states to safety

Use dreammaker to copy your changed conflicting icon/iconstates out of the project folder to somewhere safe

YOU MUST DO THE ABOVE STEP OR YOU WILL LOSE YOUR ICON/ICON STATES

also I will laugh at you

Close dreammaker (completely quit it) (Seriously, do it, it tends to cache stuff and not see git changing files)

Also if you have the daemon running (DreamDaemon) close that, it might get in the way

Note

Follow every step in this guide, do not skip any, if you get any output you do not understand or that mentions errors contact the irc or ask for help in the code discord channel, do not blindly continue! You wouldn't put the legs on an ikea table upside down and then keep going like nothing is wrong would you?

Fetch upstream and merge

   git fetch upstream
   git merge upstream/master
   #At this point git will stop and complain about conflicts in a binary file (your dmi)

Resolving conflicts

   #first reset the file to match the latest on tgstation's master branch
   git checkout upstream/master -- path/to/conflicted/file.dmi
   ... repeat for each conflicted file

Open dreammaker and copy your changed icon back into the conflicted dmi's from your safe space using DreamMaker

yes it's expected your file won't be in the dmi, you just reset it, that's why you copied it out earlier to a safe location. Save and close DreamBreaker

seriously do this before using git again or you will suffer a great pain

Add all conflicted files you have resolved

   git add path/to/conflicted/file.dmi
   ... repeat as necessary

Commit

   git commit
   #if you use a new version of git you may be able to use
   git merge --continue
   #instead

Push

   git push

but oranges, I am a brainlet and I use tortise git

Right-click on your repository and use the "start Git Bash Here"

I use github desktop because I'm even worse than that previous guy

There's no hope for you, install git-bash for windows https://git-scm.com/downloads and right click on your repository and use the "start Git Bash here" option

kraken

alt+t but you probably already knew that


Hosting Hosting a serverSetting up the databaseWorking with /tg/station as an upstream repository
Contributing Guide to contributing to the gameSetting up gitDownloading the source codeReporting issuesChangelogs
Coding Understanding SS13 codeSS13 for experienced programmersCode docsCoding standardsGetting Your Pull AcceptedBinary flags‎Text FormattingMySQL
Mapping Guide to mappingMap mergerGuide to door access
Spriting Guide to spritingResolving icon conflicts
Wiki Guide to contributing to the wikiWikicode