WKLib 0.2.3
A modding library for White Knuckle
Loading...
Searching...
No Matches
WKLib.API.Gamemodes.RegionBuilder Class Reference

A fluent builder class for creating and configuring an M_Region instance
It simplifies the process of defining a region with its name, subregions, and other properties. More...

+ Collaboration diagram for WKLib.API.Gamemodes.RegionBuilder:

Public Member Functions

RegionBuilder WithName (string regionName)
 Sets the name for the region. This name will be used for both display and internal identification.
 
RegionBuilder WithSubregions (List< M_Subregion > subregions)
 Sets the list of subregions that belong to this region.
 
RegionBuilder WithStartingLevel (bool hasStartingLevel)
 Sets whether the region should attempt to include a default starting level.
 
M_Region Build ()
 Constructs and returns a new M_Region instance based on the properties configured in this builder.
 

Detailed Description

A fluent builder class for creating and configuring an M_Region instance
It simplifies the process of defining a region with its name, subregions, and other properties.

Definition at line 12 of file RegionBuilder.cs.

Member Function Documentation

◆ Build()

M_Region WKLib.API.Gamemodes.RegionBuilder.Build ( )

Constructs and returns a new M_Region instance based on the properties configured in this builder.

Returns
A new M_Region object populated with the specified settings

Definition at line 60 of file RegionBuilder.cs.

◆ WithName()

RegionBuilder WKLib.API.Gamemodes.RegionBuilder.WithName ( string regionName)

Sets the name for the region. This name will be used for both display and internal identification.

Parameters
regionNameThe desired name for the region
Returns
The current RegionBuilder instance for fluent chaining

Definition at line 23 of file RegionBuilder.cs.

◆ WithStartingLevel()

RegionBuilder WKLib.API.Gamemodes.RegionBuilder.WithStartingLevel ( bool hasStartingLevel)

Sets whether the region should attempt to include a default starting level.

Parameters
hasStartingLevelA boolean value. If true, the builder will look for a default starting level
Returns
The current RegionBuilder instance for fluent chaining

This method is marked as obsolete because the game's internal logic often handles the selection of starting levels automatically
It's generally recommended to let the game decide on the starting level

Definition at line 50 of file RegionBuilder.cs.

◆ WithSubregions()

RegionBuilder WKLib.API.Gamemodes.RegionBuilder.WithSubregions ( List< M_Subregion > subregions)

Sets the list of subregions that belong to this region.

Parameters
subregionsA List<T> of M_Subregion instances
Returns
The current RegionBuilder instance for fluent chaining

Definition at line 34 of file RegionBuilder.cs.


The documentation for this class was generated from the following file: