UNPKG

sc4

Version:

A command line utility for automating SimCity 4 modding tasks & modifying savegames

31 lines (30 loc) 705 B
// # NetworkCrossing // Small helper class that is used within the various network subfiles. export default class NetworkCrossing { type = 0x00; west = 0x00; north = 0x00; east = 0x00; south = 0x00; constructor(opts) { if (opts) { Object.assign(this, opts); } } parse(rs) { this.type = rs.byte(); this.west = rs.byte(); this.north = rs.byte(); this.east = rs.byte(); this.south = rs.byte(); return this; } write(ws) { ws.byte(this.type); ws.byte(this.west); ws.byte(this.north); ws.byte(this.east); ws.byte(this.south); return this; } }