Closed schrum2 closed 2 years ago
Put info about this in block_sets.py
I cleaned up the code a bit and I think it works. Comment, test, and then close if you agree.
Also, this is probably just my own ignorance, but why is WATER in the machine set?
I added the command line parameter, which now gives users the ability to choose from all blocks (which is also the default), undroppable blocks, and blocks that are needed for a flying machine. Obviously, more can be added in the future very easily, the only things you'd need to add are the name for it in the main file, and a corresponding list in block_sets
Please make the list of undroppable types be defined with the names of the blocks rather than the numbers
I printed all of the block types and then removed the quotation marks to just get the constant names. From there I deleted all the blocks that just cause block drops, more so than the original list.
Some of the blocks are just not ever useful to place. When they are placed in the world they just become item drops that fill up the world and slow down the execution. Make a command line parameter POTENTIAL_BLOCK_SET that can only take on one of a range of specific string values (see https://realpython.com/command-line-interfaces-python-argparse/#setting-a-domain-of-allowed-values-for-a-specific-argument)
One option is "all" which is what we currently have. Any block can be chosen.
Another option is "undroppable" (unless you can think of a better name). This excludes all of the block types that just end up falling to the ground when placed.
We can also add other types. I think a good one might be "machine", which consists of only the blocks that we know are necessary to make that flying machine example from the initial Evocraft example code.
We might also want to have another set that contains a variety of redstone components to see if we can specifically evolve things that try to "function" in some way.