mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-07-11 00:12:39 +08:00
docs: 新增西班牙语和日语README并优化多语言文档
新增README-ES.md(西班牙语)和README-JA.md(日语)文档,完善多语言README互链。优化各语言README徽章、技术栈、外链格式及语言切换区,提升文档一致性与可读性。
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<!-- 遮罩从标题下方开始,不遮挡名称 -->
|
||||
<div
|
||||
v-if="!isUnlocked"
|
||||
class="absolute inset-x-0 top-30 sm:top-25 bottom-0 z-10 bg-background/70 backdrop-blur-[2px] rounded-b-lg flex items-center justify-center"
|
||||
class="absolute inset-x-0 top-20 sm:top-13 bottom-0 z-10 bg-background/70 backdrop-blur-[2px] rounded-b-lg flex items-center justify-center"
|
||||
>
|
||||
<div class="text-center p-4 space-y-2">
|
||||
<div class="flex justify-center">
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
import { ref, computed } from 'vue'
|
||||
import { useI18n } from '@/composables/useI18n'
|
||||
import { useGameStore } from '@/stores/gameStore'
|
||||
import type { BuildingType, TechnologyType, ShipType, DefenseType } from '@/types/game'
|
||||
import { BuildingType, TechnologyType, type ShipType, type DefenseType } from '@/types/game'
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
@@ -452,7 +452,7 @@
|
||||
import * as shipLogic from '@/logic/shipLogic'
|
||||
import * as oreDepositLogic from '@/logic/oreDepositLogic'
|
||||
import * as resourceLogic from '@/logic/resourceLogic'
|
||||
import { SHIPS, DEFENSES } from '@/config/gameConfig'
|
||||
import { SHIPS, DEFENSES, ORE_DEPOSIT_CONFIG } from '@/config/gameConfig'
|
||||
import { formatTime } from '@/utils/format'
|
||||
import { Progress } from '@/components/ui/progress'
|
||||
import ResourceIcon from '@/components/common/ResourceIcon.vue'
|
||||
@@ -576,11 +576,23 @@
|
||||
const deposits = currentPlanet.value.oreDeposits
|
||||
const resourceType = miningResourceType.value
|
||||
const remaining = deposits[resourceType]
|
||||
const initial =
|
||||
resourceType === 'metal' ? deposits.initialMetal : resourceType === 'crystal' ? deposits.initialCrystal : deposits.initialDeuterium
|
||||
const percentage = oreDepositLogic.getDepositPercentage(deposits, resourceType)
|
||||
const isWarning = oreDepositLogic.isDepositWarning(deposits, resourceType)
|
||||
const isDepleted = oreDepositLogic.isDepositDepleted(deposits, resourceType)
|
||||
|
||||
// 获取深层钻探设施等级(星球级)和采矿技术等级(全局)
|
||||
const deepDrillingLevel = currentPlanet.value.buildings[BuildingType.DeepDrillingFacility] || 0
|
||||
const miningTechLevel = gameStore.player?.technologies?.[TechnologyType.MiningTechnology] || 0
|
||||
|
||||
// 使用增强版计算函数获取带加成的储量上限
|
||||
const enhancedDeposits = oreDepositLogic.calculateEnhancedDeposits(
|
||||
deposits.position,
|
||||
deepDrillingLevel,
|
||||
miningTechLevel
|
||||
)
|
||||
const initial = enhancedDeposits[resourceType]
|
||||
|
||||
// 百分比基于增强后的上限计算
|
||||
const percentage = initial > 0 ? (remaining / initial) * 100 : 0
|
||||
const isWarning = percentage < ORE_DEPOSIT_CONFIG.WARNING_THRESHOLD * 100 && percentage > 0
|
||||
const isDepleted = remaining <= 0
|
||||
|
||||
// 计算当前产量(每小时)
|
||||
const production = resourceLogic.calculateResourceProduction(currentPlanet.value, {
|
||||
@@ -591,7 +603,7 @@
|
||||
const productionPerHour = production[resourceType]
|
||||
|
||||
// 计算耗尽时间
|
||||
const depletionTimeHours = oreDepositLogic.calculateDepletionTime(deposits, resourceType, productionPerHour)
|
||||
const depletionTimeHours = productionPerHour > 0 ? remaining / productionPerHour : Infinity
|
||||
const depletionTimeFormatted = oreDepositLogic.formatDepletionTime(depletionTimeHours)
|
||||
|
||||
return {
|
||||
@@ -601,7 +613,10 @@
|
||||
isWarning,
|
||||
isDepleted,
|
||||
productionPerHour,
|
||||
depletionTimeFormatted
|
||||
depletionTimeFormatted,
|
||||
bonusMultiplier: enhancedDeposits.bonusMultiplier,
|
||||
deepDrillingLevel,
|
||||
miningTechLevel
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<Popover>
|
||||
<PopoverTrigger as-child>
|
||||
<span class="cursor-pointer underline decoration-dotted underline-offset-4 touch-manipulation">{{ formatNumber(value, 1) }}</span>
|
||||
<span class="cursor-pointer touch-manipulation" :class="value >= 1000 ? 'underline decoration-dotted underline-offset-4 ' : ''">
|
||||
{{ formatNumber(value, 1) }}
|
||||
</span>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent class="w-auto p-2 z-100" side="top" align="center">
|
||||
<p class="font-mono text-sm">{{ props.value.toLocaleString() }}</p>
|
||||
|
||||
Reference in New Issue
Block a user