Curation round 14: console and Lua API, effects, lasers, enemies, eleven bosses, the Depths and Mom, status effects, the playable characters

This commit is contained in:
shweet committed 2026-11-20 19:04:41 -05:00
1 parent 8ae02a8422
commit 6e3da161fc
138 files changed
+16754 -6825

No files matched your search

+46
View File
@@ -239,6 +239,20 @@ 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_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,
const ProjectileParams& params) {
npc.FireProjectiles(position, velocity, mode, params);
});
lua_method(state, "FireBossProjectiles", [](Entity_NPC& npc, int count, Vector target, float trajectory,
const ProjectileParams& params) {
return npc.FireBossProjectiles(count, target, trajectory, params);
});
lua_method(state, "ThrowSpider", [](Entity_NPC&, Vector position, Entity* spawner, Vector target, bool isBig,
float yOffset) {
return Entity_NPC::ThrowSpider(position, spawner, target, isBig, yOffset);
});
lua_class_end(state);
lua_class_begin(state, "EntityPickup", LUA_CLASS_PICKUP, LUA_CLASS_ENTITY);
@@ -267,8 +281,40 @@ static void npc_pickup_register(lua_State* state)
lua_class_end(state);
}
// Registers Lua's ProjectileParams, how FireProjectiles shoots, which scripts construct.
static void projectile_params_register(lua_State* state)
{
lua_class_begin(state, "ProjectileParams", LUA_CLASS_PROJECTILE_PARAMS);
lua_static(state, "__call", [](LuaIgnored) { return ProjectileParams(); });
lua_field<&ProjectileParams::isGridCollision>(state, "GridCollision");
lua_field<&ProjectileParams::heightModifier>(state, "HeightModifier");
lua_field<&ProjectileParams::fallingSpeedModifier>(state, "FallingSpeedModifier");
lua_field<&ProjectileParams::fallingAccelModifier>(state, "FallingAccelModifier");
lua_field<&ProjectileParams::velocityMulti>(state, "VelocityMulti");
lua_field<&ProjectileParams::scale>(state, "Scale");
lua_field<&ProjectileParams::circleAngle>(state, "CircleAngle");
lua_field<&ProjectileParams::homingStrength>(state, "HomingStrength");
lua_field<&ProjectileParams::curvingStrength>(state, "CurvingStrength");
lua_field<&ProjectileParams::acceleration>(state, "Acceleration");
lua_field<&ProjectileParams::spread>(state, "Spread");
lua_field<&ProjectileParams::color>(state, "Color");
lua_field<&ProjectileParams::bulletFlags>(state, "BulletFlags");
lua_field<&ProjectileParams::positionOffset>(state, "PositionOffset");
lua_field<&ProjectileParams::targetPosition>(state, "TargetPosition");
lua_field<&ProjectileParams::fireDirectionLimit>(state, "FireDirectionLimit");
lua_field<&ProjectileParams::dotProductLimit>(state, "DotProductLimit");
lua_field<&ProjectileParams::wiggleFrameOffset>(state, "WiggleFrameOffset");
lua_field<&ProjectileParams::changeFlags>(state, "ChangeFlags");
lua_field<&ProjectileParams::changeVelocity>(state, "ChangeVelocity");
lua_field<&ProjectileParams::changeTimeout>(state, "ChangeTimeout");
lua_field<&ProjectileParams::depthOffset>(state, "DepthOffset");
lua_field<&ProjectileParams::variant>(state, "Variant");
lua_class_end(state);
}
void lua_api_entities_register(lua_State* state)
{
projectile_params_register(state);
shots_register(state);
weapons_register(state);
companions_register(state);