Class TimbnTechBuilder
Describes a technology for the plugin's Techs.Add, a node on the game's tech tree that the player buys with tech points. It needs At(float, float) for its cell and After(string, params string[]) for the tech that comes before it. What the tech unlocks is set from the other side, by the station's or craft's UnlockedBy with this tech's id.
public sealed class TimbnTechBuilder
- Inheritance
-
TimbnTechBuilder
- Inherited Members
Examples
A tech on the anatomy tab, straight after Body Places II.
Techs.Add("timbn_infusion_rack", "Infusion Rack", tech => tech
.Tab(TechTreeTab.Anatomy)
.At(8, 2)
.After(TimbnGameIds.Techs.BodyPlaces2)
.Cost(red: 50, green: 50, blue: 20));
Methods
After(string, params string[])
The techs the player needs first, which the tree joins to this one with a line. The tech is open once every one of them is bought.
public TimbnTechBuilder After(string techId, params string[] more)
Parameters
techIdstringA tech's id, from TimbnGameIds.Techs or another plugin.
morestring[]More techs' ids.
Returns
At(float, float)
The spot the tech sits at. The game puts the tech at that column and row of the tab and never moves anything over for it, so pick a spot nothing else uses. Every vanilla tab is five rows tall (row 0 to 4), and columns can grow as far right as needed. Half steps work too, the way the game's Graveyard Path and Fence I sits at row 0.5.
public TimbnTechBuilder At(float column, float row)
Parameters
columnfloatThe column, counted from the left (posX).
rowfloatThe row, counted from the bottom, so a bigger row is higher on the tree (posY).
Returns
Cost(int, int, int)
The tech points the tech costs, any of them left at zero.
public TimbnTechBuilder Cost(int red = 0, int green = 0, int blue = 0)
Parameters
Returns
Shows(string, params string[])
The icons the tree and the tech's popup list, in this order, instead of everything the tech unlocks. The popup has room for three. A station added with Stations.Add (or any build desk entry) shows as the building, a craft with its recipe, and an item with no recipe and a line saying where it is crafted. An id the game doesn't have yet is skipped.
public TimbnTechBuilder Shows(string id, params string[] more)
Parameters
idstringA station's id, a build desk entry's id, an item's id or a craft's id.
morestring[]More ids.
Returns
Tab(TechTreeTab)
Which tab of the tech tree holds the tech, the building tab when left alone.
public TimbnTechBuilder Tab(TechTreeTab tab)
Parameters
tabTechTreeTabThe tab.