2021-09-14 02:37:35 +02:00
|
|
|
import React from "react";
|
|
|
|
|
2021-09-17 01:23:03 +02:00
|
|
|
import Accordion from "@mui/material/Accordion";
|
|
|
|
import AccordionSummary from "@mui/material/AccordionSummary";
|
|
|
|
import AccordionDetails from "@mui/material/AccordionDetails";
|
|
|
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
2021-09-14 02:37:35 +02:00
|
|
|
|
2021-09-17 01:23:03 +02:00
|
|
|
import Button from "@mui/material/Button";
|
2021-10-01 02:06:40 +02:00
|
|
|
import Typography from "@mui/material/Typography";
|
2022-10-10 00:42:14 +02:00
|
|
|
import { Player } from "@player";
|
2022-01-21 13:45:53 +01:00
|
|
|
import { Adjuster } from "./Adjuster";
|
2021-09-14 02:37:35 +02:00
|
|
|
|
2023-06-27 04:29:44 +02:00
|
|
|
export function SleevesDev(): React.ReactElement {
|
2021-09-14 02:37:35 +02:00
|
|
|
function sleeveMaxAllShock(): void {
|
2022-09-06 15:07:12 +02:00
|
|
|
for (let i = 0; i < Player.sleeves.length; ++i) {
|
2022-12-01 22:07:46 +01:00
|
|
|
Player.sleeves[i].shock = 100;
|
2021-09-14 02:37:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function sleeveClearAllShock(): void {
|
2022-09-06 15:07:12 +02:00
|
|
|
for (let i = 0; i < Player.sleeves.length; ++i) {
|
2022-12-01 22:07:46 +01:00
|
|
|
Player.sleeves[i].shock = 0;
|
2021-09-14 02:37:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function sleeveSyncMaxAll(): void {
|
2022-09-06 15:07:12 +02:00
|
|
|
for (let i = 0; i < Player.sleeves.length; ++i) {
|
|
|
|
Player.sleeves[i].sync = 100;
|
2021-09-14 02:37:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function sleeveSyncClearAll(): void {
|
2022-09-06 15:07:12 +02:00
|
|
|
for (let i = 0; i < Player.sleeves.length; ++i) {
|
|
|
|
Player.sleeves[i].sync = 0;
|
2021-09-14 02:37:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-21 13:45:53 +01:00
|
|
|
function sleeveSetStoredCycles(cycles: number): void {
|
2022-09-06 15:07:12 +02:00
|
|
|
for (let i = 0; i < Player.sleeves.length; ++i) {
|
|
|
|
Player.sleeves[i].storedCycles = cycles;
|
2022-01-21 13:45:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-14 02:37:35 +02:00
|
|
|
return (
|
2021-09-18 03:30:02 +02:00
|
|
|
<Accordion TransitionProps={{ unmountOnExit: true }}>
|
2021-09-14 02:37:35 +02:00
|
|
|
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
2021-10-01 22:22:33 +02:00
|
|
|
<Typography>Sleeves</Typography>
|
2021-09-14 02:37:35 +02:00
|
|
|
</AccordionSummary>
|
|
|
|
<AccordionDetails>
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2021-10-01 02:06:40 +02:00
|
|
|
<Typography>Shock:</Typography>
|
2021-09-14 02:37:35 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<Button onClick={sleeveMaxAllShock}>Max all</Button>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<Button onClick={sleeveClearAllShock}>Clear all</Button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2021-10-01 02:06:40 +02:00
|
|
|
<Typography>Sync:</Typography>
|
2021-09-14 02:37:35 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<Button onClick={sleeveSyncMaxAll}>Max all</Button>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<Button onClick={sleeveSyncClearAll}>Clear all</Button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2022-01-21 13:45:53 +01:00
|
|
|
<tr>
|
|
|
|
<td colSpan={3}>
|
|
|
|
<Adjuster
|
|
|
|
label="Stored Cycles"
|
|
|
|
placeholder="cycles"
|
|
|
|
tons={() => sleeveSetStoredCycles(10000000)}
|
|
|
|
add={sleeveSetStoredCycles}
|
|
|
|
subtract={sleeveSetStoredCycles}
|
|
|
|
reset={() => sleeveSetStoredCycles(0)}
|
|
|
|
/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2021-09-14 02:37:35 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</AccordionDetails>
|
|
|
|
</Accordion>
|
|
|
|
);
|
|
|
|
}
|