Currently crypt and winter_instance is hardcoded in the socket.on("enter") event, this change allows us to configure it instead of having to hardcode each new instance. I have verified that the correct key is still required and you still need to be near the correct door
This is also something that is used in the bee dungeon I'm working on. Figured it would make sense with a smaller PR only containing this change.
A future extension could be class or level requirements to enable class specific instances or min/max levels.
Engine Enhancements
You can now configure .enter requirements in maps.py
You can configure items and locations
.enter.items is an object the item required as the key and the amount required as the values, multiple items and their quantity required can be specified
enter: {
items: {
#requires 1 beekey to enter
"beekey": 1
}
}
enter.locations is an array of tuples with a list of locations where you have to be near one of them to enter, this could also allow you to enter the instance from different doors leading to different spawn points.
Currently
crypt
andwinter_instance
is hardcoded in thesocket.on("enter")
event, this change allows us to configure it instead of having to hardcode each new instance. I have verified that the correct key is still required and you still need to be near the correct doorThis is also something that is used in the bee dungeon I'm working on. Figured it would make sense with a smaller PR only containing this change.
A future extension could be
class
orlevel
requirements to enable class specific instances or min/max levels.Engine Enhancements
.enter
requirements in maps.py.enter.items
is an object the item required as the key and the amount required as the values, multiple items and their quantity required can be specifiedenter.locations
is an array of tuples with a list of locations where you have to be near one of them to enter, this could also allow you to enter the instance from different doors leading to different spawn points.