@@ -936,11 +936,13 @@ end
936936---- CARD ENABLING SYSTEM ----
937937---- --------------------------
938938
939+ --- @type fun ( self : SMODS.GameObject | table , reason : table )?
939940SMODS .GameObject ._disable = function (self , reason )
940941 if not self .cry_disabled then
941942 self .cry_disabled = reason or { type = " manual" } -- used to display more information that can be used later
942943 end
943944end
945+ --- @type fun ( self : SMODS.GameObject | table )?
944946SMODS .GameObject .enable = function (self )
945947 if self .cry_disabled then
946948 self .cry_disabled = nil
950952-- Note: For custom pools, these only support Center.pools, not ObjectType.cards
951953-- That could cause issues with mod compat in the future
952954-- Potential improvement: automatic pool detection from gamesets?
955+ --- @type fun ( self : SMODS.Center | table , reason : table )?
953956SMODS .Center ._disable = function (self , reason )
954957 if not self .cry_disabled then
955958 self .cry_disabled = reason or { type = " manual" } -- used to display more information that can be used later
@@ -960,6 +963,7 @@ SMODS.Center._disable = function(self, reason)
960963 G .P_CENTERS [self .key ] = nil
961964 end
962965end
966+ --- @type fun ( self : SMODS.Center | table )?
963967SMODS .Center .enable = function (self )
964968 if self .cry_disabled then
965969 self .cry_disabled = nil
@@ -970,6 +974,8 @@ SMODS.Center.enable = function(self)
970974 end
971975 end
972976end
977+
978+ --- @type fun ( self : SMODS.Joker | table )?
973979SMODS .Joker .enable = function (self )
974980 if self .cry_disabled then
975981 SMODS .Center .enable (self )
@@ -980,6 +986,7 @@ SMODS.Joker.enable = function(self)
980986 end
981987 end
982988end
989+ --- @type fun ( self : SMODS.Joker | table , reason : table )?
983990SMODS .Joker ._disable = function (self , reason )
984991 if not self .cry_disabled then
985992 SMODS .Center ._disable (self , reason )
@@ -990,6 +997,7 @@ SMODS.Joker._disable = function(self, reason)
990997 end
991998 end
992999end
1000+ --- @type fun ( self : SMODS.Joker | table , rarity : string | number )?
9931001SMODS .Joker .set_rarity = function (self , rarity )
9941002 SMODS .remove_pool (G .P_JOKER_RARITY_POOLS [self .rarity ], self .key )
9951003 self .rarity = rarity
@@ -1000,26 +1008,30 @@ SMODS.Joker.set_rarity = function(self, rarity)
10001008 end
10011009end
10021010
1011+ --- @type fun ( self : SMODS.Consumable | table )?
10031012SMODS .Consumable .enable = function (self )
10041013 if self .cry_disabled then
10051014 SMODS .Center .enable (self )
10061015 SMODS .insert_pool (G .P_CENTER_POOLS [" Consumeables" ], self )
10071016 end
10081017end
1018+ --- @type fun ( self : SMODS.Consumable | table , reason : table )?
10091019SMODS .Consumable ._disable = function (self , reason )
10101020 if not self .cry_disabled then
10111021 SMODS .Center ._disable (self , reason )
10121022 SMODS .remove_pool (G .P_CENTER_POOLS [" Consumeables" ], self .key )
10131023 end
10141024end
10151025
1026+ --- @type fun ( self : SMODS.Tag | table , reason : table )?
10161027SMODS .Tag ._disable = function (self , reason )
10171028 if not self .cry_disabled then
10181029 self .cry_disabled = reason or { type = " manual" } -- used to display more information that can be used later
10191030 SMODS .remove_pool (G .P_CENTER_POOLS [self .set ], self .key )
10201031 G .P_TAGS [self .key ] = nil
10211032 end
10221033end
1034+ --- @type fun ( self : SMODS.Tag | table )?
10231035SMODS .Tag .enable = function (self )
10241036 if self .cry_disabled then
10251037 self .cry_disabled = nil
@@ -1028,12 +1040,14 @@ SMODS.Tag.enable = function(self)
10281040 end
10291041end
10301042
1043+ --- @type fun ( self : SMODS.Blind | table , reason : table )?
10311044SMODS .Blind ._disable = function (self , reason )
10321045 if not self .cry_disabled then
10331046 self .cry_disabled = reason or { type = " manual" } -- used to display more information that can be used later
10341047 G .P_BLINDS [self .key ] = nil
10351048 end
10361049end
1050+ --- @type fun ( self : SMODS.Blind | table )?
10371051SMODS .Blind .enable = function (self )
10381052 if self .cry_disabled then
10391053 self .cry_disabled = nil
@@ -1042,12 +1056,14 @@ SMODS.Blind.enable = function(self)
10421056end
10431057
10441058-- Removing seals from the center table causes issues
1059+ --- @type fun ( self : SMODS.Seal | table , reason : table )?
10451060SMODS .Seal ._disable = function (self , reason )
10461061 if not self .cry_disabled then
10471062 self .cry_disabled = reason or { type = " manual" } -- used to display more information that can be used later
10481063 SMODS .remove_pool (G .P_CENTER_POOLS [self .set ], self .key )
10491064 end
10501065end
1066+ --- @type fun ( self : SMODS.Seal | table )?
10511067SMODS .Seal .enable = function (self )
10521068 if self .cry_disabled then
10531069 self .cry_disabled = nil
@@ -1056,6 +1072,7 @@ SMODS.Seal.enable = function(self)
10561072end
10571073
10581074-- Removing editions from the center table causes issues, so instead we make them unable to spawn naturally
1075+ --- @type fun ( self : SMODS.Seal | table , reason : table )?
10591076SMODS .Edition ._disable = function (self , reason )
10601077 if not self .cry_disabled then
10611078 self .cry_disabled = reason or { type = " manual" } -- used to display more information that can be used later
@@ -1066,6 +1083,7 @@ SMODS.Edition._disable = function(self, reason)
10661083 end
10671084 end
10681085end
1086+ --- @type fun ( self : SMODS.Seal | table )?
10691087SMODS .Edition .enable = function (self )
10701088 if self .cry_disabled then
10711089 self .cry_disabled = nil
0 commit comments