From 5c1f82c1f47b4ac30052930801c7d1c3443461b4 Mon Sep 17 00:00:00 2001 From: NeatsTopFoo Date: Wed, 11 Mar 2026 02:18:41 +0000 Subject: [PATCH 1/2] Added can_sell() documentation Added can_sell() documentation to SMODS.Consumable & SMODS.Joker --- SMODS.Center/SMODS.Consumable.md | 2 ++ SMODS.Center/SMODS.Joker.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/SMODS.Center/SMODS.Consumable.md b/SMODS.Center/SMODS.Consumable.md index 7d38421..2d0ad83 100644 --- a/SMODS.Center/SMODS.Consumable.md +++ b/SMODS.Center/SMODS.Consumable.md @@ -46,6 +46,8 @@ - Define custom logic for when a card is allowed to spawn. A card can spawn if `in_pool` returns true and all other checks are met. - `allow_duplicates` allows this card to spawn when one already exists, even without Showman. - When called from `generate_card_ui`, the `_append` key is passed as `args.source`. +- `can_sell(self, card, context)` + - Define additional custom logic for when your card is allowed to be sold. By default, the card is usually prevented from being sold during scoring or if it is eternal. If defined, can_sell is then also checked afterwards and the card can be sold if it returns true. - `update(self, card, dt)` - For actions that happen every frame. - `set_sprites(self, card, front)` diff --git a/SMODS.Center/SMODS.Joker.md b/SMODS.Center/SMODS.Joker.md index ce37fc4..b913e6c 100644 --- a/SMODS.Center/SMODS.Joker.md +++ b/SMODS.Center/SMODS.Joker.md @@ -40,6 +40,8 @@ - Define custom logic for when a card is allowed to spawn. A card can spawn if `in_pool` returns true and all other checks are met. - `allow_duplicates` allows this card to spawn when one already exists, even without Showman. - When called from `generate_card_ui`, the `_append` key is passed as `args.source`. +- `can_sell(self, card, context)` + - Define additional custom logic for when your card is allowed to be sold. By default, the card is usually prevented from being sold during scoring or if it is eternal. If defined, can_sell is then also checked afterwards and the card can be sold if it returns true. - `update(self, card, dt)` - For actions that happen every frame. - `set_sprites(self, card, front)` From 3df1512471762a3a14b85677e59793b9d21a1ae2 Mon Sep 17 00:00:00 2001 From: NeatsTopFoo Date: Wed, 11 Mar 2026 03:13:47 +0000 Subject: [PATCH 2/2] Adjust documentation --- SMODS.Center/SMODS.Consumable.md | 2 +- SMODS.Center/SMODS.Joker.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SMODS.Center/SMODS.Consumable.md b/SMODS.Center/SMODS.Consumable.md index 2d0ad83..23ef25a 100644 --- a/SMODS.Center/SMODS.Consumable.md +++ b/SMODS.Center/SMODS.Consumable.md @@ -47,7 +47,7 @@ - `allow_duplicates` allows this card to spawn when one already exists, even without Showman. - When called from `generate_card_ui`, the `_append` key is passed as `args.source`. - `can_sell(self, card, context)` - - Define additional custom logic for when your card is allowed to be sold. By default, the card is usually prevented from being sold during scoring or if it is eternal. If defined, can_sell is then also checked afterwards and the card can be sold if it returns true. + - Define additional custom logic for when your card is allowed to be sold. By default, the card is usually prevented from being sold during scoring or if it is eternal. If defined, can_sell is then also checked afterwards and if it returns false, the card can't be sold. - `update(self, card, dt)` - For actions that happen every frame. - `set_sprites(self, card, front)` diff --git a/SMODS.Center/SMODS.Joker.md b/SMODS.Center/SMODS.Joker.md index b913e6c..bc53a9c 100644 --- a/SMODS.Center/SMODS.Joker.md +++ b/SMODS.Center/SMODS.Joker.md @@ -41,7 +41,7 @@ - `allow_duplicates` allows this card to spawn when one already exists, even without Showman. - When called from `generate_card_ui`, the `_append` key is passed as `args.source`. - `can_sell(self, card, context)` - - Define additional custom logic for when your card is allowed to be sold. By default, the card is usually prevented from being sold during scoring or if it is eternal. If defined, can_sell is then also checked afterwards and the card can be sold if it returns true. + - Define additional custom logic for when your card is allowed to be sold. By default, the card is usually prevented from being sold during scoring or if it is eternal. If defined, can_sell is then also checked afterwards and if it returns false, the card can't be sold. - `update(self, card, dt)` - For actions that happen every frame. - `set_sprites(self, card, front)`