@@ -687,15 +687,7 @@ return {
687
687
688
688
celebrate_team (pteam )
689
689
690
- local text = " has captured the flag"
691
- if many_teams then
692
- text = " has captured the flag of team(s) " .. HumanReadable (teamnames )
693
- minetest .chat_send_all (
694
- minetest .colorize (tcolor , pname ) ..
695
- minetest .colorize (FLAG_MESSAGE_COLOR , text )
696
- )
697
- end
698
- ctf_modebase .announce (string.format (" Player %s (team %s)%s" , pname , pteam , text ))
690
+
699
691
700
692
ctf_modebase .flag_huds .untrack_capturer (pname )
701
693
@@ -706,7 +698,19 @@ return {
706
698
score = math.max (75 , math.min (500 , score ))
707
699
capture_reward = capture_reward + score
708
700
end
709
-
701
+ local text = " has captured the flag"
702
+ if many_teams then
703
+ text = string.format (
704
+ " has captured the flag of team(s) %s and got %d points" ,
705
+ HumanReadable (teamnames ),
706
+ capture_reward
707
+ )
708
+ minetest .chat_send_all (
709
+ minetest .colorize (tcolor , pname ) ..
710
+ minetest .colorize (FLAG_MESSAGE_COLOR , text )
711
+ )
712
+ end
713
+ ctf_modebase .announce (string.format (" Player %s (team %s)%s and got %d points" , pname , pteam , text , capture_reward ))
710
714
local team_score = team_scores [pteam ].score
711
715
for teammate in pairs (ctf_teams .online_players [pteam ].players ) do
712
716
if teammate ~= pname then
@@ -721,12 +725,12 @@ return {
721
725
teams_left = teams_left - # teamnames
722
726
723
727
if teams_left <= 1 then
724
- local capture_text = " Player %s captured"
728
+ local capture_text = " Player %s captured and got %d points "
725
729
if many_teams then
726
- capture_text = " Player %s captured the last flag"
730
+ capture_text = " Player %s captured the last flag and got %d points "
727
731
end
728
732
729
- ctf_modebase .summary .set_winner (string.format (capture_text , minetest .colorize (tcolor , pname )))
733
+ ctf_modebase .summary .set_winner (string.format (capture_text , minetest .colorize (tcolor , pname ), capture_reward ))
730
734
731
735
local win_text = HumanReadable (pteam ) .. " Team Wins!"
732
736
@@ -746,7 +750,7 @@ return {
746
750
747
751
for lost_player in pairs (ctf_teams .online_players [lost_team ].players ) do
748
752
team_switch_after_capture = true
749
- ctf_teams .allocate_player (lost_player )
753
+ ctf_teams .allocate_player (lost_player )
750
754
team_switch_after_capture = false
751
755
end
752
756
end
0 commit comments