[MIRROR] multiple UI timing issues (#8418)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2
2024-05-21 12:18:54 -07:00
committed by GitHub
parent d3975f57a4
commit fe7e122a19
5 changed files with 13 additions and 13 deletions

View File

@@ -107,7 +107,7 @@
/obj/item/device/assembly/prox_sensor/tgui_data(mob/user)
var/list/data = ..()
data["time"] = time * 10
data["time"] = time
data["timing"] = timing
data["range"] = range
data["maxRange"] = 5
@@ -135,7 +135,7 @@
for(var/i in 1 to LAZYLEN(L))
real_new_time += text2num(L[i]) * (60 ** (LAZYLEN(L) - i))
else
real_new_time = text2num(new_time)
real_new_time = text2num(new_time * 10)
time = clamp(real_new_time, 0, 600)
return TRUE
if("range")

View File

@@ -73,7 +73,7 @@
/obj/item/device/assembly/timer/tgui_data(mob/user)
var/list/data = ..()
data["time"] = time * 10
data["time"] = time
data["timing"] = timing
return data
@@ -94,6 +94,6 @@
for(var/i in 1 to LAZYLEN(L))
real_new_time += text2num(L[i]) * (60 ** (LAZYLEN(L) - i))
else
real_new_time = text2num(new_time)
real_new_time = text2num(new_time * 10)
time = clamp(real_new_time, 0, 600)
return TRUE

View File

@@ -30,8 +30,8 @@ export const AssemblyProx = (props) => {
fluid
value={time / 10}
minValue={0}
maxValue={600}
format={(val) => formatTime(round(val))}
maxValue={60}
format={(val) => formatTime(round(val * 10))}
onDrag={(e, val) => act('set_time', { time: val })}
/>
</LabeledList.Item>

View File

@@ -30,8 +30,8 @@ export const AssemblyTimer = (props) => {
fluid
value={time / 10}
minValue={0}
maxValue={600}
format={(val) => formatTime(round(val))}
maxValue={60}
format={(val) => formatTime(round(val * 10))}
onDrag={(e, val) => act('set_time', { time: val })}
/>
</LabeledList.Item>

View File

@@ -8,7 +8,7 @@ import { Window } from '../layouts';
export const BrigTimer = (props) => {
const { act, data } = useBackend();
return (
<Window width={300} height={138}>
<Window width={400} height={138}>
<Window.Content scrollable>
<Section
title="Cell Timer"
@@ -40,7 +40,7 @@ export const BrigTimer = (props) => {
value={data.time_left / 10}
minValue={0}
maxValue={data.max_time_left / 10}
format={(val) => formatTime(round(val))}
format={(val) => formatTime(round(val * 10))}
onDrag={(e, val) => act('time', { time: val })}
/>
<Flex mt={1}>
@@ -50,7 +50,7 @@ export const BrigTimer = (props) => {
icon="hourglass-start"
onClick={() => act('preset', { preset: 'short' })}
>
{'Add ' + formatTime(data.preset_short / 10)}
{'Add ' + formatTime(data.preset_short)}
</Button>
</Flex.Item>
<Flex.Item grow={1}>
@@ -59,7 +59,7 @@ export const BrigTimer = (props) => {
icon="hourglass-start"
onClick={() => act('preset', { preset: 'medium' })}
>
{'Add ' + formatTime(data.preset_medium / 10)}
{'Add ' + formatTime(data.preset_medium)}
</Button>
</Flex.Item>
<Flex.Item grow={1}>
@@ -68,7 +68,7 @@ export const BrigTimer = (props) => {
icon="hourglass-start"
onClick={() => act('preset', { preset: 'long' })}
>
{'Add ' + formatTime(data.preset_long / 10)}
{'Add ' + formatTime(data.preset_long)}
</Button>
</Flex.Item>
</Flex>