diff --git a/maps/RandomZLevels/Academy.dmm b/_maps/RandomZLevels/Academy.dmm similarity index 100% rename from maps/RandomZLevels/Academy.dmm rename to _maps/RandomZLevels/Academy.dmm diff --git a/maps/RandomZLevels/beach.dmm b/_maps/RandomZLevels/beach.dmm similarity index 100% rename from maps/RandomZLevels/beach.dmm rename to _maps/RandomZLevels/beach.dmm diff --git a/maps/RandomZLevels/blackmarketpackers.dmm b/_maps/RandomZLevels/blackmarketpackers.dmm similarity index 100% rename from maps/RandomZLevels/blackmarketpackers.dmm rename to _maps/RandomZLevels/blackmarketpackers.dmm diff --git a/maps/RandomZLevels/centcomAway.dmm b/_maps/RandomZLevels/centcomAway.dmm similarity index 100% rename from maps/RandomZLevels/centcomAway.dmm rename to _maps/RandomZLevels/centcomAway.dmm diff --git a/maps/RandomZLevels/challenge.dmm b/_maps/RandomZLevels/challenge.dmm similarity index 100% rename from maps/RandomZLevels/challenge.dmm rename to _maps/RandomZLevels/challenge.dmm diff --git a/maps/RandomZLevels/example.dmm b/_maps/RandomZLevels/example.dmm similarity index 100% rename from maps/RandomZLevels/example.dmm rename to _maps/RandomZLevels/example.dmm diff --git a/maps/RandomZLevels/fileList.txt b/_maps/RandomZLevels/fileList.txt similarity index 60% rename from maps/RandomZLevels/fileList.txt rename to _maps/RandomZLevels/fileList.txt index 2213f6a6d1e..8b4138a1c7e 100644 --- a/maps/RandomZLevels/fileList.txt +++ b/_maps/RandomZLevels/fileList.txt @@ -7,14 +7,14 @@ #Do NOT tick the maps during compile -- the game uses this list to decide which map to load. Ticking the maps will result in them ALL being loaded at once. #DO tick the associated code file for the away mission you are enabling. Otherwise, the map will be trying to reference objects which do not exist, which will cause runtime errors! -#maps/RandomZLevels/example.dmm -#maps/RandomZLevels/blackmarketpackers.dmm -#maps/RandomZLevels/stationCollision.dmm -#maps/RandomZLevels/spacebattle.dmm -#maps/RandomZLevels/beach.dmm -#maps/RandomZLevels/Academy.dmm -#maps/RandomZLevels/wildwest.dmm -#maps/RandomZLevels/challenge.dmm -#maps/RandomZLevels/listeningpost.dmm -#maps/RandomZLevels/spacehotel.dmm -#maps/RandomZLevels/centcomAway.dmm \ No newline at end of file +#_maps/RandomZLevels/example.dmm +#_maps/RandomZLevels/blackmarketpackers.dmm +#_maps/RandomZLevels/stationCollision.dmm +#_maps/RandomZLevels/spacebattle.dmm +#_maps/RandomZLevels/beach.dmm +#_maps/RandomZLevels/Academy.dmm +#_maps/RandomZLevels/wildwest.dmm +#_maps/RandomZLevels/challenge.dmm +#_maps/RandomZLevels/listeningpost.dmm +#_maps/RandomZLevels/spacehotel.dmm +#_maps/RandomZLevels/centcomAway.dmm \ No newline at end of file diff --git a/maps/RandomZLevels/listeningpost.dmm b/_maps/RandomZLevels/listeningpost.dmm similarity index 100% rename from maps/RandomZLevels/listeningpost.dmm rename to _maps/RandomZLevels/listeningpost.dmm diff --git a/maps/RandomZLevels/spacebattle.dmm b/_maps/RandomZLevels/spacebattle.dmm similarity index 100% rename from maps/RandomZLevels/spacebattle.dmm rename to _maps/RandomZLevels/spacebattle.dmm diff --git a/maps/RandomZLevels/spacehotel.dmm b/_maps/RandomZLevels/spacehotel.dmm similarity index 100% rename from maps/RandomZLevels/spacehotel.dmm rename to _maps/RandomZLevels/spacehotel.dmm diff --git a/maps/RandomZLevels/stationCollision.dmm b/_maps/RandomZLevels/stationCollision.dmm similarity index 100% rename from maps/RandomZLevels/stationCollision.dmm rename to _maps/RandomZLevels/stationCollision.dmm diff --git a/maps/RandomZLevels/wildwest.dmm b/_maps/RandomZLevels/wildwest.dmm similarity index 100% rename from maps/RandomZLevels/wildwest.dmm rename to _maps/RandomZLevels/wildwest.dmm diff --git a/maps/MetaStation.v39A.III.dmm b/_maps/map_files/MetaStation.v39A.III.dmm similarity index 100% rename from maps/MetaStation.v39A.III.dmm rename to _maps/map_files/MetaStation.v39A.III.dmm diff --git a/maps/tgstation.2.1.2.dmm b/_maps/map_files/tgstation.2.1.2.dmm similarity index 100% rename from maps/tgstation.2.1.2.dmm rename to _maps/map_files/tgstation.2.1.2.dmm diff --git a/_maps/metastation.dm b/_maps/metastation.dm new file mode 100644 index 00000000000..7ca1d076ef0 --- /dev/null +++ b/_maps/metastation.dm @@ -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 diff --git a/_maps/tgstation2.dm b/_maps/tgstation2.dm new file mode 100644 index 00000000000..01d34bddb87 --- /dev/null +++ b/_maps/tgstation2.dm @@ -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 diff --git a/maps/RandomZLevels/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm similarity index 100% rename from maps/RandomZLevels/Academy.dm rename to code/modules/awaymissions/mission_code/Academy.dm diff --git a/maps/RandomZLevels/blackmarketpackers.dm b/code/modules/awaymissions/mission_code/blackmarketpackers.dm similarity index 100% rename from maps/RandomZLevels/blackmarketpackers.dm rename to code/modules/awaymissions/mission_code/blackmarketpackers.dm diff --git a/maps/RandomZLevels/centcomAway.dm b/code/modules/awaymissions/mission_code/centcomAway.dm similarity index 100% rename from maps/RandomZLevels/centcomAway.dm rename to code/modules/awaymissions/mission_code/centcomAway.dm diff --git a/maps/RandomZLevels/challenge.dm b/code/modules/awaymissions/mission_code/challenge.dm similarity index 100% rename from maps/RandomZLevels/challenge.dm rename to code/modules/awaymissions/mission_code/challenge.dm diff --git a/maps/RandomZLevels/spacebattle.dm b/code/modules/awaymissions/mission_code/spacebattle.dm similarity index 100% rename from maps/RandomZLevels/spacebattle.dm rename to code/modules/awaymissions/mission_code/spacebattle.dm diff --git a/maps/RandomZLevels/stationCollision.dm b/code/modules/awaymissions/mission_code/stationCollision.dm similarity index 100% rename from maps/RandomZLevels/stationCollision.dm rename to code/modules/awaymissions/mission_code/stationCollision.dm diff --git a/maps/RandomZLevels/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm similarity index 100% rename from maps/RandomZLevels/wildwest.dm rename to code/modules/awaymissions/mission_code/wildwest.dm diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index e89d67cf773..143030c886c 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -4,7 +4,7 @@ proc/createRandomZlevel() var/list/potentialRandomZlevels = list() world << "\red \b Searching for away missions..." - var/list/Lines = file2list("maps/RandomZLevels/fileList.txt") + var/list/Lines = file2list("_maps/RandomZLevels/fileList.txt") if(!Lines.len) return for (var/t in Lines) if (!t) diff --git a/code/world.dm b/code/world.dm index 8a041e7dd11..b620dfeff18 100644 --- a/code/world.dm +++ b/code/world.dm @@ -90,19 +90,11 @@ process_ghost_teleport_locs() //Sets up ghost teleport locations. sleep_offline = 1 - var/list/lines = file2list(file('tgstation.dme')) - for(var/l in lines) - if( dd_hassuffix(l, ".dmm\"") ) - var/firstquote = findtext(l, "\"") - var/lastslash = 0 - for(var/j = 1; j < length(l); j++) - var/lastslashtest = findtext(l, "\\", -j) - if(lastslashtest > 0) - lastslash = lastslashtest - break - map_name = copytext(l, max(firstquote+1,lastslash+1), length(l)-4) - if(!map_name) - map_name = "Unknown" + #ifdef MAP_NAME + map_name = "[MAP_NAME]" + #else + map_name = "Unknown" + #endif spawn(3000) //so we aren't adding to the round-start lag if(config.kick_inactive) diff --git a/dm.sh b/dm.sh new file mode 100644 index 00000000000..91690cea137 --- /dev/null +++ b/dm.sh @@ -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 diff --git a/tgstation.dme b/tgstation.dme index 4a1cd48528e..445d6ce7132 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -13,6 +13,7 @@ // END_PREFERENCES // BEGIN_INCLUDE +#include "_maps\tgstation2.dm" #include "code\_compile_options.dm" #include "code\hub.dm" #include "code\world.dm" @@ -729,6 +730,13 @@ #include "code\modules\awaymissions\maploader\reader.dm" #include "code\modules\awaymissions\maploader\swapmaps.dm" #include "code\modules\awaymissions\maploader\writer.dm" +#include "code\modules\awaymissions\mission_code\Academy.dm" +#include "code\modules\awaymissions\mission_code\blackmarketpackers.dm" +#include "code\modules\awaymissions\mission_code\centcomAway.dm" +#include "code\modules\awaymissions\mission_code\challenge.dm" +#include "code\modules\awaymissions\mission_code\spacebattle.dm" +#include "code\modules\awaymissions\mission_code\stationCollision.dm" +#include "code\modules\awaymissions\mission_code\wildwest.dm" #include "code\modules\client\client defines.dm" #include "code\modules\client\client procs.dm" #include "code\modules\client\preferences.dm" @@ -1197,12 +1205,4 @@ #include "interface\interface.dm" #include "interface\stylesheet.dm" #include "interface\skin.dmf" -#include "maps\tgstation.2.1.2.dmm" -#include "maps\RandomZLevels\Academy.dm" -#include "maps\RandomZLevels\blackmarketpackers.dm" -#include "maps\RandomZLevels\centcomAway.dm" -#include "maps\RandomZLevels\challenge.dm" -#include "maps\RandomZLevels\spacebattle.dm" -#include "maps\RandomZLevels\stationCollision.dm" -#include "maps\RandomZLevels\wildwest.dm" // END_INCLUDE