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 up[RDY]Automatic fire refuelling #24077
Conversation
Coolthulhu
force-pushed the
Coolthulhu:fire-refuel
branch
Jun 24, 2018
This comment has been minimized.
This comment has been minimized.
|
Does this work with crafting that requires fire (e.g. cooking)? I know that it currently doesn't interrupt crafting if the fire goes out halfway through, but if this system works then it seems like it would be reasonable to change it so that it does. |
This comment has been minimized.
This comment has been minimized.
Currently all crafting triggers it, even if you don't need the light because you have other sources. |
This comment has been minimized.
This comment has been minimized.
|
Works great. Maybe up the fire/stockpile range from adjacent to crafting range? |
This comment has been minimized.
This comment has been minimized.
Yeah, would be better than hardcoded 1 range limit. @kevingranade any objections? The closest analogy I recall would be the vehicle crane thing, which is limited to 1 tile. |
This comment has been minimized.
This comment has been minimized.
|
If the player is free to move during the activity, then using crafting range is reasonable. I also don't anticipate perf issues for scanning since it only happens intermittently during crafting. |
Coolthulhu
changed the title
[CR]Automatic fire refuelling
[RDY]Automatic fire refuelling
Jun 28, 2018
This comment has been minimized.
This comment has been minimized.
|
Does "Jenkins, rebuild" re-trigger Travis too? |
This comment has been minimized.
This comment has been minimized.
|
It does not, you may be able to visit the travis page and restart the
failing build(s), but I'm unclear on permissions for that.
|
This comment has been minimized.
This comment has been minimized.
|
Nope. Requires developer privs |
This comment has been minimized.
This comment has been minimized.
|
I was able to restart this travis build. |
ZhilkinSerg
self-assigned this
Jun 30, 2018
ZhilkinSerg
reviewed
Jun 30, 2018
| @@ -96,6 +96,11 @@ std::string player_activity::get_str_value( size_t index, std::string def ) cons | |||
|
|
|||
| void player_activity::do_turn( player &p ) | |||
| { | |||
| // Should happen before activity or it may fail du to 0 moves | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I cannot do thorough testing right now, but works fine at first glance. |
ZhilkinSerg
assigned
ZhilkinSerg
and unassigned
ZhilkinSerg
Jun 30, 2018
kevingranade
approved these changes
Jul 7, 2018
|
I've merged this and tested it locally, but I seem to have forgotten the push it, so feel free to just resolve the conflict in item.h and push it. |
| best_fire = pt; | ||
| best_fire_age = fire_age; | ||
| } | ||
| // If a contained fire exists, ignore any other fires |
This comment has been minimized.
This comment has been minimized.
kevingranade
Jul 7, 2018
Member
This should find the best contained fire, instead it finds the first contained fire, I'm fine to leave it as a bugfix.
This comment has been minimized.
This comment has been minimized.
Coolthulhu
Jul 7, 2018
Author
Contributor
I forgot to change it after the range increase, though it's next to trivial.
I'll leave it as is for now since it's tested already. It's pretty unlikely that a player will have two contained fires anyway.
Coolthulhu
added some commits
Jun 24, 2018
Coolthulhu
force-pushed the
Coolthulhu:fire-refuel
branch
to
3bcce39
Jul 7, 2018
This comment has been minimized.
This comment has been minimized.
|
I'm not authorized because I'm not a part of CleverRaven at the moment. |
ZhilkinSerg
merged commit 47a80bc
into
CleverRaven:master
Jul 8, 2018
ZhilkinSerg
removed their assignment
Jul 8, 2018
kevingranade
referenced this pull request
Aug 17, 2018
Closed
Add a prompt to activate a light source in response to light-level crafting interrupt #23971
This comment has been minimized.
This comment has been minimized.
|
Does not work with charcoal. Maybe it has something to do with that charcoal stacks in form I would expect charcoal to be valid item for keeping the fire going. |
This comment has been minimized.
This comment has been minimized.
|
Oh and it is not clear how to stop refueling the fire as if you read by the window and the PC keeps throwing more and more wood into the fire. |
Coolthulhu commentedJun 24, 2018
Long requested feature that got more urgent ~recently, because I implemented a mechanic that makes dying fires more annoying.
Use case goes like this:
I successfully tested it in the following cases:
Additionally:
burn_data::chance_in_volume.units::volumeinstead of legacy cups[CR] because my C++ may be a bit rusty, and because of that weird designation thing.