Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upContained fires will burn through all its items continuously #21418
Conversation
AlecWhite
added some commits
Jul 14, 2017
Coolthulhu
reviewed
Jul 14, 2017
| if( bd.chance_in_volume == 0 || bd.chance_in_volume >= vol || | ||
| x_in_y( bd.chance_in_volume, vol ) ) { | ||
| // If fire is contained, burn all of it continously | ||
| if( !can_spread ) { |
This comment has been minimized.
This comment has been minimized.
Coolthulhu
Jul 14, 2017
Contributor
Merge that if with the one below, as in:
if( !can_spread || bd.chance_in_volume == 0 ||
Coolthulhu
reviewed
Jul 14, 2017
| @@ -354,7 +356,7 @@ class item : public JsonSerializer, public JsonDeserializer, public visitable<it | |||
| std::string info( bool showtext, std::vector<iteminfo> &dump ) const; | |||
|
|
|||
| /** Burns the item. Returns true if the item was destroyed. */ | |||
| bool burn( fire_data &bd ); | |||
| bool burn( fire_data &bd, bool can_spread = false ); | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
AlecWhite
Jul 14, 2017
•
Author
Contributor
Made can_spread optional because burn() is called for when the player enters a fire and burns its clothes.
Should I make a burn_clothes() that calls burn() with a bool?
This comment has been minimized.
This comment has been minimized.
Coolthulhu
Jul 14, 2017
Contributor
Just supply the correct argument there, don't default. burn(thing, false)
Though you also should change the argument from can_spread to something like contained. It would make it more informative and also cover the player burning example better.
BevapDin
reviewed
Jul 14, 2017
| @@ -21,6 +21,8 @@ | |||
| #include "debug.h" | |||
| #include "units.h" | |||
| #include "cata_utility.h" | |||
| #include "mapdata.h" | |||
| #include "map.h" | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Thank you SO much! I use the brazier almost exclusively at the start of the game. It will be great if I don't have to light the brazier every time I finish a recipe. Right now it seems like I need to light a fire 3-5 times before it consumes the fuel. |
AlecWhite commentedJul 14, 2017
•
edited
Making a fire in braziers/wooden stoves/anything with fire container flag, will fully burn all of its items continuously.
I found weird that you had to relight a log in a brazier, when in real life you would have make sure to light the log in such a way that it burns all of it.
This helps adding importance to wood cutting tools, and fire containers, as for now they were only used for a 1-2 turn between you light the fire and use it for crafting.
It adds further usefulness to tree cutting and tree cutting tools as it can be used as a source of light for reading/craft, etc, as it would do in real life.
Also thanks Coolthulhu for helping me to understand how fire works.