mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-20 07:02:30 +00:00
* A preface to my madness Travis failed one of my PR's because I copied old code that used /red /blue /green. Because of this, I am going to find and replace every instance of it that I find. Also this is a test commit to make sure I'm comitting to the correct branch. * /blue /green /red replacements Dear god. A slow and painful death from acid is more fun than this. I wouldn't wish this torture on my worst enemy. And this is only the beginning * Replace part 2. Time to fix the human error. * Fixes mismatches * Sets macro count to 220 One above the current number of macros in the code. * Fixes last of the mismatches. * Removes spaces, replaces \black Removes spaces Replaces \black in a few areas where seen Replaces \bold with <B> </B> where seen * Updating macro count again * More fixes! * Issues fixed! For real this time! I swear! * Fixing all the merge conflict files.
56 lines
1.4 KiB
Plaintext
56 lines
1.4 KiB
Plaintext
proc/createRandomZlevel()
|
|
if(awaydestinations.len) //crude, but it saves another var!
|
|
return
|
|
|
|
var/list/potentialRandomZlevels = list()
|
|
admin_notice("<font color='red'><B> Searching for away missions...</B></font>", R_DEBUG)
|
|
var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
|
|
if(!Lines.len) return
|
|
for (var/t in Lines)
|
|
if (!t)
|
|
continue
|
|
|
|
t = trim(t)
|
|
if (length(t) == 0)
|
|
continue
|
|
else if (copytext(t, 1, 2) == "#")
|
|
continue
|
|
|
|
var/pos = findtext(t, " ")
|
|
var/name = null
|
|
// var/value = null
|
|
|
|
if (pos)
|
|
// No, don't do lowertext here, that breaks paths on linux
|
|
name = copytext(t, 1, pos)
|
|
// value = copytext(t, pos + 1)
|
|
else
|
|
// No, don't do lowertext here, that breaks paths on linux
|
|
name = t
|
|
|
|
if (!name)
|
|
continue
|
|
|
|
potentialRandomZlevels.Add(name)
|
|
|
|
|
|
if(potentialRandomZlevels.len)
|
|
admin_notice("<font color='red'><B>Loading away mission...</B></font>", R_DEBUG)
|
|
|
|
var/map = pick(potentialRandomZlevels)
|
|
var/file = file(map)
|
|
if(isfile(file))
|
|
maploader.load_map(file)
|
|
world.log << "away mission loaded: [map]"
|
|
|
|
for(var/obj/effect/landmark/L in landmarks_list)
|
|
if (L.name != "awaystart")
|
|
continue
|
|
awaydestinations.Add(L)
|
|
|
|
admin_notice("<font color='red'><B>Away mission loaded.</B></font>", R_DEBUG)
|
|
|
|
else
|
|
admin_notice("<font color='red'><B>No away missions found.</B></font>", R_DEBUG)
|
|
return
|