Closed olsonpm closed 3 years ago
Hi,
I didn't actually choose the format plist.txt
uses, I just supported the already existing format the THOR patcher was using. I agree that, to some extent, a simple ordered list, indexed by line number, would work well while being simpler to handle as a human.
The main reason for that was to be able to use this method in a call to filter_map
. The error handling in filter_map
is "silent" which should be avoided in general, but I figured it was not too bad in this case and it had the benefit of transparently allowing for any type of inline comments (#
, //
, etc.) without making the code more complex.
gosh I swore when I looked for documentation on the thor patcher the plist.txt syntax was just a list of the patches. Googling again I'm seeing the indexes at the beginning. My bad
gotcha, thanks much
and fwiw I finally got it working last night. Mostly stupid mistakes on my part. I'll try to release the client side code in herc.ws in case others want to use a different skin.
https://github.com/L1nkZ/rpatchur/blob/c40f5e756471a7023a2bf94aec2955c8829f4282/gruf/src/thor/reader.rs#L50
(original question)
I was wondering why you chose to format plist as
{idx} {file name}
rather than infer the index based off the line number ? Basically I'm not understanding why you'd want an out of order plist e.g.Thanks