Stop sending message with character's feature and save it into localStorage instead
This commit is contained in:
parent
a418ccedac
commit
0973655f7e
1 changed files with 4 additions and 4 deletions
|
@ -92,10 +92,10 @@ function Automaton(async, dom, messaging, screen, session, ui) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function newGame() {
|
function newGame() {
|
||||||
var message = { tag: 'Initialize' };
|
var character = {};
|
||||||
var set = function(key) {
|
var set = function(key) {
|
||||||
return function(value) {
|
return function(value) {
|
||||||
message[key] = value;
|
character[key] = value;
|
||||||
return async.wrap(value);
|
return async.wrap(value);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -111,8 +111,8 @@ function Automaton(async, dom, messaging, screen, session, ui) {
|
||||||
askGender,
|
askGender,
|
||||||
set('gender')
|
set('gender')
|
||||||
),
|
),
|
||||||
async.apply(messaging.send, message),
|
async.apply(session.set, {character: character}),
|
||||||
async.apply(screen.clear, 'text'),
|
async.apply(screen.clear, 'text')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue