任务单 #48595

fcdb: create_gameid()

开放日期: 2023-09-05 22:14 最后更新: 2023-09-27 01:19

报告人:
属主:
类型:
状态:
关闭
组件:
里程碑:
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
Fixed
文件:
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.

任务单历史 (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 (无) to cazfi
  • 处理结果 Update from 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
  • 状态 Update from 开启 to 关闭
  • 处理结果 Update from Accepted to Fixed

编辑

Please login to add comment to this ticket » 登录名