mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Map cleaner tool and merge driver
Most info can be found in maptools/install.txt
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
set MAPFILE=tgstation.2.1.2.dmm
|
||||
|
||||
java -jar MapPatcher.jar -clean ../maps/%MAPFILE%.backup ../maps/%MAPFILE% ../maps/%MAPFILE%
|
||||
@@ -0,0 +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 maptools/ directory.
|
||||
2. After finishing your edit, and before your commit, double-click "clean_map.bat" in the maptools/ 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 BS12/.git/config in a text editor, and paste the following lines to the end of it:
|
||||
|
||||
[merge "merge-dmm"]
|
||||
name = mapmerge driver
|
||||
driver = ./maptools/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.
|
||||
@@ -0,0 +1,9 @@
|
||||
java -jar maptools/MapPatcher.jar -merge $1 $2 $3 $2
|
||||
if [ "$?" -gt 0 ]
|
||||
then
|
||||
echo "Unable to automatically resolve map conflicts, please merge manually."
|
||||
exit 1
|
||||
fi
|
||||
java -jar maptools/MapPatcher.jar -clean $1 $2 $2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,4 @@
|
||||
set MAPFILE=tgstation.2.1.2.dmm
|
||||
|
||||
cd ../maps
|
||||
copy %MAPFILE% %MAPFILE%.backup
|
||||
Reference in New Issue
Block a user