Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3rd Party Victory Music (WY, UPP, CLF, USCM) #3861

Merged
merged 16 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions code/game/gamemodes/cm_process.dm
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,35 @@ GLOBAL_VAR_INIT(next_admin_bioscan, 30 MINUTES)

return num_marines

/datum/game_mode/proc/count_per_faction(list/z_levels = SSmapping.levels_by_any_trait(list(ZTRAIT_GROUND, ZTRAIT_RESERVED, ZTRAIT_MARINE_MAIN_SHIP)))
var/num_marines = 0
var/num_WY = 0
var/num_UPP = 0
var/num_CLF = 0
var/num_headcount = 0

for(var/faction_member in GLOB.alive_human_list)
var/mob/living/carbon/human/current_human = faction_member
blackdragonTOW marked this conversation as resolved.
Show resolved Hide resolved
if(!(current_human.z && (current_human.z in z_levels) && !istype(current_human.loc, /turf/open/space)))
continue
if(current_human.faction in FACTION_LIST_WY || current_human.job == "Corporate Liaison") //The CL is assigned the USCM faction for gameplay purposes
num_WY++
num_headcount++
continue
if(current_human.faction == FACTION_UPP)
num_UPP++
num_headcount++
continue
if(current_human.faction == FACTION_CLF)
num_CLF++
num_headcount++
continue
if(current_human.faction == FACTION_MARINE)
num_marines++
num_headcount++
continue
num_headcount++
return list(num_marines,num_WY,num_UPP,num_CLF,num_headcount)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this an associated list so we're not accessing by index later


/*
#undef QUEEN_DEATH_COUNTDOWN
Expand Down
17 changes: 16 additions & 1 deletion code/game/gamemodes/colonialmarines/colonialmarines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,22 @@
round_statistics.current_map.total_marine_victories++
round_statistics.current_map.total_marine_majors++
if(MODE_INFESTATION_X_MINOR)
musical_track = pick('sound/theme/neutral_melancholy1.ogg','sound/theme/neutral_melancholy2.ogg')
var/living_player_list[] = count_humans_and_xenos(EvacuationAuthority.get_affected_zlevels())
blackdragonTOW marked this conversation as resolved.
Show resolved Hide resolved
if(living_player_list[1] && !living_player_list[2]) // If Xeno Minor but Xenos are dead and Humans are alive, see which faction is the last standing
var/headcount = count_per_faction()
var/majority = 0.5 // What percent do we consider a 'majority?'
blackdragonTOW marked this conversation as resolved.
Show resolved Hide resolved
if ((headcount[2] / headcount[5]) > majority) // headcount[2] = Weyland-Yutani
musical_track = pick('sound/theme/LastManStanding_WY.ogg')
else if ((headcount[3] / headcount[5]) > majority) // headcount[3] = UPP
musical_track = pick('sound/theme/LastManStanding_UPP.ogg')
else if ((headcount[4] / headcount[5]) > majority) // headcount[4] = CLF
musical_track = pick('sound/theme/LastManStanding_CLF.ogg')
else if ((headcount[1] / headcount[5]) > majority) // headcount[1] = Marines
blackdragonTOW marked this conversation as resolved.
Show resolved Hide resolved
musical_track = pick('sound/theme/neutral_melancholy2.ogg') //This is the theme song for Colonial Marines the game, fitting
else
musical_track = pick('sound/theme/neutral_melancholy1.ogg')
else
musical_track = pick('sound/theme/neutral_melancholy1.ogg')
blackdragonTOW marked this conversation as resolved.
Show resolved Hide resolved
end_icon = "xeno_minor"
if(round_statistics && round_statistics.current_map)
round_statistics.current_map.total_xeno_victories++
Expand Down
Binary file added sound/theme/LastManStanding_CLF.ogg
BeagleGaming1 marked this conversation as resolved.
Show resolved Hide resolved
Binary file not shown.
Binary file added sound/theme/LastManStanding_UPP.ogg
Binary file not shown.
Binary file added sound/theme/LastManStanding_WY.ogg
Binary file not shown.