diff --git a/app/models/CocoModel.coffee b/app/models/CocoModel.coffee index 8801fc038..7fce777b6 100644 --- a/app/models/CocoModel.coffee +++ b/app/models/CocoModel.coffee @@ -41,7 +41,7 @@ class CocoModel extends Backbone.Model set: -> res = super(arguments...) - @saveBackup() if @saveBackups and @loaded + @saveBackup() if @saveBackups and @loaded and @hasLocalChanges() res saveBackup: -> diff --git a/server/levels/components/level_component_handler.coffee b/server/levels/components/level_component_handler.coffee index e9d807b6d..89a3ea21c 100644 --- a/server/levels/components/level_component_handler.coffee +++ b/server/levels/components/level_component_handler.coffee @@ -12,8 +12,8 @@ LevelComponentHandler = class LevelComponentHandler extends Handler 'dependencies' 'propertyDocumentation' 'configSchema' + 'name' ] - postEditableProperties: ['name'] getEditableProperties: (req, document) -> props = super(req, document) diff --git a/server/levels/components/level_component_schema.coffee b/server/levels/components/level_component_schema.coffee index 4c0fde8bd..934f55a76 100644 --- a/server/levels/components/level_component_schema.coffee +++ b/server/levels/components/level_component_schema.coffee @@ -9,7 +9,8 @@ class AttacksSelf extends Component """ systems = [ 'action', 'ai', 'alliance', 'collision', 'combat', 'display', 'event', 'existence', 'hearing' - 'inventory', 'movement', 'programming', 'targeting', 'ui', 'vision', 'misc', 'physics', 'effect' + 'inventory', 'movement', 'programming', 'targeting', 'ui', 'vision', 'misc', 'physics', 'effect', + 'magic' ] PropertyDocumentationSchema = c.object {