Refactoring of Options. Renamed to OptionsHelper

Because that is what it is.
This commit is contained in:
logsol 2016-10-10 23:10:43 +02:00
parent ce01c8888e
commit 05c4e4de81
6 changed files with 23 additions and 23 deletions

View file

@ -3,11 +3,11 @@
"Lib/Utilities/NotificationCenter",
"Game/Channel/User",
"Lib/Utilities/Protocol/Helper",
"Lib/Utilities/Options",
"Lib/Utilities/OptionsHelper",
"Game/Config/Settings"
],
function (GameController, nc, User, ProtocolHelper, Options, Settings) {
function (GameController, nc, User, ProtocolHelper, OptionsHelper, Settings) {
"use strict";
@ -21,7 +21,7 @@
this.levelListIndex = -1;
this.gameController = null;
this.options = options = Options.merge(options, {
this.options = options = OptionsHelper.merge(options, {
levelUids: Settings.CHANNEL_DEFAULT_LEVELS
});

View file

@ -1,14 +1,14 @@
define([
"Game/" + GLOBALS.context + "/GameObjects/GameObject",
"Lib/Vendor/Box2D",
"Lib/Utilities/Options",
"Lib/Utilities/OptionsHelper",
"Game/Config/Settings",
"Lib/Utilities/Exception",
"Lib/Utilities/NotificationCenter",
"Lib/Utilities/Assert"
],
function (Parent, Box2D, Options, Settings, Exception, nc, Assert) {
function (Parent, Box2D, OptionsHelper, Settings, Exception, nc, Assert) {
"use strict";
@ -26,7 +26,7 @@ function (Parent, Box2D, Options, Settings, Exception, nc, Assert) {
y: parseFloat(options.y)
};
this.options = Options.merge(floatOptions, options);
this.options = OptionsHelper.merge(floatOptions, options);
if(!this.options.category) {
// FIXME add more validation

View file

@ -4,11 +4,11 @@ define([
"Game/Config/Settings",
"Lib/Utilities/NotificationCenter",
"Lib/Utilities/Assert",
"Lib/Utilities/Options",
"Lib/Utilities/OptionsHelper",
"Game/Config/ItemSettings",
],
function (Parent, Box2D, Settings, nc, Assert, Options, ItemSettings) {
function (Parent, Box2D, Settings, nc, Assert, OptionsHelper, ItemSettings) {
"use strict";
@ -96,8 +96,8 @@ function (Parent, Box2D, Settings, nc, Assert, Options, ItemSettings) {
// FIXME
var ragdollOptions = Options.merge(ItemSettings.RagDoll, ItemSettings.Default);
options = Options.merge(options, ragdollOptions);
var ragdollOptions = OptionsHelper.merge(ItemSettings.RagDoll, ItemSettings.Default);
options = OptionsHelper.merge(options, ragdollOptions);
Parent.call(this, physicsEngine, uid, options);
//this.createSensor();

View file

@ -3,7 +3,7 @@ define([
"Game/Config/Settings",
"Game/Config/ItemSettings",
"Lib/Vendor/Box2D",
"Lib/Utilities/Options",
"Lib/Utilities/OptionsHelper",
"Lib/Utilities/Exception",
"Lib/Utilities/NotificationCenter",
"Lib/Utilities/Assert",
@ -13,7 +13,7 @@ define([
"Game/" + GLOBALS.context + "/GameObjects/Item",
"Game/" + GLOBALS.context + "/GameObjects/Items/Skateboard",
], function (Parent, Settings, ItemSettings, Box2D, Options, Exception, nc, Assert, AbstractLayer, CollisionDetector, Tile, Item, Skateboard) {
], function (Parent, Settings, ItemSettings, Box2D, OptionsHelper, Exception, nc, Assert, AbstractLayer, CollisionDetector, Tile, Item, Skateboard) {
"use strict";
@ -187,7 +187,7 @@ define([
throw new Exception("Item name (" + name + ") cannot be found in item list");
}
return Options.merge(ItemSettings[name], ItemSettings.Default);
return OptionsHelper.merge(ItemSettings[name], ItemSettings.Default);
};
TiledLevel.prototype.getTileImagePath = function(gid) {