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

Unhardcoded comfort, warmth and feet fire bonus values for furniture #27202

Merged

Conversation

Projects
None yet
3 participants
@ZhilkinSerg
Copy link
Contributor

commented Dec 20, 2018

Summary

SUMMARY: Infrastructure "Unhardcoded comfort, warmth and feet fire bonus values for furniture"

Purpose of change

Unhardcoded some data for furniture and moved it to json.

Describe the solution

Moved three new fields for furniture from code to json:

  • comfort;
  • floor_bedding_warmth;
  • bonus_fire_warmth_feet.
@mlangsdorf

This comment has been minimized.

Copy link
Contributor

commented Dec 20, 2018

Two suggestions:
comfort should really be a field, not a flag, because the f_sofa stuff is referenced again in player::base_comfort_value().
There should be a second field "bedding_warmth" that replaces the hardcoded logic in player::floor_bedding_warmth()

@ZhilkinSerg

This comment has been minimized.

Copy link
Contributor Author

commented Dec 20, 2018

I was thinking about warmth too, but didn't notice ids are being used in base_comfort_value.

I guess it is time to move comfort levels for furniture from enum to json.

enum class comfort_level {
    uncomfortable = -999,
    neutral = 0,
    slightly_comfortable = 3,
    comfortable = 5,
    very_comfortable = 10
};

@Fris0uman Fris0uman referenced this pull request Dec 20, 2018

Merged

Pillow fort #27204

@ZhilkinSerg ZhilkinSerg force-pushed the ZhilkinSerg:comfortable-furniture-flag branch from 0349046 to ebb9d5d Dec 20, 2018

@ZhilkinSerg ZhilkinSerg changed the title Implemented COMFORTABLE flag for furniture Unhardcoded comfort, warmth and feet fire bonus values for furniture Dec 20, 2018

@ZhilkinSerg ZhilkinSerg force-pushed the ZhilkinSerg:comfortable-furniture-flag branch from aa71c3a to 7c7ae95 Dec 20, 2018

@kevingranade kevingranade merged commit 45535a6 into CleverRaven:master Dec 21, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
gorgon-ghprb Build finished.
Details

@ZhilkinSerg ZhilkinSerg deleted the ZhilkinSerg:comfortable-furniture-flag branch Dec 21, 2018

Fris0uman added a commit to Fris0uman/Cataclysm-DDA that referenced this pull request Dec 21, 2018

@kevingranade

This comment has been minimized.

Copy link
Member

commented Dec 21, 2018

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/how-to-make-comfortable-furniture-terrain/18019/10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.