diff --git a/lib/sixflags/sixflagsbase.js b/lib/sixflags/sixflagsbase.js index 37cb8af0..4c461908 100644 --- a/lib/sixflags/sixflagsbase.js +++ b/lib/sixflags/sixflagsbase.js @@ -58,8 +58,23 @@ class SixFlagsPark extends Park { // loop over rides rideData.rideStatuses.forEach((ride) => { if (rideNames[ride.rideId]) { + let rideWaitTime = undefined; + let rideStatus; + if (ride.status === 'AttractionStatusOpen') { + rideStatus = 'Operating'; + rideWaitTime = parseInt(ride.waitTime, 10) || 0; + } else if (ride.status === 'AttractionStatusClosed') { + rideStatus = 'Closed'; + } else if (ride.status === 'AttractionStatusTemporarilyClosed') { + rideStatus = 'Down'; + } else { + this.Log('Unknown ride status for SixFlags park', ride.status); + rideStatus = 'Down'; + } + this.UpdateRide(ride.rideId, { - waitTime: (ride.status === 'AttractionStatusOpen' ? (parseInt(ride.waitTime, 10) || -1) : -1), + status: rideStatus, + waitTime: rideWaitTime, name: rideNames[ride.rideId], }); }