diff --git a/tools/mapmerge/MapPatcher.jar b/tools/mapmerge/MapPatcher.jar index a8bc3560b4..cb0a4f4433 100644 Binary files a/tools/mapmerge/MapPatcher.jar and b/tools/mapmerge/MapPatcher.jar differ diff --git a/tools/mapmerge/clean_map_git.sh b/tools/mapmerge/clean_map_git.sh new file mode 100644 index 0000000000..6ff986e0ba --- /dev/null +++ b/tools/mapmerge/clean_map_git.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +MAPFILE='tgstation.2.1.3.dmm' + +git show HEAD:_maps/map_files/$MAPFILE > tmp.dmm +java -jar MapPatcher.jar -clean tmp.dmm '../../_maps/map_files/'$MAPFILE '../../_maps/map_files/'$MAPFILE +dos2unix -U '../../_maps/map_files/'$MAPFILE +rm tmp.dmm + diff --git a/tools/mapmerge/install.txt b/tools/mapmerge/install.txt index 6319d31c4d..f9cbc4a022 100644 --- a/tools/mapmerge/install.txt +++ b/tools/mapmerge/install.txt @@ -1,17 +1,17 @@ -1. Install java(http://www.java.com/en/download/index.jsp) -2. Make sure java is in your PATH. To test this, open git bash, and type "java". If it says unknown command, you need to add JAVA/bin to your PATH variable. - -Committing -1. Before starting to edit the map, double-click "prepare_map.bat" in the tools/mapmerge/ directory. -2. After finishing your edit, and before your commit, double-click "clean_map.bat" in the tools/mapmerge/ directory. - -This will make sure in the new version of your map, no paths are needlessly changed, thus instead of 8000 lines changed you'll get 50 lines changed. This not only reduces size of your commit, it also makes it possible to get an overview of your map changes on the "files changed" page in your pull request. - -Merging -The easiest way to do merging is to install the merge driver. For this, open -tg-station/.git/config in a text editor, and paste the following lines to the end of it: - -[merge "merge-dmm"] - name = mapmerge driver - driver = ./tools/mapmerge/mapmerge.sh %O %A %B - -After this, merging maps should happen automagically unless there are conflicts(a tile that both you and someone else changed). If there are conflicts, you will unfortunately still be stuck with opening both versions in a map editor, and manually resolving the issues. +1. Install java(http://www.java.com/en/download/index.jsp) +2. Make sure java is in your PATH. To test this, open git bash, and type "java". If it says unknown command, you need to add JAVA/bin to your PATH variable (A guide for this can be found at https://www.java.com/en/download/help/path.xml ). + +Committing +1. Before starting to edit the map, double-click "prepare_map.bat" in the tools/mapmerge/ directory. +2. After finishing your edit, and before your commit, double-click "clean_map.bat" in the tools/mapmerge/ directory. + +This will make sure in the new version of your map, no paths are needlessly changed, thus instead of 8000 lines changed you'll get 50 lines changed. This not only reduces size of your commit, it also makes it possible to get an overview of your map changes on the "files changed" page in your pull request. + +Merging +The easiest way to do merging is to install the merge driver. For this, open `Baystation12/.git/config` in a text editor, and paste the following lines to the end of it: + +[merge "merge-dmm"] + name = mapmerge driver + driver = ./tools/mapmerge/mapmerge.sh %O %A %B + +After this, merging maps should happen automagically unless there are conflicts(a tile that both you and someone else changed). If there are conflicts, you will unfortunately still be stuck with opening both versions in a map editor, and manually resolving the issues.