Stop sending message with character's feature and save it into localStorage instead

This commit is contained in:
Tissevert 2018-12-18 21:21:55 +01:00
parent a418ccedac
commit 0973655f7e
1 changed files with 4 additions and 4 deletions

View File

@ -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')
); );
} }