- a fetch takes only what its requirements lack, counted with what is already there
- a fetch that cannot bring or hold what the task needs ends the task
- fetch marks clear at task end and on pickup by a picker with no backlog or destination activity
* map/avatar bash return if they can smash
The skill/resistance are only used for this, so just simplify it.
* Use damage/hp for bashed objects
Add functions for bash data to generate damage/hp values, and use those
instead of directly querying str_{min,max}. This allows expanding how
furniture responds to damage in the future.
The bool arguments could be improved, but work well enough.
Sound shouldn't care about the supported/blocked strength, so just
ignore that, it won't be that different.
* Character/map bash respond to all damage types
Pass in a map of damage types and the amount, instead of just a strength
number.
Add a member to damage types that allows specifying how they convert
into bash damage. Right now, this is zero for all types but bash.
There are rough edges right now where this interacts with pathfinding
and monster bashing: those have a strength integer that they just
convert to {bash: strength}
For simplicity, keep a map::bash overload that takes integer strength,
and just converts it bash damage for the real bash function.
Special mention to the {{{}}} constructor, which is
pair{} -> initializer_list{pair{}} -> map{initializer_list{pair{}}}
* Monsters & pathfinding do bash by damage type
Instead of only bash damage.
This enables NPCs to properly pathfind based on their bash damage.
Enable specifying bash skill as more than just an amount of bash damage
for monsters. Not that anyone uses this in repo anyways. Update the
docs, including adding documentation for this feature.
* Allow specifying damage profile for bashing
Not everything will respond the same to attempting to break it in
different ways. Add infrastructure to allow specifying different
"profiles" for damage on bash data. Because there will be a fairly
limited set of these, and many objects will have the same, make a new
type for it, and just refer to it by id.
* Make bashing terrain/furniture deterministic
Because damage is stored, there's no reason to add a bunch of randomness
to this. Just directly apply damage, and update tests.
The "hp" for bash data can be updated to achieve the desired effect,
instead of rng.
* Add fireaxe test for bashing chances
Now that bashing can do multiple damage types, add a test case that uses
a weapon with a large non-bash damage component.
Because only bash is counted now, this doesn't look much different from
discarding the cut damage.
* Add bashing profile for wooden doors
As is seen in the famous documentary _The Shining_, fire axes are
relatively effective at breaking through doors. Add a bash profile that
favors cut damage, and apply it to wooden doors.
Adjust the tests to account for this.
* Use BFS to determine the shortest route to construct a certain terrain
* Unit test for blueprint requirement autocalc
* As IWYU said
* Clang tidy
* clang tidy 2
* clang tidy 3
* clang tidy 4
This work involved converting player_activity::placement to a
tripoint_abs_ms and then dealing with the fallout elsewhere.
For most activities, placement was already a global tripoint. In a few
cases it was a local tripoint, so conversions needed to be added at each
side.
In one case (ACT_START_ENGINE) it was a position relative to the avatar.
That's because the player might be starting the engine in a moving
vehicle, so using a fixed location isn't reliable. To support that use
case I added an additional relative_placement member to player_activity.
If and when ACT_START_ENGINE is migrated to activity_actor, that member
can be removed.
Also, added some documentation for the reality bubble coordinate system
and the conversion functions between global and local coordinates.
Continuing the effort to move the game towards type-safe points. The
last commit added coordinate systems relative to the reality bubble.
This origin gets the abbreviation bub, and four aliases point_bub_ms,
point_bub_sm, tripoint_bub_ms, and tripoint_bub_sm represent these
points.
As a starting point, I have converted all or most of the
construction-related code to these new point types. This started in
construction.cpp and I followed the compiler errors and continues to
port code so long as it seemed construction related.
One big change is that lots of the map functions are getting extra
overloads taking these new point types. During the period where we are
still porting code these overloads will exist in parallel with those
taking raw points. However, the long term plan is to remove the old
overloads, and I've marked each with a TODO comment to that effect.
I didn't discover any bugs in the process of these changes and there
should not be any behavioural changes.