Skip to content

Weld

namespace Griff.Modules.Contraptions;
public sealed class Weld : Component

Sticks its entity to another, so the two move as one: a plank with a cab, a box with a thruster. Both need a Body to move; welded to something without one (a wall, the ground), it holds still. Welded things don’t bump into each other. Everything welded together is one body, as heavy as all of it, that turns round where its weight balances when all of its bodies rotate (a thruster off its middle spins it, it tips over edges and lands on its side), and stays upright when any of them doesn’t.

This is a component: its saved properties are on its component page.

public string? To { get; set; }

The entity it’s welded to, by name. The nearest one with that name is used.