Ticket #48595

fcdb: create_gameid()

오픈 날짜: 2023-09-05 22:14 마지막 업데이트: 2023-09-27 01:19

Reporter:
소유자:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
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
  • 소유자 Update from (None) to cazfi
  • Resolution Update from None to Accepted
댓글 올리기

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
댓글 올리기

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
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login