Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fetch-discord-users.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const userIds = [
"329656222213079053", // eeveon
"1296648831370268756", // gleamingk111
"317342307705683968", // elki
"137445249759838208", // Jack5
"86612976529838080", // jar of galaxies
"138378536497971200", // mitru
"353959847189938196", // rickerd102
Expand Down
11 changes: 11 additions & 0 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}

input[type="checkbox"] {
appearance: none;
border-radius: 0;
padding: 0;
height: 25px;
width: 25px;
&:checked {
background: #646cff;
}
}

@media (prefers-color-scheme: light) {
:root {
color: #213547;
Expand Down
21 changes: 21 additions & 0 deletions src/lib/components/Settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
let { show, onClose } = $props();
let music_vol = $state(parseFloat(localStorage.getItem("settings.music_volume") ?? "1.0"));
let sfx_vol = $state(parseFloat(localStorage.getItem("settings.sfx_volume") ?? "1.0"));
let ollama_enabled = $state(localStorage.getItem("settings.ollama_enabled") === "true");
let ollama_model = $state(localStorage.getItem("settings.ollama_model") ?? "gemma4:e2b");

let users = await (await fetch("/discord-users.json")).json();

Expand All @@ -24,6 +26,10 @@
label: "Playtesting",
users: ["1429874676590575907", "317342307705683968"],
},
{
label: "AI integration",
users: ["137445249759838208"]
},
{
label: "Feedback & support",
users: [
Expand All @@ -40,10 +46,12 @@

function onchange() {
localStorage.setItem("settings.music_volume", music_vol.toString());
localStorage.setItem("settings.ollama_model", ollama_model);
}
function onpointerup() {
localStorage.setItem("settings.sfx_volume", sfx_vol.toString());
sfx.bubble();
localStorage.setItem("settings.ollama_enabled", ollama_enabled.toString());
}
</script>

Expand All @@ -68,6 +76,19 @@
/>
</div>
<div style="border-bottom: 3px solid #c0c0c0; padding-block: 10px"></div>
<h2>AI Integration</h2>
<p>If enabled, element names and icons are generated by a local <a href="https://ollama.com" target="_blank">Ollama</a> model.<br/>No multiworld data is processed by any third party.</p>
<div>
Enabled
<input type="checkbox" bind:checked={ollama_enabled} onchange={onpointerup} />
</div>
{#if ollama_enabled}
<div>
Ollama model name
<input type="text" bind:value={ollama_model} onchange={onchange} />
</div>
{/if}
<div style="border-bottom: 3px solid #c0c0c0; padding-block: 10px"></div>
<h2>Credits</h2>
<h1 style="justify-self: center; font-size: 3em">elementipelago</h1>
<p>a game made for Archipelago</p>
Expand Down
75 changes: 75 additions & 0 deletions src/lib/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,78 @@ export const APWORLD_VERSION_REGEX = new RegExp(
) +
")(-.*)?$",
);

export const SUBSTITUTE_ICONS = [
"apple",
"armor",
"ball",
"berry",
"boat",
"book",
"boots",
"car",
"chest",
"element",
"emerald",
"hat",
"heart",
"leaf",
"magic",
"marker",
"metal",
"music",
"potion",
"sand",
"wand",
];
export const ELEMENT_ICONS = [
"bow",
"cave",
"coin",
"desert",
"egg",
"fire",
"gun",
"hammer",
"hills",
"hourglass",
"house",
"ice",
"island",
"key",
"map",
"money",
"mountains",
"piece",
"planet",
"quest",
"ring",
"rock",
"shop",
"sign",
"skull",
"spear",
"sword",
"tree",
"upgrade",
"void",
"water",
];
export const ALL_ICONS = [...SUBSTITUTE_ICONS, ...ELEMENT_ICONS];
export const ICON_PALETTES = [
"lightblue",
"turqoise",
"green",
"lime",
"yellow",
"orange",
"warmred",
"red",
"magenta",
"purple",
"indigo",
"blue",
"white",
];

export const ELEMENT_SYNONYMS = ["chemical", "element", "ingredient", "material", "substance"];
Loading