From 93dbe50a0a33c11aaf15b5bc6ce7a6b3cb5b6faa Mon Sep 17 00:00:00 2001 From: notfood Date: Thu, 6 Jul 2017 22:04:08 -0500 Subject: [PATCH] Fix multiple output on recycle bug --- Assemblies/Mending.dll | Bin 21504 -> 21504 bytes Source/JobDriver_Recycle.cs | 14 ++++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Assemblies/Mending.dll b/Assemblies/Mending.dll index e3f815afb623c92a3e03d26c22089ece5b1408d5..e2a9cac9282fff809f5a15624882a2b9f360ca0b 100755 GIT binary patch delta 3780 zcmZuz33OD|8UF9RZ{B3y%)HFZOJ+^XBq8xJSy*E-39^WhMN}wTRMbS45J;Jj00KiY zNuyM-P~rtFxUr;4R9re%#TC?2qn0*S&#|Jo6s7iXz|@&D)fE^qx|} zyvbtB)S9udQnpoe6G-!#tFcsb8A>!BMJ!68S@waDgnm3>s`9Hw}k{TO}exHY?#Wp5SsBId}R`?S4R9D?mZH8$C2W19@DC_A-h> zn!O2kSaVpT>yTMv^N|=znOI7XVlF`Dw8a-<6JLZ-jvE8EcrBVs*-hqRZ0ih*+u|LY zB^@F#&8$N-RJZE3G%v|VJH@TWreKQ&mts@idEvr^PjuPCd9MZ#iq-So-n`-tbhZq^ zd6lQ4v+)p4)w~zAR-v`z{p2_*9lXyQ8Fvr5aGq zl!7YPGtzht_n0=`Oz{Xj%^krod4?AS^M?KbKZ&f`guBYmEa2xU265CP{^ zRMe&e{FYFzTOJ2I(1UTYmv~1g-S;xa6%bzm@kTDACU&kxrn2}e{FP8Kd6l0GnbB`t z0J$vy^Y8|)PDgv@ipIKSwM|$F-p6_mU{dbvnb0s407D^n((EZ$W82EF%a}+G^Nx%X zQlI>D#(t8pYME36pVmh-s6bnX8}Oxi2NvSSYtSW?_q0BY`3hrnIH@Ui4PLV=82=ZE zUr0QKs6(kE->O5UV}?VA1&%(fwpQBf9rrpkIOq_)^hi7_QAs$3G)&?&rx?mcX>XPI ztW-%EKA#rv%gE?9*K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z*Vvc&x5>mw(Qq%Mad=*h4vo` C;=LsR diff --git a/Source/JobDriver_Recycle.cs b/Source/JobDriver_Recycle.cs index 6482883..583605a 100644 --- a/Source/JobDriver_Recycle.cs +++ b/Source/JobDriver_Recycle.cs @@ -100,14 +100,16 @@ protected override Toil DoBill() Log.Error("Mending :: " + actor + " could not drop recipe product " + list [j] + " near " + actor.Position); } } - } - - list[0].SetPositionDirect (actor.Position); + } else if (list.Count == 1) { + list [0].SetPositionDirect (actor.Position); - curJob.bill.Notify_IterationCompleted (actor, list); - curJob.targetB = list[0]; + curJob.bill.Notify_IterationCompleted (actor, list); + curJob.targetB = list [0]; - pawn.Map.reservationManager.Reserve(pawn, curJob.targetB, 1); + pawn.Map.reservationManager.Reserve (pawn, curJob.targetB, 1); + } else { + Log.Message ("Mending :: " + actor + " could not reclaim anything from " + objectThing); + } ReadyForNextToil(); }