Skip to content

Commit 5ef0838

Browse files
committed
Stub out a lot of code for Occult Crescent
1 parent ac34988 commit 5ef0838

16 files changed

+772
-116
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lynn",
3-
"version": "24.0.5.alpha",
3+
"version": "24.0.6.alpha",
44
"private": true,
55
"dependencies": {
66
"@date-io/dayjs": "^2.16.0",

src/App.jsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import DRSRunHolsterCreatorContainerComponent from './drs/create/DRSRunHolsterCr
2626
import BAMorbolMapComponent from './BAMorbolMapComponent';
2727
import MapPageComponent from './map/MapPageComponent';
2828
import OccultCrescentGuideMain from './occult/OccultCrescentGuideMain';
29-
import ForayActionDisplayMainComponent from './common/foray_action_display/ForayActionDisplayMainComponent';
29+
import OccultPhantomJobHelperComponent from './occult/phantom_jobs/OccultPhantomJobHelperComponent';
3030

3131
export const ColorModeContext = React.createContext({ toggleColorMode: () => { } });
3232

@@ -56,8 +56,7 @@ function WrappedMainComponent({ component, page }) {
5656
return (
5757
<MainComponent
5858
component={component}
59-
page={page}
60-
type={params.type}
59+
phantomJob={params.phantomJob}
6160
colorModeContext={ColorModeContext}
6261
/>
6362
);
@@ -146,7 +145,13 @@ const router = createBrowserRouter([
146145
},
147146
{
148147
path: '/occult/phantomjob',
149-
element: <WrappedMainComponent component={<ForayActionDisplayMainComponent />} page="occultphantomjob" />,
148+
element: <WrappedMainComponent component={<OccultPhantomJobHelperComponent />} page="occultphantomjob" />,
149+
children: [
150+
{
151+
path: '/occult/phantomjob/:phantomjob',
152+
element: <WrappedMainComponent component={<OccultPhantomJobHelperComponent />} page="occultphantomjob" />,
153+
},
154+
],
150155
},
151156
{
152157
path: '/occult/guide',

src/FooterComponent.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function FooterComponent() {
1818
alignItems="center"
1919
>
2020
<Typography variant="subtitle2" fontSize={12} maxWidth={600} textAlign="left">
21-
FINAL FANTASY XIV © 2010 - 2023 SQUARE ENIX CO., LTD. FINAL FANTASY, FINAL FANTASY
21+
FINAL FANTASY XIV © 2010 - 2025 SQUARE ENIX CO., LTD. FINAL FANTASY, FINAL FANTASY
2222
XIV, and FFXIV are registered trademarks or trademarks of Square Enix Holdings Co.,
2323
Ltd. All material used under license.
2424
</Typography>

src/MainComponent.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export default function MainComponent({
1818
logosAction,
1919
mapId,
2020
initialMapPosition,
21+
inputAction,
22+
forayName,
2123
colorModeContext,
2224
}) {
2325
/**
@@ -92,6 +94,8 @@ export default function MainComponent({
9294
logosAction,
9395
mapId,
9496
initialMapPosition,
97+
inputAction,
98+
forayName,
9599
resetTimer,
96100
})}
97101

src/MainPageComponent.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,14 @@ export default function MainPageComponent() {
8787
{' '}
8888
{getSiteName()}
8989
, a home for tools to help with Final Fantasy XIV side
90-
content - primarily Eureka (Baldesion Arsenal) and Bozja (Delubrum Reginae
91-
Savage). Find out how to build and gather materials for Lost Actions and
92-
Logos Actions, what to bring for Baldesion Arsenal or Delubrum Reginae
93-
Savage runs, when the next Cassie or Crab spawn is, and more!
90+
content - including the Occult Crescent (Forked Tower), Eureka (The Baldesion
91+
Arsenal), and Bozja (Delubrum Reginae Savage). Find out how to build and gather
92+
materials for Lost Actions and Logos Actions, what to bring for The Baldesion
93+
Arsenal or Delubrum Reginae Savage runs, when the next Cassie or Crab spawn is,
94+
and more!
9495
</Typography>
9596
<Typography textAlign="left" fontSize={textSize}>
96-
Looking for a group to run BA or DRS with? Most of the content on this site
97+
Looking for a group to run Forked Tower, BA, or DRS with? Most of the content on this site
9798
was designed for runs on
9899
{' '}
99100
<a
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import React, { useState } from 'react';
2+
import { Divider, Stack, Typography } from '@mui/material';
3+
import { v4 as uuidv4 } from 'uuid';
4+
import EurekaLogosActionHelper from '../../eureka/lib/EurekaLogosActionHelper';
5+
import universalisPriceHelperInstance from '../../acquisition/UniversalisPriceHelper';
6+
import EurekaLogosActionRecipeSelectorComponent from '../../eureka/EurekaLogosActionRecipeSelectorComponent';
7+
import EurekaLogogramDataComponent from '../../eureka/EurekaLogogramDataComponent';
8+
9+
export default function EurekaLogosActionDataComponentInnerShim({
10+
logosAction,
11+
selectedRecipe,
12+
handleRecipeUpdate,
13+
}) {
14+
/**
15+
* Component State
16+
*/
17+
const [actionPriceData, setActionPriceData] = useState(null);
18+
const [lastUpdated, setLastUpdated] = useState(new Date());
19+
20+
function updateGuideState(priceData) {
21+
setActionPriceData(priceData);
22+
setLastUpdated(new Date());
23+
}
24+
25+
// Fetch price data
26+
if (selectedRecipe) {
27+
const recipeLogograms = selectedRecipe.map(
28+
(i) => EurekaLogosActionHelper.getLogogramForMneme(i),
29+
);
30+
31+
if (recipeLogograms.length > 0) {
32+
universalisPriceHelperInstance.fetchIDs(recipeLogograms, updateGuideState);
33+
}
34+
}
35+
36+
/**
37+
* Render logic
38+
*/
39+
if (logosAction === '') {
40+
return null;
41+
}
42+
43+
const actionData = EurekaLogosActionHelper.getLogosActionData(logosAction);
44+
45+
if (actionData === undefined) {
46+
return null;
47+
}
48+
49+
return (
50+
<Stack spacing={2} p={1} alignItems="flex-start" width={1000}>
51+
<Typography fontWeight={700} variant="h5">Recipes</Typography>
52+
<EurekaLogosActionRecipeSelectorComponent
53+
recipes={actionData.recipes}
54+
selectedRecipe={selectedRecipe}
55+
handleRecipeUpdate={handleRecipeUpdate}
56+
/>
57+
<Divider />
58+
<Typography fontWeight={700} variant="h5">Logograms Needed</Typography>
59+
<Stack spacing={2} divider={<Divider variant="middle" />}>
60+
{
61+
selectedRecipe ? selectedRecipe.map((i) => {
62+
const mnemeData = EurekaLogosActionHelper.getMnemeData(i);
63+
const logogramData = EurekaLogosActionHelper.getLogogramData(mnemeData.logogram);
64+
return (
65+
<EurekaLogogramDataComponent
66+
logogramData={logogramData}
67+
mnemeData={mnemeData}
68+
mneme={i}
69+
priceData={actionPriceData ? actionPriceData[mnemeData.logogram] : null}
70+
lastUpdated={lastUpdated}
71+
key={uuidv4()}
72+
/>
73+
);
74+
})
75+
: null
76+
}
77+
</Stack>
78+
79+
</Stack>
80+
);
81+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React, { useCallback, useState } from 'react';
2+
import EurekaLogosActionHelper from '../../eureka/lib/EurekaLogosActionHelper';
3+
import EurekaLogosActionDataComponentInnerShim from './EurekaLogosActionDataComponentInnerShim';
4+
5+
export default function EurekaLogosActionDataComponentOuterShim({ action }) {
6+
console.log('action', action);
7+
const logosActionData = EurekaLogosActionHelper.getLogosActionData(action);
8+
console.log('data', logosActionData);
9+
let initialSelectedRecipe = null;
10+
if (logosActionData) {
11+
[initialSelectedRecipe] = logosActionData.recipes;
12+
}
13+
14+
const [selectedRecipe, setSelectedRecipe] = useState(initialSelectedRecipe);
15+
16+
const handleRecipeUpdate = useCallback((event, value) => {
17+
if (value) {
18+
setSelectedRecipe(value.split(','));
19+
}
20+
}, [setSelectedRecipe]);
21+
22+
return (
23+
<EurekaLogosActionDataComponentInnerShim
24+
logosAction={action}
25+
selectedRecipe={selectedRecipe}
26+
handleRecipeUpdate={handleRecipeUpdate}
27+
/>
28+
);
29+
}
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
import React from 'react';
2+
import {
3+
Box,
4+
Paper,
5+
Stack,
6+
Typography,
7+
useTheme,
8+
alpha,
9+
} from '@mui/material';
10+
11+
import ScaleIcon from '@mui/icons-material/Scale';
12+
13+
export default function ForayActionDisplayInformationComponent({
14+
forayActionDisplaySettings,
15+
action,
16+
actionData,
17+
}) {
18+
const theme = useTheme();
19+
20+
function getTitleExtraComponent() {
21+
if (forayActionDisplaySettings.name === 'bozja') {
22+
return (
23+
<Stack direction="row" alignItems="center" spacing={2}>
24+
<ScaleIcon />
25+
<Typography fontWeight={700} variant="h4" pr={3} pl={1}>{actionData.weight}</Typography>
26+
</Stack>
27+
);
28+
}
29+
30+
return null;
31+
}
32+
33+
function getDescriptionExtraComponent() {
34+
if (forayActionDisplaySettings.name === 'bozja') {
35+
return (
36+
<Typography
37+
textAlign="left"
38+
pl={3}
39+
pr={2}
40+
fontWeight={700}
41+
>
42+
Rank:
43+
{' '}
44+
{actionData.rank}
45+
</Typography>
46+
);
47+
}
48+
49+
return null;
50+
}
51+
52+
return (
53+
<Paper
54+
elevation={3}
55+
sx={{
56+
width: '100%',
57+
borderRadius: '12px',
58+
overflow: 'hidden',
59+
background: `linear-gradient(135deg, ${alpha(theme.palette.primary.dark, 0.1)}, ${alpha(theme.palette.background.paper, 0.6)})`,
60+
border: `1px solid ${alpha(theme.palette.divider, 0.1)}`,
61+
}}
62+
>
63+
<Box
64+
sx={{
65+
background: `linear-gradient(90deg, ${alpha(theme.palette.primary.main, 0.15)}, transparent)`,
66+
py: 1,
67+
px: 2,
68+
}}
69+
>
70+
<Stack direction="row" alignItems="center" spacing={2}>
71+
<img
72+
src={`${process.env.PUBLIC_URL}/assets/${forayActionDisplaySettings.assetUriPrefix}/${actionData.image}.${forayActionDisplaySettings.assetUriType}`}
73+
width={48}
74+
height={48}
75+
alt={action}
76+
/>
77+
<Box width={12} />
78+
<Typography fontWeight={700} variant="h4">{action}</Typography>
79+
<Box flexGrow={1} />
80+
{ getTitleExtraComponent() }
81+
</Stack>
82+
</Box>
83+
84+
<Box p={2}>
85+
<Stack direction="row" pl={3} alignItems="center" spacing={3} pb={2}>
86+
<Typography fontWeight={700}>{actionData.abilityType}</Typography>
87+
{actionData.duration
88+
? (
89+
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
90+
<Typography variant="body2" color="text.secondary">Duration:</Typography>
91+
<Typography fontWeight={600}>{actionData.duration}</Typography>
92+
</Box>
93+
)
94+
: null}
95+
{actionData.castTime
96+
? (
97+
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
98+
<Typography variant="body2" color="text.secondary">Cast:</Typography>
99+
<Typography fontWeight={600}>
100+
{actionData.castTime}
101+
s
102+
</Typography>
103+
</Box>
104+
)
105+
: null}
106+
{actionData.recastTime
107+
? (
108+
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
109+
<Typography variant="body2" color="text.secondary">Recast:</Typography>
110+
<Typography fontWeight={600}>
111+
{actionData.recastTime}
112+
s
113+
</Typography>
114+
</Box>
115+
)
116+
: null}
117+
{actionData.mpCost
118+
? (
119+
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
120+
<Typography variant="body2" color="text.secondary">MP:</Typography>
121+
<Typography fontWeight={600}>{actionData.mpCost}</Typography>
122+
</Box>
123+
)
124+
: null}
125+
{actionData.charges
126+
? (
127+
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
128+
<Typography variant="body2" color="text.secondary">Charges:</Typography>
129+
<Typography fontWeight={600}>{actionData.charges}</Typography>
130+
</Box>
131+
)
132+
: null}
133+
134+
</Stack>
135+
136+
<Typography
137+
textAlign="left"
138+
pl={3}
139+
pr={2}
140+
style={{ whiteSpace: 'pre-wrap' }}
141+
>
142+
{actionData.actionText}
143+
</Typography>
144+
145+
{ getDescriptionExtraComponent() }
146+
147+
<Stack direction="row" spacing={1}>
148+
<Typography fontWeight={700} pl={3}>Usable by:</Typography>
149+
{
150+
actionData.roles.map((i) => (
151+
<Box>
152+
<img
153+
src={`${process.env.PUBLIC_URL}/assets/roles/${i}.png`}
154+
width={24}
155+
height={24}
156+
alt={i}
157+
/>
158+
</Box>
159+
))
160+
}
161+
</Stack>
162+
</Box>
163+
</Paper>
164+
);
165+
}

0 commit comments

Comments
 (0)