From 24c6338302cd89583a9cd02f147b0033eb1972f3 Mon Sep 17 00:00:00 2001 From: Florrie Date: Tue, 12 Jun 2018 19:27:35 -0300 Subject: [PATCH] Map costumeName -> costumenumbername [name] ...instead of mapping to a new obsolete/hidden block 'costumename'. Thanks to @kchadha for helping with this! --- src/serialization/sb2.js | 6 ++++++ src/serialization/sb2_specmap.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/serialization/sb2.js b/src/serialization/sb2.js index 5efd5c9da..9ca378d90 100644 --- a/src/serialization/sb2.js +++ b/src/serialization/sb2.js @@ -954,6 +954,12 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension value: 'number' }; break; + case 'costumeName': + activeBlock.fields.NUMBER_NAME = { + name: 'NUMBER_NAME', + value: 'name' + }; + break; } // Special cases to generate mutations. diff --git a/src/serialization/sb2_specmap.js b/src/serialization/sb2_specmap.js index 44dc41bdd..5079c206f 100644 --- a/src/serialization/sb2_specmap.js +++ b/src/serialization/sb2_specmap.js @@ -429,7 +429,7 @@ const specMap = { ] }, 'costumeName': { - opcode: 'looks_costumename', + opcode: 'looks_costumenumbername', argMap: [ ] },