Skip to content

Commit

Permalink
Update DropshipFlightControl.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGamerdk committed Oct 15, 2023
1 parent d7e7202 commit 96f32c2
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions tgui/packages/tgui/interfaces/DropshipFlightControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ export const DropshipDestinationSelection = (_, context) => {
selected={siteselection}
onClick={(value) => {
setSiteSelection(value);
if (data.flight_configuration === 'flyby') {
act('set-ferry');
}
act('button-push');
}}
/>
Expand Down Expand Up @@ -190,27 +193,20 @@ const FlybyControl = (props, context) => {
className="flybyControl"
buttons={
<>
{data.flight_configuration === 'flyby' && (
<Button icon="road" onClick={() => act('set-ferry')}>
Set ferry
</Button>
)}
{data.has_flyby_skill === 1 && data.flight_configuration === 'ferry' && (
<Button icon="jet-fighter" onClick={() => act('set-flyby')}>
Set flyby
{data.has_flyby_skill === 1 && data.shuttle_mode === 'idle' && (
<Button
color="red"
icon="jet-fighter"
onClick={() => {
act('set-flyby');
act('move', { target: null });
}}>
Launch Flyby
</Button>
)}
{data.has_flyby_skill === 1 && data.shuttle_mode === 'called' && (
<Button onClick={() => act('cancel-flyby')}>cancel flyby</Button>
)}
{data.has_flyby_skill === 1 && data.shuttle_mode === 'idle' && (
<Button
icon="rocket"
disabled={data.flight_configuration === 'ferry'}
onClick={() => act('move')}>
Launch
</Button>
)}
</>
}
/>
Expand Down Expand Up @@ -321,10 +317,7 @@ const RenderScreen = (props, context) => {
(data.shuttle_mode === 'idle' || data.shuttle_mode === 'called') && (
<FlybyControl />
)}
{data.shuttle_mode === 'idle' &&
data.flight_configuration !== 'flyby' && (
<DropshipDestinationSelection />
)}
{data.shuttle_mode === 'idle' && <DropshipDestinationSelection />}
{data.shuttle_mode === 'igniting' && <LaunchCountdown />}
{data.shuttle_mode === 'pre-arrival' && <TouchdownCooldown />}
{data.shuttle_mode === 'recharging' && <ShuttleRecharge />}
Expand Down

0 comments on commit 96f32c2

Please sign in to comment.