|
Binding of Isaac - Afterbirth+ Lua Reference/Guide
|
Public Member Functions | |
| Backdrop::Backdrop | GetBackdropType () |
| Update () | |
| Render () | |
| boolean | IsInitialized () |
| GridEntity::CollisionClass | GetGridCollision (integer GridIndex) |
| GridEntity::CollisionClass | GetGridCollisionAtPos (Vector Pos) |
| GridEntityDoor & | GetDoor (DoorSlot Slot) |
| Vector | GetDoorSlotPosition (DoorSlot Slot) |
| boolean | IsDoorSlotAllowed (DoorSlot Slot) |
| Returns whether this room design may have a door at a given position, disregarding whether those doors exist. More... | |
| RemoveDoor (DoorSlot Slot) | |
| KeepDoorsClosed () | |
| RoomType | GetType () |
| integer | GetDecorationSeed () |
| integer | GetSpawnSeed () |
| integer | GetAwardSeed () |
| RoomShape | GetRoomShape () |
| RoomConfig::Stage | GetRoomConfigStage () |
| returns the original stage the room was designed for (useful for The Void) More... | |
| integer | GetGridPath (integer Index) |
| integer | GetGridPathFromPos (integer Index) |
| boolean | SetGridPath (integer Index, integer Value) |
| boolean | DamageGrid (integer Index, integer Damage) |
| boolean | DestroyGrid (integer Index, boolean Immediate) |
| boolean | CheckLine (Vector Pos1, Vector Pos2, LinecheckMode Mode, integer GridPathThreshold, boolean IgnoreWalls, boolean IgnoreCrushable) |
| Vector | GetLaserTarget (Vector Pos, Vector Dir) |
| GridEntity & | GetGridEntity (integer Index) |
| GridEntity & | GetGridEntityFromPos (integer Index) |
| integer | GetGridWidth () |
| integer | GetGridHeight () |
| integer | GetGridSize () |
| boolean | IsClear () |
| bool IsClear(void) const {return m_Desc->Clear;} More... | |
| SetClear (boolean Clear) | |
| Vector | FindFreePickupSpawnPosition (Vector Pos, float InitialStep, boolean AvoidActiveEntities) |
| Vector | FindFreeTilePosition (Vector Pos, float DistanceThreshold) |
| integer | GetGridIndex (Vector Position) |
| integer | GetClampedGridIndex (Vector Position) |
| Vector | GetGridPosition (integer GridIndex) |
| Vector | GetClampedPosition (Vector Pos, float Margin) |
| boolean | IsPositionInRoom (Vector Pos, float Margin) |
| Vector | ScreenWrapPosition (Vector Pos, float Margin) |
| boolean | IsLShapedRoom () |
| LRoomAreaDesc | GetLRoomAreaDesc () |
| LRoomTileDesc | GetLRoomTileDesc () |
| Vector | GetTopLeftPos () |
| Vector | GetBottomRightPos () |
| Vector | GetCenterPos () |
| boolean | SpawnGridEntity (integer GridIndex, GridEntityType Type, integer Variant, integer Seed, integer VarData) |
| RemoveGridEntity (integer GridIndex, integer PathTrail, boolean KeepDecoration) | |
| integer | GetFrameCount () |
| EntityList & | GetEntities () |
| integer | GetAliveEnemiesCount () |
| integer | GetAliveBossesCount () |
| BossId | GetBossID () |
| BossId | GetSecondBossID () |
| TryPlaceLadder (Vector PlayerPos, Vector PlayerVelocity, Entity Ladder) | |
| SetSacrificeDone (boolean Done) | |
| boolean | IsSacrificeDone () |
| boolean | IsAmbushDone () |
| SetAmbushDone (boolean Value) | |
| boolean | IsAmbushActive () |
| ShopRestockPartial () | |
| ShopRestockFull () | |
| ShopReshuffle (boolean KeepCollectibleIdx, boolean ReselectSaleItem) | |
| boolean | TrySpawnDevilRoomDoor (boolean Animate) |
| float | GetDevilRoomChance () |
| boolean | TrySpawnBossRushDoor (boolean IgnoreTime) |
| boolean | TrySpawnMegaSatanRoomDoor () |
| boolean | TrySpawnBlueWombDoor (boolean FirstTime, boolean IgnoreTime) |
| boolean | TrySpawnTheVoidDoor () |
| PlayMusic () | |
| SetRedHeartDamage () | |
| boolean | GetRedHeartDamage () |
| integer | GetBrokenWatchState () |
| SetBrokenWatchState (integer State) | |
| boolean | IsFirstVisit () |
| Broken Watch Room State - 0 = no watch effect, 1 = speed down, 2 = speed up. More... | |
| const Vector & | GetRenderSurfaceTopLeft () |
| The position the floor and wall textures will be rendered at. More... | |
| const Vector & | GetRenderScrollOffset () |
| The camera scroll offset and screen shake offsets are both represented here. More... | |
| boolean | HasWaterPits () |
| bool HasWaterPits(void) const { return m_Desc->HasWater; } More... | |
| CollectibleType | GetSeededCollectible (integer Seed) |
| integer | GetShopLevel () |
| SetShockwaveParam (integer ShockwaveId, ShockwaveParams Params) | |
| integer | GetNextShockwaveId () |
| SetCardAgainstHumanity () | |
| EmitBloodFromWalls (integer Duration, integer Count) | |
| SpawnClearAward () | |
| float | GetLightingAlpha () |
| boolean | TryMakeBridge (GridEntity pit) |
| integer | GetDungeonRockIdx () |
| integer | GetTintedRockIdx () |
| boolean | HasSlowDown () |
| SetSlowDown (integer Duration) | |
| Vector | GetRandomPosition (float Margin) |
| returns random non tile aligned position More... | |
| integer | GetRandomTileIndex (integer Seed) |
| RespawnEnemies () | |
| for D7 collectible More... | |
| boolean | HasWater () |
| boolean | HasTriggerPressurePlates () |
| boolean | IsCurrentRoomLastBoss () |
| boolean | IsFirstEnemyDead () |
| SetFirstEnemyDead (boolean Value) | |
| MamaMegaExplossion () | |
| integer | GetDeliriumDistance () |
| TurnGold () | |
| SetFloorColor (KColor FloorColor) | |
| SetWallColor (KColor WallColor) | |
| Vector | WorldToScreenPosition (Vector WorldPos) |
| Converts an entity position to one that can be used to render to the screen. More... | |
| boolean Room::CheckLine | ( | Vector | Pos1, |
| Vector | Pos2, | ||
| LinecheckMode | Mode, | ||
| integer | GridPathThreshold, | ||
| boolean | IgnoreWalls, | ||
| boolean | IgnoreCrushable | ||
| ) |
returns true if there is a direct line of sight between Pos1 and Pos2 returns false if the line is obstructed
| boolean Room::DamageGrid | ( | integer | Index, |
| integer | Damage | ||
| ) |
Damage Grid Entities currently this concerns GridEntityPoop and GridEntity_Fire returns true if damageable entity was found (and possibly damaged) return false if not used by tears, bombs, some NPCs, etc
| boolean Room::DestroyGrid | ( | integer | Index, |
| boolean | Immediate | ||
| ) |
calls DamageGrid internally to damage Poop/Fire removes rocks and opens secret doors returns true if something was destroyed returns false if not used for explosions mostly
| Room::EmitBloodFromWalls | ( | integer | Duration, |
| integer | Count | ||
| ) |
| Vector Room::FindFreePickupSpawnPosition | ( | Vector | Pos, |
| float | InitialStep, | ||
| boolean | AvoidActiveEntities | ||
| ) |
Starting from Pos, will try to find a free spawn position where a newly spawned pickup item will not collide with already spawned pickup items, or solid grid elements such as rocks, or pits The returned position will be aligned to the grid. If no free position is found, the original position (aligned to the grid) is returned.
Finds the nearest free tile based on position Stops immediately if the tile sampled has a squared distance less than DistanceThresholdSQ
| integer Room::GetAliveBossesCount | ( | ) |
| integer Room::GetAliveEnemiesCount | ( | ) |
| integer Room::GetAwardSeed | ( | ) |
| Backdrop::Backdrop Room::GetBackdropType | ( | ) |
| BossId Room::GetBossID | ( | ) |
| Vector Room::GetBottomRightPos | ( | ) |
returns bottom right position inside of walls
| integer Room::GetBrokenWatchState | ( | ) |
| Vector Room::GetCenterPos | ( | ) |
returns the room center position
| integer Room::GetClampedGridIndex | ( | Vector | Position | ) |
converts float position (x,y) to grid index (similar to ingrid) clamps the values if out of bounds
returns Pos clamped to room borders inside of walls
| integer Room::GetDecorationSeed | ( | ) |
| integer Room::GetDeliriumDistance | ( | ) |
| float Room::GetDevilRoomChance | ( | ) |
| GridEntityDoor& Room::GetDoor | ( | DoorSlot | Slot | ) |
| integer Room::GetDungeonRockIdx | ( | ) |
| EntityList& Room::GetEntities | ( | ) |
| integer Room::GetFrameCount | ( | ) |
| GridEntity::CollisionClass Room::GetGridCollision | ( | integer | GridIndex | ) |
| GridEntity::CollisionClass Room::GetGridCollisionAtPos | ( | Vector | Pos | ) |
| GridEntity& Room::GetGridEntity | ( | integer | Index | ) |
| GridEntity& Room::GetGridEntityFromPos | ( | integer | Index | ) |
| integer Room::GetGridHeight | ( | ) |
| integer Room::GetGridIndex | ( | Vector | Position | ) |
converts float position (x,y) to grid index returns -1 for invalid index
| integer Room::GetGridPath | ( | integer | Index | ) |
| integer Room::GetGridPathFromPos | ( | integer | Index | ) |
| Vector Room::GetGridPosition | ( | integer | GridIndex | ) |
converts grid index to float (x,y) position undefined behaviour for invalid index
| integer Room::GetGridSize | ( | ) |
| integer Room::GetGridWidth | ( | ) |
returns the hit position for a laser beam (Technology, Robo-Baby) usually, the first poop, fire, rock, TNT, or wall encountered on a straight line
| float Room::GetLightingAlpha | ( | ) |
| LRoomAreaDesc Room::GetLRoomAreaDesc | ( | ) |
| LRoomTileDesc Room::GetLRoomTileDesc | ( | ) |
| integer Room::GetNextShockwaveId | ( | ) |
| Vector Room::GetRandomPosition | ( | float | Margin | ) |
returns random non tile aligned position
| integer Room::GetRandomTileIndex | ( | integer | Seed | ) |
| boolean Room::GetRedHeartDamage | ( | ) |
| const Vector& Room::GetRenderScrollOffset | ( | ) |
The camera scroll offset and screen shake offsets are both represented here.
| const Vector& Room::GetRenderSurfaceTopLeft | ( | ) |
The position the floor and wall textures will be rendered at.
| RoomConfig::Stage Room::GetRoomConfigStage | ( | ) |
returns the original stage the room was designed for (useful for The Void)
| RoomShape Room::GetRoomShape | ( | ) |
| BossId Room::GetSecondBossID | ( | ) |
| CollectibleType Room::GetSeededCollectible | ( | integer | Seed | ) |
| integer Room::GetShopLevel | ( | ) |
| integer Room::GetSpawnSeed | ( | ) |
| integer Room::GetTintedRockIdx | ( | ) |
| Vector Room::GetTopLeftPos | ( | ) |
returns top left position inside of walls
| RoomType Room::GetType | ( | ) |
| boolean Room::HasSlowDown | ( | ) |
| boolean Room::HasTriggerPressurePlates | ( | ) |
| boolean Room::HasWater | ( | ) |
| boolean Room::HasWaterPits | ( | ) |
bool HasWaterPits(void) const { return m_Desc->HasWater; }
| boolean Room::IsAmbushActive | ( | ) |
| boolean Room::IsAmbushDone | ( | ) |
| boolean Room::IsClear | ( | ) |
bool IsClear(void) const {return m_Desc->Clear;}
| boolean Room::IsCurrentRoomLastBoss | ( | ) |
| boolean Room::IsDoorSlotAllowed | ( | DoorSlot | Slot | ) |
Returns whether this room design may have a door at a given position, disregarding whether those doors exist.
| boolean Room::IsFirstEnemyDead | ( | ) |
| boolean Room::IsFirstVisit | ( | ) |
Broken Watch Room State - 0 = no watch effect, 1 = speed down, 2 = speed up.
| boolean Room::IsInitialized | ( | ) |
| boolean Room::IsLShapedRoom | ( | ) |
| boolean Room::IsPositionInRoom | ( | Vector | Pos, |
| float | Margin | ||
| ) |
| boolean Room::IsSacrificeDone | ( | ) |
| Room::KeepDoorsClosed | ( | ) |
| Room::MamaMegaExplossion | ( | ) |
| Room::PlayMusic | ( | ) |
| Room::RemoveDoor | ( | DoorSlot | Slot | ) |
| Room::RemoveGridEntity | ( | integer | GridIndex, |
| integer | PathTrail, | ||
| boolean | KeepDecoration | ||
| ) |
| Room::Render | ( | ) |
| Room::RespawnEnemies | ( | ) |
for D7 collectible
Returns Pos, screen-wrapped (if it is just outside the room on the right it will be moved to the left side of the room, etc)
Note: This only wraps the point once, so if it has crossed multiple wrapping planes it will only wrap on the one it's closest to. For wrapping a position that has crossed two planes (outside a room in the top left for instance) call this function iteratively.
| Room::SetAmbushDone | ( | boolean | Value | ) |
| Room::SetBrokenWatchState | ( | integer | State | ) |
| Room::SetCardAgainstHumanity | ( | ) |
| Room::SetClear | ( | boolean | Clear | ) |
Needed for angel room, so the clear flag can be set to false when the angel spawns void SetClear(bool Clear) {m_Desc->Clear = Clear;}
| Room::SetFirstEnemyDead | ( | boolean | Value | ) |
| Room::SetFloorColor | ( | KColor | FloorColor | ) |
| boolean Room::SetGridPath | ( | integer | Index, |
| integer | Value | ||
| ) |
| Room::SetRedHeartDamage | ( | ) |
| Room::SetSacrificeDone | ( | boolean | Done | ) |
| Room::SetShockwaveParam | ( | integer | ShockwaveId, |
| ShockwaveParams | Params | ||
| ) |
| Room::SetSlowDown | ( | integer | Duration | ) |
| Room::SetWallColor | ( | KColor | WallColor | ) |
| Room::ShopReshuffle | ( | boolean | KeepCollectibleIdx, |
| boolean | ReselectSaleItem | ||
| ) |
| Room::ShopRestockFull | ( | ) |
| Room::ShopRestockPartial | ( | ) |
| Room::SpawnClearAward | ( | ) |
| boolean Room::SpawnGridEntity | ( | integer | GridIndex, |
| GridEntityType | Type, | ||
| integer | Variant, | ||
| integer | Seed, | ||
| integer | VarData | ||
| ) |
| boolean Room::TryMakeBridge | ( | GridEntity | pit | ) |
| boolean Room::TrySpawnBlueWombDoor | ( | boolean | FirstTime, |
| boolean | IgnoreTime | ||
| ) |
| boolean Room::TrySpawnBossRushDoor | ( | boolean | IgnoreTime | ) |
| boolean Room::TrySpawnDevilRoomDoor | ( | boolean | Animate | ) |
| boolean Room::TrySpawnMegaSatanRoomDoor | ( | ) |
| boolean Room::TrySpawnTheVoidDoor | ( | ) |
| Room::TurnGold | ( | ) |
| Room::Update | ( | ) |