isaacscript-common 31.11.0 → 31.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.rollup.d.ts
CHANGED
|
@@ -17227,7 +17227,10 @@ export declare type UppercaseKeys<T> = StartsWithUppercase<keyof T>;
|
|
|
17227
17227
|
*/
|
|
17228
17228
|
export declare function useActiveItemTemp(player: EntityPlayer, collectibleType: CollectibleType): void;
|
|
17229
17229
|
|
|
17230
|
-
/**
|
|
17230
|
+
/**
|
|
17231
|
+
* Helper function to use a card without showing an animation and without the announcer voice
|
|
17232
|
+
* playing.
|
|
17233
|
+
*/
|
|
17231
17234
|
export declare function useCardTemp(player: EntityPlayer, cardType: CardType): void;
|
|
17232
17235
|
|
|
17233
17236
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 31.11.
|
|
3
|
+
isaacscript-common 31.11.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -37983,6 +37983,8 @@ local CARD_NAMES = ____cardNames.CARD_NAMES
|
|
|
37983
37983
|
local DEFAULT_CARD_NAME = ____cardNames.DEFAULT_CARD_NAME
|
|
37984
37984
|
local ____itemConfigCardTypesForCardsSet = require("src.sets.itemConfigCardTypesForCardsSet")
|
|
37985
37985
|
local ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET = ____itemConfigCardTypesForCardsSet.ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET
|
|
37986
|
+
local ____flag = require("src.functions.flag")
|
|
37987
|
+
local addFlag = ____flag.addFlag
|
|
37986
37988
|
local ____utils = require("src.functions.utils")
|
|
37987
37989
|
local iRange = ____utils.iRange
|
|
37988
37990
|
function ____exports.isVanillaCardType(self, cardType)
|
|
@@ -38052,7 +38054,8 @@ function ____exports.isTarotCard(self, cardType)
|
|
|
38052
38054
|
return ____exports.isCardType(nil, cardType, ItemConfigCardType.TAROT)
|
|
38053
38055
|
end
|
|
38054
38056
|
function ____exports.useCardTemp(self, player, cardType)
|
|
38055
|
-
|
|
38057
|
+
local useFlags = addFlag(nil, UseFlag.NO_ANIMATION, UseFlag.NO_ANNOUNCER_VOICE)
|
|
38058
|
+
player:UseCard(cardType, useFlags)
|
|
38056
38059
|
end
|
|
38057
38060
|
return ____exports
|
|
38058
38061
|
end,
|
|
@@ -52,6 +52,9 @@ export declare function isSuitCard(cardType: CardType): boolean;
|
|
|
52
52
|
export declare function isTarotCard(cardType: CardType): boolean;
|
|
53
53
|
/** Returns true for any vanilla card or rune. */
|
|
54
54
|
export declare function isVanillaCardType(cardType: CardType): boolean;
|
|
55
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Helper function to use a card without showing an animation and without the announcer voice
|
|
57
|
+
* playing.
|
|
58
|
+
*/
|
|
56
59
|
export declare function useCardTemp(player: EntityPlayer, cardType: CardType): void;
|
|
57
60
|
//# sourceMappingURL=cards.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../../src/functions/cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAW,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../../src/functions/cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAW,MAAM,8BAA8B,CAAC;AAe3E;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAgB7D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAgBtD;AAED;;;;;GAKG;AACH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= require("src.sets.itemConfigCardTypesForCardsSet")
|
|
17
17
|
local ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET = ____itemConfigCardTypesForCardsSet.ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET
|
|
18
|
+
local ____flag = require("src.functions.flag")
|
|
19
|
+
local addFlag = ____flag.addFlag
|
|
18
20
|
local ____utils = require("src.functions.utils")
|
|
19
21
|
local iRange = ____utils.iRange
|
|
20
22
|
--- Returns true for any vanilla card or rune.
|
|
@@ -111,8 +113,10 @@ end
|
|
|
111
113
|
function ____exports.isTarotCard(self, cardType)
|
|
112
114
|
return ____exports.isCardType(nil, cardType, ItemConfigCardType.TAROT)
|
|
113
115
|
end
|
|
114
|
-
--- Helper function to use a card without showing an animation
|
|
116
|
+
--- Helper function to use a card without showing an animation and without the announcer voice
|
|
117
|
+
-- playing.
|
|
115
118
|
function ____exports.useCardTemp(self, player, cardType)
|
|
116
|
-
|
|
119
|
+
local useFlags = addFlag(nil, UseFlag.NO_ANIMATION, UseFlag.NO_ANNOUNCER_VOICE)
|
|
120
|
+
player:UseCard(cardType, useFlags)
|
|
117
121
|
end
|
|
118
122
|
return ____exports
|
package/package.json
CHANGED
package/src/functions/cards.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from "../objects/cardDescriptions";
|
|
12
12
|
import { CARD_NAMES, DEFAULT_CARD_NAME } from "../objects/cardNames";
|
|
13
13
|
import { ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET } from "../sets/itemConfigCardTypesForCardsSet";
|
|
14
|
+
import { addFlag } from "./flag";
|
|
14
15
|
import { iRange } from "./utils";
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -150,7 +151,11 @@ export function isVanillaCardType(cardType: CardType): boolean {
|
|
|
150
151
|
return cardType <= LAST_VANILLA_CARD_TYPE;
|
|
151
152
|
}
|
|
152
153
|
|
|
153
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* Helper function to use a card without showing an animation and without the announcer voice
|
|
156
|
+
* playing.
|
|
157
|
+
*/
|
|
154
158
|
export function useCardTemp(player: EntityPlayer, cardType: CardType): void {
|
|
155
|
-
|
|
159
|
+
const useFlags = addFlag(UseFlag.NO_ANIMATION, UseFlag.NO_ANNOUNCER_VOICE);
|
|
160
|
+
player.UseCard(cardType, useFlags);
|
|
156
161
|
}
|