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

NoMonsterSpawn- & NoMonster-Flags cause glitches in trial chambers #82

Open
MaksyKun opened this issue Sep 13, 2024 · 2 comments
Open
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@MaksyKun
Copy link

Describe the bug

Using a Flag that prevents monsters to spawn causes the new trial chambers to keep running so that those trials will drop keys.

To reproduce

Couldnt test it by myself, but thats what was told to me
Steps to reproduce the behavior:

  1. Finding a Trial chamber
  2. Claiming the area
  3. Setting any flag that prevents the mobs their to spawn
  4. Enjoy getting keys for nothing since the trial keeps running

Expected behavior

Prevents the trials to run on such flags. Alternatively, provide a parameter in the config where you can disable that stuff to happen.

Versions

GP: 16.18.4
GPF: 5.13.4

@MaksyKun MaksyKun added the bug Something isn't working label Sep 13, 2024
@akdukaan
Copy link
Owner

Not sure how to deal with this. On one hand, I agree that it doesn't make sense for trial spawners to spawn keys if the trial mobs didn't get spawned. However, if I make it so the mob spawn canceling flags also canceled key spawning, players would easily be able to bypass this by just claiming the area around the spawner instead. I could theoretically make it so that GPFlags keeps track of each trial spawner, counts the successful mob spawns it has, and only spawn a key after enough trial mobs have been spawned, but I don't think it's GPFlags responsibility to do that. If I were to add such a feature, I would make it as a separate plugin. And from what I know, trial keys can only be used once per player, so I don't think this is big enough a problem to warrant a plugin to address it.

@akdukaan akdukaan added enhancement New feature or request wontfix This will not be worked on and removed bug Something isn't working labels Sep 21, 2024
@MaksyKun
Copy link
Author

Alrighty, got our own workaround by the meantime. In case you want to implement it anytime, do as you like with the following code:

// Required under 'FlagDef_NoMonsterSpawns' & 'FlagDef_NoMonsters'
@EventHandler(ignoreCancelled = true)
    public void onChamber(TrialSpawnerSpawnEvent event) {
        Flag flag = this.getFlagInstanceAtLocation(event.getLocation(), null);
        if (flag == null) return;
        event.setCancelled(true);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants