Meowlala / BOIStageAPI15

Custom StageAPI 1.5 for the Binding of Isaac Repentance, allows creating stages that use the form of others.
The Unlicense
20 stars 32 forks source link

MC_POST_NEW_ROOM is fired more than once on Startup #182

Open Guantol-Lemat opened 4 months ago

Guantol-Lemat commented 4 months ago

Preamble

budjmt commented 4 months ago

Thanks for the detailed issue! This is actually working as designed; under the hood, stage API is loading a number of rooms in advance in order to cache room state objects for various features. If you're having an issue with post new room being run multiple times at game start, consider whether the initialization code you're using should run in a different callback, e.g. POST_GAME_STARTED

Guantol-Lemat commented 4 months ago

Thank you for the quick response! In the end my code still ran as intended, even with the additional calls. However, just in case it becomes necessary later on, is there any global variable or procedure that can indicate whether StageAPI is performing this caching operation? This way, it would be possible to "ignore" the additional calls. If not, could one be implemented?