Since ESB doesn't load the full set of libraries and functions, it should* be possible to detect whether a dungeon is loading in ESB by checking the existence of those functions.
But that seems rather haphazard. Is there a 'proper' way to do this?
* haven't tested yet...
Detecting ESB
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Detecting ESB
The method I use is to check for the existence of esb_typecheck. If it's defined, you're in ESB, if not, you're in DSB.
(This is, admittedly, very similar to the method you described! But it's based on a function that is never going to change, so it should be reliable)
(This is, admittedly, very similar to the method you described! But it's based on a function that is never going to change, so it should be reliable)
Code: Select all
if (esb_typecheck) then
do_esb_stuff()
else
do_dsb_stuff()
end