* make projectile_attack void,
add targets_hit to dealt_projectile_attack, and
record hit data in it
* tweak BOUNCE
* Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* clang
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Use ammo_effect_str_id instead of std::string
* replace RECOVER_ flag with a new field
* Update json
* Update doc
* remove unused ammo_effect
* update mods
* fix ids for clang
---------
Co-authored-by: Fris0uman <fris0uman@users.noreply.github.com>
* New transparent plastics, material adjustments.
* Update iteminfo test in accordance with changes
* Update coverage test in accordance with new changes
* Fix stuff
* Fix
* Convert integer parsing test to use normal TEST_CASEs
* Rename test name too similar to another
* Test to enforce normalized test names
* Normalize TEST_CASE names (scripted)
It turns out that a lot of loading code depends on
the availability of certain damage types.
I see two ways to resolve this:
1) Juggle the loading order of JSON types so that damage
types always load first.
2) Add deferred processing for every type with inline
damage type definitions.
I went with option 2, which is better but still
not great since new code that loads damage/resistance
definitions would need to also call finalize_damage_map
in the finalizing stage. Option 1 would cause problems
for mods, especially because the load order would matter.
None of this can be done piecemeal, it has to all be ripped
out in one go unless we want commits that don't compile
on their own.
This clang-tidy check looks for potentially-expensive-to-copy value
parameters which are only used as const values.
If they are only used once, in an assignment or initialization, then
their use will be converted to std::move. This can save a copy in some
cases.
Otherwise, the parameter will be converted to a const reference, which
can also save a copy in some cases.
* Clear map before starting projectile tests
For whatever reason, there is a chance that a tile between the
shooter and the shootee is impassable (obstacle). This means that
in map::shoot(), the projectile damage is set to zero as it crosses
that point (see `src/map.cpp:3874`).
* Adjust CHECK to use Approx
Co-authored-by: Eric Pierce <wapcaplet88@gmail.com>
Our string_id constants were a mixture of temporaries, locals, and
globals. Pull them all out as globals, for consistency and efficiency.
The efficiency comes from the fact that each string_id instance caches
its respective int_id, and sharing one instance means that value need
not be recomputed.