From 2705bb9c369a782cb1522fc0cb3c81e3baa05d10 Mon Sep 17 00:00:00 2001 From: jecrell Date: Fri, 31 Aug 2018 23:29:08 +0900 Subject: [PATCH] 1.1.0.1 - Fixed casting abilities while wielding equipment --- Assemblies/0JecsTools.dll | Bin 122880 -> 122880 bytes Assemblies/AbilityUser.dll | Bin 70144 -> 70144 bytes Assemblies/AbilityUserAI.dll | Bin 28160 -> 28160 bytes Assemblies/CompActivatableEffect.dll | Bin 17920 -> 17920 bytes Assemblies/CompAnimated.dll | Bin 8192 -> 8192 bytes Assemblies/CompBalloon.dll | Bin 6656 -> 6656 bytes Assemblies/CompDeflector.dll | Bin 26624 -> 26624 bytes Assemblies/CompDelayedSpawner.dll | Bin 8192 -> 8192 bytes Assemblies/CompExtraSounds.dll | Bin 5632 -> 5632 bytes Assemblies/CompInstalledPart.dll | Bin 22528 -> 22528 bytes Assemblies/CompLumbering.dll | Bin 7168 -> 7168 bytes Assemblies/CompOverlays.dll | Bin 5120 -> 5120 bytes Assemblies/CompOversizedWeapon.dll | Bin 10240 -> 10240 bytes Assemblies/CompSlotLoadable.dll | Bin 37888 -> 37888 bytes Assemblies/CompToggleDef.dll | Bin 8704 -> 8704 bytes Assemblies/CompVehicle.dll | Bin 99840 -> 99840 bytes Assemblies/PawnShields.dll | Bin 23552 -> 23552 bytes .../HarmonyCompActivatableEffect.cs | 55 +++++++++--------- 18 files changed, 29 insertions(+), 26 deletions(-) diff --git a/Assemblies/0JecsTools.dll b/Assemblies/0JecsTools.dll index 0db3ffa236b7741ad439fd9489e1caa5abc3703e..6ab1079887ba2a078c98547a858a57f039ba9b0c 100644 GIT binary patch delta 53 zcmV-50LuS>zz2Z92at#Z+)Igpi?xdZqZ$OB8WB0SG8+L}k`TbaJWiQtvQMmg!=g$2 L8o0NdtpQ{*QZ*K_ delta 53 zcmV-50LuS>zz2Z92at#Zt?__?i?xdZqZ$O88oW5SG8+L}k`S=DZc@qNNJxdc9kNJ3 Ld>OZ#tpQ{*acCB$ diff --git a/Assemblies/AbilityUser.dll b/Assemblies/AbilityUser.dll index 47439468d5192242ddbadf21d7a3268d581b0a8f..e5284fade12e6a2f8b37f85c24e5aad040fcba76 100644 GIT binary patch delta 48 zcmV-00MGw`qy&JZ1dxaW+e?YDi*u<2o*EH3vjVCTN)Ua1O1uAwjZTA}J&{?%0#>sm G^xPfn@f6Mg delta 48 zcmV-00MGw`qy&JZ1dxaWtMP!bi*u<2n;N`0vjVCTN)X%sSjtK5j7*t-TBHo;TSc=Z G^xPdE=@!ob diff --git a/Assemblies/AbilityUserAI.dll b/Assemblies/AbilityUserAI.dll index dcd3dfe66c428a36b7b56c67defd1cff443bfe12..4b6668d3e0c06294c10c90518e2f9dd3dd61425b 100644 GIT binary patch delta 48 zcmV-00MGw`+yQ{x0g#9T+)IhEi(@_no*EH3v+_Rf8W4bJud@Beg+{PqmzSVSj0Cgr GSr8N&X%-j& delta 48 zcmV-00MGw`+yQ{x0g#9Tt?_`di(@_nn;N`0v+_Rf8V~{1c*@@)Uq+23x|Yo_!vVAK GSr8N{kro*M diff --git a/Assemblies/CompActivatableEffect.dll b/Assemblies/CompActivatableEffect.dll index 60f7d9667c903d6353c05b5dbde0afda8d34f29d..70461c51c1e7351a96aff53af72dda3785c023ef 100644 GIT binary patch delta 4084 zcmZ`+33OED6~6cX-@Nx`pZ6v+$v^@#34tM*1X5bfu!X2d*_6nZut-v|5>bZ`Q;Q*) z87N3ZlsV5*ITj93Jw1BFiosSCTBUBO!fCWF(6U)Yp|lnkEH2Rd|1$y6c24rWd%yer z_ul{h@6D3B2UGXp`ZfH6Yr8UQi*Q!vk=Y()9>BFguSS4Rc_!kwBDetOS!qm$swpO3 zKcs&KHrV++fN4Vk(29(`yn7luY2zv+tugv!j9FcJG0$tAY(1%0%4?TBX8G;=aEf)z zUgMk!;3##*25N~ZR=Hzz;2PmOViC1H7s(fq<&OGf|KT<`O$A*52Jm+3&C!-eHA@|N z=eSdg_ll0x3Z7T4W*58kymRQc8Mc_7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wYr2*kOZ z^k`m0pUR{8aUlbPypXI0I zuU?R_WXL{nMva_}&pK@*M_c=`2VP-c!P4$6BmWu-wjGbonDXwvn%@NBodfGje&%eb ztj9N;QvhGz&b;G}aTJ+evKamB67?d}Co&%xz|fu}>RkpS&IQQqIVO;>&(3Uh zuB{q3;w!Wl>%c{?n&OKsE3s7+~QdejDXs8n`lmz~+IOad>x zEns%Go|^V+F-#X0GTlq1Xo*|yElZor?6$&oW-oQLo4IH}g$1D?vSDiH5-Bu{9xJz0 z%B5LBIhmT5kk>K0m?oLo=AkPnCn;ZwE>fi%WoepwVPR3BYoWaCJ#xQYa{4Vg-2h&% zmxLnQN+aFoRd)o9zm*)h`>YQ%8faEzcF;;QXjtbDPgUwv!|QbP>R5oT3YTNm{c`y_ z=i=&{TxxI56V-Lb7Me6=cFt6n<8CK8zK{MEenfw329JJe$GYMXc4B^a`GiC0G)=gw T+dt`R&Vtq5;>ypktHSs%*HA}X diff --git a/Assemblies/CompAnimated.dll b/Assemblies/CompAnimated.dll index c1e8581a58031a5200e663545b9e310de4efc1e1..42817f7d59dd60da221c02a7afd523367c86d3f0 100644 GIT binary patch delta 50 zcmV-20L}k^K!8Ayhy&b9iLr|@3pF delta 50 zcmZp0XmFU&!K|F?ys_Jmhl7!UfgwlAuwnBNo)sJd20p%zei*tt@Az?FM(pxu*UdGe GEnEPndlF{= diff --git a/Assemblies/CompBalloon.dll b/Assemblies/CompBalloon.dll index 6c2392a6d17d16ae6c182bf91bd42b37496ab911..174d0dda320b4f21b4b1bfe680ca2be35cdc4f9a 100644 GIT binary patch delta 50 zcmV-20L}k^G=Maahy&Y8iLr}&2?ziH69AqX5jnFC3U&q%C+5T(a2bk5q&C;#p8UUQ Ivy>2Q3Azgs%m4rY delta 50 zcmZoLX)u}4!ECxCbz^rmCkG<~14FZv(4x(JTxDzm3ibz+WIN1VmZ@#btZ!+4wRws_ G4krMaco7Q# diff --git a/Assemblies/CompDeflector.dll b/Assemblies/CompDeflector.dll index a6a7dde6c7a8b6094eb818932c8cbd2716303e16..926f5e17eadf65ac604f2dcd0191abec0530a52b 100644 GIT binary patch delta 52 zcmV-40L%Y?&;fwZ0g#9T+e?YDi&ZxW000vJo*EH3v*l6S0 delta 52 zcmV-40L%Y?&;fwZ0g#9TbZl6$i&ZxW0RR91d>a3Fv*U|OSp7}7>?l{BN(# diff --git a/Assemblies/CompExtraSounds.dll b/Assemblies/CompExtraSounds.dll index 761bc905f69804a1f4a8a6a8d33990bc8e98b8b8..2d42c7ed0ce73d617ddc4294a1da2c6d56e98240 100644 GIT binary patch delta 50 zcmZqBY0#O_!F=1hb7S{Sb`AyxVTO59f|i?eI0{$=+C=R+e?7|bp8l+q#p7wk*3EBt GMK}P(S`w51 delta 50 zcmZqBY0#O_!K{?)ys`TxI|m~J14E9KVZ-JejsjMJ)D=4#_ij$~?Jzk$<@$Qh*v)Tv GMK}PqeiFR^ diff --git a/Assemblies/CompInstalledPart.dll b/Assemblies/CompInstalledPart.dll index 740138143e4290796a25ade769bde8f6f5b434fb..bde67c30df244c03eecd4875ef6a587a4177949c 100644 GIT binary patch delta 48 zcmV-00MGw`umOOu0g#9T+)IhEi)}3go*EH3v-~ZH84#NDt0nLZjzgldy{_C-?6I?y GM{E!S))rO( delta 48 zcmV-00MGw`umOOu0g#9TO8jWCi)}3gh#D+Eo2xl67l%_T2|LlU!; GM{E%6aTACD diff --git a/Assemblies/CompLumbering.dll b/Assemblies/CompLumbering.dll index c85ba98c83baee09d0a59a620572d347545f4478..dffd28d967c244f6e50095473202f18dab68ba4c 100644 GIT binary patch delta 50 zcmZp$Xt0>j!F=1hb7OZi7Y74_FvC14LCeiz+-@8KHNu>^k}h+-<^(c!2VP}(y*WpC G3I_m`0T1*5 delta 50 zcmV-20L}k^IDj~ihyx;RL$Qm43J3uJ003+nF@Uoc3q}YKuj`pzjhC}eztpaB+(Mv` IvuqQT2(V5Q9smFU diff --git a/Assemblies/CompOverlays.dll b/Assemblies/CompOverlays.dll index ae3589f6bc1721045f3fe6f01d57f8c512fa40b1..bbd7d5704f13db485dff74a529f693d442460e47 100644 GIT binary patch delta 50 zcmZqBXwaC@!FwkCq7dHz delta 50 zcmZqBXwaC@!K|F?ys>*d8wVo;14E9KVZ&x8b~YA)X#piG6bxNGdx|C2Xg>SOu{nZ! G1qT3thY$P! diff --git a/Assemblies/CompOversizedWeapon.dll b/Assemblies/CompOversizedWeapon.dll index 2716c3d2d66ee9d033543d7332db83242f4ce04b..1500eff39a6020023e788591ff21c15196699297 100644 GIT binary patch delta 50 zcmV-20L}k^P=HX7hy&Y8iLr}u5(oeQ69AqX5jnF26VM6}`x!?GMXHrYnf~~Syc?9E Iv*aBd3e1TUDF6Tf delta 50 zcmV-20L}k^P=HX7hyx;RL$Ql-5(ohR003+nF@UoK6VM6}^1RmJA;A1evhjOJ<2%0Y Iv*aBd3e(UO)&Kwi diff --git a/Assemblies/CompSlotLoadable.dll b/Assemblies/CompSlotLoadable.dll index 1295407be626ec505b1564460a7e2d000ec144fb..ac099f86e2b200b886199bf84e37a3c2cc2234ef 100644 GIT binary patch delta 48 zcmZoz!PKyVX+j6{9q-PK-R>bQ^P~hVH(v{h(-fE`DEipPq0*r}b!l5&V*TIEE_HiE E0otV$5dZ)H delta 48 zcmV-00MGw`r~-hf0+5IUN&INBi$_!hh#D+>f21>eXq?pZI1^2T= Ge!Law(iFS^ diff --git a/Assemblies/CompToggleDef.dll b/Assemblies/CompToggleDef.dll index 85f2af6bad9d9726c3f71d01771c8580b463c5c5..e76a2fcbbe40072ac6479c22f02975b2108096a2 100644 GIT binary patch delta 50 zcmV-20L}k^M1Vw)hy&b9iLr|h4F~`L69AqX5jnG>4VnoMsen>fB%$m|hM1p^<=AIQ IvrHGX3dYM5H~;_u delta 50 zcmZp0X>gg)!K|F?ys?{~mxGakfgwlAuwnBe-dUUi-Fk+SM}_*e798nc` delta 49 zcmV-10M7q_j0S*=29SsYtMP!bixchyn;N`0v!d?KZV-U>48O9V4NR$Hp@{xCzVx?% HT>*e7P4E~S diff --git a/Assemblies/PawnShields.dll b/Assemblies/PawnShields.dll index c3ceb9abed5269931f04ccb605ee1f9fad417bfd..16d1d64179d26401daa2d56f99101cc6951034b0 100644 GIT binary patch delta 3974 zcmZWs3vgA{72W5Yd(VCEzTbVH`ydc7&+svr5E8;iz?1+{Qa}m8R$>$)AY=>`3~Is8 z4UjY))W;Abjedo95$f24A1d7nhnuRQ6EY>}nD7s#N*?tnN1W2iv806Ms5@X= zYWJ;J#t(m`ia$KuC*hhT%IcD77YJ8P9{M3XJG(3p@K+IEjxI?J!hn^A>DUgez;RPn{S!cJ4g zd||5suiGkSKbG->q#5**o*z}pn=%czuyqg&xZ9C8#iPZ?rK zxJ(X!?<3dZY>v|k4#rEce2yCOQamm74D{m)8U9;?55Yv z`I<@`4p$O;8Y3$p1BQTzSuhjZE<`pA1U54cw@?U~Fyb;_7INjQC0`EYUh+AGNb<0S z#r}I`5b6j=1(eMZqp-`j8V5DUeh4udnl7U7T4){WM=XV_T-$jRJ`;6lf34Lcwh}gS zWxr4Menbgnd@JG)o@MyBeh_>D?MHRA9av{Iqx3mfjw&TVB`I?W-yxl8D&}FA@;*WO zf2}8RiBhdpm++bOXS6qjI}o=J?j&p`9N|@2H&Nj`?L8Q?1hd9Mn7@uK=FEfx_~#Ww z3DfMirE(laH-iX|Ey3|?Z5ur_d)F&Oq{D_y>QgXh0sJ* zD3Lw-Cy}FJF!|O&9(&Ii4cSTdB%CnvU{;cqvJ=J_C{41{7&*3Yl@WN7<6vRZ*~vaJ z#z7UaM8WZWp$*H14RvyK_0sz#c6)JT@GZV~86@odu(Go;o1&I@TEEf{ zx)lyVo5LVnLBMwu|4Zdj)H!s}2D-hDDqm-+WF;}!NvL+lUksabe)Acu&CKEwC^WW9cbp&N zCq27ZDjnYt+V?SDB){RR-R~UiceAPb-5%m1&aV%+L?(t#Wtp(grR;CQUZFyRB7OW<#4A`G z9rp@dGux++Cks%MNGWH?-!|bqIr;MyF`X~0Y7{7+~=vr z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n-7?}k_lguW@y~<~TLo7@>FI`(7{gJyd@>c=gG_j;y6a zFD6-g@PgFf46&-7do0b+VQxC6VcwyT2U&TNZS{l=1KvxrUZR)b1W5ouJo5wi<(AZj!wx{$^yr?yT~)r)RLM$W@HC;?8H2?*gNv9?G5L;CHfh~B zgvul^u}-Dw1@%0I5p}%Jm7R)cLLAY8afEqg)>4(rssORJKThN~5UBVmrS$yX- z@wXz&c{AT0U9A$#^*ntu*7{u3XLkyRdyWXJT)JcY`nK-d~3a$sfDFG|@KZ8I-r zm2})0_%8Q~NwKNI%}t)}EzV+5!AyN84(({*UXd#H^ZP^!ooEgWbvz6MY4youcvat(PzOmr;S&OSwV2c@;qx3`_W9#sj45yPkq zkrgzwE;cWmCEJ90g1gwY_&w-iSIaVSR!DP{>|z}v7qQAyCfZ<<_c~d@CIpIQ3+1ZI z=O)<<#j)A4L#)vjSaJYNw~O>rw$|CqE7(2N&ajTaqxLrjzU_VABi>LQ8D8YJ;(uaz z(_Z>4lVgYq!1qz|vrN|F+eBT>084wv%ajc;6R&cmDfQxK9$w@B|CvR(zpjysuQT2(uLK}WcA+nan|$BzM6tuX+8hf+_!RSI&XNQ S^Udv3Q|f-%cjo&3*8c#2HR3e@ diff --git a/Source/AllModdingComponents/CompActivatableEffect/HarmonyCompActivatableEffect.cs b/Source/AllModdingComponents/CompActivatableEffect/HarmonyCompActivatableEffect.cs index c7bb73fb..8f93d57f 100644 --- a/Source/AllModdingComponents/CompActivatableEffect/HarmonyCompActivatableEffect.cs +++ b/Source/AllModdingComponents/CompActivatableEffect/HarmonyCompActivatableEffect.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using Harmony; using RimWorld; @@ -17,9 +18,9 @@ static HarmonyCompActivatableEffect() harmony.Patch(typeof(Pawn).GetMethod("GetGizmos"), null, new HarmonyMethod(typeof(HarmonyCompActivatableEffect).GetMethod("GetGizmosPrefix"))); harmony.Patch(typeof(PawnRenderer).GetMethod("DrawEquipmentAiming"), null, - new HarmonyMethod(typeof(HarmonyCompActivatableEffect).GetMethod("DrawEquipmentAimingPostFix"))); + new HarmonyMethod(typeof(HarmonyCompActivatableEffect), nameof(DrawEquipmentAimingPostFix))); harmony.Patch(typeof(Verb).GetMethod("TryStartCastOn"), - new HarmonyMethod(typeof(HarmonyCompActivatableEffect).GetMethod("TryStartCastOnPrefix")), null); + new HarmonyMethod(typeof(HarmonyCompActivatableEffect), nameof(TryStartCastOnPrefix)), null); harmony.Patch(typeof(Pawn_DraftController).GetMethod("set_Drafted"), null, new HarmonyMethod(typeof(HarmonyCompActivatableEffect).GetMethod("set_Drafted_PostFix"))); harmony.Patch(typeof(Pawn).GetMethod("ExitMap"), @@ -74,31 +75,33 @@ public static bool TryStartCastOnPrefix(ref bool __result, Verb __instance) { if (__instance.caster is Pawn pawn) { - var pawn_EquipmentTracker = pawn.equipment; - if (pawn_EquipmentTracker != null) - { - //Log.Message("2"); - //ThingWithComps thingWithComps = (ThingWithComps)AccessTools.Field(typeof(Pawn_EquipmentTracker), "primaryInt").GetValue(pawn_EquipmentTracker); - var thingWithComps = - pawn_EquipmentTracker - .Primary; //(ThingWithComps)AccessTools.Field(typeof(Pawn_EquipmentTracker), "primaryInt").GetValue(pawn_EquipmentTracker); + var pawn_EquipmentTracker = pawn?.equipment; + if (pawn_EquipmentTracker == null) return true; - if (thingWithComps != null) - { - //Log.Message("3"); - var compActivatableEffect = thingWithComps.GetComp(); - if (compActivatableEffect != null) - if (__instance.EquipmentSource == thingWithComps) - if (compActivatableEffect.CurrentState != CompActivatableEffect.State.Activated) - { - if (Find.TickManager.TicksGame % 250 == 0) - Messages.Message("DeactivatedWarning".Translate(pawn.Label), - MessageTypeDefOf.RejectInput); - __result = false; - return false; - } - } + var thingWithComps = + pawn_EquipmentTracker?.Primary; //(ThingWithComps)AccessTools.Field(typeof(Pawn_EquipmentTracker), "primaryInt").GetValue(pawn_EquipmentTracker); + + var compActivatableEffect = thingWithComps?.GetComp(); + if (compActivatableEffect == null) return true; + + //Equipment source throws errors when checked while casting abilities with a weapon equipped. + // to avoid this error preventing our code from executing, we do a try/catch. + try + { + if (__instance?.EquipmentSource != thingWithComps) + return true; + } + catch (Exception e) + { } + + if (compActivatableEffect.CurrentState == CompActivatableEffect.State.Activated) return true; + + if (Find.TickManager.TicksGame % 250 == 0) + Messages.Message("DeactivatedWarning".Translate(pawn.Label), + MessageTypeDefOf.RejectInput); + __result = false; + return false; } return true; }