diff --git a/Internal-Documentation.md b/Internal-Documentation.md index e48f01f..204715e 100644 --- a/Internal-Documentation.md +++ b/Internal-Documentation.md @@ -137,4 +137,6 @@ Returned a signed string of `val` as dollars, prefixed with "$" if positive and Returns the result of multiplying `base` and `perma + 1`. #### `SMODS.add_to_pool(prototype_obj, args) -> bool?, table?` Helper function to check if an object can be added into a pool, -- If `prototype_obj.in_pool` is defined, returns the result of `in_pool`, otherwise returns `true`. \ No newline at end of file +- If `prototype_obj.in_pool` is defined, returns the result of `in_pool`, otherwise returns `true`. +#### `SMODS.pinch_and_remove(card)` +Destroys the card with the vanilla food Joker animations. In most cases you should use [`SMODS.destroy_cards()`](https://github.com/Steamodded/smods/wiki/Utility) instead. \ No newline at end of file diff --git a/Utility.md b/Utility.md index b3c33c8..1d67972 100644 --- a/Utility.md +++ b/Utility.md @@ -190,11 +190,18 @@ Returns true if the card is cosidered to be "eternal" (cannot be destroyed). Returns a shallow copy of the provided table. #### `time(func, ...) -> number` Calls an input function with any given additional arguments: `func(...)` and returns the time the function took to execute in milliseconds. The return value from `func` is lost. -#### `SMODS.destroy_cards(cards, bypass_eternal, immediate, skip_anim)` -Destroys any type of cards given to the function appropriately, with respect to further calculations if called during the scoring loop. +#### `SMODS.is_playing_card(card) -> boolean` +Checks if `card` is a playing card. +#### `SMODS.destroy_cards(cards, args) -> table` +Destroys any type of cards given to the function appropriately, with respect to further calculations if called during the scoring loop. Returns the cards to be destroyed. - `cards` - Can be an individual `Card` object, or a table of `Card` objects. -- `bypass_eternal` - Destroys cards even if they're Eternal. -- `immediate` - Destroys the cards immediately not creating an event (Note: Card.start_dissolve and Card.shatter internally still create an event) +- `args` is a table that can have the following fields: + - `bypass_eternal` - Destroys cards even if they're Eternal. + - `immediate` - Destroys the cards immediately not creating an event (Note: Card.start_dissolve and Card.shatter internally still create an event) + - `pinch_anim` - Destroys the cards with the vanilla food Joker animation. + - `colours` - Replaces the colours used by `start_dissolve`. + - `delay` - Adds a delay to the event. + - `destroy_func` - Replaces the destroy function used (i.e. replaces `Card.start_dissolve` or `Card.shatter`) - `skip_anim` - Skips the normal animation and changes it to that of food jokers. #### `SMODS.add_voucher_to_shop(key)`/`SMODS.add_booster_to_shop(key)` Adds a `Voucher` or a `Booster` to the current shop.