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

Consistent UPS charge consumption when crafting #45781

Merged
merged 1 commit into from
Dec 18, 2020

Conversation

RoyBerube
Copy link
Contributor

@RoyBerube RoyBerube commented Dec 3, 2020

Summary

SUMMARY: Bugfixes "Consistent UPS charge consumption when crafting"

Purpose of change

Fixes #45330
Fixes #43054

Describe the solution

Multiple problems had to be addressed to fix this bug.

  • Tools used for crafting items could be only on the map or in inventory, but not both. Since UPS power and the tool could be in both locations, this was a main source of the problem. Fixed by allowing crafting tools to span the map and players inventory if needed.
  • Some code was detecting items on the map while it was only consuming from inventory, causing inconsistencies. This has been fixed by allowing radius to force player inventory only.
  • Power consumption of tools on the map were not accounting for UPS. This has been fixed.

Describe alternatives you've considered

Testing

Full test program: no problems.

Tested crafting with arc welders and UPS in all possible combinations on the map and in inventory. Power consumption is consistent and reliable.

Tested stopping of craft, moving tools, and resuming. In certain situations such as moving tools from inventory to the map it will give a warning message message of missing charges and stop, but will resume correctly with a prompt for tool selection if the craft is attempted again. Power consumption is correct however and is only a minor inconvenience in a rare circumstance. To eliminate the message would require - in my opinion - prompting the player about tool usage with every resumption of a craft. This way is less intrusive.

Additional context

@BrettDong BrettDong added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` labels Dec 3, 2020
@kevingranade kevingranade merged commit 1930bec into CleverRaven:master Dec 18, 2020
@Raikiri
Copy link

Raikiri commented Dec 18, 2020

Is this related? #45018

@RoyBerube RoyBerube deleted the UPS_remote_usage branch December 19, 2020 00:29
@Raikiri
Copy link

Raikiri commented Dec 20, 2020

I was playtesting these changes. Looks like it's significantly better than before, I can almost always use UPS reliably, but it still does not work with kiln and forge that have a UPS mod.

@RoyBerube
Copy link
Contributor Author

@Raikiri Oh well, one more thing to add to the TODO pile. Those tools must be getting handled differently, or they would have been fixed along with the rest.

@Raikiri
Copy link

Raikiri commented Dec 21, 2020

@RoyBerube actually after further testing it still happens to all tools, but more rarely. I can't give you a repro case, but I noticed that sometimes I start a craft using an integrated toolset CBM for soldering and then it says "You no longer have a none and can't continue crafting" when it runs out of bionic charges charges even though I have a UPS'd soldering iron nearby.

Also with forge and kiln I sometimes have to pick them up, drop them, pick up UPS, just shuffle them around for a bit in order to make them detect each other (?). Sorry I can't give you a more reliable repro, but looks like there's still edge cases left.

Looks like in the crafting menu it detects tools and charges correctly, but then sometimes fails during crafting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code`
Projects
None yet
4 participants