-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathnames.dm
328 lines (282 loc) · 9.96 KB
/
names.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
/proc/lizard_name(gender)
if(gender == MALE)
return "[pick(GLOB.lizard_names_male)]-[pick(GLOB.lizard_names_clan)]"
return "[pick(GLOB.lizard_names_female)]-[pick(GLOB.lizard_names_clan)]"
/proc/pod_name(gender)
var/randname
switch(rand(1,4))
if(1) //Human
if(gender == MALE)
randname = pick(GLOB.first_names_male)
else
randname = pick(GLOB.first_names_female)
randname += " [pick(GLOB.last_names)]"
return randname
if(2) //Lizard
return lizard_name(gender)
if(3) //Moth
return moth_name()
if(4) //Plant
randname = pick(GLOB.plant_names)
if(prob(25))
randname += " [pick(GLOB.last_names)]"
return randname
/proc/preternis_name(gender)
switch(rand(1,3))
if(1) //Adj + Noun
return "[pick(GLOB.adjectives)] [pick(GLOB.forge_name)]"
if(2) //Vxtrin name
switch(rand(1,4))
if(1) //Name
return pick(GLOB.preternis_names)
if(2) //Caste + Name
return "[pick(GLOB.preternis_class)]'[pick(GLOB.preternis_names)]"
if(3) //Caste + Name + Home
return "[pick(GLOB.preternis_class)]'[pick(GLOB.preternis_names)]-[capitalize(pick(GLOB.preternis_home))]"
if(4) //Name + Home
return "[pick(GLOB.preternis_names)]-[capitalize(pick(GLOB.preternis_home))]"
if(3) //Robotic name
return ipc_name()
/proc/polysmorph_name()
return pick(GLOB.polysmorph_names)
/proc/ethereal_name()
if(prob(66))
return "[pick(GLOB.constellations)] \Roman[rand(1,99)]"
return "[pick(GLOB.ethereal_names)]"
/proc/plasmaman_name()
return "[pick(GLOB.plasmaman_names)] \Roman[rand(1,99)]"
/proc/moth_name()
return "[pick(GLOB.moth_first)] [pick(GLOB.moth_last)]"
/proc/ipc_name()
return "[pick(GLOB.posibrain_names)]-[rand(100, 999)]"
/proc/nightmare_name() //they have one segment to the name because they're shells of what a vxtrin once was
switch(rand(1,3))
if(1) //space and capital last name
return "[pick(GLOB.preternis_class)]"
if(2) //dash and lowercase last name
return "[pick(GLOB.preternis_names)]"
if(3) //apostrophe and lowercase last name
return "[pick(GLOB.preternis_home)]"
/proc/darkspawn_name() //they have three segments to their name, but have lost sane ordering
var/list/order = list("name", "class", "home")
var/name = ""
for(var/i in 1 to 3)
var/selection = pick_n_take(order)
switch(selection)
if("name")
name += "[capitalize(pick(GLOB.preternis_names))]"
if("class")
name += "[capitalize(pick(GLOB.preternis_class))]"
if("home")
name += "[capitalize(pick(GLOB.preternis_home))]"
switch(i)
if(1) //apostrophe after the first name
name += "'"
if(2) //dash after the second
name = capitalize(name)
name += "-"
return name
GLOBAL_VAR(command_name)
/proc/command_name()
if (GLOB.command_name)
return GLOB.command_name
var/name = "Central Command"
GLOB.command_name = name
return name
/proc/change_command_name(name)
GLOB.command_name = name
return name
/proc/station_name()
if(!GLOB.station_name)
var/newname
var/config_station_name = CONFIG_GET(string/stationname)
if(config_station_name)
newname = config_station_name
else
newname = new_station_name()
set_station_name(newname)
return GLOB.station_name
/proc/set_station_name(newname)
GLOB.station_name = newname
var/config_server_name = CONFIG_GET(string/servername)
if(config_server_name)
world.name = "[config_server_name][config_server_name == GLOB.station_name ? "" : ": [GLOB.station_name]"]"
else
world.name = GLOB.station_name
/proc/new_station_name()
var/random = rand(1,5)
var/name = ""
var/new_station_name = ""
//Rare: Pre-Prefix
if (prob(10))
name = pick(GLOB.station_prefixes)
new_station_name = name + " "
name = ""
// Prefix
for(var/holiday_name in SSgamemode.holidays)
if(holiday_name == "Friday the 13th")
random = 13
var/datum/holiday/holiday = SSgamemode.holidays[holiday_name]
name = holiday.getStationPrefix()
//get normal name
if(!name)
name = pick(GLOB.station_names)
if(name)
new_station_name += name + " "
// Suffix
name = pick(GLOB.station_suffixes)
new_station_name += name + " "
// ID Number
switch(random)
if(1)
new_station_name += "[rand(1, 99)]"
if(2)
new_station_name += pick(GLOB.greek_letters)
if(3)
new_station_name += "\Roman[rand(1,99)]"
if(4)
new_station_name += pick(GLOB.phonetic_alphabet)
if(5)
new_station_name += pick(GLOB.numbers_as_words)
if(13)
new_station_name += pick("13","XIII","Thirteen")
return new_station_name
/proc/syndicate_name()
var/name = ""
// Prefix
name += pick("Clandestine", "Prima", "Blue", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Bonk", "Gene", "Gib")
// Suffix
if (prob(80))
name += " "
// Full
if (prob(60))
name += pick("Syndicate", "Consortium", "Collective", "Corporation", "Group", "Holdings", "Biotech", "Industries", "Systems", "Products", "Chemicals", "Enterprises", "Family", "Creations", "International", "Intergalactic", "Interplanetary", "Foundation", "Positronics", "Hive")
// Broken
else
name += pick("Syndi", "Corp", "Bio", "System", "Prod", "Chem", "Inter", "Hive")
name += pick("", "-")
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Code")
// Small
else
name += pick("-", "*", "")
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Gen", "Star", "Dyne", "Code", "Hive")
return name
//Traitors and traitor silicons will get these. Revs will not.
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
//Cached regex search - for checking if codewords are used.
GLOBAL_DATUM(syndicate_code_phrase_regex, /regex)
GLOBAL_DATUM(syndicate_code_response_regex, /regex)
/*
Should be expanded.
How this works:
Instead of "I'm looking for James Smith," the traitor would say "James Smith" as part of a conversation.
Another traitor may then respond with: "They enjoy running through the void-filled vacuum of the derelict."
The phrase should then have the words: James Smith.
The response should then have the words: run, void, and derelict.
This way assures that the code is suited to the conversation and is unpredicatable.
Obviously, some people will be better at this than others but in theory, everyone should be able to do it and it only enhances roleplay.
Can probably be done through "{ }" but I don't really see the practical benefit.
One example of an earlier system is commented below.
/N
*/
/proc/generate_code_phrase(return_list=FALSE)//Proc is used for phrase and response in master_controller.dm
if(!return_list)
. = ""
else
. = list()
var/words = pick(//How many words there will be. Minimum of two. 2, 4 and 5 have a lesser chance of being selected. 3 is the most likely.
50; 2,
200; 3,
50; 4,
25; 5
)
var/list/safety = list(1,2,3)//Tells the proc which options to remove later on.
var/nouns = strings(ION_FILE, "ionabstract")
var/objects = strings(ION_FILE, "ionobjects")
var/adjectives = strings(ION_FILE, "ionadjectives")
var/threats = strings(ION_FILE, "ionthreats")
var/foods = strings(ION_FILE, "ionfood")
var/drinks = strings(ION_FILE, "iondrinks")
var/list/locations = GLOB.teleportlocs.len ? GLOB.teleportlocs : drinks //if null, defaults to drinks instead.
var/list/names = list()
for(var/datum/data/record/t in GLOB.data_core.general)//Picks from crew manifest.
names += t.fields["name"]
var/maxwords = words//Extra var to check for duplicates.
for(words,words>0,words--)//Randomly picks from one of the choices below.
if(words==1&&(1 in safety)&&(2 in safety))//If there is only one word remaining and choice 1 or 2 have not been selected.
safety = list(pick(1,2))//Select choice 1 or 2.
else if(words==1&&maxwords==2)//Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen,
safety = list(3)//Default to list 3
switch(pick(safety))//Chance based on the safety list.
if(1)//1 and 2 can only be selected once each to prevent more than two specific names/places/etc.
switch(rand(1,2))//Mainly to add more options later.
if(1)
if(names.len&&prob(70))
. += pick(names)
else
if(prob(10))
. += pick(lizard_name(MALE),lizard_name(FEMALE))
else
var/new_name = pick(pick(GLOB.first_names_male,GLOB.first_names_female))
new_name += " "
new_name += pick(GLOB.last_names)
. += new_name
if(2)
. += pick(get_all_jobs())//Returns a job.
safety -= 1
if(2)
switch(rand(1,3))//Food, drinks, or things. Only selectable once.
if(1)
. += lowertext(pick(drinks))
if(2)
. += lowertext(pick(foods))
if(3)
. += lowertext(pick(locations))
safety -= 2
if(3)
switch(rand(1,4))//Abstract nouns, objects, adjectives, threats. Can be selected more than once.
if(1)
. += lowertext(pick(nouns))
if(2)
. += lowertext(pick(objects))
if(3)
. += lowertext(pick(adjectives))
if(4)
. += lowertext(pick(threats))
if(!return_list)
if(words==1)
. += "."
else
. += ", "
/**
* Generate a name devices
*
* Creates a randomly generated tag or name for devices or anything really
* it keeps track of a special list that makes sure no name is used more than
* once
*
* args:
* * len (int)(Optional) Default=5 The length of the name
* * prefix (string)(Optional) static text in front of the random name
* * postfix (string)(Optional) static text in back of the random name
* Returns (string) The generated name
*/
/proc/assign_random_name(len=5, prefix="", postfix="")
//DO NOT REMOVE NAMES HERE UNLESS YOU KNOW WHAT YOU'RE DOING
//All names already used
var/static/list/used_names = list()
var/static/valid_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
var/list/new_name = list()
var/text
// machine id's should be fun random chars hinting at a larger world
do
new_name.Cut()
new_name += prefix
for(var/i = 1 to len)
new_name += valid_chars[rand(1,length(valid_chars))]
new_name += postfix
text = new_name.Join()
while(used_names[text])
used_names[text] = TRUE
return text