Skip to content

Attributing Your Changes

rebaserHEAD edited this page Aug 31, 2026 · 1 revision

Every changed line in a PR should be attributable: maintainers merging from upstream need to tell our code from inherited code at a glance, and readers need to know whose copyright a file carries. Here is what each kind of change gets.

The default license

Everything contributed after the cutoff commit named in LEGAL.md is AGPL-3.0-or-later. You keep your copyright; opening a PR licenses your work under that default, and no header is needed to make it happen. A file that declares its own license in a header keeps it, and assets declare theirs in meta.json.

Editing an inherited file

Anything not under a _Triad/ path is inherited code. Mark your edits so upstream merges surface conflicts instead of silently overwriting them:

// Triad: hold placement to the construction-menu twin
var recipe = _protoManager.Index(component.SelectedRecipe);
SnapToGrid(recipe, args.Location);
// End Triad
MaxDocks = 5; // Triad: 3<5
# Triad: freighters need the wider dock
dockSize: 5
# End Triad

When you replace inherited code, comment it out rather than deleting it; the dead lines are what makes a future merge conflict instead of silently reverting you:

// Triad: removed — collision masks now come from the recipe
// private readonly int _legacyMask = ...;

Delete outright only what upstream itself has already deleted.

Adding new files

Original work goes under _Triad/. No license header, no fork name in identifiers (no TriadFooSystem; the folder and namespace already say it, prototype ids excepted). If you want explicit attribution on your own work:

// SPDX-FileCopyrightText: 2026 Your Name
//
// SPDX-License-Identifier: AGPL-3.0-or-later

Porting from another fork

Ported content is their work, not ours. Keep the origin namespace and folder (_NF/, _DV/, _Mono/), keep the ported meta.json license and authors verbatim, and mark only the inherited files you edit to wire it in. _Triad/ means "we authored this".

Sprites and assets

Every RSI's meta.json declares license and copyright, usually CC-BY-SA 3.0. New art credits you; modified art keeps the original authors and appends you; ported art copies the metadata verbatim.

Important: never remove an existing license notice, in a header or a meta.json. And before you push, check that nothing you authored credits another fork's name.

Clone this wiki locally