mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge remote-tracking branch 'upstream/master' into dev-freeze
Conflicts: code/modules/mob/living/carbon/human/life.dm code/modules/nano/nanomanager.dm code/modules/surgery/surgery.dm
This commit is contained in:
@@ -1,54 +1,55 @@
|
||||
proc/createRandomZlevel()
|
||||
if(awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
var/list/potentialRandomZlevels = list()
|
||||
world << "\red \b Searching for away missions..."
|
||||
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)
|
||||
world << "\red \b Loading away mission..."
|
||||
|
||||
var/map = pick(potentialRandomZlevels)
|
||||
var/file = file(map)
|
||||
if(isfile(file))
|
||||
maploader.load_map(file, load_speed = 100)
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if (L.name != "awaystart")
|
||||
continue
|
||||
awaydestinations.Add(L)
|
||||
|
||||
world << "\red \b Away mission loaded."
|
||||
|
||||
else
|
||||
world << "\red \b No away missions found."
|
||||
return
|
||||
proc/createRandomZlevel()
|
||||
if(awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
var/list/potentialRandomZlevels = list()
|
||||
world << "\red \b Searching for away missions..."
|
||||
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)
|
||||
world << "\red \b Loading away mission..."
|
||||
|
||||
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)
|
||||
|
||||
world << "\red \b Away mission loaded."
|
||||
|
||||
else
|
||||
world << "\red \b No away missions found."
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user