Show / Hide Table of Contents

Class PDIntCost

Cost which has no pay effects, but can only be paid when the specified PlayerData int comparison succeeds.

Inheritance
object
Cost
PDIntCost
Implements
IEquatable<Cost>
IEquatable<PDIntCost>
Inherited Members
Cost.Pay()
Cost.AfterPay()
Cost.GetBaseCost()
Cost.Load()
Cost.Unload()
Cost.NewGeoCost(int)
Cost.NewEssenceCost(int)
Cost.NewGrubCost(int)
Cost.Paid
Cost.Recurring
Cost.DiscountRate
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: ItemChanger
Assembly: ItemChanger.dll
Syntax
public sealed record PDIntCost : Cost, IEquatable<Cost>, IEquatable<PDIntCost>

Constructors

View Source

PDIntCost(int, string, string, ComparisonOperator)

Cost which has no pay effects, but can only be paid when the specified PlayerData int comparison succeeds.

Declaration
public PDIntCost(int amount, string fieldName, string uiText, ComparisonOperator op = ComparisonOperator.Ge)
Parameters
Type Name Description
int amount
string fieldName
string uiText
ComparisonOperator op

Properties

View Source

EqualityContract

Declaration
protected override Type EqualityContract { get; }
Property Value
Type Description
Type
Overrides
Cost.EqualityContract
View Source

amount

Declaration
public int amount { get; init; }
Property Value
Type Description
int
View Source

fieldName

Declaration
public string fieldName { get; init; }
Property Value
Type Description
string
View Source

op

Declaration
public ComparisonOperator op { get; init; }
Property Value
Type Description
ComparisonOperator
View Source

uiText

Declaration
public string uiText { get; init; }
Property Value
Type Description
string

Methods

View Source

CanPay()

Returns whether the cost can currently be paid.

Declaration
public override bool CanPay()
Returns
Type Description
bool
Overrides
Cost.CanPay()
View Source

Deconstruct(out int, out string, out string, out ComparisonOperator)

Declaration
public void Deconstruct(out int amount, out string fieldName, out string uiText, out ComparisonOperator op)
Parameters
Type Name Description
int amount
string fieldName
string uiText
ComparisonOperator op
View Source

Equals(Cost?)

Declaration
public override sealed bool Equals(Cost? other)
Parameters
Type Name Description
Cost other
Returns
Type Description
bool
Overrides
Cost.Equals(Cost?)
View Source

Equals(PDIntCost?)

Declaration
public bool Equals(PDIntCost? other)
Parameters
Type Name Description
PDIntCost other
Returns
Type Description
bool
View Source

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
Cost.Equals(object?)
View Source

GetCostText()

Method which provides the cost text used in y/n prompts.

Declaration
public override string GetCostText()
Returns
Type Description
string
Overrides
Cost.GetCostText()
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
Cost.GetHashCode()
View Source

HasPayEffects()

Does paying this cost have effects (particularly that could prevent paying other costs of the same type)?

Declaration
public override bool HasPayEffects()
Returns
Type Description
bool
Overrides
Cost.HasPayEffects()
View Source

Includes(Cost)

Is the other cost a subset of this cost?

Declaration
public override bool Includes(Cost c)
Parameters
Type Name Description
Cost c
Returns
Type Description
bool
Overrides
Cost.Includes(Cost)
View Source

OnPay()

Method for administering all effects of the cost during Pay.

Declaration
public override void OnPay()
Overrides
Cost.OnPay()
View Source

PrintMembers(StringBuilder)

Declaration
protected override bool PrintMembers(StringBuilder builder)
Parameters
Type Name Description
StringBuilder builder
Returns
Type Description
bool
Overrides
Cost.PrintMembers(StringBuilder)
View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
Cost.ToString()

Operators

View Source

operator ==(PDIntCost?, PDIntCost?)

Declaration
public static bool operator ==(PDIntCost? left, PDIntCost? right)
Parameters
Type Name Description
PDIntCost left
PDIntCost right
Returns
Type Description
bool
View Source

operator !=(PDIntCost?, PDIntCost?)

Declaration
public static bool operator !=(PDIntCost? left, PDIntCost? right)
Parameters
Type Name Description
PDIntCost left
PDIntCost right
Returns
Type Description
bool

Implements

IEquatable<T>
IEquatable<T>

Extension Methods

Extensions.Yield<T>(T)
  • View Source
In this article
Back to top Generated by DocFX