epfly6 / RepentanceAPIIssueTracker

An unofficial issue tracker for issues with The Binding of Isaac: Repentance's API.
20 stars 1 forks source link

[Rep+] Add wrapper for Room:MamaMegaExplosion method to support optional params for mod compat #575

Open epfly6 opened 2 days ago

epfly6 commented 2 days ago

Repentance+ updated Room::MamaMegaExplosion function, which is now includes EntityPlayer param as explosion source, and now causes errors for old mods which doesn't provide that param. Here is potential implementation (also includes Position set to Vector.Zero)

-- void Room:MamaMegaExplosion(Vector Position = Vector.Zero, EntityPlayer Player = nil)
local Room_MamaMegaExplosion = META0.MamaMegaExplosion
function META:MamaMegaExplosion(position, player)
    return Room_MamaMegaExplosion(self, position or Vector.Zero, player)
end