feat: Füge Debug-Overlay und Alters-/Geschlechtsanpassungen für 3D-Charaktere hinzu
All checks were successful
Deploy to production / deploy (push) Successful in 1m55s
All checks were successful
Deploy to production / deploy (push) Successful in 1m55s
This commit is contained in:
58
frontend/src/views/falukant/AllCharactersTest.vue
Normal file
58
frontend/src/views/falukant/AllCharactersTest.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="all-characters-test">
|
||||
<h1>All 3D Characters (Ages × Genders)</h1>
|
||||
<div class="controls">
|
||||
<label><input type="checkbox" v-model="useLightweight"> Use lightweight models</label>
|
||||
<label><input type="checkbox" v-model="noBackground"> No background</label>
|
||||
</div>
|
||||
|
||||
<div class="grid">
|
||||
<div v-for="(age, idx) in ages" :key="`age-${age}`" class="card">
|
||||
<div class="label">Alter: {{ age }}</div>
|
||||
<div class="row">
|
||||
<div class="cell">
|
||||
<div class="mini-shell">
|
||||
<Character3D :gender="'female'" :age="age" :lightweight="useLightweight" :noBackground="noBackground" />
|
||||
</div>
|
||||
<div class="sub">weiblich</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="mini-shell">
|
||||
<Character3D :gender="'male'" :age="age" :lightweight="useLightweight" :noBackground="noBackground" />
|
||||
</div>
|
||||
<div class="sub">männlich</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Character3D from '@/components/Character3D.vue';
|
||||
|
||||
export default {
|
||||
name: 'AllCharactersTest',
|
||||
components: { Character3D },
|
||||
data() {
|
||||
return {
|
||||
// Show ages 0..17 and some representative adults
|
||||
ages: [...Array(18).keys()].concat([25, 40, 70]),
|
||||
useLightweight: true,
|
||||
noBackground: true
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.all-characters-test { padding: 16px }
|
||||
.controls { margin-bottom: 12px }
|
||||
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px }
|
||||
.card { border: 1px solid #e0e0e0; padding: 8px; border-radius: 6px; background: #fff }
|
||||
.label { font-weight: 600; margin-bottom: 6px }
|
||||
.row { display: flex; gap: 8px }
|
||||
.cell { flex: 1; text-align: center }
|
||||
.mini-shell { width: 100%; height: 220px }
|
||||
.sub { margin-top: 6px; font-size: 12px; color: #666 }
|
||||
</style>
|
||||
@@ -275,6 +275,23 @@
|
||||
{{ $t('falukant.family.householdTension.reasons.' + reason) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="marriage-actions__reason-details" v-if="householdTensionReasons && householdTensionReasons.length">
|
||||
<ul>
|
||||
<li v-for="reason in householdTensionReasons" :key="reason">
|
||||
<strong>{{ $t('falukant.family.householdTension.reasons.' + reason) }}:</strong>
|
||||
<span>
|
||||
{{ $t('falukant.family.householdTension.reasonsDetail.' + reason) || $t('falukant.family.householdTension.reasons.' + reason) }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="marriage-actions__no-reasons">
|
||||
<p>{{ $t('falukant.family.householdTension.noReasons') || 'Keine spezifischen Spannungsgründe angegeben.' }}</p>
|
||||
<div v-if="isDev" class="marriage-actions__debug-raw">
|
||||
<h4>Dev: rohdaten</h4>
|
||||
<pre>{{ JSON.stringify({ householdTension, householdTensionScore, householdTensionReasons, relationships: relationships && relationships[0] ? { marriageState: relationships[0].marriageState, marriageSatisfaction: relationships[0].marriageSatisfaction, marriageFlags: relationships[0].marriageFlags } : null }, null, 2) }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -449,7 +466,7 @@
|
||||
<dd>{{ lover.statusFit }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<div class="lover-card__meta">
|
||||
<div class="lover-card__meta">
|
||||
<span
|
||||
v-if="lover.acknowledged"
|
||||
class="lover-meta-badge"
|
||||
@@ -460,6 +477,24 @@
|
||||
<span v-if="lover.monthsUnderfunded > 0" class="lover-meta-badge lover-meta-badge--warning">
|
||||
{{ $t('falukant.family.lovers.underfunded', { count: lover.monthsUnderfunded }) }}
|
||||
</span>
|
||||
<!-- Title effects: show which noble titles this lover influences and how -->
|
||||
<div v-if="lover.titleEffects || lover.titleImpact" class="lover-title-effects">
|
||||
<strong>{{ $t('falukant.family.lovers.titleEffects.label') || 'Titel-Auswirkungen' }}</strong>
|
||||
<ul>
|
||||
<li v-if="Array.isArray(lover.titleEffects)" v-for="(te, idx) in lover.titleEffects" :key="idx">
|
||||
<span>{{ te.title || te.name || te.key }}: {{ te.effect || te.impact || JSON.stringify(te) }}</span>
|
||||
</li>
|
||||
<li v-else v-for="(val, key) in (lover.titleEffects || lover.titleImpact)" :key="key">
|
||||
<span>{{ key }}: {{ val }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-if="isDev" class="lover-card__debug">
|
||||
<details>
|
||||
<summary>Dev: Lover raw</summary>
|
||||
<pre>{{ JSON.stringify(lover, null, 2) }}</pre>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lover-card__actions">
|
||||
<button class="button button--secondary" @click="setLoverMaintenance(lover, 25)">
|
||||
@@ -623,6 +658,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState(['socket', 'daemonSocket', 'user']),
|
||||
isDev() { return !import.meta.env.PROD },
|
||||
marriageGiftCosts() {
|
||||
return MARRIAGE_GIFT_COSTS;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user