feat: 新增Android平台支持及构建流程

集成Android平台相关目录与配置文件,包含Gradle构建脚本、资源文件、启动图标、Java入口、Proguard规则等,完善.gitignore以排除Android构建产物。更新CI流程,支持自动构建并发布Android APK。移除README中项目结构说明,简化文档。
This commit is contained in:
谦君
2025-12-20 00:48:36 +08:00
parent 20fb2bb6a4
commit 1368bb4445
97 changed files with 7859 additions and 335 deletions

View File

@@ -176,6 +176,7 @@
import { formatNumber, formatTime, formatDate, getResourceCostColor } from '@/utils/format'
import * as officerLogic from '@/logic/officerLogic'
import * as resourceLogic from '@/logic/resourceLogic'
import * as gameLogic from '@/logic/gameLogic'
import { useI18n } from '@/composables/useI18n'
import { useGameConfig } from '@/composables/useGameConfig'
@@ -250,6 +251,8 @@
if (!resourceLogic.checkResourcesAvailable(gameStore.currentPlanet.resources, cost)) {
return false
}
// 追踪资源消耗(在扣除前)
gameLogic.trackResourceConsumption(gameStore.player, cost)
resourceLogic.deductResources(gameStore.currentPlanet.resources, cost)
gameStore.player.officers[officerType] = officerLogic.createActiveOfficer(officerType, duration)
return true
@@ -276,6 +279,8 @@
if (!resourceLogic.checkResourcesAvailable(gameStore.currentPlanet.resources, cost)) {
return false
}
// 追踪资源消耗(在扣除前)
gameLogic.trackResourceConsumption(gameStore.player, cost)
resourceLogic.deductResources(gameStore.currentPlanet.resources, cost)
const now = Date.now()
gameStore.player.officers[officerType] = officerLogic.renewOfficerExpiration(gameStore.player.officers[officerType], duration, now)