-
Notifications
You must be signed in to change notification settings - Fork 277
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
refactor(content): JSONize Pumps #3633
Conversation
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.
//Note that these three functions are checked by pointer in map::water_from. Yes it's awful. | ||
void iexamine::water_source( player &, const tripoint &examp ) | ||
{ | ||
liquid_handler::handle_liquid( examp ); | ||
} | ||
|
||
//Note that these two functions are checked by pointer in map::water_from. Yes it's awful. | ||
//Note that these three functions are checked by pointer in map::water_from. Yes it's awful. | ||
void iexamine::clean_water_source( player &, const tripoint &examp ) | ||
{ | ||
liquid_handler::handle_liquid( examp ); | ||
} |
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.
since iexamine::liquid_source
can handle any liquid, it'd be great to be able to replace iexamine::water_source
and iexamine::clean_water_source
with it someday to cleanup more code.
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.
since
iexamine::liquid_source
can handle any liquid, it'd be great to be able to replaceiexamine::water_source
andiexamine::clean_water_source
with it someday to cleanup more code.
but wont it break the older mods which has its own water sources? these two old functions should last until 0.5 at least.
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.
we could soft deprecate them by
- making
furn_t::crafting_pseudo_item_types
call&iexamine::liquid_source
for bothwater_source
andclean_water_source
- convert existing
"examine_action": "water_source"
into"examine_action": "liquid_source"
5cab4a4
Summary
SUMMARY: Infrastructure "Make pumps give their own custom liquids in written json, instead of giving hardcoded water variants."
Purpose of change
Describe the solution
By adding a new examine action,
liquid_source
; furnitures are now able to dispense liquids specified in new json fieldprovides_liquids
.Describe alternatives you've considered
adding more hardcoded pump variety
Testing
used msys on win 10.
added beer pump item for debug purposes.
Additional context