Resolving icon conflicts

Материал из MassMeta
Перейти к навигации Перейти к поиску
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 discord, 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 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[править | править код]

Although originally written to operate for Map Merge Conflicts, the same principles to help resolve DMI (Icon) conflicts in a step-by-step guide can be found here.


However, it is not at all a bad idea to start using 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 wikiWikicodeAutowiki