Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/steam-workshop-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:

rsync -a --delete \
--exclude 'README.md' \
--exclude 'MagnetarMod.csproj' \
--exclude '*.mdk.local.ini' \
--exclude 'bin/' \
--exclude 'obj/' \
MagnetarMod/ "$STAGING/"

SBMI_FILE="MagnetarMod/modinfo.sbmi"
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<!-- Bump the Magnetar version here (centralized) -->
<PropertyGroup>
<Version>1.0.5</Version>
<Version>1.0.6</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
</PropertyGroup>
Expand Down
21 changes: 21 additions & 0 deletions Docs/Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,27 @@ overrides — are documented in [Configuration.md](Configuration.md).

---

## MagnetarMod MDK2 project

The companion world mod under [MagnetarMod/](../MagnetarMod/) has its own MDK2
project:

```sh
dotnet build MagnetarMod/MagnetarMod.csproj
dotnet build Magnetar.sln -c Workshop
```

It targets `net48`, uses `Mal.Mdk2.References` and
`Mal.Mdk2.ModAnalyzers`, and reads the local Space Engineers install from
`MagnetarMod/MagnetarMod.mdk.local.ini`. It is included in `Magnetar.sln` only
for the `Workshop|Any CPU` solution configuration. The normal `Debug` and
`Release` solution configurations leave `MagnetarMod` unselected for build, so
the regular release pipeline's `dotnet build -c Release Magnetar.sln` does not
build the mod project. Space Engineers still compiles the world mod when loading
it; the MDK2 project is for local/workshop validation and analyzer coverage.

---

## How the multi-target build works

* **Target frameworks** are OS-conditional in
Expand Down
4 changes: 2 additions & 2 deletions Docs/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Every documented source file, grouped by module. 136 files across 18 modules.
| [`Legacy/Compiler/Legacy.cs`](descriptions/Legacy/Compiler/Legacy.cs.md) | 86 | 2 | Active only under `#if NETFRAMEWORK` (the .NET Framework 4.8 / Windows build). |
| [`Legacy/Compiler/References.cs`](descriptions/Legacy/Compiler/References.cs.md) | 36 | 2 | Provides the list of assembly references that the Roslyn compiler must know about when compiling SE scripts and plugins. |
| [`Legacy/Extensions/ModPlugin.cs`](descriptions/Legacy/Extensions/ModPlugin.cs.md) | 31 | 2 | Extends `ModPlugin` (the Magnetar data type representing a Steam Workshop mod) with the SE DS API objects needed to register a mod with the game engine at runtime. |
| [`Legacy/Integration/MissionScreenSender.cs`](descriptions/Legacy/Integration/MissionScreenSender.cs.md) | 119 | 2 | Host-side sender that delivers plugin-declared mission-screen popups to clients over Space Engineers' multiplayer messaging API. |
| [`Legacy/Integration/MissionScreenSender.cs`](descriptions/Legacy/Integration/MissionScreenSender.cs.md) | 142 | 2 | Host-side sender that delivers plugin-declared mission-screen popups to clients over Space Engineers' multiplayer messaging API. |
| [`Legacy/Paths/PathResolverBinder.cs`](descriptions/Legacy/Paths/PathResolverBinder.cs.md) | 77 | 2 | Wires the `PluginSdk.Paths.PathResolver` facade to the LinuxCompat plugin's case-insensitive path cache at startup. |
| [`Legacy/Paths/ReflectionPathResolver.cs`](descriptions/Legacy/Paths/ReflectionPathResolver.cs.md) | 94 | 2 | An `IPathResolver` backend that forwards path operations to the LinuxCompat plugin's `PathHelpers` and `PathCache` static methods via pre-bound delegates. |

Expand Down Expand Up @@ -76,7 +76,7 @@ Every documented source file, grouped by module. 136 files across 18 modules.

| File | Lines | Tier | Description |
| ---- | ----- | ---- | ----------- |
| [`MagnetarMod/Data/Scripts/MagnetarMod/MagnetarModSession.cs`](descriptions/MagnetarMod/Data/Scripts/MagnetarMod/MagnetarModSession.cs.md) | 113 | 2 | Client-side Space Engineers world-mod session component that receives server-pushed mission-screen popups and renders them through the SE ModAPI. |
| [`MagnetarMod/Data/Scripts/MagnetarMod/MagnetarModSession.cs`](descriptions/MagnetarMod/Data/Scripts/MagnetarMod/MagnetarModSession.cs.md) | 114 | 2 | Client-side Space Engineers world-mod session component that receives server-pushed mission-screen popups and renders them through the SE ModAPI. |

