Class BlockModuleBehaviour<TModule>
One of the two base classes for block modules.
This class is the base for the behaviours attached to block game objects.
Inheritance
BlockModuleBehaviour<TModule>
Assembly: Assembly-CSharp.dll
Syntax
public abstract class BlockModuleBehaviour<TModule> : ModBlockBehaviour, IModuleBehaviour where TModule : BlockModule
Type Parameters
Name |
Description |
TModule |
BlockModule class for this module.
|
Constructors
BlockModuleBehaviour()
Declaration
protected BlockModuleBehaviour()
Properties
Module
Access to the BlockModule extending class instance.
Declaration
public TModule Module { get; }
Property Value
ModuleGuid
Required for internal purposes.
Should not be used from mods, not stable API.
Declaration
public string ModuleGuid { get; set; }
Property Value
RawModule
Required for internal purposes, same value as Module but as object.
Should not be used from mods, not stable API.
Declaration
public object RawModule { get; set; }
Property Value
Methods
GetColourSlider(MColourSliderReference)
Get an MColourSlider from an MColourSLiderReference.
Declaration
public MColourSlider GetColourSlider(MColourSliderReference slider)
Parameters
Returns
Type |
Description |
MColourSlider |
|
GetKey(MKeyReference)
Get an MKey form an MKeyReference.
Declaration
public MKey GetKey(MKeyReference key)
Parameters
Returns
GetResource(ResourceReference)
Get a shared resource from a ModuleResourceReference.
Declaration
public ModResource GetResource(ResourceReference reference)
Parameters
Returns
GetSlider(MSliderReference)
Get an MSlider from an MSliderReference.
Declaration
public MSlider GetSlider(MSliderReference slider)
Parameters
Returns
GetToggle(MToggleReference)
Get an MToggle from an MToggleReference.
Declaration
public MToggle GetToggle(MToggleReference toggle)
Parameters
Returns
GetValue(MValueReference)
Get an MValue from an MValueReference.
Declaration
public MValue GetValue(MValueReference value)
Parameters
Returns
OnReload()
Declaration
public virtual void OnReload()