Class "ItemConfigCard"⚓︎
Functions⚓︎
SetAvailabilityCondition⚓︎
void SetAvailabilityCondition ( function AvailabilityCondition )⚓︎
Sets an additional function that runs when IsAvailable() is called, internally or through the Lua API.
The function must return a boolean that determines whether or not the card is available.
This is function is only checked after the GreedModeAllowed, Achievement and Hidden check have all being passed, as such this cannot be used to overwrite those evaluations
Function Errors
If at any point the function errors whilst being executed, then it will be treated the same as if true
was returned.
If this is not your intended behavior then it is suggested to wrap your actual function around a pcall
or xpcall
and return false if they fail.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
ClearAvailabilityCondition⚓︎
void ClearAvailabilityCondition ( )⚓︎
Sets the availability condition to nil
, useful if the condition is no longer needed and increase performance.
GetAvailabilityCondition⚓︎
function GetAvailabilityCondition ( )⚓︎
Returns nil
if no AvailabilityCondition is set or if it has been cleared.
Variables⚓︎
Hidden⚓︎
const boolean Hidden⚓︎
InitialWeight⚓︎
const float InitialWeight⚓︎
ModdedCardFront⚓︎
Sprite ModdedCardFront⚓︎
Weight⚓︎
float Weight⚓︎
Can be set to a value to increase or decrease the chance of this card being randomly picked