feat: SodiumPet 小钠桌宠 v0.1.0(Live2D 桌宠 / 经济任务 / 音乐 / 成就 / 编辑器 / MOD)

This commit is contained in:
Tian_XiaRi
2026-12-01 16:41:07 +08:00
commit d25e726ef7
261 changed files with 33676 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
const fs = require('fs')
const p = 'C:/Users/ASUS/Documents/deepseek-harness/default-workspace/desktop-pet/src/shared/petState.ts'
let c = fs.readFileSync(p, 'utf8')
// 物品 emoji 图标(插入到每个物品对象的 name 前)
const icons = {
bread: '🍞',
riceball: '🍙',
bento: '🍱',
noodle: '🍜',
cake: '🍰',
chicken: '🍗',
soda: '🥤',
chalcanthite: '💎',
salt: '🧂',
oil: '🛢️',
oil_plus: '⚗️',
saline: '🧴',
coffee: '☕',
milktea: '🧋',
sodapop: '🥤',
fakeacid: '🧊',
alcohol: '🍶',
sandpaper: '🧽',
vitc: '💊',
ultrasonic: '🫧',
filter: '📄',
cuso4: '🔷',
litmus: '🔖',
tube: '🧪',
beaker: '🥛',
flask: '🏺',
cylinder: '📏',
lamp: '🔥',
stand: '🗄️',
condenser: '🌀',
crucible: '🥣',
funnel: '⏳',
book1: '📗',
book2: '📘',
book3: '📙',
book4: '📕',
book5: '📚',
book6: '📖',
book7: '🧠',
notebook: '📓',
bookmark: '🍂',
cucrystal: '🟦',
chlorine: '🧴',
cobaltglass: '🟪',
benzene: '💠',
copperwire: '🧵',
pencil: '✏️',
note: '📝',
flamepin: '🎇'
}
let count = 0
c = c.replace(/\{ id: '([a-z0-9_]+)', name: '/g, (m, id) => {
const icon = icons[id]
if (!icon) return m
count++
return `{ id: '${id}', icon: '${icon}', name: '`
})
console.log('items with icons:', count)
// Item 接口加 icon + descNormal
c = c.replace(
`export interface Item {
id: string
name: string`,
`export interface Item {
id: string
/** 列表前的 emoji 图标 */
icon?: string
name: string`
)
fs.writeFileSync(p, c, 'utf8')
console.log('icons patched')