Merge pull request #16466 from ShadowLarkens/tank

Add button to access tank settings in RIGs
This commit is contained in:
Heroman3003
2024-10-14 05:17:23 +10:00
committed by GitHub
2 changed files with 38 additions and 37 deletions
@@ -166,4 +166,7 @@
. = TRUE
if("select_charge_type")
module.charge_selected = params["charge_type"]
. = TRUE
. = TRUE
if("tank_settings")
air_supply?.attack_self(usr)
. = TRUE
@@ -28,47 +28,45 @@ export const RIGSuitStatus = (props) => {
coverlock,
} = data;
const SealButton = (
<Button
icon={sealing ? 'redo' : sealed ? 'power-off' : 'lock-open'}
iconSpin={sealing}
disabled={sealing}
selected={sealed}
onClick={() => act('toggle_seals')}
>
{'Suit ' +
(sealing ? 'seals working...' : sealed ? 'is Active' : 'is Inactive')}
</Button>
);
const CoolingButton = (
<Button
icon={'power-off'}
selected={cooling}
onClick={() => act('toggle_cooling')}
>
{'Suit Cooling ' + (cooling ? 'is Active' : 'is Inactive')}
</Button>
);
const AIButton = (
<Button
selected={aioverride}
icon="robot"
onClick={() => act('toggle_ai_control')}
>
{'AI Control ' + (aioverride ? 'Enabled' : 'Disabled')}
</Button>
);
return (
<Section
title="Status"
buttons={
<>
{SealButton}
{AIButton}
{CoolingButton}
<Button
icon={sealing ? 'redo' : sealed ? 'power-off' : 'lock-open'}
iconSpin={sealing}
disabled={sealing}
selected={sealed}
onClick={() => act('toggle_seals')}
>
{'Suit ' +
(sealing
? 'seals working...'
: sealed
? 'is Active'
: 'is Inactive')}
</Button>
<Button
icon="robot"
selected={aioverride}
onClick={() => act('toggle_ai_control')}
tooltip={'AI Control ' + (aioverride ? 'Enabled' : 'Disabled')}
tooltipPosition="bottom-end"
/>
<Button
icon="wind"
selected={cooling}
onClick={() => act('toggle_cooling')}
tooltip={'Suit Cooling ' + (cooling ? 'is Active' : 'is Inactive')}
tooltipPosition="bottom-end"
/>
<Button
icon="lungs"
onClick={() => act('tank_settings')}
tooltip="Tank Settings"
tooltipPosition="bottom-end"
/>
</>
}
>