Tension Implemented without physics
This commit is contained in:
1 parent
abbc95f4df
commit
543dd3da3b
5 files changed
+360
-25
No files matched your search
@@ -51,6 +51,9 @@ function newStrategyPartConstructor () {
|
||||
if (payload.node.savedPayload.floatingObject.isFrozen === true) {
|
||||
floatingObject.freezeToggle()
|
||||
}
|
||||
if (payload.node.savedPayload.floatingObject.isTensed === true) {
|
||||
floatingObject.tensionToggle()
|
||||
}
|
||||
}
|
||||
|
||||
let strategyPart = newStrategyPart()
|
||||
@@ -67,10 +70,11 @@ function newStrategyPartConstructor () {
|
||||
canvas.strategySpace.workspace.tradingSystem = payload.node
|
||||
}
|
||||
}
|
||||
payload.node.savedPayload = undefined
|
||||
|
||||
setFloatingObjectBasicProperties(floatingObject, payload)
|
||||
|
||||
payload.node.savedPayload = undefined
|
||||
|
||||
floatingLayer.addFloatingObject(floatingObject)
|
||||
|
||||
return
|
||||
@@ -97,20 +101,6 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
actionStatus: floatingObject.getFreezeStatus,
|
||||
currentStatus: true,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'broken-link',
|
||||
iconPathOff: 'targeting',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 135
|
||||
},
|
||||
{
|
||||
action: 'Download Workspace',
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
@@ -143,6 +133,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: true,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -254,6 +258,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -324,6 +342,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -395,6 +427,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -465,6 +511,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -548,6 +608,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -618,6 +692,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -688,6 +776,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -746,6 +848,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -817,6 +933,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -888,6 +1018,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -959,6 +1103,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -1030,6 +1188,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -1100,6 +1272,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -1171,6 +1357,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -1242,6 +1442,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -1331,6 +1545,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -1402,6 +1630,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -1473,6 +1715,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -1544,6 +1800,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -1620,6 +1890,20 @@ function newStrategyPartConstructor () {
|
||||
currentRadius: 0,
|
||||
angle: -135
|
||||
},
|
||||
{
|
||||
action: 'Tense / Untense',
|
||||
actionFunction: floatingObject.tensionToggle,
|
||||
actionStatus: floatingObject.getTensionStatus,
|
||||
currentStatus: false,
|
||||
label: undefined,
|
||||
visible: false,
|
||||
iconPathOn: 'compass',
|
||||
iconPathOff: 'headphones',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 180
|
||||
},
|
||||
{
|
||||
action: 'Freeze / Unfreeze',
|
||||
actionFunction: floatingObject.freezeToggle,
|
||||
@@ -1804,6 +2088,10 @@ function newStrategyPartConstructor () {
|
||||
floatingObject.initializeFontSize(10)
|
||||
|
||||
floatingObject.fillStyle = 'rgba(' + UI_COLOR.WHITE + ', 1)'
|
||||
|
||||
if (payload.node.savedPayload === undefined) {
|
||||
floatingObject.tensionToggle()
|
||||
}
|
||||
}
|
||||
|
||||
function level_2 () {
|
||||
@@ -1816,6 +2104,10 @@ function newStrategyPartConstructor () {
|
||||
floatingObject.initializeFontSize(10)
|
||||
|
||||
floatingObject.fillStyle = 'rgba(' + UI_COLOR.GREEN + ', 1)'
|
||||
|
||||
if (payload.node.savedPayload === undefined) {
|
||||
floatingObject.tensionToggle()
|
||||
}
|
||||
}
|
||||
|
||||
function level_3 () {
|
||||
@@ -1828,6 +2120,10 @@ function newStrategyPartConstructor () {
|
||||
floatingObject.initializeFontSize(10)
|
||||
|
||||
floatingObject.fillStyle = 'rgba(' + UI_COLOR.RUSTED_RED + ', 1)'
|
||||
|
||||
if (payload.node.savedPayload === undefined) {
|
||||
floatingObject.tensionToggle()
|
||||
}
|
||||
}
|
||||
|
||||
function level_4 () {
|
||||
|
||||
Reference in new issue
Block a user