Skip to content

Update scotlandsyard plugins (BaR Maid, Fat Albert, OreScout, Sacrificial Stockpile Manager, Script to Plugin, Wilson) - #379

Merged
viktor-ferenczi merged 1 commit into
StarCpt:mainfrom
scotlandsyard:hub-update-2026-11
Nov 18, 2026
Merged

viktor-ferenczi merged 1 commit into
StarCpt:mainfrom
scotlandsyard:hub-update-2026-11

Conversation

@scotlandsyard

Copy link
Copy Markdown
Contributor

Moves our six plugins from d8b9bf7 (merged in #227) to e31f251, the commit of their new releases. All six now also build for .NET 10 (Pulsar Interim) and get the Toolbox tab and Esc fix (see Shared). New source directories: Shared/ListSearch.cs (five entries) and Shared/Toolbox.cs (all six). Each description gets a short Quick start.

Plugin What changed Requests to the server (validation) Reach gate
BaR Maid 1.1.0 Find boxes; survival kits never set to Co-op AddQueueItemRequest (Access, Ownership); Build and Repair terminal properties and the assembler's Co-op switch (terminal property sync, Access); assembler Custom Data (Access, Ownership). Unchanged since #227 as approved in #227
Fat Albert 1.1.0 Cargo fill view; Find boxes; Artificial Mass / Space Ball weight in natural gravity (Warfare 3) none n/a
OreScout 1.2.0 Find box in the Marker Library GPS add/modify/remove for its own markers ([Server], the player's own GPS list); the scanning detector's Custom Data (Access, Ownership). Unchanged since #227 the detector is the one whose toolbar action you used
Sacrificial Stockpile Manager 1.6.0 Supply crate (fill a crate with the components for a list of blocks, preview first; crate picker, Make it Stock); Find boxes in Blocks and Production; admin-only items never offered; works alongside the SHEPHERD PB script; Warfare 3 fixes TransferByUser (Access, Ownership); AddQueueItemRequest / RemoveQueueItemRequest (Access, Ownership); rename (SetCustomNameEvent, Access, Ownership) and Custom Data (Access, Ownership) for SHEPHERD Export; new: PB Run (RunProgramRequest, Access, Ownership) for SHEPHERD configReload / unloadShip; on/off and LCD text as in the terminal every request: the character within 15 m of the grid group or antenna-linked (MyReplicableRightsValidator.GetAccess); SHEPHERD is treated as absent and never Run with in-game scripts off
Script to Plugin 1.1.1 Toolbox tab and Esc fix; the output/Help panel no longer runs over the caption row none (offline worlds only, unchanged) n/a
Wilson 1.2.0 Directs the newer plugins' characters too; Find boxes none (local chat only) n/a

Reflection: SSM reads MyGuiControlTable.m_mouseOverColumnIndex (read only) to tell a click on a row's tick column from a click elsewhere; without it, ticking works with Space only. Script to Plugin's MyPlugins.m_handleInputPlugins lookup and Personality's embedded-text lookup are unchanged since #227. No Harmony in these six.

SSM bill API (mod message 0x53534D5F46494C4C, used by Tally): another plugin or mod can send a list of blocks; SSM only ever opens its preview, nothing changes until the player presses Apply; amounts are clamped to finite values, and the message is refused while an SSM window is open.

Shared code changed since #227 (linked by every entry; one pin for both PRs, so a fix in Shared re-pins both):

  • Shared/Toolbox.cs (new): a Toolbox tab in the terminal (K or I) listing our loaded plugins with an Open button. No patch: it adds the page from MyScreenManager.BeforeScreenDraw, with page key = the game's page count, and only when the existing keys are exactly 0..N-1 (so Ctrl+Tab, Ctrl+Shift+Tab and gamepad bumpers keep working). It finds the tab control with reflection on MyGuiScreenTerminal.m_terminalTabs (null- and type-checked; fails closed, the tab is then left out).
  • Status callbacks (disclosure, a change from what we said in Add BaR Maid, Fat Albert, Sacrificial Stockpile Manager, Script to Plugin, OreScout and Wilson #227): a plugin (ours, or a mod through the existing TIM_SWIT message) can register a Func<string> status line. While the Toolbox tab is visible, it is called about once a second on the game thread without a player action. In-process only; nothing is sent anywhere; exceptions are caught (a hang is not). Before, a mod's code ran only when the player clicked its entry.
  • Shared/PluginSwitcher.cs: one of our windows at a time (a window opened from chat or a toolbar while another was up used to stack, so Esc closed them one by one).
  • Shared/ListSearch.cs (new): the Find box text match.
  • Shared/AssemblerModes.cs: assemblers without advanced functions (survival kits) are never set to Co-op.
  • Unsubscribe on unload now happens even after a failed start, everywhere (the Add BaR Maid, Fat Albert, Sacrificial Stockpile Manager, Script to Plugin, OreScout and Wilson #227 leak pattern).

Not submitted: Tripwire, Drill Sergeant and Shipwright are in the repo but not registered; Seamless Unload Fix has left the public repo.

Known limitation carried from #227: per-world files are keyed by world name. Quiet Skies' Keep newest makes this matter a little more (same world name on two servers shares the setting); we kept it per world name on purpose.

Tests: built with 0 warnings for net481 and net10.0; our automated in-game test suite passes at e31f251 on Pulsar Legacy and Interim against game 1.211.017 (Warfare 3), including a Ctrl+Tab check of the Toolbox tab; and again after the push as hub builds (Pulsar compiling e31f251 from GitHub through a local hub source) on both loaders. Windows only; Linux not tested. Reach-gated paths can't be exercised in single player and were checked by a multiplayer hand test only where noted.

🤖 Generated with Claude Code

…out 1.2.0, Sacrificial Stockpile Manager 1.6.0, Script to Plugin 1.1.1, Wilson 1.2.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@viktor-ferenczi viktor-ferenczi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: six scotlandsyard plugin bumps

Scope: hub PR head b1f7ee9b27d83608c1ef0144b4557a3c9f51baf8. All six manifests point at scotlandsyard/SpaceEngineersPlugins and move from d8b9bf7 to e31f251, so this is a bump review of git diff d8b9bf7..e31f251 (101 commits). The whole-repo range is 234 files, +29548/−731, but most of that is in projects these manifests don't compile (Tally, Tripwire, Shipwright, SSM's Tests/, the removed Seamless Unload Fix). I read every line of the part the six manifests do compile: the six Source/ folders plus Shared/, 61 files, +5851/−181.

Summary: I found no blocking issues. There is one low-severity Linux problem in Fat Albert, and it predates this range. There's no networking, process execution, Harmony, P/Invoke, dynamic assembly loading, telemetry or committed binaries in the compiled scope. The fixes from #227 are all still in place.

Manifest

  • test.py at the PR head passes (All files validated). Ids and RepoId are unchanged. Descriptions only gained a Quick start section.
  • New SourceDirectories: Shared/Toolbox.cs in all six and Shared/ListSearch.cs in five (not Script to Plugin). For each plugin I compared the Shared/ entries with the Compile Include links in its csproj, and all six match. Projects/<plugin>/Source/ still pulls in no tests or tooling.
  • No NuGetReferences, AssetFolder or dependencies, and none are needed.

Repository and pin provenance

  • The repository is public, not a fork and GPL-3.0. e31f251 is the current main HEAD (no drift), and d8b9bf7 is its ancestor.
  • Project references: every csproj now targets net481;net10.0, with Microsoft.NETFramework.ReferenceAssemblies 1.0.3 restricted to net481. Fat Albert adds SpaceEngineers.Game from $(Bin64). The loader compile reads none of these. Packages in the hub manifest: none. Committed binaries, native files, submodules, symlinks: none.
  • Personality.txt.cs (five plugins) and Wilson.txt.cs are generated. I regenerated all six with the algorithm in Shared/EmbedText.targets, and they match byte for byte.

Security

  • New server-bound requests, all sent only on a player action:
    • SSM sends a PB Run with unloadShip / configReload. MyProgrammableBlock.Run on a client raises RunProgramRequest, which is [Server(ValidationType.Access | ValidationType.Ownership)] in SE 1.211.017. That is the same request as the terminal's Run button. Targets are limited to the player's own blocks, and nothing is sent when the grid fails Reach.Check (L298-L307) or when EnableIngameScripts is off (L407).
    • SHEPHERD Export renames the player's own blocks and writes Custom Data, after a confirm box. Reach, ownership and scripts-on are checked again when you press Yes. Custom Data that isn't valid INI is left alone, which avoids the data-loss pattern from the #227 OreScout finding.
  • Autocraft now queues or disassembles only what the production screen would offer. AutoCraft.CanOrder requires a public item, a public and enabled blueprint, and CanUseBlueprint on that assembler. That's an improvement: admin-only blueprints can no longer be requested.
  • In-process message channels:
    • SSM's new bill channel (0x53534D5F46494C4C) only opens a preview for a block the player owns. Amounts are clamped, and it's refused while the window is open (BillApi.cs#L105-L125). Nothing changes until the player presses Apply.
    • The switcher channel now also carries a Func<string> status. It is polled about once a second while the Toolbox tab is visible (Toolbox.cs#L228). A mod can register one, but that only runs the mod's own whitelisted code, which it can already run every frame, so it widens nothing. The PR description discloses this.
  • Reflection uses fixed names only: MyGuiScreenTerminal.m_terminalTabs (Toolbox.cs#L82, with a type check, and it turns itself off if the field is missing) and a read of MyGuiControlTable.m_mouseOverColumnIndex (int?). Both exist in 1.211.017.
  • Script to Plugin's offline-only gate, OreScout's scan and Custom Data handling, and SSM's reach gates on autocraft and moves are not touched by this range. The #227 fixes are intact.

Compatibility

  • Toolbox tab: the page is added from MyScreenManager.BeforeScreenDraw, only when the existing keys are exactly 0..N-1. With vanilla fakes those are 0..6, so the page is key 7. MyGuiControlTabControl cycles with (key ± 1) % PagesCount, so Ctrl+Tab keeps working. Out-of-enum page values in MyGuiScreenTerminal (Draw, tabs_OnPageChanged, GetCurrentScreen) only miss dictionary lookups. MySpaceClientState.GetContextByPage maps key 7 to None, the same as Info, Factions or GPS. In the hub plugin sources I found no other plugin that adds terminal pages.
  • AssemblerModes.SupportsCoop now also requires MyAssembler.SupportsAdvancedFunctions, which matches the setter guard in MyAssembler.
  • Fat Albert's Artificial Mass term matches MyGridVirtualMassSystem.Update (virtual mass × gravity on non-static grids with working blocks). MyVirtualMass and MySpaceBall both implement IMyVirtualMass.

From-source build

I compiled each manifest's exact file set (the Source/**/*.cs files plus its Shared/ entries) with Roslyn csc from SDK 10.0.400, -langversion:14 -unsafe+ -platform:x64, against SE 1.211.017 Bin64 using Pulsar's Legacy reference globs. I ran it twice: net48 reference assemblies with NETFRAMEWORK;PULSAR (what Pulsar Legacy passes with trusted: true), and the .NET 10.0.11 ref pack with NETCOREAPP;LINUX;PULSAR. All 12 builds gave 0 errors and 0 warnings. Script to Plugin's #if NETFRAMEWORK switch to RuntimeHelpers.GetUninitializedObject depends on Pulsar defining that symbol for plugin compiles, and it does (Tools.GetCompilationSymbols). I didn't load-test these in a game.

Findings

Low (Fat Albert, Linux Interim only): Paste GPS list throws on Linux. PlanetNames.ReadClipboard calls thread.SetApartmentState(ApartmentState.STA) outside its try block. On .NET 10 on Linux that throws PlatformNotSupportedException: COM Interop is not supported on this platform; I checked this with a two-line console app. The exception escapes the button handler. The code predates this range, but the range adds a net10.0 target and silences CA1416 with the comment "The game only runs on Windows" (FatAlbert.csproj#L8-L9). That isn't true for Pulsar Interim, and the manifest has no platform restriction. Fix: use thread.TrySetApartmentState(ApartmentState.STA) (it returns false on Linux) or move the call inside the try, and drop or reword the suppression.

Non-blocking notes

  • A few XML doc comments ended up on the wrong members. ItemLimit's summary now sits above BillLine (Model.cs#L52-L58). QuotaShort's summary is attached to RefinePlan (Construct.cs#L152-L154). CheckPending's summary sits above Reset (ShepherdExport.cs#L85-L95).
  • The SHEPHERD integration trusts the text on the player's own [SHEPHERD] panels to decide when SSM steps back. That's harmless (it only makes SSM do less), but a stale or hand-edited panel can leave jobs unmanaged until the 90 s freeze check fires.

@viktor-ferenczi
viktor-ferenczi merged commit 76d9cb8 into StarCpt:main Nov 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants