mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-21 07:33:22 +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/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/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.
|
req_access = list(access_research) //Data and setting manipulation requires scientist access.
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
if(!locked && !busy_msg)
|
if(!locked && !busy_msg)
|
||||||
data["info"] = list(
|
data["info"] = list(
|
||||||
"sync" = sync,
|
"sync" = sync,
|
||||||
|
"is_public" = is_public,
|
||||||
)
|
)
|
||||||
|
|
||||||
data["info"]["linked_destroy"] = list("present" = FALSE)
|
data["info"]["linked_destroy"] = list("present" = FALSE)
|
||||||
|
|||||||
@@ -2,5 +2,6 @@
|
|||||||
/obj/machinery/computer/rdconsole/public
|
/obj/machinery/computer/rdconsole/public
|
||||||
name = "Outsider R&D control console"
|
name = "Outsider R&D control console"
|
||||||
sync = 0
|
sync = 0
|
||||||
|
is_public = TRUE
|
||||||
req_access = ""
|
req_access = ""
|
||||||
circuit = /obj/item/weapon/circuitboard/rdconsole/public
|
circuit = /obj/item/weapon/circuitboard/rdconsole/public
|
||||||
|
|||||||
@@ -699,7 +699,8 @@ const ResearchConsoleConstructor = (props) => {
|
|||||||
const ResearchConsoleSettings = (props) => {
|
const ResearchConsoleSettings = (props) => {
|
||||||
const { act, data } = useBackend();
|
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 (
|
return (
|
||||||
<Section title="Settings">
|
<Section title="Settings">
|
||||||
@@ -721,7 +722,8 @@ const ResearchConsoleSettings = (props) => {
|
|||||||
</Tabs>
|
</Tabs>
|
||||||
{(props.settingsTab === 0 && (
|
{(props.settingsTab === 0 && (
|
||||||
<Box>
|
<Box>
|
||||||
{(sync && (
|
{!is_public &&
|
||||||
|
((sync && (
|
||||||
<>
|
<>
|
||||||
<Button fluid icon="sync" onClick={() => act('sync')}>
|
<Button fluid icon="sync" onClick={() => act('sync')}>
|
||||||
Sync Database with Network
|
Sync Database with Network
|
||||||
@@ -734,7 +736,7 @@ const ResearchConsoleSettings = (props) => {
|
|||||||
<Button fluid icon="link" onClick={() => act('togglesync')}>
|
<Button fluid icon="link" onClick={() => act('togglesync')}>
|
||||||
Connect to Research Network
|
Connect to Research Network
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
))}
|
||||||
<Button fluid icon="lock" onClick={() => act('lock')}>
|
<Button fluid icon="lock" onClick={() => act('lock')}>
|
||||||
Lock Console
|
Lock Console
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user