Skip to content

Commit f7b7829

Browse files
GreenBlobGreenBlob
GreenBlob
authored and
GreenBlob
committed
Show map in summary formspec
1 parent d78ac2d commit f7b7829

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mods/ctf/ctf_modebase/summary.lua

+11
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function ctf_modebase.summary.get(prev)
3333
game_stat = game_stat,
3434
winner = winner,
3535
duration = ctf_map.get_duration(),
36+
map = ctf_map.current_map.name,
3637
buttons = {previous = previous ~= nil},
3738
allow_sort = true,
3839
}
@@ -44,6 +45,7 @@ function ctf_modebase.summary.get(prev)
4445
game_stat = previous.game_stat,
4546
winner = previous.winner,
4647
duration = previous.duration,
48+
map = previous.map,
4749
buttons = {next = true},
4850
allow_sort = true,
4951
}
@@ -69,6 +71,7 @@ ctf_api.register_on_match_end(function()
6971
game_stat = game_stat,
7072
winner = winner or "NO WINNER",
7173
duration = ctf_map.get_duration(),
74+
map = ctf_map.current_map.name,
7275
summary_ranks = current_mode.summary_ranks,
7376
}
7477

@@ -286,6 +289,14 @@ function ctf_modebase.summary.show_gui_sorted(name, rankings, special_rankings,
286289
}
287290
end
288291

292+
if formdef.map then
293+
formspec.elements.map = {
294+
type = "label",
295+
pos = {7.5, 0.5},
296+
label = "Map: " .. formdef.map,
297+
}
298+
end
299+
289300
ctf_gui.old_show_formspec(name, "ctf_modebase:summary", formspec)
290301
end
291302

0 commit comments

Comments
 (0)