Curation round 15: restart and mods, Brimstone and Tech X, room gaps, eight bosses, the Womb and Mom's Heart, the Forgotten and tainted starts, alt path enemies and exits

This commit is contained in:
shweet committed 2026-11-20 20:54:59 -05:00
1 parent 6e3da161fc
commit 78a2680134
128 files changed
+13196 -2933

No files matched your search

+43
View File
@@ -10,6 +10,8 @@
#include "entity_projectile.h"
#include "entity_tear.h"
#include "lua_api.h"
#include "weapon.h"
#include "path_finder.h"
// Registers Lua's EntityTear and EntityProjectile, the shots of players and enemies.
static void shots_register(lua_State* state)
@@ -92,6 +94,7 @@ static void weapons_register(lua_State* state)
lua_method(state, "GetKnifeDistance", [](Entity_Knife& knife) { return knife.knifeDistance; });
lua_method(state, "GetKnifeVelocity", [](Entity_Knife& knife) { return knife.knifeVelocity; });
lua_method(state, "SetPathFollowSpeed", [](Entity_Knife& knife, float speed) { knife.pathFollowSpeed = speed; });
weapon_lua_knife_register(state);
lua_class_end(state);
lua_class_begin(state, "EntityLaser", LUA_CLASS_LASER, LUA_CLASS_ENTITY);
@@ -126,6 +129,7 @@ static void weapons_register(lua_State* state)
[](Entity_Laser& laser, float chance) { laser.blackHpDropChance = chance; });
lua_method(state, "IsCircleLaser", [](Entity_Laser& laser) { return laser.IsCircleLaser(); });
lua_method(state, "IsSampleLaser", [](Entity_Laser& laser) { return laser.isSampleLaser; });
weapon_lua_laser_register(state);
lua_class_end(state);
}
@@ -239,6 +243,7 @@ static void npc_pickup_register(lua_State* state)
});
lua_method(state, "MakeSplat", [](Entity_NPC& npc, float size) { return npc.MakeSplat(size); });
lua_method(state, "KillUnique", [](Entity_NPC& npc) { npc.KillUnique(); });
lua_property(state, "Pathfinder", [](Entity_NPC& npc) -> PathFinder& { return npc.pathfinder; });
lua_method(state, "ResetPathFinderTarget", [](Entity_NPC& npc) { npc.ResetPathFinderTarget(); });
lua_method(state, "GetAliveEnemyCount", [](Entity_NPC& npc) { return npc.GetAliveEnemyCount(); });
lua_method(state, "FireProjectiles", [](Entity_NPC& npc, Vector position, Vector velocity, ProjectilesMode mode,
@@ -281,6 +286,43 @@ static void npc_pickup_register(lua_State* state)
lua_class_end(state);
}
// A movement argument from Lua: true moves a pathfinder despite fear, confusion or charm.
static StatusMode status_mode(bool isIgnored)
{
return isIgnored ? STATUS_IGNORED : STATUS_OBEYED;
}
// Registers Lua's PathFinder, an NPC's way around the room.
static void path_finder_register(lua_State* state)
{
lua_class_begin(state, "PathFinder", LUA_CLASS_PATH_FINDER);
lua_method(state, "Reset", [](PathFinder& path) { path.Reset(); });
lua_method(state, "ResetMovementTarget", [](PathFinder& path) { path.ResetMovementTarget(); });
lua_method(state, "UpdateGridIndex", [](PathFinder& path) { path.UpdateGridIndex(); });
lua_method(state, "GetGridIndex", [](PathFinder& path) { return path.gridIndex; });
lua_method(state, "HasDirectPath", [](PathFinder& path) { return path.hasDirectPath; });
lua_method(state, "GetEvadeMovementCountdown", [](PathFinder& path) { return path.evadeMovementCountdown; });
lua_method(state, "SetCanCrushRocks", [](PathFinder& path, bool isCrushing) { path.canCrushRocks = isCrushing; });
lua_method(state, "HasPathToPos", [](PathFinder& path, Vector position, bool isIgnorePoop) {
return path.HasPathToPos(position, isIgnorePoop);
});
lua_method(state, "FindGridPath",
[](PathFinder& path, Vector position, float speed, int pathMarker, bool isDirect) {
path.FindGridPath(position, speed, pathMarker, isDirect ? DIRECT_PATH_FAR : DIRECT_PATH_NEAR);
});
lua_method(state, "EvadeTarget", [](PathFinder& path, Vector target, bool isIgnored) {
path.EvadeTarget(target, status_mode(isIgnored));
});
lua_method(state, "MoveRandomly",
[](PathFinder& path, bool isIgnored) { return path.MoveRandomly(status_mode(isIgnored)); });
lua_method(state, "MoveRandomlyBoss",
[](PathFinder& path, bool isIgnored) { path.MoveRandomlyBoss(status_mode(isIgnored)); });
lua_method(state, "MoveRandomlyAxisAligned", [](PathFinder& path, float speed, bool isIgnored) {
path.MoveRandomlyAxisAligned(speed, status_mode(isIgnored));
});
lua_class_end(state);
}
// Registers Lua's ProjectileParams, how FireProjectiles shoots, which scripts construct.
static void projectile_params_register(lua_State* state)
{
@@ -314,6 +356,7 @@ static void projectile_params_register(lua_State* state)
void lua_api_entities_register(lua_State* state)
{
path_finder_register(state);
projectile_params_register(state);
shots_register(state);
weapons_register(state);