Skip to content

Commit

Permalink
Push TriggerEffectRemoved count arg (closes #621)
Browse files Browse the repository at this point in the history
Count was pushed as part of TriggerEffectRemoved but previously unidentified
  • Loading branch information
namishere committed Jan 25, 2025
1 parent 1ea37e5 commit 8fd2c80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
v1.0.x -
* Welcome to REPENTOGON+ !
/newline/
Additions:
* Camera:
- Update(bool Interpolated = false)
Expand Down Expand Up @@ -65,11 +67,14 @@ Modified:
* EntityPlayer:
- DropCollectible now returns the spawned pedestal if one was spawned, as intended
- SwapForgottenForm returns boolean, depending if Forgotten/Soul form was switched or not.
* Level:
- TryPlaceRoom(AtDoor) no longer plays the key unlock sound if a room is created that connects to the player's current room.
* ImGui:
- Adding an element with the same id as an existing one will now replace the existing element instead of throwing an error.
- If an error is caused by a callback, imgui will now properly throw an error
* Level:
- TryPlaceRoom(AtDoor) no longer plays the key unlock sound if a room is created that connects to the player's current room.
* ModCallbacks:
- MC_POST_PLAYER_TRIGGER_EFFECT_REMOVED(EntityPlayer Player, int Count)
Added Count argument (how many instances of this effect were removed)
* Vanilla daily run leaderboard will now mark the submitted run entry with a transparent color if the run was cheated.
Fixes:
* ImGui:
Expand Down
5 changes: 3 additions & 2 deletions repentogon/LuaInterfaces/CustomCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4059,8 +4059,8 @@ HOOK_METHOD(Entity_Pickup, GetLootList, (bool shouldAdvance) -> LootList) {
}

//MC_POST_PLAYER_TRIGGER_EFFECT_REMOVED (1268)
HOOK_METHOD(Entity_Player, TriggerEffectRemoved, (ItemConfig_Item* item, int unused) -> void) {
super(item, unused);
HOOK_METHOD(Entity_Player, TriggerEffectRemoved, (ItemConfig_Item* item, int count) -> void) {
super(item, count);
const int callbackid = 1268;
if (CallbackState.test(callbackid - 1000)) {
lua_State* L = g_LuaEngine->_state;
Expand All @@ -4070,6 +4070,7 @@ HOOK_METHOD(Entity_Player, TriggerEffectRemoved, (ItemConfig_Item* item, int unu
.pushnil()
.push(this, lua::Metatables::ENTITY_PLAYER)
.push(item, lua::Metatables::ITEM)
.push(count)
.call(1);
}
}
Expand Down

0 comments on commit 8fd2c80

Please sign in to comment.