Skip to content

Commit

Permalink
Some minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaseLewis committed Aug 26, 2024
1 parent 24446fb commit fa278a9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
6 changes: 3 additions & 3 deletions app/src/components/PintaMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ export const PintaMap = (props: PintaMapProps) => {
const Y = 5 - Math.max(index - X*6,0);

return {
outline: "2px solid red",
outline: "3px solid red",
width: "calc(100% / 7 - 3px)",
height: "calc(100% / 6 - 3px)",
height: "calc(100% / 6 - 4px)",
position: "absolute",
left: `calc( ${X} * 100% / 7 + ${1}px)`,
left: `calc( ${X} * 100% / 7)`,
top: `calc(${Y} * 100% / 6 - ${Y-1}px + 1px)`
} as React.CSSProperties;
},[uiStore.selectedArea]);
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const Settings = () => {
>
<InputNumber
value={stateStore.drift}
min={-1} max={1} step={0.016}
min={-1} max={1} step={0.008}
onChange={(value) => {
stateStore.updateDrift(value || 0);
}}
Expand All @@ -29,7 +29,7 @@ export const Settings = () => {
>
<InputNumber
value={stateStore.anticipation}
min={0} max={1} step={0.016}
min={0} max={1} step={0.008}
onChange={(value) => {
stateStore.updateAnticipation(value || 0);
}}
Expand Down
19 changes: 15 additions & 4 deletions app/src/components/TimingBar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CSSProperties, useEffect, useMemo, useRef } from "react";
import { useStateMachineStore, StateMachineInterface, PintaState } from '../contexts/StateMachineContext';
import { AudioEvent } from "../utils/Timing";

export interface TimingBarProps {
title: string,
Expand Down Expand Up @@ -102,10 +103,20 @@ export const TimingBar = (props: TimingBarProps) => {
timeInState = (stateInfo.endTimestamp - stateInfo.startedTimestamp)/1000.0;
} else {
timeInState = (performance.now() - stateInfo.startedTimestamp)/1000.0;
// We should auto transition here so the user doesn't get screwed if the audio
// fails to get picked up properlyl
// if(timeInState > (duration + window + EXTRA_TIME)) {

// We should auto transition here so the user doesn't get screwed if the audio fails to get picked up properly
// if(timeInState >= (duration + window + EXTRA_TIME)) {
// switch(activeState)
// {
// case PintaState.MenuOpen:
// stateStore.transition(AudioEvent.CloseMenu);
// break;
// case PintaState.EventInProgress:
// stateStore.transition(AudioEvent.OpenMenu);
// break;
// case PintaState.TradeInProgress:
// stateStore.transition(AudioEvent.OpenMenu);
// break;
// }
// }
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/utils/Loot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const DEFAULT_ITEM_MAP: { [key: number]: ItemTiming[] }= {
{ event: "TradeShip", type: null, item: "3B->4B", min: 1, max: 1.1 },
{ event: "FoundItem", type: "A", item: "Eye of Truth", min: 1.150, max: 1.206 },
{ event: "FoundItem", type: "A", item: "Moonberry", min: 3.988, max: 4.066 },
{ event: "FoundItem", type: "A", item: "Magillex Idol", min: 5.530, max: 5.630 }
{ event: "FoundItem", type: "A", item: "Magillex Idol", min: 5.534, max: 5.630 }
],
//Need to double check this
15: [
Expand Down

0 comments on commit fa278a9

Please sign in to comment.