horsegen, zenno/convo: get all character names
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
SELECT
|
SELECT
|
||||||
"index" AS "id",
|
"index" AS "id",
|
||||||
"text" AS "name",
|
"text" AS "name"
|
||||||
ROW_NUMBER() OVER (ORDER BY "index") - 1 AS "index"
|
|
||||||
FROM text_data
|
FROM text_data
|
||||||
WHERE category = 6 AND "index" BETWEEN 1000 AND 1999
|
WHERE category = 6
|
||||||
-- Exclude characters who have no succession relations defined.
|
|
||||||
AND "index" IN (SELECT chara_id FROM succession_relation_member)
|
|
||||||
ORDER BY "id"
|
ORDER BY "id"
|
||||||
|
|||||||
@@ -111,10 +111,18 @@
|
|||||||
"chara_id": 1028,
|
"chara_id": 1028,
|
||||||
"name": "Hishi Akebono"
|
"name": "Hishi Akebono"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1029,
|
||||||
|
"name": "Yukino Bijin"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1030,
|
"chara_id": 1030,
|
||||||
"name": "Rice Shower"
|
"name": "Rice Shower"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1031,
|
||||||
|
"name": "Ines Fujin"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1032,
|
"chara_id": 1032,
|
||||||
"name": "Agnes Tachyon"
|
"name": "Agnes Tachyon"
|
||||||
@@ -131,6 +139,10 @@
|
|||||||
"chara_id": 1035,
|
"chara_id": 1035,
|
||||||
"name": "Winning Ticket"
|
"name": "Winning Ticket"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1036,
|
||||||
|
"name": "Air Shakur"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1037,
|
"chara_id": 1037,
|
||||||
"name": "Eishin Flash"
|
"name": "Eishin Flash"
|
||||||
@@ -151,6 +163,14 @@
|
|||||||
"chara_id": 1041,
|
"chara_id": 1041,
|
||||||
"name": "Sakura Bakushin O"
|
"name": "Sakura Bakushin O"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1042,
|
||||||
|
"name": "Seeking the Pearl"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1043,
|
||||||
|
"name": "Shinko Windy"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1044,
|
"chara_id": 1044,
|
||||||
"name": "Sweep Tosho"
|
"name": "Sweep Tosho"
|
||||||
@@ -163,10 +183,18 @@
|
|||||||
"chara_id": 1046,
|
"chara_id": 1046,
|
||||||
"name": "Smart Falcon"
|
"name": "Smart Falcon"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1047,
|
||||||
|
"name": "Zenno Rob Roy"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1048,
|
"chara_id": 1048,
|
||||||
"name": "Tosen Jordan"
|
"name": "Tosen Jordan"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1049,
|
||||||
|
"name": "Nakayama Festa"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1050,
|
"chara_id": 1050,
|
||||||
"name": "Narita Taishin"
|
"name": "Narita Taishin"
|
||||||
@@ -179,10 +207,26 @@
|
|||||||
"chara_id": 1052,
|
"chara_id": 1052,
|
||||||
"name": "Haru Urara"
|
"name": "Haru Urara"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1053,
|
||||||
|
"name": "Bamboo Memory"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1054,
|
||||||
|
"name": "Biko Pegasus"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1055,
|
||||||
|
"name": "Marvelous Sunday"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1056,
|
"chara_id": 1056,
|
||||||
"name": "Matikanefukukitaru"
|
"name": "Matikanefukukitaru"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1057,
|
||||||
|
"name": "Mr. C.B."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1058,
|
"chara_id": 1058,
|
||||||
"name": "Meisho Doto"
|
"name": "Meisho Doto"
|
||||||
@@ -203,6 +247,22 @@
|
|||||||
"chara_id": 1062,
|
"chara_id": 1062,
|
||||||
"name": "Matikanetannhauser"
|
"name": "Matikanetannhauser"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1063,
|
||||||
|
"name": "Ikuno Dictus"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1064,
|
||||||
|
"name": "Mejiro Palmer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1065,
|
||||||
|
"name": "Daitaku Helios"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1066,
|
||||||
|
"name": "Twin Turbo"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1067,
|
"chara_id": 1067,
|
||||||
"name": "Satono Diamond"
|
"name": "Satono Diamond"
|
||||||
@@ -215,12 +275,72 @@
|
|||||||
"chara_id": 1069,
|
"chara_id": 1069,
|
||||||
"name": "Sakura Chiyono O"
|
"name": "Sakura Chiyono O"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1070,
|
||||||
|
"name": "Sirius Symboli"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1071,
|
"chara_id": 1071,
|
||||||
"name": "Mejiro Ardan"
|
"name": "Mejiro Ardan"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1072,
|
||||||
|
"name": "Yaeno Muteki"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1073,
|
||||||
|
"name": "Tsurumaru Tsuyoshi"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chara_id": 1074,
|
"chara_id": 1074,
|
||||||
"name": "Mejiro Bright"
|
"name": "Mejiro Bright"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1077,
|
||||||
|
"name": "Narita Top Road"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 1078,
|
||||||
|
"name": "Yamanin Zephyr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 2001,
|
||||||
|
"name": "Happy Meek"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 2002,
|
||||||
|
"name": "Bitter Glasse"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 2003,
|
||||||
|
"name": "Little Cocon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 2004,
|
||||||
|
"name": "Montjeu"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 9001,
|
||||||
|
"name": "Tazuna Hayakawa"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 9002,
|
||||||
|
"name": "Director Akikawa"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 9003,
|
||||||
|
"name": "Etsuko Otonashi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 9004,
|
||||||
|
"name": "Trainer Kiryuin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 9005,
|
||||||
|
"name": "Sasami Anshinzawa"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chara_id": 9006,
|
||||||
|
"name": "Riko Kashimoto"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,38 +1,24 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { character } from '$lib/data/character';
|
import { type Character } from '$lib/data/character';
|
||||||
import type { ClassValue } from 'svelte/elements';
|
import type { ClassValue } from 'svelte/elements';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
id: string;
|
id: string;
|
||||||
|
characters: Character[];
|
||||||
value: number;
|
value: number;
|
||||||
label?: string;
|
|
||||||
class?: ClassValue | null;
|
class?: ClassValue | null;
|
||||||
optionClass?: ClassValue | null;
|
optionClass?: ClassValue | null;
|
||||||
labelClass?: ClassValue | null;
|
|
||||||
region?: keyof typeof character;
|
|
||||||
required?: boolean;
|
required?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
let {
|
let { id, characters, value = $bindable(), class: className, optionClass, required = false }: Props = $props();
|
||||||
id,
|
|
||||||
value = $bindable(),
|
|
||||||
label,
|
|
||||||
class: className,
|
|
||||||
optionClass,
|
|
||||||
labelClass,
|
|
||||||
region = 'global',
|
|
||||||
required = false,
|
|
||||||
}: Props = $props();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if label}
|
|
||||||
<label for={id} class={labelClass}>{label}</label>
|
|
||||||
{/if}
|
|
||||||
<select {id} class={className} bind:value {required}>
|
<select {id} class={className} bind:value {required}>
|
||||||
{#if !required}
|
{#if !required}
|
||||||
<option value="0" class={optionClass}></option>
|
<option value="0" class={optionClass}></option>
|
||||||
{/if}
|
{/if}
|
||||||
{#each character[region] as c (c.chara_id)}
|
{#each characters as c (c.chara_id)}
|
||||||
<option value={c.chara_id} class={optionClass}>{c.name}</option>
|
<option value={c.chara_id} class={optionClass}>{c.name}</option>
|
||||||
{/each}
|
{/each}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { charaNames } from '$lib/data/character';
|
import { character, charaNames } from '$lib/data/character';
|
||||||
import { byChara, locations, groupPopulars } from '$lib/data/convo';
|
import { byChara, locations, groupPopulars } from '$lib/data/convo';
|
||||||
import CharaPick from '$lib/CharaPick.svelte';
|
import CharaPick from '$lib/CharaPick.svelte';
|
||||||
|
|
||||||
|
const characters = character.global.filter((c) => byChara.global.has(c.chara_id));
|
||||||
const minSuggest = 8;
|
const minSuggest = 8;
|
||||||
|
|
||||||
let charaID = $state(1001);
|
let charaID = $state(1001);
|
||||||
@@ -10,9 +11,9 @@
|
|||||||
|
|
||||||
const options = $derived(byChara.global.get(charaID) ?? []);
|
const options = $derived(byChara.global.get(charaID) ?? []);
|
||||||
const cur = $derived(options.find((c) => c.number === convo));
|
const cur = $derived(options.find((c) => c.number === convo));
|
||||||
const cur1Name = $derived(cur != null ? (charaNames.get(cur.chara_1)?.en ?? 'someone not a trainee') : '');
|
const cur1Name = $derived(cur?.chara_1 && charaNames.get(cur.chara_1)?.en);
|
||||||
const cur2Name = $derived(cur?.chara_2 != null ? (charaNames.get(cur.chara_2)?.en ?? 'someone not a trainee') : '');
|
const cur2Name = $derived(cur?.chara_2 && charaNames.get(cur.chara_2)?.en);
|
||||||
const cur3Name = $derived(cur?.chara_3 != null ? (charaNames.get(cur.chara_3)?.en ?? 'someone not a trainee') : '');
|
const cur3Name = $derived(cur?.chara_3 && charaNames.get(cur.chara_3)?.en);
|
||||||
const alone = $derived([cur?.chara_1, cur?.chara_2, cur?.chara_3].filter((x) => x != null).length == 1 ? ' alone' : '');
|
const alone = $derived([cur?.chara_1, cur?.chara_2, cur?.chara_3].filter((x) => x != null).length == 1 ? ' alone' : '');
|
||||||
const suggested = $derived.by(() => {
|
const suggested = $derived.by(() => {
|
||||||
if (cur == null) {
|
if (cur == null) {
|
||||||
@@ -29,7 +30,8 @@
|
|||||||
<h1 class="text-4xl">Lobby Conversations</h1>
|
<h1 class="text-4xl">Lobby Conversations</h1>
|
||||||
<div class="mx-auto mt-8 flex flex-col rounded-md text-center shadow-md ring md:max-w-xl md:flex-row">
|
<div class="mx-auto mt-8 flex flex-col rounded-md text-center shadow-md ring md:max-w-xl md:flex-row">
|
||||||
<div class="m-4 flex-1 md:mt-3">
|
<div class="m-4 flex-1 md:mt-3">
|
||||||
<CharaPick id="chara" class="w-full" label="Character" labelClass="hidden md:inline" bind:value={charaID} required />
|
<label for="chara" class="hidden md:inline">Character</label>
|
||||||
|
<CharaPick id="chara" {characters} class="w-full" bind:value={charaID} required />
|
||||||
</div>
|
</div>
|
||||||
<div class="m-4 flex-1 md:mt-3">
|
<div class="m-4 flex-1 md:mt-3">
|
||||||
<label for="convo" class="hidden md:inline">Conversation</label>
|
<label for="convo" class="hidden md:inline">Conversation</label>
|
||||||
|
|||||||
Reference in New Issue
Block a user