Scripting API

Scripting API

AbyssPluginAttribute<T>

Class in Abyss.Core, from Abyss.Core.

Names a plugin the game plays with, as abyss_ffi::plugin! names a Rust one.

public sealed class AbyssPluginAttribute<T> : AbyssPluginAttribute where T : IPlugin, new()

Remarks

Named rather than found. The editor could have looked for every type that is an IPlugin, and then a plugin that built two others in the order it needs would have had them built a second time each, in no order. The game says which plugins are its own, once, as the Rust half does with plugin!; a plugin that needs others built first builds them itself. Named plugins are built in no particular order, like Rust ones — by their type's name, as it happens, which is stable and is not a promise.

Generic so the compiler checks it: a type that is not a plugin, or cannot be made without arguments, does not build.

Type parameters

  • T: The plugin.

Properties

Plugin

public override Type Plugin { get; }

The plugin's type.

Methods

Create

public override IPlugin Create()

Makes a fresh one.