Ticket #42663

Add phase begin and end signals

Eröffnet am: 2021-07-24 00:08 Letztes Update: 2022-02-13 07:56

Auswertung:
Verantwortlicher:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
2

Details

Add signals "player_phase_begin" and "player_phase_end" with argument of the player (and maybe some specifications of other players sharing the phase?) Called from srv_main.c, the former in begin_phase() after update_unit_activities() and the latter in end_phase() after do_tech_parasite_effect(). Purposes:

  • see #42659, giving players' per-turn bonuses,
  • depending on counters' realization, they might be updated the same time.

Ticket-Verlauf (3/9 Historien)

2021-07-24 00:08 Aktualisiert von: ihnatus
  • New Ticket "Add phase begin and end signals" created
2022-02-06 07:31 Aktualisiert von: ihnatus
Kommentar

Logically, player_phase_end signal should be called where now there is do_reveal_effects() since it is also kinda a gimmick bonus worth unhardcoding (unlikely tech_parasite stuff that is pretty much calculatable; and maybe some nearby functions may go to Lua as well), just it is the very end of the end_phase() code. When the game is played in the concurrent mode, turn_started signal can do pretty the same task as well. But might we want more signals?..

2022-02-08 04:24 Aktualisiert von: ihnatus
Kommentar

Actually, I decided to add 3 signals. One that is designed to be used for #42659 is player_alive_phase_end(Player). "End of the end" (and also events for all phase players, including lost ones) is held by player_phase_end(Player) that is called after all phase cities are processed and tech upkeeps are paid. player_phase_begin(Player, bool) is added for symmetry, the second parameter says if the phase really begins or just was loaded from a savegame.

2022-02-08 15:43 Aktualisiert von: cazfi
Kommentar

Looks good, and has value also outside the autoupgrade work, so should go in on its own right.

Will you provide also a version that applies to master?

2022-02-10 04:16 Aktualisiert von: ihnatus
Kommentar

Reply To cazfi

Looks good, and has value also outside the autoupgrade work, so should go in on its own right. Will you provide also a version that applies to master?

Here it is.

2022-02-10 06:47 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
Kommentar
2022-02-13 07:56 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Bearbeiten

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Anmelden