本文整理汇总了Python中BEE2_config.GEN_OPTS.save_check方法的典型用法代码示例。如果您正苦于以下问题:Python GEN_OPTS.save_check方法的具体用法?Python GEN_OPTS.save_check怎么用?Python GEN_OPTS.save_check使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BEE2_config.GEN_OPTS
的用法示例。
在下文中一共展示了GEN_OPTS.save_check方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: clear_caches
# 需要导入模块: from BEE2_config import GEN_OPTS [as 别名]
# 或者: from BEE2_config.GEN_OPTS import save_check [as 别名]
def clear_caches():
"""Wipe the cache times in configs.
This will force package resources to be extracted again.
"""
import gameMan
import packageLoader
restart_ok = messagebox.askokcancel(
title='Allow Restart?',
message='Restart the BEE2 to re-extract packages?',
)
if not restart_ok:
return
for game in gameMan.all_games:
game.mod_time = 0
game.save()
GEN_OPTS['General']['cache_time'] = '0'
for pack_id in packageLoader.packages:
packageLoader.PACK_CONFIG[pack_id]['ModTime'] = '0'
save() # Save any option changes..
gameMan.CONFIG.save_check()
GEN_OPTS.save_check()
packageLoader.PACK_CONFIG.save_check()
utils.restart_app()
示例2: _send_msg
# 需要导入模块: from BEE2_config import GEN_OPTS [as 别名]
# 或者: from BEE2_config.GEN_OPTS import save_check [as 别名]
def _send_msg(self, command, *args):
"""Send a message to the daemon."""
_PIPE_MAIN_SEND.send((command, id(self), args))
# Check the messages coming back as well.
while _PIPE_MAIN_REC.poll():
command, arg = _PIPE_MAIN_REC.recv()
if command == 'main_set_compact':
# Save the compact state to the config.
GEN_OPTS['General']['compact_splash'] = '1' if arg else '0'
GEN_OPTS.save_check()
elif command == 'cancel':
# Mark this loadscreen as cancelled.
_SCREEN_CANCEL_FLAG[arg] = True
else:
raise ValueError('Bad command from daemon: ' + repr(command))
# If the flag was set for us, raise an exception - the loading thing
# will then stop.
if _SCREEN_CANCEL_FLAG[id(self)]:
_SCREEN_CANCEL_FLAG[id(self)] = False
LOGGER.info('User cancelled loading screen.')
raise Cancelled
示例3: quit_command
# 需要导入模块: from BEE2_config import GEN_OPTS [as 别名]
# 或者: from BEE2_config.GEN_OPTS import save_check [as 别名]
def quit_command():
from BEE2_config import GEN_OPTS
window.withdraw()
GEN_OPTS.save_check()