PR: refactor name

This commit is contained in:
math-pixel
2026-05-12 13:42:23 +02:00
parent 2c3f0db65b
commit eab552a09b
3 changed files with 9 additions and 28 deletions
@@ -0,0 +1,42 @@
import { InteractableObject } from "@/components/three/interaction/InteractableObject";
import { useGameStore } from "@/managers/stores/useGameStore";
import { Debug } from "@/utils/debug/Debug";
import type { Vector3Tuple } from "@/types/three/three";
interface NPCHelperProps {
position: Vector3Tuple;
}
export function NPCHelper({ position }: NPCHelperProps): React.JSX.Element {
const step = useGameStore((state) => state.missionFlow.step);
const setStep = useGameStore((state) => state.setFlowStep);
const debug = Debug.getInstance();
const handlePress = (): void => {
if (step === "searching") {
setStep("helped");
}
};
const shouldShow = step === "searching" || debug.active;
if (!shouldShow) {
return <></>;
}
return (
<InteractableObject
kind="trigger"
label="villageois_helper"
position={position}
onPress={handlePress}
>
<group position={position}>
<mesh>
<sphereGeometry args={[0.5, 16, 16]} />
<meshStandardMaterial color="cyan" />
</mesh>
</group>
</InteractableObject>
);
}