1
Managers
Raphtalia edited this page 2024-12-23 14:12:18 +00:00

Doorway Manager

Manages the DoorwayCleanup logic.

Contains a event called onMainEntranceTeleportSpawnedEvent. It is called after the moon's main entrance's teleport sync has been done. You can add an action either a normal or temporary event. Temporary events are cleared before any dungeon generates while normal events are never cleared.

You can use this event to easily call any function after the entire dungeon generates. For example, SDM uses this event to setup its treasure rooms after all dungeon tiles were generated and instantiated.

Enemy Manager

Manages the temporary enemies added/removed for the moon.

Before LethalLevelLoader calls any of its onBeforeDungeonGenerator events, any previous moon's enemy list that was modified by this manager system will revert its changes. Then, you can add any temporary enemy or modify an existing enemy's spawn weight with EnemyManager.AddEnemy(SpawnableEnemyWithRarity newEnemy). If the newEnemy provided does not exist in the moon's enemy list, it will be added. If it already exists, then the existing enemy's spawn weight will change to the provided newEnemy spawn weight.

Scrap Item Manager

Manages the temporary scrap added/removed for the moon.

Before LethalLevelLoader calls any of its onBeforeDungeonGenerator events, any previous moon's scrap list that was modified by this manager system will revert its changes. Then, you can add any temporary scrap or modify an existing scrap's spawn weight with ScrapItemManager.AddItem(SpawnableItemWithRarity newItem). If the newItem provided does not exist in the moon's scrap list, it will be added. If it already exists, then the existing scrap's spawn weight will change to the provided newItem spawn weight.