Ticket #48595

fcdb: create_gameid()

Eröffnet am: 2023-09-05 22:14 Letztes Update: 2023-09-27 01:19

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

Details

Query game id from a fcdb lua script. The main use-case is that the fcdb database can initialise game what ever way it sees fit, and to just give freeciv code an id by which it itself knows the game. Later on freeciv code can pass the id back to any database query functions.

Ticket-Verlauf (3/7 Historien)

2023-09-05 22:14 Aktualisiert von: cazfi
  • New Ticket "fcdb: create_gameid()" created
2023-09-23 01:21 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
Kommentar

Ended with a bit different implementation. Most notably the function is called "game_start", and it's called when game actually starts. This dbid is also stored to savegame. On game restart server proposes dbid from the savegame to the lua interface, which then can either use it or to create a new one.

2023-09-23 02:23 Aktualisiert von: cazfi
Kommentar

New version:
- Really pass existing dbid to database.lua
- Fixed integer type problems
- Pass '-1' as "no dbid" value, consider zero valid value

2023-09-25 02:31 Aktualisiert von: cazfi
2023-09-27 01:19 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Bearbeiten

Please login to add comment to this ticket » Anmelden