跳轉到

歷史記錄 · 2026-05-23

月份索引歷史記錄

重大重構里程碑

2026-05-23 ─ 材質表細部清理(命名統一 + susceptibility 型別 + 熱階層調整 + 第二輪 9 項細項)

決策檔:D-20260523-01

動機:A2 磁性 schema 合併後的完整審計,找出文件內命名不一致 + TS 型別語意不對稱 + 部分 thermal_limit 數值偏離遊戲設計意圖;第二輪審計(同日)再找出 9 項細項問題。

第一輪變動

變動 細節
「fluid 分類」去掉 "special" 修飾語 is_special_fluidis_fluid、"special-fluid" 分類名 → "fluid";理由:系統內 5 種真液體(water/oil/freezing_fluid/lava/acid)就是 fluid 全集,water_surface/mud 是地表非 sensor,"special" 不區分任何東西;跨 5 spec 同步(材質表 / 算式表 / UGC機制 / 零件與場景 / 遊戲機制)
命名分層註記 §1 加「命名分層」段:程式(materials.tsid)/ 規格(id+name)/ UI(i18n)三層分工;§11 補「name / desc 不存於 const」
magnetic_susceptibility 型別 numbernumber \| null;與其他物理欄位的 null 慣例對稱;materials.ts 載入時雙向 assert(passive ↔ non-null、source/none ↔ null)
算式表 §5.2 null guard 公式僅對 role === 'passive' 套用;其他 role 直接 force = 0,不觸碰 null 欄位
carbon thermal_limit 調整 1500°C → 1000°C;desc「頂級耐熱」→「高溫穩定」;與 titanium 並列次頂級耐熱(ceramic 獨占 1500°C 王座)
magnesium desc 補註 加「易過熱」確立鎂火災風險定位(thermal_limit 350°C 仍維持)

第二輪變動(A–I 9 項)

ID 變動 細節
A §8.2「車輛部件磁源」改寫為 fallback 防護 確認設計意圖:車輛部件故意無可用 source 材質(magnet_floor 為 vehicle forbidden);§8.2 row 3 改寫為「異常情境的 runtime 防呆備援」而非「正常使用路徑」
B 全域命名統一往 TS 全名 §1 / §2 / §7 / §9 / §10 + 跨 4 檔(建模參數表 / UGC機制 / 算式表 / 遊戲機制):yieldyield_strength / ultimateultimate_strength / kthermal_conductivity / cspecific_heat / rolling_resistrolling_resistance / thermal_limit_celsiusthermal_limit(去掉 _celsius 後綴對齊 density/friction 等無單位後綴風格)/ auto_thermal_limit_celsiusauto_thermal_limit / ambient_temp_celsiusambient_temp(場地環境溫度同步去後綴);算式表 §6 thermal_limit_eff runtime 變數改為直接讀 part.auto_thermal_limit(對齊 D 的 pre-bake 邏輯)
C §6 規則 4「水包塑膠」精確定義 「fluid sub-mesh 為 part AABB 最外緣」→「6 cardinal 方向投影:≥ 1 個方向上 fluid 是最外層(誤差 < 0.5mm)」
D §7 thermal_limit pre-bake 邏輯明文化 確認設計:pre-bake 取 weakest non-null sub-mesh(忽略 null;全 null 則整體 null)→ 寫入 auto_thermal_limit;runtime 直接讀 part-level 值,不再 sub-mesh 級別重算;§10.2 row 4 對齊改為「part auto_thermal_limit 為 null」
E §10.1 row 4 visual_only 釐清 「任意 + visual_only」→「場景 entity + visual_only」;確認車內部件不會出現此設定
F magnet_floor restitution 統一 0.10 → 0.15(與 steel 一致;磁吸效果由 §8 公式處理,不靠 restitution)
G copper desc 移除誤導括弧 「高密度、超佳散熱(馬達線圈包覆)」→「高密度、超佳散熱」;理由:copper 是全用途 vehicle-friendly,括弧暗示誤導為 motor-only,且遊戲簡化馬達無線圈概念
H velocity_decay 改名 + 單位明示 velocity_decay: 0.7velocity_decay_per_sec: 0.7;§3 sticky desc 補「velocity *= velocity_decay_per_sec^dt(每秒連續衰減)」與 temperature_delta_per_sec 風格對齊
I §11 補材質生命週期 PR 流程 重組為 §11.1 變更場景與升版規則表(新增 / 改物理數值 / 改 desc/name / 改 id / 刪除材質)+ §11.2 通用原則;明示「id 一旦發布即 immutable,禁止直接 rename」鐵則

熱階層(調整後)

Tier thermal_limit 材質
頂級 1500 ceramic
次頂級 1000 titanium / carbon
800 steel / glass_fiber
350–500 magnesium / aluminum / copper
80–200 abs / pe / pc / wood / silicone / rubber

A3 設計依據(採 number \| null 而非 number 預設 0)

  • 與其他物理欄位的 null 慣例對稱(不適用 = null,全 spec 統一)
  • 型別系統強制 role narrow(TS 必須先檢 role,避免靜默乘 0 隱藏 bug)
  • Load-time 雙向 assert:role=passive ↔ susceptibility !== null;違反即 throw
  • 「0 fallback」的反面:role=source + susceptibility=0.5 的 malformed 資料能靜默通過驗證,但 null 會被 load-time assert 立刻擋下