## PluginSdk.Commands · [module doc](modules/PluginSdk.Commands.md)

Expand Down
1 change: 1 addition & 0 deletions Docs/Layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
| `Shared/` | Cross-project plugin loader / config / network code |
| `Compiler/` | Roslyn-based on-disk source plugin compiler |
| `PluginSdk/` | Public API surface plugins compile against |
| `MagnetarMod/` | Companion SE world mod with a standalone MDK2 project for analyzer-backed mod editing |
| `Scripts/` | Build helpers (Steamworks.NET, licenses) |
| `build/Libraries/` | Staged Linux dependencies (gitignored, populated by `./build.sh`) |
| `dist/` | Packaged distributables (gitignored) |
Expand Down
20 changes: 12 additions & 8 deletions Docs/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ plugins, then hand off to the dedicated server.
| **MagnetarLegacy** | .NET Framework 4.8 | Windows only | `Legacy.csproj` (net48) |
| **MagnetarInterim** | .NET 10 | Windows + Linux | `Legacy.csproj` (net10.0) |

The code is organised into five .NET projects. Their compile-time reference
direction (a strict DAG) is the backbone of the module layering below:
The launcher/plugin-loader code is organised into five .NET solution projects.
Their compile-time reference direction (a strict DAG) is the backbone of the
module layering below:

