Josh64

Modded trinket support

Dec 13th, 2020 (edited)
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. -- Modded trinket support / ex. Mod.AddTrinketCostumes(trinketVar, trinketId, costumeId)
  2. function AddTrinketCostumes (trinketVar, trinketId, costumeId)
  3. for i = 0, (game:GetNumPlayers() - 1) do
  4. local player = Isaac.GetPlayer(i)
  5.  
  6. if onPickup == false then -- costume would get applied by smelting the trinket
  7. if player:GetTrinket(0) ~= trinketId
  8. and player:GetTrinket(1) ~= trinketId
  9. and applyCostume == true then -- still follows the same rules as base game trinkets
  10. player:AddNullCostume(costumeId)
  11. trinketVar = true
  12. end
  13. else -- costume would get applied by picking up the trinket
  14. player:AddNullCostume(costumeId)
  15. trinketVar = true
  16. end
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment