diff --git a/game/static/game/js/blocklyCustomBlocks.js b/game/static/game/js/blocklyCustomBlocks.js
index 9c7cef111..16a20f922 100644
--- a/game/static/game/js/blocklyCustomBlocks.js
+++ b/game/static/game/js/blocklyCustomBlocks.js
@@ -281,10 +281,10 @@ function initCustomBlocksDescription() {
init: function() {
this.setColour(210);
this.setOutput(true, 'Boolean');
- console.log(ocargo.Drawing.animalType);
+ let imageUrl = ocargo.Drawing.animalType == "pigeon" ? ocargo.Drawing.pigeonUrl : ocargo.Drawing.whiteCowUrl
this.appendDummyInput()
.appendField(ocargo.Drawing.animalType == "pigeon" ? "pigeons": Blockly.Msg.COW_CROSSING_TITLE)
- .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + ocargo.Drawing.whiteCowUrl,
+ .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + imageUrl,
ocargo.BlocklyControl.COW_WIDTH,
ocargo.BlocklyControl.BLOCK_HEIGHT), 'IMAGE');
}
diff --git a/game/static/game/js/drawing.js b/game/static/game/js/drawing.js
index a0cffd920..5a88dc393 100644
--- a/game/static/game/js/drawing.js
+++ b/game/static/game/js/drawing.js
@@ -852,7 +852,6 @@ ocargo.Drawing = function (startingPosition) {
}
this.renderCow = function (id, coordinate, node, animationLength, type) {
- console.log(type);
let res = this.determineCowOrientation(coordinate, node)
let image = paper.image(
ocargo.Drawing.raphaelImageDir + ocargo.Drawing.cowUrl(type),
diff --git a/game/static/game/js/level_editor.js b/game/static/game/js/level_editor.js
index 66152548e..a183fa7f6 100644
--- a/game/static/game/js/level_editor.js
+++ b/game/static/game/js/level_editor.js
@@ -418,7 +418,7 @@ ocargo.LevelEditor = function(levelId) {
for (var i = 0; i < BLOCKS.length; i++) {
var type = BLOCKS[i];
- let usePigeons = type === "cow_crossing" && currentTheme == THEMES.grass
+ let usePigeons = type === "cow_crossing" && currentTheme == THEMES.city
var block = usePigeons ? Blockly.mainWorkspace.newBlock("pigeon_crossing_IMAGE_ONLY") : Blockly.mainWorkspace.newBlock(type);
block.initSvg();
block.render();
@@ -2421,28 +2421,17 @@ ocargo.LevelEditor = function(levelId) {
cows[i].updateTheme();
}
- let block = Blockly.mainWorkspace.newBlock("cow_crossing");
+ const pigeonHTML = ``;
+
+ const cowHTML = ``;
- if (newType == ocargo.Cow.PIGEON) {
- block = Blockly.mainWorkspace.newBlock("pigeon_crossing_IMAGE_ONLY");
- }
-
- block.initSvg();
- block.render();
- let svg = block.getSvgRoot();
- let innerHTML = svg.innerHTML;
- let innerParts = innerHTML.split("';
-
- console.log(svg.innerHTML);
- console.log(finalInnerHTML);
- $("#cow_crossing_image").html(newContent);
+ $("#cow_crossing_image").html(newType == ocargo.Cow.PIGEON ? pigeonHTML : cowHTML);
}
function sortNodes(nodes) {
@@ -2988,31 +2977,6 @@ ocargo.LevelEditor = function(levelId) {
this.image.transform("t" + x + "," + y + " r" + r);
}
- // initCustomBlocksDescription();
-
- // let block = Blockly.mainWorkspace.newBlock("cow_crossing");
-
- // if (newType == ocargo.Cow.PIGEON) {
- // block = Blockly.mainWorkspace.newBlock("pigeon_crossing_IMAGE_ONLY");
- // }
-
- // block.initSvg();
- // block.render();
- // let svg = block.getSvgRoot();
- // let innerHTML = svg.innerHTML;
- // let innerParts = innerHTML.split("';
-
- // console.log(svg.innerHTML);
- // console.log(finalInnerHTML);
- // $("#cow_crossing_image").html(newContent);
-
setupCowListeners(this);
}