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
Update to the latest #3
Merged
Merged
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
* Make fear_paralize act for 4 turns 400 is not necessarally 4 turns, make it 4 turns based on player speed.
Martial Arts Rebalance for Eskrima
* Flamethrower fuels and rebalancing * lint json * Update data/json/items/obsolete.json Co-Authored-By: anothersimulacrum <[email protected]> * Recipe tweaks Time spent was grossly exagerated, add cutting quality * Use correct apostrophe
* Refactor npctrade for clarity and flexibility - NPC method to check if NPCs `will_exchange_items_freely`. - NPC methods for `max_credit_extended` and `max_willing_to_owe`. - Renaming `p` to `np` in multiple places for clarity. - Renamed `u_get` to `your_balance`. You get no money from these trades atm, but NPCs remember debts and credit. - Helper variables for color formatting for improved clarity. - `npc_will_accept_trade` method to make it clear under what conditions a trade can occur. - `calc_npc_owes_you` to determine how much an NPC would owe you if the trade went ahead. - General tidying up. * Inform player of trade consequences and confirm - Avoids players accidentally trading; 'enter' gets used a lot for input quantities. - Tells the player know if they're going to not get full credit for the trade. - Tells the player if they could get some credit, but they're asking too much.
Delete the know_spell test so that magic items like one-time scrolls and magic crystals which use player's energy do not cause a debug message.
…-construction Added machetes to "cut grass" construction
…oad-time Correct pneumatic gun reload times
Fix lab turrets placed at wrong locations
Fix mission names not translated in npc dialogue and debug menu
Fix mission console names not translated
Fixed "Can't refill tank with a canning pot through the examine vehicle menu #33075"
* Initial version of UseNamedPointConstantsCheck This is intended to convert hand-rolled point constants like point( 0, 0 ) into point_zero. * Apply refactoring pass * Manual fixup of refactored code Add various manual tweaks to the automatically refactored code where I think it makes sense. * Remove some unnecessary initializations
…dows (#33105) * Automatically switch IME mode between text input and raw input on Windows * Auto disable IME when exiting from keybindings/character creation/world creation menus * Restore IME status instead of always disabling IME on return Also disable IME when showing popups, so the final query of many UIs use the correct IME mode. * Update comment * Add missing return value * Fix SDL_syswm include breaking linux builds
…earch I18n case insensitive search
* Allow computer data for individual tiles * Try to avoid overwriting existing consoles when placing new consoles * Handle submap rotation for computers * Read/write computer locations as a whole
Calling `game::remove_zombie` invalidates the monster reference given to it (the monster pointer is removed from the creature tracker). So giving it to the `overmap_buffer` afterwards is UB.
So they are still valid objects and can be accessed without UB. But this also marks them as dead, so code that continues to use the object will see that and will (hopefully) ignore them. This fixes a bug where monster would continue to move after falling down a z-level (and with z-levels disabled would despawn).
if the monster is not where it's supposed to be, search the whole map for it.
If z-levels are disabled (and this code is only reachable in that case), the map provides no information about stuff on other z-levels. `dest` is on another z-level, so querying the map for it is pointless.
* allow player to pick frozen liquids Players should be able to chip or crush ice or other frozen liquids and pick them up and keep them in their inventory as long as they're frozen
* Added mi-go scout with a fake gun and made it spawn
Fixes crash from monsters on ledge traps with z-level disabled.
Add missing security bot recipe
* Add get_weight() as a pure virtual method to Creature, turn the get_weight() methods in monster and Character into overrides. * Update vehicle collisions to use the actual weight of the target in question.
Enchanted recipes display correctly in ALL tab
Routine i18n updates on 16 Aug 2019
Reduce table recipe wood sawing req from 2 to 1
* Change translated string comparison operators of `class translation` to ordinary functions * Change current activity verb to current activity id in class npc * Fix activity verbs not translated in stop phrases * Update documents * Set activity id from activity for old save compatibility * Apply suggestions from review comments
This check looks for uses of shell functions (e.g. system, popen). We don't really care about that.
* Make some recipes use the 'weights' materials requirement * Remove bismuth from npc_misc item group * Move tin and solder to metal.json and make them consistent with other metals
Triage cert-env33-c
Fixed incorrect display of reload time for guns and magazines
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.
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
Purpose of change
Describe the solution
Describe alternatives you've considered
Additional context