Skip to content

Commit 8558888

Browse files
committed
update
1 parent 1b1a0ed commit 8558888

File tree

1 file changed

+2
-19
lines changed
  • packages/isaacscript-common/src/functions

1 file changed

+2
-19
lines changed

packages/isaacscript-common/src/functions/utils.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -178,25 +178,8 @@ export function isRepentance(): boolean {
178178
'Failed to get the "__class" key of the Sprite metatable.',
179179
);
180180

181-
const func = classTable.get("GetAnimation");
182-
return isFunction(func);
183-
}
184-
185-
/**
186-
* Helper function to check if the player has the Repentance+ DLC installed.
187-
*
188-
* This function should always be used over the `REPENTANCE_PLUS` constant, since the latter is not
189-
* safe.
190-
*
191-
* Specifically, this function checks for `Room:DamageGridWithSource` method:
192-
* https://bindingofisaacrebirth.wiki.gg/wiki/The_Binding_of_Isaac:_Repentance%2B#Modding_Changes
193-
*/
194-
export function isRepentancePlus(): boolean {
195-
const room = game.GetRoom();
196-
const metatable = getmetatable(room) as LuaMap<string, unknown> | undefined;
197-
assertDefined(metatable, "Failed to get the metatable of the room class.");
198-
const func = metatable.get("DamageGridWithSource");
199-
return isFunction(func);
181+
const getAnimation = classTable.get("GetAnimation");
182+
return isFunction(getAnimation);
200183
}
201184

202185
/**

0 commit comments

Comments
 (0)