Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maps.py configurable enter requirements #135

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

thmsndk
Copy link
Contributor

@thmsndk thmsndk commented Apr 25, 2024

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.
    "locations": [
      #[mapKey, locationType, locationIndex, range]
      ["main", "spawns", 19, 120], # log near mansion
      ["main", "quirks", 10, 120], # log near mansion
      ["main", "doors", 13, 120] # log near mansion
    ]

@thmsndk thmsndk force-pushed the feature/configurable-enter-requirements branch from a396eea to f56650e Compare July 27, 2024 20:33
node/server.js Outdated Show resolved Hide resolved
node/server.js Outdated Show resolved Hide resolved
node/server.js Outdated Show resolved Hide resolved
node/server.js Outdated Show resolved Hide resolved
node/server.js Outdated Show resolved Hide resolved
node/server.js Outdated Show resolved Hide resolved
@Telokis Telokis added Type: enhancement Changes the existing content of the game Scope: game server The game server is impacted Status: waiting for author The maintainers are waiting for the author or contributor to reply or perform changes Scope: meta This relates to the repository, code, or environment without meaningful direct impact to the game labels Aug 13, 2024
@thmsndk thmsndk force-pushed the feature/configurable-enter-requirements branch from f56650e to 8ecfa1b Compare August 13, 2024 20:57
@thmsndk thmsndk force-pushed the feature/configurable-enter-requirements branch from 8ecfa1b to aad9a19 Compare August 14, 2024 08:59
@thmsndk
Copy link
Contributor Author

thmsndk commented Aug 14, 2024

@Telokis should be ready for review again

@Telokis Telokis added Status: waiting for review This PR is waiting for a maintainer to review it and removed Status: waiting for author The maintainers are waiting for the author or contributor to reply or perform changes labels Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: game server The game server is impacted Scope: meta This relates to the repository, code, or environment without meaningful direct impact to the game Status: waiting for review This PR is waiting for a maintainer to review it Type: enhancement Changes the existing content of the game
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants