Incidencia #48595

fcdb: create_gameid()

Abrir Fecha: 2023-09-05 22:14 Última actualización: 2023-09-27 01:19

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
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 History (3/7 Histories)

2023-09-05 22:14 Updated by: cazfi
  • New Ticket "fcdb: create_gameid()" created
2023-09-23 01:21 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
Comentario

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 Updated by: cazfi
Comentario

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 Updated by: cazfi
2023-09-27 01:19 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Entrar