Henry_Du e9819d4894 fix(multiplayer): normalize CRN BlockReader NBT structure with unwrapNbtObject helper to handle SP vs MP differences (single-player wraps every nested object as { [1] = obj } one-element arrays, while multiplayer uses direct maps without [1] wrapper)
- New unwrapNbtObject(obj): detects whether the table actually has a [1] wrapper AND outer table has exactly 1 key AND the inner [1] is useful, then returns inner object; otherwise returns obj unchanged - works transparently for both SP and MP structures
- Replace ALL hard-coded [1] dereferences in BlockReader parsing:
  - stop.Station -> unwrapNbtObject(stop.Station)
  - st.RealTimeStation -> unwrapNbtObject(st.RealTimeStation)
  - st.ScheduledStation -> unwrapNbtObject(st.ScheduledStation)
  - rtStation.StationInfo -> unwrapNbtObject(rtStation.StationInfo)
  - schStation.StationInfo -> unwrapNbtObject(schStation.StationInfo)
  - stop.Train -> unwrapNbtObject(stop.Train)
  - stop.Stopovers[i] entries: deep-unwrap if table, try StationName/Name fields to get string destination from potential NBT compound stopovers
  - tr.Status entries: unwrap each element before reading as string
- This eliminates the MP-only failure where st=nil (because SP-style Station[1] didn't exist) causing the whole TrainStop loop to skip inserting anything into newUpcoming and render UPCOMING as ???

Bump to v1.0.76
2026-08-16 14:35:18 +08:00
2026-08-15 23:13:10 +08:00
S
Description
No description provided
123 MiB
Languages
HTML 49.3%
JavaScript 25.5%
Lua 25.2%