From 6283baa77851ebe36784680810a108633e108010 Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Sun, 19 Jun 2022 17:09:04 -0700 Subject: [PATCH] Make the IsNull checks in the hybrid extensions return true if thingDefName really is null. Also add another null check when searching for a hybrid. --- 1.3/Assemblies/RJW_Menstruation.dll | Bin 158208 -> 158208 bytes .../RJW_Menstruation/Things.cs | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/1.3/Assemblies/RJW_Menstruation.dll b/1.3/Assemblies/RJW_Menstruation.dll index a0bf21e0e79a467945c2ef6bac911f9d2aa27999..f82dc69464cf9dc883d591603534ba795338d890 100644 GIT binary patch delta 1118 zcmY+@dq`7J90%~<_iWS6%*SG8WYJkmXId`k zrs{p5xJgqIGwt-tF`j5_T#l>8O_cEeSPH8tWMpn*yILHYRfH`6qv z>z?h*W|vUHM{Uo0w&%Jsq;`r!K8j_CPZioWB}Rxlx;Cn6F&v43%q)oQ zg6XZL`&bL|bnVxV*n&b`b(F;v-h!o4eQ^qJ#TKbXo5IiIs8s0)g-6gVwcDid3%Dhf zVIJTY@kZ)^S>bI!z^&ES(GV%T9f?v=C_DIop>h~7E_h86Q*oq zot6FI*O4UEXZAa9V1iU@yx(~fc~Z}8)y`We(xn~7LbtIj8v$|qengz0F09nUehm0s zLPe9cihkSosvXWQ%r=BgE3}zDnT=jIU1+h)>gVqjGtWpxe5E35(Pb2N;qISI^u=&r zXqHy56~@q%Gh7%$n<2e0hO08u3S+n}Gp#U&%7ZON)1v#)&VJz{S7dN%B@WT)+` l<>#+0+NJ%U5aemtpn9rU1ZvV+_RYi&d(>1v`-q??{x^)u6|(>U delta 1077 zcmYk*ZAep57zgn4KiizQT4^*ZoX}b3TpBH!8X2e&lrbw%iYzKe#VV+vh|*wA#r$C8 zST#||ZW0vQdYQJC_Tqw~52cckVJ}F~3M%^$y%U{#@6oz&;r{ObJkN9Pg;PBwRS!u` z4f+RX{=D%wT2Su4xB zs!3hqMEissX-+&;^%f7Of#hIpB2)BD)qSabe>#^mru4ioJyVq`beL}<2MdHAmnZ9T zP+-xB&*e&+BB6V#_C(@^Fi-J*%>ZxbpVe7XLpwliit5!Zc3_gKT4JLz>p+IkaDvP_ zv0SK0lG!C}5h|H1vk)qUDs?iuj1xi@eVkoEx6m=Y%&ub4EBKwr>>6GOg(0&rz6-VJ z;;aiZGL@~>l9k3d>xM&U9dC0TE}li;HH@$*S~9&_Q<^x! zZsLL(YX71KUH=vKpjQ+Y61TMnPlOWbZ`O-fLc@BG^%g!0bs9a^+n{!B!c%FV^$tv` zl+75(UD)jK@^2bN$O_VjY&9H3+>_2_ny(a&O26EPtbH(R!ro2FN{h&5?#Sgz7g^nE zA76PuDC8>PS(PenU>{D6XMA1^&0H&#@yfs$j_`9cJ}?HKCUsy84I)zp#?T}(Wnc`i zvm(pZ!tpYxsN#eD$%Pb`Z}I+@p)pr$a+*)>`ccgr^Rr1vnBQgm43`CWRM5Fe zZSGFf*7Ne3_IKyur651D%}qlHo^?}4Wa@VMQ%5&D MBFP>)2EW7j7k=~+ZvX%Q diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/Things.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/Things.cs index ef1f0fa..324f428 100644 --- a/1.3/source/RJW_Menstruation/RJW_Menstruation/Things.cs +++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/Things.cs @@ -102,7 +102,7 @@ namespace RJW_Menstruation { get { - return thingDefName?.Length < 1; + return (thingDefName?.Length ?? 0) < 1; } } public ThingDef GetDef @@ -131,7 +131,7 @@ namespace RJW_Menstruation if (hybridExtension.NullOrEmpty()) return null; else { - return hybridExtension.Find(x => x.GetDef.defName?.Equals(race) ?? false); + return hybridExtension.Find(x => x.GetDef?.defName?.Equals(race) ?? false); } } @@ -165,7 +165,7 @@ namespace RJW_Menstruation { get { - return thingDefName?.Length < 1; + return (thingDefName?.Length ?? 0) < 1; } } public ThingDef GetDef