Table of Contents

Class TimbnPluginTechs

Namespace
Timbn.GraveyardKeeperTwo.Core.Framework
Assembly
Timbn.GraveyardKeeperTwo.Core.dll

Adds technologies to the game's tech tree on behalf of a plugin, bought with tech points like the game's own and removed when the plugin unloads. Reach it through the plugin's Techs property. A save that bought one keeps working once the plugin is gone, since the game drops tech ids it doesn't know when it loads.

public sealed class TimbnPluginTechs
Inheritance
TimbnPluginTechs
Inherited Members

Methods

Add(string, string, Action<TimbnTechBuilder>)

Adds a technology to the tech tree. Call it in OnAwake before the stations and crafts that name it in their UnlockedBy, so they find it. See TimbnTechBuilder for what a tech holds.

public IDisposable Add(string id, string name, Action<TimbnTechBuilder> tech)

Parameters

id string

The tech's id, for example "timbn_infusion_rack". Keep it stable, since saves name a bought tech by it.

name string

The name shown on the tree. Empty leaves the text to the plugin's lang files under the id.

tech Action<TimbnTechBuilder>

Describes the tech.

Returns

IDisposable

A handle that removes the tech early when disposed. You don't need to keep it.

Exceptions

ArgumentException

The id is empty.

InvalidOperationException

The tech has no cell or no tech before it.