Add Managers
parent
ddf1454572
commit
01523e7e33
16
Managers.md
Normal file
16
Managers.md
Normal file
@ -0,0 +1,16 @@
|
||||
## Doorway Manager
|
||||
Manages the [DoorwayCleanup](https://git.touhou.dev/Raphtalia/DungeonGenerationPlus_LethalCompany_Mod/wiki/Components#doorway-cleanup) 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](https://git.touhou.dev/Raphtalia/SDM_LethalCompany_Mod/src/commit/fd731baf2febfbfa7bbcc9fe536eade672f6c7bf/ScarletMansion/ScarletMansion/GamePatch/Components/TreasureRoom/TreasureRoom.cs#L76) 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.
|
Loading…
x
Reference in New Issue
Block a user