From ff5a2469e66a34ce8f2b23d9c84249acb8cba64f Mon Sep 17 00:00:00 2001 From: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Date: Sun, 14 May 2023 23:54:36 +0100 Subject: [PATCH] Makes the component menu in the integrated circuit interface more intuitive. (#75364) ## About The Pull Request Added a notice box to the component menu in the integrated circuit interface explaining how to link an integrated circuit to a component printer to allow for integrated circuit programming away from the component printer. ![image](https://github.com/tgstation/tgstation/assets/37270891/6a7ed31a-7d45-49a6-8025-09564ef099d2) Last sentence in the above image has been removed. Integrated circuits will now update their static data once linked so closing and re-opening the UI is unnecessary. ## Why It's Good For The Game It wasn't clear anywhere in game that you could link integrated circuits to component printers. I've run into players being completely unaware of this feature, so this should help to make it more clear that players don't need to print out components manually from the component printer and slap them into an integrated circuit each time. ## Changelog :cl: qol: Added a message to the component menu in the integrated circuit interface that explains how to link an integrated circuit to a component printer. /:cl: --------- Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com> --- code/modules/wiremod/core/component_printer.dm | 1 + .../interfaces/IntegratedCircuit/ComponentMenu.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/code/modules/wiremod/core/component_printer.dm b/code/modules/wiremod/core/component_printer.dm index c161239e8af..ca05ac68a87 100644 --- a/code/modules/wiremod/core/component_printer.dm +++ b/code/modules/wiremod/core/component_printer.dm @@ -196,6 +196,7 @@ if(istype(weapon, /obj/item/integrated_circuit) && !user.combat_mode) var/obj/item/integrated_circuit/circuit = weapon circuit.linked_component_printer = WEAKREF(src) + circuit.update_static_data_for_all_viewers() balloon_alert(user, "successfully linked to the integrated circuit") return return ..() diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/ComponentMenu.js b/tgui/packages/tgui/interfaces/IntegratedCircuit/ComponentMenu.js index 63acabbd1b0..8515f18e4ab 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/ComponentMenu.js +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/ComponentMenu.js @@ -1,4 +1,4 @@ -import { Section, Button, Dropdown, Stack, Input } from '../../components'; +import { Section, Button, Dropdown, Stack, Input, NoticeBox } from '../../components'; import { Component } from 'inferno'; import { shallowDiffers } from 'common/react'; import { fetchRetry } from '../../http'; @@ -87,7 +87,6 @@ export class ComponentMenu extends Component { // Limit the maximum amount of shown components to prevent a lagspike // when you open the menu shownComponents.length = currentLimit; - return (
+ {trueLength === 0 && ( + + + You can hit this integrated circuit onto a component printer + to link it so that you're able to remotely create and + add components to this circuit. + + + )} {shownComponents.map((val) => (