Foreach

From Sega Retro

So the intention of this was to be able to split up a list, and then do something to each element of that list individually.

I must have abandoned this first time around because I was doing a weird substitution thing that didn't work with templates wouldn't work. The implementation sucked so I've re-worked it, but I can't currently think of a solution to the problem. More at 11.

-Black Squirrel (talk) 14:43, 20 July 2018 (CDT)


I think I've got something now
I've got it so that if you pass a list of accessories, and set the "template" parameter to Template:AccessoryCategoryCheck2, it'll work out some arguments to pass into Template:AccessoryStore. This is about as best as I can do to keep things backwards compatible with what's already there in bob templates.
I think it's probably inevitable, however, that when accessory support is added to a bob, the user is going to also have to specify extra details - in this case, the format (to solve the MD/MCD/32X problems) and whether Sega informed people that accessory was supported. Messier still when you consider the Justifier is compatible with both the Mega Drive and Mega CD versions of Lethal Enforcers.
So this could have been a big waste of time. Dunno. -Black Squirrel (talk) 08:22, 21 July 2018 (CDT)