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

Add max_charges to items that throw "cannot have charges" error #42603

Merged
merged 6 commits into from
Aug 3, 2020

Conversation

GearheadLydia
Copy link
Contributor

Summary

SUMMARY: [Bugfixes] "Add max_charges to items that throw 'cannot have charges' error"

Purpose of change

Suppress "cannot have charges" error and preserve charges in saves with items that have initial_charges set but not max_charges.

Describe the solution

Add max_charges field to every item I found with an initial_charges setting but not a max_charges setting. It's possible I missed a few.

Describe alternatives you've considered

We could try to add something in the code that automatically populates max_charges with whatever is set in initial_charges, but given that the current state of affairs seems to involve adding max_charges lines instead, there seems to be some reason we aren't doing that.

I also considered removing initial_charges from items with a battery pocket, but I'm not sure if that would have affected the function of those items.

Testing

This successfully gets rid of the "cannot have charges" error with items like harmonica_holder and scuba_tank and rebreather in my current save, started on 0.E-10811 and played on 0.E-10875. I don't know whether or not this causes other unexpected behavior, though.

@GearheadLydia GearheadLydia changed the title Charge fixes Add max_charges to items that throw "cannot have charges" error Jul 31, 2020
@@ -15,6 +15,7 @@
"material": [ "wood", "iron" ],
"symbol": "|",
"color": "white",
"max_charges": 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to test whether instruments actually need charges, AFAIK they don't use them, but they might need one charge for the use invocation to work.

Copy link
Contributor Author

@GearheadLydia GearheadLydia Aug 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried the violin and it looks like they don't require charges, or at least the violin doesn't. I'll try a few others.

ETA: Tuba and guitar also don't need charges.

Co-authored-by: Alexey Mostovoy <1931904+AMurkin@users.noreply.github.com>
@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [JSON] Changes (can be) made in JSON Items / Item Actions / Item Qualities Items and how they work and interact labels Aug 3, 2020
@kevingranade kevingranade merged commit da25633 into CleverRaven:master Aug 3, 2020
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) Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants