File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1395,7 +1395,7 @@ export const MOON_CONFIG = {
13951395 maxChance : 20 , // 最大20%概率(需要2M残骸)
13961396 chancePerDebris : 100000 , // 每10万资源增加1%概率
13971397 baseFields : 1 , // 月球初始空间(OGame规则:初始只有1格)
1398- lunarBaseFieldsBonus : 3 , // 每级月球基地增加的空间(每级+3格,占用1格,净增2格)
1398+ lunarBaseFieldsBonus : 30 , // 每级月球基地增加的空间(每级+3格,占用1格,净增2格)
13991399 minDiameter : 3476 , // 最小月球直径(km),1%概率时
14001400 maxDiameter : 8944 , // 最大月球直径(km),20%概率时保证>8000km
14011401 baseDiameter : 3000 , // 基础直径(km)
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ export const createMoon = (
237237
238238/**
239239 * 计算月球空间上限
240- * OGame规则:月球初始1格,月球基地每级+3格(但月球基地本身占用1格,净增2格)
240+ * OGame规则:月球初始1格,月球基地每级+30格
241241 */
242242export const calculateMoonMaxSpace = ( moon : Planet ) : number => {
243243 if ( ! moon . isMoon ) return 0
Original file line number Diff line number Diff line change 389389 import { saveAs } from ' file-saver'
390390 import { toast } from ' vue-sonner'
391391 import { Capacitor } from ' @capacitor/core'
392+ import { decryptData , encryptData } from ' @/utils/crypto'
392393 import { Filesystem , Directory , Encoding } from ' @capacitor/filesystem'
393394 import pkg from ' ../../package.json'
394395 import { checkLatestVersion , canCheckVersion } from ' @/utils/versionCheck'
649650 if (typeof result === ' string' ) {
650651 const importData = JSON .parse (result )
651652
653+ if (importData .data ) {
654+ const data = decryptData (importData .data )
655+ localStorage .setItem (pkg .name , encryptData (data .game ))
656+ localStorage .setItem (` ${pkg .name }-universe ` , encryptData (data .universe ))
657+ localStorage .setItem (` ${pkg .name }-npcs ` , encryptData (data .npcs ))
658+ setTimeout (() => window .location .reload (), 1000 )
659+ return
660+ }
661+
652662 // 兼容旧版本:如果是旧格式(直接是字符串),只导入游戏数据
653663 if (typeof importData === ' string' || ! importData .game ) {
654664 localStorage .setItem (pkg .name , result )
You can’t perform that action at this time.
0 commit comments