Ejemplo n.º 1
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]))
Ejemplo n.º 2
0
 def k_up(self, new_k_up):
     if platform.system() == 'Windows':
         if inspect.stack()[1][1].split('\\')[-1] == 'Game.py':
             self.__k_up = new_k_up
         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.__k_up = new_k_up
         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]))