Repository navigation
Update scotlandsyard plugins (BaR Maid, Fat Albert, OreScout, Sacrificial Stockpile Manager, Script to Plugin, Wilson) - #379
Conversation
…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
left a comment
There was a problem hiding this comment.
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.pyat the PR head passes (All files validated). Ids andRepoIdare unchanged. Descriptions only gained a Quick start section.- New
SourceDirectories:Shared/Toolbox.csin all six andShared/ListSearch.csin five (not Script to Plugin). For each plugin I compared theShared/entries with theCompile Includelinks in its csproj, and all six match.Projects/<plugin>/Source/still pulls in no tests or tooling. - No
NuGetReferences,AssetFolderor dependencies, and none are needed.
Repository and pin provenance
- The repository is public, not a fork and GPL-3.0.
e31f251is the currentmainHEAD (no drift), andd8b9bf7is its ancestor. - Project references: every csproj now targets
net481;net10.0, withMicrosoft.NETFramework.ReferenceAssemblies1.0.3 restricted to net481. Fat Albert addsSpaceEngineers.Gamefrom$(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) andWilson.txt.csare generated. I regenerated all six with the algorithm inShared/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.Runon a client raisesRunProgramRequest, 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 failsReach.Check(L298-L307) or whenEnableIngameScriptsis 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.
- SSM sends a PB Run with
- Autocraft now queues or disassembles only what the production screen would offer.
AutoCraft.CanOrderrequires a public item, a public and enabled blueprint, andCanUseBlueprinton 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.
- SSM's new bill channel (
- 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 ofMyGuiControlTable.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 exactly0..N-1. With vanilla fakes those are 0..6, so the page is key 7.MyGuiControlTabControlcycles with(key ± 1) % PagesCount, so Ctrl+Tab keeps working. Out-of-enum page values inMyGuiScreenTerminal(Draw,tabs_OnPageChanged,GetCurrentScreen) only miss dictionary lookups.MySpaceClientState.GetContextByPagemaps key 7 toNone, the same as Info, Factions or GPS. In the hub plugin sources I found no other plugin that adds terminal pages. AssemblerModes.SupportsCoopnow also requiresMyAssembler.SupportsAdvancedFunctions, which matches the setter guard inMyAssembler.- Fat Albert's Artificial Mass term matches
MyGridVirtualMassSystem.Update(virtual mass × gravity on non-static grids with working blocks).MyVirtualMassandMySpaceBallboth implementIMyVirtualMass.
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 aboveBillLine(Model.cs#L52-L58).QuotaShort's summary is attached toRefinePlan(Construct.cs#L152-L154).CheckPending's summary sits aboveReset(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.
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) andShared/Toolbox.cs(all six). Each description gets a short Quick start.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[Server], the player's own GPS list); the scanning detector's Custom Data (Access, Ownership). Unchanged since #227TransferByUser(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 SHEPHERDconfigReload/unloadShip; on/off and LCD text as in the terminalMyReplicableRightsValidator.GetAccess); SHEPHERD is treated as absent and never Run with in-game scripts offReflection: 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'sMyPlugins.m_handleInputPluginslookup 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 fromMyScreenManager.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 onMyGuiScreenTerminal.m_terminalTabs(null- and type-checked; fails closed, the tab is then left out).TIM_SWITmessage) can register aFunc<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.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