isaacscript-common 1.0.558 → 1.0.559
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.
|
@@ -209,9 +209,12 @@ export declare function removeTrinketCostume(player: EntityPlayer, trinketType:
|
|
|
209
209
|
*/
|
|
210
210
|
export declare function setActiveItem(player: EntityPlayer, collectibleType: CollectibleType, activeSlot: ActiveSlot, charge?: int, keepInPools?: boolean): void;
|
|
211
211
|
/**
|
|
212
|
-
*
|
|
213
|
-
* `player.TryRemoveNullCostume(NullItemID.ID_BLINDFOLD)` after invoking this function.
|
|
212
|
+
* Helper function to blindfold the player by using a hack with the challenge variable.
|
|
214
213
|
*
|
|
215
|
-
*
|
|
214
|
+
* The method used in this function was discovered by im_tem.
|
|
215
|
+
*
|
|
216
|
+
* @param player The player to apply or remove the blindfold state from.
|
|
217
|
+
* @param enabled Whether or not to apply or remove the blindfold.
|
|
218
|
+
* @param modifyCostume Optional. Whether to add or remove the blindfold costume. True by default.
|
|
216
219
|
*/
|
|
217
|
-
export declare function setBlindfold(player: EntityPlayer, enabled: boolean): void;
|
|
220
|
+
export declare function setBlindfold(player: EntityPlayer, enabled: boolean, modifyCostume?: boolean): void;
|
|
@@ -472,7 +472,10 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
472
472
|
end
|
|
473
473
|
until true
|
|
474
474
|
end
|
|
475
|
-
function ____exports.setBlindfold(self, player, enabled)
|
|
475
|
+
function ____exports.setBlindfold(self, player, enabled, modifyCostume)
|
|
476
|
+
if modifyCostume == nil then
|
|
477
|
+
modifyCostume = true
|
|
478
|
+
end
|
|
476
479
|
local game = Game()
|
|
477
480
|
local character = player:GetPlayerType()
|
|
478
481
|
local challenge = Isaac.GetChallenge()
|
|
@@ -480,11 +483,16 @@ function ____exports.setBlindfold(self, player, enabled)
|
|
|
480
483
|
game.Challenge = Challenge.CHALLENGE_SOLAR_SYSTEM
|
|
481
484
|
player:ChangePlayerType(character)
|
|
482
485
|
game.Challenge = challenge
|
|
486
|
+
if not modifyCostume then
|
|
487
|
+
player:TryRemoveNullCostume(NullItemID.ID_BLINDFOLD)
|
|
488
|
+
end
|
|
483
489
|
else
|
|
484
490
|
game.Challenge = Challenge.CHALLENGE_NULL
|
|
485
491
|
player:ChangePlayerType(character)
|
|
486
492
|
game.Challenge = challenge
|
|
487
|
-
|
|
493
|
+
if modifyCostume then
|
|
494
|
+
player:TryRemoveNullCostume(NullItemID.ID_BLINDFOLD)
|
|
495
|
+
end
|
|
488
496
|
end
|
|
489
497
|
end
|
|
490
498
|
return ____exports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.559",
|
|
4
4
|
"description": "Helper functions for IsaacScript mods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"isaac-typescript-definitions": "^1.0.307",
|
|
29
|
-
"isaacscript-lint": "^1.0.
|
|
29
|
+
"isaacscript-lint": "^1.0.74",
|
|
30
30
|
"typedoc": "^0.22.10",
|
|
31
31
|
"typescript": "4.4.4",
|
|
32
32
|
"typescript-to-lua": "1.1.1"
|