Beispiel #1
0
 def stop(self):
     if platform.system() == 'Windows':
         if inspect.stack()[1][1].split('\\')[-1] == 'Game.py':
             self.__speed = 0
             self.__speed_variation = 0
             self.__dir_variation = 0
         else:
             sys.tracebacklimit = 0
             print("YOU ARE TRYING TO CHEAT!")
             raise AuthorityExecption(
                 'Not allowed File %s is trying to \
                 change CarSprite.k_up at \'%s\'' %
                 (inspect.stack()[1][1].split('\\')[-1],
                  inspect.stack()[1][0]))
     else:
         if inspect.stack()[1][1].split('/')[-1] == 'Game.py':
             self.__speed = 0
             self.__speed_variation = 0
             self.__dir_variation = 0
         else:
             sys.tracebacklimit = 0
             print("YOU ARE TRYING TO CHEAT!")
             raise AuthorityExecption('Not allowed File %s is trying to \
                 change CarSprite.k_up at \'%s\'' %
                                      (inspect.stack()[1][1].split('/')[-1],
                                       inspect.stack()[1][0]))
Beispiel #2
0
 def data(self, new_data):
     if platform.system() == 'Windows':
         if inspect.stack()[1][1].split('\\')[-1] == 'Game.py':
             self.__data = new_data
         else:
             sys.tracebacklimit = 0
             raise AuthorityExecption(
                 'Not allowed File %s is trying to change LiDAR.data at \'%s\''
                 % (inspect.stack()[1][1].split('\\')[-1],
                    inspect.stack()[1][0]))
     else:
         if inspect.stack()[1][1].split('/')[-1] == 'Game.py':
             self.__data = new_data
         else:
             sys.tracebacklimit = 0
             raise AuthorityExecption(
                 'Not allowed File %s is trying to change LiDAR.data at \'%s\''
                 % (inspect.stack()[1][1].split('/')[-1],
                    inspect.stack()[1][0]))
 def MAX_REVERSE_SPEED(self, new_MAX_REVERSE_SPEED):
     if platform.system() == 'Windows':
         if inspect.stack()[1][1].split('\\')[-1] == 'Game.py':
             self.__MAX_REVERSE_SPEED = new_MAX_REVERSE_SPEED
         else:
             sys.tracebacklimit = 0
             print("YOU ARE TRYING TO CHEAT!")
             raise AuthorityExecption(
                 'Not allowed File %s is trying to change CarSprite.MAX_REVERSE_SPEED at \'%s\''
                 % (inspect.stack()[1][1].split('\\')[-1],
                    inspect.stack()[1][0]))
     else:
         if inspect.stack()[1][1].split('/')[-1] == 'Game.py':
             self.__MAX_REVERSE_SPEED = new_MAX_REVERSE_SPEED
         else:
             sys.tracebacklimit = 0
             print("YOU ARE TRYING TO CHEAT!")
             raise AuthorityExecption(
                 'Not allowed File %s is trying to change CarSprite.MAX_REVERSE_SPEED at \'%s\''
                 % (inspect.stack()[1][1].split('/')[-1],
                    inspect.stack()[1][0]))
Beispiel #4
0
 def k_left(self, new_k_left):
     if platform.system() == 'Windows':
         if inspect.stack()[1][1].split('\\')[-1] == 'Game.py':
             self.__k_left = new_k_left
         else:
             sys.tracebacklimit = 0
             print("YOU ARE TRYING TO CHEAT!")
             raise AuthorityExecption(
                 'Not allowed File %s is trying to \
                 change CarSprite.k_left at \'%s\'' %
                 (inspect.stack()[1][1].split('\\')[-1],
                  inspect.stack()[1][0]))
     else:
         if inspect.stack()[1][1].split('/')[-1] == 'Game.py':
             self.__k_left = new_k_left
         else:
             sys.tracebacklimit = 0
             print("YOU ARE TRYING TO CHEAT!")
             raise AuthorityExecption('Not allowed File %s is trying to \
                 change CarSprite.k_left at \'%s\'' %
                                      (inspect.stack()[1][1].split('/')[-1],
                                       inspect.stack()[1][0]))