-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix some of the NPC attacking logic #49907
Conversation
@KorGgenT evaluate() results are close to what they were before but still need tweaking and adding other multipliers (like taking into account being surrounded when choosing weapons). If you feel the values are off or not in line with your original idea, feel free to pick this PR apart and take only the changes needed. |
I may be slightly confused, but it looks like the checks for |
@mlangsdorf those were added in the original PR here and working properly now that weights are favoring ranged weapons over throwing. The checks aren't present for throwing though. Should throwing be considered non-silent? |
// if you kill the creature, multiply the potential by this number | ||
const int kill_modifier = 2; | ||
const float kill_modifier = 1.5f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we switching to float math?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a change to use small multipliers to not boost the priority too much for targets/kill targets. This can be reverted.
@@ -105,8 +140,7 @@ void npc_attack_melee::use( npc &source, const tripoint &location ) const | |||
|
|||
tripoint_range<tripoint> npc_attack_melee::targetable_points( const npc &source ) const | |||
{ | |||
const int reach_range{ weapon.reach_range( source ) }; | |||
return get_map().points_in_radius( source.pos(), reach_range ); | |||
return get_map().points_in_radius( source.pos(), 8 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an npc can't technically target these points. explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's needed to let NPCs target monsters out of reach. Without checking those tiles NPCs will not even consider melee as an option for any targets that aren't in range and won't move towards enemies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moving toward enemies is in a different part of the code. this function is "the npc has already chosen to use melee, what are the targets?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't work that way though. As long as the NPC has any items it will decide throwing said items is the way to go and won't bother moving into melee range.
// Only aim if we aren't in risk of being hit | ||
// TODO: Get distance to closest enemy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these comments refer to something that needs to be in evaluate(), not use().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Evaluate won't really work for this though. Evaluate will give a target and preferred attack, but in some cases the NPC will choose to try and finish an enemy that isn't the closest and the NPC might get stuck trying to aim while being whacked by a nearby enemy constantly messing up the aim.
It has to be done here so the NPC tries to hipfire.
potential *= 0.95f; | ||
} | ||
|
||
// Prefer targets not directly next to you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? npcs still have to deal with those
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to reduce weights for closer targets so melee weapons can be a preferred choice for those targets even if the damage would be lower. Shooting point blank comes with issues as you can't aim properly.
throwable = throwable && !thrown_item.is_gun() && !thrown_item.is_armor() && | ||
!thrown_item.is_comestible() && !thrown_item.is_magazine() && !thrown_item.is_tool() && | ||
!thrown_item.is_unarmed_weapon(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems really wonky tbh. we really should have some better logic here that doesn't require you to check the item's type in code like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. Left a comment below so it can be addressed eventually.
@@ -77,8 +77,9 @@ class npc_attack_melee : public npc_attack | |||
class npc_attack_gun : public npc_attack | |||
{ | |||
const gun_mode gunmode; | |||
item &gun; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait, why? you get that from gunmode!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to make the gunmode member non-const but it still complained about const-ness whenever I tried to get the weapon with *gunmode. It seems to always choose the const version of the function over the non-const.
Co-authored-by: Curtis Merrill <[email protected]>
Co-authored-by: Curtis Merrill <[email protected]>
This pull request introduces 1 alert when merging 3641d95 into 4663683 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few thoughts.
src/npc_attack.cpp
Outdated
( source.closest_enemy_to_friendly_distance() - 1 ) * 2 ); | ||
const int distance_penalty = std::max( std::min( distance_to_me, | ||
source.closest_enemy_to_friendly_distance() ) - 3, 0 ); | ||
const float suitable_item_mult = thrown_item.has_flag( flag_NPC_THROWN ) ? 0.2f : -0.15f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a melee/true ranged weapon without flag_NPC_THROW, perhaps base this penalty on the weapon dps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first I tried to add a check to see if the weapon had higher dps when wielded than thrown but it didn't work out as expected. I eventually reduced the multiplier for items not flagged and it made the NPCs not throw weapons as often. I think cudgels are still thrown in some circunstamces but that's why the math still needs a lot of work.
It's mainly the logic when executing actions that I fixed but the math is just placeholder and random values that simply worked for my tests.
src/npc_attack.cpp
Outdated
const int distance_penalty = std::max( std::min( distance_to_me, | ||
source.closest_enemy_to_friendly_distance() ) - 3, 0 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const int distance_penalty = std::max( std::min( distance_to_me, | |
source.closest_enemy_to_friendly_distance() ) - 3, 0 ); | |
const int closest_enemy_dist = source.closest_enemy_to_friendly_distance(); | |
int distance_penalty = std::abs( distance_to_me - 3) ; | |
// Ideally, the 3 in the above should be adjusted for reach weapons, etc | |
if ( closest_enemy_dist < distance_penalty + 2 ) { // not sure exactly how to adjust distance_penalty here | |
distance_penalty = std::min( distance_penalty, std::abs( closest_enemy_dist - 1 ) * 2 ); | |
} |
This will need considerable formatting! It penalizes throwing when something is close enough that melee should be preferred, or when throwing too close to a friendly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add this change along with one of KorGgenT suggestions when I have access to my environment to test it, it will be in a few hours. The math still is a placeholder and will need more tweaking in a new PR. Hopefully from somene that can work it out as right now the modifiers for each kind of attack are inconsistent.
} | ||
|
||
// Prefer targets not directly next to you | ||
potential *= distance_to_me > 2 ? 1.15f : 0.85f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps the 2 should be adjusted (increased?) for reach weapons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The multiplier here is simply trying to get the NPC to pick a melee weapon (if a decent one is available) when in close range by lowering the potential for this weapon as ranged weapons usually have a much higher damage value. I don't recall seeing any enemies with reach attacks but if there are any, it won't really matter that much.
The weights need work but the main goal was to fix the logic issues that led to NPCs throwing all their inventories, throwing errors and not being able to chase targets in melee.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. (There are monsters with reach special attacks, BTW.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably not the best way to deal with nearby targets anyway. I think a new PR to balance/tweak weights and add some checks that are missing is in order.
I think I addressed every review comment, the UI doesn't make it easy so if I missed something let me know. Same if you feel something isn't clear. I think this PR is ready for merge if no one has objections. Tweaking the weights is definitely needed but I think that should be done in a new PR as the more pressing issue is trying to leave experimental in a playable state. Trying to do everything in this PR can extend indefinitely and will delay the fix. Fine tuning weights can wait and needs further discussion as right now the attacks and weapons are tested independently without any context of other possible attack methods, making it hard to find a way to make NPCs make sensible choices. Tests have to be updated to reflect the new weights/evaluations when the evaluation functions are stable. There is also the matter of throwing explosives that I didn't really test and the lack of support for some NPC flags. I repeated some of my tests right now and everything seems to be working so far. One of the tests that showed multiple issues before was letting the barred zombies in a refugee center out and watching the guard NPCs go crazy. I tried that again and they got rid of the zombies as usual without any apparent issues. Also tested again with a single NPC and he used his ranged weapon until he broke an arm and couldn't wield it. Then he switched to melee and eventually died as a hero. |
My understanding is that this PR isn't a perfect solution; Perhaps as a stopgap there can be a combat setting for NPCs to not consider throwing at all? I.e. |
As per @mlangsdorf 's suggestion I added a check to prevent throwing items (unless it's an active explosive) if ranged attacks are disallowed. A separate flag can be added if needed though. |
I think at least some of the tests can be changed to requiring a specific ordering of result values instead of requiring specific result values - if the question is whether the code is working for doing a melee weapon at melee range, don't check its numeric evaluation, check to make sure it's better than a gun/thrown weapon/etc. |
Reworked tests to reflect scenarios and outcomes instead of testing specific return values. More tests scenarios will have to be added and evaluation functions updated accordingly (TDD). If all checks pass this should be ready to merge. There are some behavior issues still but the NPCs should at least defend themselves. Tweaking will come from playtesting and new tests. |
Wishful thinking: If it passess all checks again without any random failures it should be good to go. EDIT: Yeah, it didn't happen. Errors are unrelated to the PR so still good to go. |
Something wrong re |
Co-authored-by: anothersimulacrum <[email protected]>
@GoLoT how is this doing? Is it about ready? |
I think @kevingranade wanted to take a look at it but the ASan issues kept him busy. Unless someone finds a specific issue that prevents merging, I consider it ready. There are issues that I have more or less pin-pointed but I didn't want to extend this PR. I'll work on those in separate PRs when this is merged while I test everything on my current experimental run. |
commit 0f035143f3d0a23072dfb2778fdcf0ad180d579f Merge: 2b9d8f50b8 1bccf96ba7 Author: Angela Graves <[email protected]> Date: Wed Jul 28 00:50:53 2021 -0500 Merge pull request #50268 from Maleclypse/Fix-polycarbonate-sheets Fix polycarbonate sheets spawns commit 1bccf96ba7a8bb09f55665d6b2cbe6cdb19dd5f0 Author: Maleclypse <[email protected]> Date: Tue Jul 27 20:09:26 2021 -0500 Update plastic.json commit 1de8601a58a8e1ab0e676e232f59ea8a6469e97c Author: Maleclypse <[email protected]> Date: Tue Jul 27 19:43:39 2021 -0500 Fixing polycarbonate spawns commit 2b9d8f50b87b8581ee3841ecda15946d7c660d48 Merge: cd73ed43d5 67081bfbfb Author: Angela Graves <[email protected]> Date: Tue Jul 27 08:47:35 2021 -0500 Merge pull request #50204 from Maleclypse/Make-Libraries-post-apocalyptic Vandalized Library Variants commit cd73ed43d5fedd02f0f94914ca88f2f0ab61362c Author: Álvaro <[email protected]> Date: Tue Jul 27 01:25:31 2021 +0200 Fix some of the NPC attacking logic (#49907) * Fixes to NPC attack logic * astyle * Remove commented code * Initialization list order * Make -Werror happy * Fix test compilation * astyle again * Make clang-tidy happier, I hope * Add use_guns check for throwing items * Update src/npc_attack.cpp Co-authored-by: Curtis Merrill <[email protected]> * Update src/npc_attack.cpp Co-authored-by: Curtis Merrill <[email protected]> * Changes from reviews/suggestions * astyle again * Add enemy_distance_to_ally() helper function * Reworked tests and minor changes * Clang-tidy & JSON linting * Removed commented code * Change SCENARIO to TEST_CASE so clang-tidy is happy * Update src/npc_attack.cpp Co-authored-by: anothersimulacrum <[email protected]> * remove commented code Co-authored-by: Curtis Merrill <[email protected]> Co-authored-by: anothersimulacrum <[email protected]> commit 57d7a2a0c70b1591405012c0f966298aa67f6910 Merge: 9a29f77b8f 807a018311 Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 02:11:05 2021 +0300 Merge pull request #50246 from CleverRaven/fix-pot-helmet-copy-from Fix copy-from issues commit 807a018311002e947701a2063fd6fbe91dd84520 Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 01:54:19 2021 +0300 Fix copy-from issues commit 9a29f77b8f6f31b9fb6fc135d1b794990a44af93 Author: Rail-Runner <[email protected]> Date: Tue Jul 27 01:49:14 2021 +0300 Add willowbark tea (#45756) Co-authored-by: Maleclypse <[email protected]> Co-authored-by: actual-nh <[email protected]> commit f82ad2cc125a370e84baa826b65be1116e41fa60 Author: occulti <[email protected]> Date: Mon Jul 26 23:48:44 2021 +0100 Add wool yarn recipe (#48959) (#50196) commit a4c82a980414b0ff1870996658d123cf1a1dabdd Author: occulti <[email protected]> Date: Mon Jul 26 23:48:34 2021 +0100 Added qualities of a canning pot to XL Pot Helmet (#49457) (#50193) Co-authored-by: actual-nh <[email protected]> commit df5b8b9c569812d7289e33fb982b1ec44defd68c Merge: 30d5d6e171 3a43b23a6c Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 01:47:53 2021 +0300 Merge pull request #50244 from casswedson/revert-P-option Revert "use -P 0 option in JSON style check" commit 30d5d6e1718e0a8d5c28fd8eb64af189d979b98c Merge: cb41c676be b406093ea9 Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 01:39:51 2021 +0300 Merge pull request #49993 from kevingranade/size-aware-fragments Make bomb fragment strikes size-aware commit cb41c676bef2b321f125ffbb597d9408b6ae2a05 Merge: e62c2d3e3e a783a91a19 Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 01:37:26 2021 +0300 Merge pull request #50185 from Qrox/crafting Improve recalculation of crafting gui commit e62c2d3e3e81930a875ee7c1df45d9255138751e Merge: 2a4c94fc20 8ea14210f2 Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 01:37:03 2021 +0300 Merge pull request #50209 from Qrox/zoom Fix main UI resizing when exiting from overmap with the same zoom level commit 2a4c94fc20d6fc34502e3a29a95cbe8235e76b29 Author: LyleSY <[email protected]> Date: Mon Jul 26 18:36:28 2021 -0400 [DinoMod] wilderness spawn counts and fixes (#50184) commit e5f6a659429711b90cb576bcddb81190a02fa7b7 Author: LyleSY <[email protected]> Date: Mon Jul 26 18:35:53 2021 -0400 [DinoMod] DinoLab and dino armor (#49585) commit fb83100639f4941cb2cf10ecc2a5af3ddd839635 Merge: 8b2007aee7 831e0d127d Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 01:35:20 2021 +0300 Merge pull request #50216 from definitelynotklip/ascii_tiles ASCII tileset QoL changes commit 8b2007aee73853bcff782fdde748e5cb42b48287 Merge: 895636fff5 983666bdb0 Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 01:34:28 2021 +0300 Merge pull request #50229 from anothersimulacrum/TILES Add gun variant support to tilesets commit 895636fff58f66fc429d829857036983db1d5569 Merge: 04252ad859 06bc238de3 Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 01:34:08 2021 +0300 Merge pull request #50228 from anothersimulacrum/stricter-RLE Do not check gun variant option for RLE commit 04252ad859305748adf03fa8361ecbf4ed423df5 Merge: 6977219c14 b41ce5f9a8 Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 01:33:44 2021 +0300 Merge pull request #50235 from anothersimulacrum/optional-non-type Fix loading spell field type loading for copy-from commit 6977219c14502f8bf617dd870fdb31fa7fe97d77 Merge: abca2d74d8 29fca4e6c9 Author: Zhilkin Serg <[email protected]> Date: Tue Jul 27 01:30:03 2021 +0300 Merge pull request #50243 from LaVeyanFiend/BoxingTrait Add Boxing to Self-Defense Classes commit abca2d74d8e54a7a60e5845fa498f5783b473211 Author: curstwist <[email protected]> Date: Mon Jul 26 18:29:42 2021 -0400 add special entry for modular lab (#50241) commit 3a43b23a6c40e3c5a4aac6f0bcc9af8528fad6fa Author: casswedson <[email protected]> Date: Mon Jul 26 17:14:37 2021 -0500 Revert "use -P 0 option in JSON style check" commit 30468cc66fa70ec2da91af147d164517c425f8da Author: SpasmodicReveler <[email protected]> Date: Mon Jul 26 17:06:43 2021 -0500 Added "Gore Longitude", fiction book inspired by "Blood Meridian" (#49908) * Added "Gore Longitude", fiction book inspired by "Blood Meridian" * Update data/json/items/book/misc.json Co-authored-by: ToxiClay <[email protected]> Co-authored-by: Chuck <[email protected]> Co-authored-by: ToxiClay <[email protected]> commit 29fca4e6c95abc242f54363d9ee19382c7474075 Author: LaVeyanFiend <[email protected]> Date: Mon Jul 26 17:29:47 2021 -0400 Add Boxing to Self-Defense Classes commit b41ce5f9a802ac803198c06525b4d0f9d58cd9b5 Author: anothersimulacrum <[email protected]> Date: Mon Jul 26 09:48:59 2021 -0700 Fix loading spell field type loading for copy-from We should have some sort of check for this. commit bb8afbae67e2a81455c3b8c516f7ef86812f96bb Author: klip <[email protected]> Date: Mon Jul 26 18:24:32 2021 +0300 Add placeable Washing Machine item (#50038) * Add placeable Washing Machine * Update generic.json * lint * Linting for recipe_deconstruction.json Co-authored-by: I-am-Erk <[email protected]> commit 1373a284ceb8a8a5a01dec1e4ab18310ce9b2c41 Author: klip <[email protected]> Date: Mon Jul 26 18:22:39 2021 +0300 Added placeable Water Heater (#50164) commit 63f2059ed0a0ddcc92057595697406b06d16160e Author: curstwist <[email protected]> Date: Mon Jul 26 11:21:17 2021 -0400 lab modular residential areas (#50189) * lab modular residential areas * Update lab_nested_maintenance.json add missing nests. * Update lab_shared_traps.json benign true. * revert change to traps commit bff50c448687d8ddf607c4bf7f269ac3d5b745af Author: curstwist <[email protected]> Date: Mon Jul 26 11:20:46 2021 -0400 lab maintenance modular areas (#50192) * lab maintenance modular areas * typo fix commit 49f349327fff8091226e65c1728c7f9101401f82 Author: curstwist <[email protected]> Date: Mon Jul 26 11:20:30 2021 -0400 add mutagen lab module (#50191) * add mutagen lab module * Update overmap_terrain_lab.json lint * more lint * Apply suggestions from code review Co-authored-by: actual-nh <[email protected]> Co-authored-by: actual-nh <[email protected]> commit ef8975e7a0992435cddf0a59ff1120c02bbb1727 Author: Broken27 <[email protected]> Date: Mon Jul 26 17:19:33 2021 +0200 Added pineaple to veggy pizza recipe. (#50233) Some people have terrible taste, and the game should have recipes for them. commit 8bf16a41edb66df389573c4ff0416a8e76585e52 Merge: 394bf82205 e8693004cd Author: Angela Graves <[email protected]> Date: Mon Jul 26 04:21:45 2021 -0500 Merge pull request #50230 from DevianProdigy/bondage-mask-layer Bondage mask layer mismatch commit 394bf8220591efec846bd0a6b53245bbe55d31a5 Author: Fris0uman <[email protected]> Date: Mon Jul 26 07:59:39 2021 +0200 Fix layer ordering of demon skin (#50222) commit 21167b784a737727be333b140e4e23958ac7cf8d Author: Fris0uman <[email protected]> Date: Mon Jul 26 07:59:25 2021 +0200 Remove obsolete Chibi Ultica mod (#50223) commit e8693004cd458cd8366f3a2380ffdf17ad83624c Author: DevianProdigy <[email protected]> Date: Sun Jul 25 23:47:37 2021 -0500 Update masks.json commit 983666bdb0d7422fa1b36194063baf8e9110c50f Author: anothersimulacrum <[email protected]> Date: Sun Jul 25 17:21:22 2021 -0700 Add gun variant support to tilesets Add a new string argument to relevant places, and walk it through all the various places these functions are called. commit 06bc238de363bda96b5af400b1236b20be55be3d Author: anothersimulacrum <[email protected]> Date: Sun Jul 25 17:25:26 2021 -0700 Do not check gun variant option for RLE Duplicate the check from stacks_with, except don't check the option. This prevents the game from obliterating variant data on save/load when the option is off. I don't like how this function just returns stacks_with at the end, but I don't know a better solution. commit 831e0d127d51178805950a78fa5f48303880ec06 Author: KliPeH <[email protected]> Date: Sun Jul 25 19:29:58 2021 +0300 ASCII Changes commit ebb21f38fa5625a551d786e82b2c6464b76921a1 Merge: f2e9ad53bf 6ee3f100d5 Author: Angela Graves <[email protected]> Date: Sun Jul 25 02:40:27 2021 -0500 Merge pull request #49855 from LaVeyanFiend/YuleNerf Change Yule Cat harvest to mutant mammal commit 8ea14210f2b78874ab3a89c8aa2ca3cbf0b7f06d Author: Qrox <[email protected]> Date: Sun Jul 25 15:01:21 2021 +0800 Fix main UI resizing when exiting from overmap with the same zoom level commit 67081bfbfbac1822962e198976fe2b20c83873ec Author: Maleclypse <[email protected]> Date: Sat Jul 24 21:33:06 2021 -0500 set bash and palette fix commit f2e9ad53bf74980e9cff1ec8fe258cb258fca053 Author: AngryFerret <[email protected]> Date: Sat Jul 24 20:27:47 2021 -0400 Add bow forms to Wildborne Rider (#50197) commit 16b3a11753250933648cc8d47531bfc1a173bd9e Author: Maleclypse <[email protected]> Date: Sat Jul 24 19:23:05 2021 -0500 Vandalized Library Variants commit f1b6e7de7f35eb2ed5f6ee017ed89b9d6d17f339 Author: Fris0uman <[email protected]> Date: Sat Jul 24 11:15:13 2021 +0200 Update Tilesets 21-07-24 (#50186) * Update Chibi Ultica * Update Ultica * Update MSX commit 9817d9af6d01a916e49483758f3cae3c01218d2d Merge: 6d50c8d5af 2976555909 Author: Zhilkin Serg <[email protected]> Date: Sat Jul 24 12:14:50 2021 +0300 Merge pull request #50187 from BrettDong/lint-json Reformat JSON commit 297655590926023fc074f192379dc6e2a652f017 Author: Binrui Dong <[email protected]> Date: Sat Jul 24 16:45:14 2021 +0800 Reformat JSON commit 6d50c8d5af486c4003dde035c4b2ea1c87ea2f85 Merge: 5cc8975fc7 b4c6a63e64 Author: Fris0uman <[email protected]> Date: Sat Jul 24 10:19:12 2021 +0200 Merge pull request #49942 from GoLoT/fix_cbm_battery_refueling Fix Battery System CBM refueling commit 5cc8975fc766f500e09bd830401506d418ac8172 Merge: 8a61cdf01d f9cbdad2a1 Author: Angela Graves <[email protected]> Date: Sat Jul 24 03:13:37 2021 -0500 Merge pull request #50132 from guralub/master Fix armor pen from martial arts buffs not working commit 8a61cdf01dfa69282a48e2ae4bcc3f10d9e62cbc Merge: 51d7dc050c c588d56891 Author: Zhilkin Serg <[email protected]> Date: Sat Jul 24 11:12:40 2021 +0300 Merge pull request #50183 from CleverRaven/i18n Routine i18n updates on 24 July 2021 commit 51d7dc050ce73da47802208a429e3e439d707328 Merge: 674ab947f4 55e2609032 Author: Zhilkin Serg <[email protected]> Date: Sat Jul 24 11:12:28 2021 +0300 Merge pull request #50180 from ralreegorganon/fix-multitile-variations Fix multitile variations commit 674ab947f497e55edbd5b8e29cd10486e101882a Author: angryisosceles <[email protected]> Date: Sat Jul 24 01:10:49 2021 -0700 Added "new-age" books + abstract (#49998) commit 6c93508226012c075fb44458655094518048e3b3 Author: MoonClipper <[email protected]> Date: Sat Jul 24 01:10:14 2021 -0700 Added lake vehicle group (#50012) commit 74b160e25dd9a0adf44383274d6ae4f94f7ff3f6 Merge: 63b1597e1e d9a15c9321 Author: Zhilkin Serg <[email protected]> Date: Sat Jul 24 11:07:57 2021 +0300 Merge pull request #49971 from anothersimulacrum/location-dependent-cards Allow cardreaders to require cards be spawned nearby commit 63b1597e1e8c30c84dcc20af2604be423743dd20 Merge: ab0bc95a31 5833926fbf Author: Zhilkin Serg <[email protected]> Date: Sat Jul 24 11:07:16 2021 +0300 Merge pull request #50142 from anothersimulacrum/variant-script Add script to get gun stats commit ab0bc95a3195dfdb69a8821bc06a480871749028 Merge: b4ace10657 0301aee390 Author: Zhilkin Serg <[email protected]> Date: Sat Jul 24 11:05:34 2021 +0300 Merge pull request #50134 from occulti/SheepWoolFix Modified mass ratio of sheep wool on harvest to give similar to shearing returns (#48962) commit b4ace10657550f087ef3dfa0a6c58b64c4965a8f Author: Maleclypse <[email protected]> Date: Sat Jul 24 03:05:08 2021 -0500 [Aftershock] Night messages (#50146) commit 1636e0ca898ce29e003ebec79e6ec46cfdbfdb41 Merge: 0449216655 bc9e33da3f Author: Zhilkin Serg <[email protected]> Date: Sat Jul 24 11:04:22 2021 +0300 Merge pull request #50156 from curstwist/add-lab-maps Add modular lab health clinic commit 0449216655d44e94f6dbc0c8655966a6e87e2c71 Merge: c1bde37c1d 1f5c7f8119 Author: Zhilkin Serg <[email protected]> Date: Sat Jul 24 11:03:49 2021 +0300 Merge pull request #50182 from ralreegorganon/fix-wind Fix wind not updating commit a783a91a1929a779890a68f7979192cf8436da86 Author: Qrox <[email protected]> Date: Sat Jul 24 15:05:22 2021 +0800 Improve recalculation of crafting gui commit c588d56891bf19bb99ef4aa930156388cafc0f9a Author: Brett Dong (BOT) <[email protected]> Date: Sat Jul 24 03:02:15 2021 +0000 Routine i18n updates on 24 July 2021 commit 1f5c7f8119943023bad3ee2caf0f056ec0f33907 Author: Jason Jones <[email protected]> Date: Fri Jul 23 17:40:03 2021 -0800 Fix wind not updating Wind was not updating after some previous refactoring. It could be overridden but was otherwise static. This change makes it so that wind is now being updated when the weather updates. It also makes the debug options for wind behave in a more predictable manner: overriding the wind and clearing the wind override both cause the weather system to tick and update. I did notice that the overridden wind settings are NOT used when evaluating the weather conditions. I could make an argument either way, but changing it is out of scope anyway. commit c1bde37c1dd2cabd179fc2ec2ebd93d57e060e94 Author: LyleSY <[email protected]> Date: Fri Jul 23 21:28:54 2021 -0400 [DinoMod] new NPC dialogue (#50166) commit 55e26090321bf31c775fcc01706cbd1963024070 Author: Jason Jones <[email protected]> Date: Fri Jul 23 16:52:43 2021 -0800 Fix multitile variations The code was in place to load tile variations for a multitile and use them for all additional_tiles entries, but the functionality isn't currently in use and I'm pretty sure it bitrotted to a non-functional state where it just displays black tiles. commit db572453d617e5cc72489405f59abd4a98f113f4 Author: Maleclypse <[email protected]> Date: Fri Jul 23 19:44:29 2021 -0500 Add permeable flag to appropriate windows (#50170) * Open windows permeable commit 0c3fd3529010321e2884b5c2f3609ee5dc7f6a51 Author: anothersimulacrum <[email protected]> Date: Fri Jul 23 17:43:18 2021 -0700 Remove spell type manual id loading (#50169) generic_factory handles this, and so doing it again makes it so spells don't support abstracts. commit 6659ee8ecaef8cb166a5068eeced3c7156cbe477 Author: occulti <[email protected]> Date: Sat Jul 24 01:35:25 2021 +0100 Added condom to item restriction on travel wallet (#49932) (#50165) commit 5dfcf4d8b68296371ebca1c2f839e2d40b05c0f5 Author: Jianxiang Wang (王健翔) <[email protected]> Date: Sat Jul 24 08:35:04 2021 +0800 Fix book color when asking NPC to read (#50162) commit 602eb7f04f65fe2388e07a364c085e4579a3e05f Author: ToxiClay <[email protected]> Date: Fri Jul 23 20:34:40 2021 -0400 Adds NUTRIENT_OVERRIDE flag to bleach (#50161) commit 72ea1892710bd64fd17b815b6149689c1b4c6d51 Author: curstwist <[email protected]> Date: Fri Jul 23 20:34:05 2021 -0400 add cargo and central lab areas (#50160) * add cargo and central lab areas * Create lab_shared_traps.json commit 5a228790ac2b0be6f7676f419af089e6a58644ff Author: LyleSY <[email protected]> Date: Fri Jul 23 20:33:01 2021 -0400 count, comment, and clean wilderness spawns (#50159) * count and clean Forest spawns * finish counting commit b4c6a63e64ac0d971a9f6759963b3e7bf89a0644 Author: Álvaro Muñoz <[email protected]> Date: Sat Jul 24 00:28:15 2021 +0200 Prevent fuel container deletion on CBM refueling commit bb0d2426ba0d8d29e917a4ce4451eec886c72d63 Author: John Bytheway <[email protected]> Date: Fri Jul 23 16:36:30 2021 -0400 Minimize clang-tidy CI runtime (#50131) clang-tidy is one of our slowest CI jobs. It would be nice if it were faster. When only cpp files are changed, we can limit the checks to just those files. When a header or build file is changed, or a new check is added, we need to recheck everything. To make this work, update the logic in build.sh which previously prioritised changed files. Make it now only check changed files, provided that's appropriate. Also, make files_changed work correctly on GitHub, at least for PR jobs. It will simply fail on non-PR jobs. commit af75eb4b757ff7dc41bcf3401d2ba32d68bb3cb9 Author: LyleSY <[email protected]> Date: Fri Jul 23 14:10:54 2021 -0400 medical regenerating zombies (#50105) * medical regenerating zombies * regenerating zombie medic * GROUP_MEDICAL_CRAWLER_UPGRADE * use GROUP_MEDICAL_CRAWLER_UPGRADE * blue commit f9cbdad2a120f55bcbaf9a07f878f0f95118cbdf Merge: 7feebc65ff bb34304739 Author: guralub <[email protected]> Date: Fri Jul 23 14:09:56 2021 -0300 Merge branch 'CleverRaven:master' into master commit d9a15c93210362af42ac7bd476d16fc79e7bfef1 Author: anothersimulacrum <[email protected]> Date: Fri Jul 23 07:43:11 2021 -0700 Make cards from #50033 location-dependent commit 4c9bce0ad8066ac7c6fa8ed4a7efe0c288576d67 Author: anothersimulacrum <[email protected]> Date: Sun Jul 18 10:07:52 2021 -0700 Improve location-dependent card naming Put cards into 4 buckets, based on distance to the player. Name and stack them based on that. The particular distances could probably use adjustment. commit 6c967f5000e8fd062c0ba04e1b9d341b37f2e753 Author: anothersimulacrum <[email protected]> Date: Thu Jul 15 13:39:33 2021 -0700 Allow cardreaders to require cards spawned nearby Add a flag to track the OMT spawn location of arbitrary items. Rewrite the the cardreader actor consuming behavior to care about individual items, now that we're selecting based on an item attribute, instead of an itype attribute. commit bc9e33da3fe33757b1342746ffda8fdbf2e7c109 Author: curstwist <[email protected]> Date: Fri Jul 23 08:18:37 2021 -0400 lab_health_clinic regular medical clinic for a lab. commit bb34304739c30970e56a02790cb4441439eb9d8c Merge: d70fed3b67 87a6eb45af Author: Kevin Granade <[email protected]> Date: Fri Jul 23 00:31:55 2021 -0700 Merge pull request #49857 from Ramza13/morale_json Add morale and focus functions commit d70fed3b6700588f8eb777af8a183b92c31990da Merge: f547618533 04cd8496cb Author: Angela Graves <[email protected]> Date: Fri Jul 23 02:25:29 2021 -0500 Merge pull request #50144 from cheekygoblin/keffiyeh_fix change keffiyeh to cover head and use collar for mouth coverage commit f5476185330e35a7c78cf281ed7baeef5a708c95 Merge: cb7f752f62 bde0e85aaf Author: Kevin Granade <[email protected]> Date: Thu Jul 22 23:19:15 2021 -0700 Merge pull request #50147 from kevingranade/fix-erroneous-skipping Fix erroneous skipping commit bde0e85aafb2e64a34344fe9accb6142730f177f Author: Kevin Granade <[email protected]> Date: Thu Jul 22 22:44:03 2021 -0700 Remove references to dead branch commit 86caadf7cee446fbcebecbe24e7626954702048b Author: Kevin Granade <[email protected]> Date: Thu Jul 22 22:43:46 2021 -0700 Don't do concurrent_skipping on PRs commit cb7f752f6289472fc55793256d3e129d716bf7f0 Author: Venera3 <[email protected]> Date: Fri Jul 23 07:24:00 2021 +0200 Underground Upgrades 1: Unhardcode sewer monsters, add upper/lower/city subway monster groups (#48772) Lab tunnels, city subway group spawn * Chud/Zombie stuff * Sewer, Lab subway Less migo/sludge, more hunter, frogs * Scary labs Mutant cooperation, mondensity is a lie * Faction/lab subway Mi-Go and nether broke up, lab tunnels got a bit less busy commit 113e1c13b5332e216904a924d07b09215586a5c7 Merge: 6c3bf41e04 3e438b199f Author: Kevin Granade <[email protected]> Date: Thu Jul 22 22:22:11 2021 -0700 Merge pull request #50136 from kevingranade/backport-include-pruning Backport include pruning commit 3e438b199f0ad810f2e1fdb64e3a9f72ff5ed494 Author: Kevin Granade <[email protected]> Date: Thu Jul 22 22:11:37 2021 -0700 Update src/faction_camp.h commit 6c3bf41e04bcfa52f9ad30c327514b7466bd6da9 Author: ti360gh <[email protected]> Date: Fri Jul 23 13:15:07 2021 +0900 Assign gender-appropriate names to NPCs created by place_npcs. (#50108) commit 35fbdc7e62ac4e130fa913f649bb5074f7a0e983 Author: Paul Fenwick <[email protected]> Date: Thu Jul 22 21:12:07 2021 -0700 Replace has_skill_for_vehicle_work with meets_skill_requirements (#50075) There's no need for a static helper function when the Character class already has a method for doing this. commit 2464d72eb70e5a8e8bc8afb47d58526d8273d8e1 Author: Paul Fenwick <[email protected]> Date: Thu Jul 22 21:11:28 2021 -0700 Check skill requirements for vehicle most_repairable_part (#50074) commit 9b3ed93e6da7e2eb179fdf8eb1c49e2f1c82e977 Author: Broken27 <[email protected]> Date: Fri Jul 23 06:10:31 2021 +0200 Updated the bionic weapons to the new to-hit standard. (#50060) * Updated fake weapons to-hit Updated the bionic weapons to the new to-hit standard. commit 4f384360f21cd62812e9081d32404119aad7539b Author: curstwist <[email protected]> Date: Fri Jul 23 00:06:37 2021 -0400 modular lab security & ground floor (#50033) * modular lab security & ground floor also includes associated content additions. commit 99e47e28679081a9056dd65c784e2fe708dc4a8d Author: Kevin Granade <[email protected]> Date: Thu Jul 22 20:38:24 2021 -0700 Rearange recipe permutation test to avoid massive memory allocation. (#50140) * Rearange recipe permutation test to avoid massive memory allocation. * limit test parallelism on gcc ASan build to one worker. commit 92956d05ab83440c1447745620cb124536fdecff Author: Kevin Granade <[email protected]> Date: Thu Jul 22 19:31:01 2021 -0700 Apply suggestions from code review commit 7f33807e78b179f750496d9d0b1dd8f9aa7178e1 Merge: 32ee90952a e1a3575a09 Author: Kevin Granade <[email protected]> Date: Thu Jul 22 19:13:07 2021 -0700 Merge pull request #50138 from mqrause/private_contents_pt3 Make contents member of item class private final part commit 32ee90952a5eb00c71b63def350240d6ae510b20 Author: anothersimulacrum <[email protected]> Date: Thu Jul 22 19:09:00 2021 -0700 Fix clang-tidy function size warning (#50145) Move all the SECTIONs to sub functions to make the clang-tidy function size check happy. commit 8717cb8a8ebd5507d7ff376764495c96d468c7e7 Author: anothersimulacrum <[email protected]> Date: Thu Jul 22 18:25:32 2021 -0700 Improve DPS test behavior with GHA problem matcher (#50125) The problem matchers with GitHub actions are meant to make seeing errors in tests easier, without having to navigate through the somewhat clumsy interface to find the errors. However, because the CHECK does not include the name of the item, this is still required. Move the CHECK to be on the line with the item name, so it is not necessary to go through the clumsy GHA interface. This does mean the test will not print failures and the expected value to stdout. I think that being more compatible with the GHA problem matchers is worth making this slightly more annoying to manually run. commit 3c896178b5af8f8c35f6adc05293562d0b75d884 Author: Kevin Granade <[email protected]> Date: Thu Jul 22 18:24:08 2021 -0700 Update src/map.h commit 04cd8496cbec22859ff05e3167077a923ee664cd Author: CheekyGoblin <[email protected]> Date: Thu Jul 22 19:06:38 2021 -0600 change keffiyeh to cover head and use collar for mouth coverage commit 5833926fbfdf787e8c6caa13d08807b19f728ed5 Author: anothersimulacrum <[email protected]> Date: Thu Jul 22 13:29:59 2021 -0700 Add script to get gun stats The gun various gun variant work needs some standards, and we need a good way to get those standards. So, add a script to gather data, to help decide if guns should be collapsed or not. This script loads all of the gun data, walks through all of the gun data, following copy-from links to push the data being inherited into the entry it belongs in. After doing that, walk through all extracted entries, and output the relevant data in a table, with some helpers for extracting the data in a format that is more uniform. commit fdef8b1a542ddbb1a2e383b3776fb43a7f39914f Author: Kevin Granade <[email protected]> Date: Thu Jul 22 16:06:36 2021 -0700 Update editmap.cpp commit e1a3575a097c607703738e7b02a3f71bebda0d26 Author: mqrause <[email protected]> Date: Fri Jul 23 00:23:22 2021 +0200 private contents member and remove most item_contents.h includes commit 7ed639853f79cbd533928e47f0d1a136f470df53 Author: olanti-p <[email protected]> Date: Wed May 5 15:44:04 2021 +0300 Remove regional_settings.h from overmap.h commit f5b852771db60f0b3302f0b8e65339639e78a52d Author: olanti-p <[email protected]> Date: Wed May 5 15:43:49 2021 +0300 Remove character_martial_arts.h include from character.h commit 9bf95457cd26f314911c13a19786dd6cb9cbb9b3 Author: mqrause <[email protected]> Date: Thu Jul 22 19:27:49 2021 +0200 remove uses of item_contents::remaining_container_capacity in reloading_test.cpp and item_contents::remove_item_if in item_contents_test.cpp commit 0f0ff9d399883fc3becdacb57c6678aed2065f92 Author: mqrause <[email protected]> Date: Thu Jul 22 16:47:17 2021 +0200 use item::get_remaining_capacity_for_liquid instead of item_contents::remaining_capacity_for_liquid commit d0435ed1fa94d3deb3b5a4bf9895d6239718c23b Author: mqrause <[email protected]> Date: Thu Jul 22 16:39:01 2021 +0200 wrappers for item_contents::visit_contents and item_contents::remove_internal in item commit c3bb5eb2f9836163d7c674dbef94bc4e0742926c Author: mqrause <[email protected]> Date: Thu Jul 22 12:44:08 2021 +0200 - remove item_contents::sealed_summary and the sealed_summary enum - add item_contents::all_pockets_sealed and item_contents::any_pockets_sealed and wrappers for them in item commit 8a989fbfc3a10c8d5a072b699234a15fc958ba6e Author: mqrause <[email protected]> Date: Tue Jul 20 20:42:11 2021 +0200 wrappers for item_contents::force_insert_item and item_contents::combine in item commit be326d3398b5924c19be584fd8e449c68da2b73a Author: olanti-p <[email protected]> Date: Wed May 5 15:43:25 2021 +0300 Remove misc includes from headers commit 0301aee390a5ff52cfcdc8dd3ff25da225307b7b Author: Woe <[email protected]> Date: Thu Jul 22 21:22:18 2021 +0100 Modifed mass ratio of sheep wool on harvest to give similar returns to shearing commit 7feebc65ff59cc76ee481c78fb8c94a5cc6a316c Author: guralub <[email protected]> Date: Thu Jul 22 14:24:16 2021 -0300 Fix armor pen from martial arts buffs not working commit 6d521443d946c3dd36fd9a6c7379b1290ca37a80 Author: Jianxiang Wang (王健翔) <[email protected]> Date: Thu Jul 22 23:47:35 2021 +0800 Astyle clang-tidy test headers in Makefile (#50129) * Astyle clang-tidy test headers in Makefile * Do not skip astyle on relevant changes * Astyle tools/clang-tidy-plugin/test-include/mock-translation.h commit 7aa5a3086d02e10cc9ac4a33509b29e91c761eba Merge: b5f7d2df0e 340962ce9c Author: Zhilkin Serg <[email protected]> Date: Thu Jul 22 18:47:17 2021 +0300 Merge pull request #50126 from Hirmuolio/complain Fix clang tidy warning commit b5f7d2df0e0d37910e1c38f2cba04463da0394e4 Author: Curtis Merrill <[email protected]> Date: Thu Jul 22 10:02:27 2021 -0400 [Magiclysm] Teleport_To spell type (#50130) * [Magiclysm] New Spell Effect Summary Mod "Adds teleport_to spell effect type and some spells" * Linted Json * Cleanup * Astyle * Update teleport.cpp * Minor code fixes * Astyle * Mana cost change * Teleport effect varies by flag Instead of two similar teleport effects, there is only short_range_teleport, whose behavior changes based on the TARGET_TELEPORT flag. * Update MAGIC.md * Update src/magic.h Co-authored-by: actual-nh <[email protected]> * Update doc/MAGIC.md Co-authored-by: actual-nh <[email protected]> * Update src/teleport.cpp Co-authored-by: Curtis Merrill <[email protected]> * Update src/magic_spell_effect.cpp Co-authored-by: Curtis Merrill <[email protected]> * Update src/magic_spell_effect.cpp * return in_spell_aoe to its original location * astyle * add piece of documentation back Co-authored-by: Kenshkrix <[email protected]> Co-authored-by: Kenshkrix <[email protected]> Co-authored-by: actual-nh <[email protected]> commit d3973fdf21b0f9f7edd67e21fc73bb585dc8b0d8 Author: mqrause <[email protected]> Date: Tue Jul 20 20:37:01 2021 +0200 use item::put_in instead of item_contents::insert_item commit c830345ecd6956777d1898523165c7450665f0ac Author: mqrause <[email protected]> Date: Tue Jul 20 05:37:28 2021 +0200 replace calls to some item_contents methods with their item counterparts commit 33905d9879d295a0c0173bc40cb4f3a635571ba0 Author: mqrause <[email protected]> Date: Mon Jul 19 20:53:33 2021 +0200 wrappers for item_contents::handle_liquid_or_spill and item_contents::total_contained_volume in item commit dbd0913999732b2a58977f4ec629481d40d6e20a Author: mqrause <[email protected]> Date: Mon Jul 19 20:33:02 2021 +0200 wrappers for item_contents::first_ammo and item_contents::get_item_with in item commit 340962ce9c7010dc0298b50d913495488d1d280f Author: Hirmuolio <[email protected]> Date: Thu Jul 22 10:26:21 2021 +0300 fix argument name commit f0170fea37d442fcab33e6303e10c9594a8cab7a Merge: b313d9a543 3fc4a41929 Author: Angela Graves <[email protected]> Date: Thu Jul 22 00:14:59 2021 -0500 Merge pull request #50120 from jiornojiovanni/bread_cleanwater Added clean water to hallula and cracker recipe commit b313d9a543619145069bcf514bdc2c6fce2380e2 Author: Salty Panda <[email protected]> Date: Thu Jul 22 05:29:10 2021 +0200 Fix disappearance of CRIT vest on activation (#50114) commit d008f2e224c1d228d698dad562e51259c2514bea Author: GuardianDll <[email protected]> Date: Thu Jul 22 03:41:07 2021 +0200 [Magiclysm] Adding more attunement spells (1/3) (#49809) * sunmage (+item)+boreal mage(+item)+gaias chosen * forget to add spell component and attunement info * resolving small conflict * some balance tweaks * deleted AoE from sunMage spell * lint * Update data/mods/Magiclysm/items/ethereal_items.json Co-authored-by: actual-nh <[email protected]> * Change armor info to new style * Lint * Update data/mods/Magiclysm/Spells/attunements/Boreal_Mage.json Co-authored-by: Curtis Merrill <[email protected]> * Update data/mods/Magiclysm/Spells/attunements/Gaias_Chosen.json Co-authored-by: Curtis Merrill <[email protected]> * Update data/mods/Magiclysm/Spells/attunements/Gaias_Chosen.json Co-authored-by: Curtis Merrill <[email protected]> * Update data/mods/Magiclysm/Spells/attunements/Gaias_Chosen.json Co-authored-by: Curtis Merrill <[email protected]> * Update data/mods/Magiclysm/Spells/attunements/Gaias_Chosen.json Co-authored-by: Curtis Merrill <[email protected]> * Update data/mods/Magiclysm/Spells/attunements/Gaias_Chosen.json Co-authored-by: Curtis Merrill <[email protected]> * Update data/mods/Magiclysm/Spells/attunements/Sun_Mage.json Co-authored-by: Curtis Merrill <[email protected]> * Update data/mods/Magiclysm/items/ethereal_items.json Co-authored-by: Curtis Merrill <[email protected]> * Update data/mods/Magiclysm/materials.json Co-authored-by: Curtis Merrill <[email protected]> * adding some stuff to sunmage spell + some tweaks in description * Update data/mods/Magiclysm/Spells/attunements/Gaias_Chosen.json Co-authored-by: actual-nh <[email protected]> * Update data/mods/Magiclysm/items/ethereal_items.json Co-authored-by: actual-nh <[email protected]> * Update data/mods/Magiclysm/items/ethereal_items.json Co-authored-by: actual-nh <[email protected]> * Delete extra effect via using effect_str Co-authored-by: actual-nh <[email protected]> Co-authored-by: Curtis Merrill <[email protected]> commit 3fc4a41929d96eac4e9d57dc6ca9c60a3a742097 Author: jiornojiovanni <[email protected]> Date: Wed Jul 21 21:48:55 2021 +0200 Added clean water to hallula and cracker recipe commit 90539ba0b25d787ea877de061f5ca899cf02fdd9 Author: Binrui Dong <[email protected]> Date: Thu Jul 22 02:49:27 2021 +0800 Automate pulling translations from Transifex (#50067) commit c6f56f7ae27c3a33c1e7f7624b41ca47b530ffe0 Author: Hirmuolio <[email protected]> Date: Wed Jul 21 21:23:56 2021 +0300 Slightly simplify sun position code, add sextant to see sun position (#50062) * add sextant * sextant works only outside Co-authored-by: actual-nh <[email protected]> commit 430b95bedf8abf70c9b1187cd1fef7c0477eb411 Author: Unknown <[email protected]> Date: Wed Jul 21 14:23:09 2021 -0400 Archery Proficiencies and Proficiency Bonus Infrastructure (#50064) * Archery Proficiencies and Proficiency Bonus Infrastructure Archery Proficiencies and proficiency bonus infrastructure * Update doc/PROFICIENCY.md Co-authored-by: anothersimulacrum <[email protected]> * Update data/json/professions.json Co-authored-by: I-am-Erk <[email protected]> * proficiency bonus API * fix survivalist bow profession * fix GCC 9 compiler complaint and astyle unrelated monmove astyle failure * squash batch of commits Update src/proficiency.cpp Update src/proficiency.h Update src/proficiency.cpp Update src/proficiency.cpp Update src/proficiency.h Update src/ranged.cpp Update src/proficiency.h Update src/character.h Update src/character.cpp Update src/proficiency.cpp Update src/proficiency.h Update src/proficiency.h Co-Authored-By: anothersimulacrum <[email protected]> * apply changes in code review * Update src/proficiency.cpp Co-authored-by: anothersimulacrum <[email protected]> * Update data/json/proficiencies/wilderness.json Co-authored-by: I-am-Erk <[email protected]> * Update data/json/proficiencies/wilderness.json Co-authored-by: I-am-Erk <[email protected]> * Update doc/PROFICIENCY.md Co-authored-by: anothersimulacrum <[email protected]> Co-authored-by: anothersimulacrum <[email protected]> Co-authored-by: I-am-Erk <[email protected]> commit 01e74b623e53b6f5541a23d5c0d2837d1ed1939c Author: eltank <[email protected]> Date: Wed Jul 21 10:49:03 2021 -0700 Recompute overmap::safe_at_worldgen during unserialize() (#50046) commit 5206b611cb2fc4fc8e622e7020253dd74e37a8eb Author: LyleSY <[email protected]> Date: Wed Jul 21 13:47:14 2021 -0400 [DinoMod] ERROR CBM dino harvest emergency remix (#50040) commit 8b32ca79dedd6cdc6fe6c141d07bbb6f4784d379 Author: Tamiore <[email protected]> Date: Wed Jul 21 18:30:17 2021 +0300 Add hydria-based charcoal water purifier (#50083) commit 222079f2c1c22ac44e26cfd7ef91764b8bab7ba9 Author: Paul Fenwick <[email protected]> Date: Wed Jul 21 08:25:56 2021 -0700 astyle fixes (#50113) commit d0fb1f30bc8d6e8b17b3b514d62fb11fea0834b9 Author: Binrui Dong <[email protected]> Date: Wed Jul 21 16:28:53 2021 +0800 Fix recent clang tidy warnings (#50084) * Fix clang-tidy warning on string concatenation in learn_spell_actor::info() * Fix clang-tidy warning on parameter name mismatch in Character::estimate_effect_dur() Co-authored-by: eltank <[email protected]> Co-authored-by: Kevin Granade <[email protected]> Co-authored-by: Jianxiang Wang (王健翔) <[email protected]> Co-authored-by: eltank <[email protected]> commit 4199b64dae5418cec6a00094a40728fdd24a0b83 Merge: fb6455faff b05f974ea2 Author: Zhilkin Serg <[email protected]> Date: Wed Jul 21 10:15:24 2021 +0300 Merge pull request #50107 from LaVeyanFiend/ThiccLichen [Aftershock] Increase volume/weight of lichen, fix processing not neutralizing toxins commit fb6455faff529fc9502f0e36d52f3f8282c34572 Author: casswedson <[email protected]> Date: Wed Jul 21 01:19:52 2021 -0500 Use xargs' -P 0 option in JSON style check (#50098) * use -P 0 option on JSON style check * xargs' -P 0 option to JSON style doc commit c7ef953132efdaf3c9751ba04324d39df4c3bc88 Author: exuvo <[email protected]> Date: Wed Jul 21 08:18:43 2021 +0200 Fix auto inventory letters bugs #45625, #45401, #43254 (#49925) * Fix auto inventory letters only assigning wield or wear, stop duplicating letters. Co-authored-by: Kevin Granade <[email protected]> commit b2b3960efb4462e241a300c2a2c1c22c89a7082b Author: Unknown <[email protected]> Date: Wed Jul 21 02:16:20 2021 -0400 Add ability to cause some foods to incur nausea (#49843) * Nausea mini-rework * Add Corrosive flag commit 79efd73f7b3e6e5d0c915ac2b29444aa18373846 Author: Kevin Granade <[email protected]> Date: Tue Jul 20 22:58:12 2021 -0700 Skip outdated runs (#50109) * Skip outdated runs commit 6cf305a2a6e67800f345ac913715cecbb16c31f5 Merge: 6ca1ebb321 1502cd910c Author: Angela Graves <[email protected]> Date: Wed Jul 21 00:12:25 2021 -0500 Merge pull request #50086 from Tamiore/cordage_crafting_time Update cordage and cordage ropes crafting time. commit b05f974ea2990641439a248416c32b46d6dd9907 Author: LaVeyanFiend <[email protected]> Date: Tue Jul 20 23:58:26 2021 -0400 Lichen fix commit 6ca1ebb3216f2148840c63a15501c004f8981f40 Author: I-am-Erk <[email protected]> Date: Tue Jul 20 19:52:38 2021 -0700 Missed list (#50093) * limit starting scenarios/professions commit 5d1cd76365e7ee0b030c4912bf3c200ddc58f1ff Merge: 9e19b05612 38a7d7a408 Author: Kevin Granade <[email protected]> Date: Tue Jul 20 18:37:01 2021 -0700 Merge pull request #49819 from Qrox/unread Allow the player to track newly learned/unviewed recipes commit 9e19b056125dbf057a28a4f7b831d3deaf47f516 Author: Giovanni Palmieri <[email protected]> Date: Wed Jul 21 03:34:16 2021 +0200 Added health indicator in all item menu (#48511) * Added health indicator in all item menu * Add FOOD HEALTH to iteminfo filtering. Co-authored-by: Kevin Granade <[email protected]> commit 64bf2e883d54d0932fe092f85e4a525472cc5441 Author: Kevin Granade <[email protected]> Date: Tue Jul 20 18:22:01 2021 -0700 Build fix caused by merges. (#50101) commit 87a6eb45afadd7f4fc01ceedd1bd50f7a62fc711 Author: Eric <[email protected]> Date: Tue Jul 20 21:14:46 2021 -0400 Update doc/NPCs.md Co-authored-by: actual-nh <[email protected]> commit 2b094cedf3bd2cfb4535c46fbab1f7bb6026b5d6 Author: ZigVert <[email protected]> Date: Tue Jul 20 20:08:56 2021 -0400 Added Regenerating zombie (#47089) * Update zed_misc.json * Added Regenerating zombie added a new zed with 120 HP that heals a tenth of it's HP every turn. it has similar fighting capabilities of a tough zombie. * Update data/json/monsters/zed_misc.json Co-authored-by: actual-nh <[email protected]> * Update data/json/monsters/zed_misc.json Co-authored-by: actual-nh <[email protected]> * Lint json, tweak regen and add regenerating zombie to spawn and upgrade groups * Apply suggestions from code review Dropping HP and removing unecessary flags. Co-authored-by: I-am-Erk <[email protected]> Co-authored-by: actual-nh <[email protected]> Co-authored-by: actual-nh <[email protected]> Co-authored-by: Kevin Granade <[email protected]> Co-authored-by: I-am-Erk <[email protected]> commit 69732c9cc3f858bb1bcee84a2436725e1a2ca69d Author: occulti <[email protected]> Date: Wed Jul 21 00:40:59 2021 +0100 Added batch cook times to Granola and Cookies (#50089) (#50096) * Added batch cook times to Granola and Cookiess * Relinted file due to select all error Co-authored-by: Woe <[email protected]> commit 476d990745f43bfa0f1b16e80aa207b632e5f706 Author: Hirmuolio <[email protected]> Date: Wed Jul 21 02:17:31 2021 +0300 astyle (#50099) commit 201a8b202bab0db0281411da5122901b23e7af1b Merge: b69f4b0d68 cc25bc57f2 Author: Kevin Granade <[email protected]> Date: Tue Jul 20 15:43:44 2021 -0700 Merge pull request #48608 from Hirmuolio/integrated-battery Refactor battery usage commit b69f4b0d6893c293113967746073e8478301cad1 Author: FeralFerret <[email protected]> Date: Tue Jul 20 11:54:22 2021 -0600 Add small sludge trail to pupating zombies (#50079) * added small MF_SMALLSLUDGETRAIL to pupating zombies * Update src/monmove.cpp Co-authored-by: anothersimulacrum <[email protected]> Co-authored-by: I-am-Erk <[email protected]> Co-authored-by: anothersimulacrum <[email protected]> commit 1502cd910c719a5e2155adb718fbfdd7459d8c25 Author: Tamiore <[email protected]> Date: Tue Jul 20 19:15:42 2021 +0300 cordage_crafting_update commit 42aef0c8bf6fcc504ba8d56f796ee4053f8a03ce Author: Saicchi <[email protected]> Date: Tue Jul 20 12:53:29 2021 -0300 Make bolt cutting an activity (#50057) * wirecutting activity_actor * bolt cutting use activity_actor Co-authored-by: Saicchi <[email protected]> commit 46486695ddb44c5be6c0fb3f6e5763dd4d27c780 Author: LyleSY <[email protected]> Date: Tue Jul 20 11:46:57 2021 -0400 fungal skeletal zombies (#49842) * fungal skeletal zombies * move fungal boomer * remove duplicates * most classic zombies fungalize * skeletal zombies fungalize * fix vision * no diff dupe * guilt free child death * update unhardcoded SMASH * simplify conflict commit 2eab011fd889e384940a1775c9e345e0d2b05cc9 Author: somepersondunno <[email protected]> Date: Tue Jul 20 07:09:18 2021 -0700 Corrects and cleans up descriptions on some clothing items. (#49928) * Cleans up some clothing descriptions. * Update torso_clothes.json * Fixes (hopefully) spacing issues. * Update legs_armor.json * Apply suggestions from code review Thanks for editing this, actual-nh! Co-authored-by: actual-nh <[email protected]> * Update data/json/items/armor/suits_protection.json Co-authored-by: actual-nh <[email protected]> Co-authored-by: actual-nh <[email protected]> Co-authored-by: Kevin Granade <[email protected]> commit db097c5f8f657be032cb6bea2af54e2a3c51e750 Author: Serhiy Zahoriya <[email protected]> Date: Tue Jul 20 10:03:37 2021 +0300 None "Minor improvement to pyvips installation docs and compose.py error text" (#50069) * minor improvement to pyvips installation docs * Improve wording when sprite was not found commit 8e9a3ea01d23eb44f57632a9fb88727426559fbd Merge: 2e6b01a96f ab865145b3 Author: Angela Graves <[email protected]> Date: Tue Jul 20 00:08:08 2021 -0500 Merge pull request #50081 from eltank/fixbuild Fix clang-tidy error in character.cpp commit 2e6b01a96ff0dae162f734752ece6b0dc655d4af Author: I-am-Erk <[email protected]> Date: Mon Jul 19 20:53:02 2021 -0700 ERROR: Signal lost in multiple units. WARNING: Sensitive materiel may require retrieval. (#49892) * add zomborg harvest itemgroups not yet connected to the zomborg commit 8020fed94ac61a3b1f4b9f69d23b8a77ec460687 Author: Kevin Granade <[email protected]> Date: Mon Jul 19 20:48:06 2021 -0700 Still more aggressive workflow skipping (#50076) * Still more aggressive workflow skipping In the main build matrix, only run the full suite on C++ changes, if there are just json changes, still run the stages that depend on mod content. commit ab865145b33e8cdf8a6b379b35ad10a3e37637b2 Author: eltank <[email protected]> Date: Mon Jul 19 20:45:08 2021 -0700 Fix clang-tidy error in character.cpp commit 1c6fc85057f85b59757ccac23bfb772325329886 Author: casswedson <[email protected]> Date: Mon Jul 19 17:46:39 2021 -0500 fix JSON style error (#50071) commit ba28bb665f785bf630bcd4ea2ae4f37478560719 Merge: 519d4ad258 47da85d72a Author: Zhilkin Serg <[email protected]> Date: Mon Jul 19 20:17:33 2021 +0300 Merge pull request #50065 from AMurkin/fix-cddatags Fix cddatags (`cherry-pick`ed commit from #49980 by @jbytheway) commit 519d4ad258ef45e0ba605212a7bf52fa3fcecf53 Author: occulti <[email protected]> Date: Mon Jul 19 17:49:32 2021 +0100 Fixed Morphine description to suggested one (#50061) Co-authored-by: Woe <[email protected]> commit c33b303da54fb86359df1943384b863535fc2573 Author: Tamiore <[email protected]> Date: Mon Jul 19 19:48:24 2021 +0300 Update tools_primitive.json (#50044) Resolves crafting bottleneck with cutting 1 requiring cutting 1 commit 59d9f8f76716a8b0946b6a84e996e93a5cfdbc6a Author: Paul Fenwick <[email protected]> Date: Mon Jul 19 09:47:49 2021 -0700 Allow the player to return with more merch to pay the merchant for cleanup help. (#50049) Previously if the player wasn't carrying any Merch, they could be flagged as having asked the front-merchant for help with Boris' cleanup effort, and be told they could "sweeten the deal", but could then never actually purchase help because the option would not show again. This commit moves setting the `cleanup_asked` var to when payment is actually made, and adds a "I might come back with some more Merch…" dialog option to help guide the player. Unfortunately this does not fix the quest for players who have already spoken to the merchant without any Merch. commit 7e05d34e0fe0710c175758d70bb7f07eb2259e79 Author: eltank <[email protected]> Date: Mon Jul 19 08:33:56 2021 -0700 Consolidate Creature::is_player() and is_avatar() (#50050) commit 47da85d72a09a09435668adc51f4f405669ddbb4 Author: John Bytheway <[email protected]> Date: Mon Jul 12 09:04:05 2021 -0400 Fix cddatags We were opening files in binary mode with an encoding. This mistake used to be silently ignored, but is now an error, so fix that. commit 9dc329cd03c4fd2bfbddffb2ab30e03fca69d560 Merge: a29524175c 0eb5691605 Author: Zhilkin Serg <[email protected]> Date: Mon Jul 19 14:26:20 2021 +0300 Merge pull request #50058 from pjf/pull/dsa_infection Correct no_infection_chance to infection_chance in Dark-Skies-Above commit a29524175c185a4399049c4f1295f77c0c7942a6 Author: anothersimulacrum <[email protected]> Date: Mon Jul 19 04:23:39 2021 -0700 Prevent UB passing 0 to LIGHT_RANGE (#49949) Co-authored-by: Kevin Granade <[email protected]> Co-authored-by: actual-nh <[email protected]> commit cc9391fe8a5594d2daf76e1aa47b65f4421b0420 Merge: fa057abf51 2b68b94e91 Author: Zhilkin Serg <[email protected]> Date: Mon Jul 19 14:21:48 2021 +0300 Merge pull request #50053 from pjf/pull/hemo_chitin_fix Require hemostatic powder to require *powdered* chitin only. commit fa057abf5103149dd6149e947cf2e745c70c174b Merge: f522d23239 3d5eade394 Author: Zhilkin Serg <[email protected]> Date: Mon Jul 19 14:21:31 2021 +0300 Merge pull request #50054 from Saicchi/astylefix Apply astyle to files commit 0eb56916056255cc1843b2ac147a566f76ca06e3 Author: Paul Fenwick <[email protected]> Date: Mon Jul 19 21:18:21 2021 +1000 Correct no_infection_chance to infection_chance in Dark-Skies-Above I'm assuming `infection_chance` is `100 - no_infection_chance`. commit 3d5eade394cedcea611a3e1e3b76ea4cb0d3ea62 Author: Saicchi <[email protected]> Date: Mon Jul 19 04:56:36 2021 -0300 astyle fix commit 2b68b94e91434c3e100964ee75ee6477f8d2e216 Author: Paul Fenwick <[email protected]> Date: Mon Jul 19 17:43:32 2021 +1000 Require hemostatic powder to require *powdered* chitin only. I don't see how chunks of chitin would turn into powder without a grinding instrument. commit f522d232390c0ce76f748ccb2ccd7bdde334f99b Merge: 0f646162aa 3d5c8f691d Author: Zhilkin Serg <[email protected]> Date: Mon Jul 19 10:19:46 2021 +0300 Merge pull request #48462 from GGgatherer/colorized-spells-in-spellbook-view Colorize spells in spellbooks commit 0f646162aa2cbeac7fb682b170303e9d22d94e39 Author: Merrygin <[email protected]> Date: Mon Jul 19 09:19:01 2021 +0200 Add/Fix sausage requirements (casings, funnels) (#48993) Co-authored-by: Schmitz, Jascha <[email protected]> Co-authored-by: Binrui Dong <[email protected]> commit 0c9982dbbb086a333d453f5b63236303a561e1a6 Merge: 076b4734e1 b8b7a022b8 Author: Kevin Granade <[email protected]> Date: Mon Jul 19 00:17:38 2021 -0700 Merge pull request #49887 from mqrause/private_contents_pt2 Preparation to make the contents member of the item class private part 2 commit 076b4734e125ea331779b06c159ad7ff73e0800f Author: Maleclypse <[email protected]> Date: Mon Jul 19 02:16:41 2021 -0500 Wasp harvest for pupa and larva (#49878) commit 38fbe27cd600a6069a183fa6d252a7cec3fb7f2a Merge: 71378ebcb0 b347e6243e Author: Zhilkin Serg <[email protected]> Date: Mon Jul 19 10:16:06 2021 +0300 Merge pull request #50043 from Maleclypse/Hatchet's-aren't-melee-durable Hatchets aren't melee durable commit 71378ebcb075c27296659bca676881b31d068038 Author: Venera3 <[email protected]> Date: Mon Jul 19 09:15:45 2021 +0200 Unhardcode monster smash attacks (#49316) * It lives! Range gets rewritten, the rest is to do * Longswipe no_adjacent and attack_chance as new variables Head/eye hits make no sense until they can actually break your neck. Co-authored-by: actual-nh <[email protected]> Co-authored-by: Kevin Granade <[email protected]> commit 153c92395ef4be491758297ecb69b3b8fc03b40d Author: Welp <[email protected]> Date: Mon Jul 19 00:13:24 2021 -0700 Add time elapsed/remaining to effects info panel (#48917) * Add effect duration elapsed info, improve Pain Effect info Add effect duration elapsed info to info panel, add colored pain text to info panel * Improve effect time display Moved estimate_effect_dur() to Character, and improved implementation. Co-authored-by: Kevin Granade <[email protected]> commit d0be27ac9c67602056cc2a6a34b6728ab28ac671 Merge: 73a5d892cf 402f81250d Author: Kevin Granade <[email protected]> Date: Mon Jul 19 00:08:58 2021 -0700 Merge pull request #49598 from jbytheway/update_compiler_support Update compiler support now that Ubuntu Xenial is out of support commit 73a5d892cf61583b76b4cc704f4faaec6a632e6f Merge: 8b108345bf 066e46a31f Author: Angela Graves <[email protected]> Date: Mon Jul 19 00:21:35 2021 -0500 Merge pull request #50019 from RoyBerube/body_dupe Avoid extra zombie revives from one corpse commit 8b108345bfa7669478abf3629232aad559e7733b Author: John Bytheway <[email protected]> Date: Mon Jul 19 01:07:04 2021 -0400 No sentinel for closest_enemy_to_friendly_distance (#50037) This function returning a sentinel value was causing UB due to integer overflow. Also, the sentinel it actually returned wasn't the one the docs claimed it did. Replace with an optional to reduce confusion. commit 38a7d7a408b7e7d5fc4d71f8f027ca8e793d3441 Author: Kevin Granade <[email protected]> Date: Sun Jul 18 21:49:17 2021 -0700 Update crafting_gui.cpp commit 402f81250dc2cc01c66b95f5a6897829e5dcb9d0 Author: Kevin Granade <[email protected]> Date: Sun Jul 18 20:35:54 2021 -0700 Update doc/COMPILING/COMPILER_SUPPORT.md Co-authored-by: actual-nh <[email protected]> commit 08cac8a9ab292a2df66bca2dc10d0045326106da Author: Kevin Granade <[email protected]> Date: Sun Jul 18 20:35:42 2021 -0700 Update matrix.yml commit 023b3bbe7a437783479062210cc6cf636fca44dd Author: Paul Fenwick <[email protected]> Date: Sun Jul 18 20:11:03 2021 -0700 Base NPC auto-eating on hunger, not stored kCal (#49494) NPCs would only eat if they had less than 95% of their healthy kCals remaining, however they would still be *hungry*, and would still complain about this, refuse to train the PC, etc. This would result in the annoying situation of having to endure a whingy NPC until they learn to eat for themselves, or spoon-feeding them and having them be completely player-dependent. This PR attempts to unify what causes the NPC to complain or not cooperate (their hunger level) with when they eat, so we're less likely to have NPCs complain about being hungry with food in their inventory. commit 4f2d9533242e585123434bf9c2e18d5995169950 Author: Ramza13 <[email protected]> Date: Sun Jul 11 17:26:35 2021 -0400 Add morale and focus functions commit 8d53c5818bef4df5390f2cd3dfd0f182d0c14cc3 Author: Kevin Granade <[email protected]> Date: Sun Jul 18 19:37:33 2021 -0700 More agressive skipping of duplicate workflows (#50042) * More agressive skipping of duplicate workflows commit 91dccb2a590033483c011e26b1395d3a122b4726 Author: Fris0uman <[email protected]> Date: Mon Jul 19 03:08:28 2021 +0200 Update Tilesets 21-07-19 (#50041) * Update MSX 2021-07-19 * Update Ultica * Update Chibi Ultica * Move overlay ordering to its own file to avoid overriding it in future updates * Update Retrodays commit 81995f4f76d02fb12799434ea3aba032cd246f33 Author: Welp <[email protected]> Date: Sun Jul 18 17:38:57 2021 -0700 Make apply_light_arc() use castLight() (#49183) * Update apply_light_arc() to cut arc into octants. Operates clockwise, from opening angle (center-width/2) to close (center+width/2). If opening angle isn't a multiple of 45 deg, render it to the next 45 degree angle the slow way. calculate the number of octants and the starting octant, then walk clockwise calling appropriate castLight() versions. Then, if part of the arc is still left, do it the slow way. Todo: name things better and optimize commit fa71f581914a66b07bef7e796ea20233701ef881 Author: Saicchi <[email protected]> Date: Sun Jul 18 21:19:20 2021 -0300 Butchering use best tool in crafting radius (#48930) * max_quality with radius * butchering get best tool * use max_quality visitable function commit 3c1422793a2db3db4e1401a20b2e5196b5f92c06 Author: Hirmuolio <[email protected]> Date: Mon Jul 19 03:04:14 2021 +0300 fix complaints (#50036) commit b347e6243e01f71c53d0c460ef4bf5272d36bbb0 Author: Maleclypse <[email protected]> Date: Sun Jul 18 18:35:19 2021 -0500 Update woodworking.json commit a27f8015b42c8972e0447daeb757ebf1b523cce8 Merge: 16c37da66a 44a63cbd68 Author: Zhilkin Serg <[email protected]> Date: Sun Jul 18 21:28:24 2021 +0300 Merge pull request #50032 from occulti/FixVehicleFuel Changed Humvee jerrycans to use JP8 fuel (#50008) commit 16c37da66ace2d75635198e7412508b097985170 Author: Atsumari <[email protected]> Date: Sun Jul 18 10:55:32 2021 -0700 Vehicle plates recipe rework (#49947) commit eaf38de35a1660488945ed272f59c7fa0dfe92c2 Author: AccountAlias <[email protected]> Date: Sun Jul 18 13:54:44 2021 -0400 Fix zombie grabs and bites (#49948) Co-authored-by: Anton Burmistrov <[email protected]> commit 4f587500dfebd67ba428bb6a6a6a6178852a7006 Merge: 440cbd0e9a 0b385a94d5 Author: Zhilkin Serg <[email protected]> Date: Sun Jul 18 20:54:19 2021 +0300 Merge pull request #49957 from eltank/hiddenlabfind Improve chance to find hidden lab in MISSION_SCIENCE_REP_3 commit 440cbd0e9abd7a7af4a6484fb0cf64f552cb9762 Author: martinrhan <[email protected]> Date: Mon Jul 19 01:53:36 2021 +0800 Refactor the json files relative to the three rigs among Aftershock and BlazeIndustries (#49977) commit f16c224166ffac3c83881fd97d0f6df182346c8d Merge: cc162a0549 ec7e18f9d8 Author: Zhilkin Serg <[email protected]> Date: Sun Jul 18 20:53:08 2021 +0300 Merge pull request #50000 from int-ua/bn-46755 Bugfixes "Port fix for 'phantom fuel' from Cataclysm-BN" commit cc162a0549f0c2d7e4b4e5d7e68038b5c901de70 Merge: 605451f0c7 319d49cca9 Author: Zhilkin Serg <[email protected]> Date: Sun Jul 18 20:52:53 2021 +0300 Merge pull request #50009 from curstwist/lab_parking_lot Add modular lab parking lot commit 605451f0c7352b12a08eb5acd02c1ae9de341e1e Merge: 651b617e23 5e1585f95c Author: Zhilkin Serg <[email protected]> Date: Sun Jul 18 20:52:41 2021 +0300 Merge pull request #50006 from mlangsdorf/helicopter_fuel_fix vehicles: helicopters do not have 100% load in idle() commit 651b617e23f33297b333263671f5819f5ee16c01 Merge: 8d17b33cf7 c34957b9af Author: Zhilkin Serg <[email protected]> Date: Sun Jul 18 20:51:15 2021 +0300 Merge pull request #50028 from casswedson/read-the-checks Mention checks in PR template commit 8d17b33cf7d2663b618e48a5348939aad7cbf294 Merge: e33cd927c6 983b89ed2f Author: Zhilkin Serg <[email protected]> Date: Sun Jul 18 20:50:52 2021 +0300 Merge pull request #50021 from BrettDong/death-message Translate monster death function messages commit e33cd927c6ec587d6e339254ef91e1e60196c7d6 Merge: 251380d467 ecde8c5ef7 Author: Zhilkin Serg <[email protected]> Date: Sun Jul 18 20:49:46 2021 +0300 Merge pull request #49910 from AxemaVales/fix-mdeath-summons Fix for mdeath summons commit 44a63cbd6817ff05c5a942d48b24da6caaf41319 Author: Woe <[email protected]> Date: Sun Jul 18 16:58:45 2021 +0100 Changed Humvee jerrycans to use JP8 fuel commit 251380d4672fb9c71914d91109dc58527ed72606 Author: curstwist <[email protected]> Date: Sun Jul 18 11:45:14 2021 -0400 lab nested chunks 2 (#49991) * lab nested chunks 2 security, commercial, cargo, maintenance, science_common * changes from feedback. commit ccf5c45f2fe66b00f0dfba2e08186e84509dc3d4 Author: curstwist <[email protected]> Date: Sun Jul 18 11:44:47 2021 -0400 Lab nests 1 (#49990) * lab_nested_maps_1 medical, mutagen, residential nests, edits to nested_common. * Update lab_nested_mutagen.json * incorporate feedback changes commit ac8144608786941be1c4d…
There was some behavior tree implementation in #39810, perhaps the NPC AI could use some of that. |
When CleverRaven#49907 was cleaning up NPC attack logic, it introduced a check into many of the npc_attack_*::use functions to ensure that the NPC was wielding the weapon of choice, and if they were not wielding it, ensure that they did so they could perform that attack next. However, for the throwing attack, it checked if the wielded item was being wielded, causing this section to never be entered, and so the NPC would throw whatever their wielded item was, or, if they were not wielding an item, fail to perform an attack. In addition to this, add a check to ensure we can wield the appropriate item to npc_attack_throw::can_use. Also, make sure all NPC actions have a name to ease debugging.
When CleverRaven#49907 was cleaning up NPC attack logic, it introduced a check into many of the npc_attack_*::use functions to ensure that the NPC was wielding the weapon of choice, and if they were not wielding it, ensure that they did so they could perform that attack next. However, for the throwing attack, it checked if the wielded item was being wielded, causing this section to never be entered, and so the NPC would throw whatever their wielded item was, or, if they were not wielding an item, fail to perform an attack. In addition to this, add a check to ensure we can wield the appropriate item to npc_attack_throw::can_use. Also, make sure all NPC actions have a name to ease debugging.
When CleverRaven#49907 was cleaning up NPC attack logic, it introduced a check into many of the npc_attack_*::use functions to ensure that the NPC was wielding the weapon of choice, and if they were not wielding it, ensure that they did so they could perform that attack next. However, for the throwing attack, it checked if the wielded item was not being wielded, causing this section to never be entered, and so the NPC would throw whatever their wielded item was, or, if they were not wielding an item, fail to perform an attack. In addition to this, add a check to ensure we can wield the appropriate item to npc_attack_throw::can_use. Also, make sure all NPC actions have a name to ease debugging.
When #49907 was cleaning up NPC attack logic, it introduced a check into many of the npc_attack_*::use functions to ensure that the NPC was wielding the weapon of choice, and if they were not wielding it, ensure that they did so they could perform that attack next. However, for the throwing attack, it checked if the wielded item was not being wielded, causing this section to never be entered, and so the NPC would throw whatever their wielded item was, or, if they were not wielding an item, fail to perform an attack. In addition to this, add a check to ensure we can wield the appropriate item to npc_attack_throw::can_use. Also, make sure all NPC actions have a name to ease debugging.
Summary
Bugfixes "Fix some of the NPC attack logic"
Purpose of change
Keep in mind this is a quick fix for the more pressing issues with the new NPC attack logic. The goal is to try to avoid NPCs throwing all their inventory, fixing NPCs trying to shoot unequipped weapons and getting them to use weapons in less stupid ways.
Fixes #49834
Fixes #49830
Describe the solution
This is in no way a perfect solution and it has its issues. For the most part NPCs will now try to behave according to the flags set, trying to avoid friendly fire, not killing themselves while in a car, moving to nearby targets when a melee weapon is the preferred weapon and so on.
EDIT: Updated the npc_attack test so it compiles but the expected values are the old ones, making the test fail. I think it's pointless to try to fix the test now as the values would be meaningless since the evaluation functions will need adjustments.EDIT: Tests updated to reflect scenarios and outcomes instead of checking evaluation values.
Describe alternatives you've considered
Proposing a revert of the original commit until this is solved. I chose to push a quick fix so NPCs can at least defend themselves while the feature is polished.
Testing
I didn't do nearly enough testing but I did test the most basic stuff. I tried giving an NPC a ranged and a melee weapon and it used the ranged weapon until out of ammo. Then switched to the melee weapon.
I tried driving the NPC around and it stood in the vehicle and tried to shoot enemies until running out of ammo. Then it switched to a melee weapon and waited for enemies to come without jumping from the vehicle or trying to kill himself.
Throwing is severely nerfed now and items that are dangerous (i.e. active grenades) are given a huge boost. The math behind choosing to throw items is... well... missing. I simply gave it some multipliers that seem to be working so far. When an item has the NPC_THROWN flag it will be more likely to be thrown but it still has to be a better choice (as in better damage output) than using a melee weapon.
With the changes I didn't get any more "missing gun" errors or infinite loops and the NPCs at the very least showed a will to live. Also they kept their inventory, and being selfish in a cataclysm is always a good thing.