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

Unwanted removal of duplicate keys on connections #13

Closed
Python1320 opened this issue Dec 19, 2020 · 1 comment
Closed

Unwanted removal of duplicate keys on connections #13

Python1320 opened this issue Dec 19, 2020 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@Python1320
Copy link

Python1320 commented Dec 19, 2020

"connections" in test2.vmf could be modified by duplicating one of the lines.
The duplicate gets removed even if the value is not a duplicate.
Hammer editor allows multiple actions on a single entity "output".

I can provide a test that fails.

It may make sense to do something similar to https://github.com/birjolaxew/vmf-transpiler#multiple-values-per-key with a valueobject that actually expands to multiple keys when regenerating the vmf

@Python1320 Python1320 changed the title Dict is removing duplicate keys Removal of duplicate keys on connections Dec 19, 2020
@Python1320 Python1320 changed the title Removal of duplicate keys on connections Unwanted removal of duplicate keys on connections Dec 19, 2020
@snake-biscuits snake-biscuits added the bug Something isn't working label Jan 3, 2021
@snake-biscuits snake-biscuits added this to the 0.2.0 milestone Jan 3, 2021
snake-biscuits added a commit that referenced this issue Jan 3, 2021
snake-biscuits added a commit that referenced this issue Jan 14, 2021
however when saving they are indented incorrectly,
breaking the "unedited files when saved are identical to source" test
@snake-biscuits
Copy link
Collaborator

Multiple connections are now loaded correctly & in the correct order
However when saving the Vmf object to file they aren't indented correctly.
I don't think stock hammer cares about that, but I haven't checked
Even if it does, I'll have that bug fixed by the end of the month as part of releasing 0.2.0 for PyPI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants