mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
[MIRROR] multiple UI timing issues (#8418)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -107,7 +107,7 @@
|
|||||||
/obj/item/device/assembly/prox_sensor/tgui_data(mob/user)
|
/obj/item/device/assembly/prox_sensor/tgui_data(mob/user)
|
||||||
var/list/data = ..()
|
var/list/data = ..()
|
||||||
|
|
||||||
data["time"] = time * 10
|
data["time"] = time
|
||||||
data["timing"] = timing
|
data["timing"] = timing
|
||||||
data["range"] = range
|
data["range"] = range
|
||||||
data["maxRange"] = 5
|
data["maxRange"] = 5
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
for(var/i in 1 to LAZYLEN(L))
|
for(var/i in 1 to LAZYLEN(L))
|
||||||
real_new_time += text2num(L[i]) * (60 ** (LAZYLEN(L) - i))
|
real_new_time += text2num(L[i]) * (60 ** (LAZYLEN(L) - i))
|
||||||
else
|
else
|
||||||
real_new_time = text2num(new_time)
|
real_new_time = text2num(new_time * 10)
|
||||||
time = clamp(real_new_time, 0, 600)
|
time = clamp(real_new_time, 0, 600)
|
||||||
return TRUE
|
return TRUE
|
||||||
if("range")
|
if("range")
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
/obj/item/device/assembly/timer/tgui_data(mob/user)
|
/obj/item/device/assembly/timer/tgui_data(mob/user)
|
||||||
var/list/data = ..()
|
var/list/data = ..()
|
||||||
data["time"] = time * 10
|
data["time"] = time
|
||||||
data["timing"] = timing
|
data["timing"] = timing
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@@ -94,6 +94,6 @@
|
|||||||
for(var/i in 1 to LAZYLEN(L))
|
for(var/i in 1 to LAZYLEN(L))
|
||||||
real_new_time += text2num(L[i]) * (60 ** (LAZYLEN(L) - i))
|
real_new_time += text2num(L[i]) * (60 ** (LAZYLEN(L) - i))
|
||||||
else
|
else
|
||||||
real_new_time = text2num(new_time)
|
real_new_time = text2num(new_time * 10)
|
||||||
time = clamp(real_new_time, 0, 600)
|
time = clamp(real_new_time, 0, 600)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ export const AssemblyProx = (props) => {
|
|||||||
fluid
|
fluid
|
||||||
value={time / 10}
|
value={time / 10}
|
||||||
minValue={0}
|
minValue={0}
|
||||||
maxValue={600}
|
maxValue={60}
|
||||||
format={(val) => formatTime(round(val))}
|
format={(val) => formatTime(round(val * 10))}
|
||||||
onDrag={(e, val) => act('set_time', { time: val })}
|
onDrag={(e, val) => act('set_time', { time: val })}
|
||||||
/>
|
/>
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ export const AssemblyTimer = (props) => {
|
|||||||
fluid
|
fluid
|
||||||
value={time / 10}
|
value={time / 10}
|
||||||
minValue={0}
|
minValue={0}
|
||||||
maxValue={600}
|
maxValue={60}
|
||||||
format={(val) => formatTime(round(val))}
|
format={(val) => formatTime(round(val * 10))}
|
||||||
onDrag={(e, val) => act('set_time', { time: val })}
|
onDrag={(e, val) => act('set_time', { time: val })}
|
||||||
/>
|
/>
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { Window } from '../layouts';
|
|||||||
export const BrigTimer = (props) => {
|
export const BrigTimer = (props) => {
|
||||||
const { act, data } = useBackend();
|
const { act, data } = useBackend();
|
||||||
return (
|
return (
|
||||||
<Window width={300} height={138}>
|
<Window width={400} height={138}>
|
||||||
<Window.Content scrollable>
|
<Window.Content scrollable>
|
||||||
<Section
|
<Section
|
||||||
title="Cell Timer"
|
title="Cell Timer"
|
||||||
@@ -40,7 +40,7 @@ export const BrigTimer = (props) => {
|
|||||||
value={data.time_left / 10}
|
value={data.time_left / 10}
|
||||||
minValue={0}
|
minValue={0}
|
||||||
maxValue={data.max_time_left / 10}
|
maxValue={data.max_time_left / 10}
|
||||||
format={(val) => formatTime(round(val))}
|
format={(val) => formatTime(round(val * 10))}
|
||||||
onDrag={(e, val) => act('time', { time: val })}
|
onDrag={(e, val) => act('time', { time: val })}
|
||||||
/>
|
/>
|
||||||
<Flex mt={1}>
|
<Flex mt={1}>
|
||||||
@@ -50,7 +50,7 @@ export const BrigTimer = (props) => {
|
|||||||
icon="hourglass-start"
|
icon="hourglass-start"
|
||||||
onClick={() => act('preset', { preset: 'short' })}
|
onClick={() => act('preset', { preset: 'short' })}
|
||||||
>
|
>
|
||||||
{'Add ' + formatTime(data.preset_short / 10)}
|
{'Add ' + formatTime(data.preset_short)}
|
||||||
</Button>
|
</Button>
|
||||||
</Flex.Item>
|
</Flex.Item>
|
||||||
<Flex.Item grow={1}>
|
<Flex.Item grow={1}>
|
||||||
@@ -59,7 +59,7 @@ export const BrigTimer = (props) => {
|
|||||||
icon="hourglass-start"
|
icon="hourglass-start"
|
||||||
onClick={() => act('preset', { preset: 'medium' })}
|
onClick={() => act('preset', { preset: 'medium' })}
|
||||||
>
|
>
|
||||||
{'Add ' + formatTime(data.preset_medium / 10)}
|
{'Add ' + formatTime(data.preset_medium)}
|
||||||
</Button>
|
</Button>
|
||||||
</Flex.Item>
|
</Flex.Item>
|
||||||
<Flex.Item grow={1}>
|
<Flex.Item grow={1}>
|
||||||
@@ -68,7 +68,7 @@ export const BrigTimer = (props) => {
|
|||||||
icon="hourglass-start"
|
icon="hourglass-start"
|
||||||
onClick={() => act('preset', { preset: 'long' })}
|
onClick={() => act('preset', { preset: 'long' })}
|
||||||
>
|
>
|
||||||
{'Add ' + formatTime(data.preset_long / 10)}
|
{'Add ' + formatTime(data.preset_long)}
|
||||||
</Button>
|
</Button>
|
||||||
</Flex.Item>
|
</Flex.Item>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
Reference in New Issue
Block a user