Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
36bd67b
Add basic outline for individual actuator control
Xephoidia Oct 24, 2024
2d72b99
Make actuator object update with UI
Xephoidia Oct 25, 2024
8826779
Add basic toyActuator functionality in game
Xephoidia Oct 25, 2024
138c75b
Add intensity range to vibrator control
Xephoidia Oct 29, 2024
584fcb8
Fix vibe activating when it shouldn't
Xephoidia Oct 29, 2024
b7ca368
Revert "Fix vibe activating when it shouldn't"
Xephoidia Oct 29, 2024
37cdbff
Remove VibrationMode and thump
Xephoidia Oct 30, 2024
5a1c100
Fix util and component exporting
Xephoidia Oct 30, 2024
ee512f5
Rename Vibrator class to ToyClient
Xephoidia Oct 30, 2024
9e731f7
Rename files to match new class names
Xephoidia Oct 30, 2024
e3bd870
Code cleanup
Xephoidia Oct 30, 2024
81e297d
Move business logic into ToyClient class
Xephoidia Oct 30, 2024
dfe4386
Remove commented out code
Xephoidia Oct 31, 2024
decc8ce
Fix unsupported actuators not being found
Xephoidia Nov 1, 2024
6dd0af0
Add LinearActuator class and supporting structures
Xephoidia Nov 2, 2024
5fc1b34
Fix ActuatorType, add LinearActuator Settings
Xephoidia Nov 2, 2024
ffc1747
Make position actuator settings show up
Xephoidia Nov 2, 2024
f69b854
Fix duration being float & position range off by 1
Xephoidia Nov 3, 2024
0e03733
Change range percentages from 0-100 to 0-1
Xephoidia Nov 3, 2024
bf1e526
Update Settings labels to fit new functionality
Xephoidia Nov 2, 2024
284a848
Fix devices being counted multiple times
Xephoidia Nov 3, 2024
92384f5
Fix GameToyClient naming mismatch
Xephoidia Nov 23, 2024
bcaef75
Move toy logic into its own folder
Xephoidia Nov 24, 2024
49e2179
Update user interface for toy settings
Xephoidia Apr 25, 2026
686ffa0
Fix code style
Xephoidia Apr 26, 2026
78ac639
Fixed non-const vars that should be const
Xephoidia Apr 26, 2026
5c7bbe3
Add support for Oscillate Actuators
Xephoidia Apr 26, 2026
42dd970
Add missing function dependency
Xephoidia Apr 26, 2026
5481b37
Make ToyActuatorSettings collapsible
Xephoidia Apr 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/game/GamePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
GameWarmup,
GameEmergencyStop,
GameSettings,
GameVibrator,
GameToyClient,
} from './components';
import { GameProvider } from './GameProvider';

Expand Down Expand Up @@ -89,7 +89,7 @@ export const GamePage = () => {
<GameIntensity />
<GamePace />
<GameSound />
<GameVibrator />
<GameToyClient />
<GameEvents />
</StyledLogicElements>
<GameImages />
Expand Down
4 changes: 2 additions & 2 deletions src/game/components/GameSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ImageSettings,
PaceSettings,
PlayerSettings,
VibratorSettings,
ToyListSettings,
} from '../../settings';
import { GamePhase, useGameValue, useSendMessage } from '../GameProvider';
import { useFullscreen, useLooping } from '../../utils';
Expand Down Expand Up @@ -63,7 +63,7 @@ const GameSettingsDialogContent = memo(() => (
<HypnoSettings />
<ClimaxSettings />
<BoardSettings />
<VibratorSettings />
<ToyListSettings />
<ImageSettings />
</StyledGameSettingsDialog>
));
Expand Down
45 changes: 45 additions & 0 deletions src/game/components/GameToyClient.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { useEffect, useState } from 'react';
import { GamePhase, useGameValue } from '../GameProvider';
import { useAutoRef } from '../../utils';
import { useToyClientValue } from '../../toy';
import { useSetting } from '../../settings';

export const GameToyClient = () => {
const [stroke] = useGameValue('stroke');
const [intensity] = useGameValue('intensity');
const [pace] = useGameValue('pace');
const [maxPace] = useSetting('maxPace');
const [phase] = useGameValue('phase');
const [devices] = useToyClientValue('devices');

const data = useAutoRef({
intensity,
pace,
devices,
});

const [currentPhase, setCurrentPhase] = useState(phase);

useEffect(() => {
const { intensity, pace, devices } = data.current;
devices.forEach(device => {
device.actuate(stroke, intensity, pace, maxPace);
});
}, [data, stroke, maxPace]);

useEffect(() => {
const { devices } = data.current;
if (currentPhase == phase) return;
switch (phase) {
case GamePhase.pause:
case GamePhase.break:
devices.forEach(device => device.stop());
break;
case GamePhase.climax:
devices.forEach(device => device.climax());
}
setCurrentPhase(phase);
}, [data, currentPhase, phase]);

return null;
};
72 changes: 0 additions & 72 deletions src/game/components/GameVibrator.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/game/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export * from './GameMeter';
export * from './GamePace';
export * from './GameSettings';
export * from './GameSound';
export * from './GameVibrator';
export * from './GameToyClient';
export * from './GameWarmup';
6 changes: 3 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { App } from './app/App.tsx';
import './index.css';
import { SettingsProvider, ImageProvider } from './settings';
import { E621Provider } from './e621';
import { VibratorProvider } from './utils';
import { ToyClientProvider } from './toy';
import { LocalImageProvider } from './local/LocalProvider.tsx';
import { registerServiceWorker } from './utils/serviceWorker.ts';

Expand All @@ -18,11 +18,11 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
<SettingsProvider>
<ImageProvider>
<LocalImageProvider>
<VibratorProvider>
<ToyClientProvider>
<E621Provider>
<App />
</E621Provider>
</VibratorProvider>
</ToyClientProvider>
</LocalImageProvider>
</ImageProvider>
</SettingsProvider>
Expand Down
4 changes: 1 addition & 3 deletions src/settings/SettingsProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback } from 'react';
import { GameEvent, GameHypnoType, PlayerBody, PlayerGender } from '../types';
import { createLocalStorageProvider, VibrationMode } from '../utils';
import { createLocalStorageProvider } from '../utils';
import { interpolateWith } from '../utils/translate';

export interface Settings {
Expand All @@ -18,7 +18,6 @@ export interface Settings {
body: PlayerBody;
highRes: boolean;
videoSound: boolean;
vibrations: VibrationMode;
imageDuration: number;
intenseImages: boolean;
}
Expand All @@ -38,7 +37,6 @@ export const defaultSettings: Settings = {
body: PlayerBody.penis,
highRes: false,
videoSound: false,
vibrations: VibrationMode.thump,
imageDuration: 20,
intenseImages: true,
};
Expand Down
4 changes: 2 additions & 2 deletions src/settings/SettingsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ServiceSettings,
ImageSettings,
BoardSettings,
VibratorSettings,
ToyListSettings,
TradeSettings,
} from './components';
import { ContentSection } from '../common';
Expand All @@ -36,7 +36,7 @@ export const SettingsSection = () => {
<BoardSettings />
<ServiceSettings />
<ImageSettings />
<VibratorSettings />
<ToyListSettings />
<TradeSettings />
</StyledSettingsSection>
);
Expand Down
Loading