summaryrefslogtreecommitdiff
path: root/revert-19_Fix-Repair-Nanobots-3308.patch
diff options
context:
space:
mode:
Diffstat (limited to 'revert-19_Fix-Repair-Nanobots-3308.patch')
-rw-r--r--revert-19_Fix-Repair-Nanobots-3308.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/revert-19_Fix-Repair-Nanobots-3308.patch b/revert-19_Fix-Repair-Nanobots-3308.patch
new file mode 100644
index 0000000..040af83
--- /dev/null
+++ b/revert-19_Fix-Repair-Nanobots-3308.patch
@@ -0,0 +1,36 @@
+From 88924caafa4534a8c6a3d0f4bf84913a85ef3361 Mon Sep 17 00:00:00 2001
+From: KheirFerrum <102964889+KheirFerrum@users.noreply.github.com>
+Date: Fri, 29 Sep 2023 15:02:13 +0100
+Subject: [PATCH] Fix Repair Nanobots (#3308)
+
+* Add back code that marks limbs for healing.
+
+* style(autofix.ci): automated formatting
+
+---------
+
+Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
+---
+ src/bionics.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/bionics.cpp b/src/bionics.cpp
+index 6c7586bbfc1..1884f75e6f8 100644
+--- a/src/bionics.cpp
++++ b/src/bionics.cpp
+@@ -1673,6 +1673,12 @@ void Character::process_bionic( bionic &bio )
+ }
+ if( calendar::once_every( 2_minutes ) ) {
+ std::vector<bodypart_id> damaged_hp_parts;
++ for( const bodypart_id &bp : get_all_body_parts( true ) ) {
++ const int hp_cur = get_part_hp_cur( bp );
++ if( !is_limb_broken( bp ) && hp_cur < get_part_hp_max( bp ) ) {
++ damaged_hp_parts.push_back( bp );
++ }
++ }
+ if( !damaged_hp_parts.empty() ) {
+ // Essential parts are considered 10 HP lower than non-essential parts for the purpose of determining priority.
+ // I'd use the essential_value, but it's tied up in the heal_actor class of iuse_actor.
+--
+2.42.0
+