Show / Hide Table of Contents

Class RemoveDuplicatePoints

Removes all points from an area list that are in any of the areas present in another list. Context Components Required:

  • ItemList<TItem> (tag UnmodifiedAreaListTag: The list of areas that will not be modified, but will serve as a basis for points to remove from areas in the other list.
  • ItemList<TItem> (tag ModifiedAreaListTag: The list of areas that will be modified; all areas in this list will have any points that also appear in areas in the other list removed. If an area ends up with no remaining points, it is removed from the list.
Inheritance
object
GenerationStep
RemoveDuplicatePoints
Inherited Members
GenerationStep.Name
GenerationStep.PerformStep(GenerationContext)
GenerationStep.GetStageEnumerator(GenerationContext)
GenerationStep.RequiredComponents
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: GoRogue.MapGeneration.Steps.Translation
Assembly: GoRogue.dll
Syntax
public class RemoveDuplicatePoints : GenerationStep
Remarks

This component will removes all positions from any areas in the the modified area list, that are also present in one or more areas in the unmodified area list. If an area is modified such that it has no remaining points, it is removed from the list entirely. This ensures that the two lists do not contain any positions that overlap with each other.

Constructors

View Source

RemoveDuplicatePoints(string, string)

Creates a new area duplicate point remover step, with the name RemoveDuplicatePoints.

Declaration
public RemoveDuplicatePoints(string unmodifiedAreaListTag, string modifiedAreaListTag)
Parameters
Type Name Description
string unmodifiedAreaListTag

Tag that must be associated with the component used as the unmodified area list.

string modifiedAreaListTag

Tag that must be associated with the component used as the area list from which duplicates are removed.

View Source

RemoveDuplicatePoints(string?, string, string)

Creates a new area duplicate point remover step.

Declaration
public RemoveDuplicatePoints(string? name, string unmodifiedAreaListTag, string modifiedAreaListTag)
Parameters
Type Name Description
string name

The name of the generation step.

string unmodifiedAreaListTag

Tag that must be associated with the component used as the unmodified area list.

string modifiedAreaListTag

Tag that must be associated with the component used as the area list from which duplicates are removed.

Fields

View Source

ModifiedAreaListTag

Tag that must be associated with the component used as the area list from which duplicates are removed.

Declaration
public readonly string ModifiedAreaListTag
Field Value
Type Description
string
View Source

UnmodifiedAreaListTag

Tag that must be associated with the component used as the unmodified area list.

Declaration
public readonly string UnmodifiedAreaListTag
Field Value
Type Description
string

Methods

View Source

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)
  • View Source
In this article
Back to top Generated by DocFX