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

JSONize detergent used for vehicle washing machine #35670

Merged
merged 1 commit into from
Nov 25, 2019

Conversation

anothersimulacrum
Copy link
Member

Summary

SUMMARY: None

Purpose of change

Adds support for #35624

Describe the solution

Add a new washing_detergents itemgroup. Items added to this group will be allowed to be used as detergents.
In vehicle::use_washing_machine(), get the items from that group, and then check if the player has enough of those to use as detergent.
If the player does not, they cannot use the washing machine.
If they only have one, it is automatically used.
If they have more than one, a menu asks which one they would like to use.

Testing

Add some items to the aforementioned itemgroup, play around with the washing machine.
Notice that charges are properly used when I select an item from the menu,
Notice that it works properly if I only have one detergent.
washing

@Night-Pryanik
Copy link
Contributor

Something tells me that adding a new "DETERGENT" flag and checking for this flag is a more proper way than using an itemgroup.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Items / Item Actions / Item Qualities Items and how they work and interact labels Nov 23, 2019
@anothersimulacrum
Copy link
Member Author

Okay, changes made, using a flag now.
image

This commit is meant to add support for a later PR that adds the ability
to make shaved soap and use that for vehicle washing machines.
@anothersimulacrum anothersimulacrum force-pushed the veh-wash branch 2 times, most recently from 045517b to f0074b8 Compare November 24, 2019 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Items / Item Actions / Item Qualities Items and how they work and interact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants