-
Notifications
You must be signed in to change notification settings - Fork 299
fix: cables duplication #5961
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
fix: cables duplication #5961
Conversation
IMO this is still done in an incredibly ugly way, items with a special way of handling charges and their dis//re-appearance - such as cables, should be handled somehow more explicit |
Thanks, boss, sorry, boss |
no worries, should've added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Compiled and load-tested.
- Spawned in a pair of jumper cables, and used them plus a shopping cart to bootleg a connection across two tiles, no duplicate jumper cables left in inventory.
- Spawned in a battery in the area now linked to the evac shelter, confirmed that examining the battery tells you about the grid it's bootleg-linked to, and confirmed after enough waiting that it will charge eventually.
- Spawned in a compound bow, cycling through different modes works as expected.
- Spawned in and lit a flare, it turned into a lit flare then a dead flare on running out, as expected.
- Spawned in a flashlight, turning on and off works as expected, and behaves as intended on running out of charges.
Bug: Spawned in Rising Sun, activated it, and let it run out of charges. It vanishes, this PR reintroduces #5868. Note that while fire weapons are currently obsoleted in mainline, they are still in use in in-repo mods and bringing them back into mainline is still on the table for things we're thinking about doing someday, plus the function finds use for items in other mods out there.
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
So, since previous change introduced a bug with vanishing items, I made a decision to handle those in explicit way, to remove a possibility of unexpected item vanishing. |
Oh fuck me. So I've got good news and bad news. Good news is, it's not your PR that did this. I just tested in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the false positive on the bug, since everything else works fine and I confirmed the fire weapon bug is present in one of the most recent releases, this is good to go.
If you want to go back to the other implementation instead that'd be fine, though having an item flag for tools that vanish when used up is actually something that's been on my "to look into someday" list since it'll be useful for other stuff in the future, so I kinda really like this implementation too.
EDIT: Went ahead with the merge since honestly the derailment due to finding an unrelated bug has kept you waiting long enough already, I screm
that would be #3723 |
Why should this PR be merged?
What does this PR do?
Fixes cables not being removed after linking vehicles, by revisiting some of the logic changes from #4968, without disturbing the work done
Steps to test and verify this PR
"Using" things that use charges and should or should not "disappear" after.
Checklist
Mandatory
closes #1234
in Summary of the PR so it can be closed automatically.main
so it won't cause conflict when updatingmain
branch later.