Skip to content

Commit

Permalink
followup
Browse files Browse the repository at this point in the history
  • Loading branch information
MosleyTheMalO committed Oct 11, 2023
1 parent dca4dab commit 8778fce
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 104 deletions.
118 changes: 59 additions & 59 deletions tgui/packages/tgui/interfaces/ChastityRemote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,78 +15,78 @@ export const ChastityRemote = (_: any, context: any) => {
const { power, minPower, maxPower, mode } = data;

return (
<Window
width={350}
height={200}>
<Window
width={350}
height={200}>

<Window.Content>
<RoundGauge
mt={2.5}
ml={5}
ranges={{
<Window.Content>
<RoundGauge
mt={2.5}
ml={5}
ranges={{
"good": [minPower, maxPower * .5],
"average": [maxPower * .5, maxPower * .85],
"bad": [maxPower * .85, maxPower],
}}
value={power}
size={1.85}
minValue={minPower}
maxValue={maxPower}
alertAfter={maxPower * .85}
}}
value={power}
size={1.85}
minValue={minPower}
maxValue={maxPower}
alertAfter={maxPower * .85}
/>

<Flex>
<Flex.Item>
<Knob
ml={5}
mt={2.5}
value={power}
step={.5}
size={1.5}
stepPixelSize={10}
minValue={minPower}
maxValue={maxPower}
onDrag={(_e: any, value: any) => act("change_power", { power: value })}
<Flex>
<Flex.Item>
<Knob
ml={5}
mt={2.5}
value={power}
step={.5}
size={1.5}
stepPixelSize={10}
minValue={minPower}
maxValue={maxPower}
onDrag={(_e: any, value: any) => act("change_power", { power: value })}
/>
</Flex.Item>
</Flex.Item>

<Flex.Item>
<Flex ml={10}>
<Flex.Item>
<Button
color={mode === "stimulation" ? "pink" : "default"}
mr={3}
fontSize={1.25}
onClick={() => act("change_mode", { mode: "stimulation" })}
<Flex.Item>
<Flex ml={10}>
<Flex.Item>
<Button
color={mode === "stimulation" ? "pink" : "default"}
mr={3}
fontSize={1.25}
onClick={() => act("change_mode", { mode: "stimulation" })}
>
Stimulate
</Button>
Stimulate
</Button>

<Button
color={mode === "shock" ? "red" : "default"}
fontSize={1.25}
onClick={() => act("change_mode", { mode: "shock" })}
<Button
color={mode === "shock" ? "red" : "default"}
fontSize={1.25}
onClick={() => act("change_mode", { mode: "shock" })}
>
Shock
</Button>
</Flex.Item>
</Flex>
Shock
</Button>
</Flex.Item>
</Flex>

<Button
color="green"
ml={15}
mt={2}
mb={5}
fontSize={1.25}
onClick={() => act("activate")}
<Button
color="green"
ml={15}
mt={2}
mb={5}
fontSize={1.25}
onClick={() => act("activate")}
>
Activate
<Icon name="plus" ml={1} />
</Button>
</Flex.Item>
</Flex>
Activate
<Icon name="plus" ml={1} />
</Button>
</Flex.Item>
</Flex>

</Window.Content>
</Window>
</Window.Content>
</Window>
);
};
90 changes: 45 additions & 45 deletions tgui/packages/tgui/interfaces/GenitalArousalPermission.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* eslint-disable indent */
import { useBackend } from "../backend";
import { Button, Flex, Section, Tooltip, Box} from "../components";
import { Button, Flex, Section, Tooltip, Box } from "../components";
import { Window } from "../layouts";

type ChastityHypno = {
genitals: []
}

const getTooltip = (mod: string) => {
switch(mod) {
switch (mod) {
case "None":
return "Genital behaves normally.";
case "Impotent":
Expand All @@ -22,62 +22,62 @@ const getTooltip = (mod: string) => {
case "Hyper-Sensitive":
return "Genital produces 3x arousal.";
default:
return "..."
return "...";
}
}
};

export const GenitalArousalPermission = (_: any, context: any) => {
const { act, data } = useBackend<ChastityHypno>(context);
const { genitals } = data;
return(
<Window
width={300}
height={350}>
return (
<Window
width={300}
height={350}>

<Window.Content>
<Section fill>
<Flex direction="column" align="center">
{
Object.keys(genitals).map((G,) => (
<Flex.Item key={G}>
<Flex.Item textAlign="center" fontSize={1.25}>
<b>{G}</b>
</Flex.Item>
<Flex mt={.5} mb={3}>
<Button
color="default"
icon="arrow-left"
onClick={() => act("change_mode", { genital: G, direction: "left" })}
<Window.Content>
<Section fill>
<Flex direction="column" align="center">
{
Object.keys(genitals).map((G) => (
<Flex.Item key={G}>
<Flex.Item textAlign="center" fontSize={1.25}>
<b>{G}</b>
</Flex.Item>
<Flex mt={.5} mb={3}>
<Button
color="default"
icon="arrow-left"
onClick={() => act("change_mode", { genital: G, direction: "left" })}
/>
<Tooltip position="top" content={getTooltip(genitals[G])}>
<Box textAlign="center" width={13}>{genitals[G]}</Box>
</Tooltip>
<Button
color="default"
icon="arrow-right"
onClick={() => act("change_mode", { genital: G, direction: "right" })}
<Tooltip position="top" content={getTooltip(genitals[G])}>
<Box textAlign="center" width={13}>{genitals[G]}</Box>
</Tooltip>
<Button
color="default"
icon="arrow-right"
onClick={() => act("change_mode", { genital: G, direction: "right" })}
/>
</Flex>
</Flex.Item>
</Flex>
</Flex.Item>
))
}

<Flex.Item>
<Button
mt={1}
color="green"
onClick={() => act("save")}
align="center"
content="Save"
icon="check"
fontSize={1.4}
<Flex.Item>
<Button
mt={1}
color="green"
onClick={() => act("save")}
align="center"
content="Save"
icon="check"
fontSize={1.4}
/>
</Flex.Item>
</Flex>
</Section>
</Flex.Item>
</Flex>
</Section>

</Window.Content>
</Window.Content>

</Window>
</Window>
);
};

0 comments on commit 8778fce

Please sign in to comment.