Skip to content

Commit

Permalink
fix(oracles): removed ask the oracle oracles from the list
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbenton committed Nov 14, 2023
1 parent aa355ad commit 5f53d02
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Added ability to remove lore, location, and NPC images by making them fullscreen and clicking the delete button
- Moved Oracle tab to be with moves on desktop devices
- Moved oracle pins to be in the oracle dialog to save space
- Removed "Ask the Oracle" oracles from the oracle list, since they are pinned up top

### Accessibility

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRoller } from "providers/DieRollProvider";
import { OracleListItem } from "./OracleListItem";
import { OracleSet } from "dataforged";
import { useLinkedDialog } from "providers/LinkedDialogProvider";
import { hiddenOracleIds } from "data/oracles";
import { hiddenOracleCategoryIds } from "data/oracles";

export interface OracleCategoryProps {
prefix?: string;
Expand All @@ -23,6 +23,10 @@ export function OracleCategory(props: OracleCategoryProps) {

const sampleNames = category["Sample Names" as "Sample names"];

if (hiddenOracleCategoryIds[category.$id]) {
return null;
}

return (
<>
<List disablePadding>
Expand Down Expand Up @@ -56,7 +60,7 @@ export function OracleCategory(props: OracleCategoryProps) {
)}
{Object.keys(category.Tables ?? {}).map((oracleId, index) => {
const oracle = category.Tables?.[oracleId];
if (hiddenOracleIds[oracleId] || !oracle) return null;
if (!oracle) return null;
return (
<OracleListItem
id={oracle.$id}
Expand Down
9 changes: 3 additions & 6 deletions src/data/oracles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,7 @@ Object.keys(category).forEach((oracleCategoryId) => {
};
});

export const hiddenOracleIds: { [oracleId: string]: boolean } = {
"ironsworn/oracles/moves/ask_the_oracle/almost_certain": true,
"ironsworn/oracles/moves/ask_the_oracle/likely": true,
"ironsworn/oracles/moves/ask_the_oracle/50_50": true,
"ironsworn/oracles/moves/ask_the_oracle/unlikely": true,
"ironsworn/oracles/moves/ask_the_oracle/small_chance": true,
export const hiddenOracleCategoryIds: { [oracleId: string]: boolean } = {
"ironsworn/oracles/moves/ask_the_oracle": true,
"starforged/oracles/moves/ask_the_oracle": true,
};

0 comments on commit 5f53d02

Please sign in to comment.