-
-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ports lore terminals from /tg/station (#21856)
* tyjktyerjt * gvuukrtfyukmc * replaces computer
- Loading branch information
Showing
6 changed files
with
82 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//Basic computer meant for basic detailing in ruins and away missions, NOT meant for the station | ||
//stolen from tgstation with love | ||
/obj/machinery/computer/terminal | ||
name = "terminal" | ||
desc = "A relatively low-tech solution for internal computing, internal network mail, and logging. This model appears to be quite old." | ||
//convenience in deconstruction | ||
circuit = /obj/item/circuitboard/computer/terminal | ||
///Text that displays on top of the actual 'lore' funnies. | ||
var/upperinfo = "COPYRIGHT 2487 NANOSOFT-TM - DO NOT REDISTRIBUTE" | ||
///Text this terminal contains, not dissimilar to paper. Unlike paper, players cannot add or edit existing info. | ||
var/content = list("Congratulations on your purchase of a NanoSoft-TM terminal! Further instructions on setup available in \ | ||
user manual. For license and registration, please contact your licensed NanoSoft vendor and repair service representative.") | ||
///The TGUI theme this console uses. Defaults to hackerman, a retro greeny pallete which should fit most terminals. | ||
var/tguitheme = "hackerman" | ||
|
||
/obj/machinery/computer/terminal/ui_interact(mob/user, datum/tgui/ui) | ||
..() | ||
ui = SStgui.try_update_ui(user, src, ui) | ||
if(!ui) | ||
ui = new(user, src, "Terminal", name) //The paper tgui file scared whoever wrote this, so new type of UI | ||
ui.open() | ||
|
||
/obj/machinery/computer/terminal/ui_static_data(mob/user) | ||
return list( | ||
"messages" = content, | ||
"uppertext" = upperinfo, | ||
"tguitheme" = tguitheme, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { useBackend } from '../backend'; | ||
import { NoticeBox, Section } from '../components'; | ||
import { Window } from '../layouts'; | ||
|
||
export const Terminal = (_, context) => { | ||
const { act, data } = useBackend(context); | ||
const { uppertext, messages } = data; | ||
return ( | ||
<Window theme={data.tguitheme} title="Terminal" width={480} height={520}> | ||
<Window.Content scrollable> | ||
<NoticeBox textAlign="left"> | ||
{uppertext} | ||
</NoticeBox> | ||
<Messages messages={messages} /> | ||
</Window.Content> | ||
</Window> | ||
); | ||
}; | ||
|
||
const Messages = (props, context) => { | ||
const { messages } = props; | ||
const { act } = useBackend(context); | ||
return messages.map(message => { | ||
return ( | ||
<Section key={message.key}> | ||
{message} | ||
</Section> | ||
); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters