diff --git a/src/app/character.coffee b/src/app/character.coffee index 7ace61dbf1..07b0996dcb 100644 --- a/src/app/character.coffee +++ b/src/app/character.coffee @@ -75,9 +75,8 @@ module.exports.app = (appExports, model) -> appExports.restoreSave = (e, el) -> batch = new BatchUpdate(model) batch.startTransaction() - obj = batch.obj() - _.each obj.stats, (stat, key) -> batch.set("stats.#{key}", parseInt(stat)) - _.each obj.items, (item, key) -> batch.set("items.#{key}", parseInt(item)) + $('#restore-form input').each -> + batch.set $(this).attr('data-for'), parseInt($(this).val()) batch.commit() user.on 'set', 'flags.customizationsNotification', (captures, args) -> diff --git a/views/app/settings.html b/views/app/settings.html index 57354e3bb9..6d053bc3df 100644 --- a/views/app/settings.html +++ b/views/app/settings.html @@ -31,41 +31,41 @@
HabitRPG is quite Beta-quality at present, and many find they need to restore character attributes as a result. Enter your numbers here and it will be applied automatically to your character. This will be removed once Habit is more stable.
{#with _user} -