From 59f99f70a4ac956e6ccf797a6d759062ca9984a5 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Thu, 11 Sep 2025 23:39:06 -0400 Subject: [PATCH] #403 basic connections guide --- pocket/ui/apps/guide.lua | 8 ++++++-- pocket/ui/docs.lua | 33 ++++++++++++++++++++++++++++++- pocket/ui/pages/guide_section.lua | 4 ++-- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/pocket/ui/apps/guide.lua b/pocket/ui/apps/guide.lua index 6174fa1..e707392 100644 --- a/pocket/ui/apps/guide.lua +++ b/pocket/ui/apps/guide.lua @@ -186,6 +186,10 @@ local function new_view(root) TextBox{parent=use,y=1,text="System Usage",alignment=ALIGN.CENTER} PushButton{parent=use,x=2,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=main_page.nav_to} + load_text(false, "Connecting Devices") + local conn_dev_page = guide_section(sect_construct_data, use_page, "Connecting Devs", docs.usage.conn, 110) + load_text(false, "Configuring Devices") + local config_dev_page = guide_section(sect_construct_data, use_page, "Configuring Devs", docs.usage.config, 100) load_text(false, "Manual Control") local man_ctrl_page = guide_section(sect_construct_data, use_page, "Manual Control", docs.usage.manual, 100) load_text(false, "Auto Control") @@ -193,8 +197,8 @@ local function new_view(root) load_text(false, "Waste Control") local waste_ctrl_page = guide_section(sect_construct_data, use_page, "Waste Control", docs.usage.waste, 120) - PushButton{parent=use,y=3,text="Configuring Devices >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,dis_fg_bg=btn_disable,callback=function()end}.disable() - PushButton{parent=use,text="Connecting Devices >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,dis_fg_bg=btn_disable,callback=function()end}.disable() + PushButton{parent=use,y=3,text="Connecting Devices >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=conn_dev_page.nav_to} + PushButton{parent=use,text="Configuring Devices >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=config_dev_page.nav_to} PushButton{parent=use,text="Manual Control >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=man_ctrl_page.nav_to} PushButton{parent=use,text="Automatic Control >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=auto_ctrl_page.nav_to} PushButton{parent=use,text="Waste Control >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=waste_ctrl_page.nav_to} diff --git a/pocket/ui/docs.lua b/pocket/ui/docs.lua index f513b3b..dc268fa 100644 --- a/pocket/ui/docs.lua +++ b/pocket/ui/docs.lua @@ -79,9 +79,40 @@ end --#region System Usage docs.usage = { - manual = {}, auto = {}, waste = {} + config = {}, conn = {}, manual = {}, auto = {}, waste = {} } +target = docs.usage.conn +sect("Overview") +tip("For the best setup experience, see the Wiki on GitHub or the YouTube channel! This app does not contain all information.") +text("Mekanism devices are connected to ComputerCraft computers that form the SCADA control system.") +sect("Mekanism Conns") +text("Multiblocks and single block devices are both connected directly to a computer by touching it or via wired modems.") +doc("usage_conn_mb", "Multiblocks", "For multiblocks, a logic adapter is used if it exists for that multiblock, otherwise a valve or port block is used.") +text("A wired modem is only connected to the block when you right click it and it gets a red border and you see a message in the chat with the peripheral name.") +tip("Do not connect all peripherals in the system on the same network cable, since Reactor PLCs will grab the first reactor they find and you may accidentally duplicate RTUs.") +sect("Computer Conns") +tip("It helps to be familiar with how ComputerCraft manages peripherals before using this system, though it is not necessary.") +doc("usage_conn_network", "Network", "All computers in the system communicate with each other via wireless or ender modems. Ender modems are preferred due to the unlimited range.") +text("Five different network channels are used and must have the same value for each name across all devices.") +text("For example, the supervisor channel SVR_CHANNEL must be set to the same channel for all devices in your system. Two different named channels should not share the same value (such as SVR_CHANNEL vs CRD_CHANNEL).") +doc("usage_conn_peri", "Peripherals", "ComputerCraft peripherals like monitors and speakers need to touch the computer or be connected via wired modems.") + +target = docs.usage.config +sect("Overview") +tip("For the best setup experience, see the Wiki on GitHub or the YouTube channel! This app does not contain all information.") +text("All devices have a configurator program you can launch by running the 'configure' command.") +sect("Reactor PLC") +text("") +sect("RTU Gateway") +text("") +sect("Supervisor") +text("") +sect("Coordinator") +text("") +sect("Pocket") +text("") + target = docs.usage.manual sect("Overview") text("Manual reactor control still includes safety checks and monitoring, but the burn rate is not automatically controlled.") diff --git a/pocket/ui/pages/guide_section.lua b/pocket/ui/pages/guide_section.lua index 03c5cf7..a3ea333 100644 --- a/pocket/ui/pages/guide_section.lua +++ b/pocket/ui/pages/guide_section.lua @@ -34,13 +34,13 @@ return function (data, base_page, title, items, scroll_height) local section_div = Div{parent=page_div,x=2} table.insert(panes, section_div) TextBox{parent=section_div,y=1,text=title,alignment=ALIGN.CENTER} - PushButton{parent=section_div,x=3,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=base_page.nav_to} + PushButton{parent=section_div,x=2,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=base_page.nav_to} local view_page = app.new_page(section_page, #panes + 1) local section_view_div = Div{parent=page_div,x=2} table.insert(panes, section_view_div) TextBox{parent=section_view_div,y=1,text=title,alignment=ALIGN.CENTER} - PushButton{parent=section_view_div,x=3,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=section_page.nav_to} + PushButton{parent=section_view_div,x=2,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=section_page.nav_to} local name_list = ListBox{parent=section_div,x=1,y=3,scroll_height=60,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)} local def_list = ListBox{parent=section_view_div,x=1,y=3,scroll_height=scroll_height,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}