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

Edit equipment hierarchy doesn't work correctly #1485

Open
laeyon85002 opened this issue Mar 16, 2024 · 3 comments
Open

Edit equipment hierarchy doesn't work correctly #1485

laeyon85002 opened this issue Mar 16, 2024 · 3 comments
Assignees

Comments

@laeyon85002
Copy link

laeyon85002 commented Mar 16, 2024

Your version of TTT2 (mandatory)

  • Workshop version from Steam

Describe the bug (mandatory)

I think there is a bug in the logic of the "Edit equipment" master. If I have a CheckBox that activates/deactivates a complete section and this has a subordinate element (also a CheckBox), which in turn has another sub-element, then this lowest setting is incorrectly enabled when the editor is reopened. Category 2 must first be enabled and category 1 then disabled, then the subitem of category 2 is enabled when the editor is reopened, although category 1 is disabled. The changes seem to be correct as long as the window is open - afterwards, when reopened, it is incorrect.

To reproduce

Steps to reproduce the behaviour:

  1. Add the attached addon to your collection
  2. Go to 'F1 > Edit equip bug'
  3. Scroll down to the custom settings
  4. Enable "Enable main feature", enable "Enable sub feature", enable "My option value"
  5. Now disable "Enable main feature" and reopen the "Edit equipment"-browser
  6. The option "My option value" is enabled, although the superordinate categories are disabled

Expected behaviour

The entire hierarchy must be taken into account and not just the option directly above it, so that the option at the lowest level is not displayed if the options above it are switched off. Apparently the behavior only seems to be wrong when you open the window again - it seems to be correct when the window is open.

Context (please provide as much as you can)

  • No collection needed, just use the attached example addon
  • No server errors
  • No client errors
  • No other addons needed
  • Screenshots:
image

The last option is still set as enabled but the controls are disabled (correct behavior until I reopen the window):
image

After reopening the controls of the last option are enabled, although the parent control is disabled:
image

Additional context

editEquipmentBug.zip

@TimGoll
Copy link
Member

TimGoll commented Mar 16, 2024

@ZenBre4ker you probably know the most about the UI requesting data from the server?

@TimGoll TimGoll added the type/bug Something isn't working label Mar 16, 2024
@TimGoll TimGoll added this to the v0.13.xb milestone Mar 16, 2024
@ZenBre4ker
Copy link
Contributor

This looks like a simple clientside logic error not including any data from the server.

Maybe because the 1st sub element is deactivated by the master, the 2nd sub element doesnt get deactivated.
We never had more than one level under one master.

@TimGoll
Copy link
Member

TimGoll commented Mar 16, 2024

We have multiple levels under master and it works fine for convar based settings (check the karma menu for example)

This seems to be a database based issue

@ZenBre4ker ZenBre4ker removed this from the v0.13.xb milestone Mar 16, 2024
@TimGoll TimGoll added this to the v0.13.xb milestone Mar 16, 2024
@Histalek Histalek modified the milestones: v0.13.xb, Feature Backlog Mar 30, 2024
@TimGoll TimGoll self-assigned this Jun 1, 2024
@Histalek Histalek removed the type/bug Something isn't working label Oct 2, 2024
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

4 participants