mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
[MIRROR] Small TGUI tweaks and fixes (#353)
* Small TGUI tweaks and fixes (#52955) * LaborClaimConsole cleanup * UI tweaks * Small TGUI tweaks and fixes Co-authored-by: Arkatos1 <43862960+Arkatos1@users.noreply.github.com>
This commit is contained in:
@@ -206,7 +206,7 @@
|
||||
"neutralize_unidentified" = turret_flags & TURRET_FLAG_SHOOT_ANOMALOUS,
|
||||
"neutralize_nonmindshielded" = turret_flags & TURRET_FLAG_SHOOT_UNSHIELDED,
|
||||
"neutralize_cyborgs" = turret_flags & TURRET_FLAG_SHOOT_BORGS,
|
||||
"ignore_heads" = turret_flags & TURRET_FLAG_SHOOT_HEADS,
|
||||
"neutralize_heads" = turret_flags & TURRET_FLAG_SHOOT_HEADS,
|
||||
"manual_control" = manual_control,
|
||||
"silicon_user" = FALSE,
|
||||
"allow_manual_control" = FALSE,
|
||||
|
||||
@@ -203,9 +203,9 @@
|
||||
|
||||
/obj/item/transfer_valve/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["tank_one"] = tank_one
|
||||
data["tank_two"] = tank_two
|
||||
data["attached_device"] = attached_device
|
||||
data["tank_one"] = tank_one ? tank_one.name : null
|
||||
data["tank_two"] = tank_two ? tank_two.name : null
|
||||
data["attached_device"] = attached_device ? attached_device.name : null
|
||||
data["valve"] = valve_open
|
||||
return data
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ GLOBAL_LIST(labor_sheet_values)
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = FALSE
|
||||
|
||||
/// Connected stacking machine
|
||||
var/obj/machinery/mineral/stacking_machine/laborstacker/stacking_machine = null
|
||||
/// Direction of the stacking machine
|
||||
var/machinedir = SOUTH
|
||||
var/obj/machinery/door/airlock/release_door
|
||||
var/door_tag = "prisonshuttle"
|
||||
var/obj/item/radio/Radio //needed to send messages to sec radio
|
||||
/// Needed to send messages to sec radio
|
||||
var/obj/item/radio/Radio
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/Initialize()
|
||||
. = ..()
|
||||
@@ -39,12 +39,18 @@ GLOBAL_LIST(labor_sheet_values)
|
||||
ui = new(user, src, "LaborClaimConsole", name)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/ui_static_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["ores"] = GLOB.labor_sheet_values
|
||||
return data
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/can_go_home = FALSE
|
||||
|
||||
data["emagged"] = (obj_flags & EMAGGED) ? 1 : 0
|
||||
data["emagged"] = FALSE
|
||||
if(obj_flags & EMAGGED)
|
||||
data["emagged"] = TRUE
|
||||
can_go_home = TRUE
|
||||
|
||||
var/obj/item/card/id/I = user.get_idcard(TRUE)
|
||||
@@ -63,43 +69,42 @@ GLOBAL_LIST(labor_sheet_values)
|
||||
if(stacking_machine)
|
||||
data["unclaimed_points"] = stacking_machine.points
|
||||
|
||||
data["ores"] = GLOB.labor_sheet_values
|
||||
data["can_go_home"] = can_go_home
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/mob/M = usr
|
||||
switch(action)
|
||||
if("claim_points")
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(istype(I, /obj/item/card/id/prisoner))
|
||||
var/obj/item/card/id/prisoner/P = I
|
||||
P.points += stacking_machine.points
|
||||
stacking_machine.points = 0
|
||||
to_chat(usr, "<span class='notice'>Points transferred.</span>")
|
||||
. = TRUE
|
||||
to_chat(M, "<span class='notice'>Points transferred.</span>")
|
||||
return TRUE
|
||||
else
|
||||
to_chat(usr, "<span class='alert'>No valid id for point transfer detected.</span>")
|
||||
to_chat(M, "<span class='alert'>No valid id for point transfer detected.</span>")
|
||||
if("move_shuttle")
|
||||
if(!alone_in_area(get_area(src), usr))
|
||||
to_chat(usr, "<span class='alert'>Prisoners are only allowed to be released while alone.</span>")
|
||||
else
|
||||
switch(SSshuttle.moveShuttle("laborcamp", "laborcamp_home", TRUE))
|
||||
if(1)
|
||||
to_chat(usr, "<span class='alert'>Shuttle not found.</span>")
|
||||
if(2)
|
||||
to_chat(usr, "<span class='alert'>Shuttle already at station.</span>")
|
||||
if(3)
|
||||
to_chat(usr, "<span class='alert'>No permission to dock could be granted.</span>")
|
||||
else
|
||||
if(!(obj_flags & EMAGGED))
|
||||
Radio.set_frequency(FREQ_SECURITY)
|
||||
Radio.talk_into(src, "A prisoner has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY)
|
||||
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
|
||||
. = TRUE
|
||||
if(!alone_in_area(get_area(src), M))
|
||||
to_chat(M, "<span class='alert'>Prisoners are only allowed to be released while alone.</span>")
|
||||
return
|
||||
switch(SSshuttle.moveShuttle("laborcamp", "laborcamp_home", TRUE))
|
||||
if(1)
|
||||
to_chat(M, "<span class='alert'>Shuttle not found.</span>")
|
||||
if(2)
|
||||
to_chat(M, "<span class='alert'>Shuttle already at station.</span>")
|
||||
if(3)
|
||||
to_chat(M, "<span class='alert'>No permission to dock could be granted.</span>")
|
||||
else
|
||||
if(!(obj_flags & EMAGGED))
|
||||
Radio.set_frequency(FREQ_SECURITY)
|
||||
Radio.talk_into(src, "A prisoner has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY)
|
||||
to_chat(M, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/proc/locate_stacking_machine()
|
||||
stacking_machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useBackend } from '../backend';
|
||||
import { Button, LabeledList, NoticeBox, Section } from '../components';
|
||||
import { AnimatedNumber, Button, LabeledList, NoticeBox, Section } from '../components';
|
||||
import { formatMoney } from '../format';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
export const BankMachine = (props, context) => {
|
||||
@@ -11,9 +12,12 @@ export const BankMachine = (props, context) => {
|
||||
} = data;
|
||||
return (
|
||||
<Window
|
||||
width={335}
|
||||
height={160}>
|
||||
width={350}
|
||||
height={155}>
|
||||
<Window.Content>
|
||||
<NoticeBox danger>
|
||||
Authorized personnel only
|
||||
</NoticeBox>
|
||||
<Section title={station_name + ' Vault'}>
|
||||
<LabeledList>
|
||||
<LabeledList.Item
|
||||
@@ -25,13 +29,13 @@ export const BankMachine = (props, context) => {
|
||||
selected={siphoning}
|
||||
onClick={() => act(siphoning ? 'halt' : 'siphon')} />
|
||||
)}>
|
||||
{current_balance + ' cr'}
|
||||
<AnimatedNumber
|
||||
value={current_balance}
|
||||
format={value => formatMoney(value)} />
|
||||
{' cr'}
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
<NoticeBox textAlign="center">
|
||||
Authorized personnel only
|
||||
</NoticeBox>
|
||||
</Window.Content>
|
||||
</Window>
|
||||
);
|
||||
|
||||
@@ -11,7 +11,7 @@ export const GravityGenerator = (props, context) => {
|
||||
return (
|
||||
<Window
|
||||
width={400}
|
||||
height={165}>
|
||||
height={155}>
|
||||
<Window.Content>
|
||||
{!operational && (
|
||||
<NoticeBox>
|
||||
|
||||
@@ -15,7 +15,7 @@ export const LaborClaimConsole = (props, context) => {
|
||||
return (
|
||||
<Window
|
||||
width={315}
|
||||
height={430}>
|
||||
height={440}>
|
||||
<Window.Content>
|
||||
<Section>
|
||||
<LabeledList>
|
||||
|
||||
@@ -15,15 +15,15 @@ export const PortableTurret = (props, context) => {
|
||||
neutralize_unidentified,
|
||||
neutralize_nonmindshielded,
|
||||
neutralize_cyborgs,
|
||||
ignore_heads,
|
||||
neutralize_heads,
|
||||
manual_control,
|
||||
allow_manual_control,
|
||||
lasertag_turret,
|
||||
} = data;
|
||||
return (
|
||||
<Window
|
||||
width={305}
|
||||
height={lasertag_turret ? 110 : 300}>
|
||||
width={310}
|
||||
height={lasertag_turret ? 110 : 292}>
|
||||
<Window.Content>
|
||||
<NoticeBox>
|
||||
Swipe an ID card to {locked ? 'unlock' : 'lock'} this interface.
|
||||
@@ -58,8 +58,8 @@ export const PortableTurret = (props, context) => {
|
||||
title="Target Settings"
|
||||
buttons={(
|
||||
<Button.Checkbox
|
||||
checked={ignore_heads}
|
||||
content="Ignore Heads"
|
||||
checked={!neutralize_heads}
|
||||
content="Ignore Command"
|
||||
disabled={locked}
|
||||
onClick={() => act('shootheads')} />
|
||||
)}>
|
||||
|
||||
@@ -47,8 +47,8 @@ export const ProbingConsole = (props, context) => {
|
||||
{occupant_status === 3
|
||||
? 'Deceased'
|
||||
: occupant_status === 2
|
||||
? 'Unconcious'
|
||||
: 'Concious'}
|
||||
? 'Unconscious'
|
||||
: 'Conscious'}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Experiments">
|
||||
<Button
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useBackend } from '../backend';
|
||||
import { Button, LabeledList, NoticeBox, Section } from '../components';
|
||||
import { Box, Button, LabeledList, Section } from '../components';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
export const TransferValve = (props, context) => {
|
||||
@@ -13,7 +13,7 @@ export const TransferValve = (props, context) => {
|
||||
return (
|
||||
<Window
|
||||
width={310}
|
||||
height={320}>
|
||||
height={300}>
|
||||
<Window.Content>
|
||||
<Section>
|
||||
<LabeledList>
|
||||
@@ -30,60 +30,59 @@ export const TransferValve = (props, context) => {
|
||||
title="Valve Attachment"
|
||||
buttons={(
|
||||
<Button
|
||||
textAlign="center"
|
||||
width="30px"
|
||||
content="Configure"
|
||||
icon={"cog"}
|
||||
disabled={(!attached_device)}
|
||||
disabled={!attached_device}
|
||||
onClick={() => act('device')} />
|
||||
)}>
|
||||
<LabeledList>
|
||||
{attached_device ? (
|
||||
<LabeledList.Item label="Attachment">
|
||||
<LabeledList.Item label="Attachment">
|
||||
{attached_device ? (
|
||||
<Button
|
||||
icon={"wrench"}
|
||||
icon={"eject"}
|
||||
content={attached_device}
|
||||
disabled={!attached_device}
|
||||
onClick={() => act('remove_device')} />
|
||||
</LabeledList.Item>
|
||||
) : (
|
||||
<NoticeBox textAlign="center">
|
||||
Insert Assembly
|
||||
</NoticeBox>
|
||||
)}
|
||||
) : (
|
||||
<Box color="average">
|
||||
No Assembly
|
||||
</Box>
|
||||
)}
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
<Section title="Attachment One">
|
||||
<LabeledList>
|
||||
{tank_one ? (
|
||||
<LabeledList.Item label="Attachment">
|
||||
<LabeledList.Item label="Attachment">
|
||||
{tank_one ? (
|
||||
<Button
|
||||
icon={"wrench"}
|
||||
icon={"eject"}
|
||||
content={tank_one}
|
||||
disabled={!tank_one}
|
||||
onClick={() => act('tankone')} />
|
||||
</LabeledList.Item>
|
||||
) : (
|
||||
<NoticeBox textAlign="center">
|
||||
Insert Tank
|
||||
</NoticeBox>
|
||||
)}
|
||||
) : (
|
||||
<Box color="average">
|
||||
No Tank
|
||||
</Box>
|
||||
)}
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
<Section title="Attachment Two">
|
||||
<LabeledList>
|
||||
{tank_two ? (
|
||||
<LabeledList.Item label="Attachment">
|
||||
<LabeledList.Item label="Attachment">
|
||||
{tank_two ? (
|
||||
<Button
|
||||
icon={"wrench"}
|
||||
icon={"eject"}
|
||||
content={tank_two}
|
||||
disabled={!tank_two}
|
||||
onClick={() => act('tanktwo')} />
|
||||
</LabeledList.Item>
|
||||
) : (
|
||||
<NoticeBox textAlign="center">
|
||||
Insert Tank
|
||||
</NoticeBox>
|
||||
)}
|
||||
) : (
|
||||
<Box color="average">
|
||||
No Tank
|
||||
</Box>
|
||||
)}
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
</Window.Content>
|
||||
|
||||
@@ -14,7 +14,7 @@ export const TurretControl = (props, context) => {
|
||||
return (
|
||||
<Window
|
||||
width={305}
|
||||
height={168}>
|
||||
height={172}>
|
||||
<Window.Content>
|
||||
<InterfaceLockNoticeBox />
|
||||
<Section>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user