Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- check if the player is flying and has the Bat Wing trinket (Bat Wings bug fix)
- if player:HasTrinket(TrinketType.TRINKET_BAT_WING) then
- if player.CanFly
- and costumeTr.BatWing == true then -- player has the trinket / trinket costumes get applied
- -- set the playerData
- if playerData.Ctc_HadFlight == nil
- or playerData.Ctc_HadFlight == false then -- in case this got already check once before
- playerData.Ctc_HadFlight = true
- -- remove the Body 0 costumes
- player:TryRemoveNullCostume(Mod.COSTUME_CANCER) -- Cancer
- player:TryRemoveNullCostume(Mod.COSTUME_CANCER_ALT)
- player:TryRemoveNullCostume(Mod.COSTUME_MAGGYS_FAITH_MALT) -- Maggy's Faith for Maggy
- player:TryRemoveNullCostume(Mod.COSTUME_THE_LEFT_HAND) -- Left Hand
- player:TryRemoveNullCostume(Mod.COSTUME_RIB_OF_GREED) -- Rib of Greed
- player:TryRemoveNullCostume(Mod.COSTUME_LOCUST_OF_WAR_AFRAID) -- Locust of War
- player:TryRemoveNullCostume(Mod.COSTUME_LOCUST_OF_WAR)
- end
- elseif player.CanFly == false -- only triggers if the player doesn't have flight,
- and playerData.Ctc_HadFlight == true -- but had flight once before
- and costumeTr.BatWing == true then -- and should have the small bat wings
- -- resets the costumeTr so that the costumes can be reevalauted
- costumeTr.Cancer = false
- costumeTr.MaggysFaith = false
- costumeTr.TheLeftHand = false
- costumeTr.RibOfGreed = false
- costumeTr.LocustOfWar = false
- -- reset for .Ctc_HadFlight the next use
- playerData.Ctc_HadFlight = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment