andrewminer / crafting-guide

The ultimate step-by-step guide to make anything in Minecraft
http://crafting-guide.com
66 stars 192 forks source link

Allow mod versions to inherit from earlier versions #185

Closed andrewminer closed 8 years ago

andrewminer commented 8 years ago

PROBLEM:

When creating the mod-version.cg file for a new version of a mod, the great bulk of the items are unlikely to have changed either their recipes or images. It's a nuisance (not to mention a waste of spaces) to have to completely duplicate the old mod version in order to make the necessary adjustments. The more frequently a mod is updated, the worse this becomes.

SOLUTION:

The mod-version.cg parser should support a directive which states that it extends some other mod-version.cg file. This should effectively act as though the other file were included in-place. There should also be a directive to completely remove an item which had been previously declared. Finally, a duplicate item directive shouldn't be treated as an error, but rather as a redefinition of the item in question.

As a more extended solution, it may be better to allow the mod and mod version files to be parsed with the same parser as a single file and create a pre-processor which will convert separate files into a single file. This would then be included as a step in compiling the website for publication.