--- Zamiel编写,im_tem发现的技巧-- @param player EntityPlayer-- @param enabled boolean-- @param modifyCostume booleanfunctionsetBlindfold(player,enabled,modifyCostume)localgame=Game()localcharacter=player:GetPlayerType()localchallenge=Isaac.GetChallenge()ifenabledthengame.Challenge=Challenge.CHALLENGE_SOLAR_SYSTEM-- This challenge has a blindfoldplayer:ChangePlayerType(character)game.Challenge=challenge-- 自动应用角色外观。ifnotmodifyCostumethenplayer:TryRemoveNullCostume(NullItemID.ID_BLINDFOLD)endelsegame.Challenge=Challenge.CHALLENGE_NULLplayer:ChangePlayerType(character)game.Challenge=challengeifmodifyCostumethenplayer:TryRemoveNullCostume(NullItemID.ID_BLINDFOLD)endendend
localmod=RegisterMod("My Mod",1)localMY_NULL_COSTUME_ID=Isaac.GetCostumeIdByPath("gfx/characters/bar.anm2")-- For EntityType.ENTITY_PLAYER (1)localPlayerVariant={PLAYER=0,COOP_BABY=1,}functionmod:postPlayerInit(player)ifplayer.Variant==PlayerVariant.PLAYERthenplayer:AddNullCostume(MY_NULL_COSTUME_ID)endendmod:AddCallback(ModCallbacks.MC_POST_PLAYER_INIT,mod.postPlayerInit)