diff --git a/code/game/machinery/scp.dm b/code/game/machinery/scp.dm new file mode 100644 index 0000000000..5caff80fc2 --- /dev/null +++ b/code/game/machinery/scp.dm @@ -0,0 +1,35 @@ +/obj/structure/machinery/scp + name = "\improper Coffee Machine" + desc = "A generic vending machine." + icon = 'icons/obj/structures/machinery/vending.dmi' + icon_state = "294" + anchored = TRUE + density = TRUE + layer = BELOW_OBJ_LAYER + wrenchable = FALSE + unslashable = TRUE + unacidable = TRUE + + +/obj/structure/machinery/scp/attack_remote(mob/user as mob) + return 0 + +/obj/structure/machinery/scp/attack_hand(mob/user as mob) + user.set_interaction(src) + tgui_interact(user) + +/obj/structure/machinery/scp/tgui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if (!ui) + ui = new(user, src, "scp", name) + ui.open() + +/obj/structure/machinery/scp/ui_data(mob/user) + var/list/data = list() + return data + +/obj/structure/machinery/scp/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + if(..()) + return + +//very unfinished// diff --git a/colonialmarines.dme b/colonialmarines.dme index a23ebb1ee4..8fd1ffc936 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -952,6 +952,7 @@ #include "code\game\machinery\rechargestation.dm" #include "code\game\machinery\robot_fabricator.dm" #include "code\game\machinery\scoreboard.dm" +#include "code\game\machinery\scp.dm" #include "code\game\machinery\seed_extractor.dm" #include "code\game\machinery\sentry_holder.dm" #include "code\game\machinery\spaceheater.dm" diff --git a/icons/obj/structures/machinery/vending.dmi b/icons/obj/structures/machinery/vending.dmi index 28c0b51c79..36584e2114 100644 Binary files a/icons/obj/structures/machinery/vending.dmi and b/icons/obj/structures/machinery/vending.dmi differ diff --git a/tgui/packages/tgui/index.tsx b/tgui/packages/tgui/index.tsx index ac046ffcc2..e5c9354c1f 100644 --- a/tgui/packages/tgui/index.tsx +++ b/tgui/packages/tgui/index.tsx @@ -33,6 +33,7 @@ import './styles/themes/weyland.scss'; import './styles/themes/uscm.scss'; import './styles/themes/xeno.scss'; import './styles/themes/hive_status.scss'; +import './styles/themes/scp.scss'; import { perf } from 'common/perf'; import { setupHotReloading } from 'tgui-dev-server/link/client.cjs'; diff --git a/tgui/packages/tgui/interfaces/scp.tsx b/tgui/packages/tgui/interfaces/scp.tsx new file mode 100644 index 0000000000..9471c6f683 --- /dev/null +++ b/tgui/packages/tgui/interfaces/scp.tsx @@ -0,0 +1,66 @@ +import { useBackend } from '../backend'; +import { Button, Section } from '../components'; +import { Window } from '../layouts'; + +export const scp = (props) => { + const { act, data } = useBackend(); + // Extract `health` and `color` variables from the `data` object. + return ( + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ); +}; diff --git a/tgui/packages/tgui/styles/themes/scp.scss b/tgui/packages/tgui/styles/themes/scp.scss new file mode 100644 index 0000000000..a8e0e891e4 --- /dev/null +++ b/tgui/packages/tgui/styles/themes/scp.scss @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +@use 'sass:color'; +@use 'sass:meta'; + +@use '../colors.scss' with ( + $primary: hsl(0, 0%, 0%), + $fg-map-keys: (), + $bg-map-keys: () +); +@use '../base.scss' with ( + $color-bg: hsl(0, 0%, 10%), + $color-bg-grad-spread: 0%, + $border-radius: 0 +); + +// A fat warning to anyone who wants to use this: this only half works. +// It was made almost purely for the nuke ui, and requires a good amount of manual hacks to get it working as intended. +.theme-scp { + // Atomic classes + @include meta.load-css('../atomic/color.scss'); + + // Components + @include meta.load-css( + '~tgui/styles/components/Button', + $with: ( + 'color-default': hsl(0, 0%, 20%), + 'color-disabled': hsl(60, 6%, 28%), + 'color-selected': hsl(0, 91%, 31%), + 'color-caution': hsl(28, 87%, 39%), + 'color-danger': hsl(61, 100%, 30%) + ) + ); + @include meta.load-css( + '~tgui/styles/components/ProgressBar', + $with: ('background-color': hsla(0, 0%, 0%, 0.5)) + ); + @include meta.load-css('~tgui/styles/components/Section'); + + // Layouts + @include meta.load-css('../layouts/Layout.scss'); + @include meta.load-css('../layouts/Window.scss'); + @include meta.load-css( + '../layouts/TitleBar.scss', + $with: ('background-color': hsl(0, 0%, 21%)) + ); + + .Button { + color: hsl(0, 0%, 80%); + font-family: monospace; + border: base.em(2px) outset hsl(0, 0%, 15%); + outline: base.em(1px) solid hsl(0, 0%, 10%); + &:hover { + color: hsl(0, 0%, 80%); + background-color: hsl(0, 0%, 20%); + } + &:focus { + color: hsl(0, 0%, 80%); + background-color: hsl(0, 0%, 20%); + } + } +} + +.Button--disabled { + color: hsl(0, 0%, 20%); + font-family: monospace; + &:hover { + color: hsl(0, 0%, 100%); + } + &:focus { + color: hsl(0, 0%, 100%); + } +} + +.Layout__content { + background-image: none; +}