Release v0.2.10: Update package-lock.json and CI config

This commit is contained in:
Joan
2025-12-30 18:51:21 +01:00
parent 8b31011334
commit 592f38827e
108 changed files with 2755 additions and 1112 deletions

View File

@@ -1,6 +1,9 @@
import type { Location, PlayerState, CombatState, Profile, WorkbenchTab } from './types'
import { useTranslation } from 'react-i18next'
import Workbench from './Workbench'
import { getAssetPath } from '../../utils/assetPath'
import { getTranslatedText } from '../../utils/i18nUtils'
interface LocationViewProps {
location: Location
@@ -79,11 +82,12 @@ function LocationView({
onRepair,
onUncraft
}: LocationViewProps) {
useTranslation()
return (
<div className="location-view">
<div className="location-info">
<h2 className="centered-heading">
{location.name}
{getTranslatedText(location.name)}
{location.danger_level !== undefined && location.danger_level === 0 && (
<span className="danger-badge danger-safe" title="Safe Zone"> Safe</span>
)}
@@ -132,8 +136,8 @@ function LocationView({
{location.image_url && (
<div className="location-image-container">
<img
src={location.image_url}
alt={location.name}
src={getAssetPath(location.image_url)}
alt={getTranslatedText(location.name)}
className="location-image"
onError={(e: any) => (e.currentTarget.style.display = 'none')}
/>
@@ -141,7 +145,7 @@ function LocationView({
)}
<div className="location-description-box">
<p className="location-description">{location.description}</p>
<p className="location-description">{getTranslatedText(location.description)}</p>
</div>
</div>
@@ -176,7 +180,7 @@ function LocationView({
{enemy.id && (
<div className="entity-image">
<img
src={enemy.image_path ? `/${enemy.image_path}` : `/images/npcs/${enemy.name.toLowerCase().replace(/ /g, '_')}.webp`}
src={getAssetPath(enemy.image_path || `images/npcs/${enemy.name.toLowerCase().replace(/ /g, '_')}.webp`)}
alt={enemy.name}
onError={(e: any) => { e.currentTarget.style.display = 'none' }}
/>
@@ -301,7 +305,7 @@ function LocationView({
<div key={i} className="entity-card item-card">
{item.image_path ? (
<img
src={item.image_path}
src={getAssetPath(item.image_path)}
alt={item.name}
className="entity-icon"
onError={(e) => {