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

Hiding Levels #563

Closed
PJNorrisS1 opened this issue May 23, 2023 · 11 comments
Closed

Hiding Levels #563

PJNorrisS1 opened this issue May 23, 2023 · 11 comments

Comments

@PJNorrisS1
Copy link

PJNorrisS1 commented May 23, 2023

Hi,

Sorry to bring this topic up again. If I try and explain my scenario, it might make sense and you may be able to advise a better approach.

Today, we have to types of games. In the next couple of months, there will be 5 or 6 types of games.

Each "Game" will have more than one level, eg: game 1 has 7 levels, game 2 has 3 levels.

There shouldn't be any scenario where we have a session with players where they will need access to more than one 'game' and it's corresponding levels.

So at the moment, I have 10 levels, the first seven are 1.1, 1.2, 1.3 etc that represents 'game 1'; then I have 2.1, 2.2, 2.3 etc that represents 'game 2'. For Level 1.1 I have it as "unlocked". The same goes for level 2.1. All the remaining levels are on previous level progress of 100%, so we are taking them through each level as they progress.

When a player logs in, they get to see all the levels, but only 1.1 and 2.1 is playable.

To disable 2.1, we change it to locked. But it's still visible (not playable).

A suggestion was to change it to "managed" and have no users assigned, that will 'hide' it from view. But when you have so many levels to change to 'managed' and then back to 'unlocked' or game progress, it's too much to ask of the admin to do that each time.

Ideally, I would like to see a checkbox 'enabled/disabled' on the level editor, if disabled, it's not shown.

I have also experimented with Corporations, but it's just a title, no management around that at all (might be an option?)

Now that's explained in a terrible way, is there another way of doing this or could this be coded in?

Thanks!
PJ

@eljeffeg
Copy link
Collaborator

It does sound like Corporations (which we could rename) may be a way to handle this as we could potentially hide all the boxes associated it. A step further would be managed Corporations, which could allow some users to play game 1 while other users play game 2 on the same system.

@PJNorrisS1
Copy link
Author

Yes love this idea! Hiding a corp be awesome to start with! 🤞🙏👆

@eljeffeg
Copy link
Collaborator

Pushed a new branch for testing: https://github.com/moloch--/RootTheBox/tree/%23563---Hiding-Levels
This provides a lock option for levels and corporations.

@PJNorrisS1
Copy link
Author

PJNorrisS1 commented May 30, 2023

Hi!
Pulled and merged the new branch. Thank you.

  1. Corporations - the 'lock' button doesn't do anything.
  2. Levels - the 'lock' button shows the interface it's locked, but as a place
    image
    and the user see's:
    image
    The level still there, but the the flags are not, which I guess is correct. If I 'unlock' the level, this is what I see:
    image

@eljeffeg
Copy link
Collaborator

Pushed an update

@PJNorrisS1
Copy link
Author

Ok, thank you - that is the level lock sorted, it now hides it. However the Corporations button doesn't do anything. Should it? No errors in the log.

@eljeffeg
Copy link
Collaborator

Try doing a shift+refresh. There was a change to javascript, so maybe it's cached?

@PJNorrisS1
Copy link
Author

Yup that did it! Thank you - that is PERFECT! Do you want me to close this, or are you doing more coding on it?

@eljeffeg
Copy link
Collaborator

Yeah, we can close it and will still have #545 open to fill in the remaining gaps.

@PJNorrisS1
Copy link
Author

will this be merged with master soon? Otherwise I'll update all my instances with this branch. Thank you again my friend.

eljeffeg added a commit that referenced this issue May 31, 2023
@eljeffeg
Copy link
Collaborator

Merged 👍

eljeffeg added a commit that referenced this issue Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants