Closed AmCh-Q closed 1 year ago
The index was changed with the new update, not with 1.4 initial update. And this fix isn't ideal since some players might not have the newest game update and thus it will break the patch for them.
In this case, need to grab the local index dynamically, rather than relying on a fixed number.
Yes that's actually what I was thinking of next as well, I can do that if you aren't on it already.
If you can do it, it would be great
Just made the edit. The transpiler now looks for the most recent previous access to List\<Apparel>.get_Item(idx) and get that local idx var.
Was it tested on both stable and unstable game versions?
I have just tested it on both unstable1.4(Ubuntu w/ Proton) and stable1.4(Windows 11).
It now runs without errors on my side.
Though just in case you might want to double check it, since this is my first PR to Vanilla Expanded.
Checked on the stable branch, seems to be fine, thanks for the fix! I'm merging this.
In RimWorld 1.4 the index of local iterator for pawn.apparel.WornApparel changed from 20 to 23, leading to ArgumentOutOfRangeException, this edit fixes it.
Obviously this change is not compatible with pre-1.4 versions. IDK how you all do multi-version support.