mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Hellish
This commit is contained in:
@@ -429,7 +429,7 @@
|
|||||||
/obj/item/clockwork/slab/ui_data(mob/user) //we display a lot of data via TGUI
|
/obj/item/clockwork/slab/ui_data(mob/user) //we display a lot of data via TGUI
|
||||||
var/list/data = list()
|
var/list/data = list()
|
||||||
data["power"] = DisplayPower(get_clockwork_power())
|
data["power"] = DisplayPower(get_clockwork_power())
|
||||||
data["scripture"] = list()
|
data["scriptures"] = list()
|
||||||
for(var/s in GLOB.all_scripture)
|
for(var/s in GLOB.all_scripture)
|
||||||
var/datum/clockwork_scripture/S = GLOB.all_scripture[s]
|
var/datum/clockwork_scripture/S = GLOB.all_scripture[s]
|
||||||
if(S.tier == selected_scripture) //display only scriptures of the selected tier
|
if(S.tier == selected_scripture) //display only scriptures of the selected tier
|
||||||
@@ -448,6 +448,7 @@
|
|||||||
if(S.invokers_required > 1)
|
if(S.invokers_required > 1)
|
||||||
temp_info["invokers"] = "<font color=#B18B25>Invokers: <b>[S.invokers_required]</b></font>"
|
temp_info["invokers"] = "<font color=#B18B25>Invokers: <b>[S.invokers_required]</b></font>"
|
||||||
data["scripture"] += list(temp_info)
|
data["scripture"] += list(temp_info)
|
||||||
|
return data
|
||||||
|
|
||||||
/obj/item/clockwork/slab/ui_static_data(mob/user)
|
/obj/item/clockwork/slab/ui_static_data(mob/user)
|
||||||
var/list/data = list()
|
var/list/data = list()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { map } from 'common/collections';
|
import { map } from 'common/collections';
|
||||||
import { Fragment } from 'inferno';
|
import { Fragment } from 'inferno';
|
||||||
import { useBackend, useSharedState } from '../backend';
|
import { useBackend, useSharedState } from '../backend';
|
||||||
import { Button, Flex, LabeledList, NoticeBox, Section, Tabs, AnimatedNumber } from '../components';
|
import { Button, Flex, LabeledList, NoticeBox, Section, Tabs } from '../components';
|
||||||
import { Window } from '../layouts';
|
import { Window } from '../layouts';
|
||||||
|
|
||||||
export const ClockworkSlab = (props, context) => {
|
export const ClockworkSlab = (props, context) => {
|
||||||
@@ -11,23 +11,31 @@ export const ClockworkSlab = (props, context) => {
|
|||||||
disk,
|
disk,
|
||||||
has_disk,
|
has_disk,
|
||||||
has_program,
|
has_program,
|
||||||
scripture = {},
|
scriptures = {},
|
||||||
} = data;
|
} = data;
|
||||||
const [
|
const [
|
||||||
selectedScripture,
|
selectedCategory,
|
||||||
setSelectedScripture,
|
setSelectedCategory,
|
||||||
] = useSharedState(context, 'category');
|
] = useSharedState(context, 'category');
|
||||||
const scriptureInCategory = scripture
|
const scriptureInCategory = scriptures
|
||||||
&& scripture[selectedScripture]
|
&& scriptures[selectedCategory]
|
||||||
|| [];
|
|| [];
|
||||||
return (
|
return (
|
||||||
<Window resizable>
|
<Window resizable>
|
||||||
<Window.Content theme="clockcult" scrollable>
|
<Window.Content scrollable>
|
||||||
<Section
|
<Section
|
||||||
title="Scripture Disk"
|
title="Program Disk"
|
||||||
buttons={(
|
buttons={(
|
||||||
<AnimatedNumber
|
<Fragment>
|
||||||
value={data.power} />
|
<Button
|
||||||
|
icon="eject"
|
||||||
|
content="Eject"
|
||||||
|
onClick={() => act('eject')} />
|
||||||
|
<Button
|
||||||
|
icon="minus-circle"
|
||||||
|
content="Delete Program"
|
||||||
|
onClick={() => act('clear')} />
|
||||||
|
</Fragment>
|
||||||
)}>
|
)}>
|
||||||
{has_disk ? (
|
{has_disk ? (
|
||||||
has_program ? (
|
has_program ? (
|
||||||
@@ -51,7 +59,7 @@ export const ClockworkSlab = (props, context) => {
|
|||||||
)}
|
)}
|
||||||
</Section>
|
</Section>
|
||||||
<Section
|
<Section
|
||||||
title="Programs"
|
title="Scripture"
|
||||||
buttons={(
|
buttons={(
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Button
|
<Button
|
||||||
@@ -64,7 +72,7 @@ export const ClockworkSlab = (props, context) => {
|
|||||||
onClick={() => act('refresh')} />
|
onClick={() => act('refresh')} />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}>
|
)}>
|
||||||
{scripture !== null ? (
|
{scriptures !== null ? (
|
||||||
<Flex>
|
<Flex>
|
||||||
<Flex.Item minWidth="110px">
|
<Flex.Item minWidth="110px">
|
||||||
<Tabs vertical>
|
<Tabs vertical>
|
||||||
@@ -77,12 +85,12 @@ export const ClockworkSlab = (props, context) => {
|
|||||||
return (
|
return (
|
||||||
<Tabs.Tab
|
<Tabs.Tab
|
||||||
key={category}
|
key={category}
|
||||||
selected={category === selectedScripture}
|
selected={category === selectedCategory}
|
||||||
onClick={() => setSelectedScripture(category)}>
|
onClick={() => setSelectedCategory(category)}>
|
||||||
{tabLabel}
|
{tabLabel}
|
||||||
</Tabs.Tab>
|
</Tabs.Tab>
|
||||||
);
|
);
|
||||||
})(scripture)}
|
})(scriptures)}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</Flex.Item>
|
</Flex.Item>
|
||||||
<Flex.Item grow={1} basis={0}>
|
<Flex.Item grow={1} basis={0}>
|
||||||
@@ -126,7 +134,7 @@ export const ClockworkSlab = (props, context) => {
|
|||||||
</Flex>
|
</Flex>
|
||||||
) : (
|
) : (
|
||||||
<NoticeBox>
|
<NoticeBox>
|
||||||
No nanite scripture are currently researched.
|
No nanite scriptures are currently researched.
|
||||||
</NoticeBox>
|
</NoticeBox>
|
||||||
)}
|
)}
|
||||||
</Section>
|
</Section>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
|||||||
$bg-map-keys: (),
|
$bg-map-keys: (),
|
||||||
);
|
);
|
||||||
@use '../base.scss' with (
|
@use '../base.scss' with (
|
||||||
$color-bg: #CFBA47,
|
$color-bg: #c9b12a,
|
||||||
$color-bg-grad-spread: 6%,
|
$color-bg-grad-spread: 6%,
|
||||||
$border-radius: 2px,
|
$border-radius: 2px,
|
||||||
);
|
);
|
||||||
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
// Components
|
// Components
|
||||||
@include meta.load-css('../components/Button.scss', $with: (
|
@include meta.load-css('../components/Button.scss', $with: (
|
||||||
'color-backround' : #170800,
|
|
||||||
'color-default': colors.$primary,
|
'color-default': colors.$primary,
|
||||||
'color-disabled': #2D1400,
|
'color-disabled': #2D1400,
|
||||||
'color-selected': #CFBA47,
|
'color-selected': #CFBA47,
|
||||||
@@ -29,7 +28,7 @@
|
|||||||
'border-color': #8faa2e,
|
'border-color': #8faa2e,
|
||||||
));
|
));
|
||||||
@include meta.load-css('../components/NoticeBox.scss', $with: (
|
@include meta.load-css('../components/NoticeBox.scss', $with: (
|
||||||
'color-background': #170800,
|
'color-background': #886a09,
|
||||||
));
|
));
|
||||||
@include meta.load-css('../components/NumberInput.scss', $with: (
|
@include meta.load-css('../components/NumberInput.scss', $with: (
|
||||||
'border-color': #87ce87,
|
'border-color': #87ce87,
|
||||||
@@ -40,14 +39,13 @@
|
|||||||
@include meta.load-css('../components/Section.scss');
|
@include meta.load-css('../components/Section.scss');
|
||||||
@include meta.load-css('../components/Tooltip.scss', $with: (
|
@include meta.load-css('../components/Tooltip.scss', $with: (
|
||||||
'color-background': #2D1400,
|
'color-background': #2D1400,
|
||||||
'border-color': #170800,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
// Layouts
|
// Layouts
|
||||||
@include meta.load-css('../layouts/Layout.scss');
|
@include meta.load-css('../layouts/Layout.scss');
|
||||||
@include meta.load-css('../layouts/Window.scss');
|
@include meta.load-css('../layouts/Window.scss');
|
||||||
@include meta.load-css('../layouts/TitleBar.scss', $with: (
|
@include meta.load-css('../layouts/TitleBar.scss', $with: (
|
||||||
'color-background': #910101,
|
'color-background': #775b0f,
|
||||||
));
|
));
|
||||||
|
|
||||||
.Layout__content {
|
.Layout__content {
|
||||||
|
|||||||
Reference in New Issue
Block a user