Hook factorisation ; add new hooks : default (same comportement has previous version) and one hook before any parsing
When calling a hook, passed parameters change according to associated data variable
This commit is contained in:
parent
9ec07790ef
commit
7e20368c10
8 changed files with 109 additions and 63 deletions
|
|
@ -16,19 +16,19 @@ temps = dict ()
|
|||
|
||||
SCORES = None
|
||||
|
||||
def load():
|
||||
global DATAS, SCORES, CONF
|
||||
DATAS.setIndex("name", "player")
|
||||
SCORES = QDWrapper.QDWrapper(DATAS)
|
||||
GameUpdater.SCORES = SCORES
|
||||
GameUpdater.CONF = CONF
|
||||
GameUpdater.save = save
|
||||
GameUpdater.getUser = getUser
|
||||
def load(context):
|
||||
global DATAS, SCORES, CONF
|
||||
DATAS.setIndex("name", "player")
|
||||
SCORES = QDWrapper.QDWrapper(DATAS)
|
||||
GameUpdater.SCORES = SCORES
|
||||
GameUpdater.CONF = CONF
|
||||
GameUpdater.save = save
|
||||
GameUpdater.getUser = getUser
|
||||
|
||||
def reload():
|
||||
imp.reload(GameUpdater)
|
||||
imp.reload(QDWrapper)
|
||||
imp.reload(Score)
|
||||
imp.reload(GameUpdater)
|
||||
imp.reload(QDWrapper)
|
||||
imp.reload(Score)
|
||||
|
||||
|
||||
def help_tiny ():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue