diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index df7e8f8d69f..cfea73501a5 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -1508,15 +1508,15 @@ proc/formatPlayerPanel(var/mob/U,var/text="PP")
var/dat = "
Credits Panel
"
dat += "Star Of The Show:"
- dat += "Chosen Star: [isnull(end_credits.star) ? "(Will Select Automatically)" : end_credits.star] (Set Plaintext) (Set Mob From List) "
- if(!isnull(end_credits.star) && !end_credits.drafted)
+ dat += "Chosen Star: [end_credits.star == "" && end_credits.customized_star == "" ? "(Will Select Automatically)" : end_credits.star || end_credits.customized_star] (Set Plaintext) (Set Mob From List) "
+ if(end_credits.customized_star != "" && !end_credits.drafted)
dat += "(Reset) "
if(!end_credits.drafted)
dat += "
The round isn't over, so the featured star hasn't been picked yet.
You can manually set one now, or whichever human has talked the most this round will automatically be selected as the featured star when the round ends."
dat += "
"
dat += "Episode Name:"
- dat += "Chosen Name: [end_credits.episode_name == "" ? "(Will Generate Automatically)" : end_credits.episode_name] (Set) "
- if(end_credits.episode_name != "" && !end_credits.drafted)
+ dat += "Chosen Name: [end_credits.episode_name == "" && end_credits.customized_name == "" ? "(Will Generate Automatically)" : end_credits.episode_name || end_credits.customized_name] (Set) "
+ if(end_credits.customized_name != "" && !end_credits.drafted)
dat += "(Reset) "
else if(end_credits.drafted)
dat += "(Reroll!) "
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index c5950b1f7da..13218c75cc9 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -4836,37 +4836,36 @@
switch(href_list["credits"])
if("resetstar")
if(!end_credits.drafted) //Just in case the button somehow gets clicked when it shouldn't
- end_credits.star = null
+ end_credits.customized_star = ""
log_admin("[key_name(usr)] reset the current round's featured star. A new one will automatically generate later.")
message_admins("[key_name_admin(usr)] reset the current round's featured star. A new one will automatically generate later.")
if("setstartext")
- var/newstar = thebigstar(input(usr,"Write the new star. In the final credits, it will be displayed as: 'Starring\[linebreak\]\[whatever you type here\]'. Mind your capitalization! You may also use HTML. Do not include the characters '%' anywhere unless you know what you're doing, please.","in my dream, i am the star. its me",null) as text|null)
+ var/newstar = thebigstar(input(usr,"Write the new star. In the final credits, it will be displayed as: 'Starring\[linebreak\]\[whatever you type here\]'. Mind your capitalization! You may also use HTML. Do not include the characters '%' anywhere unless you know what you're doing, please.","in my dream, i am the star. its me", end_credits.star) as text|null)
if(newstar)
- end_credits.star = newstar
+ end_credits.customized_star = newstar
log_admin("[key_name(usr)] forced the current round's featured star to be '[newstar]'")
message_admins("[key_name_admin(usr)] forced the current round's featured star to be '[newstar]'")
if("setstarmob")
var/newstar = thebigstar(input(usr, "Who should be the featured star of this episode? WARNING: Only tested with humans.", "New star from moblist...") as null|anything in sortmobs())
if(newstar)
- end_credits.star = newstar
+ end_credits.customized_star = newstar
log_admin("[key_name(usr)] forced the current round's featured star to be '[newstar]'")
message_admins("[key_name_admin(usr)] forced the current round's featured star to be '[newstar]'")
if("resetname")
if(!end_credits.drafted) //Just in case the button somehow gets clicked when it shouldn't
- end_credits.episode_name = ""
- end_credits.is_rerun = initial(end_credits.is_rerun)
+ end_credits.customized_name = ""
log_admin("[key_name(usr)] reset the current round's episode name. A new one will automatically generate later.")
message_admins("[key_name_admin(usr)] reset the current round's episode name. A new one will automatically generate later.")
if("rerollname")
- end_credits.pick_name()
+ end_credits.customized_name = ""
+ end_credits.finalize_name()
log_admin("[key_name(usr)] re-rolled the current round's episode name. New name: '[end_credits.episode_name]'")
message_admins("[key_name_admin(usr)] re-rolled the current round's episode name. New name: '[end_credits.episode_name]'")
if("setname")
- var/newname = input(usr,"Write the name of this latest rerun...","New Episode Name") as text|null
+ var/newname = input(usr,"Write the super original name of this masterpiece...","New Episode Name") as text|null
if(newname)
- end_credits.episode_name = uppertext(newname)
- end_credits.is_rerun = FALSE
+ end_credits.customized_name = uppertext(newname)
log_admin("[key_name(usr)] forced the current round's episode name to '[newname]'")
message_admins("[key_name_admin(usr)] forced the current round's episode name to '[newname]'")
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 2c5ec440d60..4514c09aa8a 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -384,7 +384,7 @@ var/const/MAX_SAVE_SLOTS = 8
[special_popup ? "Yes" : "No"]
Attack Animations:
[attack_animation ? (attack_animation == ITEM_ANIMATION? "Item Anim." : "Person Anim.") : "No"]
- Show Credits (?):
+ Show Credits (?):
[credits]
Server Shutdown Jingle (?):
[jingle]
diff --git a/code/modules/credits/credits.dm b/code/modules/credits/credits.dm
index f99f4a95bf4..22f62cc691e 100644
--- a/code/modules/credits/credits.dm
+++ b/code/modules/credits/credits.dm
@@ -9,21 +9,24 @@ var/global/datum/credits/end_credits = new
var/file = 'code/modules/credits/credits.html'
var/director = "Pomf Chicken Productions"
- var/theme = "NT"
var/list/producers = list()
- var/mob/living/carbon/human/most_talked //Human that talked the most this round. Will become the star if admins don't set one.
- var/star //Is text returned by thebigstar(), not a mob.
+ var/star = ""
var/list/disclaimers = list()
var/list/datum/episode_name/episode_names = list()
- var/episode_name = ""
- var/is_rerun = TRUE //A 'rerun' is defined as a round where no admin set a custom episode name and the rolled episode name wasn't of the /rare subtype.
+ var/episode_name = ""
var/producers_string = ""
var/episode_string = ""
var/cast_string = ""
var/disclaimers_string = ""
var/star_string = ""
+ //If any of the following four are modified, the episode is considered "not a rerun".
+ var/customized_name = ""
+ var/customized_star = ""
+ var/rare_episode_name = FALSE
+ var/theme = "NT"
+
var/drafted = FALSE
var/finalized = FALSE
var/js_args = list()
@@ -48,6 +51,12 @@ var/global/datum/credits/end_credits = new
"http://ss13.moe/media/source/roundend/jinglenew/tfvictory.mp3"
)
+/datum/credits/proc/is_rerun()
+ if(customized_name != "" || customized_star != "" || rare_episode_name == TRUE || theme != initial(theme))
+ return FALSE
+ else
+ return TRUE
+
/*
* draft():
* Stage 1 of credit assembly. Called as soon as the rock cooks. Picks the episode names, staff, etc.
@@ -76,8 +85,7 @@ var/global/datum/credits/end_credits = new
if(!drafted) //In case the world is rebooted without the round ending normally.
draft()
- if(episode_name == "") //admin might've already set one
- pick_name()
+ finalize_name()
finalize_episodestring()
finalize_starstring()
finalize_disclaimerstring() //finalize it after the admins have had time to edit them
@@ -86,7 +94,7 @@ var/global/datum/credits/end_credits = new
var/splashytext = producers_string + star_string
finalized = TRUE
- js_args = list(scrollytext, splashytext, scroll_speed, splash_time) //arguments for the makeCredits function back in the javascript
+ js_args = list(scrollytext, splashytext, theme, scroll_speed, splash_time) //arguments for the makeCredits function back in the javascript
/*
* send2clients():
@@ -140,7 +148,7 @@ var/global/datum/credits/end_credits = new
if(CREDITS_ALWAYS)
C.credits_audio()
if(CREDITS_NO_RERUNS) //The time has come to decide. Shall we play credits audio, or preload the jingle audio instead?
- if(!is_rerun)
+ if(!is_rerun())
C.credits_audio()
else
C.jingle_audio(preload_only = TRUE)
@@ -164,7 +172,10 @@ var/global/datum/credits/end_credits = new
-/datum/credits/proc/pick_name()
+/datum/credits/proc/finalize_name()
+ if(customized_name)
+ episode_name = customized_name
+ return
var/list/drafted_names = list()
var/list/is_rare_assoc_list = list()
for(var/datum/episode_name/N in episode_names)
@@ -172,13 +183,13 @@ var/global/datum/credits/end_credits = new
is_rare_assoc_list["[N.thename]"] = N.rare
episode_name = pickweight(drafted_names)
if(is_rare_assoc_list[episode_name] == TRUE)
- is_rerun = FALSE
+ rare_episode_name = TRUE
-/datum/credits/proc/finalize_episodestring(var/thename)
+/datum/credits/proc/finalize_episodestring()
var/season = rand(1,22)
var/episodenum = rand(1,17) //Maybe we could do this cumulatively so that the round after 670 becomes 671 etc and the season is just the last 2 numbers of the current IRL year?
- episode_string = "SEASON [season] EPISODE [episodenum]
[episode_name]
"
- log_game("So ends [is_rerun ? "another rerun of " : ""]SEASON [season] EPISODE [episodenum] - [episode_name]")
+ episode_string = "SEASON [season] EPISODE [episodenum]
[episode_name]
"
+ log_game("So ends [is_rerun() ? "another rerun of " : ""]SEASON [season] EPISODE [episodenum] - [episode_name]")
/datum/credits/proc/finalize_disclaimerstring()
disclaimers_string = ""
@@ -211,13 +222,19 @@ var/global/datum/credits/end_credits = new
producers_string += "[producer]%
" //% being an arbitrary "new splash card" char we use to split this string back in the javascript
/datum/credits/proc/draft_star()
- if(star)
- star = thebigstar(star)
- else if(most_talked)
- star = thebigstar(most_talked) //We want this ran now, in case the star gibs before the credits roll etc
+ if(customized_star)
+ star = customized_star
+ return
+ var/mob/living/carbon/human/most_talked
+ for(var/mob/living/carbon/human/H in mob_list)
+ if(!H.key || H.iscorpse)
+ continue
+ if(!most_talked || H.talkcount > most_talked.talkcount)
+ most_talked = H
+ star = thebigstar(most_talked)
/datum/credits/proc/finalize_starstring()
- if(star_string)
+ if(star == "")
return
star_string = "Starring
[star]
%" //% being an arbitrary "new splash card" char we use to split this string back in the javascript
@@ -227,9 +244,6 @@ var/global/datum/credits/end_credits = new
for(var/mob/living/carbon/human/H in mob_list)
if(!H.key || H.iscorpse)
continue
- if(!most_talked || H.talkcount > most_talked.talkcount)
- most_talked = H
-
cast_string += "[gender_credits(H)]"
for(var/mob/living/silicon/S in mob_list)
diff --git a/code/modules/credits/credits.html b/code/modules/credits/credits.html
index c3a877c6dbf..3c4364c011f 100644
--- a/code/modules/credits/credits.html
+++ b/code/modules/credits/credits.html
@@ -118,12 +118,13 @@
}
}
- function setupCredits(scrollyString, splashyString, newScrollSpeed, newSplashTime){
+ function setupCredits(scrollyString, splashyString, theme, newScrollSpeed, newSplashTime){
if(newSplashTime !== undefined) {splashTime = parseInt(newSplashTime)}
if(newScrollSpeed !== undefined) {scrollSpeed = parseInt(newScrollSpeed)}
setScrollingText(scrollyString);
setSplashyText(splashyString);
+ applyTheme(theme);
initialized = 1;
}
@@ -164,6 +165,24 @@
}, speed);
}
+ function applyTheme(theme){
+ if(!theme)
+ return
+ switch(theme){
+ case "clown":
+ var crayons = ['red', 'orange', 'yellow', 'green', 'cyan', 'purple'];
+ var divs = document.getElementsByTagName('*');
+ for(var i=0; i";
runByond('byond://winset?id=mapwindow.credits;is-visible=true');
diff --git a/code/modules/credits/episode_name.dm b/code/modules/credits/episode_name.dm
index b9e2b8863ed..1981e32487c 100644
--- a/code/modules/credits/episode_name.dm
+++ b/code/modules/credits/episode_name.dm
@@ -43,7 +43,7 @@
/datum/episode_name/proc/make_div(var/admindatum) //This is just for the admin panel.
- . = "[weight]% (Set) - "
+ . = "[rare ? "" + "[weight]" + "%" : "[weight]" + "%"] (Set) - "
. += "[thename] - (Edit) "
. += "(Remove) "
. += "(?)"
@@ -84,7 +84,7 @@
if(ticker.explosion_in_progress || ticker.station_was_nuked)
episode_names += new /datum/episode_name/rare("[pick("THE CREW GETS NUKED", "THE CREW IS THE BOMB", "THE CREW BLASTS OFF AGAIN!", "THE 'BOOM' HEARD 'ROUND THE WORLD", 25;"THE BIG BANG THEORY")]", "The station was nuked!", 350)
if((locate(/datum/dynamic_ruleset/roundstart/nuclear) in mode.executed_rules) || (locate(/datum/dynamic_ruleset/midround/from_ghosts/faction_based/nuclear) in mode.executed_rules))
- theme = "Syndie" //This really should use the nukeop's check_win(), but it wasn't coded like that.
+ theme = "syndie" //This really should use the nukeop's check_win(), but the newcops gamemode wasn't coded like that.
else
if((locate(/datum/dynamic_ruleset/roundstart/nuclear) in mode.executed_rules) || (locate(/datum/dynamic_ruleset/midround/from_ghosts/faction_based/nuclear) in mode.executed_rules))
episode_names += new /datum/episode_name/rare("[pick("THE CREW SOLVES THE NUCLEAR CRISIS", "BLAST, FOILED AGAIN", "FISSION MAILED", 50;"I OPENED THE WINDOW, AND IN FLEW COPS")]", "The crew defeated the nuclear operatives.", 350)
@@ -219,12 +219,14 @@
if(clowncount > 3)
episode_names += new /datum/episode_name/rare("CLOWNS GALORE", "There were [clowncount] clowns on the shuttle.", min(1500, clowncount*200))
+ theme = "clown"
if(mimecount > 3)
episode_names += new /datum/episode_name/rare("THE SILENT SHUFFLE", "There were [mimecount] mimes on the shuttle.", min(1500, mimecount*200))
if(chaplaincount > 2)
episode_names += new /datum/episode_name/rare("COUNT YOUR BLESSINGS", "There were [chaplaincount] chaplains on the shuttle. Like, the real deal, not just clothes.", min(1500, chaplaincount*450))
if(chefcount > 2)
- episode_names += new /datum/episode_name/rare("Too Many Cooks", "There were [chefcount] chefs on the shuttle.", min(1500, chefcount*450)) //intentionally not capitalized
+ episode_names += new /datum/episode_name/rare("Too Many Cooks", "There were [chefcount] chefs on the shuttle.", min(1500, chefcount*450)) //intentionally not capitalized, as the theme will customize it
+ theme = "cooks"
if(assistantcount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("[pick("GREY GOO", "RISE OF THE GREYTIDE")]", "Most of the survivors were Assistants, or at least dressed like one.", min(1500, assistantcount*200))
if(skeletoncount / human_escapees.len > 0.6 && human_escapees.len > 3)
@@ -244,7 +246,7 @@
var/mob/living/carbon/human/H = human_escapees[1]
if(istraitor(H) || isdoubleagent(H) || isnukeop(H))
- theme = "Syndie"
+ theme = "syndie"
if(!H.isUnconscious() && H.mind && H.mind.assigned_role == "Chef")
var/chance = 250
@@ -264,6 +266,7 @@
if(H.is_wearing_any(list(/obj/item/clothing/under/rank/clown, /obj/item/clothing/under/jester)))
chance += 250
episode_names += new /datum/episode_name/rare("[pick("COME HELL OR HIGH HONKER", "THE LAST LAUGH")]", "The Clown was the only survivor in the shuttle.", chance)
+ theme = "clown"
else if(!H.isUnconscious() && H.mind && H.mind.assigned_role == "Internal Affairs Agent")
var/chance = 250
if(H.is_holding_item(/obj/item/weapon/storage/briefcase))
diff --git a/icons/credits/4_themed_clown.png b/icons/credits/4_themed_clown.png
new file mode 100644
index 00000000000..910e41d8f1f
Binary files /dev/null and b/icons/credits/4_themed_clown.png differ
diff --git a/icons/credits/4_themed_cooks.png b/icons/credits/4_themed_cooks.png
new file mode 100644
index 00000000000..c19aace8d34
Binary files /dev/null and b/icons/credits/4_themed_cooks.png differ