Skip to content

v0.2.0 — the mod-side half is yours

Choose a tag to compare

@musharna musharna released this 10 Aug 23:36
· 140 commits to master since this release

0.1.0 could tell another mod what to implement. This one hands it the implementation.

responder/ — the mod-side half, extracted

The responder that answers every trigger used to live inside Biomancy, so what this project could offer another mod was a document. It is now a folder you copy into your mod's source tree and subclass: nine .cs files, one abstract class, two overrides.

using TModLoaderMcp.DevBridge;

public class MyDevResponder : DevResponder
{
    protected override string CollectDiag() =>
        "world: " + (Terraria.Main.worldName ?? "none") + "\n";
}

It is source rather than a package because tModLoader has no dependency mechanism for compile-time C#. See responder/README.md.

What the compile line proves that a source scan cannot: responder/tests/ compiles the folder with nothing of any mod's on the compile line, on a CI runner with no tModLoader installed, on every push. Vendorability is checked by the compiler rather than asserted by a reviewer.

Proven against a running game, not just at the compile line: 12 commands published on both the client and the dedicated server with the base three leading in order, diag answered on both sides, a real PNG captured and read back.

Biomancy now runs on the vendored copy — a consumer of the folder rather than its owner, which is what makes the claim checkable. Its DevCapture went from 1442 lines to 678.

Also in this release

  • shot verifies whole PNGs at both ends (#38). It used to wait for a file, rename it, and hand back the path without reading a byte — so anything landing on that name was promoted into your captures, and you found out one round trip later where the error names your image reader.
  • A ${VAR} that never expanded is treated as absent (#37), so the refusal names the variable that actually failed instead of four derived ones.
  • responder/ and docs/ now ship in the sdist.

Not done

Per-player artifact naming. Two developers on one machine share a save directory, so they share every artifact filename. Designed, deliberately left to its own change.

Full changelog: v0.1.0...v0.2.0