```mermaid
graph TD
Expand Down Expand Up @@ -100,7 +101,7 @@ Grouped by project. Click a module for its full doc.
| [Legacy.Loader](modules/Legacy.Loader.md) | 6 | 1078 | Runtime plugin host & native bootstrap: instantiates plugins, drives their SE lifecycle, registers components, manages the implicit MagnetarMod client companion, wires the mission-screen senders, prefetches Workshop mods (expanding legacy archives), preloads native libs. |
| [Legacy.Patch](modules/Legacy.Patch.md) | 12 | 528 | All Harmony patches that adapt the DS binary to Magnetar's headless, in-process, externally-configured hosting model, including injecting the MagnetarMod client companion into SE's mod-loading pipeline. |
| [Legacy.Commands](modules/Legacy.Commands.md) | 3 | 243 | Host side of the `!`-prefixed chat-command pipeline and the built-in `!save` / `!restart` / `!quit` / `!stop` commands. |
| [Legacy.Integration](modules/Legacy.Integration.md) | 7 | 590 | Glue to SE internals: isolated Roslyn compilation host, Linux case-insensitive path resolution, and the host-side mission-screen sender that pushes popups to clients via the MagnetarMod world mod. |
| [Legacy.Integration](modules/Legacy.Integration.md) | 7 | 613 | Glue to SE internals: isolated Roslyn compilation host, Linux case-insensitive path resolution, and the host-side mission-screen sender that pushes popups to clients via the MagnetarMod world mod. |

### `Shared` — cross-target infrastructure

Expand Down Expand Up @@ -136,14 +137,17 @@ Grouped by project. Click a module for its full doc.

### `MagnetarMod` — companion in-game world mod

Not part of the .NET solution: an SE1 `Data/Scripts` mod compiled in-game, shipped
alongside the launcher and auto-loaded as an implicit client mod (unless disabled
with `-noimplicitmod` or running crossplay). It is the client-side receiver for
server-pushed content.
An SE1 `Data/Scripts` mod compiled in-game, shipped alongside the launcher and
auto-loaded as an implicit client mod (unless disabled with `-noimplicitmod` or
running crossplay). It is the client-side receiver for server-pushed content.
`MagnetarMod/MagnetarMod.csproj` is an MDK2 project for IDE support, local
builds, and ModAPI analyzer coverage. It is present in `Magnetar.sln`, but only
the `Workshop|Any CPU` solution configuration selects it for build; normal
`Debug`/`Release` solution builds skip it.

| Module | Files | Lines | What it does |
| ------ | ----- | ----- | ------------ |
| [MagnetarMod](modules/MagnetarMod.md) | 1 | 113 | Session component that receives mission-screen payloads from the server over a secure multiplayer channel and renders them via the SE ModAPI — the client counterpart to `PluginSdk.MissionScreens` / `Legacy.Integration`'s mission-screen sender. |
| [MagnetarMod](modules/MagnetarMod.md) | 1 | 114 | Session component that receives mission-screen payloads from the server over a secure multiplayer channel and renders them via the SE ModAPI — the client counterpart to `PluginSdk.MissionScreens` / `Legacy.Integration`'s mission-screen sender. |

## Module dependency graph

Expand Down
4 changes: 2 additions & 2 deletions Docs/data/manifest.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{"path": "Legacy/Compiler/Legacy.cs", "project": "Legacy", "module": "Legacy.Integration", "type": "csharp", "size": 2775, "lines": 86, "sha256": "3021bac92680538aeb4add426cead361aac6f319a8c71ae1945d7a465a12b7bc", "tier": 2, "desc": "Docs/descriptions/Legacy/Compiler/Legacy.cs.md", "status": "pending"}
{"path": "Legacy/Compiler/References.cs", "project": "Legacy", "module": "Legacy.Integration", "type": "csharp", "size": 859, "lines": 36, "sha256": "4b4080cf90eff6e18d691bff20bbedaecfff8bb3d9b4a1d24274f9adfcc8464f", "tier": 2, "desc": "Docs/descriptions/Legacy/Compiler/References.cs.md", "status": "pending"}
{"path": "Legacy/Extensions/ModPlugin.cs", "project": "Legacy", "module": "Legacy.Integration", "type": "csharp", "size": 875, "lines": 31, "sha256": "569d46fa675622df818ff58e5cf6444f388888edf6c143e69d7c5c9722b6f433", "tier": 2, "desc": "Docs/descriptions/Legacy/Extensions/ModPlugin.cs.md", "status": "pending"}
{"path": "Legacy/Integration/MissionScreenSender.cs", "project": "Legacy", "module": "Legacy.Integration", "type": "csharp", "size": 3961, "lines": 119, "sha256": "5b5da6cf45fafe69085f2b8d57d562f6bf183975476544a2957ef29b91b402d7", "tier": 2, "desc": "Docs/descriptions/Legacy/Integration/MissionScreenSender.cs.md", "status": "pending"}
{"path": "Legacy/Integration/MissionScreenSender.cs", "project": "Legacy", "module": "Legacy.Integration", "type": "csharp", "size": 4511, "lines": 142, "sha256": "83763f4728a46eb46c3b7d071ded438b90b86dc16ece25ac593e551bbb5603ec", "tier": 2, "desc": "Docs/descriptions/Legacy/Integration/MissionScreenSender.cs.md", "status": "pending"}
{"path": "Legacy/Launcher/Daemon.cs", "project": "Legacy", "module": "Legacy.Launcher", "type": "csharp", "size": 6162, "lines": 164, "sha256": "c520d66bd92e2def763e37a772c70d5dd028f00ba2310a847ac4e4ebf1ba126a", "tier": 2, "desc": "Docs/descriptions/Legacy/Launcher/Daemon.cs.md", "status": "pending"}
{"path": "Legacy/Launcher/Folder.cs", "project": "Legacy", "module": "Legacy.Launcher", "type": "csharp", "size": 4660, "lines": 161, "sha256": "6c73792c9c5bbcba4c0a549f7cd3d441d1abc0d7051ec05e93cd5d9cefc976f1", "tier": 2, "desc": "Docs/descriptions/Legacy/Launcher/Folder.cs.md", "status": "pending"}
{"path": "Legacy/Launcher/Game.cs", "project": "Legacy", "module": "Legacy.Launcher", "type": "csharp", "size": 4534, "lines": 141, "sha256": "8be79a0bfa8c142cbb80968c8a25a3d2bca42e939c841f6fba42d62574e3937e", "tier": 2, "desc": "Docs/descriptions/Legacy/Launcher/Game.cs.md", "status": "pending"}
Expand All @@ -36,7 +36,7 @@
{"path": "Legacy/Paths/PathResolverBinder.cs", "project": "Legacy", "module": "Legacy.Integration", "type": "csharp", "size": 2605, "lines": 77, "sha256": "1d6940dca3f7a00fdc35868c7bcc142f38b03a6d0f2444732e2b4a59fab0d917", "tier": 2, "desc": "Docs/descriptions/Legacy/Paths/PathResolverBinder.cs.md", "status": "pending"}
{"path": "Legacy/Paths/ReflectionPathResolver.cs", "project": "Legacy", "module": "Legacy.Integration", "type": "csharp", "size": 4371, "lines": 94, "sha256": "ccf553e11ecf647bb95602b7e7153c42a70cbca8d785aac62bd7f28f28746c6a", "tier": 2, "desc": "Docs/descriptions/Legacy/Paths/ReflectionPathResolver.cs.md", "status": "pending"}
{"path": "Legacy/Program.cs", "project": "Legacy", "module": "Legacy.Launcher", "type": "csharp", "size": 17607, "lines": 464, "sha256": "59dda57116df1564e1cb8afe1f1ae2b4fd66b3d6c129db094849e36e3f066920", "tier": 1, "desc": "Docs/descriptions/Legacy/Program.cs.md", "status": "pending"}
{"path": "MagnetarMod/Data/Scripts/MagnetarMod/MagnetarModSession.cs", "project": "MagnetarMod", "module": "MagnetarMod", "type": "csharp", "size": 3742, "lines": 113, "sha256": "c25d1b29062e4529afc3ba02291ff7893a9c1c977b5f9090f87c2a833aff2acd", "tier": 2, "desc": "Docs/descriptions/MagnetarMod/Data/Scripts/MagnetarMod/MagnetarModSession.cs.md", "status": "pending"}
{"path": "MagnetarMod/Data/Scripts/MagnetarMod/MagnetarModSession.cs", "project": "MagnetarMod", "module": "MagnetarMod", "type": "csharp", "size": 3446, "lines": 114, "sha256": "e16bfe184f8bc7e6ede9ccb93640e32f846b1bce234ea3ad894afe49258627a2", "tier": 2, "desc": "Docs/descriptions/MagnetarMod/Data/Scripts/MagnetarMod/MagnetarModSession.cs.md", "status": "pending"}
{"path": "PluginSdk/Commands/ArgumentBinder.cs", "project": "PluginSdk", "module": "PluginSdk.Commands", "type": "csharp", "size": 6253, "lines": 155, "sha256": "39e42ad8dac3b03ee5033fe703444011792ff5e16868bc364c9fe49b7ddc01cf", "tier": 2, "desc": "Docs/descriptions/PluginSdk/Commands/ArgumentBinder.cs.md", "status": "pending"}
{"path": "PluginSdk/Commands/CommandAttribute.cs", "project": "PluginSdk", "module": "PluginSdk.Commands", "type": "csharp", "size": 2431, "lines": 54, "sha256": "f719961cd0f20be7b3a6a2a00f52688f30641108b294b30ea22749f33e8b4dc3", "tier": 2, "desc": "Docs/descriptions/PluginSdk/Commands/CommandAttribute.cs.md", "status": "pending"}
{"path": "PluginSdk/Commands/CommandCaller.cs", "project": "PluginSdk", "module": "PluginSdk.Commands", "type": "csharp", "size": 1268, "lines": 37, "sha256": "f1ae54c0eb2c4682c6b2f070fea1168a3215cf626ec748a5d11efedd133e5336", "tier": 2, "desc": "Docs/descriptions/PluginSdk/Commands/CommandCaller.cs.md", "status": "pending"}
Expand Down
6 changes: 3 additions & 3 deletions Docs/data/modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"Legacy/Paths/ReflectionPathResolver.cs"
],
"file_count": 7,
"total_lines": 590,
"total_lines": 613,
"model": "sonnet",
"dominant_tier": 2
},
Expand Down Expand Up @@ -97,7 +97,7 @@
"MagnetarMod/Data/Scripts/MagnetarMod/MagnetarModSession.cs"
],
"file_count": 1,
"total_lines": 113,
"total_lines": 114,
"model": "sonnet",
"dominant_tier": 2
},
Expand Down Expand Up @@ -297,4 +297,4 @@
"model": "sonnet",
"dominant_tier": 2
}
}
}
Loading
Loading