98 lines
2.9 KiB
JavaScript
98 lines
2.9 KiB
JavaScript
// The credits shown from the main menu. The icon artists are the authors of the
|
|
// individual game-icons.net SVGs used by the unit, building and action
|
|
// buttons; the catalogue is data-driven so a new credited asset only needs an
|
|
// entry here.
|
|
|
|
export const CREDIT_SECTIONS = [
|
|
{
|
|
title: "Visual artists",
|
|
note:
|
|
"Unit, building and nation icons drawn for game-icons.net by the artists " +
|
|
"below, used under CC BY 3.0.",
|
|
entries: [
|
|
{
|
|
name: "Delapouite",
|
|
detail:
|
|
"bank, caesar, clapperboard, control tower, delivery drone, " +
|
|
"encirclement, graduate cap, habitat dome, jet fighter, military " +
|
|
"fort, modern city, old wagon, rail road, road, ship bow, shop, " +
|
|
"stone bust, throne",
|
|
},
|
|
{
|
|
name: "Lorc",
|
|
detail: "anchor, crossed sabres, radar dish, rocket",
|
|
},
|
|
{
|
|
name: "Lord Berandas",
|
|
detail: "bomber, microscope",
|
|
},
|
|
{ name: "Cathelineau", detail: "battleship" },
|
|
{ name: "Pierre Leducq", detail: "anti-aircraft gun" },
|
|
{ name: "Quoting", detail: "field gun" },
|
|
{ name: "Skoll", detail: "FAMAS" },
|
|
],
|
|
},
|
|
{
|
|
title: "Websites",
|
|
entries: [
|
|
{
|
|
name: "game-icons.net",
|
|
url: "https://game-icons.net",
|
|
detail: "the military, building and action icons, by the artists above",
|
|
},
|
|
{
|
|
name: "opengameart.org",
|
|
url: "https://opengameart.org",
|
|
detail: "the terrain textures, map flags and other visual assets",
|
|
},
|
|
{
|
|
name: "Mapbox Maki",
|
|
url: "https://labs.mapbox.com/maki-icons/",
|
|
detail: "the launch/ferry icon",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: "Music and sound",
|
|
entries: [
|
|
{
|
|
name: "Crashed Ship",
|
|
detail: "in-game background music, copyright Ted Kerr",
|
|
},
|
|
{
|
|
name: "UI Sound Library",
|
|
detail: "button, completion and notification effects",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
// Renders the sections into the credits modal's list element.
|
|
export function renderCredits($list) {
|
|
$list.empty();
|
|
for (const section of CREDIT_SECTIONS) {
|
|
$list.append($("<h3 class='credits-title'></h3>").text(section.title));
|
|
if (section.note) {
|
|
$list.append($("<p class='credits-note'></p>").text(section.note));
|
|
}
|
|
const $entries = $("<ul class='credits-entries'></ul>");
|
|
for (const entry of section.entries) {
|
|
const $item = $("<li></li>");
|
|
if (entry.url) {
|
|
$item.append(
|
|
$("<a></a>")
|
|
.attr({ href: entry.url, target: "_blank", rel: "noopener noreferrer" })
|
|
.text(entry.name)
|
|
);
|
|
} else {
|
|
$item.append($("<span class='credits-name'></span>").text(entry.name));
|
|
}
|
|
if (entry.detail) {
|
|
$item.append($("<span class='credits-detail'></span>").text(entry.detail));
|
|
}
|
|
$entries.append($item);
|
|
}
|
|
$list.append($entries);
|
|
}
|
|
}
|