mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 18:11:47 +00:00
Big(gish) map reorganization.
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 <colmohici@gmail.com>
This commit is contained in:
@@ -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
|
||||
#_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
|
||||
8
_maps/metastation.dm
Normal file
8
_maps/metastation.dm
Normal file
@@ -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
|
||||
8
_maps/tgstation2.dm
Normal file
8
_maps/tgstation2.dm
Normal file
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
#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)
|
||||
|
||||
88
dm.sh
Normal file
88
dm.sh
Normal file
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user