Open anikaolivo opened 6 years ago
Chick also hatches but doesn't show up
@barrettand this was due to the code stuck in a while loop that was added to have non-duplicate button emojis
starting at line 76 in board_setup.js we had this before:
var definitelyNewEmoji = false;
var emoji = randomEmoji.random({count: 1})[0].character;
while(!definitelyNewEmoji) {
_.each(btn_emojis, function(e) {
definitelyNewEmoji = (emoji != e);
});
}
btn_emojis.push({ emoji: emoji, value: btn.value });
btn.text = emoji;
which has been changed to this:
var definitelyNewEmoji = false;
var emoji = randomEmoji.random({count: 1})[0].character;
while(!definitelyNewEmoji) {
if (btn_emojis.length > 0) {
_.each(btn_emojis, function(e) {
definitelyNewEmoji = (emoji != e);
});
} else
definitelyNewEmoji = true;
}
btn_emojis.push({ emoji: emoji, value: btn.value });
btn.text = emoji;
because unless the user already has a set of saved buttons, btn_emojis is an empty array. This meant that definitelyNewEmoji was never being set to true at the start of a new tamagotchi
I get it up to 75%, it gives me the "I've hatched" message but nothing happens. Should be hatching at 80% but sending another sun emoji does nothing