-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added auto_hash and range_hash range_hash is a hash for using e.g. containers as keys in unordered_maps. auto_hash is a hash function that chooses automatically between std::hash and cata::tuple_hash depending on the hashed type. * Add event::data_type This is a typedef for the map type used to store the event data. Adding it because the underlying type seems likely to change in the future. * Add a simple stats_tracker that counts events * Add stats_tracker to game * Serialize stats_tracker * Add hp_part case for cata_variant * Add (and use) a character_takes_damage event * Add stats_tracker::total This sums the value of a particular field in events satisfying a criterion. * Replace lifetime_stats with stats_tracker Previously each player object contained some lifetime_stats about tiles moved, etc. Replace all that with the newly added stats_tracker functionality. One side-effect is that muscle-powered bionics now recharge at random intervals, rather than regularly, but should have the same average charge rates. * Some comments to help explain stats_tracker * Add std::hash specialization for event_type This is supposed to be in the standard library in C++14 but gcc 5.3 lacks it.
- Loading branch information
1 parent
79cdb87
commit 9df45a3
Showing
18 changed files
with
422 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.