mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-04 13:11:12 -05:00
Switched to a ternary conditional
This commit is contained in:
parent
293b1560b0
commit
b94663adfc
1 changed files with 1 additions and 2 deletions
|
@ -472,8 +472,7 @@ public class Block extends Sprite {
|
|||
|
||||
public function duplicate(forClone:Boolean, forStage:Boolean = false):Block {
|
||||
var newSpec:String = spec;
|
||||
if (forStage && op == 'whenClicked') newSpec = 'when Stage clicked';
|
||||
if (!forStage && op == 'whenClicked') newSpec = 'when this sprite clicked';
|
||||
if (op == 'whenClicked') newSpec = forStage ? 'when Stage clicked' : 'when this sprite clicked';
|
||||
var dup:Block = new Block(newSpec, type, (int)(forClone ? -1 : base.color), op);
|
||||
dup.isRequester = isRequester;
|
||||
dup.parameterNames = parameterNames;
|
||||
|
|
Loading…
Reference in a new issue