Test round 2 fixes (wrong behaviour against the decompile: stats, combat, odds, level generation, visuals, the Lua API and 45 real mods): Blue Womb's last boss room is the start room (0074a500), Font:GetCharacterWidth takes a string and FontRenderSettings' wrap and truncation take a width, the original's callback error names, mod paths under --mods, SetStateFlag with a negative flag, the run timer hidden by default, popup and transformation text keys, room loads premultiply through a lookup table (about 3x faster, traces identical), --screenshot-every for windowed runs
This commit is contained in:
1 parent
7d407d5c19
commit
ee965dad25
19 files changed
+112
-51
No files matched your search
@@ -273,7 +273,7 @@ int LuaEngine::PreGetCollectible(const LuaCollectibleDraw& draw)
|
||||
bool LuaEngine::EntityTakeDamage(Entity* entity, float damage, uint64_t damageFlags, const EntityRef& source,
|
||||
int countdown)
|
||||
{
|
||||
CallbackRun run = {"EntityTakeDamage", MC_ENTITY_TAKE_DMG, entity->type};
|
||||
CallbackRun run = {"PreEntityTakeDamage", MC_ENTITY_TAKE_DMG, entity->type};
|
||||
return callback_boolean_run(*this, run, true, entity, damage, damageFlags, &source, countdown);
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ bool LuaEngine::PreEntityDevolve(Entity* entity)
|
||||
// The original throws past its callers on a Lua error. This logs it and spawns the award.
|
||||
bool LuaEngine::PreSpawnCleanAward(const RNG& rng, const Vector& position)
|
||||
{
|
||||
return callback_boolean_run(*this, {"PreSpawnCleanAward", MC_PRE_SPAWN_CLEAN_AWARD}, false, rng, position);
|
||||
return callback_boolean_run(*this, {"PreRoomRewardSpawn", MC_PRE_SPAWN_CLEAN_AWARD}, false, rng, position);
|
||||
}
|
||||
|
||||
// 00863760 Runs MC_PRE_USE_ITEM for an active item, filtered by its type. Whether a mod skips the use.
|
||||
@@ -370,13 +370,13 @@ void LuaEngine::EvaluateItems(Entity_Player* player, int cacheFlag)
|
||||
// 008635a0 Runs MC_FAMILIAR_INIT, filtered by the familiar's variant.
|
||||
void LuaEngine::FamiliarInit(Entity_Familiar* familiar)
|
||||
{
|
||||
callback_notify(*this, {"FamiliarInit", MC_FAMILIAR_INIT, familiar->variant}, familiar);
|
||||
callback_notify(*this, {"PostFamiliarInit", MC_FAMILIAR_INIT, familiar->variant}, familiar);
|
||||
}
|
||||
|
||||
// 00860f00 Runs MC_FAMILIAR_UPDATE, filtered by the familiar's variant.
|
||||
void LuaEngine::FamiliarUpdate(Entity_Familiar* familiar)
|
||||
{
|
||||
callback_notify(*this, {"FamiliarUpdate", MC_FAMILIAR_UPDATE, familiar->variant}, familiar);
|
||||
callback_notify(*this, {"PostFamiliarUpdate", MC_FAMILIAR_UPDATE, familiar->variant}, familiar);
|
||||
}
|
||||
|
||||
// 00860fe0 Runs MC_POST_FAMILIAR_RENDER with the render offset, filtered by the familiar's variant.
|
||||
@@ -561,7 +561,7 @@ void LuaEngine::PostPlayerInit(Entity_Player* player)
|
||||
// 00863be0 Runs MC_POST_PEFFECT_UPDATE, filtered by the player's character.
|
||||
void LuaEngine::PostPEffectUpdate(Entity_Player* player)
|
||||
{
|
||||
callback_notify(*this, {"PostPEffectUpdate", MC_POST_PEFFECT_UPDATE, player->playerType}, player);
|
||||
callback_notify(*this, {"PostPlayerEffectUpdate", MC_POST_PEFFECT_UPDATE, player->playerType}, player);
|
||||
}
|
||||
|
||||
// 00864130 Runs MC_POST_PLAYER_UPDATE, filtered by the player's variant.
|
||||
|
||||
Reference in new issue
Block a user