mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-07-11 00:12:39 +08:00
refactor: 简化生成 ID 函数并改进类型安全
- 移除 generateId 函数的 timestamp 参数,改为在函数内部获取当前时间戳 - 在 DiplomacyView 中为 NPC 排序添加类型定义和 exhaustive 检查 - 在 GMView 中为预设管理添加更精确的类型映射 - 重构 migration 工具函数,提取辅助函数并改进类型定义
This commit is contained in:
@@ -62,7 +62,7 @@ export const createFleetMission = (
|
||||
): FleetMission => {
|
||||
const now = Date.now()
|
||||
return {
|
||||
id: generateId('mission', now),
|
||||
id: generateId('mission'),
|
||||
playerId,
|
||||
originPlanetId,
|
||||
// 深拷贝targetPosition,避免多个任务共享同一个引用
|
||||
|
||||
Reference in New Issue
Block a user