Show / Hide Table of Contents

Class AppendItemLists<TItem>

Appends an item list onto another one, optionally removing the one that was appended from the context. Context Components Required:

  • ItemList<TItem> (tag BaseListTag): The base list onto which the other list is appended
  • ItemList<TItem> (tag ListToAppendTag: The list whose items are appended onto the base list. This component will be removed from the context if RemoveAppendedComponent is true.
Inheritance
Object
GenerationStep
AppendItemLists<TItem>
Inherited Members
GenerationStep.Name
GenerationStep.PerformStep(GenerationContext)
GenerationStep.GetStageEnumerator(GenerationContext)
GenerationStep.RequiredComponents
Namespace: GoRogue.MapGeneration.Steps.Translation
Assembly: GoRogue.dll
Syntax
public class AppendItemLists<TItem> : GenerationStep
Type Parameters
Name Description
TItem

Type of item in the lists being appended.

Constructors

AppendItemLists(String, String)

Creates a new generation component that appends lists.

Declaration
public AppendItemLists(string baseListTag, string listToAppendTag)
Parameters
Type Name Description
String baseListTag

A tag that must be attached to the component that will have items from the other list appended onto it.

String listToAppendTag

A tag that must be attached to the component that will have its items appended onto the base list.

AppendItemLists(String, String, String)

Creates a new generation component that appends lists.

Declaration
public AppendItemLists(string name, string baseListTag, string listToAppendTag)
Parameters
Type Name Description
String name

Name of this component.

String baseListTag

A tag that must be attached to the component that will have items from the other list appended onto it.

String listToAppendTag

A tag that must be attached to the component that will have its items appended onto the base list.

Fields

BaseListTag

A tag that must be attached to the component that will have items from the other list appended onto it.

Declaration
public readonly string BaseListTag
Field Value
Type Description
String

ListToAppendTag

A tag that must be attached to the component that will have its items appended onto the base list.

Declaration
public readonly string ListToAppendTag
Field Value
Type Description
String

RemoveAppendedComponent

Whether or not to remove the component with the tag ListToAppendTag after its items have been added to the base list. Defaults to false.

Declaration
public bool RemoveAppendedComponent
Field Value
Type Description
Boolean

Methods

OnPerform(GenerationContext)

Implement to perform the actual work of the generation step. Use "yield return null" to indicate the end of a "stage", eg. a point where execution can be paused when using GetStageEnumerator().

Declaration
protected override IEnumerator<object> OnPerform(GenerationContext context)
Parameters
Type Name Description
GenerationContext context

Context to perform the generation step on.

Returns
Type Description
IEnumerator<Object>
Overrides
GenerationStep.OnPerform(GenerationContext)

Extension Methods

Utility.Yield<T>(T)
In This Article
Back to top Generated by DocFX