class_name Credits extends RefCounted ## Every third-party asset the game ships, and the terms it ships under. ## ## This is not decoration. Two of these packs are CC BY 4.0, which requires ## attribution "in any reasonable manner" -- a file in the repository is not ## reasonable for a player who downloaded a build, so the game has to say so ## itself. See [CreditsScreen]. ## ## `tests/unit/test_credits.gd` asserts every entry here also appears in ## CREDITS.md, so the two cannot drift apart. ## Each entry: what it is, who made it, the licence, a link, and what it is ## used for. `required` marks the ones the licence obliges us to show. const SOURCES: Array[Dictionary] = [ { "name": "16x16 DungeonTileset II", "author": "0x72 (Robert Norenberg)", "licence": "CC0 1.0 (public domain)", "url": "https://0x72.itch.io/dungeontileset-ii", "used_for": "Terrain, characters, bosses, item icons", "required": false, }, { "name": "Complete UI Essential Pack", "author": "Crusenho Agus Hennihuno", "licence": "CC BY 4.0", "url": "https://crusenho.itch.io/complete-ui-essential-pack", "used_for": "Buttons, panels, bars, inventory slots", "required": true, }, { "name": "Pixel Combat SFX", "author": "Helton Yan", "licence": "CC BY 4.0", "url": "https://heltonyan.itch.io/pixelcombat", "used_for": "All sound effects", "required": true, }, { "name": "Fire Pixel Bullet 16x16", "author": "bdragon1727", "licence": "Custom - not redistributable", "url": "https://bdragon1727.itch.io/fire-pixel-bullet-16x16", "used_for": "Bullet sprites (local builds only)", "required": false, }, { "name": "750+ Effect and FX Pixel All", "author": "bdragon1727", "licence": "Custom - not redistributable", "url": "https://bdragon1727.itch.io/750-effect-and-fx-pixel-all", "used_for": "Impact effects (local builds only)", "required": false, }, ] ## CC BY asks for a link to the licence itself, not only to the work. const LICENCE_LINKS := { "CC BY 4.0": "https://creativecommons.org/licenses/by/4.0/", "CC0 1.0 (public domain)": "https://creativecommons.org/publicdomain/zero/1.0/", } ## The packs whose licence actually obliges us to credit them. Everything else ## in [constant SOURCES] is there because the work deserves it. static func required() -> Array[Dictionary]: var out: Array[Dictionary] = [] for entry in SOURCES: if bool(entry["required"]): out.append(entry) return out static func licence_url(licence: String) -> String: return String(LICENCE_LINKS.get(licence, ""))