music: re-enable background loop (default = playful) + profile on/off; coins 2000
- sound.ts: restored startMusic (was a no-op stub) playing the selected track through musicGain (in-game mute still applies); default track switched to "playful" (per user). Music auto-starts on init when enabled. - Profile → Audio: re-added a music on/off toggle (so players can disable it outside the game too); SFX toggle unchanged. - Economy tune: starting coins 1000 → 2000 (mock defaultProfile + server ProfileDto) so new players start a bit richer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
import { Check, ChevronLeft, Crown, Eye, EyeOff, Gift, Lock, LogOut, MapPin, Pencil, Search, Star, Upload, Users, Volume2 } from "lucide-react";
|
||||
import { Check, ChevronLeft, Crown, Eye, EyeOff, Gift, Lock, LogOut, MapPin, Music, Pencil, Search, Star, Upload, Users, Volume2 } from "lucide-react";
|
||||
import { useRef, useState } from "react";
|
||||
import { ScreenHeader, ScreenShell } from "@/components/online/ScreenHeader";
|
||||
import { RankBadge } from "@/components/online/RankBadge";
|
||||
@@ -667,11 +667,12 @@ function CityRewardCard() {
|
||||
|
||||
function SoundSettings() {
|
||||
const { t } = useI18n();
|
||||
const { sfx, toggleSfx } = useSoundStore();
|
||||
const { sfx, toggleSfx, music, toggleMusic } = useSoundStore();
|
||||
return (
|
||||
<div className="panel rounded-2xl p-4">
|
||||
<h3 className="text-sm font-bold text-cream/80 mb-2">{t("settings.audio")}</h3>
|
||||
<ToggleRow icon={<Volume2 className="size-4 text-gold-400" />} label={t("settings.sound")} on={sfx} onClick={toggleSfx} />
|
||||
<ToggleRow icon={<Music className="size-4 text-gold-400" />} label={t("settings.music")} on={music} onClick={toggleMusic} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user