manager.py 文件源码

python
阅读 44 收藏 0 点赞 0 评论 0

项目:PyPlanet 作者: PyPlanet 项目源码 文件源码
def load_matchsettings(self, filename):
        """
        Load Match Settings file and insert it into the current map playlist.

        :param filename: File to load, relative to Maps folder.
        :return: Boolean if loaded.
        """
        try:
            if not await self._instance.storage.driver.exists(
                os.path.join(self._instance.storage.MAP_FOLDER, filename)
            ):
                raise MapException('Can\'t find match settings file. Does it exist?')
            else:
                self._instance.gbx('LoadMatchSettings', filename)
        except Exception as e:
            logging.warning('Can\'t load match settings!')
            raise MapException('Can\'t load matchsettings according the dedicated server, tried loading from \'{}\'!'.format(filename)) from e
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号