Skip to content

Commit

Permalink
TGS Test Merge (#7548)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Nov 23, 2024
2 parents 35c2780 + bd84103 commit 3647d69
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 12 deletions.
3 changes: 3 additions & 0 deletions code/game/gamemodes/cm_process.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#define MODE_BATTLEFIELD_DRAW_STALEMATE "DRAW: Stalemate"
#define MODE_BATTLEFIELD_DRAW_DEATH "DRAW: My Friends Are Dead"

#define MODE_FACTION_CLASH_UPP_MAJOR "UPP Major Victory"
#define MODE_FACTION_CLASH_UPP_MINOR "UPP Minor Victory"

#define MODE_GENERIC_DRAW_NUKE "DRAW: Nuclear Explosion"

/*
Expand Down
9 changes: 6 additions & 3 deletions code/game/gamemodes/colonialmarines/colonialmarines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,12 @@
musical_track = 'sound/theme/neutral_hopeful2.ogg'
if(GLOB.round_statistics && GLOB.round_statistics.current_map)
GLOB.round_statistics.current_map.total_draws++
var/sound/S = sound(musical_track, channel = SOUND_CHANNEL_LOBBY)
S.status = SOUND_STREAM
sound_to(world, S)
else
end_icon = "draw"
musical_track = 'sound/theme/neutral_hopeful2.ogg'
var/sound/theme = sound(musical_track, channel = SOUND_CHANNEL_LOBBY)
theme.status = SOUND_STREAM
sound_to(world, theme)
if(GLOB.round_statistics)
GLOB.round_statistics.game_mode = name
GLOB.round_statistics.round_length = world.time
Expand Down
6 changes: 3 additions & 3 deletions code/game/gamemodes/colonialmarines/xenovsxeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@
var/musical_track
musical_track = pick('sound/theme/neutral_melancholy1.ogg', 'sound/theme/neutral_melancholy2.ogg')

var/sound/S = sound(musical_track, channel = SOUND_CHANNEL_LOBBY)
S.status = SOUND_STREAM
sound_to(world, S)
var/sound/theme = sound(musical_track, channel = SOUND_CHANNEL_LOBBY)
theme.status = SOUND_STREAM
sound_to(world, theme)
if(GLOB.round_statistics)
GLOB.round_statistics.game_mode = name
GLOB.round_statistics.round_length = world.time
Expand Down
37 changes: 37 additions & 0 deletions code/game/gamemodes/extended/cm_vs_upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,40 @@
for(var/area/area in GLOB.all_areas)
area.base_lighting_alpha = 150
area.update_base_lighting()

/datum/game_mode/extended/faction_clash/cm_vs_upp/declare_completion()
announce_ending()
var/musical_track
var/end_icon = "draw"
switch(round_finished)
if(MODE_FACTION_CLASH_UPP_MAJOR)
musical_track = pick('sound/theme/lastmanstanding_upp.ogg')
end_icon = "upp_major"
if(MODE_FACTION_CLASH_UPP_MINOR)
musical_track = pick('sound/theme/lastmanstanding_upp.ogg')
end_icon = "upp_minor"
if(MODE_INFESTATION_M_MAJOR)
musical_track = pick('sound/theme/winning_triumph1.ogg','sound/theme/winning_triumph2.ogg')
end_icon = "marine_major"
if(MODE_INFESTATION_M_MINOR)
musical_track = pick('sound/theme/neutral_hopeful1.ogg','sound/theme/neutral_hopeful2.ogg')
end_icon = "marine_minor"
if(MODE_BATTLEFIELD_DRAW_STALEMATE)
end_icon = "draw"
musical_track = 'sound/theme/neutral_hopeful2.ogg'
else
end_icon = "draw"
musical_track = 'sound/theme/neutral_hopeful2.ogg'
var/sound/theme = sound(musical_track, channel = SOUND_CHANNEL_LOBBY)
theme.status = SOUND_STREAM
sound_to(world, theme)

calculate_end_statistics()
show_end_statistics(end_icon)

declare_completion_announce_fallen_soldiers()
declare_completion_announce_predators()
declare_completion_announce_medal_awards()
declare_fun_facts()

return TRUE
2 changes: 1 addition & 1 deletion code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ GLOBAL_VAR_INIT(cas_tracking_id_increment, 0) //this var used to assign unique t
if(GLOB.round_statistics)
GLOB.round_statistics.track_round_end()
log_game("Round end result: [round_finished]")
to_chat_spaced(world, margin_top = 2, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDHEADER("|Round Complete|"))
to_chat_spaced(world, margin_top = 2, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDHEADER("|Round Complete:[round_finished]|"))
to_chat_spaced(world, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDBODY("Thus ends the story of the brave men and women of the [MAIN_SHIP_NAME] and their struggle on [SSmapping.configs[GROUND_MAP].map_name].\nThe game-mode was: [GLOB.master_mode]!\n[CONFIG_GET(string/endofroundblurb)]"))

/datum/game_mode/proc/declare_completion()
Expand Down
21 changes: 16 additions & 5 deletions code/modules/admin/tabs/round_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,29 @@
if(!check_rights(R_SERVER) || !SSticker.mode)
return

if(alert("Are you sure you want to end the round?",,"Yes","No") != "Yes")
return
// trying to end the round before it even starts. bruh
if(!SSticker.mode)
return

SSticker.mode.round_finished = MODE_INFESTATION_DRAW_DEATH
message_admins("[key_name(usr)] has made the round end early.")
if(tgui_alert(usr, "Are you sure you want to end the round?", "End Round", list("Yes", "No"), 0) != "Yes")
return

var/winstate = tgui_input_list(usr, "What do you want the round end state to be?", "End Round", list("Custom", "Admin Intervention", MODE_INFESTATION_X_MAJOR, MODE_INFESTATION_X_MINOR, MODE_INFESTATION_M_MAJOR, MODE_INFESTATION_M_MINOR, MODE_INFESTATION_DRAW_DEATH, MODE_FACTION_CLASH_UPP_MAJOR, MODE_FACTION_CLASH_UPP_MINOR, MODE_INFECTION_ZOMBIE_WIN, MODE_GENERIC_DRAW_NUKE, MODE_BATTLEFIELD_W_MAJOR, MODE_BATTLEFIELD_W_MINOR, MODE_BATTLEFIELD_DRAW_STALEMATE, MODE_BATTLEFIELD_DRAW_DEATH))

if(winstate == "Custom")
winstate = tgui_input_text(usr, "Please enter a custom round end state.", "End Round", timeout = 0)
if(!winstate)
return

SSticker.force_ending = TRUE
SSticker.mode.round_finished = winstate

log_admin("[key_name(usr)] has made the round end early - [winstate].")
message_admins("[key_name(usr)] has made the round end early - [winstate].")
for(var/client/C in GLOB.admins)
to_chat(C, {"
<hr>
[SPAN_CENTERBOLD("Staff-Only Alert: <EM>[usr.key]</EM> has made the round end early")]
[SPAN_CENTERBOLD("Staff-Only Alert: <EM>[usr.key]</EM> has made the round end early - [winstate]")]
<hr>
"})
return
Expand Down
Binary file modified icons/mob/hud/actions.dmi
Binary file not shown.

0 comments on commit 3647d69

Please sign in to comment.