Weeeeeeee
This commit is contained in:
@@ -67,24 +67,25 @@
|
||||
|
||||
//Returns a list in plain english as a string
|
||||
/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
var/total = input.len
|
||||
if (!total)
|
||||
return nothing_text
|
||||
else if (total == 1)
|
||||
return "[input[1]]"
|
||||
else if (total == 2)
|
||||
return "[input[1]][and_text][input[2]]"
|
||||
else
|
||||
var/output = ""
|
||||
var/index = 1
|
||||
while (index < total)
|
||||
if (index == total - 1)
|
||||
comma_text = final_comma_text
|
||||
var/total = length(input)
|
||||
switch(total)
|
||||
if (0)
|
||||
return "[nothing_text]"
|
||||
if (1)
|
||||
return "[input[1]]"
|
||||
if (2)
|
||||
return "[input[1]][and_text][input[2]]"
|
||||
else
|
||||
var/output = ""
|
||||
var/index = 1
|
||||
while (index < total)
|
||||
if (index == total - 1)
|
||||
comma_text = final_comma_text
|
||||
|
||||
output += "[input[index]][comma_text]"
|
||||
index++
|
||||
output += "[input[index]][comma_text]"
|
||||
index++
|
||||
|
||||
return "[output][and_text][input[index]]"
|
||||
return "[output][and_text][input[index]]"
|
||||
|
||||
//Returns list element or null. Should prevent "index out of bounds" error.
|
||||
/proc/listgetindex(list/L, index)
|
||||
|
||||
@@ -19,22 +19,6 @@
|
||||
/proc/arachnid_name()
|
||||
return "[pick(GLOB.arachnid_first)] [pick(GLOB.arachnid_last)]"
|
||||
|
||||
/proc/church_name()
|
||||
var/static/church_name
|
||||
if (church_name)
|
||||
return church_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("Holy", "United", "First", "Second", "Last")
|
||||
|
||||
if (prob(20))
|
||||
name += " Space"
|
||||
|
||||
name += " " + pick("Church", "Cathedral", "Body", "Worshippers", "Movement", "Witnesses")
|
||||
name += " of [religion_name()]"
|
||||
|
||||
return name
|
||||
|
||||
GLOBAL_VAR(command_name)
|
||||
/proc/command_name()
|
||||
@@ -52,17 +36,6 @@ GLOBAL_VAR(command_name)
|
||||
|
||||
return name
|
||||
|
||||
/proc/religion_name()
|
||||
var/static/religion_name
|
||||
if (religion_name)
|
||||
return religion_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("bee", "science", "edu", "captain", "assistant", "monkey", "alien", "space", "unit", "sprocket", "gadget", "bomb", "revolution", "beyond", "station", "goon", "robot", "ivor", "hobnob")
|
||||
name += pick("ism", "ia", "ology", "istism", "ites", "ick", "ian", "ity")
|
||||
|
||||
return capitalize(name)
|
||||
|
||||
/proc/station_name()
|
||||
if(!GLOB.station_name)
|
||||
|
||||
@@ -78,21 +78,21 @@
|
||||
//Turns a direction into text
|
||||
/proc/dir2text(direction)
|
||||
switch(direction)
|
||||
if(1)
|
||||
if(NORTH)
|
||||
return "north"
|
||||
if(2)
|
||||
if(SOUTH)
|
||||
return "south"
|
||||
if(4)
|
||||
if(EAST)
|
||||
return "east"
|
||||
if(8)
|
||||
if(WEST)
|
||||
return "west"
|
||||
if(5)
|
||||
if(NORTHEAST)
|
||||
return "northeast"
|
||||
if(6)
|
||||
if(SOUTHEAST)
|
||||
return "southeast"
|
||||
if(9)
|
||||
if(NORTHWEST)
|
||||
return "northwest"
|
||||
if(10)
|
||||
if(SOUTHWEST)
|
||||
return "southwest"
|
||||
else
|
||||
return
|
||||
@@ -101,21 +101,21 @@
|
||||
/proc/text2dir(direction)
|
||||
switch(uppertext(direction))
|
||||
if("NORTH")
|
||||
return 1
|
||||
return NORTH
|
||||
if("SOUTH")
|
||||
return 2
|
||||
return SOUTH
|
||||
if("EAST")
|
||||
return 4
|
||||
return EAST
|
||||
if("WEST")
|
||||
return 8
|
||||
return WEST
|
||||
if("NORTHEAST")
|
||||
return 5
|
||||
return NORTHEAST
|
||||
if("NORTHWEST")
|
||||
return 9
|
||||
return NORTHWEST
|
||||
if("SOUTHEAST")
|
||||
return 6
|
||||
return SOUTHEAST
|
||||
if("SOUTHWEST")
|
||||
return 10
|
||||
return SOUTHWEST
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user