mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-25 12:17:22 +00:00
Add the violet backed starling
This commit is contained in:
49
dist/obsidian/main.js
vendored
49
dist/obsidian/main.js
vendored
@@ -622,22 +622,38 @@ module.exports = class PocketBird extends Plugin {
|
||||
},
|
||||
"cubanTody": {
|
||||
"name": "Cuban Tody",
|
||||
"description": "As the name suggests, this green bird is only found on the island of Cuba and is known for being particularly round.",
|
||||
"description": "As the name suggests, this little green bird is only found on the island of Cuba and is known for being particularly round.",
|
||||
"latinName": "Todus multicolor",
|
||||
"url": "https://en.wikipedia.org/wiki/Cuban_tody",
|
||||
"colors": {
|
||||
"beak": "#f16f54",
|
||||
"face": "#5fdf44",
|
||||
"chin": "#f12d3e",
|
||||
"collar": "#f12d3e",
|
||||
"belly": "#f6f5e4",
|
||||
"collar-scruff": "#a3ebff",
|
||||
"underbelly": "#eae9d2",
|
||||
"wing": "#11c751",
|
||||
"wing-edge": "#156631",
|
||||
"foot": "#ac7055",
|
||||
"scruff": "#11c751"
|
||||
"beak": "#f16f54",
|
||||
"face": "#5fdf44",
|
||||
"chin": "#f12d3e",
|
||||
"collar": "#f12d3e",
|
||||
"belly": "#f6f5e4",
|
||||
"collar-scruff": "#a3ebff",
|
||||
"underbelly": "#eae9d2",
|
||||
"wing": "#11c751",
|
||||
"wing-edge": "#156631",
|
||||
"foot": "#ac7055",
|
||||
"scruff": "#11c751"
|
||||
},
|
||||
"rarity": "uncommon"
|
||||
},
|
||||
"violetBackedStarling": {
|
||||
"name": "Violet-backed Starling",
|
||||
"description": "Native to Sub-Saharan Africa, these small starlings are known for being the most vividly purple birds in the world.",
|
||||
"latinName": "Cinnyricinclus leucogaster",
|
||||
"url": "https://en.wikipedia.org/wiki/Violet-backed_starling",
|
||||
"colors": {
|
||||
"face": "#9c3af2",
|
||||
"wing": "#8f37ed",
|
||||
"wing-edge": "#7029b8",
|
||||
"belly": "#ffffff",
|
||||
"underbelly": "#f2f2f2",
|
||||
"foot": "#736a66",
|
||||
"collar": "#aa60e6"
|
||||
},
|
||||
"rarity": "uncommon"
|
||||
}
|
||||
};
|
||||
@@ -745,7 +761,7 @@ module.exports = class PocketBird extends Plugin {
|
||||
});
|
||||
|
||||
const RARITY = Object.freeze(/** @type {const} */ ({
|
||||
FAMILIAR: "familiar",
|
||||
COMMON: "common",
|
||||
UNCOMMON: "uncommon"
|
||||
}));
|
||||
|
||||
@@ -761,7 +777,7 @@ module.exports = class PocketBird extends Plugin {
|
||||
* @param {string[]} [tags]
|
||||
* @param {Rarity} [rarity]
|
||||
*/
|
||||
constructor(name, description, latinName, url, colors, tags = [], rarity = RARITY.FAMILIAR) {
|
||||
constructor(name, description, latinName, url, colors, tags = [], rarity = RARITY.COMMON) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.latinName = latinName;
|
||||
@@ -3017,7 +3033,7 @@ module.exports = class PocketBird extends Plugin {
|
||||
if (document.querySelector("#" + FEATHER_ID)) {
|
||||
return;
|
||||
}
|
||||
const rarity = Math.random() < UNCOMMON_FEATHER_CHANCE ? RARITY.UNCOMMON : RARITY.FAMILIAR;
|
||||
const rarity = Math.random() < UNCOMMON_FEATHER_CHANCE ? RARITY.UNCOMMON : RARITY.COMMON;
|
||||
const speciesToUnlock = Object.keys(SPECIES).filter((species) => !unlockedSpecies.includes(species) && SPECIES[species].rarity === rarity);
|
||||
if (speciesToUnlock.length === 0) {
|
||||
// No more species to unlock
|
||||
@@ -3223,6 +3239,7 @@ module.exports = class PocketBird extends Plugin {
|
||||
const uncommonLabel = document.createElement("div");
|
||||
uncommonLabel.className = "birb-field-guide-section-label";
|
||||
uncommonLabel.textContent = `----- Uncommon ${birdBirb()}s -----`;
|
||||
uncommonLabel.title = "Arbitrarily classified birds that are a little harder to find, but worth the wait!";
|
||||
|
||||
const description = makeElement("birb-field-guide-description");
|
||||
contentContainer.appendChild(familiarLabel);
|
||||
@@ -3255,7 +3272,7 @@ module.exports = class PocketBird extends Plugin {
|
||||
latinName.target = "_blank";
|
||||
|
||||
const spacerTwo = document.createElement("div");
|
||||
spacerTwo.style.height = "0.3em";
|
||||
spacerTwo.style.height = "0.4em";
|
||||
|
||||
const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user