mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] adds an option for non-synced consoles (#8054)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
@@ -44,6 +44,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
|
||||
var/id = 0 //ID of the computer (for server restrictions).
|
||||
var/sync = 1 //If sync = 0, it doesn't show up on Server Control Console
|
||||
var/is_public = FALSE //Above mentions the option for public consoles. But for that, we need to remove the sync tab from the console entirely
|
||||
|
||||
req_access = list(access_research) //Data and setting manipulation requires scientist access.
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
if(!locked && !busy_msg)
|
||||
data["info"] = list(
|
||||
"sync" = sync,
|
||||
"is_public" = is_public,
|
||||
)
|
||||
|
||||
data["info"]["linked_destroy"] = list("present" = FALSE)
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
/obj/machinery/computer/rdconsole/public
|
||||
name = "Outsider R&D control console"
|
||||
sync = 0
|
||||
is_public = TRUE
|
||||
req_access = ""
|
||||
circuit = /obj/item/weapon/circuitboard/rdconsole/public
|
||||
|
||||
@@ -699,7 +699,8 @@ const ResearchConsoleConstructor = (props) => {
|
||||
const ResearchConsoleSettings = (props) => {
|
||||
const { act, data } = useBackend();
|
||||
|
||||
const { sync, linked_destroy, linked_imprinter, linked_lathe } = data.info;
|
||||
const { is_public, sync, linked_destroy, linked_imprinter, linked_lathe } =
|
||||
data.info;
|
||||
|
||||
return (
|
||||
<Section title="Settings">
|
||||
@@ -721,20 +722,21 @@ const ResearchConsoleSettings = (props) => {
|
||||
</Tabs>
|
||||
{(props.settingsTab === 0 && (
|
||||
<Box>
|
||||
{(sync && (
|
||||
<>
|
||||
<Button fluid icon="sync" onClick={() => act('sync')}>
|
||||
Sync Database with Network
|
||||
{!is_public &&
|
||||
((sync && (
|
||||
<>
|
||||
<Button fluid icon="sync" onClick={() => act('sync')}>
|
||||
Sync Database with Network
|
||||
</Button>
|
||||
<Button fluid icon="unlink" onClick={() => act('togglesync')}>
|
||||
Disconnect from Research Network
|
||||
</Button>
|
||||
</>
|
||||
)) || (
|
||||
<Button fluid icon="link" onClick={() => act('togglesync')}>
|
||||
Connect to Research Network
|
||||
</Button>
|
||||
<Button fluid icon="unlink" onClick={() => act('togglesync')}>
|
||||
Disconnect from Research Network
|
||||
</Button>
|
||||
</>
|
||||
)) || (
|
||||
<Button fluid icon="link" onClick={() => act('togglesync')}>
|
||||
Connect to Research Network
|
||||
</Button>
|
||||
)}
|
||||
))}
|
||||
<Button fluid icon="lock" onClick={() => act('lock')}>
|
||||
Lock Console
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user