Class ConsumablePDIntCost
Cost which subtracts the specified amount from the specified PlayerData int. Can only be paid when the result of the subtraction would be nonnegative.
Inheritance
ConsumablePDIntCost
Assembly: ItemChanger.dll
Syntax
public sealed record ConsumablePDIntCost : Cost, IEquatable<Cost>, IEquatable<ConsumablePDIntCost>
Constructors
View Source
ConsumablePDIntCost(int, string, string)
Cost which subtracts the specified amount from the specified PlayerData int. Can only be paid when the result of the subtraction would be nonnegative.
Declaration
public ConsumablePDIntCost(int amount, string fieldName, string uiText)
Parameters
Properties
View Source
EqualityContract
Declaration
protected override Type EqualityContract { get; }
Property Value
Overrides
View Source
amount
Declaration
public int amount { get; init; }
Property Value
View Source
fieldName
Declaration
public string fieldName { get; init; }
Property Value
View Source
uiText
Declaration
public string uiText { get; init; }
Property Value
Methods
View Source
CanPay()
Returns whether the cost can currently be paid.
Declaration
public override bool CanPay()
Returns
Overrides
View Source
Deconstruct(out int, out string, out string)
Declaration
public void Deconstruct(out int amount, out string fieldName, out string uiText)
Parameters
View Source
Equals(ConsumablePDIntCost?)
Declaration
public bool Equals(ConsumablePDIntCost? other)
Parameters
Returns
View Source
Equals(Cost?)
Declaration
public override sealed bool Equals(Cost? other)
Parameters
| Type |
Name |
Description |
| Cost |
other |
|
Returns
Overrides
View Source
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
GetCostText()
Method which provides the cost text used in y/n prompts.
Declaration
public override string GetCostText()
Returns
Overrides
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
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
Overrides
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
Overrides
View Source
OnPay()
Method for administering all effects of the cost during Pay.
Declaration
public override void OnPay()
Overrides
View Source
PrintMembers(StringBuilder)
Declaration
protected override bool PrintMembers(StringBuilder builder)
Parameters
Returns
Overrides
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
View Source
operator ==(ConsumablePDIntCost?, ConsumablePDIntCost?)
Declaration
public static bool operator ==(ConsumablePDIntCost? left, ConsumablePDIntCost? right)
Parameters
Returns
View Source
operator !=(ConsumablePDIntCost?, ConsumablePDIntCost?)
Declaration
public static bool operator !=(ConsumablePDIntCost? left, ConsumablePDIntCost? right)
Parameters
Returns
Implements
Extension Methods