forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merge conflicts #8
Merged
a-chancey
merged 78 commits into
a-chancey:TailoringRecipeOverhaul-Cotton
from
CleverRaven:master
Mar 22, 2022
Merged
Merge conflicts #8
a-chancey
merged 78 commits into
a-chancey:TailoringRecipeOverhaul-Cotton
from
CleverRaven:master
Mar 22, 2022
Conversation
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
Update aux_nested.json
Update emit.json
Also added ability to use oxytorch and hacksaw on open chainlink fence.
Resolves #56161 * Un-shadowed the following recipes, allowing them to be crafted: * armor_scrapsuit * armor_tiresuit * chem_hmtd * chem_nitric_acid * gambeson_vest * gambeson_vest_xs * k_gambeson_vest * k_gambeson_vest_xs * lc_chainmail_arms * pistol_stock * pot_copper * propane_cooker * thread (Spinning Wheel versions) * tshirt * xl_ch_chainmail_hood * xl_gambeson_vest * xl_hc_chainmail_hood * xl_k_gambeson_vest * xl_lc_chainmail_arms * xl_lc_chainmail_hood * xl_mc_chainmail_hood * xl_qt_chainmail_hood * xs_armor_lightplate
Cutting chainlink fence will now yield wires, not steel chunks
Update Magiclysm Mosin name to match other
Mosin-Nagant 91/30 Boreal → 1891/30 Boreal
Fix jackolantern → jack o'lantern
Routine i18n updates on 19 March 2022
Properly fix conflicting `uilist` keys
Tacoma - Convert buying logs to json
Fix missing appliance removal prompt
Tacoma grammar updates. Change knife spear to simple knife spear
Add id_suffix to shadowed recipes (#56161)
fix: extra sign in exoddi base
fix: don't validate empty summary descriptions
Co-Authored-By: TheShadowFerret <[email protected]>
Add comma to hi_q_shatter description
38 special → .38 Special
…-flags Update XL/XS items to use extend flags
…g-ammo Gunstore, Liquor Store, Fix
Zap Rattigan fixes
Co-authored-by: AtomicFox556 <[email protected]>
…t_spawn_monster()
Add Bōjutsu to mutation description
Fix mechanic recipes typos
Prevent potential null pointer dereferencing in talk_effect_fun_t::set_spawn_monster()
Fix book plurals + minor typos
Consistent Marloss/Mycus/Mycal case
Co-authored-by: haveric <[email protected]>
a-chancey
pushed a commit
that referenced
this pull request
Nov 29, 2023
* Prevents game occasionally seemingly hanging when moving to new submaps The reason for the previous problem was an infinite loop caused by: 1. `map::spawn_monsters_submap` for-loops the list of `current_submap->spawns` 2. for every spawned monster, it calls `monster::on_load` 3. `monster::on_load` calls `monster::try_reproduce`, which in turn calls `map::add_spawn` 4. So a new spawn is added, thus invalidating the iterator used in step 1 5. Undefined behavior caused by using invaliated iterators. On my compiler (gcc 13.2.0), the above problem had the following effect: * The reference `spawn_point &i` pointed to something totally different, so that in particular, `i.count` had garbage values * Instead of `i.count` being reasonable values such as `3` or `1`, the above undefined behavior made it have values such as `925969776` or `-632214304` * `i.count` is the upper bound for the inner for-loop in `map::spawn_monsters_submap`, so depending on the garbage value, it might seem like an infinite loop. Stacktrace of app when frozen and problem happened: ``` #0 0x000055a1eaf36dcb in creature_tracker::find(coords::coord_point<tripoint, (coords::origin)1, (coords::scale)0> const&) const () #1 0x000055a1eaf39253 in Creature* creature_tracker::creature_at<Creature>(coords::coord_point<tripoint, (coords::origin)1, (coords::scale)0> const&, bool) () #2 0x000055a1eaf393b5 in Creature* creature_tracker::creature_at<Creature>(tripoint const&, bool) () #3 0x000055a1eb357a53 in map::spawn_monsters_submap(tripoint const&, bool, bool)::{lambda(tripoint const&)#1}::operator()(tripoint const&) const () #4 0x000055a1eb3a976e in random_point(tripoint_range<tripoint> const&, std::function<bool (tripoint const&)> const&) () #5 0x000055a1eb37dd2d in map::spawn_monsters_submap(tripoint const&, bool, bool) () #6 0x000055a1eb37de77 in map::spawn_monsters(bool, bool) () #7 0x000055a1eb093981 in game::update_map(int&, int&, bool) () #8 0x000055a1eb094451 in game::update_map(Character&, bool) () #9 0x000055a1eb09530f in game::place_player(tripoint const&, bool) () #10 0x000055a1eb0b3a0e in game::walk_move(tripoint const&, bool, bool) () #11 0x000055a1ead27490 in avatar_action::move(avatar&, map&, tripoint const&) () #12 0x000055a1eb0f338c in game::do_regular_action(action_id&, avatar&, std::optional<tripoint> const&) () #13 0x000055a1eb0f6e63 in game::handle_action() () CleverRaven#14 0x000055a1eafbd9ea in do_turn() () CleverRaven#15 0x000055a1eaa5ec13 in main () ``` This commit instead changes the loop in step 1 above so that it explicitly *not* uses iterators, but instead old-fashioned indexed loop. The intention with the change is to allow other parts of the code to add items to the vector `current_submap->spawns` while we are iterating it here. If new items are added, they will be handled in later steps of the loop.
a-chancey
pushed a commit
that referenced
this pull request
Aug 6, 2024
Prevents segfault that could previously occur if the item being repaired was invalidated. The target item being repaired could get invalidated for various reasons, such as a follower moving it via zone sorting, the item could burn up in a fire, etc. Previous segfault that this commit attempts to prevent: ``` #0 0x0000555555ef9057 in item::is_null (this=this@entry=0x0) at src/item.cpp:943 #1 0x000055555602322c in repair_item_actor::can_repair_target (this=this@entry=0x555560003e80, pl=..., fix=..., print_msg=print_msg@entry=true, check_consumed_available=check_consumed_available@entry=true) at src/iuse_actor.cpp:2920 #2 0x00005555560243c2 in repair_item_actor::repair (this=this@entry=0x555560003e80, pl=..., tool=..., fix=..., refit_only=refit_only@entry=false) at src/iuse_actor.cpp:3106 #3 0x00005555559d5b55 in repair_item_finish (act=0x5555580cdf58, you=0x5555580cd890, no_menu=false) at src/activity_handlers.cpp:2477 #4 0x0000555555a00f52 in std::function<void (player_activity*, Character*)>::operator()(player_activity*, Character*) const (this=<optimized out>, __args#0=<optimized out>, __args#0@entry=0x5555580cdf58, __args#1=<optimized out>, __args#1@entry=0x5555580cd890) at /usr/include/c++/13/bits/std_function.h:591 #5 0x00005555559ff229 in activity_type::call_finish (this=<optimized out>, act=act@entry=0x5555580cdf58, you=you@entry=0x5555580cd890) at src/activity_type.cpp:168 #6 0x00005555564e368b in player_activity::do_turn (this=0x5555580cdf58, you=...) at src/player_activity.cpp:393 #7 0x0000555555cec856 in do_turn () at src/do_turn.cpp:532 #8 0x0000555555776e74 in main (argc=<optimized out>, argv=<optimized out>) at src/main.cpp:873 ``` Instead, this commit adds a message shown to the player if the target item is no longer valid for whatever reason.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Category "Brief description"
Purpose of change
Describe the solution
Describe alternatives you've considered
Testing
Additional context