diff options
author | Devine Lu Linvega <[email protected]> | 2018-12-09 11:03:54 +1200 |
---|---|---|
committer | Devine Lu Linvega <[email protected]> | 2018-12-09 11:03:54 +1200 |
commit | 5c31ece4a376df80d92eb36cc5ff05efaa16d796 (patch) | |
tree | 9da8c106d9df782157db912502968998c15f834e | |
parent | 677eac43915eef8300b9695c06bf9fdaffa21b94 (diff) | |
download | Orca-5c31ece4a376df80d92eb36cc5ff05efaa16d796.tar.gz Orca-5c31ece4a376df80d92eb36cc5ff05efaa16d796.zip |
Improved he behaviour of P/X
-rw-r--r-- | desktop/core/library/p.js | 3 | ||||
-rw-r--r-- | desktop/core/library/x.js | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/desktop/core/library/p.js b/desktop/core/library/p.js index f490303..c7760a2 100644 --- a/desktop/core/library/p.js +++ b/desktop/core/library/p.js @@ -3,7 +3,7 @@ const Operator = require('../operator') function OperatorP (orca, x, y, passive) { - Operator.call(this, orca, x, y, 'p', passive) + Operator.call(this, orca, x, y, 'p', true) this.name = 'push' this.info = 'Writes an eastward operator with offset.' @@ -23,6 +23,7 @@ function OperatorP (orca, x, y, passive) { } this.run = function () { + if (!this.bang() && !passive) { return } const res = this.listen(this.ports.input.val) this.output(`${res}`) } diff --git a/desktop/core/library/x.js b/desktop/core/library/x.js index 9449461..f2ffcd9 100644 --- a/desktop/core/library/x.js +++ b/desktop/core/library/x.js @@ -3,7 +3,7 @@ const Operator = require('../operator') function OperatorX (orca, x, y, passive) { - Operator.call(this, orca, x, y, 'x', passive) + Operator.call(this, orca, x, y, 'x', true) this.name = 'teleport' this.info = 'Writes a distant operator with offset.' @@ -20,6 +20,7 @@ function OperatorX (orca, x, y, passive) { } this.run = function () { + if (!this.bang() && !passive) { return } const res = this.listen(this.ports.input.val) this.output(`${res}`) } |