Permalink
Browse files

Adds a warning message when more than one map is included.

Tweaked dm.sh to ignore this message when it sets a single map to be included.

Signed-off-by: Mloc <colmohici@gmail.com>
  • Loading branch information...
1 parent 2f931ae commit d9174d116ee4848418d0d67b586b35acc242e637 @Mloc Mloc committed Jan 13, 2014
Showing with 11 additions and 2 deletions.
  1. +5 −1 _maps/metastation.dm
  2. +5 −1 _maps/tgstation2.dm
  3. +1 −0 dm.sh
@@ -1,8 +1,12 @@
-#ifndef MAP_FILE
+#if !defined(MAP_FILE)
#include "map_files\MetaStation.v39A.III.dmm"
#define MAP_FILE "MetaStation.v39A.III.dmm"
#define MAP_NAME "MetaStation"
+#elif !defined(MAP_OVERRIDE)
+
+ #warn a map has already been included, ignoring MetaStation.
+
#endif
View
@@ -1,8 +1,12 @@
-#ifndef MAP_FILE
+#if !defined(MAP_FILE)
#include "map_files\tgstation.2.1.2.dmm"
#define MAP_FILE "tgstation.2.1.2.dmm"
#define MAP_NAME "/tg/station 2"
+#elif !defined(MAP_OVERRIDE)
+
+ #warn a map has already been included, ignoring /tg/station 2.
+
#endif
View
@@ -40,6 +40,7 @@ do
fi
if [[ $var == -M* ]]
then
+ sed -i '1s/^/#define MAP_OVERRIDE\n/' $dmepath.mdme
sed -i 's!// BEGIN_INCLUDE!// BEGIN_INCLUDE\n#include "_maps\\'$arg'.dm"!' $dmepath.mdme
continue
fi

0 comments on commit d9174d1

Please sign in to comment.