The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

Immortal Hearts
Rokk  [开发者] 2021 年 12 月 4 日 上午 7:07
API Docs
After several requests for an API, the latest update added an API of sorts, for other mod makers to interface with this mod.

void ImmortalHeartsAPI.SetFlyHeartConversionEnabled(bool enabled)
Enables/disables the mechanic where immortal hearts turn into flies for The Lost/Keeper. By default this is enabled.

table ImmortalHeartsAPI.GetPlayerImmortalHearts()
Returns a table that contains the immortal heart data for all players. For more info on how this table is structured, see the comments in main.lua (line 90).

void ImmortalHeartsAPI.SpawnImmortalHeart(Vector? position, Vector? velocity)
Spawns an immortal heart at the specified position and velocity.
If the arguments are nil, the player position and a 0 velocity are used.

int ImmortalHeartsAPI.GetImmortalHeartEntityVariant()
Returns the pickup variant for immortal hearts. This variable is the result of the Immortal Hearts mod calling Isaac.GetEntityVariantByName("Immortal Heart").

int ImmortalHeartsAPI.GetImmortalHeartPickupSoundId()
Returns the sound ID for the immortal heart pickup sound. This variable is the result of the Immortal Hearts mod calling Isaac.GetSoundIdByName("ImmortalHeart_Pickup").

int ImmortalHeartsAPI.GetImmortalHeartRefillSoundId()
Returns the sound ID for the immortal heart refill sound. This variable is the result of the Immortal Hearts mod calling Isaac.GetSoundIdByName("ImmortalHeart_Refill").

Example usage:
if ImmortalHeartsAPI then ImmortalHeartsAPI.SpawnImmortalHeart() end
This example code will spawn an immortal heart at player 0's position. ImmortalHeartsAPI is a global variable, and you should check if it exists before trying to use it.
最后由 Rokk 编辑于; 2021 年 12 月 4 日 上午 7:09
< >
正在显示第 1 - 1 条,共 1 条留言
Rokk  [开发者] 2021 年 12 月 4 日 上午 7:09 
If you are a mod developer and need something exposed or added, feel free to request it here.
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50