forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved all main .dmm maps to _maps/map_files Each main map gets a .dm file in _maps, this is what's ticked, -NOT- the .dmm file. This allows use of a MAP_NAME define for various purposes, and lays the groundwork for map customization in the future. Also included a hacky dm.sh script which supports swapping maps. For example, "./dm.sh tgstation.dme -Mmetastation" would compile with metastation. Signed-off-by: Mloc-Argent <[email protected]>
- Loading branch information
Showing
27 changed files
with
129 additions
and
33 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef MAP_FILE | ||
|
||
#include "map_files\MetaStation.v39A.III.dmm" | ||
|
||
#define MAP_FILE "MetaStation.v39A.III.dmm" | ||
#define MAP_NAME "MetaStation" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef MAP_FILE | ||
|
||
#include "map_files\tgstation.2.1.2.dmm" | ||
|
||
#define MAP_FILE "tgstation.2.1.2.dmm" | ||
#define MAP_NAME "/tg/station 2" | ||
|
||
#endif |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#!/bin/bash | ||
|
||
dmepath="" | ||
retval=1 | ||
|
||
for var | ||
do | ||
if [[ $var != -* && $var == *.dme ]] | ||
then | ||
dmepath=`echo $var | sed -r 's/.{4}$//'` | ||
break | ||
fi | ||
done | ||
|
||
if [[ $dmepath == "" ]] | ||
then | ||
echo "No .dme file specified, aborting." | ||
exit 1 | ||
fi | ||
|
||
if [[ -a $dmepath.mdme ]] | ||
then | ||
rm $dmepath.mdme | ||
fi | ||
|
||
cp $dmepath.dme $dmepath.mdme | ||
if [[ $? != 0 ]] | ||
then | ||
echo "Failed to make modified dme, aborting." | ||
exit 2 | ||
fi | ||
|
||
for var | ||
do | ||
arg=`echo $var | sed -r 's/^.{2}//'` | ||
if [[ $var == -D* ]] | ||
then | ||
sed -i '1s/^/#define '$arg'\n/' $dmepath.mdme | ||
continue | ||
fi | ||
if [[ $var == -M* ]] | ||
then | ||
sed -i 's!// BEGIN_INCLUDE!// BEGIN_INCLUDE\n#include "_maps\\'$arg'.dm"!' $dmepath.mdme | ||
continue | ||
fi | ||
done | ||
|
||
#windows | ||
if [[ `uname` == MINGW* ]] | ||
then | ||
dm="" | ||
|
||
if hash dm.exe 2>/dev/null | ||
then | ||
dm='dm.exe' | ||
elif [[ -a '/c/Program Files (x86)/BYOND/bin/dm.exe' ]] | ||
then | ||
dm='/c/Program Files (x86)/BYOND/bin/dm.exe' | ||
elif [[ -a '/c/Program Files/BYOND/bin/dm.exe' ]] | ||
then | ||
dm='/c/Program Files/BYOND/bin/dm.exe' | ||
fi | ||
|
||
if [[ $dm == "" ]] | ||
then | ||
echo "Couldn't find the DreamMaker executable, aborting." | ||
exit 3 | ||
fi | ||
|
||
"$dm" $dmepath.mdme | ||
retval=$? | ||
else | ||
if hash DreamMaker 2>/dev/null | ||
then | ||
DreamMaker $dmepath.mdme | ||
retval=$? | ||
else | ||
echo "Couldn't find the DreamMaker executable, aborting." | ||
exit 3 | ||
fi | ||
fi | ||
|
||
mv $dmepath.mdme.dmb $dmepath.dmb | ||
mv $dmepath.mdme.rsc $dmepath.rsc | ||
|
||
rm $dmepath.mdme | ||
|
||
exit $retval |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters