// ==UserScript== // @name 进化(Evolve)辅助工具 // @namespace http://tampermonkey.net/ // @version 0.1.3 // @description 可修改指定资源,一键补满资源 // @author You Boy // @match https://g8hh.github.io/evolve/ // @match https://pmotschmann.github.io/Evolve/ // @grant none // @license MIT // @downloadURL https://update.greasyfork.icu/scripts/538549/%E8%BF%9B%E5%8C%96%EF%BC%88Evolve%EF%BC%89%E8%BE%85%E5%8A%A9%E5%B7%A5%E5%85%B7.user.js // @updateURL https://update.greasyfork.icu/scripts/538549/%E8%BF%9B%E5%8C%96%EF%BC%88Evolve%EF%BC%89%E8%BE%85%E5%8A%A9%E5%B7%A5%E5%85%B7.meta.js // ==/UserScript== const EvolveStyles = ` .topBar .version { margin-right: 0; } .modify-icon { padding: 0 12px; } .modify-icon+.modify-icon { padding-left: 0; } .modify-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8); padding: 20px; border-radius: 8px; z-index: 2000; box-shadow: 0 0 1rem #000; background: #fff; opacity: 0; } .modify-dialog.show { opacity: 1; transform: translate(-50%, -50%) scale(1); } .modify-dialog .msgInputApply { margin-top: 1rem; } .modify-dialog .resource-list{ max-height: 80vh; overflow-y: auto; } .modify-dialog .resources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; } .modify-dialog .resource-item { display: flex; align-items: center; gap: 10px; justify-content: flex-end; } .modify-dialog .resource-item label { width: 150px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .modify-dialog .resource-item input { width: 120px; padding: 5px; border: 1px solid #ccc; border-radius: 4px; } .modify-dialog .section-group { margin-bottom: 20px; position: relative; } .modify-dialog .section-group h3 { margin: 10px 0; padding-bottom: 5px; border-bottom: 1px solid #ccc; } .modify-dialog .section-group .resources-batch-edit { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 10px; visibility: hidden; } .modify-dialog .section-group .resources-batch-edit input { width: 80px; } .modify-dialog .section-group:hover .resources-batch-edit { visibility: visible; } .resources-batch-edit[data-section=arpa], .resources-batch-edit[data-section=prestige] { display: none !important; /* ARPA和威望资源不显示批量修改 */ } `; // 中文翻译 const translateCN = { city: { food: "收集食物", lumber: "收集木材", stone: "收集石头", basic_housing: "小木屋", cottage: "茅屋", apartment: "公寓", lodge: "小屋", compost: "堆肥箱", bank: "银行", silo: "粮仓", farm: "农场", tourist_center: "游客中心", amphitheatre: "圆形剧场", casino: "赌场", temple: "寺庙", banquet: "宴会厅", university: "大学", library: "图书馆", wardenclyffe: "沃登克里弗塔", biolab: "生命科学实验室", garrison: "军营", hospital: "医院", boot_camp: "新兵训练营", shed: "仓库", storage_yard: "货场", warehouse: "集装箱港口", oil_depot: "燃料库", trade: "贸易站", wharf: "码头", lumber_yard: "伐木场", sawmill: "锯木厂", rock_quarry: "采石场", cement_plant: "水泥厂", foundry: "铸造厂", factory: "工厂", smelter: "冶炼厂", metal_refinery: "金属精炼厂", mine: "矿井", coal_mine: "煤矿", oil_well: "石油井架", windmill: "风车", coal_power: "煤电厂", oil_power: "石油发电厂", fission_power: "裂变反应堆", mass_driver: "质量驱动器", mill: "磨坊", pylon: "水晶塔", }, space: { satellite: "人造卫星", gps: "GPS卫星", propellant_depot: "推进剂库", nav_beacon: "导航灯塔", moon_base: "月球基地", iridium_mine: "铱矿", helium_mine: "氦-3矿", observatory: "月球观测站", spaceport: "太空港", red_tower: "太空控制塔", living_quarters: "生活区", vr_center: "VR中心", garage: "格纳库", red_mine: "矿井", fabrication: "行星铸造厂", red_factory: "工厂", biodome: "生物穹顶", exotic_lab: "外星材料实验室", ziggurat: "通灵塔", space_barracks: "太空驻军", geothermal: "地热发电厂", swarm_plant: "蜂群工厂", swarm_control: "蜂群卫星控制站", swarm_satellite: "蜂群卫星", gas_mining: "氦-3收集器", gas_storage: "星系燃料库", star_dock: "星际船坞", outpost: "采矿前哨", drone: "采矿无人机", oil_extractor: "石油提取器", space_station: "深空采矿站", elerium_ship: "超铀采矿船", iridium_ship: "铱采矿船", iron_ship: "铁采矿船", elerium_contain: "超铀存储", e_reactor: "超铀反应堆", world_controller: "世界对撞机" }, interstellar: { starport: "星际港口", habitat: "定居点", mining_droid: "采矿机器人", processing: "精金加工设施", fusion: "聚变反应堆", laboratory: "深空实验室", exchange: "星际交易所", g_factory: "石墨烯厂", int_factory: "大型工厂", luxury_condo: "豪华公寓", zoo: "异族动物园", warehouse: "仓库", xfer_station: "星际转运站", cargo_yard: "星际货仓", cruiser: "巡逻艇", orichalcum_sphere: "戴森球", dyson: "戴森球", nexus: "星际枢纽站", harvester: "气体收集器", elerium_prospector: "超铀开采器", neutron_miner: "中子矿船", citadel: "AI中枢要塞", stellar_forge: "恒星熔炉", far_reach: "遥远星际", stellar_engine: "恒星引擎", mass_ejector: "质量喷射器", s_gate: "星际之门", ascension_trigger: "飞升装置", ascend: "飞升", thermal_collector: "集热器" }, galaxy: { starbase: "星门要塞", ship_dock: "星门船坞", bolognium_ship: "钋采矿船", scout_ship: "侦察舰", corvette_ship: "小型护卫舰", frigate_ship: "大型护卫舰", cruiser_ship: "巡洋舰", dreadnought: "无畏舰", gateway_station: "星门中转站", telemetry_beacon: "遥测信标", gateway_depot: "贮藏所", defense_platform: "防御平台", embassy: "大使馆", dormitory: "住宅区", symposium: "联谊会", freighter: "星际货轮", consulate: "领事馆", resort: "度假区", vitreloy_plant: "金属玻璃工厂", super_freighter: "超级星际货轮", foothold: "武装据点", armed_miner: "武装矿船", ore_processor: "矿石处理装置", scavenger: "科技清道夫", minelayer: "布雷艇", excavator: "挖掘机", raider: "掠夺者" }, portal: { turret: "等离子炮塔", carport: "勘探车", war_droid: "战斗机器人", repair_droid: "修理机器人", war_drone: "掠食者无人机", sensor_drone: "探测无人机", attractor: "吸引器信标", soul_forge: "灵魂锻炉", gun_emplacement: "自动炮台", soul_attractor: "灵魂引渡器", guard_post: "岗哨", archaeology: "考古发掘场", arcology: "生态建筑", hell_forge: "地狱熔炉", inferno_power: "地狱反应堆", ancient_pillars: "永恒立柱", west_tower: "西侧巨塔", east_tower: "东侧巨塔", gate_turret: "远古之门炮塔", infernite_mine: "地狱石矿井", harbor: "血湖港口", cooling_tower: "冷却塔", bireme: "双层排桨军舰", transport: "运输船", purifier: "空气净化器", port: "登陆点", base_camp: "登陆营地", bridge: "尖塔之桥", sphinx: "斯芬克斯", mechbay: "机甲舱", spire: "尖塔" }, arpa: { _label: "A.R.P.A.", lhc: "超级对撞机", stock_exchange: "证券交易所", monument: "雕塑", railway: "铁路", roid_eject: "恒星碎片变轨", }, prestige: { _label: "威望资源", Plasmid: "质粒", Phage: "噬菌体", Harmony: "和谐水晶", Blood_Stone: "鲜血之石", Artifact: "上古遗物", Dark: "暗能量", AntiPlasmid: "反质粒", AICore: "AI核心", Supercoiled: "超螺旋质粒", }, }; (function ($) { 'use strict'; class EvolveModifier { constructor() { this.setup(); this.evolveImportBtn = null; this.evolveExporttBtn = null; this.saveDataJson = null; } /** * 添加修改器样式 */ addStyles() { if ($('#modify-style').length) { $('#modify-style').remove(); } $('