-
Notifications
You must be signed in to change notification settings - Fork 250
Expand file tree
/
Copy pathmovietitles.dm
More file actions
149 lines (132 loc) · 6.95 KB
/
movietitles.dm
File metadata and controls
149 lines (132 loc) · 6.95 KB
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
var/global/list/end_titles
/client
var/list/credits
/client/proc/RollCredits()
set waitfor = FALSE
if(get_preference_value(/datum/client_preference/show_credits) != PREF_YES)
return
if(!global.end_titles)
global.end_titles = generate_titles()
if(mob)
mob.overlay_fullscreen("fishbed",/obj/screen/fullscreen/fishbed)
mob.overlay_fullscreen("fadeout",/obj/screen/fullscreen/fadeout)
if(mob.get_preference_value(/datum/client_preference/play_lobby_music) == PREF_YES)
sound_to(mob, sound(null, channel = sound_channels.lobby_channel))
if(global.end_credits_song == null)
if(global.using_map.credit_sound)
sound_to(mob, sound(pick(global.using_map.credit_sound), wait = 0, volume = 40, channel = sound_channels.lobby_channel))
else if(get_preference_value(/datum/client_preference/play_admin_midis) == PREF_YES)
sound_to(mob, sound(global.end_credits_song, wait = 0, volume = 40, channel = sound_channels.lobby_channel))
sleep(5 SECONDS)
verbs += /client/proc/ClearCredits
for(var/credit in global.end_titles)
var/obj/screen/credit/credit_obj = new(null, mob)
LAZYADD(credits, credit_obj)
credit_obj.maptext = {"<div style="font:'Small Fonts'">[credit]</div>"}
credit_obj.rollem()
sleep(CREDIT_SPAWN_SPEED)
sleep(CREDIT_ROLL_SPEED - CREDIT_SPAWN_SPEED)
ClearCredits()
verbs -= /client/proc/ClearCredits
/client/proc/ClearCredits()
set name = "Stop End Titles"
set category = "OOC"
verbs -= /client/proc/ClearCredits
QDEL_NULL_LIST(credits)
mob.clear_fullscreen("fishbed")
mob.clear_fullscreen("fadeout")
sound_to(mob, sound(null, channel = sound_channels.lobby_channel))
/proc/generate_titles()
var/list/titles = list()
var/list/cast = list()
var/list/chunk = list()
var/chunksize = 0
titles += "<center><h1>EPISODE [rand(1,1000)]<br>[SSlore.get_end_credits_title()]<h1></h1></h1></center>"
for(var/mob/living/human/H in global.living_mob_list_|global.dead_mob_list_)
if(findtext(H.real_name,"(mannequin)"))
continue
if(H.isMonkey() && findtext(H.real_name,"[lowertext(H.species.name)]")) //no monki
continue
if(H.timeofdeath && H.timeofdeath < 5 MINUTES) //don't mention these losers (prespawned corpses mostly)
continue
if(!cast.len && !chunksize)
chunk += "CAST:"
var/job = ""
if(GetAssignment(H) != "Unassigned")
job = ", [uppertext(GetAssignment(H))]"
var/used_name = H.real_name
var/datum/computer_file/report/crew_record/record = get_crewmember_record(H.real_name)
if(record && record.get_rank())
var/datum/mil_rank/rank = global.using_map.get_rank(record.get_branch(), record.get_rank())
if(rank.name_short)
used_name = "[rank.name_short] [used_name]"
var/showckey = 0
if(H.ckey && H.client)
if(H.client.get_preference_value(/datum/client_preference/show_ckey_credits) == PREF_SHOW)
showckey = 1
var/decl/background_detail/background = H.get_background_datum_by_flag(BACKGROUND_FLAG_NAMING)
if(!background || !(H.species.spawn_flags & SPECIES_CAN_JOIN) || prob(10))
background = GET_DECL(/decl/background_detail/heritage/human)
if(!showckey)
if(prob(90))
chunk += "[background.get_random_cultural_name(H, H.gender, H.get_species())]\t \t \t \t[uppertext(used_name)][job]"
else
var/decl/pronouns/pronouns = H.get_pronouns()
chunk += "[used_name]\t \t \t \t[uppertext(pronouns.him)]SELF"
else
chunk += "[uppertext(background.get_random_cultural_name(H, H.gender, H.get_species()))] a.k.a. '[uppertext(H.ckey)]'\t \t \t \t[uppertext(used_name)][job]"
chunksize++
if(chunksize > 2)
cast += "<center>[jointext(chunk,"<br>")]</center>"
chunk.Cut()
chunksize = 0
if(chunk.len)
cast += "<center>[jointext(chunk,"<br>")]</center>"
titles += cast
var/list/corpses = list()
var/list/monkies = list()
for(var/mob/living/human/H in global.dead_mob_list_)
if(H.timeofdeath < 5 MINUTES) //no prespawned corpses
continue
if(H.isMonkey() && findtext(H.real_name,"[lowertext(H.species.name)]"))
monkies[H.species] += 1
else if(H.real_name)
corpses += H.real_name
for(var/decl/species/monkey_species in monkies)
corpses += "[monkies[monkey_species]] [lowertext(monkies[monkey_species] > 1 ? monkey_species.name_plural : monkey_species.name)]"
if(corpses.len)
titles += "<center>BASED ON REAL EVENTS<br>In memory of [english_list(corpses)].</center>"
var/list/staff = list("PRODUCTION STAFF:")
var/list/staffjobs = list("Coffee Fetcher", "Cameraman", "Angry Yeller", "Chair Operator", "Choreographer", "Historical Consultant", "Costume Designer", "Chief Editor", "Executive Assistant")
var/list/goodboys = list()
for(var/client/C)
if(!C.holder)
continue
if(C.holder.rights & (R_DEBUG|R_ADMIN))
var/list/all_backgrounds = decls_repository.get_decls_of_subtype(/decl/background_detail/heritage)
var/decl/background_detail/cult = all_backgrounds[pick(all_backgrounds)]
staff += "[uppertext(pick(staffjobs))] - [cult.get_random_cultural_name(C.mob, C.mob.gender, C.mob.get_species())] a.k.a. '[C.key]'"
else if(C.holder.rights & R_MOD)
goodboys += "[C.key]"
titles += "<center>[jointext(staff,"<br>")]</center>"
if(goodboys.len)
titles += "<center>STAFF'S GOOD BOYS:<br>[english_list(goodboys)]</center><br>"
var/disclaimer = "<br>Sponsored by [global.using_map.company_name].<br>All rights reserved.<br>\
This motion picture is protected under the copyright laws of the system government<br> and other nations throughout the galaxy.<br>\
Colony of First Publication: [pick("Mars", "Luna", "Earth", "Venus", "Phobos", "Ceres", "Tiamat", "Ceti Epsilon", "Eos", "Pluto", "Ouere",\
"Lordania", "Kingston", "Cinu", "Yuklid V", "Lorriman", "Tersten", "Gaia")].<br>"
disclaimer += pick("Use for parody prohibited. PROHIBITED.",
"All stunts were performed by underpaid interns. Do NOT try at home.",
"[global.using_map.company_name] does not endorse behaviour depicted. Attempt at your own risk.",
"Any unauthorized exhibition, distribution, or copying of this film or any part thereof (including soundtrack)<br>\
may result in an ERT being called to storm your home and take it back by force.",
"The story, all names, characters, and incidents portrayed in this production are fictitious. No identification with actual<br>\
persons (living or deceased), places, buildings, and products is intended or should be inferred.<br>\
This film is based on a true story and all individuals depicted are based on real people, despite what we just said.",
"No person or entity associated with this film received payment or anything of value, or entered into any agreement, in connection<br>\
with the depiction of tobacco products, despite the copious amounts of smoking depicted within.<br>\
(This disclaimer sponsored by Carcinoma - Carcinogens are our Business!(TM)).",
"No animals were harmed in the making of this motion picture except for those listed previously as dead. Do not try this at home.")
titles += "<hr>"
titles += "<center><span style='font-size:6pt;'>[JOINTEXT(disclaimer)]</span></center>"
return titles