Dinorush-TerminalConsumables icon

TerminalConsumables

Allows developers to add consumables to terminals.

Last updated 4 days ago
Total downloads 100
Total rating 0 
Categories Rundown Mods Dev Tools
Dependency string Dinorush-TerminalConsumables-1.1.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

BepInEx-BepInExPack_GTFO-3.2.1 icon
BepInEx-BepInExPack_GTFO

BepInEx pack for GTFO. Preconfigured and includes Unity Base DLLs.

Preferred version: 3.2.1

README

TerminalConsumables

Allows rundown developers to add consumables to the terminal system. Only consumables with registerInTerminalSystem enabled and non-blank terminalItemShortName and terminalItemLongName are added. These restrictions exclude all vanilla consumables by default.

Also fixes resources not updating their location for terminals when dropped.

Differs from PingConsumables in that vanilla consumables are not supported by default.

For Plugin Developers

This exposes an API at TerminalConsumables.API with the following features:

// Overrides normal query output. Returns the lines of text to print for a query command. Each element represents one line.
public delegate List<string> QueryTextOverride(ItemInLevel item, iTerminalItem terminalItem, List<string> defaultDetails);

// Registers the passed item to the terminal system. Queries will print as if the item were a consumable.
// If the item already has a terminal item component, it will register it as a tracked item with the given settings.
public static iTerminalItem RegisterTerminalItem(ItemInLevel item,  bool ammoRel, QueryTextOverride? queryOverride);

// Modifies query-related options for the terminal item. If the item is not tracked, it is registered as a tracked item.
public static bool ModifyTerminalItem(iTerminalItem? terminalItem, bool ammoRel, QueryTextOverride? queryOverride);
public static bool ModifyTerminalItem(ItemInLevel item, bool ammoRel, QueryTextOverride? queryOverride);