Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest codes #7

Merged
merged 566 commits into from
Sep 12, 2019
Merged

Conversation

RedShakespeare
Copy link
Owner

Summary

Purpose of change

Describe the solution

Describe alternatives you've considered

Additional context

jbytheway and others added 30 commits September 3, 2019 16:25
* Reference books and spawns
5 portions of martini coming right up!
* Make light wheel mounts foldable

* Update wheel.json
* 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.
* Adds microlabs

Microlabs are small 4x4 labs that open only to the subway network. They dont have finales

* Allow opening depot doors

* Update data/json/mapgen/microlab/microlab_generic.json

Co-Authored-By: Matthew Taylor <[email protected]>

* Update data/json/mapgen/microlab/microlab_special_tiles.json

Co-Authored-By: Matthew Taylor <[email protected]>

* Adds surface connected microlab

* Slight mapgen adjustments, new monster spawn lists.
…olar backpacks (#33546)

* charge bionics from UPS via cable

* descriptions, fixes, astyle, cleanup

* p==nullptr check in cable processing

* Update src/item.cpp

Co-Authored-By: BevapDin <[email protected]>

* var naming convention unification, etc. for clang-tidy

* Apply suggestions from code review

Co-Authored-By: BevapDin <[email protected]>

* typo fix
Martial Arts Rebalance for Krav Maga
- bump gradle plugin version to 3.5.0;

- bump minimum Android API version to 21 (Android 5.0);

- added commented Java lint:deprecation flag;

- enable `arm64-v8a` ABI.
Night-Pryanik and others added 27 commits September 11, 2019 22:16
…d turns (#33948)

* Fix many items not lasting long enough since 1-second turns
Many items' turns_per_charge values weren't fixed for 1-second turns.
I went through and did research for each case and corrected them.

* Correct chainsaw & combat chainsaw turns_per_charge

Chainsaw was incorrectly using power_draw even though it uses gasoline.
Combat chainsaw 'turns_per_charge' and 'max_charges' values were
inconsistent with those of normal chainsaws.
Allow building with Clang using MinGW-w64 libs
Fixed Crash when butchering single animal.
* Prevent players from refilling a moving vehicle

* Update src/veh_interact.cpp

Add a period

Co-Authored-By: Anton Burmistrov <[email protected]>
* Add M240 CROWS II turret

* Spawn M240 turrets in outposts

* Update item names for turrets
@RedShakespeare RedShakespeare merged commit 616ecd1 into RedShakespeare:master Sep 12, 2019
RedShakespeare pushed a commit that referenced this pull request May 10, 2020
The function `are_requirements_nearby` accesses `player::backlog::front()`, which causes UB when the `backlog` list is empty.

This is usually checked by the caller, but there is at least one way to reach this function without that check:

```
#2  0x000000000083dfaa in string_id<activity_type>::operator== (rhs=..., this=0xdf1b460) at src/player_activity.h:93
#3  are_requirements_nearby (loot_spots=std::vector of length 21, capacity 32 = {...}, needed_things=..., p=..., activity_to_restore=..., in_loot_zones=true, src_loc=...)
    at src/activity_item_handling.cpp:1113
#4  0x0000000000843a46 in generic_multi_activity_check_requirement (p=..., act_id=..., act_info=..., src=..., src_loc=...,
    src_set=std::unordered_set with 1 element = {...}, check_only=false) at src/activity_item_handling.cpp:2676
#5  0x0000000000852813 in generic_multi_activity_handler (act=..., p=..., check_only=check_only@entry=false) at src/activity_item_handling.cpp:2885
#6  0x0000000000800896 in activity_handlers::multiple_butcher_do_turn (act=<optimized out>, p=<optimized out>) at src/activity_handlers.cpp:3822
#7  0x000000000082b248 in std::_Function_handler<void (player_activity*, player*), void (*)(player_activity*, player*)>::_M_invoke(std::_Any_data const&, player_activity*&&, player*&&) (__functor=..., __args#0=<optimized out>, __args#1=<optimized out>) at /usr/include/c++/8/bits/std_function.h:88
#8  0x00000000008630e3 in std::function<void (player_activity*, player*)>::operator()(player_activity*, player*) const (this=<optimized out>, __args#0=<optimized out>,
    __args#0@entry=0xdf1b330, __args#1=<optimized out>, __args#1@entry=0xdf1ae50) at /usr/include/c++/8/bits/std_function.h:260
#9  0x0000000000860306 in activity_type::call_do_turn (this=0x2c3c930, act=act@entry=0xdf1b330, p=p@entry=0xdf1ae50) at src/activity_type.cpp:118
#10 0x00000000014a968b in player_activity::do_turn (this=this@entry=0xdf1b330, p=...) at src/player_activity.cpp:237
#11 0x00000000013092a4 in npc::do_player_activity (this=this@entry=0xdf1ae50) at src/npcmove.cpp:3299
#12 0x0000000001322a07 in npc::execute_action (this=this@entry=0xdf1ae50, action=<optimized out>, action@entry=npc_player_activity) at src/npcmove.cpp:1237
#13 0x000000000132690a in npc::move (this=this@entry=0xdf1ae50) at src/npcmove.cpp:907
```

This adds a simple check within the function.
RedShakespeare pushed a commit that referenced this pull request May 19, 2020
Update furniture-graves.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.