Class GeoCost
Cost which subtracts the specified amount from the GeoCounter. Can only be paid when the result of the subtraction would be nonnegative.
Assembly: ItemChanger.dll
Syntax
public sealed record GeoCost : Cost, IEquatable<Cost>, IEquatable<GeoCost>
Constructors
View Source
GeoCost(int)
Cost which subtracts the specified amount from the GeoCounter. Can only be paid when the result of the subtraction would be nonnegative.
Declaration
public GeoCost(int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
Properties
View Source
EqualityContract
Declaration
protected override Type EqualityContract { get; }
Property Value
Overrides
View Source
amount
Declaration
public int amount { 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)
Declaration
public void Deconstruct(out int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
View Source
Equals(Cost?)
Declaration
public override sealed bool Equals(Cost? other)
Parameters
| Type |
Name |
Description |
| Cost |
other |
|
Returns
Overrides
View Source
Equals(GeoCost?)
Declaration
public bool Equals(GeoCost? other)
Parameters
| Type |
Name |
Description |
| GeoCost |
other |
|
Returns
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 ==(GeoCost?, GeoCost?)
Declaration
public static bool operator ==(GeoCost? left, GeoCost? right)
Parameters
Returns
View Source
operator !=(GeoCost?, GeoCost?)
Declaration
public static bool operator !=(GeoCost? left, GeoCost? right)
Parameters
Returns
Implements
Extension Methods