首次提交: 时间囚笼游戏完整版本

- 实现了完整的Android游戏框架 (Kotlin + Jetpack Compose)
- 科技暗黑风格UI设计与终端风格界面组件
- 完整的故事系统 (主线+支线剧情)
- 固定底部操作区布局,解决选择按钮可见性问题
- 集成Gemini AI智能对话支持
- 游戏状态管理与存档系统
- 动态天气系统与角色状态跟踪
- 支持离线游戏,兼容Android 11+
This commit is contained in:
2025-08-22 10:07:03 -07:00
commit 514ed09825
111 changed files with 10753 additions and 0 deletions

View File

@@ -0,0 +1,526 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "2d343b59e35035dacc0fb14bd84f5a3a",
"entities": [
{
"tableName": "game_saves",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`saveId` TEXT NOT NULL, `gameId` TEXT NOT NULL, `gameState` TEXT NOT NULL, `storyProgress` TEXT NOT NULL, `saveTime` INTEGER NOT NULL, `saveName` TEXT NOT NULL, `isMainSave` INTEGER NOT NULL, `saveType` TEXT NOT NULL, `saveVersion` TEXT NOT NULL, `preview` TEXT NOT NULL, PRIMARY KEY(`saveId`))",
"fields": [
{
"fieldPath": "saveId",
"columnName": "saveId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "gameId",
"columnName": "gameId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "gameState",
"columnName": "gameState",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "storyProgress",
"columnName": "storyProgress",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "saveTime",
"columnName": "saveTime",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "saveName",
"columnName": "saveName",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isMainSave",
"columnName": "isMainSave",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "saveType",
"columnName": "saveType",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "saveVersion",
"columnName": "saveVersion",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "preview",
"columnName": "preview",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"saveId"
]
},
"indices": [
{
"name": "index_game_saves_isMainSave",
"unique": false,
"columnNames": [
"isMainSave"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_game_saves_isMainSave` ON `${TABLE_NAME}` (`isMainSave`)"
},
{
"name": "index_game_saves_saveTime",
"unique": false,
"columnNames": [
"saveTime"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_game_saves_saveTime` ON `${TABLE_NAME}` (`saveTime`)"
},
{
"name": "index_game_saves_gameId",
"unique": false,
"columnNames": [
"gameId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_game_saves_gameId` ON `${TABLE_NAME}` (`gameId`)"
}
],
"foreignKeys": []
},
{
"tableName": "branch_saves",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`branchId` TEXT NOT NULL, `parentSaveId` TEXT NOT NULL, `gameState` TEXT NOT NULL, `storyProgress` TEXT NOT NULL, `nodeId` TEXT NOT NULL, `branchPoint` TEXT NOT NULL, `createTime` INTEGER NOT NULL, `description` TEXT NOT NULL, `isUserCreated` INTEGER NOT NULL, PRIMARY KEY(`branchId`))",
"fields": [
{
"fieldPath": "branchId",
"columnName": "branchId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "parentSaveId",
"columnName": "parentSaveId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "gameState",
"columnName": "gameState",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "storyProgress",
"columnName": "storyProgress",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "nodeId",
"columnName": "nodeId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "branchPoint",
"columnName": "branchPoint",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "createTime",
"columnName": "createTime",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "description",
"columnName": "description",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isUserCreated",
"columnName": "isUserCreated",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"branchId"
]
},
"indices": [
{
"name": "index_branch_saves_parentSaveId",
"unique": false,
"columnNames": [
"parentSaveId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_branch_saves_parentSaveId` ON `${TABLE_NAME}` (`parentSaveId`)"
},
{
"name": "index_branch_saves_createTime",
"unique": false,
"columnNames": [
"createTime"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_branch_saves_createTime` ON `${TABLE_NAME}` (`createTime`)"
},
{
"name": "index_branch_saves_nodeId",
"unique": false,
"columnNames": [
"nodeId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_branch_saves_nodeId` ON `${TABLE_NAME}` (`nodeId`)"
}
],
"foreignKeys": []
},
{
"tableName": "dialogue_history",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `gameId` TEXT NOT NULL, `nodeId` TEXT NOT NULL, `content` TEXT NOT NULL, `choiceText` TEXT, `timestamp` INTEGER NOT NULL, `characterStatus` TEXT NOT NULL, `dayNumber` INTEGER NOT NULL, `isPlayerChoice` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "gameId",
"columnName": "gameId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "nodeId",
"columnName": "nodeId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "choiceText",
"columnName": "choiceText",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "timestamp",
"columnName": "timestamp",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "characterStatus",
"columnName": "characterStatus",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "dayNumber",
"columnName": "dayNumber",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isPlayerChoice",
"columnName": "isPlayerChoice",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_dialogue_history_gameId",
"unique": false,
"columnNames": [
"gameId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_dialogue_history_gameId` ON `${TABLE_NAME}` (`gameId`)"
}
],
"foreignKeys": []
},
{
"tableName": "story_nodes",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `type` TEXT NOT NULL, `title` TEXT NOT NULL, `content` TEXT NOT NULL, `imageResource` TEXT NOT NULL, `choices` TEXT NOT NULL, `isKeyPoint` INTEGER NOT NULL, `musicTrack` TEXT, `requirements` TEXT NOT NULL, `effects` TEXT NOT NULL, `tags` TEXT NOT NULL, `isAIGenerated` INTEGER NOT NULL, `createdTime` INTEGER NOT NULL, `lastUsedTime` INTEGER, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "imageResource",
"columnName": "imageResource",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "choices",
"columnName": "choices",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isKeyPoint",
"columnName": "isKeyPoint",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "musicTrack",
"columnName": "musicTrack",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "requirements",
"columnName": "requirements",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "effects",
"columnName": "effects",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "tags",
"columnName": "tags",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isAIGenerated",
"columnName": "isAIGenerated",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "createdTime",
"columnName": "createdTime",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastUsedTime",
"columnName": "lastUsedTime",
"affinity": "INTEGER",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_story_nodes_type",
"unique": false,
"columnNames": [
"type"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_story_nodes_type` ON `${TABLE_NAME}` (`type`)"
},
{
"name": "index_story_nodes_isKeyPoint",
"unique": false,
"columnNames": [
"isKeyPoint"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_story_nodes_isKeyPoint` ON `${TABLE_NAME}` (`isKeyPoint`)"
},
{
"name": "index_story_nodes_tags",
"unique": false,
"columnNames": [
"tags"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_story_nodes_tags` ON `${TABLE_NAME}` (`tags`)"
}
],
"foreignKeys": []
},
{
"tableName": "game_settings",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `settings` TEXT NOT NULL, `lastModified` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "settings",
"columnName": "settings",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastModified",
"columnName": "lastModified",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "ai_generation_history",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`requestId` TEXT NOT NULL, `request` TEXT NOT NULL, `response` TEXT NOT NULL, `usedInGame` INTEGER NOT NULL, `userRatingJson` TEXT, `timestamp` INTEGER NOT NULL, PRIMARY KEY(`requestId`))",
"fields": [
{
"fieldPath": "requestId",
"columnName": "requestId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "request",
"columnName": "request",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "response",
"columnName": "response",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "usedInGame",
"columnName": "usedInGame",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "userRatingJson",
"columnName": "userRatingJson",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "timestamp",
"columnName": "timestamp",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"requestId"
]
},
"indices": [
{
"name": "index_ai_generation_history_timestamp",
"unique": false,
"columnNames": [
"timestamp"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_ai_generation_history_timestamp` ON `${TABLE_NAME}` (`timestamp`)"
},
{
"name": "index_ai_generation_history_usedInGame",
"unique": false,
"columnNames": [
"usedInGame"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_ai_generation_history_usedInGame` ON `${TABLE_NAME}` (`usedInGame`)"
},
{
"name": "index_ai_generation_history_requestId",
"unique": false,
"columnNames": [
"requestId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_ai_generation_history_requestId` ON `${TABLE_NAME}` (`requestId`)"
}
],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '2d343b59e35035dacc0fb14bd84f5a3a')"
]
}
}