Esempio n. 1
0
    def _make_attraction(self, ride):
        # Create dictionary with attraction information
        attraction = Ride()

        attraction.setName(ride['Name'])

        if not self.is_Open:
            attraction.setTime(0)
            attraction.setClosed()
            self.addRide(attraction)
            return

        if ride['WaitTime'] is None:
            attraction.setClosed()
        else:
            attraction.setOpen()

        if ride['WaitTime'] == -1:
            attraction.setClosed()
            attraction.setTime(-1)
            attraction.setStatus(ride['Status'])
        else:
            attraction.setTime(ride['WaitTime'])
            attraction.setStatus('Operating')

        self.addRide(attraction)
Esempio n. 2
0
    def _make_attraction(self, ride, meta):
        attraction = Ride()
        attraction.setName(meta['name'])
        attraction.setStatus(meta['status'])

        #Check if Park is Open
        if not self.is_Open:
            attraction.setTime(0)
            attraction.setClosed()
            attraction.set_skip_line(meta['isFlashPassEligible'])
            self.addRide(attraction)
            return

        if meta['status'] == 'AttractionStatusOpen':
            attraction.setOpen()
        else:
            attraction.setClosed()
        try:
            int(ride['waitTime'])
        except ValueError:
            ride['waitTime'] = ''.join(c for c in ride['waitTime']
                                       if c.isdigit())
        except TypeError:
            if ride['waitTime']: raise ValueError
            else: ride['waitTime'] = 0
        attraction.setTime(ride['waitTime'])
        attraction.set_skip_line(meta['isFlashPassEligible'])

        self.addRide(attraction)
Esempio n. 3
0
    def _make_attraction(self, ride):
        attraction = Ride()
        attraction.setName(ride['MblDisplayName'])

        if ride['WaitTime'] is None:
            attraction.setClosed()
        else:
            attraction.setOpen()

        if ride['WaitTime'] == -50:
            attraction.setTime(0)
            attraction.setStatus('No Times Left')
            attraction.setOpen()
        if ride['WaitTime'] == -9:
            attraction.setOpen()
            attraction.setTime(0)
            attraction.setStatus('Virtual Line Only')
        elif ride['WaitTime'] == -8:
            attraction.setClosed()
            attraction.setTime(-1)
            attraction.setStatus('Not Open Yet')
        elif ride['WaitTime'] == -7:
            attraction.setTime(0)
            attraction.setOpen()
        elif ride['WaitTime'] == -5:
            attraction.setClosed()
            attraction.setTime(-1)
            attraction.setStatus('Capacity')
        elif ride['WaitTime'] == -4:
            attraction.setClosed()
            attraction.setTime(-1)
            attraction.setStatus('Weather')
        elif ride['WaitTime'] < 0:
            attraction.setClosed()
            attraction.setTime(-1)
            attraction.setStatus('Closed')
        elif ride['WaitTime'] == 900:
            attraction.setClosed()
            attraction.setTime(-1)
            attraction.setStatus('Closed Temporarily')
        else:
            attraction.setTime(ride['WaitTime'])
            attraction.setStatus('Operating')
        attraction.set_skip_line(ride['VirtualLine'])

        self.addRide(attraction)