Curation round 13: grid entities, more enemies, Caves, boss helpers and five bosses, chests and costumes, curses and alt stages, the Lua API
This commit is contained in:
1 parent
f8ce24fc6c
commit
8ae02a8422
160 files changed
+16231
-1689
No files matched your search
+60
-2
@@ -14,11 +14,13 @@ struct Entity_Bomb;
|
||||
struct Entity_Effect;
|
||||
struct Entity_Familiar;
|
||||
struct Entity_Knife;
|
||||
struct Entity_Laser;
|
||||
struct Entity_NPC;
|
||||
struct Entity_Pickup;
|
||||
struct Entity_Player;
|
||||
struct Entity_Projectile;
|
||||
struct Entity_Tear;
|
||||
struct EntityRef;
|
||||
struct EntitySpawn;
|
||||
struct RNG;
|
||||
struct Vector;
|
||||
@@ -30,20 +32,52 @@ constexpr int LUA_MEMORY_HISTORY_SIZE = 128;
|
||||
// Lua's LUA_NOREF: a registry reference to nothing.
|
||||
constexpr int LUA_REF_NONE = -2;
|
||||
|
||||
// The game classes callbacks hand objects of to Lua, each with the registry key of the metatable the API gives it.
|
||||
// The game classes the API binds, each with the registry key of the metatable its objects get.
|
||||
enum LuaClass
|
||||
{
|
||||
LUA_CLASS_BIT_SET128,
|
||||
LUA_CLASS_COLOR,
|
||||
LUA_CLASS_ENTITY,
|
||||
LUA_CLASS_BOMB,
|
||||
LUA_CLASS_EFFECT,
|
||||
LUA_CLASS_FAMILIAR,
|
||||
LUA_CLASS_KNIFE,
|
||||
LUA_CLASS_LASER,
|
||||
LUA_CLASS_NPC,
|
||||
LUA_CLASS_PICKUP,
|
||||
LUA_CLASS_PLAYER,
|
||||
LUA_CLASS_PROJECTILE,
|
||||
LUA_CLASS_RNG,
|
||||
LUA_CLASS_TEAR,
|
||||
LUA_CLASS_ENTITY_PTR,
|
||||
LUA_CLASS_ENTITY_REF,
|
||||
LUA_CLASS_FONT,
|
||||
LUA_CLASS_FONT_SETTINGS,
|
||||
LUA_CLASS_GAME,
|
||||
LUA_CLASS_GRID_ENTITY,
|
||||
LUA_CLASS_HUD,
|
||||
LUA_CLASS_ITEM_CONFIG,
|
||||
LUA_CLASS_ITEM_CONFIG_CARD,
|
||||
LUA_CLASS_ITEM_CONFIG_CARD_LIST,
|
||||
LUA_CLASS_ITEM_CONFIG_COSTUME,
|
||||
LUA_CLASS_ITEM_CONFIG_ITEM,
|
||||
LUA_CLASS_ITEM_CONFIG_ITEM_LIST,
|
||||
LUA_CLASS_ITEM_CONFIG_PILL,
|
||||
LUA_CLASS_ITEM_CONFIG_PILL_LIST,
|
||||
LUA_CLASS_ITEM_POOL,
|
||||
LUA_CLASS_KCOLOR,
|
||||
LUA_CLASS_LEVEL,
|
||||
LUA_CLASS_MUSIC_MANAGER,
|
||||
LUA_CLASS_PROJECTILE_PARAMS,
|
||||
LUA_CLASS_RNG,
|
||||
LUA_CLASS_ROOM,
|
||||
LUA_CLASS_ROOM_CONFIG_ROOM,
|
||||
LUA_CLASS_ROOM_DESCRIPTOR,
|
||||
LUA_CLASS_ROOM_LIST,
|
||||
LUA_CLASS_SEEDS,
|
||||
LUA_CLASS_SFX_MANAGER,
|
||||
LUA_CLASS_SPRITE,
|
||||
LUA_CLASS_TEAR_PARAMS,
|
||||
LUA_CLASS_TEMPORARY_EFFECTS,
|
||||
LUA_CLASS_VECTOR,
|
||||
LUA_CLASS_COUNT
|
||||
};
|
||||
@@ -115,20 +149,36 @@ struct LuaEngine
|
||||
int PostCurseEval(int curses);
|
||||
int PostGetCollectible(const LuaCollectibleDraw& draw);
|
||||
int PreGetCollectible(const LuaCollectibleDraw& draw);
|
||||
bool EntityTakeDamage(Entity* entity, float damage, uint64_t damageFlags, const EntityRef& source, int countdown);
|
||||
bool PreEntityDevolve(Entity* entity);
|
||||
bool PreNPCUpdate(Entity_NPC* npc);
|
||||
bool PreSpawnCleanAward(const RNG& rng, const Vector& position);
|
||||
bool PreUseItem(const LuaItemUse& use);
|
||||
void Callback_PreEntitySpawn(EntitySpawn& spawn);
|
||||
void PostPickupSelection(Entity_Pickup* pickup, int& variant, int& subType);
|
||||
bool UseItem(LuaItemUse& use);
|
||||
|
||||
void EvaluateItems(Entity_Player* player, int cacheFlag);
|
||||
void FamiliarInit(Entity_Familiar* familiar);
|
||||
void FamiliarUpdate(Entity_Familiar* familiar);
|
||||
void PostBombInit(Entity_Bomb* bomb);
|
||||
void PostBombRender(Entity_Bomb* bomb, const Vector& offset);
|
||||
void PostBombUpdate(Entity_Bomb* bomb);
|
||||
void PostEffectInit(Entity_Effect* effect);
|
||||
void PostEffectRender(Entity_Effect* effect, const Vector& offset);
|
||||
void PostEffectUpdate(Entity_Effect* effect);
|
||||
void PostEntityKill(Entity* entity);
|
||||
void PostEntityRemove(Entity* entity);
|
||||
void PostFamiliarRender(Entity_Familiar* familiar, const Vector& offset);
|
||||
void PostFireTear(Entity_Tear* tear);
|
||||
void PostGameEnd(bool isGameOver);
|
||||
void PostGameStart(bool isContinued);
|
||||
void PostKnifeInit(Entity_Knife* knife);
|
||||
void PostKnifeRender(Entity_Knife* knife, const Vector& offset);
|
||||
void PostKnifeUpdate(Entity_Knife* knife);
|
||||
void PostLaserInit(Entity_Laser* laser);
|
||||
void PostLaserRender(Entity_Laser* laser, const Vector& offset);
|
||||
void PostLaserUpdate(Entity_Laser* laser);
|
||||
void PostNewLevel();
|
||||
void PostNewRoom();
|
||||
void PostNPCDeath(Entity_NPC* npc);
|
||||
@@ -138,12 +188,20 @@ struct LuaEngine
|
||||
void PostPickupInit(Entity_Pickup* pickup);
|
||||
void PostPickupRender(Entity_Pickup* pickup, const Vector& offset);
|
||||
void PostPickupUpdate(Entity_Pickup* pickup);
|
||||
void PostPEffectUpdate(Entity_Player* player);
|
||||
void PostPlayerInit(Entity_Player* player);
|
||||
void PostPlayerRender(Entity_Player* player, const Vector& offset);
|
||||
void PostPlayerUpdate(Entity_Player* player);
|
||||
void PostProjectileInit(Entity_Projectile* projectile);
|
||||
void PostProjectileRender(Entity_Projectile* projectile, const Vector& offset);
|
||||
void PostProjectileUpdate(Entity_Projectile* projectile);
|
||||
void PostRender();
|
||||
void PostTearInit(Entity_Tear* tear);
|
||||
void PostTearRender(Entity_Tear* tear, const Vector& offset);
|
||||
void PostTearUpdate(Entity_Tear* tear);
|
||||
void PostUpdate();
|
||||
void PreGameExit(bool isSaving);
|
||||
void UseCard(int card, Entity_Player* player, unsigned int useFlags);
|
||||
void UsePill(int pillEffect, Entity_Player* player, unsigned int useFlags);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user